From f4581618c2c0bf5d08d7af40d21ae8bae1b665cf Mon Sep 17 00:00:00 2001 From: rowi1de Date: Fri, 29 Nov 2019 11:12:54 +0100 Subject: [PATCH] Add node_modules required production dependencies --- .gitignore | 2 +- README.md | 2 +- node_modules/.bin/mkdirp | 1 + node_modules/.bin/which | 1 + node_modules/@actions/core/README.md | 140 + node_modules/@actions/core/lib/command.d.ts | 16 + node_modules/@actions/core/lib/command.js | 66 + node_modules/@actions/core/lib/command.js.map | 1 + node_modules/@actions/core/lib/core.d.ts | 112 + node_modules/@actions/core/lib/core.js | 195 + node_modules/@actions/core/lib/core.js.map | 1 + node_modules/@actions/core/package.json | 67 + node_modules/@actions/github/LICENSE.md | 7 + node_modules/@actions/github/README.md | 50 + node_modules/@actions/github/lib/context.d.ts | 26 + node_modules/@actions/github/lib/context.js | 45 + .../@actions/github/lib/context.js.map | 1 + node_modules/@actions/github/lib/github.d.ts | 8 + node_modules/@actions/github/lib/github.js | 29 + .../@actions/github/lib/github.js.map | 1 + .../@actions/github/lib/interfaces.d.ts | 36 + .../@actions/github/lib/interfaces.js | 4 + .../@actions/github/lib/interfaces.js.map | 1 + node_modules/@actions/github/package.json | 71 + node_modules/@octokit/endpoint/LICENSE | 21 + node_modules/@octokit/endpoint/README.md | 421 + .../@octokit/endpoint/dist-node/index.js | 379 + .../@octokit/endpoint/dist-node/index.js.map | 1 + .../@octokit/endpoint/dist-src/defaults.js | 17 + .../dist-src/endpoint-with-defaults.js | 5 + .../@octokit/endpoint/dist-src/index.js | 3 + .../@octokit/endpoint/dist-src/merge.js | 22 + .../@octokit/endpoint/dist-src/parse.js | 81 + .../dist-src/util/add-query-parameters.js | 21 + .../util/extract-url-variable-names.js | 11 + .../endpoint/dist-src/util/lowercase-keys.js | 9 + .../endpoint/dist-src/util/merge-deep.js | 16 + .../@octokit/endpoint/dist-src/util/omit.js | 8 + .../endpoint/dist-src/util/url-template.js | 170 + .../@octokit/endpoint/dist-src/version.js | 1 + .../endpoint/dist-src/with-defaults.js | 13 + .../endpoint/dist-types/defaults.d.ts | 2 + .../dist-types/endpoint-with-defaults.d.ts | 3 + .../@octokit/endpoint/dist-types/index.d.ts | 1 + .../@octokit/endpoint/dist-types/merge.d.ts | 2 + .../@octokit/endpoint/dist-types/parse.d.ts | 2 + .../dist-types/util/add-query-parameters.d.ts | 4 + .../util/extract-url-variable-names.d.ts | 1 + .../dist-types/util/lowercase-keys.d.ts | 5 + .../endpoint/dist-types/util/merge-deep.d.ts | 1 + .../endpoint/dist-types/util/omit.d.ts | 5 + .../dist-types/util/url-template.d.ts | 3 + .../@octokit/endpoint/dist-types/version.d.ts | 1 + .../endpoint/dist-types/with-defaults.d.ts | 2 + .../@octokit/endpoint/dist-web/index.js | 379 + .../@octokit/endpoint/dist-web/index.js.map | 1 + .../universal-user-agent/LICENSE.md | 7 + .../universal-user-agent/README.md | 25 + .../universal-user-agent/dist-node/index.js | 22 + .../dist-node/index.js.map | 1 + .../universal-user-agent/dist-src/browser.js | 3 + .../universal-user-agent/dist-src/index.js | 1 + .../universal-user-agent/dist-src/node.js | 12 + .../dist-types/browser.d.ts | 1 + .../dist-types/index.d.ts | 1 + .../universal-user-agent/dist-types/node.d.ts | 1 + .../universal-user-agent/dist-web/index.js | 6 + .../dist-web/index.js.map | 1 + .../universal-user-agent/package.json | 68 + node_modules/@octokit/endpoint/package.json | 82 + node_modules/@octokit/graphql/LICENSE | 21 + node_modules/@octokit/graphql/README.md | 292 + node_modules/@octokit/graphql/index.js | 15 + node_modules/@octokit/graphql/lib/error.js | 16 + node_modules/@octokit/graphql/lib/graphql.js | 36 + .../@octokit/graphql/lib/with-defaults.js | 13 + node_modules/@octokit/graphql/package.json | 122 + node_modules/@octokit/request-error/LICENSE | 21 + node_modules/@octokit/request-error/README.md | 68 + .../@octokit/request-error/dist-node/index.js | 55 + .../request-error/dist-node/index.js.map | 1 + .../@octokit/request-error/dist-src/index.js | 40 + .../@octokit/request-error/dist-src/types.js | 0 .../request-error/dist-types/index.d.ts | 27 + .../request-error/dist-types/types.d.ts | 5 + .../@octokit/request-error/dist-web/index.js | 44 + .../request-error/dist-web/index.js.map | 1 + .../@octokit/request-error/package.json | 84 + node_modules/@octokit/request/LICENSE | 21 + node_modules/@octokit/request/README.md | 539 + .../@octokit/request/dist-node/index.js | 148 + .../@octokit/request/dist-node/index.js.map | 1 + .../request/dist-src/fetch-wrapper.js | 93 + .../request/dist-src/get-buffer-response.js | 3 + .../@octokit/request/dist-src/index.js | 9 + .../@octokit/request/dist-src/version.js | 1 + .../request/dist-src/with-defaults.js | 22 + .../request/dist-types/fetch-wrapper.d.ts | 11 + .../dist-types/get-buffer-response.d.ts | 2 + .../@octokit/request/dist-types/index.d.ts | 1 + .../@octokit/request/dist-types/version.d.ts | 1 + .../request/dist-types/with-defaults.d.ts | 2 + .../@octokit/request/dist-web/index.js | 132 + .../@octokit/request/dist-web/index.js.map | 1 + .../universal-user-agent/LICENSE.md | 7 + .../universal-user-agent/README.md | 25 + .../universal-user-agent/dist-node/index.js | 22 + .../dist-node/index.js.map | 1 + .../universal-user-agent/dist-src/browser.js | 3 + .../universal-user-agent/dist-src/index.js | 1 + .../universal-user-agent/dist-src/node.js | 12 + .../dist-types/browser.d.ts | 1 + .../dist-types/index.d.ts | 1 + .../universal-user-agent/dist-types/node.d.ts | 1 + .../universal-user-agent/dist-web/index.js | 6 + .../dist-web/index.js.map | 1 + .../universal-user-agent/package.json | 68 + node_modules/@octokit/request/package.json | 97 + node_modules/@octokit/rest/LICENSE | 22 + node_modules/@octokit/rest/README.md | 46 + node_modules/@octokit/rest/index.d.ts | 36064 ++++++++++++++++ node_modules/@octokit/rest/index.js | 15 + node_modules/@octokit/rest/lib/constructor.js | 29 + node_modules/@octokit/rest/lib/core.js | 3 + node_modules/@octokit/rest/lib/factory.js | 10 + .../@octokit/rest/lib/parse-client-options.js | 89 + .../@octokit/rest/lib/register-plugin.js | 9 + .../universal-user-agent/LICENSE.md | 7 + .../universal-user-agent/README.md | 25 + .../universal-user-agent/dist-node/index.js | 22 + .../dist-node/index.js.map | 1 + .../universal-user-agent/dist-src/browser.js | 3 + .../universal-user-agent/dist-src/index.js | 1 + .../universal-user-agent/dist-src/node.js | 12 + .../dist-types/browser.d.ts | 1 + .../dist-types/index.d.ts | 1 + .../universal-user-agent/dist-types/node.d.ts | 1 + .../universal-user-agent/dist-web/index.js | 6 + .../dist-web/index.js.map | 1 + .../universal-user-agent/package.json | 68 + node_modules/@octokit/rest/package.json | 176 + .../authentication-deprecated/authenticate.js | 52 + .../before-request.js | 43 + .../authentication-deprecated/index.js | 31 + .../request-error.js | 55 + .../plugins/authentication/before-request.js | 65 + .../rest/plugins/authentication/index.js | 21 + .../plugins/authentication/request-error.js | 61 + .../rest/plugins/authentication/validate.js | 21 + .../with-authorization-prefix.js | 23 + .../@octokit/rest/plugins/log/index.js | 28 + .../@octokit/rest/plugins/pagination/index.js | 9 + .../rest/plugins/pagination/iterator.js | 34 + .../normalize-paginated-list-response.js | 116 + .../rest/plugins/pagination/paginate.js | 40 + .../rest/plugins/register-endpoints/index.js | 7 + .../register-endpoints/register-endpoints.js | 98 + .../rest/plugins/rest-api-endpoints/index.js | 13 + .../plugins/rest-api-endpoints/routes.json | 5927 +++ .../@octokit/rest/plugins/validate/index.js | 7 + .../rest/plugins/validate/validate.js | 151 + .../types/.github/ISSUE_TEMPLATE/01_help.md | 5 + .../types/.github/ISSUE_TEMPLATE/02_bug.md | 19 + .../ISSUE_TEMPLATE/03_feature_request.md | 19 + .../types/.github/ISSUE_TEMPLATE/04_thanks.md | 19 + .../types/.github/workflows/release.yml | 25 + .../types/.github/workflows/routes-update.yml | 37 + .../@octokit/types/.github/workflows/test.yml | 19 + .../@octokit/types/CODE_OF_CONDUCT.md | 75 + node_modules/@octokit/types/CONTRIBUTING.md | 59 + node_modules/@octokit/types/LICENSE | 7 + node_modules/@octokit/types/README.md | 19 + node_modules/@octokit/types/package.json | 103 + .../scripts/update-endpoints/fetch-json.js | 41 + .../update-endpoints/generated/README.md | 3 + .../update-endpoints/generated/endpoints.json | 25258 +++++++++++ .../templates/endpoints.ts.template | 33 + .../scripts/update-endpoints/typescript.js | 179 + .../@octokit/types/src/AuthInterface.ts | 43 + .../@octokit/types/src/EndpointDefaults.ts | 22 + .../@octokit/types/src/EndpointInterface.ts | 74 + .../@octokit/types/src/EndpointOptions.ts | 8 + node_modules/@octokit/types/src/Fetch.ts | 4 + .../@octokit/types/src/OctokitResponse.ts | 18 + .../@octokit/types/src/RequestHeaders.ts | 15 + .../@octokit/types/src/RequestInterface.ts | 51 + .../@octokit/types/src/RequestMethod.ts | 10 + .../@octokit/types/src/RequestOptions.ts | 15 + .../@octokit/types/src/RequestParameters.ts | 46 + .../types/src/RequestRequestOptions.ts | 27 + .../@octokit/types/src/ResponseHeaders.ts | 21 + node_modules/@octokit/types/src/Route.ts | 4 + node_modules/@octokit/types/src/Signal.ts | 6 + .../@octokit/types/src/StrategyInterface.ts | 9 + node_modules/@octokit/types/src/Url.ts | 4 + node_modules/@octokit/types/src/VERSION.ts | 1 + .../@octokit/types/src/generated/Endpoints.ts | 14190 ++++++ .../@octokit/types/src/generated/README.md | 3 + node_modules/@octokit/types/src/index.ts | 18 + node_modules/@types/node/LICENSE | 21 + node_modules/@types/node/README.md | 16 + node_modules/@types/node/assert.d.ts | 52 + node_modules/@types/node/async_hooks.d.ts | 132 + node_modules/@types/node/base.d.ts | 41 + node_modules/@types/node/buffer.d.ts | 22 + node_modules/@types/node/child_process.d.ts | 370 + node_modules/@types/node/cluster.d.ts | 260 + node_modules/@types/node/console.d.ts | 3 + node_modules/@types/node/constants.d.ts | 278 + node_modules/@types/node/crypto.d.ts | 602 + node_modules/@types/node/dgram.d.ts | 102 + node_modules/@types/node/dns.d.ts | 366 + node_modules/@types/node/domain.d.ts | 16 + node_modules/@types/node/events.d.ts | 30 + node_modules/@types/node/fs.d.ts | 2297 + node_modules/@types/node/globals.d.ts | 1180 + node_modules/@types/node/http.d.ts | 279 + node_modules/@types/node/http2.d.ts | 960 + node_modules/@types/node/https.d.ts | 53 + node_modules/@types/node/index.d.ts | 100 + node_modules/@types/node/inspector.d.ts | 3257 ++ node_modules/@types/node/module.d.ts | 3 + node_modules/@types/node/net.d.ts | 249 + node_modules/@types/node/os.d.ts | 201 + node_modules/@types/node/package.json | 208 + node_modules/@types/node/path.d.ts | 159 + node_modules/@types/node/perf_hooks.d.ts | 304 + node_modules/@types/node/process.d.ts | 3 + node_modules/@types/node/punycode.d.ts | 12 + node_modules/@types/node/querystring.d.ts | 32 + node_modules/@types/node/readline.d.ts | 136 + node_modules/@types/node/repl.d.ts | 382 + node_modules/@types/node/stream.d.ts | 307 + node_modules/@types/node/string_decoder.d.ts | 7 + node_modules/@types/node/timers.d.ts | 16 + node_modules/@types/node/tls.d.ts | 418 + node_modules/@types/node/trace_events.d.ts | 61 + node_modules/@types/node/ts3.2/globals.d.ts | 19 + node_modules/@types/node/ts3.2/index.d.ts | 20 + node_modules/@types/node/ts3.2/util.d.ts | 15 + node_modules/@types/node/tty.d.ts | 50 + node_modules/@types/node/url.d.ts | 104 + node_modules/@types/node/util.d.ts | 165 + node_modules/@types/node/v8.d.ts | 52 + node_modules/@types/node/vm.d.ts | 95 + node_modules/@types/node/worker_threads.d.ts | 153 + node_modules/@types/node/zlib.d.ts | 352 + node_modules/assertion-error/History.md | 24 + node_modules/assertion-error/README.md | 41 + node_modules/assertion-error/index.d.ts | 11 + node_modules/assertion-error/index.js | 116 + node_modules/assertion-error/package.json | 65 + node_modules/atob-lite/.npmignore | 6 + node_modules/atob-lite/LICENSE.md | 18 + node_modules/atob-lite/README.md | 37 + node_modules/atob-lite/atob-browser.js | 3 + node_modules/atob-lite/atob-node.js | 3 + node_modules/atob-lite/package.json | 70 + node_modules/before-after-hook/LICENSE | 201 + node_modules/before-after-hook/README.md | 574 + node_modules/before-after-hook/index.d.ts | 96 + node_modules/before-after-hook/index.js | 57 + node_modules/before-after-hook/lib/add.js | 46 + .../before-after-hook/lib/register.js | 28 + node_modules/before-after-hook/lib/remove.js | 17 + node_modules/before-after-hook/package.json | 100 + node_modules/btoa-lite/.npmignore | 6 + node_modules/btoa-lite/LICENSE.md | 18 + node_modules/btoa-lite/README.md | 37 + node_modules/btoa-lite/btoa-browser.js | 3 + node_modules/btoa-lite/btoa-node.js | 3 + node_modules/btoa-lite/package.json | 69 + node_modules/chai/CODEOWNERS | 1 + node_modules/chai/CODE_OF_CONDUCT.md | 58 + node_modules/chai/CONTRIBUTING.md | 218 + node_modules/chai/History.md | 1059 + node_modules/chai/LICENSE | 21 + node_modules/chai/README.md | 212 + node_modules/chai/ReleaseNotes.md | 737 + node_modules/chai/bower.json | 26 + node_modules/chai/chai.js | 10854 +++++ node_modules/chai/index.js | 1 + node_modules/chai/karma.conf.js | 28 + node_modules/chai/karma.sauce.js | 41 + node_modules/chai/lib/chai.js | 92 + node_modules/chai/lib/chai/assertion.js | 165 + node_modules/chai/lib/chai/config.js | 94 + node_modules/chai/lib/chai/core/assertions.js | 3804 ++ .../chai/lib/chai/interface/assert.js | 3113 ++ .../chai/lib/chai/interface/expect.js | 47 + .../chai/lib/chai/interface/should.js | 218 + .../chai/lib/chai/utils/addChainableMethod.js | 152 + .../chai/lib/chai/utils/addLengthGuard.js | 60 + node_modules/chai/lib/chai/utils/addMethod.js | 68 + .../chai/lib/chai/utils/addProperty.js | 72 + .../chai/lib/chai/utils/compareByInspect.js | 31 + .../chai/lib/chai/utils/expectTypes.js | 51 + node_modules/chai/lib/chai/utils/flag.js | 33 + node_modules/chai/lib/chai/utils/getActual.js | 20 + .../lib/chai/utils/getEnumerableProperties.js | 26 + .../chai/lib/chai/utils/getMessage.js | 50 + .../chai/utils/getOwnEnumerableProperties.js | 29 + .../utils/getOwnEnumerablePropertySymbols.js | 27 + .../chai/lib/chai/utils/getProperties.js | 36 + node_modules/chai/lib/chai/utils/index.js | 172 + node_modules/chai/lib/chai/utils/inspect.js | 376 + node_modules/chai/lib/chai/utils/isNaN.js | 26 + .../chai/lib/chai/utils/isProxyEnabled.js | 24 + .../chai/lib/chai/utils/objDisplay.js | 50 + .../chai/utils/overwriteChainableMethod.js | 69 + .../chai/lib/chai/utils/overwriteMethod.js | 92 + .../chai/lib/chai/utils/overwriteProperty.js | 92 + node_modules/chai/lib/chai/utils/proxify.js | 147 + node_modules/chai/lib/chai/utils/test.js | 28 + .../chai/lib/chai/utils/transferFlags.js | 45 + node_modules/chai/package.json | 99 + node_modules/chai/register-assert.js | 1 + node_modules/chai/register-expect.js | 1 + node_modules/chai/register-should.js | 1 + node_modules/chai/sauce.browsers.js | 102 + node_modules/check-error/LICENSE | 19 + node_modules/check-error/README.md | 207 + node_modules/check-error/check-error.js | 176 + node_modules/check-error/index.js | 172 + node_modules/check-error/package.json | 133 + node_modules/cross-spawn/CHANGELOG.md | 100 + node_modules/cross-spawn/LICENSE | 21 + node_modules/cross-spawn/README.md | 94 + node_modules/cross-spawn/index.js | 39 + node_modules/cross-spawn/lib/enoent.js | 59 + node_modules/cross-spawn/lib/parse.js | 125 + node_modules/cross-spawn/lib/util/escape.js | 45 + .../cross-spawn/lib/util/readShebang.js | 32 + .../cross-spawn/lib/util/resolveCommand.js | 47 + .../cross-spawn/node_modules/.bin/semver | 1 + .../node_modules/semver/CHANGELOG.md | 39 + .../cross-spawn/node_modules/semver/LICENSE | 15 + .../cross-spawn/node_modules/semver/README.md | 411 + .../node_modules/semver/bin/semver | 160 + .../node_modules/semver/package.json | 63 + .../cross-spawn/node_modules/semver/range.bnf | 16 + .../cross-spawn/node_modules/semver/semver.js | 1483 + node_modules/cross-spawn/package.json | 110 + node_modules/deep-eql/LICENSE | 19 + node_modules/deep-eql/README.md | 116 + node_modules/deep-eql/deep-eql.js | 833 + node_modules/deep-eql/index.js | 455 + node_modules/deep-eql/package.json | 134 + node_modules/deprecation/LICENSE | 15 + node_modules/deprecation/README.md | 77 + node_modules/deprecation/dist-node/index.js | 20 + node_modules/deprecation/dist-src/index.js | 14 + .../deprecation/dist-types/index.d.ts | 3 + node_modules/deprecation/dist-web/index.js | 16 + node_modules/deprecation/package.json | 68 + node_modules/end-of-stream/LICENSE | 21 + node_modules/end-of-stream/README.md | 52 + node_modules/end-of-stream/index.js | 87 + node_modules/end-of-stream/package.json | 65 + node_modules/execa/index.js | 361 + node_modules/execa/lib/errname.js | 39 + node_modules/execa/lib/stdio.js | 41 + node_modules/execa/license | 9 + node_modules/execa/package.json | 107 + node_modules/execa/readme.md | 327 + node_modules/get-func-name/LICENSE | 19 + node_modules/get-func-name/README.md | 123 + node_modules/get-func-name/get-func-name.js | 48 + node_modules/get-func-name/index.js | 44 + node_modules/get-func-name/package.json | 136 + node_modules/get-stream/buffer-stream.js | 51 + node_modules/get-stream/index.js | 50 + node_modules/get-stream/license | 9 + node_modules/get-stream/package.json | 81 + node_modules/get-stream/readme.md | 123 + node_modules/is-plain-object/LICENSE | 21 + node_modules/is-plain-object/README.md | 119 + node_modules/is-plain-object/index.cjs.js | 48 + node_modules/is-plain-object/index.d.ts | 3 + node_modules/is-plain-object/index.js | 35 + node_modules/is-plain-object/package.json | 128 + node_modules/is-stream/index.js | 21 + node_modules/is-stream/license | 21 + node_modules/is-stream/package.json | 73 + node_modules/is-stream/readme.md | 42 + node_modules/isexe/.npmignore | 2 + node_modules/isexe/LICENSE | 15 + node_modules/isexe/README.md | 51 + node_modules/isexe/index.js | 57 + node_modules/isexe/mode.js | 41 + node_modules/isexe/package.json | 63 + node_modules/isexe/test/basic.js | 221 + node_modules/isexe/windows.js | 42 + node_modules/isobject/LICENSE | 21 + node_modules/isobject/README.md | 127 + node_modules/isobject/index.cjs.js | 14 + node_modules/isobject/index.d.ts | 3 + node_modules/isobject/index.js | 10 + node_modules/isobject/package.json | 128 + 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/lodash.get/LICENSE | 47 + node_modules/lodash.get/README.md | 18 + node_modules/lodash.get/index.js | 931 + node_modules/lodash.get/package.json | 72 + node_modules/lodash.set/LICENSE | 47 + node_modules/lodash.set/README.md | 18 + node_modules/lodash.set/index.js | 990 + node_modules/lodash.set/package.json | 72 + node_modules/lodash.uniq/LICENSE | 47 + node_modules/lodash.uniq/README.md | 18 + node_modules/lodash.uniq/index.js | 896 + node_modules/lodash.uniq/package.json | 72 + node_modules/lodash/LICENSE | 47 + node_modules/lodash/README.md | 39 + node_modules/lodash/_DataView.js | 7 + node_modules/lodash/_Hash.js | 32 + node_modules/lodash/_LazyWrapper.js | 28 + node_modules/lodash/_ListCache.js | 32 + node_modules/lodash/_LodashWrapper.js | 22 + node_modules/lodash/_Map.js | 7 + node_modules/lodash/_MapCache.js | 32 + node_modules/lodash/_Promise.js | 7 + node_modules/lodash/_Set.js | 7 + node_modules/lodash/_SetCache.js | 27 + node_modules/lodash/_Stack.js | 27 + node_modules/lodash/_Symbol.js | 6 + node_modules/lodash/_Uint8Array.js | 6 + node_modules/lodash/_WeakMap.js | 7 + node_modules/lodash/_apply.js | 21 + node_modules/lodash/_arrayAggregator.js | 22 + node_modules/lodash/_arrayEach.js | 22 + node_modules/lodash/_arrayEachRight.js | 21 + node_modules/lodash/_arrayEvery.js | 23 + node_modules/lodash/_arrayFilter.js | 25 + node_modules/lodash/_arrayIncludes.js | 17 + node_modules/lodash/_arrayIncludesWith.js | 22 + node_modules/lodash/_arrayLikeKeys.js | 49 + node_modules/lodash/_arrayMap.js | 21 + node_modules/lodash/_arrayPush.js | 20 + node_modules/lodash/_arrayReduce.js | 26 + node_modules/lodash/_arrayReduceRight.js | 24 + node_modules/lodash/_arraySample.js | 15 + node_modules/lodash/_arraySampleSize.js | 17 + node_modules/lodash/_arrayShuffle.js | 15 + node_modules/lodash/_arraySome.js | 23 + node_modules/lodash/_asciiSize.js | 12 + node_modules/lodash/_asciiToArray.js | 12 + node_modules/lodash/_asciiWords.js | 15 + node_modules/lodash/_assignMergeValue.js | 20 + node_modules/lodash/_assignValue.js | 28 + node_modules/lodash/_assocIndexOf.js | 21 + node_modules/lodash/_baseAggregator.js | 21 + node_modules/lodash/_baseAssign.js | 17 + node_modules/lodash/_baseAssignIn.js | 17 + node_modules/lodash/_baseAssignValue.js | 25 + node_modules/lodash/_baseAt.js | 23 + node_modules/lodash/_baseClamp.js | 22 + node_modules/lodash/_baseClone.js | 165 + node_modules/lodash/_baseConforms.js | 18 + node_modules/lodash/_baseConformsTo.js | 27 + node_modules/lodash/_baseCreate.js | 30 + node_modules/lodash/_baseDelay.js | 21 + node_modules/lodash/_baseDifference.js | 67 + node_modules/lodash/_baseEach.js | 14 + node_modules/lodash/_baseEachRight.js | 14 + node_modules/lodash/_baseEvery.js | 21 + node_modules/lodash/_baseExtremum.js | 32 + node_modules/lodash/_baseFill.js | 32 + node_modules/lodash/_baseFilter.js | 21 + node_modules/lodash/_baseFindIndex.js | 24 + node_modules/lodash/_baseFindKey.js | 23 + node_modules/lodash/_baseFlatten.js | 38 + node_modules/lodash/_baseFor.js | 16 + node_modules/lodash/_baseForOwn.js | 16 + node_modules/lodash/_baseForOwnRight.js | 16 + node_modules/lodash/_baseForRight.js | 15 + node_modules/lodash/_baseFunctions.js | 19 + node_modules/lodash/_baseGet.js | 24 + node_modules/lodash/_baseGetAllKeys.js | 20 + node_modules/lodash/_baseGetTag.js | 28 + node_modules/lodash/_baseGt.js | 14 + node_modules/lodash/_baseHas.js | 19 + node_modules/lodash/_baseHasIn.js | 13 + node_modules/lodash/_baseInRange.js | 18 + node_modules/lodash/_baseIndexOf.js | 20 + node_modules/lodash/_baseIndexOfWith.js | 23 + node_modules/lodash/_baseIntersection.js | 74 + node_modules/lodash/_baseInverter.js | 21 + node_modules/lodash/_baseInvoke.js | 24 + node_modules/lodash/_baseIsArguments.js | 18 + node_modules/lodash/_baseIsArrayBuffer.js | 17 + node_modules/lodash/_baseIsDate.js | 18 + node_modules/lodash/_baseIsEqual.js | 28 + node_modules/lodash/_baseIsEqualDeep.js | 83 + node_modules/lodash/_baseIsMap.js | 18 + node_modules/lodash/_baseIsMatch.js | 62 + node_modules/lodash/_baseIsNaN.js | 12 + node_modules/lodash/_baseIsNative.js | 47 + node_modules/lodash/_baseIsRegExp.js | 18 + node_modules/lodash/_baseIsSet.js | 18 + node_modules/lodash/_baseIsTypedArray.js | 60 + node_modules/lodash/_baseIteratee.js | 31 + node_modules/lodash/_baseKeys.js | 30 + node_modules/lodash/_baseKeysIn.js | 33 + node_modules/lodash/_baseLodash.js | 10 + node_modules/lodash/_baseLt.js | 14 + node_modules/lodash/_baseMap.js | 22 + node_modules/lodash/_baseMatches.js | 22 + node_modules/lodash/_baseMatchesProperty.js | 33 + node_modules/lodash/_baseMean.js | 20 + node_modules/lodash/_baseMerge.js | 42 + node_modules/lodash/_baseMergeDeep.js | 94 + node_modules/lodash/_baseNth.js | 20 + node_modules/lodash/_baseOrderBy.js | 34 + node_modules/lodash/_basePick.js | 19 + node_modules/lodash/_basePickBy.js | 30 + node_modules/lodash/_baseProperty.js | 14 + node_modules/lodash/_basePropertyDeep.js | 16 + node_modules/lodash/_basePropertyOf.js | 14 + node_modules/lodash/_basePullAll.js | 51 + node_modules/lodash/_basePullAt.js | 37 + node_modules/lodash/_baseRandom.js | 18 + node_modules/lodash/_baseRange.js | 28 + node_modules/lodash/_baseReduce.js | 23 + node_modules/lodash/_baseRepeat.js | 35 + node_modules/lodash/_baseRest.js | 17 + node_modules/lodash/_baseSample.js | 15 + node_modules/lodash/_baseSampleSize.js | 18 + node_modules/lodash/_baseSet.js | 47 + node_modules/lodash/_baseSetData.js | 17 + node_modules/lodash/_baseSetToString.js | 22 + node_modules/lodash/_baseShuffle.js | 15 + node_modules/lodash/_baseSlice.js | 31 + node_modules/lodash/_baseSome.js | 22 + node_modules/lodash/_baseSortBy.js | 21 + node_modules/lodash/_baseSortedIndex.js | 42 + node_modules/lodash/_baseSortedIndexBy.js | 64 + node_modules/lodash/_baseSortedUniq.js | 30 + node_modules/lodash/_baseSum.js | 24 + node_modules/lodash/_baseTimes.js | 20 + node_modules/lodash/_baseToNumber.js | 24 + node_modules/lodash/_baseToPairs.js | 18 + node_modules/lodash/_baseToString.js | 37 + node_modules/lodash/_baseUnary.js | 14 + node_modules/lodash/_baseUniq.js | 72 + node_modules/lodash/_baseUnset.js | 20 + node_modules/lodash/_baseUpdate.js | 18 + node_modules/lodash/_baseValues.js | 19 + node_modules/lodash/_baseWhile.js | 26 + node_modules/lodash/_baseWrapperValue.js | 25 + node_modules/lodash/_baseXor.js | 36 + node_modules/lodash/_baseZipObject.js | 23 + node_modules/lodash/_cacheHas.js | 13 + node_modules/lodash/_castArrayLikeObject.js | 14 + node_modules/lodash/_castFunction.js | 14 + node_modules/lodash/_castPath.js | 21 + node_modules/lodash/_castRest.js | 14 + node_modules/lodash/_castSlice.js | 18 + node_modules/lodash/_charsEndIndex.js | 19 + node_modules/lodash/_charsStartIndex.js | 20 + node_modules/lodash/_cloneArrayBuffer.js | 16 + node_modules/lodash/_cloneBuffer.js | 35 + node_modules/lodash/_cloneDataView.js | 16 + node_modules/lodash/_cloneRegExp.js | 17 + node_modules/lodash/_cloneSymbol.js | 18 + node_modules/lodash/_cloneTypedArray.js | 16 + node_modules/lodash/_compareAscending.js | 41 + node_modules/lodash/_compareMultiple.js | 44 + node_modules/lodash/_composeArgs.js | 39 + node_modules/lodash/_composeArgsRight.js | 41 + node_modules/lodash/_copyArray.js | 20 + node_modules/lodash/_copyObject.js | 40 + node_modules/lodash/_copySymbols.js | 16 + node_modules/lodash/_copySymbolsIn.js | 16 + node_modules/lodash/_coreJsData.js | 6 + node_modules/lodash/_countHolders.js | 21 + node_modules/lodash/_createAggregator.js | 23 + node_modules/lodash/_createAssigner.js | 37 + node_modules/lodash/_createBaseEach.js | 32 + node_modules/lodash/_createBaseFor.js | 25 + node_modules/lodash/_createBind.js | 28 + node_modules/lodash/_createCaseFirst.js | 33 + node_modules/lodash/_createCompounder.js | 24 + node_modules/lodash/_createCtor.js | 37 + node_modules/lodash/_createCurry.js | 46 + node_modules/lodash/_createFind.js | 25 + node_modules/lodash/_createFlow.js | 78 + node_modules/lodash/_createHybrid.js | 92 + node_modules/lodash/_createInverter.js | 17 + node_modules/lodash/_createMathOperation.js | 38 + node_modules/lodash/_createOver.js | 27 + node_modules/lodash/_createPadding.js | 33 + node_modules/lodash/_createPartial.js | 43 + node_modules/lodash/_createRange.js | 30 + node_modules/lodash/_createRecurry.js | 56 + .../lodash/_createRelationalOperation.js | 20 + node_modules/lodash/_createRound.js | 35 + node_modules/lodash/_createSet.js | 19 + node_modules/lodash/_createToPairs.js | 30 + node_modules/lodash/_createWrap.js | 106 + .../lodash/_customDefaultsAssignIn.js | 29 + node_modules/lodash/_customDefaultsMerge.js | 28 + node_modules/lodash/_customOmitClone.js | 16 + node_modules/lodash/_deburrLetter.js | 71 + node_modules/lodash/_defineProperty.js | 11 + node_modules/lodash/_equalArrays.js | 83 + node_modules/lodash/_equalByTag.js | 112 + node_modules/lodash/_equalObjects.js | 89 + node_modules/lodash/_escapeHtmlChar.js | 21 + node_modules/lodash/_escapeStringChar.js | 22 + node_modules/lodash/_flatRest.js | 16 + node_modules/lodash/_freeGlobal.js | 4 + node_modules/lodash/_getAllKeys.js | 16 + node_modules/lodash/_getAllKeysIn.js | 17 + node_modules/lodash/_getData.js | 15 + node_modules/lodash/_getFuncName.js | 31 + node_modules/lodash/_getHolder.js | 13 + node_modules/lodash/_getMapData.js | 18 + node_modules/lodash/_getMatchData.js | 24 + node_modules/lodash/_getNative.js | 17 + node_modules/lodash/_getPrototype.js | 6 + node_modules/lodash/_getRawTag.js | 46 + node_modules/lodash/_getSymbols.js | 30 + node_modules/lodash/_getSymbolsIn.js | 25 + node_modules/lodash/_getTag.js | 58 + node_modules/lodash/_getValue.js | 13 + node_modules/lodash/_getView.js | 33 + node_modules/lodash/_getWrapDetails.js | 17 + node_modules/lodash/_hasPath.js | 39 + node_modules/lodash/_hasUnicode.js | 26 + node_modules/lodash/_hasUnicodeWord.js | 15 + node_modules/lodash/_hashClear.js | 15 + node_modules/lodash/_hashDelete.js | 17 + node_modules/lodash/_hashGet.js | 30 + node_modules/lodash/_hashHas.js | 23 + node_modules/lodash/_hashSet.js | 23 + node_modules/lodash/_initCloneArray.js | 26 + node_modules/lodash/_initCloneByTag.js | 77 + node_modules/lodash/_initCloneObject.js | 18 + node_modules/lodash/_insertWrapDetails.js | 23 + node_modules/lodash/_isFlattenable.js | 20 + node_modules/lodash/_isIndex.js | 25 + node_modules/lodash/_isIterateeCall.js | 30 + node_modules/lodash/_isKey.js | 29 + node_modules/lodash/_isKeyable.js | 15 + node_modules/lodash/_isLaziable.js | 28 + node_modules/lodash/_isMaskable.js | 14 + node_modules/lodash/_isMasked.js | 20 + node_modules/lodash/_isPrototype.js | 18 + node_modules/lodash/_isStrictComparable.js | 15 + node_modules/lodash/_iteratorToArray.js | 18 + node_modules/lodash/_lazyClone.js | 23 + node_modules/lodash/_lazyReverse.js | 23 + node_modules/lodash/_lazyValue.js | 69 + node_modules/lodash/_listCacheClear.js | 13 + node_modules/lodash/_listCacheDelete.js | 35 + node_modules/lodash/_listCacheGet.js | 19 + node_modules/lodash/_listCacheHas.js | 16 + node_modules/lodash/_listCacheSet.js | 26 + node_modules/lodash/_mapCacheClear.js | 21 + node_modules/lodash/_mapCacheDelete.js | 18 + node_modules/lodash/_mapCacheGet.js | 16 + node_modules/lodash/_mapCacheHas.js | 16 + node_modules/lodash/_mapCacheSet.js | 22 + node_modules/lodash/_mapToArray.js | 18 + .../lodash/_matchesStrictComparable.js | 20 + node_modules/lodash/_memoizeCapped.js | 26 + node_modules/lodash/_mergeData.js | 90 + node_modules/lodash/_metaMap.js | 6 + node_modules/lodash/_nativeCreate.js | 6 + node_modules/lodash/_nativeKeys.js | 6 + node_modules/lodash/_nativeKeysIn.js | 20 + node_modules/lodash/_nodeUtil.js | 30 + node_modules/lodash/_objectToString.js | 22 + node_modules/lodash/_overArg.js | 15 + node_modules/lodash/_overRest.js | 36 + node_modules/lodash/_parent.js | 16 + node_modules/lodash/_reEscape.js | 4 + node_modules/lodash/_reEvaluate.js | 4 + node_modules/lodash/_reInterpolate.js | 4 + node_modules/lodash/_realNames.js | 4 + node_modules/lodash/_reorder.js | 29 + node_modules/lodash/_replaceHolders.js | 29 + node_modules/lodash/_root.js | 9 + node_modules/lodash/_safeGet.js | 21 + node_modules/lodash/_setCacheAdd.js | 19 + node_modules/lodash/_setCacheHas.js | 14 + node_modules/lodash/_setData.js | 20 + node_modules/lodash/_setToArray.js | 18 + node_modules/lodash/_setToPairs.js | 18 + node_modules/lodash/_setToString.js | 14 + node_modules/lodash/_setWrapToString.js | 21 + node_modules/lodash/_shortOut.js | 37 + node_modules/lodash/_shuffleSelf.js | 28 + node_modules/lodash/_stackClear.js | 15 + node_modules/lodash/_stackDelete.js | 18 + node_modules/lodash/_stackGet.js | 14 + node_modules/lodash/_stackHas.js | 14 + node_modules/lodash/_stackSet.js | 34 + node_modules/lodash/_strictIndexOf.js | 23 + node_modules/lodash/_strictLastIndexOf.js | 21 + node_modules/lodash/_stringSize.js | 18 + node_modules/lodash/_stringToArray.js | 18 + node_modules/lodash/_stringToPath.js | 27 + node_modules/lodash/_toKey.js | 21 + node_modules/lodash/_toSource.js | 26 + node_modules/lodash/_unescapeHtmlChar.js | 21 + node_modules/lodash/_unicodeSize.js | 44 + node_modules/lodash/_unicodeToArray.js | 40 + node_modules/lodash/_unicodeWords.js | 69 + node_modules/lodash/_updateWrapDetails.js | 46 + node_modules/lodash/_wrapperClone.js | 23 + node_modules/lodash/add.js | 22 + node_modules/lodash/after.js | 42 + node_modules/lodash/array.js | 67 + node_modules/lodash/ary.js | 29 + node_modules/lodash/assign.js | 58 + node_modules/lodash/assignIn.js | 40 + node_modules/lodash/assignInWith.js | 38 + node_modules/lodash/assignWith.js | 37 + node_modules/lodash/at.js | 23 + node_modules/lodash/attempt.js | 35 + node_modules/lodash/before.js | 40 + node_modules/lodash/bind.js | 57 + node_modules/lodash/bindAll.js | 41 + node_modules/lodash/bindKey.js | 68 + node_modules/lodash/camelCase.js | 29 + node_modules/lodash/capitalize.js | 23 + node_modules/lodash/castArray.js | 44 + node_modules/lodash/ceil.js | 26 + node_modules/lodash/chain.js | 38 + node_modules/lodash/chunk.js | 50 + node_modules/lodash/clamp.js | 39 + node_modules/lodash/clone.js | 36 + node_modules/lodash/cloneDeep.js | 29 + node_modules/lodash/cloneDeepWith.js | 40 + node_modules/lodash/cloneWith.js | 42 + node_modules/lodash/collection.js | 30 + node_modules/lodash/commit.js | 33 + node_modules/lodash/compact.js | 31 + node_modules/lodash/concat.js | 43 + node_modules/lodash/cond.js | 60 + node_modules/lodash/conforms.js | 35 + node_modules/lodash/conformsTo.js | 32 + node_modules/lodash/constant.js | 26 + node_modules/lodash/core.js | 3854 ++ node_modules/lodash/core.min.js | 29 + node_modules/lodash/countBy.js | 40 + node_modules/lodash/create.js | 43 + node_modules/lodash/curry.js | 57 + node_modules/lodash/curryRight.js | 54 + node_modules/lodash/date.js | 3 + node_modules/lodash/debounce.js | 191 + node_modules/lodash/deburr.js | 45 + node_modules/lodash/defaultTo.js | 25 + node_modules/lodash/defaults.js | 64 + node_modules/lodash/defaultsDeep.js | 30 + node_modules/lodash/defer.js | 26 + node_modules/lodash/delay.js | 28 + node_modules/lodash/difference.js | 33 + node_modules/lodash/differenceBy.js | 44 + node_modules/lodash/differenceWith.js | 40 + node_modules/lodash/divide.js | 22 + node_modules/lodash/drop.js | 38 + node_modules/lodash/dropRight.js | 39 + node_modules/lodash/dropRightWhile.js | 45 + node_modules/lodash/dropWhile.js | 45 + node_modules/lodash/each.js | 1 + node_modules/lodash/eachRight.js | 1 + node_modules/lodash/endsWith.js | 43 + node_modules/lodash/entries.js | 1 + node_modules/lodash/entriesIn.js | 1 + node_modules/lodash/eq.js | 37 + node_modules/lodash/escape.js | 43 + node_modules/lodash/escapeRegExp.js | 32 + node_modules/lodash/every.js | 56 + node_modules/lodash/extend.js | 1 + node_modules/lodash/extendWith.js | 1 + node_modules/lodash/fill.js | 45 + node_modules/lodash/filter.js | 48 + node_modules/lodash/find.js | 42 + node_modules/lodash/findIndex.js | 55 + node_modules/lodash/findKey.js | 44 + node_modules/lodash/findLast.js | 25 + node_modules/lodash/findLastIndex.js | 59 + node_modules/lodash/findLastKey.js | 44 + node_modules/lodash/first.js | 1 + node_modules/lodash/flatMap.js | 29 + node_modules/lodash/flatMapDeep.js | 31 + node_modules/lodash/flatMapDepth.js | 31 + node_modules/lodash/flatten.js | 22 + node_modules/lodash/flattenDeep.js | 25 + node_modules/lodash/flattenDepth.js | 33 + node_modules/lodash/flip.js | 28 + node_modules/lodash/floor.js | 26 + node_modules/lodash/flow.js | 27 + node_modules/lodash/flowRight.js | 26 + node_modules/lodash/forEach.js | 41 + node_modules/lodash/forEachRight.js | 31 + node_modules/lodash/forIn.js | 39 + node_modules/lodash/forInRight.js | 37 + node_modules/lodash/forOwn.js | 36 + node_modules/lodash/forOwnRight.js | 34 + node_modules/lodash/fp.js | 2 + node_modules/lodash/fp/F.js | 1 + node_modules/lodash/fp/T.js | 1 + node_modules/lodash/fp/__.js | 1 + node_modules/lodash/fp/_baseConvert.js | 569 + node_modules/lodash/fp/_convertBrowser.js | 18 + node_modules/lodash/fp/_falseOptions.js | 7 + node_modules/lodash/fp/_mapping.js | 358 + node_modules/lodash/fp/_util.js | 16 + node_modules/lodash/fp/add.js | 5 + node_modules/lodash/fp/after.js | 5 + node_modules/lodash/fp/all.js | 1 + node_modules/lodash/fp/allPass.js | 1 + node_modules/lodash/fp/always.js | 1 + node_modules/lodash/fp/any.js | 1 + node_modules/lodash/fp/anyPass.js | 1 + node_modules/lodash/fp/apply.js | 1 + node_modules/lodash/fp/array.js | 2 + node_modules/lodash/fp/ary.js | 5 + node_modules/lodash/fp/assign.js | 5 + node_modules/lodash/fp/assignAll.js | 5 + node_modules/lodash/fp/assignAllWith.js | 5 + node_modules/lodash/fp/assignIn.js | 5 + node_modules/lodash/fp/assignInAll.js | 5 + node_modules/lodash/fp/assignInAllWith.js | 5 + node_modules/lodash/fp/assignInWith.js | 5 + node_modules/lodash/fp/assignWith.js | 5 + node_modules/lodash/fp/assoc.js | 1 + node_modules/lodash/fp/assocPath.js | 1 + node_modules/lodash/fp/at.js | 5 + node_modules/lodash/fp/attempt.js | 5 + node_modules/lodash/fp/before.js | 5 + node_modules/lodash/fp/bind.js | 5 + node_modules/lodash/fp/bindAll.js | 5 + node_modules/lodash/fp/bindKey.js | 5 + node_modules/lodash/fp/camelCase.js | 5 + node_modules/lodash/fp/capitalize.js | 5 + node_modules/lodash/fp/castArray.js | 5 + node_modules/lodash/fp/ceil.js | 5 + node_modules/lodash/fp/chain.js | 5 + node_modules/lodash/fp/chunk.js | 5 + node_modules/lodash/fp/clamp.js | 5 + node_modules/lodash/fp/clone.js | 5 + node_modules/lodash/fp/cloneDeep.js | 5 + node_modules/lodash/fp/cloneDeepWith.js | 5 + node_modules/lodash/fp/cloneWith.js | 5 + node_modules/lodash/fp/collection.js | 2 + node_modules/lodash/fp/commit.js | 5 + node_modules/lodash/fp/compact.js | 5 + node_modules/lodash/fp/complement.js | 1 + node_modules/lodash/fp/compose.js | 1 + node_modules/lodash/fp/concat.js | 5 + node_modules/lodash/fp/cond.js | 5 + node_modules/lodash/fp/conforms.js | 1 + node_modules/lodash/fp/conformsTo.js | 5 + node_modules/lodash/fp/constant.js | 5 + node_modules/lodash/fp/contains.js | 1 + node_modules/lodash/fp/convert.js | 18 + node_modules/lodash/fp/countBy.js | 5 + node_modules/lodash/fp/create.js | 5 + node_modules/lodash/fp/curry.js | 5 + node_modules/lodash/fp/curryN.js | 5 + node_modules/lodash/fp/curryRight.js | 5 + node_modules/lodash/fp/curryRightN.js | 5 + node_modules/lodash/fp/date.js | 2 + node_modules/lodash/fp/debounce.js | 5 + node_modules/lodash/fp/deburr.js | 5 + node_modules/lodash/fp/defaultTo.js | 5 + node_modules/lodash/fp/defaults.js | 5 + node_modules/lodash/fp/defaultsAll.js | 5 + node_modules/lodash/fp/defaultsDeep.js | 5 + node_modules/lodash/fp/defaultsDeepAll.js | 5 + node_modules/lodash/fp/defer.js | 5 + node_modules/lodash/fp/delay.js | 5 + node_modules/lodash/fp/difference.js | 5 + node_modules/lodash/fp/differenceBy.js | 5 + node_modules/lodash/fp/differenceWith.js | 5 + node_modules/lodash/fp/dissoc.js | 1 + node_modules/lodash/fp/dissocPath.js | 1 + node_modules/lodash/fp/divide.js | 5 + node_modules/lodash/fp/drop.js | 5 + node_modules/lodash/fp/dropLast.js | 1 + node_modules/lodash/fp/dropLastWhile.js | 1 + node_modules/lodash/fp/dropRight.js | 5 + node_modules/lodash/fp/dropRightWhile.js | 5 + node_modules/lodash/fp/dropWhile.js | 5 + node_modules/lodash/fp/each.js | 1 + node_modules/lodash/fp/eachRight.js | 1 + node_modules/lodash/fp/endsWith.js | 5 + node_modules/lodash/fp/entries.js | 1 + node_modules/lodash/fp/entriesIn.js | 1 + node_modules/lodash/fp/eq.js | 5 + node_modules/lodash/fp/equals.js | 1 + node_modules/lodash/fp/escape.js | 5 + node_modules/lodash/fp/escapeRegExp.js | 5 + node_modules/lodash/fp/every.js | 5 + node_modules/lodash/fp/extend.js | 1 + node_modules/lodash/fp/extendAll.js | 1 + node_modules/lodash/fp/extendAllWith.js | 1 + node_modules/lodash/fp/extendWith.js | 1 + node_modules/lodash/fp/fill.js | 5 + node_modules/lodash/fp/filter.js | 5 + node_modules/lodash/fp/find.js | 5 + node_modules/lodash/fp/findFrom.js | 5 + node_modules/lodash/fp/findIndex.js | 5 + node_modules/lodash/fp/findIndexFrom.js | 5 + node_modules/lodash/fp/findKey.js | 5 + node_modules/lodash/fp/findLast.js | 5 + node_modules/lodash/fp/findLastFrom.js | 5 + node_modules/lodash/fp/findLastIndex.js | 5 + node_modules/lodash/fp/findLastIndexFrom.js | 5 + node_modules/lodash/fp/findLastKey.js | 5 + node_modules/lodash/fp/first.js | 1 + node_modules/lodash/fp/flatMap.js | 5 + node_modules/lodash/fp/flatMapDeep.js | 5 + node_modules/lodash/fp/flatMapDepth.js | 5 + node_modules/lodash/fp/flatten.js | 5 + node_modules/lodash/fp/flattenDeep.js | 5 + node_modules/lodash/fp/flattenDepth.js | 5 + node_modules/lodash/fp/flip.js | 5 + node_modules/lodash/fp/floor.js | 5 + node_modules/lodash/fp/flow.js | 5 + node_modules/lodash/fp/flowRight.js | 5 + node_modules/lodash/fp/forEach.js | 5 + node_modules/lodash/fp/forEachRight.js | 5 + node_modules/lodash/fp/forIn.js | 5 + node_modules/lodash/fp/forInRight.js | 5 + node_modules/lodash/fp/forOwn.js | 5 + node_modules/lodash/fp/forOwnRight.js | 5 + node_modules/lodash/fp/fromPairs.js | 5 + node_modules/lodash/fp/function.js | 2 + node_modules/lodash/fp/functions.js | 5 + node_modules/lodash/fp/functionsIn.js | 5 + node_modules/lodash/fp/get.js | 5 + node_modules/lodash/fp/getOr.js | 5 + node_modules/lodash/fp/groupBy.js | 5 + node_modules/lodash/fp/gt.js | 5 + node_modules/lodash/fp/gte.js | 5 + node_modules/lodash/fp/has.js | 5 + node_modules/lodash/fp/hasIn.js | 5 + node_modules/lodash/fp/head.js | 5 + node_modules/lodash/fp/identical.js | 1 + node_modules/lodash/fp/identity.js | 5 + node_modules/lodash/fp/inRange.js | 5 + node_modules/lodash/fp/includes.js | 5 + node_modules/lodash/fp/includesFrom.js | 5 + node_modules/lodash/fp/indexBy.js | 1 + node_modules/lodash/fp/indexOf.js | 5 + node_modules/lodash/fp/indexOfFrom.js | 5 + node_modules/lodash/fp/init.js | 1 + node_modules/lodash/fp/initial.js | 5 + node_modules/lodash/fp/intersection.js | 5 + node_modules/lodash/fp/intersectionBy.js | 5 + node_modules/lodash/fp/intersectionWith.js | 5 + node_modules/lodash/fp/invert.js | 5 + node_modules/lodash/fp/invertBy.js | 5 + node_modules/lodash/fp/invertObj.js | 1 + node_modules/lodash/fp/invoke.js | 5 + node_modules/lodash/fp/invokeArgs.js | 5 + node_modules/lodash/fp/invokeArgsMap.js | 5 + node_modules/lodash/fp/invokeMap.js | 5 + node_modules/lodash/fp/isArguments.js | 5 + node_modules/lodash/fp/isArray.js | 5 + node_modules/lodash/fp/isArrayBuffer.js | 5 + node_modules/lodash/fp/isArrayLike.js | 5 + node_modules/lodash/fp/isArrayLikeObject.js | 5 + node_modules/lodash/fp/isBoolean.js | 5 + node_modules/lodash/fp/isBuffer.js | 5 + node_modules/lodash/fp/isDate.js | 5 + node_modules/lodash/fp/isElement.js | 5 + node_modules/lodash/fp/isEmpty.js | 5 + node_modules/lodash/fp/isEqual.js | 5 + node_modules/lodash/fp/isEqualWith.js | 5 + node_modules/lodash/fp/isError.js | 5 + node_modules/lodash/fp/isFinite.js | 5 + node_modules/lodash/fp/isFunction.js | 5 + node_modules/lodash/fp/isInteger.js | 5 + node_modules/lodash/fp/isLength.js | 5 + node_modules/lodash/fp/isMap.js | 5 + node_modules/lodash/fp/isMatch.js | 5 + node_modules/lodash/fp/isMatchWith.js | 5 + node_modules/lodash/fp/isNaN.js | 5 + node_modules/lodash/fp/isNative.js | 5 + node_modules/lodash/fp/isNil.js | 5 + node_modules/lodash/fp/isNull.js | 5 + node_modules/lodash/fp/isNumber.js | 5 + node_modules/lodash/fp/isObject.js | 5 + node_modules/lodash/fp/isObjectLike.js | 5 + node_modules/lodash/fp/isPlainObject.js | 5 + node_modules/lodash/fp/isRegExp.js | 5 + node_modules/lodash/fp/isSafeInteger.js | 5 + node_modules/lodash/fp/isSet.js | 5 + node_modules/lodash/fp/isString.js | 5 + node_modules/lodash/fp/isSymbol.js | 5 + node_modules/lodash/fp/isTypedArray.js | 5 + node_modules/lodash/fp/isUndefined.js | 5 + node_modules/lodash/fp/isWeakMap.js | 5 + node_modules/lodash/fp/isWeakSet.js | 5 + node_modules/lodash/fp/iteratee.js | 5 + node_modules/lodash/fp/join.js | 5 + node_modules/lodash/fp/juxt.js | 1 + node_modules/lodash/fp/kebabCase.js | 5 + node_modules/lodash/fp/keyBy.js | 5 + node_modules/lodash/fp/keys.js | 5 + node_modules/lodash/fp/keysIn.js | 5 + node_modules/lodash/fp/lang.js | 2 + node_modules/lodash/fp/last.js | 5 + node_modules/lodash/fp/lastIndexOf.js | 5 + node_modules/lodash/fp/lastIndexOfFrom.js | 5 + node_modules/lodash/fp/lowerCase.js | 5 + node_modules/lodash/fp/lowerFirst.js | 5 + node_modules/lodash/fp/lt.js | 5 + node_modules/lodash/fp/lte.js | 5 + node_modules/lodash/fp/map.js | 5 + node_modules/lodash/fp/mapKeys.js | 5 + node_modules/lodash/fp/mapValues.js | 5 + node_modules/lodash/fp/matches.js | 1 + node_modules/lodash/fp/matchesProperty.js | 5 + node_modules/lodash/fp/math.js | 2 + node_modules/lodash/fp/max.js | 5 + node_modules/lodash/fp/maxBy.js | 5 + node_modules/lodash/fp/mean.js | 5 + node_modules/lodash/fp/meanBy.js | 5 + node_modules/lodash/fp/memoize.js | 5 + node_modules/lodash/fp/merge.js | 5 + node_modules/lodash/fp/mergeAll.js | 5 + node_modules/lodash/fp/mergeAllWith.js | 5 + node_modules/lodash/fp/mergeWith.js | 5 + node_modules/lodash/fp/method.js | 5 + node_modules/lodash/fp/methodOf.js | 5 + node_modules/lodash/fp/min.js | 5 + node_modules/lodash/fp/minBy.js | 5 + node_modules/lodash/fp/mixin.js | 5 + node_modules/lodash/fp/multiply.js | 5 + node_modules/lodash/fp/nAry.js | 1 + node_modules/lodash/fp/negate.js | 5 + node_modules/lodash/fp/next.js | 5 + node_modules/lodash/fp/noop.js | 5 + node_modules/lodash/fp/now.js | 5 + node_modules/lodash/fp/nth.js | 5 + node_modules/lodash/fp/nthArg.js | 5 + node_modules/lodash/fp/number.js | 2 + node_modules/lodash/fp/object.js | 2 + node_modules/lodash/fp/omit.js | 5 + node_modules/lodash/fp/omitAll.js | 1 + node_modules/lodash/fp/omitBy.js | 5 + node_modules/lodash/fp/once.js | 5 + node_modules/lodash/fp/orderBy.js | 5 + node_modules/lodash/fp/over.js | 5 + node_modules/lodash/fp/overArgs.js | 5 + node_modules/lodash/fp/overEvery.js | 5 + node_modules/lodash/fp/overSome.js | 5 + node_modules/lodash/fp/pad.js | 5 + node_modules/lodash/fp/padChars.js | 5 + node_modules/lodash/fp/padCharsEnd.js | 5 + node_modules/lodash/fp/padCharsStart.js | 5 + node_modules/lodash/fp/padEnd.js | 5 + node_modules/lodash/fp/padStart.js | 5 + node_modules/lodash/fp/parseInt.js | 5 + node_modules/lodash/fp/partial.js | 5 + node_modules/lodash/fp/partialRight.js | 5 + node_modules/lodash/fp/partition.js | 5 + node_modules/lodash/fp/path.js | 1 + node_modules/lodash/fp/pathEq.js | 1 + node_modules/lodash/fp/pathOr.js | 1 + node_modules/lodash/fp/paths.js | 1 + node_modules/lodash/fp/pick.js | 5 + node_modules/lodash/fp/pickAll.js | 1 + node_modules/lodash/fp/pickBy.js | 5 + node_modules/lodash/fp/pipe.js | 1 + node_modules/lodash/fp/placeholder.js | 6 + node_modules/lodash/fp/plant.js | 5 + node_modules/lodash/fp/pluck.js | 1 + node_modules/lodash/fp/prop.js | 1 + node_modules/lodash/fp/propEq.js | 1 + node_modules/lodash/fp/propOr.js | 1 + node_modules/lodash/fp/property.js | 1 + node_modules/lodash/fp/propertyOf.js | 5 + node_modules/lodash/fp/props.js | 1 + node_modules/lodash/fp/pull.js | 5 + node_modules/lodash/fp/pullAll.js | 5 + node_modules/lodash/fp/pullAllBy.js | 5 + node_modules/lodash/fp/pullAllWith.js | 5 + node_modules/lodash/fp/pullAt.js | 5 + node_modules/lodash/fp/random.js | 5 + node_modules/lodash/fp/range.js | 5 + node_modules/lodash/fp/rangeRight.js | 5 + node_modules/lodash/fp/rangeStep.js | 5 + node_modules/lodash/fp/rangeStepRight.js | 5 + node_modules/lodash/fp/rearg.js | 5 + node_modules/lodash/fp/reduce.js | 5 + node_modules/lodash/fp/reduceRight.js | 5 + node_modules/lodash/fp/reject.js | 5 + node_modules/lodash/fp/remove.js | 5 + node_modules/lodash/fp/repeat.js | 5 + node_modules/lodash/fp/replace.js | 5 + node_modules/lodash/fp/rest.js | 5 + node_modules/lodash/fp/restFrom.js | 5 + node_modules/lodash/fp/result.js | 5 + node_modules/lodash/fp/reverse.js | 5 + node_modules/lodash/fp/round.js | 5 + node_modules/lodash/fp/sample.js | 5 + node_modules/lodash/fp/sampleSize.js | 5 + node_modules/lodash/fp/seq.js | 2 + node_modules/lodash/fp/set.js | 5 + node_modules/lodash/fp/setWith.js | 5 + node_modules/lodash/fp/shuffle.js | 5 + node_modules/lodash/fp/size.js | 5 + node_modules/lodash/fp/slice.js | 5 + node_modules/lodash/fp/snakeCase.js | 5 + node_modules/lodash/fp/some.js | 5 + node_modules/lodash/fp/sortBy.js | 5 + node_modules/lodash/fp/sortedIndex.js | 5 + node_modules/lodash/fp/sortedIndexBy.js | 5 + node_modules/lodash/fp/sortedIndexOf.js | 5 + node_modules/lodash/fp/sortedLastIndex.js | 5 + node_modules/lodash/fp/sortedLastIndexBy.js | 5 + node_modules/lodash/fp/sortedLastIndexOf.js | 5 + node_modules/lodash/fp/sortedUniq.js | 5 + node_modules/lodash/fp/sortedUniqBy.js | 5 + node_modules/lodash/fp/split.js | 5 + node_modules/lodash/fp/spread.js | 5 + node_modules/lodash/fp/spreadFrom.js | 5 + node_modules/lodash/fp/startCase.js | 5 + node_modules/lodash/fp/startsWith.js | 5 + node_modules/lodash/fp/string.js | 2 + node_modules/lodash/fp/stubArray.js | 5 + node_modules/lodash/fp/stubFalse.js | 5 + node_modules/lodash/fp/stubObject.js | 5 + node_modules/lodash/fp/stubString.js | 5 + node_modules/lodash/fp/stubTrue.js | 5 + node_modules/lodash/fp/subtract.js | 5 + node_modules/lodash/fp/sum.js | 5 + node_modules/lodash/fp/sumBy.js | 5 + node_modules/lodash/fp/symmetricDifference.js | 1 + .../lodash/fp/symmetricDifferenceBy.js | 1 + .../lodash/fp/symmetricDifferenceWith.js | 1 + node_modules/lodash/fp/tail.js | 5 + node_modules/lodash/fp/take.js | 5 + node_modules/lodash/fp/takeLast.js | 1 + node_modules/lodash/fp/takeLastWhile.js | 1 + node_modules/lodash/fp/takeRight.js | 5 + node_modules/lodash/fp/takeRightWhile.js | 5 + node_modules/lodash/fp/takeWhile.js | 5 + node_modules/lodash/fp/tap.js | 5 + node_modules/lodash/fp/template.js | 5 + node_modules/lodash/fp/templateSettings.js | 5 + node_modules/lodash/fp/throttle.js | 5 + node_modules/lodash/fp/thru.js | 5 + node_modules/lodash/fp/times.js | 5 + node_modules/lodash/fp/toArray.js | 5 + node_modules/lodash/fp/toFinite.js | 5 + node_modules/lodash/fp/toInteger.js | 5 + node_modules/lodash/fp/toIterator.js | 5 + node_modules/lodash/fp/toJSON.js | 5 + node_modules/lodash/fp/toLength.js | 5 + node_modules/lodash/fp/toLower.js | 5 + node_modules/lodash/fp/toNumber.js | 5 + node_modules/lodash/fp/toPairs.js | 5 + node_modules/lodash/fp/toPairsIn.js | 5 + node_modules/lodash/fp/toPath.js | 5 + node_modules/lodash/fp/toPlainObject.js | 5 + node_modules/lodash/fp/toSafeInteger.js | 5 + node_modules/lodash/fp/toString.js | 5 + node_modules/lodash/fp/toUpper.js | 5 + node_modules/lodash/fp/transform.js | 5 + node_modules/lodash/fp/trim.js | 5 + node_modules/lodash/fp/trimChars.js | 5 + node_modules/lodash/fp/trimCharsEnd.js | 5 + node_modules/lodash/fp/trimCharsStart.js | 5 + node_modules/lodash/fp/trimEnd.js | 5 + node_modules/lodash/fp/trimStart.js | 5 + node_modules/lodash/fp/truncate.js | 5 + node_modules/lodash/fp/unapply.js | 1 + node_modules/lodash/fp/unary.js | 5 + node_modules/lodash/fp/unescape.js | 5 + node_modules/lodash/fp/union.js | 5 + node_modules/lodash/fp/unionBy.js | 5 + node_modules/lodash/fp/unionWith.js | 5 + node_modules/lodash/fp/uniq.js | 5 + node_modules/lodash/fp/uniqBy.js | 5 + node_modules/lodash/fp/uniqWith.js | 5 + node_modules/lodash/fp/uniqueId.js | 5 + node_modules/lodash/fp/unnest.js | 1 + node_modules/lodash/fp/unset.js | 5 + node_modules/lodash/fp/unzip.js | 5 + node_modules/lodash/fp/unzipWith.js | 5 + node_modules/lodash/fp/update.js | 5 + node_modules/lodash/fp/updateWith.js | 5 + node_modules/lodash/fp/upperCase.js | 5 + node_modules/lodash/fp/upperFirst.js | 5 + node_modules/lodash/fp/useWith.js | 1 + node_modules/lodash/fp/util.js | 2 + node_modules/lodash/fp/value.js | 5 + node_modules/lodash/fp/valueOf.js | 5 + node_modules/lodash/fp/values.js | 5 + node_modules/lodash/fp/valuesIn.js | 5 + node_modules/lodash/fp/where.js | 1 + node_modules/lodash/fp/whereEq.js | 1 + node_modules/lodash/fp/without.js | 5 + node_modules/lodash/fp/words.js | 5 + node_modules/lodash/fp/wrap.js | 5 + node_modules/lodash/fp/wrapperAt.js | 5 + node_modules/lodash/fp/wrapperChain.js | 5 + node_modules/lodash/fp/wrapperLodash.js | 5 + node_modules/lodash/fp/wrapperReverse.js | 5 + node_modules/lodash/fp/wrapperValue.js | 5 + node_modules/lodash/fp/xor.js | 5 + node_modules/lodash/fp/xorBy.js | 5 + node_modules/lodash/fp/xorWith.js | 5 + node_modules/lodash/fp/zip.js | 5 + node_modules/lodash/fp/zipAll.js | 5 + node_modules/lodash/fp/zipObj.js | 1 + node_modules/lodash/fp/zipObject.js | 5 + node_modules/lodash/fp/zipObjectDeep.js | 5 + node_modules/lodash/fp/zipWith.js | 5 + node_modules/lodash/fromPairs.js | 28 + node_modules/lodash/function.js | 25 + node_modules/lodash/functions.js | 31 + node_modules/lodash/functionsIn.js | 31 + node_modules/lodash/get.js | 33 + node_modules/lodash/groupBy.js | 41 + node_modules/lodash/gt.js | 29 + node_modules/lodash/gte.js | 30 + node_modules/lodash/has.js | 35 + node_modules/lodash/hasIn.js | 34 + node_modules/lodash/head.js | 23 + node_modules/lodash/identity.js | 21 + node_modules/lodash/inRange.js | 55 + node_modules/lodash/includes.js | 53 + node_modules/lodash/index.js | 1 + node_modules/lodash/indexOf.js | 42 + node_modules/lodash/initial.js | 22 + node_modules/lodash/intersection.js | 30 + node_modules/lodash/intersectionBy.js | 45 + node_modules/lodash/intersectionWith.js | 41 + node_modules/lodash/invert.js | 42 + node_modules/lodash/invertBy.js | 56 + node_modules/lodash/invoke.js | 24 + node_modules/lodash/invokeMap.js | 41 + node_modules/lodash/isArguments.js | 36 + node_modules/lodash/isArray.js | 26 + node_modules/lodash/isArrayBuffer.js | 27 + node_modules/lodash/isArrayLike.js | 33 + node_modules/lodash/isArrayLikeObject.js | 33 + node_modules/lodash/isBoolean.js | 29 + node_modules/lodash/isBuffer.js | 38 + node_modules/lodash/isDate.js | 27 + node_modules/lodash/isElement.js | 25 + node_modules/lodash/isEmpty.js | 77 + node_modules/lodash/isEqual.js | 35 + node_modules/lodash/isEqualWith.js | 41 + node_modules/lodash/isError.js | 36 + node_modules/lodash/isFinite.js | 36 + node_modules/lodash/isFunction.js | 37 + node_modules/lodash/isInteger.js | 33 + node_modules/lodash/isLength.js | 35 + node_modules/lodash/isMap.js | 27 + node_modules/lodash/isMatch.js | 36 + node_modules/lodash/isMatchWith.js | 41 + node_modules/lodash/isNaN.js | 38 + node_modules/lodash/isNative.js | 40 + node_modules/lodash/isNil.js | 25 + node_modules/lodash/isNull.js | 22 + node_modules/lodash/isNumber.js | 38 + node_modules/lodash/isObject.js | 31 + node_modules/lodash/isObjectLike.js | 29 + node_modules/lodash/isPlainObject.js | 62 + node_modules/lodash/isRegExp.js | 27 + node_modules/lodash/isSafeInteger.js | 37 + node_modules/lodash/isSet.js | 27 + node_modules/lodash/isString.js | 30 + node_modules/lodash/isSymbol.js | 29 + node_modules/lodash/isTypedArray.js | 27 + node_modules/lodash/isUndefined.js | 22 + node_modules/lodash/isWeakMap.js | 28 + node_modules/lodash/isWeakSet.js | 28 + node_modules/lodash/iteratee.js | 53 + node_modules/lodash/join.js | 26 + node_modules/lodash/kebabCase.js | 28 + node_modules/lodash/keyBy.js | 36 + node_modules/lodash/keys.js | 37 + node_modules/lodash/keysIn.js | 32 + node_modules/lodash/lang.js | 58 + node_modules/lodash/last.js | 20 + node_modules/lodash/lastIndexOf.js | 46 + node_modules/lodash/lodash.js | 17112 ++++++++ node_modules/lodash/lodash.min.js | 137 + node_modules/lodash/lowerCase.js | 27 + node_modules/lodash/lowerFirst.js | 22 + node_modules/lodash/lt.js | 29 + node_modules/lodash/lte.js | 30 + node_modules/lodash/map.js | 53 + node_modules/lodash/mapKeys.js | 36 + node_modules/lodash/mapValues.js | 43 + node_modules/lodash/matches.js | 39 + node_modules/lodash/matchesProperty.js | 37 + node_modules/lodash/math.js | 17 + node_modules/lodash/max.js | 29 + node_modules/lodash/maxBy.js | 34 + node_modules/lodash/mean.js | 22 + node_modules/lodash/meanBy.js | 31 + node_modules/lodash/memoize.js | 73 + node_modules/lodash/merge.js | 39 + node_modules/lodash/mergeWith.js | 39 + node_modules/lodash/method.js | 34 + node_modules/lodash/methodOf.js | 33 + node_modules/lodash/min.js | 29 + node_modules/lodash/minBy.js | 34 + node_modules/lodash/mixin.js | 74 + node_modules/lodash/multiply.js | 22 + node_modules/lodash/negate.js | 40 + node_modules/lodash/next.js | 35 + node_modules/lodash/noop.js | 17 + node_modules/lodash/now.js | 23 + node_modules/lodash/nth.js | 29 + node_modules/lodash/nthArg.js | 32 + node_modules/lodash/number.js | 5 + node_modules/lodash/object.js | 49 + node_modules/lodash/omit.js | 57 + node_modules/lodash/omitBy.js | 29 + node_modules/lodash/once.js | 25 + node_modules/lodash/orderBy.js | 47 + node_modules/lodash/over.js | 24 + node_modules/lodash/overArgs.js | 61 + node_modules/lodash/overEvery.js | 30 + node_modules/lodash/overSome.js | 30 + node_modules/lodash/package.json | 71 + node_modules/lodash/pad.js | 49 + node_modules/lodash/padEnd.js | 39 + node_modules/lodash/padStart.js | 39 + node_modules/lodash/parseInt.js | 43 + node_modules/lodash/partial.js | 50 + node_modules/lodash/partialRight.js | 49 + node_modules/lodash/partition.js | 43 + node_modules/lodash/pick.js | 25 + node_modules/lodash/pickBy.js | 37 + node_modules/lodash/plant.js | 48 + node_modules/lodash/property.js | 32 + node_modules/lodash/propertyOf.js | 30 + node_modules/lodash/pull.js | 29 + node_modules/lodash/pullAll.js | 29 + node_modules/lodash/pullAllBy.js | 33 + node_modules/lodash/pullAllWith.js | 32 + node_modules/lodash/pullAt.js | 43 + node_modules/lodash/random.js | 82 + node_modules/lodash/range.js | 46 + node_modules/lodash/rangeRight.js | 41 + node_modules/lodash/rearg.js | 33 + node_modules/lodash/reduce.js | 51 + node_modules/lodash/reduceRight.js | 36 + node_modules/lodash/reject.js | 46 + node_modules/lodash/remove.js | 53 + node_modules/lodash/repeat.js | 37 + node_modules/lodash/replace.js | 29 + node_modules/lodash/rest.js | 40 + node_modules/lodash/result.js | 56 + node_modules/lodash/reverse.js | 34 + node_modules/lodash/round.js | 26 + node_modules/lodash/sample.js | 24 + node_modules/lodash/sampleSize.js | 37 + node_modules/lodash/seq.js | 16 + node_modules/lodash/set.js | 35 + node_modules/lodash/setWith.js | 32 + node_modules/lodash/shuffle.js | 25 + node_modules/lodash/size.js | 46 + node_modules/lodash/slice.js | 37 + node_modules/lodash/snakeCase.js | 28 + node_modules/lodash/some.js | 51 + node_modules/lodash/sortBy.js | 48 + node_modules/lodash/sortedIndex.js | 24 + node_modules/lodash/sortedIndexBy.js | 33 + node_modules/lodash/sortedIndexOf.js | 31 + node_modules/lodash/sortedLastIndex.js | 25 + node_modules/lodash/sortedLastIndexBy.js | 33 + node_modules/lodash/sortedLastIndexOf.js | 31 + node_modules/lodash/sortedUniq.js | 24 + node_modules/lodash/sortedUniqBy.js | 26 + node_modules/lodash/split.js | 52 + node_modules/lodash/spread.js | 63 + node_modules/lodash/startCase.js | 29 + node_modules/lodash/startsWith.js | 39 + node_modules/lodash/string.js | 33 + node_modules/lodash/stubArray.js | 23 + node_modules/lodash/stubFalse.js | 18 + node_modules/lodash/stubObject.js | 23 + node_modules/lodash/stubString.js | 18 + node_modules/lodash/stubTrue.js | 18 + node_modules/lodash/subtract.js | 22 + node_modules/lodash/sum.js | 24 + node_modules/lodash/sumBy.js | 33 + node_modules/lodash/tail.js | 22 + node_modules/lodash/take.js | 37 + node_modules/lodash/takeRight.js | 39 + node_modules/lodash/takeRightWhile.js | 45 + node_modules/lodash/takeWhile.js | 45 + node_modules/lodash/tap.js | 29 + node_modules/lodash/template.js | 253 + node_modules/lodash/templateSettings.js | 67 + node_modules/lodash/throttle.js | 69 + node_modules/lodash/thru.js | 28 + node_modules/lodash/times.js | 51 + node_modules/lodash/toArray.js | 58 + node_modules/lodash/toFinite.js | 42 + node_modules/lodash/toInteger.js | 36 + node_modules/lodash/toIterator.js | 23 + node_modules/lodash/toJSON.js | 1 + node_modules/lodash/toLength.js | 38 + node_modules/lodash/toLower.js | 28 + node_modules/lodash/toNumber.js | 66 + node_modules/lodash/toPairs.js | 30 + node_modules/lodash/toPairsIn.js | 30 + node_modules/lodash/toPath.js | 33 + node_modules/lodash/toPlainObject.js | 32 + node_modules/lodash/toSafeInteger.js | 37 + node_modules/lodash/toString.js | 28 + node_modules/lodash/toUpper.js | 28 + node_modules/lodash/transform.js | 65 + node_modules/lodash/trim.js | 49 + node_modules/lodash/trimEnd.js | 43 + node_modules/lodash/trimStart.js | 43 + node_modules/lodash/truncate.js | 111 + node_modules/lodash/unary.js | 22 + node_modules/lodash/unescape.js | 34 + node_modules/lodash/union.js | 26 + node_modules/lodash/unionBy.js | 39 + node_modules/lodash/unionWith.js | 34 + node_modules/lodash/uniq.js | 25 + node_modules/lodash/uniqBy.js | 31 + node_modules/lodash/uniqWith.js | 28 + node_modules/lodash/uniqueId.js | 28 + node_modules/lodash/unset.js | 34 + node_modules/lodash/unzip.js | 45 + node_modules/lodash/unzipWith.js | 39 + node_modules/lodash/update.js | 35 + node_modules/lodash/updateWith.js | 33 + node_modules/lodash/upperCase.js | 27 + node_modules/lodash/upperFirst.js | 22 + node_modules/lodash/util.js | 34 + node_modules/lodash/value.js | 1 + node_modules/lodash/valueOf.js | 1 + node_modules/lodash/values.js | 34 + node_modules/lodash/valuesIn.js | 32 + node_modules/lodash/without.js | 31 + node_modules/lodash/words.js | 35 + node_modules/lodash/wrap.js | 30 + node_modules/lodash/wrapperAt.js | 48 + node_modules/lodash/wrapperChain.js | 34 + node_modules/lodash/wrapperLodash.js | 147 + node_modules/lodash/wrapperReverse.js | 44 + node_modules/lodash/wrapperValue.js | 21 + node_modules/lodash/xor.js | 28 + node_modules/lodash/xorBy.js | 39 + node_modules/lodash/xorWith.js | 34 + node_modules/lodash/zip.js | 22 + node_modules/lodash/zipObject.js | 24 + node_modules/lodash/zipObjectDeep.js | 23 + node_modules/lodash/zipWith.js | 32 + node_modules/macos-release/index.d.ts | 36 + node_modules/macos-release/index.js | 32 + node_modules/macos-release/license | 9 + node_modules/macos-release/package.json | 74 + node_modules/macos-release/readme.md | 57 + node_modules/mkdirp/.travis.yml | 8 + node_modules/mkdirp/LICENSE | 21 + node_modules/mkdirp/bin/cmd.js | 33 + node_modules/mkdirp/bin/usage.txt | 12 + node_modules/mkdirp/examples/pow.js | 6 + node_modules/mkdirp/index.js | 98 + .../mkdirp/node_modules/minimist/.travis.yml | 4 + .../mkdirp/node_modules/minimist/LICENSE | 18 + .../node_modules/minimist/example/parse.js | 2 + .../mkdirp/node_modules/minimist/index.js | 187 + .../mkdirp/node_modules/minimist/package.json | 74 + .../node_modules/minimist/readme.markdown | 73 + .../mkdirp/node_modules/minimist/test/dash.js | 24 + .../minimist/test/default_bool.js | 20 + .../node_modules/minimist/test/dotted.js | 16 + .../mkdirp/node_modules/minimist/test/long.js | 31 + .../node_modules/minimist/test/parse.js | 318 + .../minimist/test/parse_modified.js | 9 + .../node_modules/minimist/test/short.js | 67 + .../node_modules/minimist/test/whitespace.js | 8 + node_modules/mkdirp/package.json | 69 + 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/nice-try/CHANGELOG.md | 21 + node_modules/nice-try/LICENSE | 21 + node_modules/nice-try/README.md | 32 + node_modules/nice-try/package.json | 64 + node_modules/nice-try/src/index.js | 12 + node_modules/nock/CHANGELOG.md | 3 + node_modules/nock/LICENSE | 21 + node_modules/nock/README.md | 1610 + node_modules/nock/index.js | 51 + node_modules/nock/lib/back.js | 285 + node_modules/nock/lib/common.js | 641 + node_modules/nock/lib/delayed_body.js | 52 + node_modules/nock/lib/global_emitter.js | 5 + node_modules/nock/lib/intercept.js | 447 + .../nock/lib/intercepted_request_router.js | 303 + node_modules/nock/lib/interceptor.js | 606 + node_modules/nock/lib/match_body.js | 86 + node_modules/nock/lib/playback_interceptor.js | 349 + node_modules/nock/lib/recorder.js | 386 + node_modules/nock/lib/scope.js | 391 + node_modules/nock/lib/socket.js | 79 + .../nock/node_modules/debug/CHANGELOG.md | 395 + node_modules/nock/node_modules/debug/LICENSE | 19 + .../nock/node_modules/debug/README.md | 455 + .../nock/node_modules/debug/dist/debug.js | 912 + .../nock/node_modules/debug/package.json | 105 + .../nock/node_modules/debug/src/browser.js | 264 + .../nock/node_modules/debug/src/common.js | 266 + .../nock/node_modules/debug/src/index.js | 10 + .../nock/node_modules/debug/src/node.js | 257 + node_modules/nock/node_modules/ms/index.js | 162 + node_modules/nock/node_modules/ms/license.md | 21 + .../nock/node_modules/ms/package.json | 72 + node_modules/nock/node_modules/ms/readme.md | 60 + node_modules/nock/package.json | 121 + node_modules/nock/types/index.d.ts | 277 + node_modules/node-fetch/CHANGELOG.md | 266 + node_modules/node-fetch/LICENSE.md | 22 + node_modules/node-fetch/README.md | 583 + node_modules/node-fetch/browser.js | 23 + node_modules/node-fetch/lib/index.es.js | 1633 + node_modules/node-fetch/lib/index.js | 1642 + node_modules/node-fetch/lib/index.mjs | 1631 + node_modules/node-fetch/package.json | 96 + node_modules/npm-run-path/index.js | 39 + node_modules/npm-run-path/license | 21 + node_modules/npm-run-path/package.json | 80 + node_modules/npm-run-path/readme.md | 81 + .../octokit-pagination-methods/.travis.yml | 36 + .../CODE_OF_CONDUCT.md | 46 + .../octokit-pagination-methods/LICENSE | 22 + .../octokit-pagination-methods/README.md | 42 + .../octokit-pagination-methods/index.js | 12 + .../lib/deprecate.js | 12 + .../lib/get-first-page.js | 7 + .../lib/get-last-page.js | 7 + .../lib/get-next-page.js | 7 + .../lib/get-page-links.js | 15 + .../lib/get-page.js | 38 + .../lib/get-previous-page.js | 7 + .../lib/has-first-page.js | 9 + .../lib/has-last-page.js | 9 + .../lib/has-next-page.js | 9 + .../lib/has-previous-page.js | 9 + .../lib/http-error.js | 15 + .../octokit-pagination-methods/package.json | 79 + .../octokit-pagination-methods/test.js | 93 + node_modules/once/LICENSE | 15 + node_modules/once/README.md | 79 + node_modules/once/once.js | 42 + node_modules/once/package.json | 75 + node_modules/os-name/index.d.ts | 37 + node_modules/os-name/index.js | 46 + node_modules/os-name/license | 9 + node_modules/os-name/package.json | 83 + node_modules/os-name/readme.md | 64 + node_modules/p-finally/index.js | 15 + node_modules/p-finally/license | 21 + node_modules/p-finally/package.json | 77 + node_modules/p-finally/readme.md | 47 + node_modules/path-key/index.js | 13 + node_modules/path-key/license | 21 + node_modules/path-key/package.json | 75 + node_modules/path-key/readme.md | 51 + node_modules/pathval/CHANGELOG.md | 18 + node_modules/pathval/LICENSE | 16 + node_modules/pathval/README.md | 145 + node_modules/pathval/index.js | 291 + node_modules/pathval/package.json | 113 + node_modules/pathval/pathval.js | 295 + node_modules/propagate/.eslintignore | 2 + node_modules/propagate/.eslintrc.yml | 35 + node_modules/propagate/.prettierignore | 4 + node_modules/propagate/.prettierrc.yml | 5 + node_modules/propagate/.travis.yml | 27 + node_modules/propagate/LICENSE.md | 21 + node_modules/propagate/README.md | 72 + node_modules/propagate/index.js | 85 + node_modules/propagate/package.json | 89 + node_modules/propagate/tests/index.js | 168 + node_modules/pump/.travis.yml | 5 + node_modules/pump/LICENSE | 21 + node_modules/pump/README.md | 65 + node_modules/pump/index.js | 82 + node_modules/pump/package.json | 62 + node_modules/pump/test-browser.js | 66 + node_modules/pump/test-node.js | 53 + node_modules/shebang-command/index.js | 19 + node_modules/shebang-command/license | 21 + node_modules/shebang-command/package.json | 74 + node_modules/shebang-command/readme.md | 39 + node_modules/shebang-regex/index.js | 2 + node_modules/shebang-regex/license | 21 + node_modules/shebang-regex/package.json | 67 + node_modules/shebang-regex/readme.md | 29 + 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/strip-eof/index.js | 15 + node_modules/strip-eof/license | 21 + node_modules/strip-eof/package.json | 74 + node_modules/strip-eof/readme.md | 28 + node_modules/type-detect/LICENSE | 19 + node_modules/type-detect/README.md | 228 + node_modules/type-detect/index.js | 378 + node_modules/type-detect/package.json | 172 + node_modules/type-detect/type-detect.js | 388 + node_modules/universal-user-agent/.travis.yml | 38 + node_modules/universal-user-agent/LICENSE.md | 7 + node_modules/universal-user-agent/README.md | 25 + node_modules/universal-user-agent/browser.js | 6 + .../universal-user-agent/cypress.json | 4 + node_modules/universal-user-agent/index.d.ts | 1 + node_modules/universal-user-agent/index.js | 15 + .../universal-user-agent/package.json | 85 + .../universal-user-agent/test/smoke-test.js | 57 + node_modules/which/CHANGELOG.md | 152 + node_modules/which/LICENSE | 15 + node_modules/which/README.md | 51 + node_modules/which/bin/which | 52 + node_modules/which/package.json | 69 + node_modules/which/which.js | 135 + node_modules/windows-release/index.d.ts | 30 + node_modules/windows-release/index.js | 44 + node_modules/windows-release/license | 9 + node_modules/windows-release/package.json | 78 + node_modules/windows-release/readme.md | 56 + node_modules/wrappy/LICENSE | 15 + node_modules/wrappy/README.md | 36 + node_modules/wrappy/package.json | 62 + node_modules/wrappy/wrappy.js | 33 + self.yml | 2 +- 1666 files changed, 206089 insertions(+), 3 deletions(-) create mode 120000 node_modules/.bin/mkdirp create mode 120000 node_modules/.bin/which create mode 100644 node_modules/@actions/core/README.md create mode 100644 node_modules/@actions/core/lib/command.d.ts create mode 100644 node_modules/@actions/core/lib/command.js create mode 100644 node_modules/@actions/core/lib/command.js.map create mode 100644 node_modules/@actions/core/lib/core.d.ts create mode 100644 node_modules/@actions/core/lib/core.js create mode 100644 node_modules/@actions/core/lib/core.js.map create mode 100644 node_modules/@actions/core/package.json create mode 100644 node_modules/@actions/github/LICENSE.md create mode 100644 node_modules/@actions/github/README.md create mode 100644 node_modules/@actions/github/lib/context.d.ts create mode 100644 node_modules/@actions/github/lib/context.js create mode 100644 node_modules/@actions/github/lib/context.js.map create mode 100644 node_modules/@actions/github/lib/github.d.ts create mode 100644 node_modules/@actions/github/lib/github.js create mode 100644 node_modules/@actions/github/lib/github.js.map create mode 100644 node_modules/@actions/github/lib/interfaces.d.ts create mode 100644 node_modules/@actions/github/lib/interfaces.js create mode 100644 node_modules/@actions/github/lib/interfaces.js.map create mode 100644 node_modules/@actions/github/package.json create mode 100644 node_modules/@octokit/endpoint/LICENSE create mode 100644 node_modules/@octokit/endpoint/README.md create mode 100644 node_modules/@octokit/endpoint/dist-node/index.js create mode 100644 node_modules/@octokit/endpoint/dist-node/index.js.map create mode 100644 node_modules/@octokit/endpoint/dist-src/defaults.js create mode 100644 node_modules/@octokit/endpoint/dist-src/endpoint-with-defaults.js create mode 100644 node_modules/@octokit/endpoint/dist-src/index.js create mode 100644 node_modules/@octokit/endpoint/dist-src/merge.js create mode 100644 node_modules/@octokit/endpoint/dist-src/parse.js create mode 100644 node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js create mode 100644 node_modules/@octokit/endpoint/dist-src/util/extract-url-variable-names.js create mode 100644 node_modules/@octokit/endpoint/dist-src/util/lowercase-keys.js create mode 100644 node_modules/@octokit/endpoint/dist-src/util/merge-deep.js create mode 100644 node_modules/@octokit/endpoint/dist-src/util/omit.js create mode 100644 node_modules/@octokit/endpoint/dist-src/util/url-template.js create mode 100644 node_modules/@octokit/endpoint/dist-src/version.js create mode 100644 node_modules/@octokit/endpoint/dist-src/with-defaults.js create mode 100644 node_modules/@octokit/endpoint/dist-types/defaults.d.ts create mode 100644 node_modules/@octokit/endpoint/dist-types/endpoint-with-defaults.d.ts create mode 100644 node_modules/@octokit/endpoint/dist-types/index.d.ts create mode 100644 node_modules/@octokit/endpoint/dist-types/merge.d.ts create mode 100644 node_modules/@octokit/endpoint/dist-types/parse.d.ts create mode 100644 node_modules/@octokit/endpoint/dist-types/util/add-query-parameters.d.ts create mode 100644 node_modules/@octokit/endpoint/dist-types/util/extract-url-variable-names.d.ts create mode 100644 node_modules/@octokit/endpoint/dist-types/util/lowercase-keys.d.ts create mode 100644 node_modules/@octokit/endpoint/dist-types/util/merge-deep.d.ts create mode 100644 node_modules/@octokit/endpoint/dist-types/util/omit.d.ts create mode 100644 node_modules/@octokit/endpoint/dist-types/util/url-template.d.ts create mode 100644 node_modules/@octokit/endpoint/dist-types/version.d.ts create mode 100644 node_modules/@octokit/endpoint/dist-types/with-defaults.d.ts create mode 100644 node_modules/@octokit/endpoint/dist-web/index.js create mode 100644 node_modules/@octokit/endpoint/dist-web/index.js.map create mode 100644 node_modules/@octokit/endpoint/node_modules/universal-user-agent/LICENSE.md create mode 100644 node_modules/@octokit/endpoint/node_modules/universal-user-agent/README.md create mode 100644 node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-node/index.js create mode 100644 node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-node/index.js.map create mode 100644 node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-src/browser.js create mode 100644 node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-src/index.js create mode 100644 node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-src/node.js create mode 100644 node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-types/browser.d.ts create mode 100644 node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-types/index.d.ts create mode 100644 node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-types/node.d.ts create mode 100644 node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-web/index.js create mode 100644 node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-web/index.js.map create mode 100644 node_modules/@octokit/endpoint/node_modules/universal-user-agent/package.json create mode 100644 node_modules/@octokit/endpoint/package.json create mode 100644 node_modules/@octokit/graphql/LICENSE create mode 100644 node_modules/@octokit/graphql/README.md create mode 100644 node_modules/@octokit/graphql/index.js create mode 100644 node_modules/@octokit/graphql/lib/error.js create mode 100644 node_modules/@octokit/graphql/lib/graphql.js create mode 100644 node_modules/@octokit/graphql/lib/with-defaults.js create mode 100644 node_modules/@octokit/graphql/package.json create mode 100644 node_modules/@octokit/request-error/LICENSE create mode 100644 node_modules/@octokit/request-error/README.md create mode 100644 node_modules/@octokit/request-error/dist-node/index.js create mode 100644 node_modules/@octokit/request-error/dist-node/index.js.map create mode 100644 node_modules/@octokit/request-error/dist-src/index.js create mode 100644 node_modules/@octokit/request-error/dist-src/types.js create mode 100644 node_modules/@octokit/request-error/dist-types/index.d.ts create mode 100644 node_modules/@octokit/request-error/dist-types/types.d.ts create mode 100644 node_modules/@octokit/request-error/dist-web/index.js create mode 100644 node_modules/@octokit/request-error/dist-web/index.js.map create mode 100644 node_modules/@octokit/request-error/package.json create mode 100644 node_modules/@octokit/request/LICENSE create mode 100644 node_modules/@octokit/request/README.md create mode 100644 node_modules/@octokit/request/dist-node/index.js create mode 100644 node_modules/@octokit/request/dist-node/index.js.map create mode 100644 node_modules/@octokit/request/dist-src/fetch-wrapper.js create mode 100644 node_modules/@octokit/request/dist-src/get-buffer-response.js create mode 100644 node_modules/@octokit/request/dist-src/index.js create mode 100644 node_modules/@octokit/request/dist-src/version.js create mode 100644 node_modules/@octokit/request/dist-src/with-defaults.js create mode 100644 node_modules/@octokit/request/dist-types/fetch-wrapper.d.ts create mode 100644 node_modules/@octokit/request/dist-types/get-buffer-response.d.ts create mode 100644 node_modules/@octokit/request/dist-types/index.d.ts create mode 100644 node_modules/@octokit/request/dist-types/version.d.ts create mode 100644 node_modules/@octokit/request/dist-types/with-defaults.d.ts create mode 100644 node_modules/@octokit/request/dist-web/index.js create mode 100644 node_modules/@octokit/request/dist-web/index.js.map create mode 100644 node_modules/@octokit/request/node_modules/universal-user-agent/LICENSE.md create mode 100644 node_modules/@octokit/request/node_modules/universal-user-agent/README.md create mode 100644 node_modules/@octokit/request/node_modules/universal-user-agent/dist-node/index.js create mode 100644 node_modules/@octokit/request/node_modules/universal-user-agent/dist-node/index.js.map create mode 100644 node_modules/@octokit/request/node_modules/universal-user-agent/dist-src/browser.js create mode 100644 node_modules/@octokit/request/node_modules/universal-user-agent/dist-src/index.js create mode 100644 node_modules/@octokit/request/node_modules/universal-user-agent/dist-src/node.js create mode 100644 node_modules/@octokit/request/node_modules/universal-user-agent/dist-types/browser.d.ts create mode 100644 node_modules/@octokit/request/node_modules/universal-user-agent/dist-types/index.d.ts create mode 100644 node_modules/@octokit/request/node_modules/universal-user-agent/dist-types/node.d.ts create mode 100644 node_modules/@octokit/request/node_modules/universal-user-agent/dist-web/index.js create mode 100644 node_modules/@octokit/request/node_modules/universal-user-agent/dist-web/index.js.map create mode 100644 node_modules/@octokit/request/node_modules/universal-user-agent/package.json create mode 100644 node_modules/@octokit/request/package.json create mode 100644 node_modules/@octokit/rest/LICENSE create mode 100644 node_modules/@octokit/rest/README.md create mode 100644 node_modules/@octokit/rest/index.d.ts create mode 100644 node_modules/@octokit/rest/index.js create mode 100644 node_modules/@octokit/rest/lib/constructor.js create mode 100644 node_modules/@octokit/rest/lib/core.js create mode 100644 node_modules/@octokit/rest/lib/factory.js create mode 100644 node_modules/@octokit/rest/lib/parse-client-options.js create mode 100644 node_modules/@octokit/rest/lib/register-plugin.js create mode 100644 node_modules/@octokit/rest/node_modules/universal-user-agent/LICENSE.md create mode 100644 node_modules/@octokit/rest/node_modules/universal-user-agent/README.md create mode 100644 node_modules/@octokit/rest/node_modules/universal-user-agent/dist-node/index.js create mode 100644 node_modules/@octokit/rest/node_modules/universal-user-agent/dist-node/index.js.map create mode 100644 node_modules/@octokit/rest/node_modules/universal-user-agent/dist-src/browser.js create mode 100644 node_modules/@octokit/rest/node_modules/universal-user-agent/dist-src/index.js create mode 100644 node_modules/@octokit/rest/node_modules/universal-user-agent/dist-src/node.js create mode 100644 node_modules/@octokit/rest/node_modules/universal-user-agent/dist-types/browser.d.ts create mode 100644 node_modules/@octokit/rest/node_modules/universal-user-agent/dist-types/index.d.ts create mode 100644 node_modules/@octokit/rest/node_modules/universal-user-agent/dist-types/node.d.ts create mode 100644 node_modules/@octokit/rest/node_modules/universal-user-agent/dist-web/index.js create mode 100644 node_modules/@octokit/rest/node_modules/universal-user-agent/dist-web/index.js.map create mode 100644 node_modules/@octokit/rest/node_modules/universal-user-agent/package.json create mode 100644 node_modules/@octokit/rest/package.json create mode 100644 node_modules/@octokit/rest/plugins/authentication-deprecated/authenticate.js create mode 100644 node_modules/@octokit/rest/plugins/authentication-deprecated/before-request.js create mode 100644 node_modules/@octokit/rest/plugins/authentication-deprecated/index.js create mode 100644 node_modules/@octokit/rest/plugins/authentication-deprecated/request-error.js create mode 100644 node_modules/@octokit/rest/plugins/authentication/before-request.js create mode 100644 node_modules/@octokit/rest/plugins/authentication/index.js create mode 100644 node_modules/@octokit/rest/plugins/authentication/request-error.js create mode 100644 node_modules/@octokit/rest/plugins/authentication/validate.js create mode 100644 node_modules/@octokit/rest/plugins/authentication/with-authorization-prefix.js create mode 100644 node_modules/@octokit/rest/plugins/log/index.js create mode 100644 node_modules/@octokit/rest/plugins/pagination/index.js create mode 100644 node_modules/@octokit/rest/plugins/pagination/iterator.js create mode 100644 node_modules/@octokit/rest/plugins/pagination/normalize-paginated-list-response.js create mode 100644 node_modules/@octokit/rest/plugins/pagination/paginate.js create mode 100644 node_modules/@octokit/rest/plugins/register-endpoints/index.js create mode 100644 node_modules/@octokit/rest/plugins/register-endpoints/register-endpoints.js create mode 100644 node_modules/@octokit/rest/plugins/rest-api-endpoints/index.js create mode 100644 node_modules/@octokit/rest/plugins/rest-api-endpoints/routes.json create mode 100644 node_modules/@octokit/rest/plugins/validate/index.js create mode 100644 node_modules/@octokit/rest/plugins/validate/validate.js create mode 100644 node_modules/@octokit/types/.github/ISSUE_TEMPLATE/01_help.md create mode 100644 node_modules/@octokit/types/.github/ISSUE_TEMPLATE/02_bug.md create mode 100644 node_modules/@octokit/types/.github/ISSUE_TEMPLATE/03_feature_request.md create mode 100644 node_modules/@octokit/types/.github/ISSUE_TEMPLATE/04_thanks.md create mode 100644 node_modules/@octokit/types/.github/workflows/release.yml create mode 100644 node_modules/@octokit/types/.github/workflows/routes-update.yml create mode 100644 node_modules/@octokit/types/.github/workflows/test.yml create mode 100644 node_modules/@octokit/types/CODE_OF_CONDUCT.md create mode 100644 node_modules/@octokit/types/CONTRIBUTING.md create mode 100644 node_modules/@octokit/types/LICENSE create mode 100644 node_modules/@octokit/types/README.md create mode 100644 node_modules/@octokit/types/package.json create mode 100644 node_modules/@octokit/types/scripts/update-endpoints/fetch-json.js create mode 100644 node_modules/@octokit/types/scripts/update-endpoints/generated/README.md create mode 100644 node_modules/@octokit/types/scripts/update-endpoints/generated/endpoints.json create mode 100644 node_modules/@octokit/types/scripts/update-endpoints/templates/endpoints.ts.template create mode 100644 node_modules/@octokit/types/scripts/update-endpoints/typescript.js create mode 100644 node_modules/@octokit/types/src/AuthInterface.ts create mode 100644 node_modules/@octokit/types/src/EndpointDefaults.ts create mode 100644 node_modules/@octokit/types/src/EndpointInterface.ts create mode 100644 node_modules/@octokit/types/src/EndpointOptions.ts create mode 100644 node_modules/@octokit/types/src/Fetch.ts create mode 100644 node_modules/@octokit/types/src/OctokitResponse.ts create mode 100644 node_modules/@octokit/types/src/RequestHeaders.ts create mode 100644 node_modules/@octokit/types/src/RequestInterface.ts create mode 100644 node_modules/@octokit/types/src/RequestMethod.ts create mode 100644 node_modules/@octokit/types/src/RequestOptions.ts create mode 100644 node_modules/@octokit/types/src/RequestParameters.ts create mode 100644 node_modules/@octokit/types/src/RequestRequestOptions.ts create mode 100644 node_modules/@octokit/types/src/ResponseHeaders.ts create mode 100644 node_modules/@octokit/types/src/Route.ts create mode 100644 node_modules/@octokit/types/src/Signal.ts create mode 100644 node_modules/@octokit/types/src/StrategyInterface.ts create mode 100644 node_modules/@octokit/types/src/Url.ts create mode 100644 node_modules/@octokit/types/src/VERSION.ts create mode 100644 node_modules/@octokit/types/src/generated/Endpoints.ts create mode 100644 node_modules/@octokit/types/src/generated/README.md create mode 100644 node_modules/@octokit/types/src/index.ts create mode 100644 node_modules/@types/node/LICENSE create mode 100644 node_modules/@types/node/README.md create mode 100644 node_modules/@types/node/assert.d.ts create mode 100644 node_modules/@types/node/async_hooks.d.ts create mode 100644 node_modules/@types/node/base.d.ts create mode 100644 node_modules/@types/node/buffer.d.ts create mode 100644 node_modules/@types/node/child_process.d.ts create mode 100644 node_modules/@types/node/cluster.d.ts create mode 100644 node_modules/@types/node/console.d.ts create mode 100644 node_modules/@types/node/constants.d.ts create mode 100644 node_modules/@types/node/crypto.d.ts create mode 100644 node_modules/@types/node/dgram.d.ts create mode 100644 node_modules/@types/node/dns.d.ts create mode 100644 node_modules/@types/node/domain.d.ts create mode 100644 node_modules/@types/node/events.d.ts create mode 100644 node_modules/@types/node/fs.d.ts create mode 100644 node_modules/@types/node/globals.d.ts create mode 100644 node_modules/@types/node/http.d.ts create mode 100644 node_modules/@types/node/http2.d.ts create mode 100644 node_modules/@types/node/https.d.ts create mode 100644 node_modules/@types/node/index.d.ts create mode 100644 node_modules/@types/node/inspector.d.ts create mode 100644 node_modules/@types/node/module.d.ts create mode 100644 node_modules/@types/node/net.d.ts create mode 100644 node_modules/@types/node/os.d.ts create mode 100644 node_modules/@types/node/package.json create mode 100644 node_modules/@types/node/path.d.ts create mode 100644 node_modules/@types/node/perf_hooks.d.ts create mode 100644 node_modules/@types/node/process.d.ts create mode 100644 node_modules/@types/node/punycode.d.ts create mode 100644 node_modules/@types/node/querystring.d.ts create mode 100644 node_modules/@types/node/readline.d.ts create mode 100644 node_modules/@types/node/repl.d.ts create mode 100644 node_modules/@types/node/stream.d.ts create mode 100644 node_modules/@types/node/string_decoder.d.ts create mode 100644 node_modules/@types/node/timers.d.ts create mode 100644 node_modules/@types/node/tls.d.ts create mode 100644 node_modules/@types/node/trace_events.d.ts create mode 100644 node_modules/@types/node/ts3.2/globals.d.ts create mode 100644 node_modules/@types/node/ts3.2/index.d.ts create mode 100644 node_modules/@types/node/ts3.2/util.d.ts create mode 100644 node_modules/@types/node/tty.d.ts create mode 100644 node_modules/@types/node/url.d.ts create mode 100644 node_modules/@types/node/util.d.ts create mode 100644 node_modules/@types/node/v8.d.ts create mode 100644 node_modules/@types/node/vm.d.ts create mode 100644 node_modules/@types/node/worker_threads.d.ts create mode 100644 node_modules/@types/node/zlib.d.ts create mode 100644 node_modules/assertion-error/History.md create mode 100644 node_modules/assertion-error/README.md create mode 100644 node_modules/assertion-error/index.d.ts create mode 100644 node_modules/assertion-error/index.js create mode 100644 node_modules/assertion-error/package.json create mode 100644 node_modules/atob-lite/.npmignore create mode 100644 node_modules/atob-lite/LICENSE.md create mode 100644 node_modules/atob-lite/README.md create mode 100644 node_modules/atob-lite/atob-browser.js create mode 100644 node_modules/atob-lite/atob-node.js create mode 100644 node_modules/atob-lite/package.json create mode 100644 node_modules/before-after-hook/LICENSE create mode 100644 node_modules/before-after-hook/README.md create mode 100644 node_modules/before-after-hook/index.d.ts create mode 100644 node_modules/before-after-hook/index.js create mode 100644 node_modules/before-after-hook/lib/add.js create mode 100644 node_modules/before-after-hook/lib/register.js create mode 100644 node_modules/before-after-hook/lib/remove.js create mode 100644 node_modules/before-after-hook/package.json create mode 100644 node_modules/btoa-lite/.npmignore create mode 100644 node_modules/btoa-lite/LICENSE.md create mode 100644 node_modules/btoa-lite/README.md create mode 100644 node_modules/btoa-lite/btoa-browser.js create mode 100644 node_modules/btoa-lite/btoa-node.js create mode 100644 node_modules/btoa-lite/package.json create mode 100644 node_modules/chai/CODEOWNERS create mode 100644 node_modules/chai/CODE_OF_CONDUCT.md create mode 100644 node_modules/chai/CONTRIBUTING.md create mode 100644 node_modules/chai/History.md create mode 100644 node_modules/chai/LICENSE create mode 100644 node_modules/chai/README.md create mode 100644 node_modules/chai/ReleaseNotes.md create mode 100644 node_modules/chai/bower.json create mode 100644 node_modules/chai/chai.js create mode 100644 node_modules/chai/index.js create mode 100644 node_modules/chai/karma.conf.js create mode 100644 node_modules/chai/karma.sauce.js create mode 100644 node_modules/chai/lib/chai.js create mode 100644 node_modules/chai/lib/chai/assertion.js create mode 100644 node_modules/chai/lib/chai/config.js create mode 100644 node_modules/chai/lib/chai/core/assertions.js create mode 100644 node_modules/chai/lib/chai/interface/assert.js create mode 100644 node_modules/chai/lib/chai/interface/expect.js create mode 100644 node_modules/chai/lib/chai/interface/should.js create mode 100644 node_modules/chai/lib/chai/utils/addChainableMethod.js create mode 100644 node_modules/chai/lib/chai/utils/addLengthGuard.js create mode 100644 node_modules/chai/lib/chai/utils/addMethod.js create mode 100644 node_modules/chai/lib/chai/utils/addProperty.js create mode 100644 node_modules/chai/lib/chai/utils/compareByInspect.js create mode 100644 node_modules/chai/lib/chai/utils/expectTypes.js create mode 100644 node_modules/chai/lib/chai/utils/flag.js create mode 100644 node_modules/chai/lib/chai/utils/getActual.js create mode 100644 node_modules/chai/lib/chai/utils/getEnumerableProperties.js create mode 100644 node_modules/chai/lib/chai/utils/getMessage.js create mode 100644 node_modules/chai/lib/chai/utils/getOwnEnumerableProperties.js create mode 100644 node_modules/chai/lib/chai/utils/getOwnEnumerablePropertySymbols.js create mode 100644 node_modules/chai/lib/chai/utils/getProperties.js create mode 100644 node_modules/chai/lib/chai/utils/index.js create mode 100644 node_modules/chai/lib/chai/utils/inspect.js create mode 100644 node_modules/chai/lib/chai/utils/isNaN.js create mode 100644 node_modules/chai/lib/chai/utils/isProxyEnabled.js create mode 100644 node_modules/chai/lib/chai/utils/objDisplay.js create mode 100644 node_modules/chai/lib/chai/utils/overwriteChainableMethod.js create mode 100644 node_modules/chai/lib/chai/utils/overwriteMethod.js create mode 100644 node_modules/chai/lib/chai/utils/overwriteProperty.js create mode 100644 node_modules/chai/lib/chai/utils/proxify.js create mode 100644 node_modules/chai/lib/chai/utils/test.js create mode 100644 node_modules/chai/lib/chai/utils/transferFlags.js create mode 100644 node_modules/chai/package.json create mode 100644 node_modules/chai/register-assert.js create mode 100644 node_modules/chai/register-expect.js create mode 100644 node_modules/chai/register-should.js create mode 100644 node_modules/chai/sauce.browsers.js create mode 100644 node_modules/check-error/LICENSE create mode 100644 node_modules/check-error/README.md create mode 100644 node_modules/check-error/check-error.js create mode 100644 node_modules/check-error/index.js create mode 100644 node_modules/check-error/package.json create mode 100644 node_modules/cross-spawn/CHANGELOG.md create mode 100644 node_modules/cross-spawn/LICENSE create mode 100644 node_modules/cross-spawn/README.md create mode 100644 node_modules/cross-spawn/index.js create mode 100644 node_modules/cross-spawn/lib/enoent.js create mode 100644 node_modules/cross-spawn/lib/parse.js create mode 100644 node_modules/cross-spawn/lib/util/escape.js create mode 100644 node_modules/cross-spawn/lib/util/readShebang.js create mode 100644 node_modules/cross-spawn/lib/util/resolveCommand.js create mode 120000 node_modules/cross-spawn/node_modules/.bin/semver create mode 100644 node_modules/cross-spawn/node_modules/semver/CHANGELOG.md create mode 100644 node_modules/cross-spawn/node_modules/semver/LICENSE create mode 100644 node_modules/cross-spawn/node_modules/semver/README.md create mode 100755 node_modules/cross-spawn/node_modules/semver/bin/semver create mode 100644 node_modules/cross-spawn/node_modules/semver/package.json create mode 100644 node_modules/cross-spawn/node_modules/semver/range.bnf create mode 100644 node_modules/cross-spawn/node_modules/semver/semver.js create mode 100644 node_modules/cross-spawn/package.json create mode 100644 node_modules/deep-eql/LICENSE create mode 100644 node_modules/deep-eql/README.md create mode 100644 node_modules/deep-eql/deep-eql.js create mode 100644 node_modules/deep-eql/index.js create mode 100644 node_modules/deep-eql/package.json create mode 100644 node_modules/deprecation/LICENSE create mode 100644 node_modules/deprecation/README.md create mode 100644 node_modules/deprecation/dist-node/index.js create mode 100644 node_modules/deprecation/dist-src/index.js create mode 100644 node_modules/deprecation/dist-types/index.d.ts create mode 100644 node_modules/deprecation/dist-web/index.js create mode 100644 node_modules/deprecation/package.json create mode 100644 node_modules/end-of-stream/LICENSE create mode 100644 node_modules/end-of-stream/README.md create mode 100644 node_modules/end-of-stream/index.js create mode 100644 node_modules/end-of-stream/package.json create mode 100644 node_modules/execa/index.js create mode 100644 node_modules/execa/lib/errname.js create mode 100644 node_modules/execa/lib/stdio.js create mode 100644 node_modules/execa/license create mode 100644 node_modules/execa/package.json create mode 100644 node_modules/execa/readme.md create mode 100644 node_modules/get-func-name/LICENSE create mode 100644 node_modules/get-func-name/README.md create mode 100644 node_modules/get-func-name/get-func-name.js create mode 100644 node_modules/get-func-name/index.js create mode 100644 node_modules/get-func-name/package.json create mode 100644 node_modules/get-stream/buffer-stream.js create mode 100644 node_modules/get-stream/index.js create mode 100644 node_modules/get-stream/license create mode 100644 node_modules/get-stream/package.json create mode 100644 node_modules/get-stream/readme.md create mode 100644 node_modules/is-plain-object/LICENSE create mode 100644 node_modules/is-plain-object/README.md create mode 100644 node_modules/is-plain-object/index.cjs.js create mode 100644 node_modules/is-plain-object/index.d.ts create mode 100644 node_modules/is-plain-object/index.js create mode 100644 node_modules/is-plain-object/package.json create mode 100644 node_modules/is-stream/index.js create mode 100644 node_modules/is-stream/license create mode 100644 node_modules/is-stream/package.json create mode 100644 node_modules/is-stream/readme.md create mode 100644 node_modules/isexe/.npmignore create mode 100644 node_modules/isexe/LICENSE create mode 100644 node_modules/isexe/README.md create mode 100644 node_modules/isexe/index.js create mode 100644 node_modules/isexe/mode.js create mode 100644 node_modules/isexe/package.json create mode 100644 node_modules/isexe/test/basic.js create mode 100644 node_modules/isexe/windows.js create mode 100644 node_modules/isobject/LICENSE create mode 100644 node_modules/isobject/README.md create mode 100644 node_modules/isobject/index.cjs.js create mode 100644 node_modules/isobject/index.d.ts create mode 100644 node_modules/isobject/index.js create mode 100644 node_modules/isobject/package.json 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/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/lodash.set/LICENSE create mode 100644 node_modules/lodash.set/README.md create mode 100644 node_modules/lodash.set/index.js create mode 100644 node_modules/lodash.set/package.json create mode 100644 node_modules/lodash.uniq/LICENSE create mode 100644 node_modules/lodash.uniq/README.md create mode 100644 node_modules/lodash.uniq/index.js create mode 100644 node_modules/lodash.uniq/package.json create mode 100644 node_modules/lodash/LICENSE create mode 100644 node_modules/lodash/README.md create mode 100644 node_modules/lodash/_DataView.js create mode 100644 node_modules/lodash/_Hash.js create mode 100644 node_modules/lodash/_LazyWrapper.js create mode 100644 node_modules/lodash/_ListCache.js create mode 100644 node_modules/lodash/_LodashWrapper.js create mode 100644 node_modules/lodash/_Map.js create mode 100644 node_modules/lodash/_MapCache.js create mode 100644 node_modules/lodash/_Promise.js create mode 100644 node_modules/lodash/_Set.js create mode 100644 node_modules/lodash/_SetCache.js create mode 100644 node_modules/lodash/_Stack.js create mode 100644 node_modules/lodash/_Symbol.js create mode 100644 node_modules/lodash/_Uint8Array.js create mode 100644 node_modules/lodash/_WeakMap.js create mode 100644 node_modules/lodash/_apply.js create mode 100644 node_modules/lodash/_arrayAggregator.js create mode 100644 node_modules/lodash/_arrayEach.js create mode 100644 node_modules/lodash/_arrayEachRight.js create mode 100644 node_modules/lodash/_arrayEvery.js create mode 100644 node_modules/lodash/_arrayFilter.js create mode 100644 node_modules/lodash/_arrayIncludes.js create mode 100644 node_modules/lodash/_arrayIncludesWith.js create mode 100644 node_modules/lodash/_arrayLikeKeys.js create mode 100644 node_modules/lodash/_arrayMap.js create mode 100644 node_modules/lodash/_arrayPush.js create mode 100644 node_modules/lodash/_arrayReduce.js create mode 100644 node_modules/lodash/_arrayReduceRight.js create mode 100644 node_modules/lodash/_arraySample.js create mode 100644 node_modules/lodash/_arraySampleSize.js create mode 100644 node_modules/lodash/_arrayShuffle.js create mode 100644 node_modules/lodash/_arraySome.js create mode 100644 node_modules/lodash/_asciiSize.js create mode 100644 node_modules/lodash/_asciiToArray.js create mode 100644 node_modules/lodash/_asciiWords.js create mode 100644 node_modules/lodash/_assignMergeValue.js create mode 100644 node_modules/lodash/_assignValue.js create mode 100644 node_modules/lodash/_assocIndexOf.js create mode 100644 node_modules/lodash/_baseAggregator.js create mode 100644 node_modules/lodash/_baseAssign.js create mode 100644 node_modules/lodash/_baseAssignIn.js create mode 100644 node_modules/lodash/_baseAssignValue.js create mode 100644 node_modules/lodash/_baseAt.js create mode 100644 node_modules/lodash/_baseClamp.js create mode 100644 node_modules/lodash/_baseClone.js create mode 100644 node_modules/lodash/_baseConforms.js create mode 100644 node_modules/lodash/_baseConformsTo.js create mode 100644 node_modules/lodash/_baseCreate.js create mode 100644 node_modules/lodash/_baseDelay.js create mode 100644 node_modules/lodash/_baseDifference.js create mode 100644 node_modules/lodash/_baseEach.js create mode 100644 node_modules/lodash/_baseEachRight.js create mode 100644 node_modules/lodash/_baseEvery.js create mode 100644 node_modules/lodash/_baseExtremum.js create mode 100644 node_modules/lodash/_baseFill.js create mode 100644 node_modules/lodash/_baseFilter.js create mode 100644 node_modules/lodash/_baseFindIndex.js create mode 100644 node_modules/lodash/_baseFindKey.js create mode 100644 node_modules/lodash/_baseFlatten.js create mode 100644 node_modules/lodash/_baseFor.js create mode 100644 node_modules/lodash/_baseForOwn.js create mode 100644 node_modules/lodash/_baseForOwnRight.js create mode 100644 node_modules/lodash/_baseForRight.js create mode 100644 node_modules/lodash/_baseFunctions.js create mode 100644 node_modules/lodash/_baseGet.js create mode 100644 node_modules/lodash/_baseGetAllKeys.js create mode 100644 node_modules/lodash/_baseGetTag.js create mode 100644 node_modules/lodash/_baseGt.js create mode 100644 node_modules/lodash/_baseHas.js create mode 100644 node_modules/lodash/_baseHasIn.js create mode 100644 node_modules/lodash/_baseInRange.js create mode 100644 node_modules/lodash/_baseIndexOf.js create mode 100644 node_modules/lodash/_baseIndexOfWith.js create mode 100644 node_modules/lodash/_baseIntersection.js create mode 100644 node_modules/lodash/_baseInverter.js create mode 100644 node_modules/lodash/_baseInvoke.js create mode 100644 node_modules/lodash/_baseIsArguments.js create mode 100644 node_modules/lodash/_baseIsArrayBuffer.js create mode 100644 node_modules/lodash/_baseIsDate.js create mode 100644 node_modules/lodash/_baseIsEqual.js create mode 100644 node_modules/lodash/_baseIsEqualDeep.js create mode 100644 node_modules/lodash/_baseIsMap.js create mode 100644 node_modules/lodash/_baseIsMatch.js create mode 100644 node_modules/lodash/_baseIsNaN.js create mode 100644 node_modules/lodash/_baseIsNative.js create mode 100644 node_modules/lodash/_baseIsRegExp.js create mode 100644 node_modules/lodash/_baseIsSet.js create mode 100644 node_modules/lodash/_baseIsTypedArray.js create mode 100644 node_modules/lodash/_baseIteratee.js create mode 100644 node_modules/lodash/_baseKeys.js create mode 100644 node_modules/lodash/_baseKeysIn.js create mode 100644 node_modules/lodash/_baseLodash.js create mode 100644 node_modules/lodash/_baseLt.js create mode 100644 node_modules/lodash/_baseMap.js create mode 100644 node_modules/lodash/_baseMatches.js create mode 100644 node_modules/lodash/_baseMatchesProperty.js create mode 100644 node_modules/lodash/_baseMean.js create mode 100644 node_modules/lodash/_baseMerge.js create mode 100644 node_modules/lodash/_baseMergeDeep.js create mode 100644 node_modules/lodash/_baseNth.js create mode 100644 node_modules/lodash/_baseOrderBy.js create mode 100644 node_modules/lodash/_basePick.js create mode 100644 node_modules/lodash/_basePickBy.js create mode 100644 node_modules/lodash/_baseProperty.js create mode 100644 node_modules/lodash/_basePropertyDeep.js create mode 100644 node_modules/lodash/_basePropertyOf.js create mode 100644 node_modules/lodash/_basePullAll.js create mode 100644 node_modules/lodash/_basePullAt.js create mode 100644 node_modules/lodash/_baseRandom.js create mode 100644 node_modules/lodash/_baseRange.js create mode 100644 node_modules/lodash/_baseReduce.js create mode 100644 node_modules/lodash/_baseRepeat.js create mode 100644 node_modules/lodash/_baseRest.js create mode 100644 node_modules/lodash/_baseSample.js create mode 100644 node_modules/lodash/_baseSampleSize.js create mode 100644 node_modules/lodash/_baseSet.js create mode 100644 node_modules/lodash/_baseSetData.js create mode 100644 node_modules/lodash/_baseSetToString.js create mode 100644 node_modules/lodash/_baseShuffle.js create mode 100644 node_modules/lodash/_baseSlice.js create mode 100644 node_modules/lodash/_baseSome.js create mode 100644 node_modules/lodash/_baseSortBy.js create mode 100644 node_modules/lodash/_baseSortedIndex.js create mode 100644 node_modules/lodash/_baseSortedIndexBy.js create mode 100644 node_modules/lodash/_baseSortedUniq.js create mode 100644 node_modules/lodash/_baseSum.js create mode 100644 node_modules/lodash/_baseTimes.js create mode 100644 node_modules/lodash/_baseToNumber.js create mode 100644 node_modules/lodash/_baseToPairs.js create mode 100644 node_modules/lodash/_baseToString.js create mode 100644 node_modules/lodash/_baseUnary.js create mode 100644 node_modules/lodash/_baseUniq.js create mode 100644 node_modules/lodash/_baseUnset.js create mode 100644 node_modules/lodash/_baseUpdate.js create mode 100644 node_modules/lodash/_baseValues.js create mode 100644 node_modules/lodash/_baseWhile.js create mode 100644 node_modules/lodash/_baseWrapperValue.js create mode 100644 node_modules/lodash/_baseXor.js create mode 100644 node_modules/lodash/_baseZipObject.js create mode 100644 node_modules/lodash/_cacheHas.js create mode 100644 node_modules/lodash/_castArrayLikeObject.js create mode 100644 node_modules/lodash/_castFunction.js create mode 100644 node_modules/lodash/_castPath.js create mode 100644 node_modules/lodash/_castRest.js create mode 100644 node_modules/lodash/_castSlice.js create mode 100644 node_modules/lodash/_charsEndIndex.js create mode 100644 node_modules/lodash/_charsStartIndex.js create mode 100644 node_modules/lodash/_cloneArrayBuffer.js create mode 100644 node_modules/lodash/_cloneBuffer.js create mode 100644 node_modules/lodash/_cloneDataView.js create mode 100644 node_modules/lodash/_cloneRegExp.js create mode 100644 node_modules/lodash/_cloneSymbol.js create mode 100644 node_modules/lodash/_cloneTypedArray.js create mode 100644 node_modules/lodash/_compareAscending.js create mode 100644 node_modules/lodash/_compareMultiple.js create mode 100644 node_modules/lodash/_composeArgs.js create mode 100644 node_modules/lodash/_composeArgsRight.js create mode 100644 node_modules/lodash/_copyArray.js create mode 100644 node_modules/lodash/_copyObject.js create mode 100644 node_modules/lodash/_copySymbols.js create mode 100644 node_modules/lodash/_copySymbolsIn.js create mode 100644 node_modules/lodash/_coreJsData.js create mode 100644 node_modules/lodash/_countHolders.js create mode 100644 node_modules/lodash/_createAggregator.js create mode 100644 node_modules/lodash/_createAssigner.js create mode 100644 node_modules/lodash/_createBaseEach.js create mode 100644 node_modules/lodash/_createBaseFor.js create mode 100644 node_modules/lodash/_createBind.js create mode 100644 node_modules/lodash/_createCaseFirst.js create mode 100644 node_modules/lodash/_createCompounder.js create mode 100644 node_modules/lodash/_createCtor.js create mode 100644 node_modules/lodash/_createCurry.js create mode 100644 node_modules/lodash/_createFind.js create mode 100644 node_modules/lodash/_createFlow.js create mode 100644 node_modules/lodash/_createHybrid.js create mode 100644 node_modules/lodash/_createInverter.js create mode 100644 node_modules/lodash/_createMathOperation.js create mode 100644 node_modules/lodash/_createOver.js create mode 100644 node_modules/lodash/_createPadding.js create mode 100644 node_modules/lodash/_createPartial.js create mode 100644 node_modules/lodash/_createRange.js create mode 100644 node_modules/lodash/_createRecurry.js create mode 100644 node_modules/lodash/_createRelationalOperation.js create mode 100644 node_modules/lodash/_createRound.js create mode 100644 node_modules/lodash/_createSet.js create mode 100644 node_modules/lodash/_createToPairs.js create mode 100644 node_modules/lodash/_createWrap.js create mode 100644 node_modules/lodash/_customDefaultsAssignIn.js create mode 100644 node_modules/lodash/_customDefaultsMerge.js create mode 100644 node_modules/lodash/_customOmitClone.js create mode 100644 node_modules/lodash/_deburrLetter.js create mode 100644 node_modules/lodash/_defineProperty.js create mode 100644 node_modules/lodash/_equalArrays.js create mode 100644 node_modules/lodash/_equalByTag.js create mode 100644 node_modules/lodash/_equalObjects.js create mode 100644 node_modules/lodash/_escapeHtmlChar.js create mode 100644 node_modules/lodash/_escapeStringChar.js create mode 100644 node_modules/lodash/_flatRest.js create mode 100644 node_modules/lodash/_freeGlobal.js create mode 100644 node_modules/lodash/_getAllKeys.js create mode 100644 node_modules/lodash/_getAllKeysIn.js create mode 100644 node_modules/lodash/_getData.js create mode 100644 node_modules/lodash/_getFuncName.js create mode 100644 node_modules/lodash/_getHolder.js create mode 100644 node_modules/lodash/_getMapData.js create mode 100644 node_modules/lodash/_getMatchData.js create mode 100644 node_modules/lodash/_getNative.js create mode 100644 node_modules/lodash/_getPrototype.js create mode 100644 node_modules/lodash/_getRawTag.js create mode 100644 node_modules/lodash/_getSymbols.js create mode 100644 node_modules/lodash/_getSymbolsIn.js create mode 100644 node_modules/lodash/_getTag.js create mode 100644 node_modules/lodash/_getValue.js create mode 100644 node_modules/lodash/_getView.js create mode 100644 node_modules/lodash/_getWrapDetails.js create mode 100644 node_modules/lodash/_hasPath.js create mode 100644 node_modules/lodash/_hasUnicode.js create mode 100644 node_modules/lodash/_hasUnicodeWord.js create mode 100644 node_modules/lodash/_hashClear.js create mode 100644 node_modules/lodash/_hashDelete.js create mode 100644 node_modules/lodash/_hashGet.js create mode 100644 node_modules/lodash/_hashHas.js create mode 100644 node_modules/lodash/_hashSet.js create mode 100644 node_modules/lodash/_initCloneArray.js create mode 100644 node_modules/lodash/_initCloneByTag.js create mode 100644 node_modules/lodash/_initCloneObject.js create mode 100644 node_modules/lodash/_insertWrapDetails.js create mode 100644 node_modules/lodash/_isFlattenable.js create mode 100644 node_modules/lodash/_isIndex.js create mode 100644 node_modules/lodash/_isIterateeCall.js create mode 100644 node_modules/lodash/_isKey.js create mode 100644 node_modules/lodash/_isKeyable.js create mode 100644 node_modules/lodash/_isLaziable.js create mode 100644 node_modules/lodash/_isMaskable.js create mode 100644 node_modules/lodash/_isMasked.js create mode 100644 node_modules/lodash/_isPrototype.js create mode 100644 node_modules/lodash/_isStrictComparable.js create mode 100644 node_modules/lodash/_iteratorToArray.js create mode 100644 node_modules/lodash/_lazyClone.js create mode 100644 node_modules/lodash/_lazyReverse.js create mode 100644 node_modules/lodash/_lazyValue.js create mode 100644 node_modules/lodash/_listCacheClear.js create mode 100644 node_modules/lodash/_listCacheDelete.js create mode 100644 node_modules/lodash/_listCacheGet.js create mode 100644 node_modules/lodash/_listCacheHas.js create mode 100644 node_modules/lodash/_listCacheSet.js create mode 100644 node_modules/lodash/_mapCacheClear.js create mode 100644 node_modules/lodash/_mapCacheDelete.js create mode 100644 node_modules/lodash/_mapCacheGet.js create mode 100644 node_modules/lodash/_mapCacheHas.js create mode 100644 node_modules/lodash/_mapCacheSet.js create mode 100644 node_modules/lodash/_mapToArray.js create mode 100644 node_modules/lodash/_matchesStrictComparable.js create mode 100644 node_modules/lodash/_memoizeCapped.js create mode 100644 node_modules/lodash/_mergeData.js create mode 100644 node_modules/lodash/_metaMap.js create mode 100644 node_modules/lodash/_nativeCreate.js create mode 100644 node_modules/lodash/_nativeKeys.js create mode 100644 node_modules/lodash/_nativeKeysIn.js create mode 100644 node_modules/lodash/_nodeUtil.js create mode 100644 node_modules/lodash/_objectToString.js create mode 100644 node_modules/lodash/_overArg.js create mode 100644 node_modules/lodash/_overRest.js create mode 100644 node_modules/lodash/_parent.js create mode 100644 node_modules/lodash/_reEscape.js create mode 100644 node_modules/lodash/_reEvaluate.js create mode 100644 node_modules/lodash/_reInterpolate.js create mode 100644 node_modules/lodash/_realNames.js create mode 100644 node_modules/lodash/_reorder.js create mode 100644 node_modules/lodash/_replaceHolders.js create mode 100644 node_modules/lodash/_root.js create mode 100644 node_modules/lodash/_safeGet.js create mode 100644 node_modules/lodash/_setCacheAdd.js create mode 100644 node_modules/lodash/_setCacheHas.js create mode 100644 node_modules/lodash/_setData.js create mode 100644 node_modules/lodash/_setToArray.js create mode 100644 node_modules/lodash/_setToPairs.js create mode 100644 node_modules/lodash/_setToString.js create mode 100644 node_modules/lodash/_setWrapToString.js create mode 100644 node_modules/lodash/_shortOut.js create mode 100644 node_modules/lodash/_shuffleSelf.js create mode 100644 node_modules/lodash/_stackClear.js create mode 100644 node_modules/lodash/_stackDelete.js create mode 100644 node_modules/lodash/_stackGet.js create mode 100644 node_modules/lodash/_stackHas.js create mode 100644 node_modules/lodash/_stackSet.js create mode 100644 node_modules/lodash/_strictIndexOf.js create mode 100644 node_modules/lodash/_strictLastIndexOf.js create mode 100644 node_modules/lodash/_stringSize.js create mode 100644 node_modules/lodash/_stringToArray.js create mode 100644 node_modules/lodash/_stringToPath.js create mode 100644 node_modules/lodash/_toKey.js create mode 100644 node_modules/lodash/_toSource.js create mode 100644 node_modules/lodash/_unescapeHtmlChar.js create mode 100644 node_modules/lodash/_unicodeSize.js create mode 100644 node_modules/lodash/_unicodeToArray.js create mode 100644 node_modules/lodash/_unicodeWords.js create mode 100644 node_modules/lodash/_updateWrapDetails.js create mode 100644 node_modules/lodash/_wrapperClone.js create mode 100644 node_modules/lodash/add.js create mode 100644 node_modules/lodash/after.js create mode 100644 node_modules/lodash/array.js create mode 100644 node_modules/lodash/ary.js create mode 100644 node_modules/lodash/assign.js create mode 100644 node_modules/lodash/assignIn.js create mode 100644 node_modules/lodash/assignInWith.js create mode 100644 node_modules/lodash/assignWith.js create mode 100644 node_modules/lodash/at.js create mode 100644 node_modules/lodash/attempt.js create mode 100644 node_modules/lodash/before.js create mode 100644 node_modules/lodash/bind.js create mode 100644 node_modules/lodash/bindAll.js create mode 100644 node_modules/lodash/bindKey.js create mode 100644 node_modules/lodash/camelCase.js create mode 100644 node_modules/lodash/capitalize.js create mode 100644 node_modules/lodash/castArray.js create mode 100644 node_modules/lodash/ceil.js create mode 100644 node_modules/lodash/chain.js create mode 100644 node_modules/lodash/chunk.js create mode 100644 node_modules/lodash/clamp.js create mode 100644 node_modules/lodash/clone.js create mode 100644 node_modules/lodash/cloneDeep.js create mode 100644 node_modules/lodash/cloneDeepWith.js create mode 100644 node_modules/lodash/cloneWith.js create mode 100644 node_modules/lodash/collection.js create mode 100644 node_modules/lodash/commit.js create mode 100644 node_modules/lodash/compact.js create mode 100644 node_modules/lodash/concat.js create mode 100644 node_modules/lodash/cond.js create mode 100644 node_modules/lodash/conforms.js create mode 100644 node_modules/lodash/conformsTo.js create mode 100644 node_modules/lodash/constant.js create mode 100644 node_modules/lodash/core.js create mode 100644 node_modules/lodash/core.min.js create mode 100644 node_modules/lodash/countBy.js create mode 100644 node_modules/lodash/create.js create mode 100644 node_modules/lodash/curry.js create mode 100644 node_modules/lodash/curryRight.js create mode 100644 node_modules/lodash/date.js create mode 100644 node_modules/lodash/debounce.js create mode 100644 node_modules/lodash/deburr.js create mode 100644 node_modules/lodash/defaultTo.js create mode 100644 node_modules/lodash/defaults.js create mode 100644 node_modules/lodash/defaultsDeep.js create mode 100644 node_modules/lodash/defer.js create mode 100644 node_modules/lodash/delay.js create mode 100644 node_modules/lodash/difference.js create mode 100644 node_modules/lodash/differenceBy.js create mode 100644 node_modules/lodash/differenceWith.js create mode 100644 node_modules/lodash/divide.js create mode 100644 node_modules/lodash/drop.js create mode 100644 node_modules/lodash/dropRight.js create mode 100644 node_modules/lodash/dropRightWhile.js create mode 100644 node_modules/lodash/dropWhile.js create mode 100644 node_modules/lodash/each.js create mode 100644 node_modules/lodash/eachRight.js create mode 100644 node_modules/lodash/endsWith.js create mode 100644 node_modules/lodash/entries.js create mode 100644 node_modules/lodash/entriesIn.js create mode 100644 node_modules/lodash/eq.js create mode 100644 node_modules/lodash/escape.js create mode 100644 node_modules/lodash/escapeRegExp.js create mode 100644 node_modules/lodash/every.js create mode 100644 node_modules/lodash/extend.js create mode 100644 node_modules/lodash/extendWith.js create mode 100644 node_modules/lodash/fill.js create mode 100644 node_modules/lodash/filter.js create mode 100644 node_modules/lodash/find.js create mode 100644 node_modules/lodash/findIndex.js create mode 100644 node_modules/lodash/findKey.js create mode 100644 node_modules/lodash/findLast.js create mode 100644 node_modules/lodash/findLastIndex.js create mode 100644 node_modules/lodash/findLastKey.js create mode 100644 node_modules/lodash/first.js create mode 100644 node_modules/lodash/flatMap.js create mode 100644 node_modules/lodash/flatMapDeep.js create mode 100644 node_modules/lodash/flatMapDepth.js create mode 100644 node_modules/lodash/flatten.js create mode 100644 node_modules/lodash/flattenDeep.js create mode 100644 node_modules/lodash/flattenDepth.js create mode 100644 node_modules/lodash/flip.js create mode 100644 node_modules/lodash/floor.js create mode 100644 node_modules/lodash/flow.js create mode 100644 node_modules/lodash/flowRight.js create mode 100644 node_modules/lodash/forEach.js create mode 100644 node_modules/lodash/forEachRight.js create mode 100644 node_modules/lodash/forIn.js create mode 100644 node_modules/lodash/forInRight.js create mode 100644 node_modules/lodash/forOwn.js create mode 100644 node_modules/lodash/forOwnRight.js create mode 100644 node_modules/lodash/fp.js create mode 100644 node_modules/lodash/fp/F.js create mode 100644 node_modules/lodash/fp/T.js create mode 100644 node_modules/lodash/fp/__.js create mode 100644 node_modules/lodash/fp/_baseConvert.js create mode 100644 node_modules/lodash/fp/_convertBrowser.js create mode 100644 node_modules/lodash/fp/_falseOptions.js create mode 100644 node_modules/lodash/fp/_mapping.js create mode 100644 node_modules/lodash/fp/_util.js create mode 100644 node_modules/lodash/fp/add.js create mode 100644 node_modules/lodash/fp/after.js create mode 100644 node_modules/lodash/fp/all.js create mode 100644 node_modules/lodash/fp/allPass.js create mode 100644 node_modules/lodash/fp/always.js create mode 100644 node_modules/lodash/fp/any.js create mode 100644 node_modules/lodash/fp/anyPass.js create mode 100644 node_modules/lodash/fp/apply.js create mode 100644 node_modules/lodash/fp/array.js create mode 100644 node_modules/lodash/fp/ary.js create mode 100644 node_modules/lodash/fp/assign.js create mode 100644 node_modules/lodash/fp/assignAll.js create mode 100644 node_modules/lodash/fp/assignAllWith.js create mode 100644 node_modules/lodash/fp/assignIn.js create mode 100644 node_modules/lodash/fp/assignInAll.js create mode 100644 node_modules/lodash/fp/assignInAllWith.js create mode 100644 node_modules/lodash/fp/assignInWith.js create mode 100644 node_modules/lodash/fp/assignWith.js create mode 100644 node_modules/lodash/fp/assoc.js create mode 100644 node_modules/lodash/fp/assocPath.js create mode 100644 node_modules/lodash/fp/at.js create mode 100644 node_modules/lodash/fp/attempt.js create mode 100644 node_modules/lodash/fp/before.js create mode 100644 node_modules/lodash/fp/bind.js create mode 100644 node_modules/lodash/fp/bindAll.js create mode 100644 node_modules/lodash/fp/bindKey.js create mode 100644 node_modules/lodash/fp/camelCase.js create mode 100644 node_modules/lodash/fp/capitalize.js create mode 100644 node_modules/lodash/fp/castArray.js create mode 100644 node_modules/lodash/fp/ceil.js create mode 100644 node_modules/lodash/fp/chain.js create mode 100644 node_modules/lodash/fp/chunk.js create mode 100644 node_modules/lodash/fp/clamp.js create mode 100644 node_modules/lodash/fp/clone.js create mode 100644 node_modules/lodash/fp/cloneDeep.js create mode 100644 node_modules/lodash/fp/cloneDeepWith.js create mode 100644 node_modules/lodash/fp/cloneWith.js create mode 100644 node_modules/lodash/fp/collection.js create mode 100644 node_modules/lodash/fp/commit.js create mode 100644 node_modules/lodash/fp/compact.js create mode 100644 node_modules/lodash/fp/complement.js create mode 100644 node_modules/lodash/fp/compose.js create mode 100644 node_modules/lodash/fp/concat.js create mode 100644 node_modules/lodash/fp/cond.js create mode 100644 node_modules/lodash/fp/conforms.js create mode 100644 node_modules/lodash/fp/conformsTo.js create mode 100644 node_modules/lodash/fp/constant.js create mode 100644 node_modules/lodash/fp/contains.js create mode 100644 node_modules/lodash/fp/convert.js create mode 100644 node_modules/lodash/fp/countBy.js create mode 100644 node_modules/lodash/fp/create.js create mode 100644 node_modules/lodash/fp/curry.js create mode 100644 node_modules/lodash/fp/curryN.js create mode 100644 node_modules/lodash/fp/curryRight.js create mode 100644 node_modules/lodash/fp/curryRightN.js create mode 100644 node_modules/lodash/fp/date.js create mode 100644 node_modules/lodash/fp/debounce.js create mode 100644 node_modules/lodash/fp/deburr.js create mode 100644 node_modules/lodash/fp/defaultTo.js create mode 100644 node_modules/lodash/fp/defaults.js create mode 100644 node_modules/lodash/fp/defaultsAll.js create mode 100644 node_modules/lodash/fp/defaultsDeep.js create mode 100644 node_modules/lodash/fp/defaultsDeepAll.js create mode 100644 node_modules/lodash/fp/defer.js create mode 100644 node_modules/lodash/fp/delay.js create mode 100644 node_modules/lodash/fp/difference.js create mode 100644 node_modules/lodash/fp/differenceBy.js create mode 100644 node_modules/lodash/fp/differenceWith.js create mode 100644 node_modules/lodash/fp/dissoc.js create mode 100644 node_modules/lodash/fp/dissocPath.js create mode 100644 node_modules/lodash/fp/divide.js create mode 100644 node_modules/lodash/fp/drop.js create mode 100644 node_modules/lodash/fp/dropLast.js create mode 100644 node_modules/lodash/fp/dropLastWhile.js create mode 100644 node_modules/lodash/fp/dropRight.js create mode 100644 node_modules/lodash/fp/dropRightWhile.js create mode 100644 node_modules/lodash/fp/dropWhile.js create mode 100644 node_modules/lodash/fp/each.js create mode 100644 node_modules/lodash/fp/eachRight.js create mode 100644 node_modules/lodash/fp/endsWith.js create mode 100644 node_modules/lodash/fp/entries.js create mode 100644 node_modules/lodash/fp/entriesIn.js create mode 100644 node_modules/lodash/fp/eq.js create mode 100644 node_modules/lodash/fp/equals.js create mode 100644 node_modules/lodash/fp/escape.js create mode 100644 node_modules/lodash/fp/escapeRegExp.js create mode 100644 node_modules/lodash/fp/every.js create mode 100644 node_modules/lodash/fp/extend.js create mode 100644 node_modules/lodash/fp/extendAll.js create mode 100644 node_modules/lodash/fp/extendAllWith.js create mode 100644 node_modules/lodash/fp/extendWith.js create mode 100644 node_modules/lodash/fp/fill.js create mode 100644 node_modules/lodash/fp/filter.js create mode 100644 node_modules/lodash/fp/find.js create mode 100644 node_modules/lodash/fp/findFrom.js create mode 100644 node_modules/lodash/fp/findIndex.js create mode 100644 node_modules/lodash/fp/findIndexFrom.js create mode 100644 node_modules/lodash/fp/findKey.js create mode 100644 node_modules/lodash/fp/findLast.js create mode 100644 node_modules/lodash/fp/findLastFrom.js create mode 100644 node_modules/lodash/fp/findLastIndex.js create mode 100644 node_modules/lodash/fp/findLastIndexFrom.js create mode 100644 node_modules/lodash/fp/findLastKey.js create mode 100644 node_modules/lodash/fp/first.js create mode 100644 node_modules/lodash/fp/flatMap.js create mode 100644 node_modules/lodash/fp/flatMapDeep.js create mode 100644 node_modules/lodash/fp/flatMapDepth.js create mode 100644 node_modules/lodash/fp/flatten.js create mode 100644 node_modules/lodash/fp/flattenDeep.js create mode 100644 node_modules/lodash/fp/flattenDepth.js create mode 100644 node_modules/lodash/fp/flip.js create mode 100644 node_modules/lodash/fp/floor.js create mode 100644 node_modules/lodash/fp/flow.js create mode 100644 node_modules/lodash/fp/flowRight.js create mode 100644 node_modules/lodash/fp/forEach.js create mode 100644 node_modules/lodash/fp/forEachRight.js create mode 100644 node_modules/lodash/fp/forIn.js create mode 100644 node_modules/lodash/fp/forInRight.js create mode 100644 node_modules/lodash/fp/forOwn.js create mode 100644 node_modules/lodash/fp/forOwnRight.js create mode 100644 node_modules/lodash/fp/fromPairs.js create mode 100644 node_modules/lodash/fp/function.js create mode 100644 node_modules/lodash/fp/functions.js create mode 100644 node_modules/lodash/fp/functionsIn.js create mode 100644 node_modules/lodash/fp/get.js create mode 100644 node_modules/lodash/fp/getOr.js create mode 100644 node_modules/lodash/fp/groupBy.js create mode 100644 node_modules/lodash/fp/gt.js create mode 100644 node_modules/lodash/fp/gte.js create mode 100644 node_modules/lodash/fp/has.js create mode 100644 node_modules/lodash/fp/hasIn.js create mode 100644 node_modules/lodash/fp/head.js create mode 100644 node_modules/lodash/fp/identical.js create mode 100644 node_modules/lodash/fp/identity.js create mode 100644 node_modules/lodash/fp/inRange.js create mode 100644 node_modules/lodash/fp/includes.js create mode 100644 node_modules/lodash/fp/includesFrom.js create mode 100644 node_modules/lodash/fp/indexBy.js create mode 100644 node_modules/lodash/fp/indexOf.js create mode 100644 node_modules/lodash/fp/indexOfFrom.js create mode 100644 node_modules/lodash/fp/init.js create mode 100644 node_modules/lodash/fp/initial.js create mode 100644 node_modules/lodash/fp/intersection.js create mode 100644 node_modules/lodash/fp/intersectionBy.js create mode 100644 node_modules/lodash/fp/intersectionWith.js create mode 100644 node_modules/lodash/fp/invert.js create mode 100644 node_modules/lodash/fp/invertBy.js create mode 100644 node_modules/lodash/fp/invertObj.js create mode 100644 node_modules/lodash/fp/invoke.js create mode 100644 node_modules/lodash/fp/invokeArgs.js create mode 100644 node_modules/lodash/fp/invokeArgsMap.js create mode 100644 node_modules/lodash/fp/invokeMap.js create mode 100644 node_modules/lodash/fp/isArguments.js create mode 100644 node_modules/lodash/fp/isArray.js create mode 100644 node_modules/lodash/fp/isArrayBuffer.js create mode 100644 node_modules/lodash/fp/isArrayLike.js create mode 100644 node_modules/lodash/fp/isArrayLikeObject.js create mode 100644 node_modules/lodash/fp/isBoolean.js create mode 100644 node_modules/lodash/fp/isBuffer.js create mode 100644 node_modules/lodash/fp/isDate.js create mode 100644 node_modules/lodash/fp/isElement.js create mode 100644 node_modules/lodash/fp/isEmpty.js create mode 100644 node_modules/lodash/fp/isEqual.js create mode 100644 node_modules/lodash/fp/isEqualWith.js create mode 100644 node_modules/lodash/fp/isError.js create mode 100644 node_modules/lodash/fp/isFinite.js create mode 100644 node_modules/lodash/fp/isFunction.js create mode 100644 node_modules/lodash/fp/isInteger.js create mode 100644 node_modules/lodash/fp/isLength.js create mode 100644 node_modules/lodash/fp/isMap.js create mode 100644 node_modules/lodash/fp/isMatch.js create mode 100644 node_modules/lodash/fp/isMatchWith.js create mode 100644 node_modules/lodash/fp/isNaN.js create mode 100644 node_modules/lodash/fp/isNative.js create mode 100644 node_modules/lodash/fp/isNil.js create mode 100644 node_modules/lodash/fp/isNull.js create mode 100644 node_modules/lodash/fp/isNumber.js create mode 100644 node_modules/lodash/fp/isObject.js create mode 100644 node_modules/lodash/fp/isObjectLike.js create mode 100644 node_modules/lodash/fp/isPlainObject.js create mode 100644 node_modules/lodash/fp/isRegExp.js create mode 100644 node_modules/lodash/fp/isSafeInteger.js create mode 100644 node_modules/lodash/fp/isSet.js create mode 100644 node_modules/lodash/fp/isString.js create mode 100644 node_modules/lodash/fp/isSymbol.js create mode 100644 node_modules/lodash/fp/isTypedArray.js create mode 100644 node_modules/lodash/fp/isUndefined.js create mode 100644 node_modules/lodash/fp/isWeakMap.js create mode 100644 node_modules/lodash/fp/isWeakSet.js create mode 100644 node_modules/lodash/fp/iteratee.js create mode 100644 node_modules/lodash/fp/join.js create mode 100644 node_modules/lodash/fp/juxt.js create mode 100644 node_modules/lodash/fp/kebabCase.js create mode 100644 node_modules/lodash/fp/keyBy.js create mode 100644 node_modules/lodash/fp/keys.js create mode 100644 node_modules/lodash/fp/keysIn.js create mode 100644 node_modules/lodash/fp/lang.js create mode 100644 node_modules/lodash/fp/last.js create mode 100644 node_modules/lodash/fp/lastIndexOf.js create mode 100644 node_modules/lodash/fp/lastIndexOfFrom.js create mode 100644 node_modules/lodash/fp/lowerCase.js create mode 100644 node_modules/lodash/fp/lowerFirst.js create mode 100644 node_modules/lodash/fp/lt.js create mode 100644 node_modules/lodash/fp/lte.js create mode 100644 node_modules/lodash/fp/map.js create mode 100644 node_modules/lodash/fp/mapKeys.js create mode 100644 node_modules/lodash/fp/mapValues.js create mode 100644 node_modules/lodash/fp/matches.js create mode 100644 node_modules/lodash/fp/matchesProperty.js create mode 100644 node_modules/lodash/fp/math.js create mode 100644 node_modules/lodash/fp/max.js create mode 100644 node_modules/lodash/fp/maxBy.js create mode 100644 node_modules/lodash/fp/mean.js create mode 100644 node_modules/lodash/fp/meanBy.js create mode 100644 node_modules/lodash/fp/memoize.js create mode 100644 node_modules/lodash/fp/merge.js create mode 100644 node_modules/lodash/fp/mergeAll.js create mode 100644 node_modules/lodash/fp/mergeAllWith.js create mode 100644 node_modules/lodash/fp/mergeWith.js create mode 100644 node_modules/lodash/fp/method.js create mode 100644 node_modules/lodash/fp/methodOf.js create mode 100644 node_modules/lodash/fp/min.js create mode 100644 node_modules/lodash/fp/minBy.js create mode 100644 node_modules/lodash/fp/mixin.js create mode 100644 node_modules/lodash/fp/multiply.js create mode 100644 node_modules/lodash/fp/nAry.js create mode 100644 node_modules/lodash/fp/negate.js create mode 100644 node_modules/lodash/fp/next.js create mode 100644 node_modules/lodash/fp/noop.js create mode 100644 node_modules/lodash/fp/now.js create mode 100644 node_modules/lodash/fp/nth.js create mode 100644 node_modules/lodash/fp/nthArg.js create mode 100644 node_modules/lodash/fp/number.js create mode 100644 node_modules/lodash/fp/object.js create mode 100644 node_modules/lodash/fp/omit.js create mode 100644 node_modules/lodash/fp/omitAll.js create mode 100644 node_modules/lodash/fp/omitBy.js create mode 100644 node_modules/lodash/fp/once.js create mode 100644 node_modules/lodash/fp/orderBy.js create mode 100644 node_modules/lodash/fp/over.js create mode 100644 node_modules/lodash/fp/overArgs.js create mode 100644 node_modules/lodash/fp/overEvery.js create mode 100644 node_modules/lodash/fp/overSome.js create mode 100644 node_modules/lodash/fp/pad.js create mode 100644 node_modules/lodash/fp/padChars.js create mode 100644 node_modules/lodash/fp/padCharsEnd.js create mode 100644 node_modules/lodash/fp/padCharsStart.js create mode 100644 node_modules/lodash/fp/padEnd.js create mode 100644 node_modules/lodash/fp/padStart.js create mode 100644 node_modules/lodash/fp/parseInt.js create mode 100644 node_modules/lodash/fp/partial.js create mode 100644 node_modules/lodash/fp/partialRight.js create mode 100644 node_modules/lodash/fp/partition.js create mode 100644 node_modules/lodash/fp/path.js create mode 100644 node_modules/lodash/fp/pathEq.js create mode 100644 node_modules/lodash/fp/pathOr.js create mode 100644 node_modules/lodash/fp/paths.js create mode 100644 node_modules/lodash/fp/pick.js create mode 100644 node_modules/lodash/fp/pickAll.js create mode 100644 node_modules/lodash/fp/pickBy.js create mode 100644 node_modules/lodash/fp/pipe.js create mode 100644 node_modules/lodash/fp/placeholder.js create mode 100644 node_modules/lodash/fp/plant.js create mode 100644 node_modules/lodash/fp/pluck.js create mode 100644 node_modules/lodash/fp/prop.js create mode 100644 node_modules/lodash/fp/propEq.js create mode 100644 node_modules/lodash/fp/propOr.js create mode 100644 node_modules/lodash/fp/property.js create mode 100644 node_modules/lodash/fp/propertyOf.js create mode 100644 node_modules/lodash/fp/props.js create mode 100644 node_modules/lodash/fp/pull.js create mode 100644 node_modules/lodash/fp/pullAll.js create mode 100644 node_modules/lodash/fp/pullAllBy.js create mode 100644 node_modules/lodash/fp/pullAllWith.js create mode 100644 node_modules/lodash/fp/pullAt.js create mode 100644 node_modules/lodash/fp/random.js create mode 100644 node_modules/lodash/fp/range.js create mode 100644 node_modules/lodash/fp/rangeRight.js create mode 100644 node_modules/lodash/fp/rangeStep.js create mode 100644 node_modules/lodash/fp/rangeStepRight.js create mode 100644 node_modules/lodash/fp/rearg.js create mode 100644 node_modules/lodash/fp/reduce.js create mode 100644 node_modules/lodash/fp/reduceRight.js create mode 100644 node_modules/lodash/fp/reject.js create mode 100644 node_modules/lodash/fp/remove.js create mode 100644 node_modules/lodash/fp/repeat.js create mode 100644 node_modules/lodash/fp/replace.js create mode 100644 node_modules/lodash/fp/rest.js create mode 100644 node_modules/lodash/fp/restFrom.js create mode 100644 node_modules/lodash/fp/result.js create mode 100644 node_modules/lodash/fp/reverse.js create mode 100644 node_modules/lodash/fp/round.js create mode 100644 node_modules/lodash/fp/sample.js create mode 100644 node_modules/lodash/fp/sampleSize.js create mode 100644 node_modules/lodash/fp/seq.js create mode 100644 node_modules/lodash/fp/set.js create mode 100644 node_modules/lodash/fp/setWith.js create mode 100644 node_modules/lodash/fp/shuffle.js create mode 100644 node_modules/lodash/fp/size.js create mode 100644 node_modules/lodash/fp/slice.js create mode 100644 node_modules/lodash/fp/snakeCase.js create mode 100644 node_modules/lodash/fp/some.js create mode 100644 node_modules/lodash/fp/sortBy.js create mode 100644 node_modules/lodash/fp/sortedIndex.js create mode 100644 node_modules/lodash/fp/sortedIndexBy.js create mode 100644 node_modules/lodash/fp/sortedIndexOf.js create mode 100644 node_modules/lodash/fp/sortedLastIndex.js create mode 100644 node_modules/lodash/fp/sortedLastIndexBy.js create mode 100644 node_modules/lodash/fp/sortedLastIndexOf.js create mode 100644 node_modules/lodash/fp/sortedUniq.js create mode 100644 node_modules/lodash/fp/sortedUniqBy.js create mode 100644 node_modules/lodash/fp/split.js create mode 100644 node_modules/lodash/fp/spread.js create mode 100644 node_modules/lodash/fp/spreadFrom.js create mode 100644 node_modules/lodash/fp/startCase.js create mode 100644 node_modules/lodash/fp/startsWith.js create mode 100644 node_modules/lodash/fp/string.js create mode 100644 node_modules/lodash/fp/stubArray.js create mode 100644 node_modules/lodash/fp/stubFalse.js create mode 100644 node_modules/lodash/fp/stubObject.js create mode 100644 node_modules/lodash/fp/stubString.js create mode 100644 node_modules/lodash/fp/stubTrue.js create mode 100644 node_modules/lodash/fp/subtract.js create mode 100644 node_modules/lodash/fp/sum.js create mode 100644 node_modules/lodash/fp/sumBy.js create mode 100644 node_modules/lodash/fp/symmetricDifference.js create mode 100644 node_modules/lodash/fp/symmetricDifferenceBy.js create mode 100644 node_modules/lodash/fp/symmetricDifferenceWith.js create mode 100644 node_modules/lodash/fp/tail.js create mode 100644 node_modules/lodash/fp/take.js create mode 100644 node_modules/lodash/fp/takeLast.js create mode 100644 node_modules/lodash/fp/takeLastWhile.js create mode 100644 node_modules/lodash/fp/takeRight.js create mode 100644 node_modules/lodash/fp/takeRightWhile.js create mode 100644 node_modules/lodash/fp/takeWhile.js create mode 100644 node_modules/lodash/fp/tap.js create mode 100644 node_modules/lodash/fp/template.js create mode 100644 node_modules/lodash/fp/templateSettings.js create mode 100644 node_modules/lodash/fp/throttle.js create mode 100644 node_modules/lodash/fp/thru.js create mode 100644 node_modules/lodash/fp/times.js create mode 100644 node_modules/lodash/fp/toArray.js create mode 100644 node_modules/lodash/fp/toFinite.js create mode 100644 node_modules/lodash/fp/toInteger.js create mode 100644 node_modules/lodash/fp/toIterator.js create mode 100644 node_modules/lodash/fp/toJSON.js create mode 100644 node_modules/lodash/fp/toLength.js create mode 100644 node_modules/lodash/fp/toLower.js create mode 100644 node_modules/lodash/fp/toNumber.js create mode 100644 node_modules/lodash/fp/toPairs.js create mode 100644 node_modules/lodash/fp/toPairsIn.js create mode 100644 node_modules/lodash/fp/toPath.js create mode 100644 node_modules/lodash/fp/toPlainObject.js create mode 100644 node_modules/lodash/fp/toSafeInteger.js create mode 100644 node_modules/lodash/fp/toString.js create mode 100644 node_modules/lodash/fp/toUpper.js create mode 100644 node_modules/lodash/fp/transform.js create mode 100644 node_modules/lodash/fp/trim.js create mode 100644 node_modules/lodash/fp/trimChars.js create mode 100644 node_modules/lodash/fp/trimCharsEnd.js create mode 100644 node_modules/lodash/fp/trimCharsStart.js create mode 100644 node_modules/lodash/fp/trimEnd.js create mode 100644 node_modules/lodash/fp/trimStart.js create mode 100644 node_modules/lodash/fp/truncate.js create mode 100644 node_modules/lodash/fp/unapply.js create mode 100644 node_modules/lodash/fp/unary.js create mode 100644 node_modules/lodash/fp/unescape.js create mode 100644 node_modules/lodash/fp/union.js create mode 100644 node_modules/lodash/fp/unionBy.js create mode 100644 node_modules/lodash/fp/unionWith.js create mode 100644 node_modules/lodash/fp/uniq.js create mode 100644 node_modules/lodash/fp/uniqBy.js create mode 100644 node_modules/lodash/fp/uniqWith.js create mode 100644 node_modules/lodash/fp/uniqueId.js create mode 100644 node_modules/lodash/fp/unnest.js create mode 100644 node_modules/lodash/fp/unset.js create mode 100644 node_modules/lodash/fp/unzip.js create mode 100644 node_modules/lodash/fp/unzipWith.js create mode 100644 node_modules/lodash/fp/update.js create mode 100644 node_modules/lodash/fp/updateWith.js create mode 100644 node_modules/lodash/fp/upperCase.js create mode 100644 node_modules/lodash/fp/upperFirst.js create mode 100644 node_modules/lodash/fp/useWith.js create mode 100644 node_modules/lodash/fp/util.js create mode 100644 node_modules/lodash/fp/value.js create mode 100644 node_modules/lodash/fp/valueOf.js create mode 100644 node_modules/lodash/fp/values.js create mode 100644 node_modules/lodash/fp/valuesIn.js create mode 100644 node_modules/lodash/fp/where.js create mode 100644 node_modules/lodash/fp/whereEq.js create mode 100644 node_modules/lodash/fp/without.js create mode 100644 node_modules/lodash/fp/words.js create mode 100644 node_modules/lodash/fp/wrap.js create mode 100644 node_modules/lodash/fp/wrapperAt.js create mode 100644 node_modules/lodash/fp/wrapperChain.js create mode 100644 node_modules/lodash/fp/wrapperLodash.js create mode 100644 node_modules/lodash/fp/wrapperReverse.js create mode 100644 node_modules/lodash/fp/wrapperValue.js create mode 100644 node_modules/lodash/fp/xor.js create mode 100644 node_modules/lodash/fp/xorBy.js create mode 100644 node_modules/lodash/fp/xorWith.js create mode 100644 node_modules/lodash/fp/zip.js create mode 100644 node_modules/lodash/fp/zipAll.js create mode 100644 node_modules/lodash/fp/zipObj.js create mode 100644 node_modules/lodash/fp/zipObject.js create mode 100644 node_modules/lodash/fp/zipObjectDeep.js create mode 100644 node_modules/lodash/fp/zipWith.js create mode 100644 node_modules/lodash/fromPairs.js create mode 100644 node_modules/lodash/function.js create mode 100644 node_modules/lodash/functions.js create mode 100644 node_modules/lodash/functionsIn.js create mode 100644 node_modules/lodash/get.js create mode 100644 node_modules/lodash/groupBy.js create mode 100644 node_modules/lodash/gt.js create mode 100644 node_modules/lodash/gte.js create mode 100644 node_modules/lodash/has.js create mode 100644 node_modules/lodash/hasIn.js create mode 100644 node_modules/lodash/head.js create mode 100644 node_modules/lodash/identity.js create mode 100644 node_modules/lodash/inRange.js create mode 100644 node_modules/lodash/includes.js create mode 100644 node_modules/lodash/index.js create mode 100644 node_modules/lodash/indexOf.js create mode 100644 node_modules/lodash/initial.js create mode 100644 node_modules/lodash/intersection.js create mode 100644 node_modules/lodash/intersectionBy.js create mode 100644 node_modules/lodash/intersectionWith.js create mode 100644 node_modules/lodash/invert.js create mode 100644 node_modules/lodash/invertBy.js create mode 100644 node_modules/lodash/invoke.js create mode 100644 node_modules/lodash/invokeMap.js create mode 100644 node_modules/lodash/isArguments.js create mode 100644 node_modules/lodash/isArray.js create mode 100644 node_modules/lodash/isArrayBuffer.js create mode 100644 node_modules/lodash/isArrayLike.js create mode 100644 node_modules/lodash/isArrayLikeObject.js create mode 100644 node_modules/lodash/isBoolean.js create mode 100644 node_modules/lodash/isBuffer.js create mode 100644 node_modules/lodash/isDate.js create mode 100644 node_modules/lodash/isElement.js create mode 100644 node_modules/lodash/isEmpty.js create mode 100644 node_modules/lodash/isEqual.js create mode 100644 node_modules/lodash/isEqualWith.js create mode 100644 node_modules/lodash/isError.js create mode 100644 node_modules/lodash/isFinite.js create mode 100644 node_modules/lodash/isFunction.js create mode 100644 node_modules/lodash/isInteger.js create mode 100644 node_modules/lodash/isLength.js create mode 100644 node_modules/lodash/isMap.js create mode 100644 node_modules/lodash/isMatch.js create mode 100644 node_modules/lodash/isMatchWith.js create mode 100644 node_modules/lodash/isNaN.js create mode 100644 node_modules/lodash/isNative.js create mode 100644 node_modules/lodash/isNil.js create mode 100644 node_modules/lodash/isNull.js create mode 100644 node_modules/lodash/isNumber.js create mode 100644 node_modules/lodash/isObject.js create mode 100644 node_modules/lodash/isObjectLike.js create mode 100644 node_modules/lodash/isPlainObject.js create mode 100644 node_modules/lodash/isRegExp.js create mode 100644 node_modules/lodash/isSafeInteger.js create mode 100644 node_modules/lodash/isSet.js create mode 100644 node_modules/lodash/isString.js create mode 100644 node_modules/lodash/isSymbol.js create mode 100644 node_modules/lodash/isTypedArray.js create mode 100644 node_modules/lodash/isUndefined.js create mode 100644 node_modules/lodash/isWeakMap.js create mode 100644 node_modules/lodash/isWeakSet.js create mode 100644 node_modules/lodash/iteratee.js create mode 100644 node_modules/lodash/join.js create mode 100644 node_modules/lodash/kebabCase.js create mode 100644 node_modules/lodash/keyBy.js create mode 100644 node_modules/lodash/keys.js create mode 100644 node_modules/lodash/keysIn.js create mode 100644 node_modules/lodash/lang.js create mode 100644 node_modules/lodash/last.js create mode 100644 node_modules/lodash/lastIndexOf.js create mode 100644 node_modules/lodash/lodash.js create mode 100644 node_modules/lodash/lodash.min.js create mode 100644 node_modules/lodash/lowerCase.js create mode 100644 node_modules/lodash/lowerFirst.js create mode 100644 node_modules/lodash/lt.js create mode 100644 node_modules/lodash/lte.js create mode 100644 node_modules/lodash/map.js create mode 100644 node_modules/lodash/mapKeys.js create mode 100644 node_modules/lodash/mapValues.js create mode 100644 node_modules/lodash/matches.js create mode 100644 node_modules/lodash/matchesProperty.js create mode 100644 node_modules/lodash/math.js create mode 100644 node_modules/lodash/max.js create mode 100644 node_modules/lodash/maxBy.js create mode 100644 node_modules/lodash/mean.js create mode 100644 node_modules/lodash/meanBy.js create mode 100644 node_modules/lodash/memoize.js create mode 100644 node_modules/lodash/merge.js create mode 100644 node_modules/lodash/mergeWith.js create mode 100644 node_modules/lodash/method.js create mode 100644 node_modules/lodash/methodOf.js create mode 100644 node_modules/lodash/min.js create mode 100644 node_modules/lodash/minBy.js create mode 100644 node_modules/lodash/mixin.js create mode 100644 node_modules/lodash/multiply.js create mode 100644 node_modules/lodash/negate.js create mode 100644 node_modules/lodash/next.js create mode 100644 node_modules/lodash/noop.js create mode 100644 node_modules/lodash/now.js create mode 100644 node_modules/lodash/nth.js create mode 100644 node_modules/lodash/nthArg.js create mode 100644 node_modules/lodash/number.js create mode 100644 node_modules/lodash/object.js create mode 100644 node_modules/lodash/omit.js create mode 100644 node_modules/lodash/omitBy.js create mode 100644 node_modules/lodash/once.js create mode 100644 node_modules/lodash/orderBy.js create mode 100644 node_modules/lodash/over.js create mode 100644 node_modules/lodash/overArgs.js create mode 100644 node_modules/lodash/overEvery.js create mode 100644 node_modules/lodash/overSome.js create mode 100644 node_modules/lodash/package.json create mode 100644 node_modules/lodash/pad.js create mode 100644 node_modules/lodash/padEnd.js create mode 100644 node_modules/lodash/padStart.js create mode 100644 node_modules/lodash/parseInt.js create mode 100644 node_modules/lodash/partial.js create mode 100644 node_modules/lodash/partialRight.js create mode 100644 node_modules/lodash/partition.js create mode 100644 node_modules/lodash/pick.js create mode 100644 node_modules/lodash/pickBy.js create mode 100644 node_modules/lodash/plant.js create mode 100644 node_modules/lodash/property.js create mode 100644 node_modules/lodash/propertyOf.js create mode 100644 node_modules/lodash/pull.js create mode 100644 node_modules/lodash/pullAll.js create mode 100644 node_modules/lodash/pullAllBy.js create mode 100644 node_modules/lodash/pullAllWith.js create mode 100644 node_modules/lodash/pullAt.js create mode 100644 node_modules/lodash/random.js create mode 100644 node_modules/lodash/range.js create mode 100644 node_modules/lodash/rangeRight.js create mode 100644 node_modules/lodash/rearg.js create mode 100644 node_modules/lodash/reduce.js create mode 100644 node_modules/lodash/reduceRight.js create mode 100644 node_modules/lodash/reject.js create mode 100644 node_modules/lodash/remove.js create mode 100644 node_modules/lodash/repeat.js create mode 100644 node_modules/lodash/replace.js create mode 100644 node_modules/lodash/rest.js create mode 100644 node_modules/lodash/result.js create mode 100644 node_modules/lodash/reverse.js create mode 100644 node_modules/lodash/round.js create mode 100644 node_modules/lodash/sample.js create mode 100644 node_modules/lodash/sampleSize.js create mode 100644 node_modules/lodash/seq.js create mode 100644 node_modules/lodash/set.js create mode 100644 node_modules/lodash/setWith.js create mode 100644 node_modules/lodash/shuffle.js create mode 100644 node_modules/lodash/size.js create mode 100644 node_modules/lodash/slice.js create mode 100644 node_modules/lodash/snakeCase.js create mode 100644 node_modules/lodash/some.js create mode 100644 node_modules/lodash/sortBy.js create mode 100644 node_modules/lodash/sortedIndex.js create mode 100644 node_modules/lodash/sortedIndexBy.js create mode 100644 node_modules/lodash/sortedIndexOf.js create mode 100644 node_modules/lodash/sortedLastIndex.js create mode 100644 node_modules/lodash/sortedLastIndexBy.js create mode 100644 node_modules/lodash/sortedLastIndexOf.js create mode 100644 node_modules/lodash/sortedUniq.js create mode 100644 node_modules/lodash/sortedUniqBy.js create mode 100644 node_modules/lodash/split.js create mode 100644 node_modules/lodash/spread.js create mode 100644 node_modules/lodash/startCase.js create mode 100644 node_modules/lodash/startsWith.js create mode 100644 node_modules/lodash/string.js create mode 100644 node_modules/lodash/stubArray.js create mode 100644 node_modules/lodash/stubFalse.js create mode 100644 node_modules/lodash/stubObject.js create mode 100644 node_modules/lodash/stubString.js create mode 100644 node_modules/lodash/stubTrue.js create mode 100644 node_modules/lodash/subtract.js create mode 100644 node_modules/lodash/sum.js create mode 100644 node_modules/lodash/sumBy.js create mode 100644 node_modules/lodash/tail.js create mode 100644 node_modules/lodash/take.js create mode 100644 node_modules/lodash/takeRight.js create mode 100644 node_modules/lodash/takeRightWhile.js create mode 100644 node_modules/lodash/takeWhile.js create mode 100644 node_modules/lodash/tap.js create mode 100644 node_modules/lodash/template.js create mode 100644 node_modules/lodash/templateSettings.js create mode 100644 node_modules/lodash/throttle.js create mode 100644 node_modules/lodash/thru.js create mode 100644 node_modules/lodash/times.js create mode 100644 node_modules/lodash/toArray.js create mode 100644 node_modules/lodash/toFinite.js create mode 100644 node_modules/lodash/toInteger.js create mode 100644 node_modules/lodash/toIterator.js create mode 100644 node_modules/lodash/toJSON.js create mode 100644 node_modules/lodash/toLength.js create mode 100644 node_modules/lodash/toLower.js create mode 100644 node_modules/lodash/toNumber.js create mode 100644 node_modules/lodash/toPairs.js create mode 100644 node_modules/lodash/toPairsIn.js create mode 100644 node_modules/lodash/toPath.js create mode 100644 node_modules/lodash/toPlainObject.js create mode 100644 node_modules/lodash/toSafeInteger.js create mode 100644 node_modules/lodash/toString.js create mode 100644 node_modules/lodash/toUpper.js create mode 100644 node_modules/lodash/transform.js create mode 100644 node_modules/lodash/trim.js create mode 100644 node_modules/lodash/trimEnd.js create mode 100644 node_modules/lodash/trimStart.js create mode 100644 node_modules/lodash/truncate.js create mode 100644 node_modules/lodash/unary.js create mode 100644 node_modules/lodash/unescape.js create mode 100644 node_modules/lodash/union.js create mode 100644 node_modules/lodash/unionBy.js create mode 100644 node_modules/lodash/unionWith.js create mode 100644 node_modules/lodash/uniq.js create mode 100644 node_modules/lodash/uniqBy.js create mode 100644 node_modules/lodash/uniqWith.js create mode 100644 node_modules/lodash/uniqueId.js create mode 100644 node_modules/lodash/unset.js create mode 100644 node_modules/lodash/unzip.js create mode 100644 node_modules/lodash/unzipWith.js create mode 100644 node_modules/lodash/update.js create mode 100644 node_modules/lodash/updateWith.js create mode 100644 node_modules/lodash/upperCase.js create mode 100644 node_modules/lodash/upperFirst.js create mode 100644 node_modules/lodash/util.js create mode 100644 node_modules/lodash/value.js create mode 100644 node_modules/lodash/valueOf.js create mode 100644 node_modules/lodash/values.js create mode 100644 node_modules/lodash/valuesIn.js create mode 100644 node_modules/lodash/without.js create mode 100644 node_modules/lodash/words.js create mode 100644 node_modules/lodash/wrap.js create mode 100644 node_modules/lodash/wrapperAt.js create mode 100644 node_modules/lodash/wrapperChain.js create mode 100644 node_modules/lodash/wrapperLodash.js create mode 100644 node_modules/lodash/wrapperReverse.js create mode 100644 node_modules/lodash/wrapperValue.js create mode 100644 node_modules/lodash/xor.js create mode 100644 node_modules/lodash/xorBy.js create mode 100644 node_modules/lodash/xorWith.js create mode 100644 node_modules/lodash/zip.js create mode 100644 node_modules/lodash/zipObject.js create mode 100644 node_modules/lodash/zipObjectDeep.js create mode 100644 node_modules/lodash/zipWith.js create mode 100644 node_modules/macos-release/index.d.ts create mode 100644 node_modules/macos-release/index.js create mode 100644 node_modules/macos-release/license create mode 100644 node_modules/macos-release/package.json create mode 100644 node_modules/macos-release/readme.md 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/node_modules/minimist/.travis.yml create mode 100644 node_modules/mkdirp/node_modules/minimist/LICENSE create mode 100644 node_modules/mkdirp/node_modules/minimist/example/parse.js create mode 100644 node_modules/mkdirp/node_modules/minimist/index.js create mode 100644 node_modules/mkdirp/node_modules/minimist/package.json create mode 100644 node_modules/mkdirp/node_modules/minimist/readme.markdown create mode 100644 node_modules/mkdirp/node_modules/minimist/test/dash.js create mode 100644 node_modules/mkdirp/node_modules/minimist/test/default_bool.js create mode 100644 node_modules/mkdirp/node_modules/minimist/test/dotted.js create mode 100644 node_modules/mkdirp/node_modules/minimist/test/long.js create mode 100644 node_modules/mkdirp/node_modules/minimist/test/parse.js create mode 100644 node_modules/mkdirp/node_modules/minimist/test/parse_modified.js create mode 100644 node_modules/mkdirp/node_modules/minimist/test/short.js create mode 100644 node_modules/mkdirp/node_modules/minimist/test/whitespace.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/nice-try/CHANGELOG.md create mode 100644 node_modules/nice-try/LICENSE create mode 100644 node_modules/nice-try/README.md create mode 100644 node_modules/nice-try/package.json create mode 100644 node_modules/nice-try/src/index.js create mode 100644 node_modules/nock/CHANGELOG.md create mode 100644 node_modules/nock/LICENSE create mode 100644 node_modules/nock/README.md create mode 100644 node_modules/nock/index.js create mode 100644 node_modules/nock/lib/back.js create mode 100644 node_modules/nock/lib/common.js create mode 100644 node_modules/nock/lib/delayed_body.js create mode 100644 node_modules/nock/lib/global_emitter.js create mode 100644 node_modules/nock/lib/intercept.js create mode 100644 node_modules/nock/lib/intercepted_request_router.js create mode 100644 node_modules/nock/lib/interceptor.js create mode 100644 node_modules/nock/lib/match_body.js create mode 100644 node_modules/nock/lib/playback_interceptor.js create mode 100644 node_modules/nock/lib/recorder.js create mode 100644 node_modules/nock/lib/scope.js create mode 100644 node_modules/nock/lib/socket.js create mode 100644 node_modules/nock/node_modules/debug/CHANGELOG.md create mode 100644 node_modules/nock/node_modules/debug/LICENSE create mode 100644 node_modules/nock/node_modules/debug/README.md create mode 100644 node_modules/nock/node_modules/debug/dist/debug.js create mode 100644 node_modules/nock/node_modules/debug/package.json create mode 100644 node_modules/nock/node_modules/debug/src/browser.js create mode 100644 node_modules/nock/node_modules/debug/src/common.js create mode 100644 node_modules/nock/node_modules/debug/src/index.js create mode 100644 node_modules/nock/node_modules/debug/src/node.js create mode 100644 node_modules/nock/node_modules/ms/index.js create mode 100644 node_modules/nock/node_modules/ms/license.md create mode 100644 node_modules/nock/node_modules/ms/package.json create mode 100644 node_modules/nock/node_modules/ms/readme.md create mode 100644 node_modules/nock/package.json create mode 100644 node_modules/nock/types/index.d.ts create mode 100644 node_modules/node-fetch/CHANGELOG.md create mode 100644 node_modules/node-fetch/LICENSE.md create mode 100644 node_modules/node-fetch/README.md create mode 100644 node_modules/node-fetch/browser.js create mode 100644 node_modules/node-fetch/lib/index.es.js create mode 100644 node_modules/node-fetch/lib/index.js create mode 100644 node_modules/node-fetch/lib/index.mjs create mode 100644 node_modules/node-fetch/package.json create mode 100644 node_modules/npm-run-path/index.js create mode 100644 node_modules/npm-run-path/license create mode 100644 node_modules/npm-run-path/package.json create mode 100644 node_modules/npm-run-path/readme.md create mode 100644 node_modules/octokit-pagination-methods/.travis.yml create mode 100644 node_modules/octokit-pagination-methods/CODE_OF_CONDUCT.md create mode 100644 node_modules/octokit-pagination-methods/LICENSE create mode 100644 node_modules/octokit-pagination-methods/README.md create mode 100644 node_modules/octokit-pagination-methods/index.js create mode 100644 node_modules/octokit-pagination-methods/lib/deprecate.js create mode 100644 node_modules/octokit-pagination-methods/lib/get-first-page.js create mode 100644 node_modules/octokit-pagination-methods/lib/get-last-page.js create mode 100644 node_modules/octokit-pagination-methods/lib/get-next-page.js create mode 100644 node_modules/octokit-pagination-methods/lib/get-page-links.js create mode 100644 node_modules/octokit-pagination-methods/lib/get-page.js create mode 100644 node_modules/octokit-pagination-methods/lib/get-previous-page.js create mode 100644 node_modules/octokit-pagination-methods/lib/has-first-page.js create mode 100644 node_modules/octokit-pagination-methods/lib/has-last-page.js create mode 100644 node_modules/octokit-pagination-methods/lib/has-next-page.js create mode 100644 node_modules/octokit-pagination-methods/lib/has-previous-page.js create mode 100644 node_modules/octokit-pagination-methods/lib/http-error.js create mode 100644 node_modules/octokit-pagination-methods/package.json create mode 100644 node_modules/octokit-pagination-methods/test.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-name/index.d.ts create mode 100644 node_modules/os-name/index.js create mode 100644 node_modules/os-name/license create mode 100644 node_modules/os-name/package.json create mode 100644 node_modules/os-name/readme.md create mode 100644 node_modules/p-finally/index.js create mode 100644 node_modules/p-finally/license create mode 100644 node_modules/p-finally/package.json create mode 100644 node_modules/p-finally/readme.md create mode 100644 node_modules/path-key/index.js create mode 100644 node_modules/path-key/license create mode 100644 node_modules/path-key/package.json create mode 100644 node_modules/path-key/readme.md create mode 100644 node_modules/pathval/CHANGELOG.md create mode 100644 node_modules/pathval/LICENSE create mode 100644 node_modules/pathval/README.md create mode 100644 node_modules/pathval/index.js create mode 100644 node_modules/pathval/package.json create mode 100644 node_modules/pathval/pathval.js create mode 100644 node_modules/propagate/.eslintignore create mode 100644 node_modules/propagate/.eslintrc.yml create mode 100644 node_modules/propagate/.prettierignore create mode 100644 node_modules/propagate/.prettierrc.yml create mode 100644 node_modules/propagate/.travis.yml create mode 100644 node_modules/propagate/LICENSE.md create mode 100644 node_modules/propagate/README.md create mode 100644 node_modules/propagate/index.js create mode 100644 node_modules/propagate/package.json create mode 100644 node_modules/propagate/tests/index.js create mode 100644 node_modules/pump/.travis.yml create mode 100644 node_modules/pump/LICENSE create mode 100644 node_modules/pump/README.md create mode 100644 node_modules/pump/index.js create mode 100644 node_modules/pump/package.json create mode 100644 node_modules/pump/test-browser.js create mode 100644 node_modules/pump/test-node.js create mode 100644 node_modules/shebang-command/index.js create mode 100644 node_modules/shebang-command/license create mode 100644 node_modules/shebang-command/package.json create mode 100644 node_modules/shebang-command/readme.md create mode 100644 node_modules/shebang-regex/index.js create mode 100644 node_modules/shebang-regex/license create mode 100644 node_modules/shebang-regex/package.json create mode 100644 node_modules/shebang-regex/readme.md 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/strip-eof/index.js create mode 100644 node_modules/strip-eof/license create mode 100644 node_modules/strip-eof/package.json create mode 100644 node_modules/strip-eof/readme.md create mode 100644 node_modules/type-detect/LICENSE create mode 100644 node_modules/type-detect/README.md create mode 100644 node_modules/type-detect/index.js create mode 100644 node_modules/type-detect/package.json create mode 100644 node_modules/type-detect/type-detect.js create mode 100644 node_modules/universal-user-agent/.travis.yml create mode 100644 node_modules/universal-user-agent/LICENSE.md create mode 100644 node_modules/universal-user-agent/README.md create mode 100644 node_modules/universal-user-agent/browser.js create mode 100644 node_modules/universal-user-agent/cypress.json create mode 100644 node_modules/universal-user-agent/index.d.ts create mode 100644 node_modules/universal-user-agent/index.js create mode 100644 node_modules/universal-user-agent/package.json create mode 100644 node_modules/universal-user-agent/test/smoke-test.js create mode 100644 node_modules/which/CHANGELOG.md create mode 100644 node_modules/which/LICENSE create mode 100644 node_modules/which/README.md create mode 100755 node_modules/which/bin/which create mode 100644 node_modules/which/package.json create mode 100644 node_modules/which/which.js create mode 100644 node_modules/windows-release/index.d.ts create mode 100644 node_modules/windows-release/index.js create mode 100644 node_modules/windows-release/license create mode 100644 node_modules/windows-release/package.json create mode 100644 node_modules/windows-release/readme.md 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 diff --git a/.gitignore b/.gitignore index 5e3b3791..1531f18a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ __tests__/runner/* # comment out in distribution branches -node_modules/ +#node_modules/ # Rest pulled from https://github.com/github/gitignore/blob/master/Node.gitignore # Logs diff --git a/README.md b/README.md index 02710ace..55041cd3 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - name: "Assign Team and Persons" - uses: rowi1de/auto-assign-review-teams@v0.0.3 + uses: rowi1de/auto-assign-review-teams@v0.0.4 with: repo-token: ${{ secrets.GITHUB_TOKEN }} teams: "gitub-org-team" # only works for GitHub Organisation/Teams diff --git a/node_modules/.bin/mkdirp b/node_modules/.bin/mkdirp new file mode 120000 index 00000000..017896ce --- /dev/null +++ b/node_modules/.bin/mkdirp @@ -0,0 +1 @@ +../mkdirp/bin/cmd.js \ No newline at end of file diff --git a/node_modules/.bin/which b/node_modules/.bin/which new file mode 120000 index 00000000..f62471c8 --- /dev/null +++ b/node_modules/.bin/which @@ -0,0 +1 @@ +../which/bin/which \ No newline at end of file diff --git a/node_modules/@actions/core/README.md b/node_modules/@actions/core/README.md new file mode 100644 index 00000000..457f73cc --- /dev/null +++ b/node_modules/@actions/core/README.md @@ -0,0 +1,140 @@ +# `@actions/core` + +> Core functions for setting results, logging, registering secrets and exporting variables across actions + +## Usage + +### Import the package + +```js +// javascript +const core = require('@actions/core'); + +// typescript +import * as core from '@actions/core'; +``` + +#### Inputs/Outputs + +Action inputs can be read with `getInput`. Outputs can be set with `setOutput` which makes them available to be mapped into inputs of other actions to ensure they are decoupled. + +```js +const myInput = core.getInput('inputName', { required: true }); + +core.setOutput('outputKey', 'outputVal'); +``` + +#### Exporting variables + +Since each step runs in a separate process, you can use `exportVariable` to add it to this step and future steps environment blocks. + +```js +core.exportVariable('envVar', 'Val'); +``` + +#### Setting a secret + +Setting a secret registers the secret with the runner to ensure it is masked in logs. + +```js +core.setSecret('myPassword'); +``` + +#### PATH Manipulation + +To make a tool's path available in the path for the remainder of the job (without altering the machine or containers state), use `addPath`. The runner will prepend the path given to the jobs PATH. + +```js +core.addPath('/path/to/mytool'); +``` + +#### Exit codes + +You should use this library to set the failing exit code for your action. If status is not set and the script runs to completion, that will lead to a success. + +```js +const core = require('@actions/core'); + +try { + // Do stuff +} +catch (err) { + // setFailed logs the message and sets a failing exit code + core.setFailed(`Action failed with error ${err}`); +} + +Note that `setNeutral` is not yet implemented in actions V2 but equivalent functionality is being planned. + +``` + +#### Logging + +Finally, this library provides some utilities for logging. Note that debug logging is hidden from the logs by default. This behavior can be toggled by enabling the [Step Debug Logs](../../docs/action-debugging.md#step-debug-logs). + +```js +const core = require('@actions/core'); + +const myInput = core.getInput('input'); +try { + core.debug('Inside try block'); + + if (!myInput) { + core.warning('myInput was not set'); + } + + // Do stuff +} +catch (err) { + core.error(`Error ${err}, action may still succeed though`); +} +``` + +This library can also wrap chunks of output in foldable groups. + +```js +const core = require('@actions/core') + +// Manually wrap output +core.startGroup('Do some function') +doSomeFunction() +core.endGroup() + +// Wrap an asynchronous function call +const result = await core.group('Do something async', async () => { + const response = await doSomeHTTPRequest() + return response +}) +``` + +#### Action state + +You can use this library to save state and get state for sharing information between a given wrapper action: + +**action.yml** +```yaml +name: 'Wrapper action sample' +inputs: + name: + default: 'GitHub' +runs: + using: 'node12' + main: 'main.js' + post: 'cleanup.js' +``` + +In action's `main.js`: + +```js +const core = require('@actions/core'); + +core.saveState("pidToKill", 12345); +``` + +In action's `cleanup.js`: +```js +const core = require('@actions/core'); + +var pid = core.getState("pidToKill"); + +process.kill(pid); +``` \ No newline at end of file diff --git a/node_modules/@actions/core/lib/command.d.ts b/node_modules/@actions/core/lib/command.d.ts new file mode 100644 index 00000000..7f6fecbe --- /dev/null +++ b/node_modules/@actions/core/lib/command.d.ts @@ -0,0 +1,16 @@ +interface CommandProperties { + [key: string]: string; +} +/** + * Commands + * + * Command Format: + * ##[name key=value;key=value]message + * + * Examples: + * ##[warning]This is the user warning message + * ##[set-secret name=mypassword]definitelyNotAPassword! + */ +export declare function issueCommand(command: string, properties: CommandProperties, message: string): void; +export declare function issue(name: string, message?: string): void; +export {}; diff --git a/node_modules/@actions/core/lib/command.js b/node_modules/@actions/core/lib/command.js new file mode 100644 index 00000000..b0ea009a --- /dev/null +++ b/node_modules/@actions/core/lib/command.js @@ -0,0 +1,66 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const os = require("os"); +/** + * Commands + * + * Command Format: + * ##[name key=value;key=value]message + * + * Examples: + * ##[warning]This is the user warning message + * ##[set-secret name=mypassword]definitelyNotAPassword! + */ +function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os.EOL); +} +exports.issueCommand = issueCommand; +function issue(name, message = '') { + issueCommand(name, {}, message); +} +exports.issue = issue; +const CMD_STRING = '::'; +class Command { + constructor(command, properties, message) { + if (!command) { + command = 'missing.command'; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += ' '; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + // safely append the val - avoid blowing up when attempting to + // call .replace() if message is not a string for some reason + cmdStr += `${key}=${escape(`${val || ''}`)},`; + } + } + } + } + cmdStr += CMD_STRING; + // safely append the message - avoid blowing up when attempting to + // call .replace() if message is not a string for some reason + const message = `${this.message || ''}`; + cmdStr += escapeData(message); + return cmdStr; + } +} +function escapeData(s) { + return s.replace(/\r/g, '%0D').replace(/\n/g, '%0A'); +} +function escape(s) { + return s + .replace(/\r/g, '%0D') + .replace(/\n/g, '%0A') + .replace(/]/g, '%5D') + .replace(/;/g, '%3B'); +} +//# sourceMappingURL=command.js.map \ No newline at end of file diff --git a/node_modules/@actions/core/lib/command.js.map b/node_modules/@actions/core/lib/command.js.map new file mode 100644 index 00000000..918ab25b --- /dev/null +++ b/node_modules/@actions/core/lib/command.js.map @@ -0,0 +1 @@ +{"version":3,"file":"command.js","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":";;AAAA,yBAAwB;AAQxB;;;;;;;;;GASG;AACH,SAAgB,YAAY,CAC1B,OAAe,EACf,UAA6B,EAC7B,OAAe;IAEf,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAA;IACrD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAA;AAC/C,CAAC;AAPD,oCAOC;AAED,SAAgB,KAAK,CAAC,IAAY,EAAE,UAAkB,EAAE;IACtD,YAAY,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,CAAA;AACjC,CAAC;AAFD,sBAEC;AAED,MAAM,UAAU,GAAG,IAAI,CAAA;AAEvB,MAAM,OAAO;IAKX,YAAY,OAAe,EAAE,UAA6B,EAAE,OAAe;QACzE,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,iBAAiB,CAAA;SAC5B;QAED,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;IAED,QAAQ;QACN,IAAI,MAAM,GAAG,UAAU,GAAG,IAAI,CAAC,OAAO,CAAA;QAEtC,IAAI,IAAI,CAAC,UAAU,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;YAC9D,MAAM,IAAI,GAAG,CAAA;YACb,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,UAAU,EAAE;gBACjC,IAAI,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;oBACvC,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;oBAChC,IAAI,GAAG,EAAE;wBACP,8DAA8D;wBAC9D,6DAA6D;wBAC7D,MAAM,IAAI,GAAG,GAAG,IAAI,MAAM,CAAC,GAAG,GAAG,IAAI,EAAE,EAAE,CAAC,GAAG,CAAA;qBAC9C;iBACF;aACF;SACF;QAED,MAAM,IAAI,UAAU,CAAA;QAEpB,kEAAkE;QAClE,6DAA6D;QAC7D,MAAM,OAAO,GAAG,GAAG,IAAI,CAAC,OAAO,IAAI,EAAE,EAAE,CAAA;QACvC,MAAM,IAAI,UAAU,CAAC,OAAO,CAAC,CAAA;QAE7B,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAED,SAAS,UAAU,CAAC,CAAS;IAC3B,OAAO,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;AACtD,CAAC;AAED,SAAS,MAAM,CAAC,CAAS;IACvB,OAAO,CAAC;SACL,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;AACzB,CAAC"} \ No newline at end of file diff --git a/node_modules/@actions/core/lib/core.d.ts b/node_modules/@actions/core/lib/core.d.ts new file mode 100644 index 00000000..6483c3ca --- /dev/null +++ b/node_modules/@actions/core/lib/core.d.ts @@ -0,0 +1,112 @@ +/** + * Interface for getInput options + */ +export interface InputOptions { + /** Optional. Whether the input is required. If required and not present, will throw. Defaults to false */ + required?: boolean; +} +/** + * The code to exit an action + */ +export declare enum ExitCode { + /** + * A code indicating that the action was successful + */ + Success = 0, + /** + * A code indicating that the action was a failure + */ + Failure = 1 +} +/** + * Sets env variable for this action and future actions in the job + * @param name the name of the variable to set + * @param val the value of the variable + */ +export declare function exportVariable(name: string, val: string): void; +/** + * Registers a secret which will get masked from logs + * @param secret value of the secret + */ +export declare function setSecret(secret: string): void; +/** + * Prepends inputPath to the PATH (for this action and future actions) + * @param inputPath + */ +export declare function addPath(inputPath: string): void; +/** + * Gets the value of an input. The value is also trimmed. + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns string + */ +export declare function getInput(name: string, options?: InputOptions): string; +/** + * Sets the value of an output. + * + * @param name name of the output to set + * @param value value to store + */ +export declare function setOutput(name: string, value: string): void; +/** + * Sets the action status to failed. + * When the action exits it will be with an exit code of 1 + * @param message add error issue message + */ +export declare function setFailed(message: string): void; +/** + * Writes debug message to user log + * @param message debug message + */ +export declare function debug(message: string): void; +/** + * Adds an error issue + * @param message error issue message + */ +export declare function error(message: string): void; +/** + * Adds an warning issue + * @param message warning issue message + */ +export declare function warning(message: string): void; +/** + * Writes info to log with console.log. + * @param message info message + */ +export declare function info(message: string): void; +/** + * Begin an output group. + * + * Output until the next `groupEnd` will be foldable in this group + * + * @param name The name of the output group + */ +export declare function startGroup(name: string): void; +/** + * End an output group. + */ +export declare function endGroup(): void; +/** + * Wrap an asynchronous function call in a group. + * + * Returns the same type as the function itself. + * + * @param name The name of the group + * @param fn The function to wrap in the group + */ +export declare function group(name: string, fn: () => Promise): Promise; +/** + * Saves state for current action, the state can only be retrieved by this action's post job execution. + * + * @param name name of the state to store + * @param value value to store + */ +export declare function saveState(name: string, value: string): void; +/** + * Gets the value of an state set by this action's main execution. + * + * @param name name of the state to get + * @returns string + */ +export declare function getState(name: string): string; diff --git a/node_modules/@actions/core/lib/core.js b/node_modules/@actions/core/lib/core.js new file mode 100644 index 00000000..f43d507b --- /dev/null +++ b/node_modules/@actions/core/lib/core.js @@ -0,0 +1,195 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const command_1 = require("./command"); +const os = require("os"); +const path = require("path"); +/** + * The code to exit an action + */ +var ExitCode; +(function (ExitCode) { + /** + * A code indicating that the action was successful + */ + ExitCode[ExitCode["Success"] = 0] = "Success"; + /** + * A code indicating that the action was a failure + */ + ExitCode[ExitCode["Failure"] = 1] = "Failure"; +})(ExitCode = exports.ExitCode || (exports.ExitCode = {})); +//----------------------------------------------------------------------- +// Variables +//----------------------------------------------------------------------- +/** + * Sets env variable for this action and future actions in the job + * @param name the name of the variable to set + * @param val the value of the variable + */ +function exportVariable(name, val) { + process.env[name] = val; + command_1.issueCommand('set-env', { name }, val); +} +exports.exportVariable = exportVariable; +/** + * Registers a secret which will get masked from logs + * @param secret value of the secret + */ +function setSecret(secret) { + command_1.issueCommand('add-mask', {}, secret); +} +exports.setSecret = setSecret; +/** + * Prepends inputPath to the PATH (for this action and future actions) + * @param inputPath + */ +function addPath(inputPath) { + command_1.issueCommand('add-path', {}, inputPath); + process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; +} +exports.addPath = addPath; +/** + * Gets the value of an input. The value is also trimmed. + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns string + */ +function getInput(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || ''; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + return val.trim(); +} +exports.getInput = getInput; +/** + * Sets the value of an output. + * + * @param name name of the output to set + * @param value value to store + */ +function setOutput(name, value) { + command_1.issueCommand('set-output', { name }, value); +} +exports.setOutput = setOutput; +//----------------------------------------------------------------------- +// Results +//----------------------------------------------------------------------- +/** + * Sets the action status to failed. + * When the action exits it will be with an exit code of 1 + * @param message add error issue message + */ +function setFailed(message) { + process.exitCode = ExitCode.Failure; + error(message); +} +exports.setFailed = setFailed; +//----------------------------------------------------------------------- +// Logging Commands +//----------------------------------------------------------------------- +/** + * Writes debug message to user log + * @param message debug message + */ +function debug(message) { + command_1.issueCommand('debug', {}, message); +} +exports.debug = debug; +/** + * Adds an error issue + * @param message error issue message + */ +function error(message) { + command_1.issue('error', message); +} +exports.error = error; +/** + * Adds an warning issue + * @param message warning issue message + */ +function warning(message) { + command_1.issue('warning', message); +} +exports.warning = warning; +/** + * Writes info to log with console.log. + * @param message info message + */ +function info(message) { + process.stdout.write(message + os.EOL); +} +exports.info = info; +/** + * Begin an output group. + * + * Output until the next `groupEnd` will be foldable in this group + * + * @param name The name of the output group + */ +function startGroup(name) { + command_1.issue('group', name); +} +exports.startGroup = startGroup; +/** + * End an output group. + */ +function endGroup() { + command_1.issue('endgroup'); +} +exports.endGroup = endGroup; +/** + * Wrap an asynchronous function call in a group. + * + * Returns the same type as the function itself. + * + * @param name The name of the group + * @param fn The function to wrap in the group + */ +function group(name, fn) { + return __awaiter(this, void 0, void 0, function* () { + startGroup(name); + let result; + try { + result = yield fn(); + } + finally { + endGroup(); + } + return result; + }); +} +exports.group = group; +//----------------------------------------------------------------------- +// Wrapper action state +//----------------------------------------------------------------------- +/** + * Saves state for current action, the state can only be retrieved by this action's post job execution. + * + * @param name name of the state to store + * @param value value to store + */ +function saveState(name, value) { + command_1.issueCommand('save-state', { name }, value); +} +exports.saveState = saveState; +/** + * Gets the value of an state set by this action's main execution. + * + * @param name name of the state to get + * @returns string + */ +function getState(name) { + return process.env[`STATE_${name}`] || ''; +} +exports.getState = getState; +//# sourceMappingURL=core.js.map \ No newline at end of file diff --git a/node_modules/@actions/core/lib/core.js.map b/node_modules/@actions/core/lib/core.js.map new file mode 100644 index 00000000..6eda8daa --- /dev/null +++ b/node_modules/@actions/core/lib/core.js.map @@ -0,0 +1 @@ +{"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,uCAA6C;AAE7C,yBAAwB;AACxB,6BAA4B;AAU5B;;GAEG;AACH,IAAY,QAUX;AAVD,WAAY,QAAQ;IAClB;;OAEG;IACH,6CAAW,CAAA;IAEX;;OAEG;IACH,6CAAW,CAAA;AACb,CAAC,EAVW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAUnB;AAED,yEAAyE;AACzE,YAAY;AACZ,yEAAyE;AAEzE;;;;GAIG;AACH,SAAgB,cAAc,CAAC,IAAY,EAAE,GAAW;IACtD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,CAAA;IACvB,sBAAY,CAAC,SAAS,EAAE,EAAC,IAAI,EAAC,EAAE,GAAG,CAAC,CAAA;AACtC,CAAC;AAHD,wCAGC;AAED;;;GAGG;AACH,SAAgB,SAAS,CAAC,MAAc;IACtC,sBAAY,CAAC,UAAU,EAAE,EAAE,EAAE,MAAM,CAAC,CAAA;AACtC,CAAC;AAFD,8BAEC;AAED;;;GAGG;AACH,SAAgB,OAAO,CAAC,SAAiB;IACvC,sBAAY,CAAC,UAAU,EAAE,EAAE,EAAE,SAAS,CAAC,CAAA;IACvC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,SAAS,GAAG,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAA;AAC7E,CAAC;AAHD,0BAGC;AAED;;;;;;GAMG;AACH,SAAgB,QAAQ,CAAC,IAAY,EAAE,OAAsB;IAC3D,MAAM,GAAG,GACP,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,IAAI,EAAE,CAAA;IACrE,IAAI,OAAO,IAAI,OAAO,CAAC,QAAQ,IAAI,CAAC,GAAG,EAAE;QACvC,MAAM,IAAI,KAAK,CAAC,oCAAoC,IAAI,EAAE,CAAC,CAAA;KAC5D;IAED,OAAO,GAAG,CAAC,IAAI,EAAE,CAAA;AACnB,CAAC;AARD,4BAQC;AAED;;;;;GAKG;AACH,SAAgB,SAAS,CAAC,IAAY,EAAE,KAAa;IACnD,sBAAY,CAAC,YAAY,EAAE,EAAC,IAAI,EAAC,EAAE,KAAK,CAAC,CAAA;AAC3C,CAAC;AAFD,8BAEC;AAED,yEAAyE;AACzE,UAAU;AACV,yEAAyE;AAEzE;;;;GAIG;AACH,SAAgB,SAAS,CAAC,OAAe;IACvC,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAA;IACnC,KAAK,CAAC,OAAO,CAAC,CAAA;AAChB,CAAC;AAHD,8BAGC;AAED,yEAAyE;AACzE,mBAAmB;AACnB,yEAAyE;AAEzE;;;GAGG;AACH,SAAgB,KAAK,CAAC,OAAe;IACnC,sBAAY,CAAC,OAAO,EAAE,EAAE,EAAE,OAAO,CAAC,CAAA;AACpC,CAAC;AAFD,sBAEC;AAED;;;GAGG;AACH,SAAgB,KAAK,CAAC,OAAe;IACnC,eAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;AACzB,CAAC;AAFD,sBAEC;AAED;;;GAGG;AACH,SAAgB,OAAO,CAAC,OAAe;IACrC,eAAK,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;AAC3B,CAAC;AAFD,0BAEC;AAED;;;GAGG;AACH,SAAgB,IAAI,CAAC,OAAe;IAClC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,GAAG,CAAC,CAAA;AACxC,CAAC;AAFD,oBAEC;AAED;;;;;;GAMG;AACH,SAAgB,UAAU,CAAC,IAAY;IACrC,eAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;AACtB,CAAC;AAFD,gCAEC;AAED;;GAEG;AACH,SAAgB,QAAQ;IACtB,eAAK,CAAC,UAAU,CAAC,CAAA;AACnB,CAAC;AAFD,4BAEC;AAED;;;;;;;GAOG;AACH,SAAsB,KAAK,CAAI,IAAY,EAAE,EAAoB;;QAC/D,UAAU,CAAC,IAAI,CAAC,CAAA;QAEhB,IAAI,MAAS,CAAA;QAEb,IAAI;YACF,MAAM,GAAG,MAAM,EAAE,EAAE,CAAA;SACpB;gBAAS;YACR,QAAQ,EAAE,CAAA;SACX;QAED,OAAO,MAAM,CAAA;IACf,CAAC;CAAA;AAZD,sBAYC;AAED,yEAAyE;AACzE,uBAAuB;AACvB,yEAAyE;AAEzE;;;;;GAKG;AACH,SAAgB,SAAS,CAAC,IAAY,EAAE,KAAa;IACnD,sBAAY,CAAC,YAAY,EAAE,EAAC,IAAI,EAAC,EAAE,KAAK,CAAC,CAAA;AAC3C,CAAC;AAFD,8BAEC;AAED;;;;;GAKG;AACH,SAAgB,QAAQ,CAAC,IAAY;IACnC,OAAO,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,IAAI,EAAE,CAAA;AAC3C,CAAC;AAFD,4BAEC"} \ No newline at end of file diff --git a/node_modules/@actions/core/package.json b/node_modules/@actions/core/package.json new file mode 100644 index 00000000..add7b178 --- /dev/null +++ b/node_modules/@actions/core/package.json @@ -0,0 +1,67 @@ +{ + "_args": [ + [ + "@actions/core@1.2.0", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "@actions/core@1.2.0", + "_id": "@actions/core@1.2.0", + "_inBundle": false, + "_integrity": "sha512-ZKdyhlSlyz38S6YFfPnyNgCDZuAF2T0Qv5eHflNWytPS8Qjvz39bZFMry9Bb/dpSnqWcNeav5yM2CTYpJeY+Dw==", + "_location": "/@actions/core", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@actions/core@1.2.0", + "name": "@actions/core", + "escapedName": "@actions%2fcore", + "scope": "@actions", + "rawSpec": "1.2.0", + "saveSpec": null, + "fetchSpec": "1.2.0" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.0.tgz", + "_spec": "1.2.0", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "bugs": { + "url": "https://github.com/actions/toolkit/issues" + }, + "description": "Actions core lib", + "devDependencies": { + "@types/node": "^12.0.2" + }, + "directories": { + "lib": "lib", + "test": "__tests__" + }, + "files": [ + "lib" + ], + "homepage": "https://github.com/actions/toolkit/tree/master/packages/core", + "keywords": [ + "github", + "actions", + "core" + ], + "license": "MIT", + "main": "lib/core.js", + "name": "@actions/core", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/actions/toolkit.git", + "directory": "packages/core" + }, + "scripts": { + "test": "echo \"Error: run tests from root\" && exit 1", + "tsc": "tsc" + }, + "version": "1.2.0" +} diff --git a/node_modules/@actions/github/LICENSE.md b/node_modules/@actions/github/LICENSE.md new file mode 100644 index 00000000..e5a73f40 --- /dev/null +++ b/node_modules/@actions/github/LICENSE.md @@ -0,0 +1,7 @@ +Copyright 2019 GitHub + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@actions/github/README.md b/node_modules/@actions/github/README.md new file mode 100644 index 00000000..b4312568 --- /dev/null +++ b/node_modules/@actions/github/README.md @@ -0,0 +1,50 @@ +# `@actions/github` + +> A hydrated Octokit client. + +## Usage + +Returns an Octokit client. See https://octokit.github.io/rest.js for the API. + +```js +const github = require('@actions/github'); +const core = require('@actions/core'); + +// This should be a token with access to your repository scoped in as a secret. +const myToken = core.getInput('myToken'); + +const octokit = new github.GitHub(myToken); + +const { data: pullRequest } = await octokit.pulls.get({ + owner: 'octokit', + repo: 'rest.js', + pull_number: 123, + mediaType: { + format: 'diff' + } +}); + +console.log(pullRequest); +``` + +You can pass client options (except `auth`, which is handled by the token argument), as specified by [Octokit](https://octokit.github.io/rest.js/), as a second argument to the `GitHub` constructor. + +You can also make GraphQL requests. See https://github.com/octokit/graphql.js for the API. + +```js +const result = await octokit.graphql(query, variables); +``` + +Finally, you can get the context of the current action: + +```js +const github = require('@actions/github'); + +const context = github.context; + +const newIssue = await octokit.issues.create({ + ...context.repo, + title: 'New issue!', + body: 'Hello Universe!' +}); +``` diff --git a/node_modules/@actions/github/lib/context.d.ts b/node_modules/@actions/github/lib/context.d.ts new file mode 100644 index 00000000..3ee75833 --- /dev/null +++ b/node_modules/@actions/github/lib/context.d.ts @@ -0,0 +1,26 @@ +import { WebhookPayload } from './interfaces'; +export declare class Context { + /** + * Webhook payload object that triggered the workflow + */ + payload: WebhookPayload; + eventName: string; + sha: string; + ref: string; + workflow: string; + action: string; + actor: string; + /** + * Hydrate the context from the environment + */ + constructor(); + readonly issue: { + owner: string; + repo: string; + number: number; + }; + readonly repo: { + owner: string; + repo: string; + }; +} diff --git a/node_modules/@actions/github/lib/context.js b/node_modules/@actions/github/lib/context.js new file mode 100644 index 00000000..0df128f7 --- /dev/null +++ b/node_modules/@actions/github/lib/context.js @@ -0,0 +1,45 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const fs_1 = require("fs"); +const os_1 = require("os"); +class Context { + /** + * Hydrate the context from the environment + */ + constructor() { + this.payload = {}; + if (process.env.GITHUB_EVENT_PATH) { + if (fs_1.existsSync(process.env.GITHUB_EVENT_PATH)) { + this.payload = JSON.parse(fs_1.readFileSync(process.env.GITHUB_EVENT_PATH, { encoding: 'utf8' })); + } + else { + process.stdout.write(`GITHUB_EVENT_PATH ${process.env.GITHUB_EVENT_PATH} does not exist${os_1.EOL}`); + } + } + this.eventName = process.env.GITHUB_EVENT_NAME; + this.sha = process.env.GITHUB_SHA; + this.ref = process.env.GITHUB_REF; + this.workflow = process.env.GITHUB_WORKFLOW; + this.action = process.env.GITHUB_ACTION; + this.actor = process.env.GITHUB_ACTOR; + } + get issue() { + const payload = this.payload; + return Object.assign(Object.assign({}, this.repo), { number: (payload.issue || payload.pullRequest || payload).number }); + } + get repo() { + if (process.env.GITHUB_REPOSITORY) { + const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/'); + return { owner, repo }; + } + if (this.payload.repository) { + return { + owner: this.payload.repository.owner.login, + repo: this.payload.repository.name + }; + } + throw new Error("context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'"); + } +} +exports.Context = Context; +//# sourceMappingURL=context.js.map \ No newline at end of file diff --git a/node_modules/@actions/github/lib/context.js.map b/node_modules/@actions/github/lib/context.js.map new file mode 100644 index 00000000..24eabd87 --- /dev/null +++ b/node_modules/@actions/github/lib/context.js.map @@ -0,0 +1 @@ +{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":";;AAEA,2BAA2C;AAC3C,2BAAsB;AAEtB,MAAa,OAAO;IAalB;;OAEG;IACH;QACE,IAAI,CAAC,OAAO,GAAG,EAAE,CAAA;QACjB,IAAI,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE;YACjC,IAAI,eAAU,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE;gBAC7C,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CACvB,iBAAY,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,EAAC,QAAQ,EAAE,MAAM,EAAC,CAAC,CAChE,CAAA;aACF;iBAAM;gBACL,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,qBACE,OAAO,CAAC,GAAG,CAAC,iBACd,kBAAkB,QAAG,EAAE,CACxB,CAAA;aACF;SACF;QACD,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,iBAA2B,CAAA;QACxD,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,UAAoB,CAAA;QAC3C,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,UAAoB,CAAA;QAC3C,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,eAAyB,CAAA;QACrD,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,aAAuB,CAAA;QACjD,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,YAAsB,CAAA;IACjD,CAAC;IAED,IAAI,KAAK;QACP,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;QAE5B,uCACK,IAAI,CAAC,IAAI,KACZ,MAAM,EAAE,CAAC,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,WAAW,IAAI,OAAO,CAAC,CAAC,MAAM,IACjE;IACH,CAAC;IAED,IAAI,IAAI;QACN,IAAI,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE;YACjC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;YAC9D,OAAO,EAAC,KAAK,EAAE,IAAI,EAAC,CAAA;SACrB;QAED,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YAC3B,OAAO;gBACL,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK;gBAC1C,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI;aACnC,CAAA;SACF;QAED,MAAM,IAAI,KAAK,CACb,kFAAkF,CACnF,CAAA;IACH,CAAC;CACF;AAjED,0BAiEC"} \ No newline at end of file diff --git a/node_modules/@actions/github/lib/github.d.ts b/node_modules/@actions/github/lib/github.d.ts new file mode 100644 index 00000000..7c5b9f2b --- /dev/null +++ b/node_modules/@actions/github/lib/github.d.ts @@ -0,0 +1,8 @@ +import { GraphQlQueryResponse, Variables } from '@octokit/graphql'; +import Octokit from '@octokit/rest'; +import * as Context from './context'; +export declare const context: Context.Context; +export declare class GitHub extends Octokit { + graphql: (query: string, variables?: Variables) => Promise; + constructor(token: string, opts?: Omit); +} diff --git a/node_modules/@actions/github/lib/github.js b/node_modules/@actions/github/lib/github.js new file mode 100644 index 00000000..d5c782f6 --- /dev/null +++ b/node_modules/@actions/github/lib/github.js @@ -0,0 +1,29 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +// Originally pulled from https://github.com/JasonEtco/actions-toolkit/blob/master/src/github.ts +const graphql_1 = require("@octokit/graphql"); +const rest_1 = __importDefault(require("@octokit/rest")); +const Context = __importStar(require("./context")); +// We need this in order to extend Octokit +rest_1.default.prototype = new rest_1.default(); +exports.context = new Context.Context(); +class GitHub extends rest_1.default { + constructor(token, opts = {}) { + super(Object.assign(Object.assign({}, opts), { auth: `token ${token}` })); + this.graphql = graphql_1.defaults({ + headers: { authorization: `token ${token}` } + }); + } +} +exports.GitHub = GitHub; +//# sourceMappingURL=github.js.map \ No newline at end of file diff --git a/node_modules/@actions/github/lib/github.js.map b/node_modules/@actions/github/lib/github.js.map new file mode 100644 index 00000000..0c268e8c --- /dev/null +++ b/node_modules/@actions/github/lib/github.js.map @@ -0,0 +1 @@ +{"version":3,"file":"github.js","sourceRoot":"","sources":["../src/github.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gGAAgG;AAChG,8CAA0E;AAC1E,yDAAmC;AACnC,mDAAoC;AAEpC,0CAA0C;AAC1C,cAAO,CAAC,SAAS,GAAG,IAAI,cAAO,EAAE,CAAA;AAEpB,QAAA,OAAO,GAAG,IAAI,OAAO,CAAC,OAAO,EAAE,CAAA;AAE5C,MAAa,MAAO,SAAQ,cAAO;IAMjC,YAAY,KAAa,EAAE,OAAsC,EAAE;QACjE,KAAK,iCAAK,IAAI,KAAE,IAAI,EAAE,SAAS,KAAK,EAAE,IAAE,CAAA;QACxC,IAAI,CAAC,OAAO,GAAG,kBAAQ,CAAC;YACtB,OAAO,EAAE,EAAC,aAAa,EAAE,SAAS,KAAK,EAAE,EAAC;SAC3C,CAAC,CAAA;IACJ,CAAC;CACF;AAZD,wBAYC"} \ No newline at end of file diff --git a/node_modules/@actions/github/lib/interfaces.d.ts b/node_modules/@actions/github/lib/interfaces.d.ts new file mode 100644 index 00000000..23788cce --- /dev/null +++ b/node_modules/@actions/github/lib/interfaces.d.ts @@ -0,0 +1,36 @@ +export interface PayloadRepository { + [key: string]: any; + full_name?: string; + name: string; + owner: { + [key: string]: any; + login: string; + name?: string; + }; + html_url?: string; +} +export interface WebhookPayload { + [key: string]: any; + repository?: PayloadRepository; + issue?: { + [key: string]: any; + number: number; + html_url?: string; + body?: string; + }; + pull_request?: { + [key: string]: any; + number: number; + html_url?: string; + body?: string; + }; + sender?: { + [key: string]: any; + type: string; + }; + action?: string; + installation?: { + id: number; + [key: string]: any; + }; +} diff --git a/node_modules/@actions/github/lib/interfaces.js b/node_modules/@actions/github/lib/interfaces.js new file mode 100644 index 00000000..a660b5e3 --- /dev/null +++ b/node_modules/@actions/github/lib/interfaces.js @@ -0,0 +1,4 @@ +"use strict"; +/* eslint-disable @typescript-eslint/no-explicit-any */ +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interfaces.js.map \ No newline at end of file diff --git a/node_modules/@actions/github/lib/interfaces.js.map b/node_modules/@actions/github/lib/interfaces.js.map new file mode 100644 index 00000000..dc2c9609 --- /dev/null +++ b/node_modules/@actions/github/lib/interfaces.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";AAAA,uDAAuD"} \ No newline at end of file diff --git a/node_modules/@actions/github/package.json b/node_modules/@actions/github/package.json new file mode 100644 index 00000000..f0fad2d3 --- /dev/null +++ b/node_modules/@actions/github/package.json @@ -0,0 +1,71 @@ +{ + "_args": [ + [ + "@actions/github@1.1.0", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "@actions/github@1.1.0", + "_id": "@actions/github@1.1.0", + "_inBundle": false, + "_integrity": "sha512-cHf6PyoNMdei13jEdGPhKprIMFmjVVW/dnM5/9QmQDJ1ZTaGVyezUSCUIC/ySNLRvDUpeFwPYMdThSEJldSbUw==", + "_location": "/@actions/github", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@actions/github@1.1.0", + "name": "@actions/github", + "escapedName": "@actions%2fgithub", + "scope": "@actions", + "rawSpec": "1.1.0", + "saveSpec": null, + "fetchSpec": "1.1.0" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/@actions/github/-/github-1.1.0.tgz", + "_spec": "1.1.0", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "bugs": { + "url": "https://github.com/actions/toolkit/issues" + }, + "dependencies": { + "@octokit/graphql": "^2.0.1", + "@octokit/rest": "^16.15.0" + }, + "description": "Actions github lib", + "devDependencies": { + "jest": "^24.7.1" + }, + "directories": { + "lib": "lib", + "test": "__tests__" + }, + "files": [ + "lib" + ], + "gitHead": "a2ab4bcf78e4f7080f0d45856e6eeba16f0bbc52", + "homepage": "https://github.com/actions/toolkit/tree/master/packages/github", + "keywords": [ + "github", + "actions" + ], + "license": "MIT", + "main": "lib/github.js", + "name": "@actions/github", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/actions/toolkit.git" + }, + "scripts": { + "build": "tsc", + "test": "jest", + "tsc": "tsc" + }, + "version": "1.1.0" +} diff --git a/node_modules/@octokit/endpoint/LICENSE b/node_modules/@octokit/endpoint/LICENSE new file mode 100644 index 00000000..af5366d0 --- /dev/null +++ b/node_modules/@octokit/endpoint/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2018 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/@octokit/endpoint/README.md b/node_modules/@octokit/endpoint/README.md new file mode 100644 index 00000000..5ac84297 --- /dev/null +++ b/node_modules/@octokit/endpoint/README.md @@ -0,0 +1,421 @@ +# endpoint.js + +> Turns GitHub REST API endpoints into generic request options + +[![@latest](https://img.shields.io/npm/v/@octokit/endpoint.svg)](https://www.npmjs.com/package/@octokit/endpoint) +![Build Status](https://github.com/octokit/endpoint.js/workflows/Test/badge.svg) +[![Greenkeeper](https://badges.greenkeeper.io/octokit/endpoint.js.svg)](https://greenkeeper.io/) + +`@octokit/endpoint` combines [GitHub REST API routes](https://developer.github.com/v3/) with your parameters and turns them into generic request options that can be used in any request library. + + + + +- [Usage](#usage) +- [API](#api) + - [endpoint()](#endpointroute-options-or-endpointoptions) + - [endpoint.defaults()](#endpointdefaults) + - [endpoint.DEFAULTS](#endpointdefaults-1) + - [endpoint.merge()](#endpointmergeroute-options-or-endpointmergeoptions) + - [endpoint.parse()](#endpointparse) +- [Special cases](#special-cases) + - [The `data` parameter – set request body directly](#the-data-parameter--set-request-body-directly) + - [Set parameters for both the URL/query and the request body](#set-parameters-for-both-the-urlquery-and-the-request-body) +- [LICENSE](#license) + + + +## Usage + + + + + + +
+Browsers + +Load @octokit/endpoint directly from cdn.pika.dev + +```html + +``` + +
+Node + + +Install with npm install @octokit/endpoint + +```js +const { endpoint } = require("@octokit/endpoint"); +// or: import { endpoint } from "@octokit/endpoint"; +``` + +
+ +Example for [List organization repositories](https://developer.github.com/v3/repos/#list-organization-repositories) + +```js +const requestOptions = endpoint("GET /orgs/:org/repos", { + headers: { + authorization: "token 0000000000000000000000000000000000000001" + }, + org: "octokit", + type: "private" +}); +``` + +The resulting `requestOptions` looks as follows + +```json +{ + "method": "GET", + "url": "https://api.github.com/orgs/octokit/repos?type=private", + "headers": { + "accept": "application/vnd.github.v3+json", + "authorization": "token 0000000000000000000000000000000000000001", + "user-agent": "octokit/endpoint.js v1.2.3" + } +} +``` + +You can pass `requestOptions` to common request libraries + +```js +const { url, ...options } = requestOptions; +// using with fetch (https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) +fetch(url, options); +// using with request (https://github.com/request/request) +request(requestOptions); +// using with got (https://github.com/sindresorhus/got) +got[options.method](url, options); +// using with axios +axios(requestOptions); +``` + +## API + +### `endpoint(route, options)` or `endpoint(options)` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ route + + String + + If set, it has to be a string consisting of URL and the request method, e.g., GET /orgs/:org. If it’s set to a URL, only the method defaults to GET. +
+ options.method + + String + + Required unless route is set. Any supported http verb. Defaults to GET. +
+ options.url + + String + + Required unless route is set. A path or full URL which may contain :variable or {variable} placeholders, + e.g., /orgs/:org/repos. The url is parsed using url-template. +
+ options.baseUrl + + String + + Defaults to https://api.github.com. +
+ options.headers + + Object + + Custom headers. Passed headers are merged with defaults:
+ headers['user-agent'] defaults to octokit-endpoint.js/1.2.3 (where 1.2.3 is the released version).
+ headers['accept'] defaults to application/vnd.github.v3+json.
+
+ options.mediaType.format + + String + + Media type param, such as raw, diff, or text+json. See Media Types. Setting options.mediaType.format will amend the headers.accept value. +
+ options.mediaType.previews + + Array of Strings + + Name of previews, such as mercy, symmetra, or scarlet-witch. See API Previews. If options.mediaType.previews was set as default, the new previews will be merged into the default ones. Setting options.mediaType.previews will amend the headers.accept value. options.mediaType.previews will be merged with an existing array set using .defaults(). +
+ options.data + + Any + + Set request body directly instead of setting it to JSON based on additional parameters. See "The data parameter" below. +
+ options.request + + Object + + Pass custom meta information for the request. The request object will be returned as is. +
+ +All other options will be passed depending on the `method` and `url` options. + +1. If the option key has a placeholder in the `url`, it will be used as the replacement. For example, if the passed options are `{url: '/orgs/:org/repos', org: 'foo'}` the returned `options.url` is `https://api.github.com/orgs/foo/repos`. +2. If the `method` is `GET` or `HEAD`, the option is passed as a query parameter. +3. Otherwise, the parameter is passed in the request body as a JSON key. + +**Result** + +`endpoint()` is a synchronous method and returns an object with the following keys: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ key + + type + + description +
methodStringThe http method. Always lowercase.
urlStringThe url with placeholders replaced with passed parameters.
headersObjectAll header names are lowercased.
bodyAnyThe request body if one is present. Only for PATCH, POST, PUT, DELETE requests.
requestObjectRequest meta option, it will be returned as it was passed into endpoint()
+ +### `endpoint.defaults()` + +Override or set default options. Example: + +```js +const request = require("request"); +const myEndpoint = require("@octokit/endpoint").defaults({ + baseUrl: "https://github-enterprise.acme-inc.com/api/v3", + headers: { + "user-agent": "myApp/1.2.3", + authorization: `token 0000000000000000000000000000000000000001` + }, + org: "my-project", + per_page: 100 +}); + +request(myEndpoint(`GET /orgs/:org/repos`)); +``` + +You can call `.defaults()` again on the returned method, the defaults will cascade. + +```js +const myProjectEndpoint = endpoint.defaults({ + baseUrl: "https://github-enterprise.acme-inc.com/api/v3", + headers: { + "user-agent": "myApp/1.2.3" + }, + org: "my-project" +}); +const myProjectEndpointWithAuth = myProjectEndpoint.defaults({ + headers: { + authorization: `token 0000000000000000000000000000000000000001` + } +}); +``` + +`myProjectEndpointWithAuth` now defaults the `baseUrl`, `headers['user-agent']`, +`org` and `headers['authorization']` on top of `headers['accept']` that is set +by the global default. + +### `endpoint.DEFAULTS` + +The current default options. + +```js +endpoint.DEFAULTS.baseUrl; // https://api.github.com +const myEndpoint = endpoint.defaults({ + baseUrl: "https://github-enterprise.acme-inc.com/api/v3" +}); +myEndpoint.DEFAULTS.baseUrl; // https://github-enterprise.acme-inc.com/api/v3 +``` + +### `endpoint.merge(route, options)` or `endpoint.merge(options)` + +Get the defaulted endpoint options, but without parsing them into request options: + +```js +const myProjectEndpoint = endpoint.defaults({ + baseUrl: "https://github-enterprise.acme-inc.com/api/v3", + headers: { + "user-agent": "myApp/1.2.3" + }, + org: "my-project" +}); +myProjectEndpoint.merge("GET /orgs/:org/repos", { + headers: { + authorization: `token 0000000000000000000000000000000000000001` + }, + org: "my-secret-project", + type: "private" +}); + +// { +// baseUrl: 'https://github-enterprise.acme-inc.com/api/v3', +// method: 'GET', +// url: '/orgs/:org/repos', +// headers: { +// accept: 'application/vnd.github.v3+json', +// authorization: `token 0000000000000000000000000000000000000001`, +// 'user-agent': 'myApp/1.2.3' +// }, +// org: 'my-secret-project', +// type: 'private' +// } +``` + +### `endpoint.parse()` + +Stateless method to turn endpoint options into request options. Calling +`endpoint(options)` is the same as calling `endpoint.parse(endpoint.merge(options))`. + +## Special cases + + + +### The `data` parameter – set request body directly + +Some endpoints such as [Render a Markdown document in raw mode](https://developer.github.com/v3/markdown/#render-a-markdown-document-in-raw-mode) don’t have parameters that are sent as request body keys, instead, the request body needs to be set directly. In these cases, set the `data` parameter. + +```js +const options = endpoint("POST /markdown/raw", { + data: "Hello world github/linguist#1 **cool**, and #1!", + headers: { + accept: "text/html;charset=utf-8", + "content-type": "text/plain" + } +}); + +// options is +// { +// method: 'post', +// url: 'https://api.github.com/markdown/raw', +// headers: { +// accept: 'text/html;charset=utf-8', +// 'content-type': 'text/plain', +// 'user-agent': userAgent +// }, +// body: 'Hello world github/linguist#1 **cool**, and #1!' +// } +``` + +### Set parameters for both the URL/query and the request body + +There are API endpoints that accept both query parameters as well as a body. In that case, you need to add the query parameters as templates to `options.url`, as defined in the [RFC 6570 URI Template specification](https://tools.ietf.org/html/rfc6570). + +Example + +```js +endpoint( + "POST https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}", + { + name: "example.zip", + label: "short description", + headers: { + "content-type": "text/plain", + "content-length": 14, + authorization: `token 0000000000000000000000000000000000000001` + }, + data: "Hello, world!" + } +); +``` + +## LICENSE + +[MIT](LICENSE) diff --git a/node_modules/@octokit/endpoint/dist-node/index.js b/node_modules/@octokit/endpoint/dist-node/index.js new file mode 100644 index 00000000..9218ced3 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-node/index.js @@ -0,0 +1,379 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var isPlainObject = _interopDefault(require('is-plain-object')); +var universalUserAgent = require('universal-user-agent'); + +function lowercaseKeys(object) { + if (!object) { + return {}; + } + + return Object.keys(object).reduce((newObj, key) => { + newObj[key.toLowerCase()] = object[key]; + return newObj; + }, {}); +} + +function mergeDeep(defaults, options) { + const result = Object.assign({}, defaults); + Object.keys(options).forEach(key => { + if (isPlainObject(options[key])) { + if (!(key in defaults)) Object.assign(result, { + [key]: options[key] + });else result[key] = mergeDeep(defaults[key], options[key]); + } else { + Object.assign(result, { + [key]: options[key] + }); + } + }); + return result; +} + +function merge(defaults, route, options) { + if (typeof route === "string") { + let [method, url] = route.split(" "); + options = Object.assign(url ? { + method, + url + } : { + url: method + }, options); + } else { + options = Object.assign({}, route); + } // lowercase header names before merging with defaults to avoid duplicates + + + options.headers = lowercaseKeys(options.headers); + const mergedOptions = mergeDeep(defaults || {}, options); // mediaType.previews arrays are merged, instead of overwritten + + if (defaults && defaults.mediaType.previews.length) { + mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(preview => !mergedOptions.mediaType.previews.includes(preview)).concat(mergedOptions.mediaType.previews); + } + + mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map(preview => preview.replace(/-preview/, "")); + return mergedOptions; +} + +function addQueryParameters(url, parameters) { + const separator = /\?/.test(url) ? "&" : "?"; + const names = Object.keys(parameters); + + if (names.length === 0) { + return url; + } + + return url + separator + names.map(name => { + if (name === "q") { + return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); + } + + return `${name}=${encodeURIComponent(parameters[name])}`; + }).join("&"); +} + +const urlVariableRegex = /\{[^}]+\}/g; + +function removeNonChars(variableName) { + return variableName.replace(/^\W+|\W+$/g, "").split(/,/); +} + +function extractUrlVariableNames(url) { + const matches = url.match(urlVariableRegex); + + if (!matches) { + return []; + } + + return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); +} + +function omit(object, keysToOmit) { + return Object.keys(object).filter(option => !keysToOmit.includes(option)).reduce((obj, key) => { + obj[key] = object[key]; + return obj; + }, {}); +} + +// Based on https://github.com/bramstein/url-template, licensed under BSD +// TODO: create separate package. +// +// Copyright (c) 2012-2014, Bram Stein +// All rights reserved. +// 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 COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/* istanbul ignore file */ +function encodeReserved(str) { + return str.split(/(%[0-9A-Fa-f]{2})/g).map(function (part) { + if (!/%[0-9A-Fa-f]/.test(part)) { + part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); + } + + return part; + }).join(""); +} + +function encodeUnreserved(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); +} + +function encodeValue(operator, value, key) { + value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); + + if (key) { + return encodeUnreserved(key) + "=" + value; + } else { + return value; + } +} + +function isDefined(value) { + return value !== undefined && value !== null; +} + +function isKeyOperator(operator) { + return operator === ";" || operator === "&" || operator === "?"; +} + +function getValues(context, operator, key, modifier) { + var value = context[key], + result = []; + + if (isDefined(value) && value !== "") { + if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { + value = value.toString(); + + if (modifier && modifier !== "*") { + value = value.substring(0, parseInt(modifier, 10)); + } + + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + } else { + if (modifier === "*") { + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + }); + } else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + result.push(encodeValue(operator, value[k], k)); + } + }); + } + } else { + const tmp = []; + + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + tmp.push(encodeValue(operator, value)); + }); + } else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + tmp.push(encodeUnreserved(k)); + tmp.push(encodeValue(operator, value[k].toString())); + } + }); + } + + if (isKeyOperator(operator)) { + result.push(encodeUnreserved(key) + "=" + tmp.join(",")); + } else if (tmp.length !== 0) { + result.push(tmp.join(",")); + } + } + } + } else { + if (operator === ";") { + if (isDefined(value)) { + result.push(encodeUnreserved(key)); + } + } else if (value === "" && (operator === "&" || operator === "?")) { + result.push(encodeUnreserved(key) + "="); + } else if (value === "") { + result.push(""); + } + } + + return result; +} + +function parseUrl(template) { + return { + expand: expand.bind(null, template) + }; +} + +function expand(template, context) { + var operators = ["+", "#", ".", "/", ";", "?", "&"]; + return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) { + if (expression) { + let operator = ""; + const values = []; + + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); + } + + expression.split(/,/g).forEach(function (variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); + }); + + if (operator && operator !== "+") { + var separator = ","; + + if (operator === "?") { + separator = "&"; + } else if (operator !== "#") { + separator = operator; + } + + return (values.length !== 0 ? operator : "") + values.join(separator); + } else { + return values.join(","); + } + } else { + return encodeReserved(literal); + } + }); +} + +function parse(options) { + // https://fetch.spec.whatwg.org/#methods + let method = options.method.toUpperCase(); // replace :varname with {varname} to make it RFC 6570 compatible + + let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{+$1}"); + let headers = Object.assign({}, options.headers); + let body; + let parameters = omit(options, ["method", "baseUrl", "url", "headers", "request", "mediaType"]); // extract variable names from URL to calculate remaining variables later + + const urlVariableNames = extractUrlVariableNames(url); + url = parseUrl(url).expand(parameters); + + if (!/^http/.test(url)) { + url = options.baseUrl + url; + } + + const omittedParameters = Object.keys(options).filter(option => urlVariableNames.includes(option)).concat("baseUrl"); + const remainingParameters = omit(parameters, omittedParameters); + const isBinaryRequset = /application\/octet-stream/i.test(headers.accept); + + if (!isBinaryRequset) { + if (options.mediaType.format) { + // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw + headers.accept = headers.accept.split(/,/).map(preview => preview.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`)).join(","); + } + + if (options.mediaType.previews.length) { + const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || []; + headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map(preview => { + const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; + return `application/vnd.github.${preview}-preview${format}`; + }).join(","); + } + } // for GET/HEAD requests, set URL query parameters from remaining parameters + // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters + + + if (["GET", "HEAD"].includes(method)) { + url = addQueryParameters(url, remainingParameters); + } else { + if ("data" in remainingParameters) { + body = remainingParameters.data; + } else { + if (Object.keys(remainingParameters).length) { + body = remainingParameters; + } else { + headers["content-length"] = 0; + } + } + } // default content-type for JSON if body is set + + + if (!headers["content-type"] && typeof body !== "undefined") { + headers["content-type"] = "application/json; charset=utf-8"; + } // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body. + // fetch does not allow to set `content-length` header, but we can set body to an empty string + + + if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { + body = ""; + } // Only return body/request keys if present + + + return Object.assign({ + method, + url, + headers + }, typeof body !== "undefined" ? { + body + } : null, options.request ? { + request: options.request + } : null); +} + +function endpointWithDefaults(defaults, route, options) { + return parse(merge(defaults, route, options)); +} + +function withDefaults(oldDefaults, newDefaults) { + const DEFAULTS = merge(oldDefaults, newDefaults); + const endpoint = endpointWithDefaults.bind(null, DEFAULTS); + return Object.assign(endpoint, { + DEFAULTS, + defaults: withDefaults.bind(null, DEFAULTS), + merge: merge.bind(null, DEFAULTS), + parse + }); +} + +const VERSION = "5.5.1"; + +const userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`; // DEFAULTS has all properties set that EndpointOptions has, except url. +// So we use RequestParameters and add method as additional required property. + +const DEFAULTS = { + method: "GET", + baseUrl: "https://api.github.com", + headers: { + accept: "application/vnd.github.v3+json", + "user-agent": userAgent + }, + mediaType: { + format: "", + previews: [] + } +}; + +const endpoint = withDefaults(null, DEFAULTS); + +exports.endpoint = endpoint; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/endpoint/dist-node/index.js.map b/node_modules/@octokit/endpoint/dist-node/index.js.map new file mode 100644 index 00000000..d84c1b7c --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/util/lowercase-keys.js","../dist-src/util/merge-deep.js","../dist-src/merge.js","../dist-src/util/add-query-parameters.js","../dist-src/util/extract-url-variable-names.js","../dist-src/util/omit.js","../dist-src/util/url-template.js","../dist-src/parse.js","../dist-src/endpoint-with-defaults.js","../dist-src/with-defaults.js","../dist-src/version.js","../dist-src/defaults.js","../dist-src/index.js"],"sourcesContent":["export function lowercaseKeys(object) {\n if (!object) {\n return {};\n }\n return Object.keys(object).reduce((newObj, key) => {\n newObj[key.toLowerCase()] = object[key];\n return newObj;\n }, {});\n}\n","import isPlainObject from \"is-plain-object\";\nexport function mergeDeep(defaults, options) {\n const result = Object.assign({}, defaults);\n Object.keys(options).forEach(key => {\n if (isPlainObject(options[key])) {\n if (!(key in defaults))\n Object.assign(result, { [key]: options[key] });\n else\n result[key] = mergeDeep(defaults[key], options[key]);\n }\n else {\n Object.assign(result, { [key]: options[key] });\n }\n });\n return result;\n}\n","import { lowercaseKeys } from \"./util/lowercase-keys\";\nimport { mergeDeep } from \"./util/merge-deep\";\nexport function merge(defaults, route, options) {\n if (typeof route === \"string\") {\n let [method, url] = route.split(\" \");\n options = Object.assign(url ? { method, url } : { url: method }, options);\n }\n else {\n options = Object.assign({}, route);\n }\n // lowercase header names before merging with defaults to avoid duplicates\n options.headers = lowercaseKeys(options.headers);\n const mergedOptions = mergeDeep(defaults || {}, options);\n // mediaType.previews arrays are merged, instead of overwritten\n if (defaults && defaults.mediaType.previews.length) {\n mergedOptions.mediaType.previews = defaults.mediaType.previews\n .filter(preview => !mergedOptions.mediaType.previews.includes(preview))\n .concat(mergedOptions.mediaType.previews);\n }\n mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, \"\"));\n return mergedOptions;\n}\n","export function addQueryParameters(url, parameters) {\n const separator = /\\?/.test(url) ? \"&\" : \"?\";\n const names = Object.keys(parameters);\n if (names.length === 0) {\n return url;\n }\n return (url +\n separator +\n names\n .map(name => {\n if (name === \"q\") {\n return (\"q=\" +\n parameters\n .q.split(\"+\")\n .map(encodeURIComponent)\n .join(\"+\"));\n }\n return `${name}=${encodeURIComponent(parameters[name])}`;\n })\n .join(\"&\"));\n}\n","const urlVariableRegex = /\\{[^}]+\\}/g;\nfunction removeNonChars(variableName) {\n return variableName.replace(/^\\W+|\\W+$/g, \"\").split(/,/);\n}\nexport function extractUrlVariableNames(url) {\n const matches = url.match(urlVariableRegex);\n if (!matches) {\n return [];\n }\n return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);\n}\n","export function omit(object, keysToOmit) {\n return Object.keys(object)\n .filter(option => !keysToOmit.includes(option))\n .reduce((obj, key) => {\n obj[key] = object[key];\n return obj;\n }, {});\n}\n","// Based on https://github.com/bramstein/url-template, licensed under BSD\n// TODO: create separate package.\n//\n// Copyright (c) 2012-2014, Bram Stein\n// All rights reserved.\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions\n// are met:\n// 1. Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// 2. Redistributions in binary form must reproduce the above copyright\n// notice, this list of conditions and the following disclaimer in the\n// documentation and/or other materials provided with the distribution.\n// 3. The name of the author may not be used to endorse or promote products\n// derived from this software without specific prior written permission.\n// THIS SOFTWARE IS PROVIDED BY THE AUTHOR \"AS IS\" AND ANY EXPRESS OR IMPLIED\n// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n/* istanbul ignore file */\nfunction encodeReserved(str) {\n return str\n .split(/(%[0-9A-Fa-f]{2})/g)\n .map(function (part) {\n if (!/%[0-9A-Fa-f]/.test(part)) {\n part = encodeURI(part)\n .replace(/%5B/g, \"[\")\n .replace(/%5D/g, \"]\");\n }\n return part;\n })\n .join(\"\");\n}\nfunction encodeUnreserved(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return (\"%\" +\n c\n .charCodeAt(0)\n .toString(16)\n .toUpperCase());\n });\n}\nfunction encodeValue(operator, value, key) {\n value =\n operator === \"+\" || operator === \"#\"\n ? encodeReserved(value)\n : encodeUnreserved(value);\n if (key) {\n return encodeUnreserved(key) + \"=\" + value;\n }\n else {\n return value;\n }\n}\nfunction isDefined(value) {\n return value !== undefined && value !== null;\n}\nfunction isKeyOperator(operator) {\n return operator === \";\" || operator === \"&\" || operator === \"?\";\n}\nfunction getValues(context, operator, key, modifier) {\n var value = context[key], result = [];\n if (isDefined(value) && value !== \"\") {\n if (typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\") {\n value = value.toString();\n if (modifier && modifier !== \"*\") {\n value = value.substring(0, parseInt(modifier, 10));\n }\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n }\n else {\n if (modifier === \"*\") {\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n result.push(encodeValue(operator, value[k], k));\n }\n });\n }\n }\n else {\n const tmp = [];\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n tmp.push(encodeValue(operator, value));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n tmp.push(encodeUnreserved(k));\n tmp.push(encodeValue(operator, value[k].toString()));\n }\n });\n }\n if (isKeyOperator(operator)) {\n result.push(encodeUnreserved(key) + \"=\" + tmp.join(\",\"));\n }\n else if (tmp.length !== 0) {\n result.push(tmp.join(\",\"));\n }\n }\n }\n }\n else {\n if (operator === \";\") {\n if (isDefined(value)) {\n result.push(encodeUnreserved(key));\n }\n }\n else if (value === \"\" && (operator === \"&\" || operator === \"?\")) {\n result.push(encodeUnreserved(key) + \"=\");\n }\n else if (value === \"\") {\n result.push(\"\");\n }\n }\n return result;\n}\nexport function parseUrl(template) {\n return {\n expand: expand.bind(null, template)\n };\n}\nfunction expand(template, context) {\n var operators = [\"+\", \"#\", \".\", \"/\", \";\", \"?\", \"&\"];\n return template.replace(/\\{([^\\{\\}]+)\\}|([^\\{\\}]+)/g, function (_, expression, literal) {\n if (expression) {\n let operator = \"\";\n const values = [];\n if (operators.indexOf(expression.charAt(0)) !== -1) {\n operator = expression.charAt(0);\n expression = expression.substr(1);\n }\n expression.split(/,/g).forEach(function (variable) {\n var tmp = /([^:\\*]*)(?::(\\d+)|(\\*))?/.exec(variable);\n values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\n });\n if (operator && operator !== \"+\") {\n var separator = \",\";\n if (operator === \"?\") {\n separator = \"&\";\n }\n else if (operator !== \"#\") {\n separator = operator;\n }\n return (values.length !== 0 ? operator : \"\") + values.join(separator);\n }\n else {\n return values.join(\",\");\n }\n }\n else {\n return encodeReserved(literal);\n }\n });\n}\n","import { addQueryParameters } from \"./util/add-query-parameters\";\nimport { extractUrlVariableNames } from \"./util/extract-url-variable-names\";\nimport { omit } from \"./util/omit\";\nimport { parseUrl } from \"./util/url-template\";\nexport function parse(options) {\n // https://fetch.spec.whatwg.org/#methods\n let method = options.method.toUpperCase();\n // replace :varname with {varname} to make it RFC 6570 compatible\n let url = (options.url || \"/\").replace(/:([a-z]\\w+)/g, \"{+$1}\");\n let headers = Object.assign({}, options.headers);\n let body;\n let parameters = omit(options, [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"mediaType\"\n ]);\n // extract variable names from URL to calculate remaining variables later\n const urlVariableNames = extractUrlVariableNames(url);\n url = parseUrl(url).expand(parameters);\n if (!/^http/.test(url)) {\n url = options.baseUrl + url;\n }\n const omittedParameters = Object.keys(options)\n .filter(option => urlVariableNames.includes(option))\n .concat(\"baseUrl\");\n const remainingParameters = omit(parameters, omittedParameters);\n const isBinaryRequset = /application\\/octet-stream/i.test(headers.accept);\n if (!isBinaryRequset) {\n if (options.mediaType.format) {\n // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw\n headers.accept = headers.accept\n .split(/,/)\n .map(preview => preview.replace(/application\\/vnd(\\.\\w+)(\\.v3)?(\\.\\w+)?(\\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`))\n .join(\",\");\n }\n if (options.mediaType.previews.length) {\n const previewsFromAcceptHeader = headers.accept.match(/[\\w-]+(?=-preview)/g) || [];\n headers.accept = previewsFromAcceptHeader\n .concat(options.mediaType.previews)\n .map(preview => {\n const format = options.mediaType.format\n ? `.${options.mediaType.format}`\n : \"+json\";\n return `application/vnd.github.${preview}-preview${format}`;\n })\n .join(\",\");\n }\n }\n // for GET/HEAD requests, set URL query parameters from remaining parameters\n // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters\n if ([\"GET\", \"HEAD\"].includes(method)) {\n url = addQueryParameters(url, remainingParameters);\n }\n else {\n if (\"data\" in remainingParameters) {\n body = remainingParameters.data;\n }\n else {\n if (Object.keys(remainingParameters).length) {\n body = remainingParameters;\n }\n else {\n headers[\"content-length\"] = 0;\n }\n }\n }\n // default content-type for JSON if body is set\n if (!headers[\"content-type\"] && typeof body !== \"undefined\") {\n headers[\"content-type\"] = \"application/json; charset=utf-8\";\n }\n // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body.\n // fetch does not allow to set `content-length` header, but we can set body to an empty string\n if ([\"PATCH\", \"PUT\"].includes(method) && typeof body === \"undefined\") {\n body = \"\";\n }\n // Only return body/request keys if present\n return Object.assign({ method, url, headers }, typeof body !== \"undefined\" ? { body } : null, options.request ? { request: options.request } : null);\n}\n","import { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function endpointWithDefaults(defaults, route, options) {\n return parse(merge(defaults, route, options));\n}\n","import { endpointWithDefaults } from \"./endpoint-with-defaults\";\nimport { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function withDefaults(oldDefaults, newDefaults) {\n const DEFAULTS = merge(oldDefaults, newDefaults);\n const endpoint = endpointWithDefaults.bind(null, DEFAULTS);\n return Object.assign(endpoint, {\n DEFAULTS,\n defaults: withDefaults.bind(null, DEFAULTS),\n merge: merge.bind(null, DEFAULTS),\n parse\n });\n}\n","export const VERSION = \"5.5.1\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nconst userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`;\n// DEFAULTS has all properties set that EndpointOptions has, except url.\n// So we use RequestParameters and add method as additional required property.\nexport const DEFAULTS = {\n method: \"GET\",\n baseUrl: \"https://api.github.com\",\n headers: {\n accept: \"application/vnd.github.v3+json\",\n \"user-agent\": userAgent\n },\n mediaType: {\n format: \"\",\n previews: []\n }\n};\n","import { withDefaults } from \"./with-defaults\";\nimport { DEFAULTS } from \"./defaults\";\nexport const endpoint = withDefaults(null, DEFAULTS);\n"],"names":["lowercaseKeys","object","Object","keys","reduce","newObj","key","toLowerCase","mergeDeep","defaults","options","result","assign","forEach","isPlainObject","merge","route","method","url","split","headers","mergedOptions","mediaType","previews","length","filter","preview","includes","concat","map","replace","addQueryParameters","parameters","separator","test","names","name","q","encodeURIComponent","join","urlVariableRegex","removeNonChars","variableName","extractUrlVariableNames","matches","match","a","b","omit","keysToOmit","option","obj","encodeReserved","str","part","encodeURI","encodeUnreserved","c","charCodeAt","toString","toUpperCase","encodeValue","operator","value","isDefined","undefined","isKeyOperator","getValues","context","modifier","substring","parseInt","push","Array","isArray","k","tmp","parseUrl","template","expand","bind","operators","_","expression","literal","values","indexOf","charAt","substr","variable","exec","parse","body","urlVariableNames","baseUrl","omittedParameters","remainingParameters","isBinaryRequset","accept","format","previewsFromAcceptHeader","data","request","endpointWithDefaults","withDefaults","oldDefaults","newDefaults","DEFAULTS","endpoint","VERSION","userAgent","getUserAgent"],"mappings":";;;;;;;;;AAAO,SAASA,aAAT,CAAuBC,MAAvB,EAA+B;MAC9B,CAACA,MAAL,EAAa;WACF,EAAP;;;SAEGC,MAAM,CAACC,IAAP,CAAYF,MAAZ,EAAoBG,MAApB,CAA2B,CAACC,MAAD,EAASC,GAAT,KAAiB;IAC/CD,MAAM,CAACC,GAAG,CAACC,WAAJ,EAAD,CAAN,GAA4BN,MAAM,CAACK,GAAD,CAAlC;WACOD,MAAP;GAFG,EAGJ,EAHI,CAAP;;;ACHG,SAASG,SAAT,CAAmBC,QAAnB,EAA6BC,OAA7B,EAAsC;QACnCC,MAAM,GAAGT,MAAM,CAACU,MAAP,CAAc,EAAd,EAAkBH,QAAlB,CAAf;EACAP,MAAM,CAACC,IAAP,CAAYO,OAAZ,EAAqBG,OAArB,CAA6BP,GAAG,IAAI;QAC5BQ,aAAa,CAACJ,OAAO,CAACJ,GAAD,CAAR,CAAjB,EAAiC;UACzB,EAAEA,GAAG,IAAIG,QAAT,CAAJ,EACIP,MAAM,CAACU,MAAP,CAAcD,MAAd,EAAsB;SAAGL,GAAD,GAAOI,OAAO,CAACJ,GAAD;OAAtC,EADJ,KAGIK,MAAM,CAACL,GAAD,CAAN,GAAcE,SAAS,CAACC,QAAQ,CAACH,GAAD,CAAT,EAAgBI,OAAO,CAACJ,GAAD,CAAvB,CAAvB;KAJR,MAMK;MACDJ,MAAM,CAACU,MAAP,CAAcD,MAAd,EAAsB;SAAGL,GAAD,GAAOI,OAAO,CAACJ,GAAD;OAAtC;;GARR;SAWOK,MAAP;;;ACZG,SAASI,KAAT,CAAeN,QAAf,EAAyBO,KAAzB,EAAgCN,OAAhC,EAAyC;MACxC,OAAOM,KAAP,KAAiB,QAArB,EAA+B;QACvB,CAACC,MAAD,EAASC,GAAT,IAAgBF,KAAK,CAACG,KAAN,CAAY,GAAZ,CAApB;IACAT,OAAO,GAAGR,MAAM,CAACU,MAAP,CAAcM,GAAG,GAAG;MAAED,MAAF;MAAUC;KAAb,GAAqB;MAAEA,GAAG,EAAED;KAA7C,EAAuDP,OAAvD,CAAV;GAFJ,MAIK;IACDA,OAAO,GAAGR,MAAM,CAACU,MAAP,CAAc,EAAd,EAAkBI,KAAlB,CAAV;GANwC;;;EAS5CN,OAAO,CAACU,OAAR,GAAkBpB,aAAa,CAACU,OAAO,CAACU,OAAT,CAA/B;QACMC,aAAa,GAAGb,SAAS,CAACC,QAAQ,IAAI,EAAb,EAAiBC,OAAjB,CAA/B,CAV4C;;MAYxCD,QAAQ,IAAIA,QAAQ,CAACa,SAAT,CAAmBC,QAAnB,CAA4BC,MAA5C,EAAoD;IAChDH,aAAa,CAACC,SAAd,CAAwBC,QAAxB,GAAmCd,QAAQ,CAACa,SAAT,CAAmBC,QAAnB,CAC9BE,MAD8B,CACvBC,OAAO,IAAI,CAACL,aAAa,CAACC,SAAd,CAAwBC,QAAxB,CAAiCI,QAAjC,CAA0CD,OAA1C,CADW,EAE9BE,MAF8B,CAEvBP,aAAa,CAACC,SAAd,CAAwBC,QAFD,CAAnC;;;EAIJF,aAAa,CAACC,SAAd,CAAwBC,QAAxB,GAAmCF,aAAa,CAACC,SAAd,CAAwBC,QAAxB,CAAiCM,GAAjC,CAAsCH,OAAD,IAAaA,OAAO,CAACI,OAAR,CAAgB,UAAhB,EAA4B,EAA5B,CAAlD,CAAnC;SACOT,aAAP;;;ACpBG,SAASU,kBAAT,CAA4Bb,GAA5B,EAAiCc,UAAjC,EAA6C;QAC1CC,SAAS,GAAG,KAAKC,IAAL,CAAUhB,GAAV,IAAiB,GAAjB,GAAuB,GAAzC;QACMiB,KAAK,GAAGjC,MAAM,CAACC,IAAP,CAAY6B,UAAZ,CAAd;;MACIG,KAAK,CAACX,MAAN,KAAiB,CAArB,EAAwB;WACbN,GAAP;;;SAEIA,GAAG,GACPe,SADI,GAEJE,KAAK,CACAN,GADL,CACSO,IAAI,IAAI;QACTA,IAAI,KAAK,GAAb,EAAkB;aACN,OACJJ,UAAU,CACLK,CADL,CACOlB,KADP,CACa,GADb,EAEKU,GAFL,CAESS,kBAFT,EAGKC,IAHL,CAGU,GAHV,CADJ;;;WAMI,GAAEH,IAAK,IAAGE,kBAAkB,CAACN,UAAU,CAACI,IAAD,CAAX,CAAmB,EAAvD;GATJ,EAWKG,IAXL,CAWU,GAXV,CAFJ;;;ACNJ,MAAMC,gBAAgB,GAAG,YAAzB;;AACA,SAASC,cAAT,CAAwBC,YAAxB,EAAsC;SAC3BA,YAAY,CAACZ,OAAb,CAAqB,YAArB,EAAmC,EAAnC,EAAuCX,KAAvC,CAA6C,GAA7C,CAAP;;;AAEJ,AAAO,SAASwB,uBAAT,CAAiCzB,GAAjC,EAAsC;QACnC0B,OAAO,GAAG1B,GAAG,CAAC2B,KAAJ,CAAUL,gBAAV,CAAhB;;MACI,CAACI,OAAL,EAAc;WACH,EAAP;;;SAEGA,OAAO,CAACf,GAAR,CAAYY,cAAZ,EAA4BrC,MAA5B,CAAmC,CAAC0C,CAAD,EAAIC,CAAJ,KAAUD,CAAC,CAAClB,MAAF,CAASmB,CAAT,CAA7C,EAA0D,EAA1D,CAAP;;;ACTG,SAASC,IAAT,CAAc/C,MAAd,EAAsBgD,UAAtB,EAAkC;SAC9B/C,MAAM,CAACC,IAAP,CAAYF,MAAZ,EACFwB,MADE,CACKyB,MAAM,IAAI,CAACD,UAAU,CAACtB,QAAX,CAAoBuB,MAApB,CADhB,EAEF9C,MAFE,CAEK,CAAC+C,GAAD,EAAM7C,GAAN,KAAc;IACtB6C,GAAG,CAAC7C,GAAD,CAAH,GAAWL,MAAM,CAACK,GAAD,CAAjB;WACO6C,GAAP;GAJG,EAKJ,EALI,CAAP;;;ACDJ;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,SAASC,cAAT,CAAwBC,GAAxB,EAA6B;SAClBA,GAAG,CACLlC,KADE,CACI,oBADJ,EAEFU,GAFE,CAEE,UAAUyB,IAAV,EAAgB;QACjB,CAAC,eAAepB,IAAf,CAAoBoB,IAApB,CAAL,EAAgC;MAC5BA,IAAI,GAAGC,SAAS,CAACD,IAAD,CAAT,CACFxB,OADE,CACM,MADN,EACc,GADd,EAEFA,OAFE,CAEM,MAFN,EAEc,GAFd,CAAP;;;WAIGwB,IAAP;GARG,EAUFf,IAVE,CAUG,EAVH,CAAP;;;AAYJ,SAASiB,gBAAT,CAA0BH,GAA1B,EAA+B;SACpBf,kBAAkB,CAACe,GAAD,CAAlB,CAAwBvB,OAAxB,CAAgC,UAAhC,EAA4C,UAAU2B,CAAV,EAAa;WACpD,MACJA,CAAC,CACIC,UADL,CACgB,CADhB,EAEKC,QAFL,CAEc,EAFd,EAGKC,WAHL,EADJ;GADG,CAAP;;;AAQJ,SAASC,WAAT,CAAqBC,QAArB,EAA+BC,KAA/B,EAAsCzD,GAAtC,EAA2C;EACvCyD,KAAK,GACDD,QAAQ,KAAK,GAAb,IAAoBA,QAAQ,KAAK,GAAjC,GACMV,cAAc,CAACW,KAAD,CADpB,GAEMP,gBAAgB,CAACO,KAAD,CAH1B;;MAIIzD,GAAJ,EAAS;WACEkD,gBAAgB,CAAClD,GAAD,CAAhB,GAAwB,GAAxB,GAA8ByD,KAArC;GADJ,MAGK;WACMA,KAAP;;;;AAGR,SAASC,SAAT,CAAmBD,KAAnB,EAA0B;SACfA,KAAK,KAAKE,SAAV,IAAuBF,KAAK,KAAK,IAAxC;;;AAEJ,SAASG,aAAT,CAAuBJ,QAAvB,EAAiC;SACtBA,QAAQ,KAAK,GAAb,IAAoBA,QAAQ,KAAK,GAAjC,IAAwCA,QAAQ,KAAK,GAA5D;;;AAEJ,SAASK,SAAT,CAAmBC,OAAnB,EAA4BN,QAA5B,EAAsCxD,GAAtC,EAA2C+D,QAA3C,EAAqD;MAC7CN,KAAK,GAAGK,OAAO,CAAC9D,GAAD,CAAnB;MAA0BK,MAAM,GAAG,EAAnC;;MACIqD,SAAS,CAACD,KAAD,CAAT,IAAoBA,KAAK,KAAK,EAAlC,EAAsC;QAC9B,OAAOA,KAAP,KAAiB,QAAjB,IACA,OAAOA,KAAP,KAAiB,QADjB,IAEA,OAAOA,KAAP,KAAiB,SAFrB,EAEgC;MAC5BA,KAAK,GAAGA,KAAK,CAACJ,QAAN,EAAR;;UACIU,QAAQ,IAAIA,QAAQ,KAAK,GAA7B,EAAkC;QAC9BN,KAAK,GAAGA,KAAK,CAACO,SAAN,CAAgB,CAAhB,EAAmBC,QAAQ,CAACF,QAAD,EAAW,EAAX,CAA3B,CAAR;;;MAEJ1D,MAAM,CAAC6D,IAAP,CAAYX,WAAW,CAACC,QAAD,EAAWC,KAAX,EAAkBG,aAAa,CAACJ,QAAD,CAAb,GAA0BxD,GAA1B,GAAgC,EAAlD,CAAvB;KAPJ,MASK;UACG+D,QAAQ,KAAK,GAAjB,EAAsB;YACdI,KAAK,CAACC,OAAN,CAAcX,KAAd,CAAJ,EAA0B;UACtBA,KAAK,CAACtC,MAAN,CAAauC,SAAb,EAAwBnD,OAAxB,CAAgC,UAAUkD,KAAV,EAAiB;YAC7CpD,MAAM,CAAC6D,IAAP,CAAYX,WAAW,CAACC,QAAD,EAAWC,KAAX,EAAkBG,aAAa,CAACJ,QAAD,CAAb,GAA0BxD,GAA1B,GAAgC,EAAlD,CAAvB;WADJ;SADJ,MAKK;UACDJ,MAAM,CAACC,IAAP,CAAY4D,KAAZ,EAAmBlD,OAAnB,CAA2B,UAAU8D,CAAV,EAAa;gBAChCX,SAAS,CAACD,KAAK,CAACY,CAAD,CAAN,CAAb,EAAyB;cACrBhE,MAAM,CAAC6D,IAAP,CAAYX,WAAW,CAACC,QAAD,EAAWC,KAAK,CAACY,CAAD,CAAhB,EAAqBA,CAArB,CAAvB;;WAFR;;OAPR,MAcK;cACKC,GAAG,GAAG,EAAZ;;YACIH,KAAK,CAACC,OAAN,CAAcX,KAAd,CAAJ,EAA0B;UACtBA,KAAK,CAACtC,MAAN,CAAauC,SAAb,EAAwBnD,OAAxB,CAAgC,UAAUkD,KAAV,EAAiB;YAC7Ca,GAAG,CAACJ,IAAJ,CAASX,WAAW,CAACC,QAAD,EAAWC,KAAX,CAApB;WADJ;SADJ,MAKK;UACD7D,MAAM,CAACC,IAAP,CAAY4D,KAAZ,EAAmBlD,OAAnB,CAA2B,UAAU8D,CAAV,EAAa;gBAChCX,SAAS,CAACD,KAAK,CAACY,CAAD,CAAN,CAAb,EAAyB;cACrBC,GAAG,CAACJ,IAAJ,CAAShB,gBAAgB,CAACmB,CAAD,CAAzB;cACAC,GAAG,CAACJ,IAAJ,CAASX,WAAW,CAACC,QAAD,EAAWC,KAAK,CAACY,CAAD,CAAL,CAAShB,QAAT,EAAX,CAApB;;WAHR;;;YAOAO,aAAa,CAACJ,QAAD,CAAjB,EAA6B;UACzBnD,MAAM,CAAC6D,IAAP,CAAYhB,gBAAgB,CAAClD,GAAD,CAAhB,GAAwB,GAAxB,GAA8BsE,GAAG,CAACrC,IAAJ,CAAS,GAAT,CAA1C;SADJ,MAGK,IAAIqC,GAAG,CAACpD,MAAJ,KAAe,CAAnB,EAAsB;UACvBb,MAAM,CAAC6D,IAAP,CAAYI,GAAG,CAACrC,IAAJ,CAAS,GAAT,CAAZ;;;;GA5ChB,MAiDK;QACGuB,QAAQ,KAAK,GAAjB,EAAsB;UACdE,SAAS,CAACD,KAAD,CAAb,EAAsB;QAClBpD,MAAM,CAAC6D,IAAP,CAAYhB,gBAAgB,CAAClD,GAAD,CAA5B;;KAFR,MAKK,IAAIyD,KAAK,KAAK,EAAV,KAAiBD,QAAQ,KAAK,GAAb,IAAoBA,QAAQ,KAAK,GAAlD,CAAJ,EAA4D;MAC7DnD,MAAM,CAAC6D,IAAP,CAAYhB,gBAAgB,CAAClD,GAAD,CAAhB,GAAwB,GAApC;KADC,MAGA,IAAIyD,KAAK,KAAK,EAAd,EAAkB;MACnBpD,MAAM,CAAC6D,IAAP,CAAY,EAAZ;;;;SAGD7D,MAAP;;;AAEJ,AAAO,SAASkE,QAAT,CAAkBC,QAAlB,EAA4B;SACxB;IACHC,MAAM,EAAEA,MAAM,CAACC,IAAP,CAAY,IAAZ,EAAkBF,QAAlB;GADZ;;;AAIJ,SAASC,MAAT,CAAgBD,QAAhB,EAA0BV,OAA1B,EAAmC;MAC3Ba,SAAS,GAAG,CAAC,GAAD,EAAM,GAAN,EAAW,GAAX,EAAgB,GAAhB,EAAqB,GAArB,EAA0B,GAA1B,EAA+B,GAA/B,CAAhB;SACOH,QAAQ,CAAChD,OAAT,CAAiB,4BAAjB,EAA+C,UAAUoD,CAAV,EAAaC,UAAb,EAAyBC,OAAzB,EAAkC;QAChFD,UAAJ,EAAgB;UACRrB,QAAQ,GAAG,EAAf;YACMuB,MAAM,GAAG,EAAf;;UACIJ,SAAS,CAACK,OAAV,CAAkBH,UAAU,CAACI,MAAX,CAAkB,CAAlB,CAAlB,MAA4C,CAAC,CAAjD,EAAoD;QAChDzB,QAAQ,GAAGqB,UAAU,CAACI,MAAX,CAAkB,CAAlB,CAAX;QACAJ,UAAU,GAAGA,UAAU,CAACK,MAAX,CAAkB,CAAlB,CAAb;;;MAEJL,UAAU,CAAChE,KAAX,CAAiB,IAAjB,EAAuBN,OAAvB,CAA+B,UAAU4E,QAAV,EAAoB;YAC3Cb,GAAG,GAAG,4BAA4Bc,IAA5B,CAAiCD,QAAjC,CAAV;QACAJ,MAAM,CAACb,IAAP,CAAYL,SAAS,CAACC,OAAD,EAAUN,QAAV,EAAoBc,GAAG,CAAC,CAAD,CAAvB,EAA4BA,GAAG,CAAC,CAAD,CAAH,IAAUA,GAAG,CAAC,CAAD,CAAzC,CAArB;OAFJ;;UAIId,QAAQ,IAAIA,QAAQ,KAAK,GAA7B,EAAkC;YAC1B7B,SAAS,GAAG,GAAhB;;YACI6B,QAAQ,KAAK,GAAjB,EAAsB;UAClB7B,SAAS,GAAG,GAAZ;SADJ,MAGK,IAAI6B,QAAQ,KAAK,GAAjB,EAAsB;UACvB7B,SAAS,GAAG6B,QAAZ;;;eAEG,CAACuB,MAAM,CAAC7D,MAAP,KAAkB,CAAlB,GAAsBsC,QAAtB,GAAiC,EAAlC,IAAwCuB,MAAM,CAAC9C,IAAP,CAAYN,SAAZ,CAA/C;OARJ,MAUK;eACMoD,MAAM,CAAC9C,IAAP,CAAY,GAAZ,CAAP;;KAtBR,MAyBK;aACMa,cAAc,CAACgC,OAAD,CAArB;;GA3BD,CAAP;;;ACvIG,SAASO,KAAT,CAAejF,OAAf,EAAwB;;MAEvBO,MAAM,GAAGP,OAAO,CAACO,MAAR,CAAe2C,WAAf,EAAb,CAF2B;;MAIvB1C,GAAG,GAAG,CAACR,OAAO,CAACQ,GAAR,IAAe,GAAhB,EAAqBY,OAArB,CAA6B,cAA7B,EAA6C,OAA7C,CAAV;MACIV,OAAO,GAAGlB,MAAM,CAACU,MAAP,CAAc,EAAd,EAAkBF,OAAO,CAACU,OAA1B,CAAd;MACIwE,IAAJ;MACI5D,UAAU,GAAGgB,IAAI,CAACtC,OAAD,EAAU,CAC3B,QAD2B,EAE3B,SAF2B,EAG3B,KAH2B,EAI3B,SAJ2B,EAK3B,SAL2B,EAM3B,WAN2B,CAAV,CAArB,CAP2B;;QAgBrBmF,gBAAgB,GAAGlD,uBAAuB,CAACzB,GAAD,CAAhD;EACAA,GAAG,GAAG2D,QAAQ,CAAC3D,GAAD,CAAR,CAAc6D,MAAd,CAAqB/C,UAArB,CAAN;;MACI,CAAC,QAAQE,IAAR,CAAahB,GAAb,CAAL,EAAwB;IACpBA,GAAG,GAAGR,OAAO,CAACoF,OAAR,GAAkB5E,GAAxB;;;QAEE6E,iBAAiB,GAAG7F,MAAM,CAACC,IAAP,CAAYO,OAAZ,EACrBe,MADqB,CACdyB,MAAM,IAAI2C,gBAAgB,CAAClE,QAAjB,CAA0BuB,MAA1B,CADI,EAErBtB,MAFqB,CAEd,SAFc,CAA1B;QAGMoE,mBAAmB,GAAGhD,IAAI,CAAChB,UAAD,EAAa+D,iBAAb,CAAhC;QACME,eAAe,GAAG,6BAA6B/D,IAA7B,CAAkCd,OAAO,CAAC8E,MAA1C,CAAxB;;MACI,CAACD,eAAL,EAAsB;QACdvF,OAAO,CAACY,SAAR,CAAkB6E,MAAtB,EAA8B;;MAE1B/E,OAAO,CAAC8E,MAAR,GAAiB9E,OAAO,CAAC8E,MAAR,CACZ/E,KADY,CACN,GADM,EAEZU,GAFY,CAERH,OAAO,IAAIA,OAAO,CAACI,OAAR,CAAgB,kDAAhB,EAAqE,uBAAsBpB,OAAO,CAACY,SAAR,CAAkB6E,MAAO,EAApH,CAFH,EAGZ5D,IAHY,CAGP,GAHO,CAAjB;;;QAKA7B,OAAO,CAACY,SAAR,CAAkBC,QAAlB,CAA2BC,MAA/B,EAAuC;YAC7B4E,wBAAwB,GAAGhF,OAAO,CAAC8E,MAAR,CAAerD,KAAf,CAAqB,qBAArB,KAA+C,EAAhF;MACAzB,OAAO,CAAC8E,MAAR,GAAiBE,wBAAwB,CACpCxE,MADY,CACLlB,OAAO,CAACY,SAAR,CAAkBC,QADb,EAEZM,GAFY,CAERH,OAAO,IAAI;cACVyE,MAAM,GAAGzF,OAAO,CAACY,SAAR,CAAkB6E,MAAlB,GACR,IAAGzF,OAAO,CAACY,SAAR,CAAkB6E,MAAO,EADpB,GAET,OAFN;eAGQ,0BAAyBzE,OAAQ,WAAUyE,MAAO,EAA1D;OANa,EAQZ5D,IARY,CAQP,GARO,CAAjB;;GApCmB;;;;MAiDvB,CAAC,KAAD,EAAQ,MAAR,EAAgBZ,QAAhB,CAAyBV,MAAzB,CAAJ,EAAsC;IAClCC,GAAG,GAAGa,kBAAkB,CAACb,GAAD,EAAM8E,mBAAN,CAAxB;GADJ,MAGK;QACG,UAAUA,mBAAd,EAAmC;MAC/BJ,IAAI,GAAGI,mBAAmB,CAACK,IAA3B;KADJ,MAGK;UACGnG,MAAM,CAACC,IAAP,CAAY6F,mBAAZ,EAAiCxE,MAArC,EAA6C;QACzCoE,IAAI,GAAGI,mBAAP;OADJ,MAGK;QACD5E,OAAO,CAAC,gBAAD,CAAP,GAA4B,CAA5B;;;GA7De;;;MAkEvB,CAACA,OAAO,CAAC,cAAD,CAAR,IAA4B,OAAOwE,IAAP,KAAgB,WAAhD,EAA6D;IACzDxE,OAAO,CAAC,cAAD,CAAP,GAA0B,iCAA1B;GAnEuB;;;;MAuEvB,CAAC,OAAD,EAAU,KAAV,EAAiBO,QAAjB,CAA0BV,MAA1B,KAAqC,OAAO2E,IAAP,KAAgB,WAAzD,EAAsE;IAClEA,IAAI,GAAG,EAAP;GAxEuB;;;SA2EpB1F,MAAM,CAACU,MAAP,CAAc;IAAEK,MAAF;IAAUC,GAAV;IAAeE;GAA7B,EAAwC,OAAOwE,IAAP,KAAgB,WAAhB,GAA8B;IAAEA;GAAhC,GAAyC,IAAjF,EAAuFlF,OAAO,CAAC4F,OAAR,GAAkB;IAAEA,OAAO,EAAE5F,OAAO,CAAC4F;GAArC,GAAiD,IAAxI,CAAP;;;AC7EG,SAASC,oBAAT,CAA8B9F,QAA9B,EAAwCO,KAAxC,EAA+CN,OAA/C,EAAwD;SACpDiF,KAAK,CAAC5E,KAAK,CAACN,QAAD,EAAWO,KAAX,EAAkBN,OAAlB,CAAN,CAAZ;;;ACAG,SAAS8F,YAAT,CAAsBC,WAAtB,EAAmCC,WAAnC,EAAgD;QAC7CC,QAAQ,GAAG5F,KAAK,CAAC0F,WAAD,EAAcC,WAAd,CAAtB;QACME,QAAQ,GAAGL,oBAAoB,CAACvB,IAArB,CAA0B,IAA1B,EAAgC2B,QAAhC,CAAjB;SACOzG,MAAM,CAACU,MAAP,CAAcgG,QAAd,EAAwB;IAC3BD,QAD2B;IAE3BlG,QAAQ,EAAE+F,YAAY,CAACxB,IAAb,CAAkB,IAAlB,EAAwB2B,QAAxB,CAFiB;IAG3B5F,KAAK,EAAEA,KAAK,CAACiE,IAAN,CAAW,IAAX,EAAiB2B,QAAjB,CAHoB;IAI3BhB;GAJG,CAAP;;;ACNG,MAAMkB,OAAO,GAAG,mBAAhB;;ACEP,MAAMC,SAAS,GAAI,uBAAsBD,OAAQ,IAAGE,+BAAY,EAAG,EAAnE;;;AAGA,AAAO,MAAMJ,QAAQ,GAAG;EACpB1F,MAAM,EAAE,KADY;EAEpB6E,OAAO,EAAE,wBAFW;EAGpB1E,OAAO,EAAE;IACL8E,MAAM,EAAE,gCADH;kBAESY;GALE;EAOpBxF,SAAS,EAAE;IACP6E,MAAM,EAAE,EADD;IAEP5E,QAAQ,EAAE;;CATX;;MCHMqF,QAAQ,GAAGJ,YAAY,CAAC,IAAD,EAAOG,QAAP,CAA7B;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/endpoint/dist-src/defaults.js b/node_modules/@octokit/endpoint/dist-src/defaults.js new file mode 100644 index 00000000..e1e53fbc --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/defaults.js @@ -0,0 +1,17 @@ +import { getUserAgent } from "universal-user-agent"; +import { VERSION } from "./version"; +const userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`; +// DEFAULTS has all properties set that EndpointOptions has, except url. +// So we use RequestParameters and add method as additional required property. +export const DEFAULTS = { + method: "GET", + baseUrl: "https://api.github.com", + headers: { + accept: "application/vnd.github.v3+json", + "user-agent": userAgent + }, + mediaType: { + format: "", + previews: [] + } +}; diff --git a/node_modules/@octokit/endpoint/dist-src/endpoint-with-defaults.js b/node_modules/@octokit/endpoint/dist-src/endpoint-with-defaults.js new file mode 100644 index 00000000..5763758f --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/endpoint-with-defaults.js @@ -0,0 +1,5 @@ +import { merge } from "./merge"; +import { parse } from "./parse"; +export function endpointWithDefaults(defaults, route, options) { + return parse(merge(defaults, route, options)); +} diff --git a/node_modules/@octokit/endpoint/dist-src/index.js b/node_modules/@octokit/endpoint/dist-src/index.js new file mode 100644 index 00000000..599917f9 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/index.js @@ -0,0 +1,3 @@ +import { withDefaults } from "./with-defaults"; +import { DEFAULTS } from "./defaults"; +export const endpoint = withDefaults(null, DEFAULTS); diff --git a/node_modules/@octokit/endpoint/dist-src/merge.js b/node_modules/@octokit/endpoint/dist-src/merge.js new file mode 100644 index 00000000..a209ffa1 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/merge.js @@ -0,0 +1,22 @@ +import { lowercaseKeys } from "./util/lowercase-keys"; +import { mergeDeep } from "./util/merge-deep"; +export function merge(defaults, route, options) { + if (typeof route === "string") { + let [method, url] = route.split(" "); + options = Object.assign(url ? { method, url } : { url: method }, options); + } + else { + options = Object.assign({}, route); + } + // lowercase header names before merging with defaults to avoid duplicates + options.headers = lowercaseKeys(options.headers); + const mergedOptions = mergeDeep(defaults || {}, options); + // mediaType.previews arrays are merged, instead of overwritten + if (defaults && defaults.mediaType.previews.length) { + mergedOptions.mediaType.previews = defaults.mediaType.previews + .filter(preview => !mergedOptions.mediaType.previews.includes(preview)) + .concat(mergedOptions.mediaType.previews); + } + mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, "")); + return mergedOptions; +} diff --git a/node_modules/@octokit/endpoint/dist-src/parse.js b/node_modules/@octokit/endpoint/dist-src/parse.js new file mode 100644 index 00000000..ca68ca9f --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/parse.js @@ -0,0 +1,81 @@ +import { addQueryParameters } from "./util/add-query-parameters"; +import { extractUrlVariableNames } from "./util/extract-url-variable-names"; +import { omit } from "./util/omit"; +import { parseUrl } from "./util/url-template"; +export function parse(options) { + // https://fetch.spec.whatwg.org/#methods + let method = options.method.toUpperCase(); + // replace :varname with {varname} to make it RFC 6570 compatible + let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{+$1}"); + let headers = Object.assign({}, options.headers); + let body; + let parameters = omit(options, [ + "method", + "baseUrl", + "url", + "headers", + "request", + "mediaType" + ]); + // extract variable names from URL to calculate remaining variables later + const urlVariableNames = extractUrlVariableNames(url); + url = parseUrl(url).expand(parameters); + if (!/^http/.test(url)) { + url = options.baseUrl + url; + } + const omittedParameters = Object.keys(options) + .filter(option => urlVariableNames.includes(option)) + .concat("baseUrl"); + const remainingParameters = omit(parameters, omittedParameters); + const isBinaryRequset = /application\/octet-stream/i.test(headers.accept); + if (!isBinaryRequset) { + if (options.mediaType.format) { + // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw + headers.accept = headers.accept + .split(/,/) + .map(preview => preview.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`)) + .join(","); + } + if (options.mediaType.previews.length) { + const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || []; + headers.accept = previewsFromAcceptHeader + .concat(options.mediaType.previews) + .map(preview => { + const format = options.mediaType.format + ? `.${options.mediaType.format}` + : "+json"; + return `application/vnd.github.${preview}-preview${format}`; + }) + .join(","); + } + } + // for GET/HEAD requests, set URL query parameters from remaining parameters + // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters + if (["GET", "HEAD"].includes(method)) { + url = addQueryParameters(url, remainingParameters); + } + else { + if ("data" in remainingParameters) { + body = remainingParameters.data; + } + else { + if (Object.keys(remainingParameters).length) { + body = remainingParameters; + } + else { + headers["content-length"] = 0; + } + } + } + // default content-type for JSON if body is set + if (!headers["content-type"] && typeof body !== "undefined") { + headers["content-type"] = "application/json; charset=utf-8"; + } + // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body. + // fetch does not allow to set `content-length` header, but we can set body to an empty string + if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { + body = ""; + } + // Only return body/request keys if present + return Object.assign({ method, url, headers }, typeof body !== "undefined" ? { body } : null, options.request ? { request: options.request } : null); +} diff --git a/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js b/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js new file mode 100644 index 00000000..a78812f7 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js @@ -0,0 +1,21 @@ +export function addQueryParameters(url, parameters) { + const separator = /\?/.test(url) ? "&" : "?"; + const names = Object.keys(parameters); + if (names.length === 0) { + return url; + } + return (url + + separator + + names + .map(name => { + if (name === "q") { + return ("q=" + + parameters + .q.split("+") + .map(encodeURIComponent) + .join("+")); + } + return `${name}=${encodeURIComponent(parameters[name])}`; + }) + .join("&")); +} diff --git a/node_modules/@octokit/endpoint/dist-src/util/extract-url-variable-names.js b/node_modules/@octokit/endpoint/dist-src/util/extract-url-variable-names.js new file mode 100644 index 00000000..3e75db28 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/util/extract-url-variable-names.js @@ -0,0 +1,11 @@ +const urlVariableRegex = /\{[^}]+\}/g; +function removeNonChars(variableName) { + return variableName.replace(/^\W+|\W+$/g, "").split(/,/); +} +export function extractUrlVariableNames(url) { + const matches = url.match(urlVariableRegex); + if (!matches) { + return []; + } + return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); +} diff --git a/node_modules/@octokit/endpoint/dist-src/util/lowercase-keys.js b/node_modules/@octokit/endpoint/dist-src/util/lowercase-keys.js new file mode 100644 index 00000000..07806425 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/util/lowercase-keys.js @@ -0,0 +1,9 @@ +export function lowercaseKeys(object) { + if (!object) { + return {}; + } + return Object.keys(object).reduce((newObj, key) => { + newObj[key.toLowerCase()] = object[key]; + return newObj; + }, {}); +} diff --git a/node_modules/@octokit/endpoint/dist-src/util/merge-deep.js b/node_modules/@octokit/endpoint/dist-src/util/merge-deep.js new file mode 100644 index 00000000..d1c5402d --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/util/merge-deep.js @@ -0,0 +1,16 @@ +import isPlainObject from "is-plain-object"; +export function mergeDeep(defaults, options) { + const result = Object.assign({}, defaults); + Object.keys(options).forEach(key => { + if (isPlainObject(options[key])) { + if (!(key in defaults)) + Object.assign(result, { [key]: options[key] }); + else + result[key] = mergeDeep(defaults[key], options[key]); + } + else { + Object.assign(result, { [key]: options[key] }); + } + }); + return result; +} diff --git a/node_modules/@octokit/endpoint/dist-src/util/omit.js b/node_modules/@octokit/endpoint/dist-src/util/omit.js new file mode 100644 index 00000000..7e1aa6b4 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/util/omit.js @@ -0,0 +1,8 @@ +export function omit(object, keysToOmit) { + return Object.keys(object) + .filter(option => !keysToOmit.includes(option)) + .reduce((obj, key) => { + obj[key] = object[key]; + return obj; + }, {}); +} diff --git a/node_modules/@octokit/endpoint/dist-src/util/url-template.js b/node_modules/@octokit/endpoint/dist-src/util/url-template.js new file mode 100644 index 00000000..f6d9885e --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/util/url-template.js @@ -0,0 +1,170 @@ +// Based on https://github.com/bramstein/url-template, licensed under BSD +// TODO: create separate package. +// +// Copyright (c) 2012-2014, Bram Stein +// All rights reserved. +// 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 COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +/* istanbul ignore file */ +function encodeReserved(str) { + return str + .split(/(%[0-9A-Fa-f]{2})/g) + .map(function (part) { + if (!/%[0-9A-Fa-f]/.test(part)) { + part = encodeURI(part) + .replace(/%5B/g, "[") + .replace(/%5D/g, "]"); + } + return part; + }) + .join(""); +} +function encodeUnreserved(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return ("%" + + c + .charCodeAt(0) + .toString(16) + .toUpperCase()); + }); +} +function encodeValue(operator, value, key) { + value = + operator === "+" || operator === "#" + ? encodeReserved(value) + : encodeUnreserved(value); + if (key) { + return encodeUnreserved(key) + "=" + value; + } + else { + return value; + } +} +function isDefined(value) { + return value !== undefined && value !== null; +} +function isKeyOperator(operator) { + return operator === ";" || operator === "&" || operator === "?"; +} +function getValues(context, operator, key, modifier) { + var value = context[key], result = []; + if (isDefined(value) && value !== "") { + if (typeof value === "string" || + typeof value === "number" || + typeof value === "boolean") { + value = value.toString(); + if (modifier && modifier !== "*") { + value = value.substring(0, parseInt(modifier, 10)); + } + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + } + else { + if (modifier === "*") { + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + }); + } + else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + result.push(encodeValue(operator, value[k], k)); + } + }); + } + } + else { + const tmp = []; + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + tmp.push(encodeValue(operator, value)); + }); + } + else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + tmp.push(encodeUnreserved(k)); + tmp.push(encodeValue(operator, value[k].toString())); + } + }); + } + if (isKeyOperator(operator)) { + result.push(encodeUnreserved(key) + "=" + tmp.join(",")); + } + else if (tmp.length !== 0) { + result.push(tmp.join(",")); + } + } + } + } + else { + if (operator === ";") { + if (isDefined(value)) { + result.push(encodeUnreserved(key)); + } + } + else if (value === "" && (operator === "&" || operator === "?")) { + result.push(encodeUnreserved(key) + "="); + } + else if (value === "") { + result.push(""); + } + } + return result; +} +export function parseUrl(template) { + return { + expand: expand.bind(null, template) + }; +} +function expand(template, context) { + var operators = ["+", "#", ".", "/", ";", "?", "&"]; + return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) { + if (expression) { + let operator = ""; + const values = []; + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); + } + expression.split(/,/g).forEach(function (variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); + }); + if (operator && operator !== "+") { + var separator = ","; + if (operator === "?") { + separator = "&"; + } + else if (operator !== "#") { + separator = operator; + } + return (values.length !== 0 ? operator : "") + values.join(separator); + } + else { + return values.join(","); + } + } + else { + return encodeReserved(literal); + } + }); +} diff --git a/node_modules/@octokit/endpoint/dist-src/version.js b/node_modules/@octokit/endpoint/dist-src/version.js new file mode 100644 index 00000000..ef913979 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/version.js @@ -0,0 +1 @@ +export const VERSION = "5.5.1"; diff --git a/node_modules/@octokit/endpoint/dist-src/with-defaults.js b/node_modules/@octokit/endpoint/dist-src/with-defaults.js new file mode 100644 index 00000000..9a1c886a --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/with-defaults.js @@ -0,0 +1,13 @@ +import { endpointWithDefaults } from "./endpoint-with-defaults"; +import { merge } from "./merge"; +import { parse } from "./parse"; +export function withDefaults(oldDefaults, newDefaults) { + const DEFAULTS = merge(oldDefaults, newDefaults); + const endpoint = endpointWithDefaults.bind(null, DEFAULTS); + return Object.assign(endpoint, { + DEFAULTS, + defaults: withDefaults.bind(null, DEFAULTS), + merge: merge.bind(null, DEFAULTS), + parse + }); +} diff --git a/node_modules/@octokit/endpoint/dist-types/defaults.d.ts b/node_modules/@octokit/endpoint/dist-types/defaults.d.ts new file mode 100644 index 00000000..30fcd203 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/defaults.d.ts @@ -0,0 +1,2 @@ +import { EndpointDefaults } from "@octokit/types"; +export declare const DEFAULTS: EndpointDefaults; diff --git a/node_modules/@octokit/endpoint/dist-types/endpoint-with-defaults.d.ts b/node_modules/@octokit/endpoint/dist-types/endpoint-with-defaults.d.ts new file mode 100644 index 00000000..ff39e5e7 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/endpoint-with-defaults.d.ts @@ -0,0 +1,3 @@ +import { EndpointOptions, RequestParameters, Route } from "@octokit/types"; +import { DEFAULTS } from "./defaults"; +export declare function endpointWithDefaults(defaults: typeof DEFAULTS, route: Route | EndpointOptions, options?: RequestParameters): import("@octokit/types").RequestOptions; diff --git a/node_modules/@octokit/endpoint/dist-types/index.d.ts b/node_modules/@octokit/endpoint/dist-types/index.d.ts new file mode 100644 index 00000000..17be8553 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/index.d.ts @@ -0,0 +1 @@ +export declare const endpoint: import("@octokit/types").EndpointInterface; diff --git a/node_modules/@octokit/endpoint/dist-types/merge.d.ts b/node_modules/@octokit/endpoint/dist-types/merge.d.ts new file mode 100644 index 00000000..b75a15ec --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/merge.d.ts @@ -0,0 +1,2 @@ +import { EndpointDefaults, RequestParameters, Route } from "@octokit/types"; +export declare function merge(defaults: EndpointDefaults | null, route?: Route | RequestParameters, options?: RequestParameters): EndpointDefaults; diff --git a/node_modules/@octokit/endpoint/dist-types/parse.d.ts b/node_modules/@octokit/endpoint/dist-types/parse.d.ts new file mode 100644 index 00000000..fbe21440 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/parse.d.ts @@ -0,0 +1,2 @@ +import { EndpointDefaults, RequestOptions } from "@octokit/types"; +export declare function parse(options: EndpointDefaults): RequestOptions; diff --git a/node_modules/@octokit/endpoint/dist-types/util/add-query-parameters.d.ts b/node_modules/@octokit/endpoint/dist-types/util/add-query-parameters.d.ts new file mode 100644 index 00000000..4b192ac4 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/util/add-query-parameters.d.ts @@ -0,0 +1,4 @@ +export declare function addQueryParameters(url: string, parameters: { + [x: string]: string | undefined; + q?: string; +}): string; diff --git a/node_modules/@octokit/endpoint/dist-types/util/extract-url-variable-names.d.ts b/node_modules/@octokit/endpoint/dist-types/util/extract-url-variable-names.d.ts new file mode 100644 index 00000000..93586d4d --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/util/extract-url-variable-names.d.ts @@ -0,0 +1 @@ +export declare function extractUrlVariableNames(url: string): string[]; diff --git a/node_modules/@octokit/endpoint/dist-types/util/lowercase-keys.d.ts b/node_modules/@octokit/endpoint/dist-types/util/lowercase-keys.d.ts new file mode 100644 index 00000000..1daf3073 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/util/lowercase-keys.d.ts @@ -0,0 +1,5 @@ +export declare function lowercaseKeys(object?: { + [key: string]: any; +}): { + [key: string]: any; +}; diff --git a/node_modules/@octokit/endpoint/dist-types/util/merge-deep.d.ts b/node_modules/@octokit/endpoint/dist-types/util/merge-deep.d.ts new file mode 100644 index 00000000..914411cf --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/util/merge-deep.d.ts @@ -0,0 +1 @@ +export declare function mergeDeep(defaults: any, options: any): object; diff --git a/node_modules/@octokit/endpoint/dist-types/util/omit.d.ts b/node_modules/@octokit/endpoint/dist-types/util/omit.d.ts new file mode 100644 index 00000000..06927d6b --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/util/omit.d.ts @@ -0,0 +1,5 @@ +export declare function omit(object: { + [key: string]: any; +}, keysToOmit: string[]): { + [key: string]: any; +}; diff --git a/node_modules/@octokit/endpoint/dist-types/util/url-template.d.ts b/node_modules/@octokit/endpoint/dist-types/util/url-template.d.ts new file mode 100644 index 00000000..5d967cab --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/util/url-template.d.ts @@ -0,0 +1,3 @@ +export declare function parseUrl(template: string): { + expand: (context: object) => string; +}; diff --git a/node_modules/@octokit/endpoint/dist-types/version.d.ts b/node_modules/@octokit/endpoint/dist-types/version.d.ts new file mode 100644 index 00000000..809d28a7 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "5.5.1"; diff --git a/node_modules/@octokit/endpoint/dist-types/with-defaults.d.ts b/node_modules/@octokit/endpoint/dist-types/with-defaults.d.ts new file mode 100644 index 00000000..6f5afd1e --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/with-defaults.d.ts @@ -0,0 +1,2 @@ +import { EndpointInterface, RequestParameters, EndpointDefaults } from "@octokit/types"; +export declare function withDefaults(oldDefaults: EndpointDefaults | null, newDefaults: RequestParameters): EndpointInterface; diff --git a/node_modules/@octokit/endpoint/dist-web/index.js b/node_modules/@octokit/endpoint/dist-web/index.js new file mode 100644 index 00000000..a327238b --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-web/index.js @@ -0,0 +1,379 @@ +import isPlainObject from 'is-plain-object'; +import { getUserAgent } from 'universal-user-agent'; + +function lowercaseKeys(object) { + if (!object) { + return {}; + } + return Object.keys(object).reduce((newObj, key) => { + newObj[key.toLowerCase()] = object[key]; + return newObj; + }, {}); +} + +function mergeDeep(defaults, options) { + const result = Object.assign({}, defaults); + Object.keys(options).forEach(key => { + if (isPlainObject(options[key])) { + if (!(key in defaults)) + Object.assign(result, { [key]: options[key] }); + else + result[key] = mergeDeep(defaults[key], options[key]); + } + else { + Object.assign(result, { [key]: options[key] }); + } + }); + return result; +} + +function merge(defaults, route, options) { + if (typeof route === "string") { + let [method, url] = route.split(" "); + options = Object.assign(url ? { method, url } : { url: method }, options); + } + else { + options = Object.assign({}, route); + } + // lowercase header names before merging with defaults to avoid duplicates + options.headers = lowercaseKeys(options.headers); + const mergedOptions = mergeDeep(defaults || {}, options); + // mediaType.previews arrays are merged, instead of overwritten + if (defaults && defaults.mediaType.previews.length) { + mergedOptions.mediaType.previews = defaults.mediaType.previews + .filter(preview => !mergedOptions.mediaType.previews.includes(preview)) + .concat(mergedOptions.mediaType.previews); + } + mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, "")); + return mergedOptions; +} + +function addQueryParameters(url, parameters) { + const separator = /\?/.test(url) ? "&" : "?"; + const names = Object.keys(parameters); + if (names.length === 0) { + return url; + } + return (url + + separator + + names + .map(name => { + if (name === "q") { + return ("q=" + + parameters + .q.split("+") + .map(encodeURIComponent) + .join("+")); + } + return `${name}=${encodeURIComponent(parameters[name])}`; + }) + .join("&")); +} + +const urlVariableRegex = /\{[^}]+\}/g; +function removeNonChars(variableName) { + return variableName.replace(/^\W+|\W+$/g, "").split(/,/); +} +function extractUrlVariableNames(url) { + const matches = url.match(urlVariableRegex); + if (!matches) { + return []; + } + return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); +} + +function omit(object, keysToOmit) { + return Object.keys(object) + .filter(option => !keysToOmit.includes(option)) + .reduce((obj, key) => { + obj[key] = object[key]; + return obj; + }, {}); +} + +// Based on https://github.com/bramstein/url-template, licensed under BSD +// TODO: create separate package. +// +// Copyright (c) 2012-2014, Bram Stein +// All rights reserved. +// 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 COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +/* istanbul ignore file */ +function encodeReserved(str) { + return str + .split(/(%[0-9A-Fa-f]{2})/g) + .map(function (part) { + if (!/%[0-9A-Fa-f]/.test(part)) { + part = encodeURI(part) + .replace(/%5B/g, "[") + .replace(/%5D/g, "]"); + } + return part; + }) + .join(""); +} +function encodeUnreserved(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return ("%" + + c + .charCodeAt(0) + .toString(16) + .toUpperCase()); + }); +} +function encodeValue(operator, value, key) { + value = + operator === "+" || operator === "#" + ? encodeReserved(value) + : encodeUnreserved(value); + if (key) { + return encodeUnreserved(key) + "=" + value; + } + else { + return value; + } +} +function isDefined(value) { + return value !== undefined && value !== null; +} +function isKeyOperator(operator) { + return operator === ";" || operator === "&" || operator === "?"; +} +function getValues(context, operator, key, modifier) { + var value = context[key], result = []; + if (isDefined(value) && value !== "") { + if (typeof value === "string" || + typeof value === "number" || + typeof value === "boolean") { + value = value.toString(); + if (modifier && modifier !== "*") { + value = value.substring(0, parseInt(modifier, 10)); + } + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + } + else { + if (modifier === "*") { + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + }); + } + else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + result.push(encodeValue(operator, value[k], k)); + } + }); + } + } + else { + const tmp = []; + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + tmp.push(encodeValue(operator, value)); + }); + } + else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + tmp.push(encodeUnreserved(k)); + tmp.push(encodeValue(operator, value[k].toString())); + } + }); + } + if (isKeyOperator(operator)) { + result.push(encodeUnreserved(key) + "=" + tmp.join(",")); + } + else if (tmp.length !== 0) { + result.push(tmp.join(",")); + } + } + } + } + else { + if (operator === ";") { + if (isDefined(value)) { + result.push(encodeUnreserved(key)); + } + } + else if (value === "" && (operator === "&" || operator === "?")) { + result.push(encodeUnreserved(key) + "="); + } + else if (value === "") { + result.push(""); + } + } + return result; +} +function parseUrl(template) { + return { + expand: expand.bind(null, template) + }; +} +function expand(template, context) { + var operators = ["+", "#", ".", "/", ";", "?", "&"]; + return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) { + if (expression) { + let operator = ""; + const values = []; + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); + } + expression.split(/,/g).forEach(function (variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); + }); + if (operator && operator !== "+") { + var separator = ","; + if (operator === "?") { + separator = "&"; + } + else if (operator !== "#") { + separator = operator; + } + return (values.length !== 0 ? operator : "") + values.join(separator); + } + else { + return values.join(","); + } + } + else { + return encodeReserved(literal); + } + }); +} + +function parse(options) { + // https://fetch.spec.whatwg.org/#methods + let method = options.method.toUpperCase(); + // replace :varname with {varname} to make it RFC 6570 compatible + let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{+$1}"); + let headers = Object.assign({}, options.headers); + let body; + let parameters = omit(options, [ + "method", + "baseUrl", + "url", + "headers", + "request", + "mediaType" + ]); + // extract variable names from URL to calculate remaining variables later + const urlVariableNames = extractUrlVariableNames(url); + url = parseUrl(url).expand(parameters); + if (!/^http/.test(url)) { + url = options.baseUrl + url; + } + const omittedParameters = Object.keys(options) + .filter(option => urlVariableNames.includes(option)) + .concat("baseUrl"); + const remainingParameters = omit(parameters, omittedParameters); + const isBinaryRequset = /application\/octet-stream/i.test(headers.accept); + if (!isBinaryRequset) { + if (options.mediaType.format) { + // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw + headers.accept = headers.accept + .split(/,/) + .map(preview => preview.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`)) + .join(","); + } + if (options.mediaType.previews.length) { + const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || []; + headers.accept = previewsFromAcceptHeader + .concat(options.mediaType.previews) + .map(preview => { + const format = options.mediaType.format + ? `.${options.mediaType.format}` + : "+json"; + return `application/vnd.github.${preview}-preview${format}`; + }) + .join(","); + } + } + // for GET/HEAD requests, set URL query parameters from remaining parameters + // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters + if (["GET", "HEAD"].includes(method)) { + url = addQueryParameters(url, remainingParameters); + } + else { + if ("data" in remainingParameters) { + body = remainingParameters.data; + } + else { + if (Object.keys(remainingParameters).length) { + body = remainingParameters; + } + else { + headers["content-length"] = 0; + } + } + } + // default content-type for JSON if body is set + if (!headers["content-type"] && typeof body !== "undefined") { + headers["content-type"] = "application/json; charset=utf-8"; + } + // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body. + // fetch does not allow to set `content-length` header, but we can set body to an empty string + if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { + body = ""; + } + // Only return body/request keys if present + return Object.assign({ method, url, headers }, typeof body !== "undefined" ? { body } : null, options.request ? { request: options.request } : null); +} + +function endpointWithDefaults(defaults, route, options) { + return parse(merge(defaults, route, options)); +} + +function withDefaults(oldDefaults, newDefaults) { + const DEFAULTS = merge(oldDefaults, newDefaults); + const endpoint = endpointWithDefaults.bind(null, DEFAULTS); + return Object.assign(endpoint, { + DEFAULTS, + defaults: withDefaults.bind(null, DEFAULTS), + merge: merge.bind(null, DEFAULTS), + parse + }); +} + +const VERSION = "5.5.1"; + +const userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`; +// DEFAULTS has all properties set that EndpointOptions has, except url. +// So we use RequestParameters and add method as additional required property. +const DEFAULTS = { + method: "GET", + baseUrl: "https://api.github.com", + headers: { + accept: "application/vnd.github.v3+json", + "user-agent": userAgent + }, + mediaType: { + format: "", + previews: [] + } +}; + +const endpoint = withDefaults(null, DEFAULTS); + +export { endpoint }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/endpoint/dist-web/index.js.map b/node_modules/@octokit/endpoint/dist-web/index.js.map new file mode 100644 index 00000000..68900096 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/util/lowercase-keys.js","../dist-src/util/merge-deep.js","../dist-src/merge.js","../dist-src/util/add-query-parameters.js","../dist-src/util/extract-url-variable-names.js","../dist-src/util/omit.js","../dist-src/util/url-template.js","../dist-src/parse.js","../dist-src/endpoint-with-defaults.js","../dist-src/with-defaults.js","../dist-src/version.js","../dist-src/defaults.js","../dist-src/index.js"],"sourcesContent":["export function lowercaseKeys(object) {\n if (!object) {\n return {};\n }\n return Object.keys(object).reduce((newObj, key) => {\n newObj[key.toLowerCase()] = object[key];\n return newObj;\n }, {});\n}\n","import isPlainObject from \"is-plain-object\";\nexport function mergeDeep(defaults, options) {\n const result = Object.assign({}, defaults);\n Object.keys(options).forEach(key => {\n if (isPlainObject(options[key])) {\n if (!(key in defaults))\n Object.assign(result, { [key]: options[key] });\n else\n result[key] = mergeDeep(defaults[key], options[key]);\n }\n else {\n Object.assign(result, { [key]: options[key] });\n }\n });\n return result;\n}\n","import { lowercaseKeys } from \"./util/lowercase-keys\";\nimport { mergeDeep } from \"./util/merge-deep\";\nexport function merge(defaults, route, options) {\n if (typeof route === \"string\") {\n let [method, url] = route.split(\" \");\n options = Object.assign(url ? { method, url } : { url: method }, options);\n }\n else {\n options = Object.assign({}, route);\n }\n // lowercase header names before merging with defaults to avoid duplicates\n options.headers = lowercaseKeys(options.headers);\n const mergedOptions = mergeDeep(defaults || {}, options);\n // mediaType.previews arrays are merged, instead of overwritten\n if (defaults && defaults.mediaType.previews.length) {\n mergedOptions.mediaType.previews = defaults.mediaType.previews\n .filter(preview => !mergedOptions.mediaType.previews.includes(preview))\n .concat(mergedOptions.mediaType.previews);\n }\n mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, \"\"));\n return mergedOptions;\n}\n","export function addQueryParameters(url, parameters) {\n const separator = /\\?/.test(url) ? \"&\" : \"?\";\n const names = Object.keys(parameters);\n if (names.length === 0) {\n return url;\n }\n return (url +\n separator +\n names\n .map(name => {\n if (name === \"q\") {\n return (\"q=\" +\n parameters\n .q.split(\"+\")\n .map(encodeURIComponent)\n .join(\"+\"));\n }\n return `${name}=${encodeURIComponent(parameters[name])}`;\n })\n .join(\"&\"));\n}\n","const urlVariableRegex = /\\{[^}]+\\}/g;\nfunction removeNonChars(variableName) {\n return variableName.replace(/^\\W+|\\W+$/g, \"\").split(/,/);\n}\nexport function extractUrlVariableNames(url) {\n const matches = url.match(urlVariableRegex);\n if (!matches) {\n return [];\n }\n return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);\n}\n","export function omit(object, keysToOmit) {\n return Object.keys(object)\n .filter(option => !keysToOmit.includes(option))\n .reduce((obj, key) => {\n obj[key] = object[key];\n return obj;\n }, {});\n}\n","// Based on https://github.com/bramstein/url-template, licensed under BSD\n// TODO: create separate package.\n//\n// Copyright (c) 2012-2014, Bram Stein\n// All rights reserved.\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions\n// are met:\n// 1. Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// 2. Redistributions in binary form must reproduce the above copyright\n// notice, this list of conditions and the following disclaimer in the\n// documentation and/or other materials provided with the distribution.\n// 3. The name of the author may not be used to endorse or promote products\n// derived from this software without specific prior written permission.\n// THIS SOFTWARE IS PROVIDED BY THE AUTHOR \"AS IS\" AND ANY EXPRESS OR IMPLIED\n// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n/* istanbul ignore file */\nfunction encodeReserved(str) {\n return str\n .split(/(%[0-9A-Fa-f]{2})/g)\n .map(function (part) {\n if (!/%[0-9A-Fa-f]/.test(part)) {\n part = encodeURI(part)\n .replace(/%5B/g, \"[\")\n .replace(/%5D/g, \"]\");\n }\n return part;\n })\n .join(\"\");\n}\nfunction encodeUnreserved(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return (\"%\" +\n c\n .charCodeAt(0)\n .toString(16)\n .toUpperCase());\n });\n}\nfunction encodeValue(operator, value, key) {\n value =\n operator === \"+\" || operator === \"#\"\n ? encodeReserved(value)\n : encodeUnreserved(value);\n if (key) {\n return encodeUnreserved(key) + \"=\" + value;\n }\n else {\n return value;\n }\n}\nfunction isDefined(value) {\n return value !== undefined && value !== null;\n}\nfunction isKeyOperator(operator) {\n return operator === \";\" || operator === \"&\" || operator === \"?\";\n}\nfunction getValues(context, operator, key, modifier) {\n var value = context[key], result = [];\n if (isDefined(value) && value !== \"\") {\n if (typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\") {\n value = value.toString();\n if (modifier && modifier !== \"*\") {\n value = value.substring(0, parseInt(modifier, 10));\n }\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n }\n else {\n if (modifier === \"*\") {\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n result.push(encodeValue(operator, value[k], k));\n }\n });\n }\n }\n else {\n const tmp = [];\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n tmp.push(encodeValue(operator, value));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n tmp.push(encodeUnreserved(k));\n tmp.push(encodeValue(operator, value[k].toString()));\n }\n });\n }\n if (isKeyOperator(operator)) {\n result.push(encodeUnreserved(key) + \"=\" + tmp.join(\",\"));\n }\n else if (tmp.length !== 0) {\n result.push(tmp.join(\",\"));\n }\n }\n }\n }\n else {\n if (operator === \";\") {\n if (isDefined(value)) {\n result.push(encodeUnreserved(key));\n }\n }\n else if (value === \"\" && (operator === \"&\" || operator === \"?\")) {\n result.push(encodeUnreserved(key) + \"=\");\n }\n else if (value === \"\") {\n result.push(\"\");\n }\n }\n return result;\n}\nexport function parseUrl(template) {\n return {\n expand: expand.bind(null, template)\n };\n}\nfunction expand(template, context) {\n var operators = [\"+\", \"#\", \".\", \"/\", \";\", \"?\", \"&\"];\n return template.replace(/\\{([^\\{\\}]+)\\}|([^\\{\\}]+)/g, function (_, expression, literal) {\n if (expression) {\n let operator = \"\";\n const values = [];\n if (operators.indexOf(expression.charAt(0)) !== -1) {\n operator = expression.charAt(0);\n expression = expression.substr(1);\n }\n expression.split(/,/g).forEach(function (variable) {\n var tmp = /([^:\\*]*)(?::(\\d+)|(\\*))?/.exec(variable);\n values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\n });\n if (operator && operator !== \"+\") {\n var separator = \",\";\n if (operator === \"?\") {\n separator = \"&\";\n }\n else if (operator !== \"#\") {\n separator = operator;\n }\n return (values.length !== 0 ? operator : \"\") + values.join(separator);\n }\n else {\n return values.join(\",\");\n }\n }\n else {\n return encodeReserved(literal);\n }\n });\n}\n","import { addQueryParameters } from \"./util/add-query-parameters\";\nimport { extractUrlVariableNames } from \"./util/extract-url-variable-names\";\nimport { omit } from \"./util/omit\";\nimport { parseUrl } from \"./util/url-template\";\nexport function parse(options) {\n // https://fetch.spec.whatwg.org/#methods\n let method = options.method.toUpperCase();\n // replace :varname with {varname} to make it RFC 6570 compatible\n let url = (options.url || \"/\").replace(/:([a-z]\\w+)/g, \"{+$1}\");\n let headers = Object.assign({}, options.headers);\n let body;\n let parameters = omit(options, [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"mediaType\"\n ]);\n // extract variable names from URL to calculate remaining variables later\n const urlVariableNames = extractUrlVariableNames(url);\n url = parseUrl(url).expand(parameters);\n if (!/^http/.test(url)) {\n url = options.baseUrl + url;\n }\n const omittedParameters = Object.keys(options)\n .filter(option => urlVariableNames.includes(option))\n .concat(\"baseUrl\");\n const remainingParameters = omit(parameters, omittedParameters);\n const isBinaryRequset = /application\\/octet-stream/i.test(headers.accept);\n if (!isBinaryRequset) {\n if (options.mediaType.format) {\n // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw\n headers.accept = headers.accept\n .split(/,/)\n .map(preview => preview.replace(/application\\/vnd(\\.\\w+)(\\.v3)?(\\.\\w+)?(\\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`))\n .join(\",\");\n }\n if (options.mediaType.previews.length) {\n const previewsFromAcceptHeader = headers.accept.match(/[\\w-]+(?=-preview)/g) || [];\n headers.accept = previewsFromAcceptHeader\n .concat(options.mediaType.previews)\n .map(preview => {\n const format = options.mediaType.format\n ? `.${options.mediaType.format}`\n : \"+json\";\n return `application/vnd.github.${preview}-preview${format}`;\n })\n .join(\",\");\n }\n }\n // for GET/HEAD requests, set URL query parameters from remaining parameters\n // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters\n if ([\"GET\", \"HEAD\"].includes(method)) {\n url = addQueryParameters(url, remainingParameters);\n }\n else {\n if (\"data\" in remainingParameters) {\n body = remainingParameters.data;\n }\n else {\n if (Object.keys(remainingParameters).length) {\n body = remainingParameters;\n }\n else {\n headers[\"content-length\"] = 0;\n }\n }\n }\n // default content-type for JSON if body is set\n if (!headers[\"content-type\"] && typeof body !== \"undefined\") {\n headers[\"content-type\"] = \"application/json; charset=utf-8\";\n }\n // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body.\n // fetch does not allow to set `content-length` header, but we can set body to an empty string\n if ([\"PATCH\", \"PUT\"].includes(method) && typeof body === \"undefined\") {\n body = \"\";\n }\n // Only return body/request keys if present\n return Object.assign({ method, url, headers }, typeof body !== \"undefined\" ? { body } : null, options.request ? { request: options.request } : null);\n}\n","import { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function endpointWithDefaults(defaults, route, options) {\n return parse(merge(defaults, route, options));\n}\n","import { endpointWithDefaults } from \"./endpoint-with-defaults\";\nimport { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function withDefaults(oldDefaults, newDefaults) {\n const DEFAULTS = merge(oldDefaults, newDefaults);\n const endpoint = endpointWithDefaults.bind(null, DEFAULTS);\n return Object.assign(endpoint, {\n DEFAULTS,\n defaults: withDefaults.bind(null, DEFAULTS),\n merge: merge.bind(null, DEFAULTS),\n parse\n });\n}\n","export const VERSION = \"5.5.1\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nconst userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`;\n// DEFAULTS has all properties set that EndpointOptions has, except url.\n// So we use RequestParameters and add method as additional required property.\nexport const DEFAULTS = {\n method: \"GET\",\n baseUrl: \"https://api.github.com\",\n headers: {\n accept: \"application/vnd.github.v3+json\",\n \"user-agent\": userAgent\n },\n mediaType: {\n format: \"\",\n previews: []\n }\n};\n","import { withDefaults } from \"./with-defaults\";\nimport { DEFAULTS } from \"./defaults\";\nexport const endpoint = withDefaults(null, DEFAULTS);\n"],"names":[],"mappings":";;;AAAO,SAAS,aAAa,CAAC,MAAM,EAAE;IAClC,IAAI,CAAC,MAAM,EAAE;QACT,OAAO,EAAE,CAAC;KACb;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK;QAC/C,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QACxC,OAAO,MAAM,CAAC;KACjB,EAAE,EAAE,CAAC,CAAC;CACV;;ACPM,SAAS,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE;IACzC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;IAC3C,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,GAAG,IAAI;QAChC,IAAI,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE;YAC7B,IAAI,EAAE,GAAG,IAAI,QAAQ,CAAC;gBAClB,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;;gBAE/C,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;SAC5D;aACI;YACD,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;SAClD;KACJ,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;CACjB;;ACbM,SAAS,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE;IAC5C,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC3B,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACrC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;KAC7E;SACI;QACD,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;KACtC;;IAED,OAAO,CAAC,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACjD,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;;IAEzD,IAAI,QAAQ,IAAI,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE;QAChD,aAAa,CAAC,SAAS,CAAC,QAAQ,GAAG,QAAQ,CAAC,SAAS,CAAC,QAAQ;aACzD,MAAM,CAAC,OAAO,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;aACtE,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;KACjD;IACD,aAAa,CAAC,SAAS,CAAC,QAAQ,GAAG,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,CAAC;IACtH,OAAO,aAAa,CAAC;CACxB;;ACrBM,SAAS,kBAAkB,CAAC,GAAG,EAAE,UAAU,EAAE;IAChD,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC;IAC7C,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACtC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QACpB,OAAO,GAAG,CAAC;KACd;IACD,QAAQ,GAAG;QACP,SAAS;QACT,KAAK;aACA,GAAG,CAAC,IAAI,IAAI;YACb,IAAI,IAAI,KAAK,GAAG,EAAE;gBACd,QAAQ,IAAI;oBACR,UAAU;yBACL,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC;yBACZ,GAAG,CAAC,kBAAkB,CAAC;yBACvB,IAAI,CAAC,GAAG,CAAC,EAAE;aACvB;YACD,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;SAC5D,CAAC;aACG,IAAI,CAAC,GAAG,CAAC,EAAE;CACvB;;ACpBD,MAAM,gBAAgB,GAAG,YAAY,CAAC;AACtC,SAAS,cAAc,CAAC,YAAY,EAAE;IAClC,OAAO,YAAY,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;CAC5D;AACD,AAAO,SAAS,uBAAuB,CAAC,GAAG,EAAE;IACzC,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;IAC5C,IAAI,CAAC,OAAO,EAAE;QACV,OAAO,EAAE,CAAC;KACb;IACD,OAAO,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;CACxE;;ACVM,SAAS,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE;IACrC,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;SACrB,MAAM,CAAC,MAAM,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;SAC9C,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK;QACtB,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QACvB,OAAO,GAAG,CAAC;KACd,EAAE,EAAE,CAAC,CAAC;CACV;;ACPD;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,SAAS,cAAc,CAAC,GAAG,EAAE;IACzB,OAAO,GAAG;SACL,KAAK,CAAC,oBAAoB,CAAC;SAC3B,GAAG,CAAC,UAAU,IAAI,EAAE;QACrB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;YAC5B,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC;iBACjB,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;iBACpB,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC;KACf,CAAC;SACG,IAAI,CAAC,EAAE,CAAC,CAAC;CACjB;AACD,SAAS,gBAAgB,CAAC,GAAG,EAAE;IAC3B,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE;QAC5D,QAAQ,GAAG;YACP,CAAC;iBACI,UAAU,CAAC,CAAC,CAAC;iBACb,QAAQ,CAAC,EAAE,CAAC;iBACZ,WAAW,EAAE,EAAE;KAC3B,CAAC,CAAC;CACN;AACD,SAAS,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE;IACvC,KAAK;QACD,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG;cAC9B,cAAc,CAAC,KAAK,CAAC;cACrB,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAClC,IAAI,GAAG,EAAE;QACL,OAAO,gBAAgB,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,KAAK,CAAC;KAC9C;SACI;QACD,OAAO,KAAK,CAAC;KAChB;CACJ;AACD,SAAS,SAAS,CAAC,KAAK,EAAE;IACtB,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC;CAChD;AACD,SAAS,aAAa,CAAC,QAAQ,EAAE;IAC7B,OAAO,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,CAAC;CACnE;AACD,SAAS,SAAS,CAAC,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE;IACjD,IAAI,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,EAAE,CAAC;IACtC,IAAI,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,EAAE,EAAE;QAClC,IAAI,OAAO,KAAK,KAAK,QAAQ;YACzB,OAAO,KAAK,KAAK,QAAQ;YACzB,OAAO,KAAK,KAAK,SAAS,EAAE;YAC5B,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;YACzB,IAAI,QAAQ,IAAI,QAAQ,KAAK,GAAG,EAAE;gBAC9B,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;aACtD;YACD,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;SACjF;aACI;YACD,IAAI,QAAQ,KAAK,GAAG,EAAE;gBAClB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;oBACtB,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,UAAU,KAAK,EAAE;wBAC7C,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;qBACjF,CAAC,CAAC;iBACN;qBACI;oBACD,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;wBACpC,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;4BACrB,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;yBACnD;qBACJ,CAAC,CAAC;iBACN;aACJ;iBACI;gBACD,MAAM,GAAG,GAAG,EAAE,CAAC;gBACf,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;oBACtB,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,UAAU,KAAK,EAAE;wBAC7C,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;qBAC1C,CAAC,CAAC;iBACN;qBACI;oBACD,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;wBACpC,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;4BACrB,GAAG,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;4BAC9B,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;yBACxD;qBACJ,CAAC,CAAC;iBACN;gBACD,IAAI,aAAa,CAAC,QAAQ,CAAC,EAAE;oBACzB,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;iBAC5D;qBACI,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;oBACvB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;iBAC9B;aACJ;SACJ;KACJ;SACI;QACD,IAAI,QAAQ,KAAK,GAAG,EAAE;YAClB,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE;gBAClB,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC;aACtC;SACJ;aACI,IAAI,KAAK,KAAK,EAAE,KAAK,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,CAAC,EAAE;YAC7D,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;SAC5C;aACI,IAAI,KAAK,KAAK,EAAE,EAAE;YACnB,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;SACnB;KACJ;IACD,OAAO,MAAM,CAAC;CACjB;AACD,AAAO,SAAS,QAAQ,CAAC,QAAQ,EAAE;IAC/B,OAAO;QACH,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;KACtC,CAAC;CACL;AACD,SAAS,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE;IAC/B,IAAI,SAAS,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IACpD,OAAO,QAAQ,CAAC,OAAO,CAAC,4BAA4B,EAAE,UAAU,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE;QACpF,IAAI,UAAU,EAAE;YACZ,IAAI,QAAQ,GAAG,EAAE,CAAC;YAClB,MAAM,MAAM,GAAG,EAAE,CAAC;YAClB,IAAI,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE;gBAChD,QAAQ,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;gBAChC,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;aACrC;YACD,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,UAAU,QAAQ,EAAE;gBAC/C,IAAI,GAAG,GAAG,2BAA2B,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBACrD,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;aACvE,CAAC,CAAC;YACH,IAAI,QAAQ,IAAI,QAAQ,KAAK,GAAG,EAAE;gBAC9B,IAAI,SAAS,GAAG,GAAG,CAAC;gBACpB,IAAI,QAAQ,KAAK,GAAG,EAAE;oBAClB,SAAS,GAAG,GAAG,CAAC;iBACnB;qBACI,IAAI,QAAQ,KAAK,GAAG,EAAE;oBACvB,SAAS,GAAG,QAAQ,CAAC;iBACxB;gBACD,OAAO,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,GAAG,QAAQ,GAAG,EAAE,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;aACzE;iBACI;gBACD,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;aAC3B;SACJ;aACI;YACD,OAAO,cAAc,CAAC,OAAO,CAAC,CAAC;SAClC;KACJ,CAAC,CAAC;CACN;;ACrKM,SAAS,KAAK,CAAC,OAAO,EAAE;;IAE3B,IAAI,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;;IAE1C,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,EAAE,OAAO,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;IAChE,IAAI,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IACjD,IAAI,IAAI,CAAC;IACT,IAAI,UAAU,GAAG,IAAI,CAAC,OAAO,EAAE;QAC3B,QAAQ;QACR,SAAS;QACT,KAAK;QACL,SAAS;QACT,SAAS;QACT,WAAW;KACd,CAAC,CAAC;;IAEH,MAAM,gBAAgB,GAAG,uBAAuB,CAAC,GAAG,CAAC,CAAC;IACtD,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IACvC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;QACpB,GAAG,GAAG,OAAO,CAAC,OAAO,GAAG,GAAG,CAAC;KAC/B;IACD,MAAM,iBAAiB,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;SACzC,MAAM,CAAC,MAAM,IAAI,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;SACnD,MAAM,CAAC,SAAS,CAAC,CAAC;IACvB,MAAM,mBAAmB,GAAG,IAAI,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;IAChE,MAAM,eAAe,GAAG,4BAA4B,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1E,IAAI,CAAC,eAAe,EAAE;QAClB,IAAI,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE;;YAE1B,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM;iBAC1B,KAAK,CAAC,GAAG,CAAC;iBACV,GAAG,CAAC,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,kDAAkD,EAAE,CAAC,oBAAoB,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;iBACtI,IAAI,CAAC,GAAG,CAAC,CAAC;SAClB;QACD,IAAI,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE;YACnC,MAAM,wBAAwB,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC,IAAI,EAAE,CAAC;YACnF,OAAO,CAAC,MAAM,GAAG,wBAAwB;iBACpC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC;iBAClC,GAAG,CAAC,OAAO,IAAI;gBAChB,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM;sBACjC,CAAC,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;sBAC9B,OAAO,CAAC;gBACd,OAAO,CAAC,uBAAuB,EAAE,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;aAC/D,CAAC;iBACG,IAAI,CAAC,GAAG,CAAC,CAAC;SAClB;KACJ;;;IAGD,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;QAClC,GAAG,GAAG,kBAAkB,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC;KACtD;SACI;QACD,IAAI,MAAM,IAAI,mBAAmB,EAAE;YAC/B,IAAI,GAAG,mBAAmB,CAAC,IAAI,CAAC;SACnC;aACI;YACD,IAAI,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,MAAM,EAAE;gBACzC,IAAI,GAAG,mBAAmB,CAAC;aAC9B;iBACI;gBACD,OAAO,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;aACjC;SACJ;KACJ;;IAED,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;QACzD,OAAO,CAAC,cAAc,CAAC,GAAG,iCAAiC,CAAC;KAC/D;;;IAGD,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;QAClE,IAAI,GAAG,EAAE,CAAC;KACb;;IAED,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,OAAO,IAAI,KAAK,WAAW,GAAG,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,OAAO,CAAC,OAAO,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;CACxJ;;AC9EM,SAAS,oBAAoB,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE;IAC3D,OAAO,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;CACjD;;ACDM,SAAS,YAAY,CAAC,WAAW,EAAE,WAAW,EAAE;IACnD,MAAM,QAAQ,GAAG,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IACjD,MAAM,QAAQ,GAAG,oBAAoB,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC3D,OAAO,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;QAC3B,QAAQ;QACR,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;QAC3C,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;QACjC,KAAK;KACR,CAAC,CAAC;CACN;;ACZM,MAAM,OAAO,GAAG,mBAAmB,CAAC;;ACE3C,MAAM,SAAS,GAAG,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC;;;AAGrE,AAAO,MAAM,QAAQ,GAAG;IACpB,MAAM,EAAE,KAAK;IACb,OAAO,EAAE,wBAAwB;IACjC,OAAO,EAAE;QACL,MAAM,EAAE,gCAAgC;QACxC,YAAY,EAAE,SAAS;KAC1B;IACD,SAAS,EAAE;QACP,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE,EAAE;KACf;CACJ,CAAC;;ACdU,MAAC,QAAQ,GAAG,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/LICENSE.md b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/LICENSE.md new file mode 100644 index 00000000..f105ab0c --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/LICENSE.md @@ -0,0 +1,7 @@ +# [ISC License](https://spdx.org/licenses/ISC) + +Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m) + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/README.md b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/README.md new file mode 100644 index 00000000..d00d14c1 --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/README.md @@ -0,0 +1,25 @@ +# universal-user-agent + +> Get a user agent string in both browser and node + +[![@latest](https://img.shields.io/npm/v/universal-user-agent.svg)](https://www.npmjs.com/package/universal-user-agent) +[![Build Status](https://travis-ci.com/gr2m/universal-user-agent.svg?branch=master)](https://travis-ci.com/gr2m/universal-user-agent) +[![Greenkeeper](https://badges.greenkeeper.io/gr2m/universal-user-agent.svg)](https://greenkeeper.io/) + +```js +const { getUserAgent } = require("universal-user-agent"); +// or import { getUserAgent } from "universal-user-agent"; + +const userAgent = getUserAgent(); +// userAgent will look like this +// in browser: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0" +// in node: Node.js/v8.9.4 (macOS High Sierra; x64) +``` + +## Credits + +The Node implementation was originally inspired by [default-user-agent](https://www.npmjs.com/package/default-user-agent). + +## License + +[ISC](LICENSE.md) diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-node/index.js b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-node/index.js new file mode 100644 index 00000000..80a07105 --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-node/index.js @@ -0,0 +1,22 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var osName = _interopDefault(require('os-name')); + +function getUserAgent() { + try { + return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`; + } catch (error) { + if (/wmic os get Caption/.test(error.message)) { + return "Windows "; + } + + throw error; + } +} + +exports.getUserAgent = getUserAgent; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-node/index.js.map b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-node/index.js.map new file mode 100644 index 00000000..aff09ec4 --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/node.js"],"sourcesContent":["import osName from \"os-name\";\nexport function getUserAgent() {\n try {\n return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`;\n }\n catch (error) {\n if (/wmic os get Caption/.test(error.message)) {\n return \"Windows \";\n }\n throw error;\n }\n}\n"],"names":["getUserAgent","process","version","substr","osName","arch","error","test","message"],"mappings":";;;;;;;;AACO,SAASA,YAAT,GAAwB;MACvB;WACQ,WAAUC,OAAO,CAACC,OAAR,CAAgBC,MAAhB,CAAuB,CAAvB,CAA0B,KAAIC,MAAM,EAAG,KAAIH,OAAO,CAACI,IAAK,GAA1E;GADJ,CAGA,OAAOC,KAAP,EAAc;QACN,sBAAsBC,IAAtB,CAA2BD,KAAK,CAACE,OAAjC,CAAJ,EAA+C;aACpC,gCAAP;;;UAEEF,KAAN;;;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-src/browser.js b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-src/browser.js new file mode 100644 index 00000000..6f52232c --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-src/browser.js @@ -0,0 +1,3 @@ +export function getUserAgent() { + return navigator.userAgent; +} diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-src/index.js b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-src/index.js new file mode 100644 index 00000000..c6253f5a --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-src/index.js @@ -0,0 +1 @@ +export { getUserAgent } from "./node"; diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-src/node.js b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-src/node.js new file mode 100644 index 00000000..8b70a038 --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-src/node.js @@ -0,0 +1,12 @@ +import osName from "os-name"; +export function getUserAgent() { + try { + return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`; + } + catch (error) { + if (/wmic os get Caption/.test(error.message)) { + return "Windows "; + } + throw error; + } +} diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-types/browser.d.ts b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-types/browser.d.ts new file mode 100644 index 00000000..a7bb1c44 --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-types/browser.d.ts @@ -0,0 +1 @@ +export declare function getUserAgent(): string; diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-types/index.d.ts b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-types/index.d.ts new file mode 100644 index 00000000..c6253f5a --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-types/index.d.ts @@ -0,0 +1 @@ +export { getUserAgent } from "./node"; diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-types/node.d.ts b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-types/node.d.ts new file mode 100644 index 00000000..a7bb1c44 --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-types/node.d.ts @@ -0,0 +1 @@ +export declare function getUserAgent(): string; diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-web/index.js b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-web/index.js new file mode 100644 index 00000000..11ec79b3 --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-web/index.js @@ -0,0 +1,6 @@ +function getUserAgent() { + return navigator.userAgent; +} + +export { getUserAgent }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-web/index.js.map b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-web/index.js.map new file mode 100644 index 00000000..549407ec --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/browser.js"],"sourcesContent":["export function getUserAgent() {\n return navigator.userAgent;\n}\n"],"names":[],"mappings":"AAAO,SAAS,YAAY,GAAG;IAC3B,OAAO,SAAS,CAAC,SAAS,CAAC;CAC9B;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/package.json b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/package.json new file mode 100644 index 00000000..e1bc4b25 --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/package.json @@ -0,0 +1,68 @@ +{ + "_args": [ + [ + "universal-user-agent@4.0.0", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "universal-user-agent@4.0.0", + "_id": "universal-user-agent@4.0.0", + "_inBundle": false, + "_integrity": "sha512-eM8knLpev67iBDizr/YtqkJsF3GK8gzDc6st/WKzrTuPtcsOKW/0IdL4cnMBsU69pOx0otavLWBDGTwg+dB0aA==", + "_location": "/@octokit/endpoint/universal-user-agent", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "universal-user-agent@4.0.0", + "name": "universal-user-agent", + "escapedName": "universal-user-agent", + "rawSpec": "4.0.0", + "saveSpec": null, + "fetchSpec": "4.0.0" + }, + "_requiredBy": [ + "/@octokit/endpoint" + ], + "_resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-4.0.0.tgz", + "_spec": "4.0.0", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "bugs": { + "url": "https://github.com/gr2m/universal-user-agent/issues" + }, + "dependencies": { + "os-name": "^3.1.0" + }, + "description": "Get a user agent string in both browser and node", + "devDependencies": { + "@gr2m/pika-plugin-build-web": "^0.6.0-issue-84.1", + "@pika/pack": "^0.5.0", + "@pika/plugin-build-node": "^0.6.0", + "@pika/plugin-ts-standard-pkg": "^0.6.0", + "@types/jest": "^24.0.18", + "jest": "^24.9.0", + "prettier": "^1.18.2", + "semantic-release": "^15.9.15", + "ts-jest": "^24.0.2", + "typescript": "^3.6.2" + }, + "files": [ + "dist-*/", + "bin/" + ], + "homepage": "https://github.com/gr2m/universal-user-agent#readme", + "keywords": [], + "license": "ISC", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "name": "universal-user-agent", + "pika": true, + "repository": { + "type": "git", + "url": "git+https://github.com/gr2m/universal-user-agent.git" + }, + "sideEffects": false, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "version": "4.0.0" +} diff --git a/node_modules/@octokit/endpoint/package.json b/node_modules/@octokit/endpoint/package.json new file mode 100644 index 00000000..1d96a538 --- /dev/null +++ b/node_modules/@octokit/endpoint/package.json @@ -0,0 +1,82 @@ +{ + "_args": [ + [ + "@octokit/endpoint@5.5.1", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "@octokit/endpoint@5.5.1", + "_id": "@octokit/endpoint@5.5.1", + "_inBundle": false, + "_integrity": "sha512-nBFhRUb5YzVTCX/iAK1MgQ4uWo89Gu0TH00qQHoYRCsE12dWcG1OiLd7v2EIo2+tpUKPMOQ62QFy9hy9Vg2ULg==", + "_location": "/@octokit/endpoint", + "_phantomChildren": { + "os-name": "3.1.0" + }, + "_requested": { + "type": "version", + "registry": true, + "raw": "@octokit/endpoint@5.5.1", + "name": "@octokit/endpoint", + "escapedName": "@octokit%2fendpoint", + "scope": "@octokit", + "rawSpec": "5.5.1", + "saveSpec": null, + "fetchSpec": "5.5.1" + }, + "_requiredBy": [ + "/@octokit/request" + ], + "_resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-5.5.1.tgz", + "_spec": "5.5.1", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "bugs": { + "url": "https://github.com/octokit/endpoint.js/issues" + }, + "deno": "dist-web/index.js", + "dependencies": { + "@octokit/types": "^2.0.0", + "is-plain-object": "^3.0.0", + "universal-user-agent": "^4.0.0" + }, + "description": "Turns REST API endpoints into generic request options", + "devDependencies": { + "@pika/pack": "^0.5.0", + "@pika/plugin-build-node": "^0.7.0", + "@pika/plugin-build-web": "^0.7.0", + "@pika/plugin-ts-standard-pkg": "^0.7.0", + "@types/jest": "^24.0.11", + "jest": "^24.7.1", + "prettier": "1.18.2", + "semantic-release": "^15.13.8", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "ts-jest": "^24.0.2", + "typescript": "^3.4.5" + }, + "files": [ + "dist-*/", + "bin/" + ], + "homepage": "https://github.com/octokit/endpoint.js#readme", + "keywords": [ + "octokit", + "github", + "api", + "rest" + ], + "license": "MIT", + "main": "dist-node/index.js", + "name": "@octokit/endpoint", + "pika": true, + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/octokit/endpoint.js.git" + }, + "sideEffects": false, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "version": "5.5.1" +} diff --git a/node_modules/@octokit/graphql/LICENSE b/node_modules/@octokit/graphql/LICENSE new file mode 100644 index 00000000..af5366d0 --- /dev/null +++ b/node_modules/@octokit/graphql/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2018 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/@octokit/graphql/README.md b/node_modules/@octokit/graphql/README.md new file mode 100644 index 00000000..4e44592c --- /dev/null +++ b/node_modules/@octokit/graphql/README.md @@ -0,0 +1,292 @@ +# graphql.js + +> GitHub GraphQL API client for browsers and Node + +[![@latest](https://img.shields.io/npm/v/@octokit/graphql.svg)](https://www.npmjs.com/package/@octokit/graphql) +[![Build Status](https://travis-ci.com/octokit/graphql.js.svg?branch=master)](https://travis-ci.com/octokit/graphql.js) +[![Coverage Status](https://coveralls.io/repos/github/octokit/graphql.js/badge.svg)](https://coveralls.io/github/octokit/graphql.js) +[![Greenkeeper](https://badges.greenkeeper.io/octokit/graphql.js.svg)](https://greenkeeper.io/) + + + +- [Usage](#usage) +- [Errors](#errors) +- [Writing tests](#writing-tests) +- [License](#license) + + + +## Usage + +Send a simple query + +```js +const graphql = require('@octokit/graphql') +const { repository } = await graphql(`{ + repository(owner:"octokit", name:"graphql.js") { + issues(last:3) { + edges { + node { + title + } + } + } + } +}`, { + headers: { + authorization: `token secret123` + } +}) +``` + +⚠️ Do not use [template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) in the query strings as they make your code vulnerable to query injection attacks (see [#2](https://github.com/octokit/graphql.js/issues/2)). Use variables instead: + +```js +const graphql = require('@octokit/graphql') +const { lastIssues } = await graphql(`query lastIssues($owner: String!, $repo: String!, $num: Int = 3) { + repository(owner:$owner, name:$repo) { + issues(last:$num) { + edges { + node { + title + } + } + } + } + }`, { + owner: 'octokit', + repo: 'graphql.js' + headers: { + authorization: `token secret123` + } + } +}) +``` + +Create two new clients and set separate default configs for them. + +```js +const graphql1 = require('@octokit/graphql').defaults({ + headers: { + authorization: `token secret123` + } +}) + +const graphql2 = require('@octokit/graphql').defaults({ + headers: { + authorization: `token foobar` + } +}) +``` + +Create two clients, the second inherits config from the first. + +```js +const graphql1 = require('@octokit/graphql').defaults({ + headers: { + authorization: `token secret123` + } +}) + +const graphql2 = graphql1.defaults({ + headers: { + 'user-agent': 'my-user-agent/v1.2.3' + } +}) +``` + +Create a new client with default options and run query + +```js +const graphql = require('@octokit/graphql').defaults({ + headers: { + authorization: `token secret123` + } +}) +const { repository } = await graphql(`{ + repository(owner:"octokit", name:"graphql.js") { + issues(last:3) { + edges { + node { + title + } + } + } + } +}`) +``` + +Pass query together with headers and variables + +```js +const graphql = require('@octokit/graphql') +const { lastIssues } = await graphql({ + query: `query lastIssues($owner: String!, $repo: String!, $num: Int = 3) { + repository(owner:$owner, name:$repo) { + issues(last:$num) { + edges { + node { + title + } + } + } + } + }`, + owner: 'octokit', + repo: 'graphql.js' + headers: { + authorization: `token secret123` + } +}) +``` + +Use with GitHub Enterprise + +```js +const graphql = require('@octokit/graphql').defaults({ + baseUrl: 'https://github-enterprise.acme-inc.com/api', + headers: { + authorization: `token secret123` + } +}) +const { repository } = await graphql(`{ + repository(owner:"acme-project", name:"acme-repo") { + issues(last:3) { + edges { + node { + title + } + } + } + } +}`) +``` + +## Errors + +In case of a GraphQL error, `error.message` is set to the first error from the response’s `errors` array. All errors can be accessed at `error.errors`. `error.request` has the request options such as query, variables and headers set for easier debugging. + +```js +const graphql = require('@octokit/graphql').defaults({ + headers: { + authorization: `token secret123` + } +}) +const query = `{ + viewer { + bioHtml + } +}` + +try { + const result = await graphql(query) +} catch (error) { + // server responds with + // { + // "data": null, + // "errors": [{ + // "message": "Field 'bioHtml' doesn't exist on type 'User'", + // "locations": [{ + // "line": 3, + // "column": 5 + // }] + // }] + // } + + console.log('Request failed:', error.request) // { query, variables: {}, headers: { authorization: 'token secret123' } } + console.log(error.message) // Field 'bioHtml' doesn't exist on type 'User' +} +``` + +## Partial responses + +A GraphQL query may respond with partial data accompanied by errors. In this case we will throw an error but the partial data will still be accessible through `error.data` + +```js +const graphql = require('@octokit/graphql').defaults({ + headers: { + authorization: `token secret123` + } +}) +const query = `{ + repository(name: "probot", owner: "probot") { + name + ref(qualifiedName: "master") { + target { + ... on Commit { + history(first: 25, after: "invalid cursor") { + nodes { + message + } + } + } + } + } + } +}` + +try { + const result = await graphql(query) +} catch (error) { + // server responds with + // {  + // "data": {  + // "repository": {  + // "name": "probot",  + // "ref": null  + // }  + // },  + // "errors": [  + // {  + // "type": "INVALID_CURSOR_ARGUMENTS",  + // "path": [  + // "repository",  + // "ref",  + // "target",  + // "history"  + // ],  + // "locations": [  + // {  + // "line": 7,  + // "column": 11  + // }  + // ],  + // "message": "`invalid cursor` does not appear to be a valid cursor."  + // }  + // ]  + // }  + + console.log('Request failed:', error.request) // { query, variables: {}, headers: { authorization: 'token secret123' } } + console.log(error.message) // `invalid cursor` does not appear to be a valid cursor. + console.log(error.data) // { repository: { name: 'probot', ref: null } } +} +``` + +## Writing tests + +You can pass a replacement for [the built-in fetch implementation](https://github.com/bitinn/node-fetch) as `request.fetch` option. For example, using [fetch-mock](http://www.wheresrhys.co.uk/fetch-mock/) works great to write tests + +```js +const assert = require('assert') +const fetchMock = require('fetch-mock/es5/server') + +const graphql = require('@octokit/graphql') + +graphql('{ viewer { login } }', { + headers: { + authorization: 'token secret123' + }, + request: { + fetch: fetchMock.sandbox() + .post('https://api.github.com/graphql', (url, options) => { + assert.strictEqual(options.headers.authorization, 'token secret123') + assert.strictEqual(options.body, '{"query":"{ viewer { login } }"}', 'Sends correct query') + return { data: {} } + }) + } +}) +``` + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/graphql/index.js b/node_modules/@octokit/graphql/index.js new file mode 100644 index 00000000..7f8278c9 --- /dev/null +++ b/node_modules/@octokit/graphql/index.js @@ -0,0 +1,15 @@ +const { request } = require('@octokit/request') +const getUserAgent = require('universal-user-agent') + +const version = require('./package.json').version +const userAgent = `octokit-graphql.js/${version} ${getUserAgent()}` + +const withDefaults = require('./lib/with-defaults') + +module.exports = withDefaults(request, { + method: 'POST', + url: '/graphql', + headers: { + 'user-agent': userAgent + } +}) diff --git a/node_modules/@octokit/graphql/lib/error.js b/node_modules/@octokit/graphql/lib/error.js new file mode 100644 index 00000000..4478abd2 --- /dev/null +++ b/node_modules/@octokit/graphql/lib/error.js @@ -0,0 +1,16 @@ +module.exports = class GraphqlError extends Error { + constructor (request, response) { + const message = response.data.errors[0].message + super(message) + + Object.assign(this, response.data) + this.name = 'GraphqlError' + this.request = request + + // Maintains proper stack trace (only available on V8) + /* istanbul ignore next */ + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor) + } + } +} diff --git a/node_modules/@octokit/graphql/lib/graphql.js b/node_modules/@octokit/graphql/lib/graphql.js new file mode 100644 index 00000000..4a5b2119 --- /dev/null +++ b/node_modules/@octokit/graphql/lib/graphql.js @@ -0,0 +1,36 @@ +module.exports = graphql + +const GraphqlError = require('./error') + +const NON_VARIABLE_OPTIONS = ['method', 'baseUrl', 'url', 'headers', 'request', 'query'] + +function graphql (request, query, options) { + if (typeof query === 'string') { + options = Object.assign({ query }, options) + } else { + options = query + } + + const requestOptions = Object.keys(options).reduce((result, key) => { + if (NON_VARIABLE_OPTIONS.includes(key)) { + result[key] = options[key] + return result + } + + if (!result.variables) { + result.variables = {} + } + + result.variables[key] = options[key] + return result + }, {}) + + return request(requestOptions) + .then(response => { + if (response.data.errors) { + throw new GraphqlError(requestOptions, response) + } + + return response.data.data + }) +} diff --git a/node_modules/@octokit/graphql/lib/with-defaults.js b/node_modules/@octokit/graphql/lib/with-defaults.js new file mode 100644 index 00000000..a5b14935 --- /dev/null +++ b/node_modules/@octokit/graphql/lib/with-defaults.js @@ -0,0 +1,13 @@ +module.exports = withDefaults + +const graphql = require('./graphql') + +function withDefaults (request, newDefaults) { + const newRequest = request.defaults(newDefaults) + const newApi = function (query, options) { + return graphql(newRequest, query, options) + } + + newApi.defaults = withDefaults.bind(null, newRequest) + return newApi +} diff --git a/node_modules/@octokit/graphql/package.json b/node_modules/@octokit/graphql/package.json new file mode 100644 index 00000000..e1fe18ca --- /dev/null +++ b/node_modules/@octokit/graphql/package.json @@ -0,0 +1,122 @@ +{ + "_args": [ + [ + "@octokit/graphql@2.1.3", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "@octokit/graphql@2.1.3", + "_id": "@octokit/graphql@2.1.3", + "_inBundle": false, + "_integrity": "sha512-XoXJqL2ondwdnMIW3wtqJWEwcBfKk37jO/rYkoxNPEVeLBDGsGO1TCWggrAlq3keGt/O+C/7VepXnukUxwt5vA==", + "_location": "/@octokit/graphql", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@octokit/graphql@2.1.3", + "name": "@octokit/graphql", + "escapedName": "@octokit%2fgraphql", + "scope": "@octokit", + "rawSpec": "2.1.3", + "saveSpec": null, + "fetchSpec": "2.1.3" + }, + "_requiredBy": [ + "/@actions/github" + ], + "_resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-2.1.3.tgz", + "_spec": "2.1.3", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "Gregor Martynus", + "url": "https://github.com/gr2m" + }, + "bugs": { + "url": "https://github.com/octokit/graphql.js/issues" + }, + "bundlesize": [ + { + "path": "./dist/octokit-graphql.min.js.gz", + "maxSize": "5KB" + } + ], + "dependencies": { + "@octokit/request": "^5.0.0", + "universal-user-agent": "^2.0.3" + }, + "description": "GitHub GraphQL API client for browsers and Node", + "devDependencies": { + "chai": "^4.2.0", + "compression-webpack-plugin": "^2.0.0", + "coveralls": "^3.0.3", + "cypress": "^3.1.5", + "fetch-mock": "^7.3.1", + "mkdirp": "^0.5.1", + "mocha": "^6.0.0", + "npm-run-all": "^4.1.3", + "nyc": "^14.0.0", + "semantic-release": "^15.13.3", + "simple-mock": "^0.8.0", + "standard": "^12.0.1", + "webpack": "^4.29.6", + "webpack-bundle-analyzer": "^3.1.0", + "webpack-cli": "^3.2.3" + }, + "files": [ + "lib" + ], + "homepage": "https://github.com/octokit/graphql.js#readme", + "keywords": [ + "octokit", + "github", + "api", + "graphql" + ], + "license": "MIT", + "main": "index.js", + "name": "@octokit/graphql", + "publishConfig": { + "access": "public" + }, + "release": { + "publish": [ + "@semantic-release/npm", + { + "path": "@semantic-release/github", + "assets": [ + "dist/*", + "!dist/*.map.gz" + ] + } + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/octokit/graphql.js.git" + }, + "scripts": { + "build": "npm-run-all build:*", + "build:development": "webpack --mode development --entry . --output-library=octokitGraphql --output=./dist/octokit-graphql.js --profile --json > dist/bundle-stats.json", + "build:production": "webpack --mode production --entry . --plugin=compression-webpack-plugin --output-library=octokitGraphql --output-path=./dist --output-filename=octokit-graphql.min.js --devtool source-map", + "bundle-report": "webpack-bundle-analyzer dist/bundle-stats.json --mode=static --no-open --report dist/bundle-report.html", + "coverage": "nyc report --reporter=html && open coverage/index.html", + "coverage:upload": "nyc report --reporter=text-lcov | coveralls", + "prebuild": "mkdirp dist/", + "pretest": "standard", + "test": "nyc mocha test/*-test.js", + "test:browser": "cypress run --browser chrome" + }, + "standard": { + "globals": [ + "describe", + "before", + "beforeEach", + "afterEach", + "after", + "it", + "expect" + ] + }, + "version": "2.1.3" +} diff --git a/node_modules/@octokit/request-error/LICENSE b/node_modules/@octokit/request-error/LICENSE new file mode 100644 index 00000000..ef2c18ee --- /dev/null +++ b/node_modules/@octokit/request-error/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2019 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/@octokit/request-error/README.md b/node_modules/@octokit/request-error/README.md new file mode 100644 index 00000000..bcb711d9 --- /dev/null +++ b/node_modules/@octokit/request-error/README.md @@ -0,0 +1,68 @@ +# http-error.js + +> Error class for Octokit request errors + +[![@latest](https://img.shields.io/npm/v/@octokit/request-error.svg)](https://www.npmjs.com/package/@octokit/request-error) +[![Build Status](https://travis-ci.com/octokit/request-error.js.svg?branch=master)](https://travis-ci.com/octokit/request-error.js) +[![Greenkeeper](https://badges.greenkeeper.io/octokit/request-error.js.svg)](https://greenkeeper.io/) + +## Usage + + + + + + +
+Browsers + +Load @octokit/request-error directly from cdn.pika.dev + +```html + +``` + +
+Node + + +Install with npm install @octokit/request-error + +```js +const { RequestError } = require("@octokit/request-error"); +// or: import { RequestError } from "@octokit/request-error"; +``` + +
+ +```js +const error = new RequestError("Oops", 500, { + headers: { + "x-github-request-id": "1:2:3:4" + }, // response headers + request: { + method: "POST", + url: "https://api.github.com/foo", + body: { + bar: "baz" + }, + headers: { + authorization: "token secret123" + } + } +}); + +error.message; // Oops +error.status; // 500 +error.headers; // { 'x-github-request-id': '1:2:3:4' } +error.request.method; // POST +error.request.url; // https://api.github.com/foo +error.request.body; // { bar: 'baz' } +error.request.headers; // { authorization: 'token [REDACTED]' } +``` + +## LICENSE + +[MIT](LICENSE) diff --git a/node_modules/@octokit/request-error/dist-node/index.js b/node_modules/@octokit/request-error/dist-node/index.js new file mode 100644 index 00000000..95b9c579 --- /dev/null +++ b/node_modules/@octokit/request-error/dist-node/index.js @@ -0,0 +1,55 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var deprecation = require('deprecation'); +var once = _interopDefault(require('once')); + +const logOnce = once(deprecation => console.warn(deprecation)); +/** + * Error with extra properties to help with debugging + */ + +class RequestError extends Error { + constructor(message, statusCode, options) { + super(message); // Maintains proper stack trace (only available on V8) + + /* istanbul ignore next */ + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + + this.name = "HttpError"; + this.status = statusCode; + Object.defineProperty(this, "code", { + get() { + logOnce(new deprecation.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); + return statusCode; + } + + }); + this.headers = options.headers || {}; // redact request credentials without mutating original request options + + const requestCopy = Object.assign({}, options.request); + + if (options.request.headers.authorization) { + requestCopy.headers = Object.assign({}, options.request.headers, { + authorization: options.request.headers.authorization.replace(/ .*$/, " [REDACTED]") + }); + } + + requestCopy.url = requestCopy.url // client_id & client_secret can be passed as URL query parameters to increase rate limit + // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications + .replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]") // OAuth tokens can be passed as URL query parameters, although it is not recommended + // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header + .replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); + this.request = requestCopy; + } + +} + +exports.RequestError = RequestError; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/request-error/dist-node/index.js.map b/node_modules/@octokit/request-error/dist-node/index.js.map new file mode 100644 index 00000000..ec1c6dbc --- /dev/null +++ b/node_modules/@octokit/request-error/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/index.js"],"sourcesContent":["import { Deprecation } from \"deprecation\";\nimport once from \"once\";\nconst logOnce = once((deprecation) => console.warn(deprecation));\n/**\n * Error with extra properties to help with debugging\n */\nexport class RequestError extends Error {\n constructor(message, statusCode, options) {\n super(message);\n // Maintains proper stack trace (only available on V8)\n /* istanbul ignore next */\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n this.name = \"HttpError\";\n this.status = statusCode;\n Object.defineProperty(this, \"code\", {\n get() {\n logOnce(new Deprecation(\"[@octokit/request-error] `error.code` is deprecated, use `error.status`.\"));\n return statusCode;\n }\n });\n this.headers = options.headers || {};\n // redact request credentials without mutating original request options\n const requestCopy = Object.assign({}, options.request);\n if (options.request.headers.authorization) {\n requestCopy.headers = Object.assign({}, options.request.headers, {\n authorization: options.request.headers.authorization.replace(/ .*$/, \" [REDACTED]\")\n });\n }\n requestCopy.url = requestCopy.url\n // client_id & client_secret can be passed as URL query parameters to increase rate limit\n // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications\n .replace(/\\bclient_secret=\\w+/g, \"client_secret=[REDACTED]\")\n // OAuth tokens can be passed as URL query parameters, although it is not recommended\n // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header\n .replace(/\\baccess_token=\\w+/g, \"access_token=[REDACTED]\");\n this.request = requestCopy;\n }\n}\n"],"names":["logOnce","once","deprecation","console","warn","RequestError","Error","constructor","message","statusCode","options","captureStackTrace","name","status","Object","defineProperty","get","Deprecation","headers","requestCopy","assign","request","authorization","replace","url"],"mappings":";;;;;;;;;AAEA,MAAMA,OAAO,GAAGC,IAAI,CAAEC,WAAD,IAAiBC,OAAO,CAACC,IAAR,CAAaF,WAAb,CAAlB,CAApB;;;;;AAIA,AAAO,MAAMG,YAAN,SAA2BC,KAA3B,CAAiC;EACpCC,WAAW,CAACC,OAAD,EAAUC,UAAV,EAAsBC,OAAtB,EAA+B;UAChCF,OAAN,EADsC;;;;QAIlCF,KAAK,CAACK,iBAAV,EAA6B;MACzBL,KAAK,CAACK,iBAAN,CAAwB,IAAxB,EAA8B,KAAKJ,WAAnC;;;SAECK,IAAL,GAAY,WAAZ;SACKC,MAAL,GAAcJ,UAAd;IACAK,MAAM,CAACC,cAAP,CAAsB,IAAtB,EAA4B,MAA5B,EAAoC;MAChCC,GAAG,GAAG;QACFhB,OAAO,CAAC,IAAIiB,uBAAJ,CAAgB,0EAAhB,CAAD,CAAP;eACOR,UAAP;;;KAHR;SAMKS,OAAL,GAAeR,OAAO,CAACQ,OAAR,IAAmB,EAAlC,CAfsC;;UAiBhCC,WAAW,GAAGL,MAAM,CAACM,MAAP,CAAc,EAAd,EAAkBV,OAAO,CAACW,OAA1B,CAApB;;QACIX,OAAO,CAACW,OAAR,CAAgBH,OAAhB,CAAwBI,aAA5B,EAA2C;MACvCH,WAAW,CAACD,OAAZ,GAAsBJ,MAAM,CAACM,MAAP,CAAc,EAAd,EAAkBV,OAAO,CAACW,OAAR,CAAgBH,OAAlC,EAA2C;QAC7DI,aAAa,EAAEZ,OAAO,CAACW,OAAR,CAAgBH,OAAhB,CAAwBI,aAAxB,CAAsCC,OAAtC,CAA8C,MAA9C,EAAsD,aAAtD;OADG,CAAtB;;;IAIJJ,WAAW,CAACK,GAAZ,GAAkBL,WAAW,CAACK,GAAZ;;KAGbD,OAHa,CAGL,sBAHK,EAGmB,0BAHnB;;KAMbA,OANa,CAML,qBANK,EAMkB,yBANlB,CAAlB;SAOKF,OAAL,GAAeF,WAAf;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/request-error/dist-src/index.js b/node_modules/@octokit/request-error/dist-src/index.js new file mode 100644 index 00000000..cfcb7c41 --- /dev/null +++ b/node_modules/@octokit/request-error/dist-src/index.js @@ -0,0 +1,40 @@ +import { Deprecation } from "deprecation"; +import once from "once"; +const logOnce = once((deprecation) => console.warn(deprecation)); +/** + * Error with extra properties to help with debugging + */ +export class RequestError extends Error { + constructor(message, statusCode, options) { + super(message); + // Maintains proper stack trace (only available on V8) + /* istanbul ignore next */ + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + this.name = "HttpError"; + this.status = statusCode; + Object.defineProperty(this, "code", { + get() { + logOnce(new Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); + return statusCode; + } + }); + this.headers = options.headers || {}; + // redact request credentials without mutating original request options + const requestCopy = Object.assign({}, options.request); + if (options.request.headers.authorization) { + requestCopy.headers = Object.assign({}, options.request.headers, { + authorization: options.request.headers.authorization.replace(/ .*$/, " [REDACTED]") + }); + } + requestCopy.url = requestCopy.url + // client_id & client_secret can be passed as URL query parameters to increase rate limit + // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications + .replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]") + // OAuth tokens can be passed as URL query parameters, although it is not recommended + // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header + .replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); + this.request = requestCopy; + } +} diff --git a/node_modules/@octokit/request-error/dist-src/types.js b/node_modules/@octokit/request-error/dist-src/types.js new file mode 100644 index 00000000..e69de29b diff --git a/node_modules/@octokit/request-error/dist-types/index.d.ts b/node_modules/@octokit/request-error/dist-types/index.d.ts new file mode 100644 index 00000000..baa8a0eb --- /dev/null +++ b/node_modules/@octokit/request-error/dist-types/index.d.ts @@ -0,0 +1,27 @@ +import { RequestOptions, ResponseHeaders } from "@octokit/types"; +import { RequestErrorOptions } from "./types"; +/** + * Error with extra properties to help with debugging + */ +export declare class RequestError extends Error { + name: "HttpError"; + /** + * http status code + */ + status: number; + /** + * http status code + * + * @deprecated `error.code` is deprecated in favor of `error.status` + */ + code: number; + /** + * error response headers + */ + headers: ResponseHeaders; + /** + * Request options that lead to the error. + */ + request: RequestOptions; + constructor(message: string, statusCode: number, options: RequestErrorOptions); +} diff --git a/node_modules/@octokit/request-error/dist-types/types.d.ts b/node_modules/@octokit/request-error/dist-types/types.d.ts new file mode 100644 index 00000000..865d2139 --- /dev/null +++ b/node_modules/@octokit/request-error/dist-types/types.d.ts @@ -0,0 +1,5 @@ +import { RequestOptions, ResponseHeaders } from "@octokit/types"; +export declare type RequestErrorOptions = { + headers?: ResponseHeaders; + request: RequestOptions; +}; diff --git a/node_modules/@octokit/request-error/dist-web/index.js b/node_modules/@octokit/request-error/dist-web/index.js new file mode 100644 index 00000000..32b45a36 --- /dev/null +++ b/node_modules/@octokit/request-error/dist-web/index.js @@ -0,0 +1,44 @@ +import { Deprecation } from 'deprecation'; +import once from 'once'; + +const logOnce = once((deprecation) => console.warn(deprecation)); +/** + * Error with extra properties to help with debugging + */ +class RequestError extends Error { + constructor(message, statusCode, options) { + super(message); + // Maintains proper stack trace (only available on V8) + /* istanbul ignore next */ + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + this.name = "HttpError"; + this.status = statusCode; + Object.defineProperty(this, "code", { + get() { + logOnce(new Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); + return statusCode; + } + }); + this.headers = options.headers || {}; + // redact request credentials without mutating original request options + const requestCopy = Object.assign({}, options.request); + if (options.request.headers.authorization) { + requestCopy.headers = Object.assign({}, options.request.headers, { + authorization: options.request.headers.authorization.replace(/ .*$/, " [REDACTED]") + }); + } + requestCopy.url = requestCopy.url + // client_id & client_secret can be passed as URL query parameters to increase rate limit + // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications + .replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]") + // OAuth tokens can be passed as URL query parameters, although it is not recommended + // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header + .replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); + this.request = requestCopy; + } +} + +export { RequestError }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/request-error/dist-web/index.js.map b/node_modules/@octokit/request-error/dist-web/index.js.map new file mode 100644 index 00000000..05151b09 --- /dev/null +++ b/node_modules/@octokit/request-error/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/index.js"],"sourcesContent":["import { Deprecation } from \"deprecation\";\nimport once from \"once\";\nconst logOnce = once((deprecation) => console.warn(deprecation));\n/**\n * Error with extra properties to help with debugging\n */\nexport class RequestError extends Error {\n constructor(message, statusCode, options) {\n super(message);\n // Maintains proper stack trace (only available on V8)\n /* istanbul ignore next */\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n this.name = \"HttpError\";\n this.status = statusCode;\n Object.defineProperty(this, \"code\", {\n get() {\n logOnce(new Deprecation(\"[@octokit/request-error] `error.code` is deprecated, use `error.status`.\"));\n return statusCode;\n }\n });\n this.headers = options.headers || {};\n // redact request credentials without mutating original request options\n const requestCopy = Object.assign({}, options.request);\n if (options.request.headers.authorization) {\n requestCopy.headers = Object.assign({}, options.request.headers, {\n authorization: options.request.headers.authorization.replace(/ .*$/, \" [REDACTED]\")\n });\n }\n requestCopy.url = requestCopy.url\n // client_id & client_secret can be passed as URL query parameters to increase rate limit\n // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications\n .replace(/\\bclient_secret=\\w+/g, \"client_secret=[REDACTED]\")\n // OAuth tokens can be passed as URL query parameters, although it is not recommended\n // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header\n .replace(/\\baccess_token=\\w+/g, \"access_token=[REDACTED]\");\n this.request = requestCopy;\n }\n}\n"],"names":[],"mappings":";;;AAEA,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;;;;AAIjE,AAAO,MAAM,YAAY,SAAS,KAAK,CAAC;IACpC,WAAW,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE;QACtC,KAAK,CAAC,OAAO,CAAC,CAAC;;;QAGf,IAAI,KAAK,CAAC,iBAAiB,EAAE;YACzB,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;SACnD;QACD,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;QACxB,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC;QACzB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE;YAChC,GAAG,GAAG;gBACF,OAAO,CAAC,IAAI,WAAW,CAAC,0EAA0E,CAAC,CAAC,CAAC;gBACrG,OAAO,UAAU,CAAC;aACrB;SACJ,CAAC,CAAC;QACH,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;;QAErC,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QACvD,IAAI,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE;YACvC,WAAW,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE;gBAC7D,aAAa,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,MAAM,EAAE,aAAa,CAAC;aACtF,CAAC,CAAC;SACN;QACD,WAAW,CAAC,GAAG,GAAG,WAAW,CAAC,GAAG;;;aAG5B,OAAO,CAAC,sBAAsB,EAAE,0BAA0B,CAAC;;;aAG3D,OAAO,CAAC,qBAAqB,EAAE,yBAAyB,CAAC,CAAC;QAC/D,IAAI,CAAC,OAAO,GAAG,WAAW,CAAC;KAC9B;CACJ;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/request-error/package.json b/node_modules/@octokit/request-error/package.json new file mode 100644 index 00000000..f32b0474 --- /dev/null +++ b/node_modules/@octokit/request-error/package.json @@ -0,0 +1,84 @@ +{ + "_args": [ + [ + "@octokit/request-error@1.2.0", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "@octokit/request-error@1.2.0", + "_id": "@octokit/request-error@1.2.0", + "_inBundle": false, + "_integrity": "sha512-DNBhROBYjjV/I9n7A8kVkmQNkqFAMem90dSxqvPq57e2hBr7mNTX98y3R2zDpqMQHVRpBDjsvsfIGgBzy+4PAg==", + "_location": "/@octokit/request-error", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@octokit/request-error@1.2.0", + "name": "@octokit/request-error", + "escapedName": "@octokit%2frequest-error", + "scope": "@octokit", + "rawSpec": "1.2.0", + "saveSpec": null, + "fetchSpec": "1.2.0" + }, + "_requiredBy": [ + "/@octokit/request", + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-1.2.0.tgz", + "_spec": "1.2.0", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "bugs": { + "url": "https://github.com/octokit/request-error.js/issues" + }, + "deno": "dist-web/index.js", + "dependencies": { + "@octokit/types": "^2.0.0", + "deprecation": "^2.0.0", + "once": "^1.4.0" + }, + "description": "Error class for Octokit request errors", + "devDependencies": { + "@pika/pack": "^0.5.0", + "@pika/plugin-build-node": "^0.7.0", + "@pika/plugin-build-web": "^0.7.0", + "@pika/plugin-bundle-web": "^0.7.0", + "@pika/plugin-ts-standard-pkg": "^0.7.0", + "@types/jest": "^24.0.12", + "@types/node": "^12.0.2", + "@types/once": "^1.4.0", + "jest": "^24.7.1", + "pika-plugin-unpkg-field": "^1.1.0", + "prettier": "^1.17.0", + "semantic-release": "^15.10.5", + "ts-jest": "^24.0.2", + "typescript": "^3.4.5" + }, + "files": [ + "dist-*/", + "bin/" + ], + "homepage": "https://github.com/octokit/request-error.js#readme", + "keywords": [ + "octokit", + "github", + "api", + "error" + ], + "license": "MIT", + "main": "dist-node/index.js", + "name": "@octokit/request-error", + "pika": true, + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/octokit/request-error.js.git" + }, + "sideEffects": false, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "version": "1.2.0" +} diff --git a/node_modules/@octokit/request/LICENSE b/node_modules/@octokit/request/LICENSE new file mode 100644 index 00000000..af5366d0 --- /dev/null +++ b/node_modules/@octokit/request/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2018 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/@octokit/request/README.md b/node_modules/@octokit/request/README.md new file mode 100644 index 00000000..db35e628 --- /dev/null +++ b/node_modules/@octokit/request/README.md @@ -0,0 +1,539 @@ +# request.js + +> Send parameterized requests to GitHub’s APIs with sensible defaults in browsers and Node + +[![@latest](https://img.shields.io/npm/v/@octokit/request.svg)](https://www.npmjs.com/package/@octokit/request) +[![Build Status](https://travis-ci.org/octokit/request.js.svg?branch=master)](https://travis-ci.org/octokit/request.js) +[![Greenkeeper](https://badges.greenkeeper.io/octokit/request.js.svg)](https://greenkeeper.io/) + +`@octokit/request` is a request library for browsers & node that makes it easier +to interact with [GitHub’s REST API](https://developer.github.com/v3/) and +[GitHub’s GraphQL API](https://developer.github.com/v4/guides/forming-calls/#the-graphql-endpoint). + +It uses [`@octokit/endpoint`](https://github.com/octokit/endpoint.js) to parse +the passed options and sends the request using [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) +([node-fetch](https://github.com/bitinn/node-fetch) in Node). + + + + + +- [Features](#features) +- [Usage](#usage) + - [REST API example](#rest-api-example) + - [GraphQL example](#graphql-example) + - [Alternative: pass `method` & `url` as part of options](#alternative-pass-method--url-as-part-of-options) +- [Authentication](#authentication) +- [request()](#request) +- [`request.defaults()`](#requestdefaults) +- [`request.endpoint`](#requestendpoint) +- [Special cases](#special-cases) + - [The `data` parameter – set request body directly](#the-data-parameter-%E2%80%93-set-request-body-directly) + - [Set parameters for both the URL/query and the request body](#set-parameters-for-both-the-urlquery-and-the-request-body) +- [LICENSE](#license) + + + +## Features + +🤩 1:1 mapping of REST API endpoint documentation, e.g. [Add labels to an issue](https://developer.github.com/v3/issues/labels/#add-labels-to-an-issue) becomes + +```js +request("POST /repos/:owner/:repo/issues/:number/labels", { + mediaType: { + previews: ["symmetra"] + }, + owner: "octokit", + repo: "request.js", + number: 1, + labels: ["🐛 bug"] +}); +``` + +👶 [Small bundle size](https://bundlephobia.com/result?p=@octokit/request@5.0.3) (\<4kb minified + gzipped) + +😎 [Authenticate](#authentication) with any of [GitHubs Authentication Strategies](https://github.com/octokit/auth.js). + +👍 Sensible defaults + +- `baseUrl`: `https://api.github.com` +- `headers.accept`: `application/vnd.github.v3+json` +- `headers.agent`: `octokit-request.js/ `, e.g. `octokit-request.js/1.2.3 Node.js/10.15.0 (macOS Mojave; x64)` + +👌 Simple to test: mock requests by passing a custom fetch method. + +🧐 Simple to debug: Sets `error.request` to request options causing the error (with redacted credentials). + +## Usage + + + + + + +
+Browsers + +Load @octokit/request directly from cdn.pika.dev + +```html + +``` + +
+Node + + +Install with npm install @octokit/request + +```js +const { request } = require("@octokit/request"); +// or: import { request } from "@octokit/request"; +``` + +
+ +### REST API example + +```js +// Following GitHub docs formatting: +// https://developer.github.com/v3/repos/#list-organization-repositories +const result = await request("GET /orgs/:org/repos", { + headers: { + authorization: "token 0000000000000000000000000000000000000001" + }, + org: "octokit", + type: "private" +}); + +console.log(`${result.data.length} repos found.`); +``` + +### GraphQL example + +For GraphQL request we recommend using [`@octokit/graphql`](https://github.com/octokit/graphql.js#readme) + +```js +const result = await request("POST /graphql", { + headers: { + authorization: "token 0000000000000000000000000000000000000001" + }, + query: `query ($login: String!) { + organization(login: $login) { + repositories(privacy: PRIVATE) { + totalCount + } + } + }`, + variables: { + login: "octokit" + } +}); +``` + +### Alternative: pass `method` & `url` as part of options + +Alternatively, pass in a method and a url + +```js +const result = await request({ + method: "GET", + url: "/orgs/:org/repos", + headers: { + authorization: "token 0000000000000000000000000000000000000001" + }, + org: "octokit", + type: "private" +}); +``` + +## Authentication + +The simplest way to authenticate a request is to set the `Authorization` header directly, e.g. to a [personal access token](https://github.com/settings/tokens/). + +```js +const requestWithAuth = request.defaults({ + headers: { + authorization: "token 0000000000000000000000000000000000000001" + } +}); +const result = await request("GET /user"); +``` + +For more complex authentication strategies such as GitHub Apps or Basic, we recommend the according authentication library exported by [`@octokit/auth`](https://github.com/octokit/auth.js). + +```js +const { createAppAuth } = require("@octokit/auth-app"); +const auth = createAppAuth({ + id: process.env.APP_ID, + privateKey: process.env.PRIVATE_KEY, + installationId: 123 +}); +const requestWithAuth = request.defaults({ + request: { + hook: auth.hook + }, + mediaType: { + previews: ["machine-man"] + } +}); + +const { data: app } = await requestWithAuth("GET /app"); +const { data: app } = await requestWithAuth("POST /repos/:owner/:repo/issues", { + owner: "octocat", + repo: "hello-world", + title: "Hello from the engine room" +}); +``` + +## request() + +`request(route, options)` or `request(options)`. + +**Options** + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ route + + String + + If route is set it has to be a string consisting of the request method and URL, e.g. GET /orgs/:org +
+ options.baseUrl + + String + + Required. Any supported http verb, case insensitive. Defaults to https://api.github.com. +
+ options.headers + + Object + + Custom headers. Passed headers are merged with defaults:
+ headers['user-agent'] defaults to octokit-rest.js/1.2.3 (where 1.2.3 is the released version).
+ headers['accept'] defaults to application/vnd.github.v3+json.
Use options.mediaType.{format,previews} to request API previews and custom media types. +
+ options.mediaType.format + + String + + Media type param, such as `raw`, `html`, or `full`. See Media Types. +
+ options.mediaType.previews + + Array of strings + + Name of previews, such as `mercy`, `symmetra`, or `scarlet-witch`. See API Previews. +
+ options.method + + String + + Required. Any supported http verb, case insensitive. Defaults to Get. +
+ options.url + + String + + Required. A path or full URL which may contain :variable or {variable} placeholders, + e.g. /orgs/:org/repos. The url is parsed using url-template. +
+ options.data + + Any + + Set request body directly instead of setting it to JSON based on additional parameters. See "The `data` parameter" below. +
+ options.request.agent + + http(s).Agent instance + + Node only. Useful for custom proxy, certificate, or dns lookup. +
+ options.request.fetch + + Function + + Custom replacement for built-in fetch method. Useful for testing or request hooks. +
+ options.request.hook + + Function + + Function with the signature hook(request, endpointOptions), where endpointOptions are the parsed options as returned by endpoint.merge(), and request is request(). This option works great in conjuction with before-after-hook. +
+ options.request.signal + + new AbortController().signal + + Use an AbortController instance to cancel a request. In node you can only cancel streamed requests. +
+ options.request.timeout + + Number + + Node only. Request/response timeout in ms, it resets on redirect. 0 to disable (OS limit applies). options.request.signal is recommended instead. +
+ +All other options except `options.request.*` will be passed depending on the `method` and `url` options. + +1. If the option key is a placeholder in the `url`, it will be used as replacement. For example, if the passed options are `{url: '/orgs/:org/repos', org: 'foo'}` the returned `options.url` is `https://api.github.com/orgs/foo/repos` +2. If the `method` is `GET` or `HEAD`, the option is passed as query parameter +3. Otherwise the parameter is passed in the request body as JSON key. + +**Result** + +`request` returns a promise and resolves with 4 keys + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ key + + type + + description +
statusIntegerResponse status status
urlStringURL of response. If a request results in redirects, this is the final URL. You can send a HEAD request to retrieve it without loading the full response body.
headersObjectAll response headers
dataAnyThe response body as returned from server. If the response is JSON then it will be parsed into an object
+ +If an error occurs, the `error` instance has additional properties to help with debugging + +- `error.status` The http response status code +- `error.headers` The http response headers as an object +- `error.request` The request options such as `method`, `url` and `data` + +## `request.defaults()` + +Override or set default options. Example: + +```js +const myrequest = require("@octokit/request").defaults({ + baseUrl: "https://github-enterprise.acme-inc.com/api/v3", + headers: { + "user-agent": "myApp/1.2.3", + authorization: `token 0000000000000000000000000000000000000001` + }, + org: "my-project", + per_page: 100 +}); + +myrequest(`GET /orgs/:org/repos`); +``` + +You can call `.defaults()` again on the returned method, the defaults will cascade. + +```js +const myProjectRequest = request.defaults({ + baseUrl: "https://github-enterprise.acme-inc.com/api/v3", + headers: { + "user-agent": "myApp/1.2.3" + }, + org: "my-project" +}); +const myProjectRequestWithAuth = myProjectRequest.defaults({ + headers: { + authorization: `token 0000000000000000000000000000000000000001` + } +}); +``` + +`myProjectRequest` now defaults the `baseUrl`, `headers['user-agent']`, +`org` and `headers['authorization']` on top of `headers['accept']` that is set +by the global default. + +## `request.endpoint` + +See https://github.com/octokit/endpoint.js. Example + +```js +const options = request.endpoint("GET /orgs/:org/repos", { + org: "my-project", + type: "private" +}); + +// { +// method: 'GET', +// url: 'https://api.github.com/orgs/my-project/repos?type=private', +// headers: { +// accept: 'application/vnd.github.v3+json', +// authorization: 'token 0000000000000000000000000000000000000001', +// 'user-agent': 'octokit/endpoint.js v1.2.3' +// } +// } +``` + +All of the [`@octokit/endpoint`](https://github.com/octokit/endpoint.js) API can be used: + +- [`octokitRequest.endpoint()`](#endpoint) +- [`octokitRequest.endpoint.defaults()`](#endpointdefaults) +- [`octokitRequest.endpoint.merge()`](#endpointdefaults) +- [`octokitRequest.endpoint.parse()`](#endpointmerge) + +## Special cases + + + +### The `data` parameter – set request body directly + +Some endpoints such as [Render a Markdown document in raw mode](https://developer.github.com/v3/markdown/#render-a-markdown-document-in-raw-mode) don’t have parameters that are sent as request body keys, instead the request body needs to be set directly. In these cases, set the `data` parameter. + +```js +const response = await request("POST /markdown/raw", { + data: "Hello world github/linguist#1 **cool**, and #1!", + headers: { + accept: "text/html;charset=utf-8", + "content-type": "text/plain" + } +}); + +// Request is sent as +// +// { +// method: 'post', +// url: 'https://api.github.com/markdown/raw', +// headers: { +// accept: 'text/html;charset=utf-8', +// 'content-type': 'text/plain', +// 'user-agent': userAgent +// }, +// body: 'Hello world github/linguist#1 **cool**, and #1!' +// } +// +// not as +// +// { +// ... +// body: '{"data": "Hello world github/linguist#1 **cool**, and #1!"}' +// } +``` + +### Set parameters for both the URL/query and the request body + +There are API endpoints that accept both query parameters as well as a body. In that case you need to add the query parameters as templates to `options.url`, as defined in the [RFC 6570 URI Template specification](https://tools.ietf.org/html/rfc6570). + +Example + +```js +request( + "POST https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}", + { + name: "example.zip", + label: "short description", + headers: { + "content-type": "text/plain", + "content-length": 14, + authorization: `token 0000000000000000000000000000000000000001` + }, + data: "Hello, world!" + } +); +``` + +## LICENSE + +[MIT](LICENSE) diff --git a/node_modules/@octokit/request/dist-node/index.js b/node_modules/@octokit/request/dist-node/index.js new file mode 100644 index 00000000..19b227bf --- /dev/null +++ b/node_modules/@octokit/request/dist-node/index.js @@ -0,0 +1,148 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var endpoint = require('@octokit/endpoint'); +var universalUserAgent = require('universal-user-agent'); +var isPlainObject = _interopDefault(require('is-plain-object')); +var nodeFetch = _interopDefault(require('node-fetch')); +var requestError = require('@octokit/request-error'); + +const VERSION = "5.3.1"; + +function getBufferResponse(response) { + return response.arrayBuffer(); +} + +function fetchWrapper(requestOptions) { + if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) { + requestOptions.body = JSON.stringify(requestOptions.body); + } + + let headers = {}; + let status; + let url; + const fetch = requestOptions.request && requestOptions.request.fetch || nodeFetch; + return fetch(requestOptions.url, Object.assign({ + method: requestOptions.method, + body: requestOptions.body, + headers: requestOptions.headers, + redirect: requestOptions.redirect + }, requestOptions.request)).then(response => { + url = response.url; + status = response.status; + + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; + } + + if (status === 204 || status === 205) { + return; + } // GitHub API returns 200 for HEAD requsets + + + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + + throw new requestError.RequestError(response.statusText, status, { + headers, + request: requestOptions + }); + } + + if (status === 304) { + throw new requestError.RequestError("Not modified", status, { + headers, + request: requestOptions + }); + } + + if (status >= 400) { + return response.text().then(message => { + const error = new requestError.RequestError(message, status, { + headers, + request: requestOptions + }); + + try { + let responseBody = JSON.parse(error.message); + Object.assign(error, responseBody); + let errors = responseBody.errors; // Assumption `errors` would always be in Array Fotmat + + error.message = error.message + ": " + errors.map(JSON.stringify).join(", "); + } catch (e) {// ignore, see octokit/rest.js#684 + } + + throw error; + }); + } + + const contentType = response.headers.get("content-type"); + + if (/application\/json/.test(contentType)) { + return response.json(); + } + + if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { + return response.text(); + } + + return getBufferResponse(response); + }).then(data => { + return { + status, + url, + headers, + data + }; + }).catch(error => { + if (error instanceof requestError.RequestError) { + throw error; + } + + throw new requestError.RequestError(error.message, 500, { + headers, + request: requestOptions + }); + }); +} + +function withDefaults(oldEndpoint, newDefaults) { + const endpoint = oldEndpoint.defaults(newDefaults); + + const newApi = function (route, parameters) { + const endpointOptions = endpoint.merge(route, parameters); + + if (!endpointOptions.request || !endpointOptions.request.hook) { + return fetchWrapper(endpoint.parse(endpointOptions)); + } + + const request = (route, parameters) => { + return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters))); + }; + + Object.assign(request, { + endpoint, + defaults: withDefaults.bind(null, endpoint) + }); + return endpointOptions.request.hook(request, endpointOptions); + }; + + return Object.assign(newApi, { + endpoint, + defaults: withDefaults.bind(null, endpoint) + }); +} + +const request = withDefaults(endpoint.endpoint, { + headers: { + "user-agent": `octokit-request.js/${VERSION} ${universalUserAgent.getUserAgent()}` + } +}); + +exports.request = request; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/request/dist-node/index.js.map b/node_modules/@octokit/request/dist-node/index.js.map new file mode 100644 index 00000000..b0ffb707 --- /dev/null +++ b/node_modules/@octokit/request/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/get-buffer-response.js","../dist-src/fetch-wrapper.js","../dist-src/with-defaults.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"5.3.1\";\n","export default function getBufferResponse(response) {\n return response.arrayBuffer();\n}\n","import isPlainObject from \"is-plain-object\";\nimport nodeFetch from \"node-fetch\";\nimport { RequestError } from \"@octokit/request-error\";\nimport getBuffer from \"./get-buffer-response\";\nexport default function fetchWrapper(requestOptions) {\n if (isPlainObject(requestOptions.body) ||\n Array.isArray(requestOptions.body)) {\n requestOptions.body = JSON.stringify(requestOptions.body);\n }\n let headers = {};\n let status;\n let url;\n const fetch = (requestOptions.request && requestOptions.request.fetch) || nodeFetch;\n return fetch(requestOptions.url, Object.assign({\n method: requestOptions.method,\n body: requestOptions.body,\n headers: requestOptions.headers,\n redirect: requestOptions.redirect\n }, requestOptions.request))\n .then(response => {\n url = response.url;\n status = response.status;\n for (const keyAndValue of response.headers) {\n headers[keyAndValue[0]] = keyAndValue[1];\n }\n if (status === 204 || status === 205) {\n return;\n }\n // GitHub API returns 200 for HEAD requsets\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return;\n }\n throw new RequestError(response.statusText, status, {\n headers,\n request: requestOptions\n });\n }\n if (status === 304) {\n throw new RequestError(\"Not modified\", status, {\n headers,\n request: requestOptions\n });\n }\n if (status >= 400) {\n return response\n .text()\n .then(message => {\n const error = new RequestError(message, status, {\n headers,\n request: requestOptions\n });\n try {\n let responseBody = JSON.parse(error.message);\n Object.assign(error, responseBody);\n let errors = responseBody.errors;\n // Assumption `errors` would always be in Array Fotmat\n error.message =\n error.message + \": \" + errors.map(JSON.stringify).join(\", \");\n }\n catch (e) {\n // ignore, see octokit/rest.js#684\n }\n throw error;\n });\n }\n const contentType = response.headers.get(\"content-type\");\n if (/application\\/json/.test(contentType)) {\n return response.json();\n }\n if (!contentType || /^text\\/|charset=utf-8$/.test(contentType)) {\n return response.text();\n }\n return getBuffer(response);\n })\n .then(data => {\n return {\n status,\n url,\n headers,\n data\n };\n })\n .catch(error => {\n if (error instanceof RequestError) {\n throw error;\n }\n throw new RequestError(error.message, 500, {\n headers,\n request: requestOptions\n });\n });\n}\n","import fetchWrapper from \"./fetch-wrapper\";\nexport default function withDefaults(oldEndpoint, newDefaults) {\n const endpoint = oldEndpoint.defaults(newDefaults);\n const newApi = function (route, parameters) {\n const endpointOptions = endpoint.merge(route, parameters);\n if (!endpointOptions.request || !endpointOptions.request.hook) {\n return fetchWrapper(endpoint.parse(endpointOptions));\n }\n const request = (route, parameters) => {\n return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters)));\n };\n Object.assign(request, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint)\n });\n return endpointOptions.request.hook(request, endpointOptions);\n };\n return Object.assign(newApi, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint)\n });\n}\n","import { endpoint } from \"@octokit/endpoint\";\nimport { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nimport withDefaults from \"./with-defaults\";\nexport const request = withDefaults(endpoint, {\n headers: {\n \"user-agent\": `octokit-request.js/${VERSION} ${getUserAgent()}`\n }\n});\n"],"names":["VERSION","getBufferResponse","response","arrayBuffer","fetchWrapper","requestOptions","isPlainObject","body","Array","isArray","JSON","stringify","headers","status","url","fetch","request","nodeFetch","Object","assign","method","redirect","then","keyAndValue","RequestError","statusText","text","message","error","responseBody","parse","errors","map","join","e","contentType","get","test","json","getBuffer","data","catch","withDefaults","oldEndpoint","newDefaults","endpoint","defaults","newApi","route","parameters","endpointOptions","merge","hook","bind","getUserAgent"],"mappings":";;;;;;;;;;;;AAAO,MAAMA,OAAO,GAAG,mBAAhB;;ACAQ,SAASC,iBAAT,CAA2BC,QAA3B,EAAqC;SACzCA,QAAQ,CAACC,WAAT,EAAP;;;ACGW,SAASC,YAAT,CAAsBC,cAAtB,EAAsC;MAC7CC,aAAa,CAACD,cAAc,CAACE,IAAhB,CAAb,IACAC,KAAK,CAACC,OAAN,CAAcJ,cAAc,CAACE,IAA7B,CADJ,EACwC;IACpCF,cAAc,CAACE,IAAf,GAAsBG,IAAI,CAACC,SAAL,CAAeN,cAAc,CAACE,IAA9B,CAAtB;;;MAEAK,OAAO,GAAG,EAAd;MACIC,MAAJ;MACIC,GAAJ;QACMC,KAAK,GAAIV,cAAc,CAACW,OAAf,IAA0BX,cAAc,CAACW,OAAf,CAAuBD,KAAlD,IAA4DE,SAA1E;SACOF,KAAK,CAACV,cAAc,CAACS,GAAhB,EAAqBI,MAAM,CAACC,MAAP,CAAc;IAC3CC,MAAM,EAAEf,cAAc,CAACe,MADoB;IAE3Cb,IAAI,EAAEF,cAAc,CAACE,IAFsB;IAG3CK,OAAO,EAAEP,cAAc,CAACO,OAHmB;IAI3CS,QAAQ,EAAEhB,cAAc,CAACgB;GAJI,EAK9BhB,cAAc,CAACW,OALe,CAArB,CAAL,CAMFM,IANE,CAMGpB,QAAQ,IAAI;IAClBY,GAAG,GAAGZ,QAAQ,CAACY,GAAf;IACAD,MAAM,GAAGX,QAAQ,CAACW,MAAlB;;SACK,MAAMU,WAAX,IAA0BrB,QAAQ,CAACU,OAAnC,EAA4C;MACxCA,OAAO,CAACW,WAAW,CAAC,CAAD,CAAZ,CAAP,GAA0BA,WAAW,CAAC,CAAD,CAArC;;;QAEAV,MAAM,KAAK,GAAX,IAAkBA,MAAM,KAAK,GAAjC,EAAsC;;KANpB;;;QAUdR,cAAc,CAACe,MAAf,KAA0B,MAA9B,EAAsC;UAC9BP,MAAM,GAAG,GAAb,EAAkB;;;;YAGZ,IAAIW,yBAAJ,CAAiBtB,QAAQ,CAACuB,UAA1B,EAAsCZ,MAAtC,EAA8C;QAChDD,OADgD;QAEhDI,OAAO,EAAEX;OAFP,CAAN;;;QAKAQ,MAAM,KAAK,GAAf,EAAoB;YACV,IAAIW,yBAAJ,CAAiB,cAAjB,EAAiCX,MAAjC,EAAyC;QAC3CD,OAD2C;QAE3CI,OAAO,EAAEX;OAFP,CAAN;;;QAKAQ,MAAM,IAAI,GAAd,EAAmB;aACRX,QAAQ,CACVwB,IADE,GAEFJ,IAFE,CAEGK,OAAO,IAAI;cACXC,KAAK,GAAG,IAAIJ,yBAAJ,CAAiBG,OAAjB,EAA0Bd,MAA1B,EAAkC;UAC5CD,OAD4C;UAE5CI,OAAO,EAAEX;SAFC,CAAd;;YAII;cACIwB,YAAY,GAAGnB,IAAI,CAACoB,KAAL,CAAWF,KAAK,CAACD,OAAjB,CAAnB;UACAT,MAAM,CAACC,MAAP,CAAcS,KAAd,EAAqBC,YAArB;cACIE,MAAM,GAAGF,YAAY,CAACE,MAA1B,CAHA;;UAKAH,KAAK,CAACD,OAAN,GACIC,KAAK,CAACD,OAAN,GAAgB,IAAhB,GAAuBI,MAAM,CAACC,GAAP,CAAWtB,IAAI,CAACC,SAAhB,EAA2BsB,IAA3B,CAAgC,IAAhC,CAD3B;SALJ,CAQA,OAAOC,CAAP,EAAU;;;cAGJN,KAAN;OAlBG,CAAP;;;UAqBEO,WAAW,GAAGjC,QAAQ,CAACU,OAAT,CAAiBwB,GAAjB,CAAqB,cAArB,CAApB;;QACI,oBAAoBC,IAApB,CAAyBF,WAAzB,CAAJ,EAA2C;aAChCjC,QAAQ,CAACoC,IAAT,EAAP;;;QAEA,CAACH,WAAD,IAAgB,yBAAyBE,IAAzB,CAA8BF,WAA9B,CAApB,EAAgE;aACrDjC,QAAQ,CAACwB,IAAT,EAAP;;;WAEGa,iBAAS,CAACrC,QAAD,CAAhB;GA5DG,EA8DFoB,IA9DE,CA8DGkB,IAAI,IAAI;WACP;MACH3B,MADG;MAEHC,GAFG;MAGHF,OAHG;MAIH4B;KAJJ;GA/DG,EAsEFC,KAtEE,CAsEIb,KAAK,IAAI;QACZA,KAAK,YAAYJ,yBAArB,EAAmC;YACzBI,KAAN;;;UAEE,IAAIJ,yBAAJ,CAAiBI,KAAK,CAACD,OAAvB,EAAgC,GAAhC,EAAqC;MACvCf,OADuC;MAEvCI,OAAO,EAAEX;KAFP,CAAN;GA1EG,CAAP;;;ACZW,SAASqC,YAAT,CAAsBC,WAAtB,EAAmCC,WAAnC,EAAgD;QACrDC,QAAQ,GAAGF,WAAW,CAACG,QAAZ,CAAqBF,WAArB,CAAjB;;QACMG,MAAM,GAAG,UAAUC,KAAV,EAAiBC,UAAjB,EAA6B;UAClCC,eAAe,GAAGL,QAAQ,CAACM,KAAT,CAAeH,KAAf,EAAsBC,UAAtB,CAAxB;;QACI,CAACC,eAAe,CAAClC,OAAjB,IAA4B,CAACkC,eAAe,CAAClC,OAAhB,CAAwBoC,IAAzD,EAA+D;aACpDhD,YAAY,CAACyC,QAAQ,CAACf,KAAT,CAAeoB,eAAf,CAAD,CAAnB;;;UAEElC,OAAO,GAAG,CAACgC,KAAD,EAAQC,UAAR,KAAuB;aAC5B7C,YAAY,CAACyC,QAAQ,CAACf,KAAT,CAAee,QAAQ,CAACM,KAAT,CAAeH,KAAf,EAAsBC,UAAtB,CAAf,CAAD,CAAnB;KADJ;;IAGA/B,MAAM,CAACC,MAAP,CAAcH,OAAd,EAAuB;MACnB6B,QADmB;MAEnBC,QAAQ,EAAEJ,YAAY,CAACW,IAAb,CAAkB,IAAlB,EAAwBR,QAAxB;KAFd;WAIOK,eAAe,CAAClC,OAAhB,CAAwBoC,IAAxB,CAA6BpC,OAA7B,EAAsCkC,eAAtC,CAAP;GAZJ;;SAcOhC,MAAM,CAACC,MAAP,CAAc4B,MAAd,EAAsB;IACzBF,QADyB;IAEzBC,QAAQ,EAAEJ,YAAY,CAACW,IAAb,CAAkB,IAAlB,EAAwBR,QAAxB;GAFP,CAAP;;;MCbS7B,OAAO,GAAG0B,YAAY,CAACG,iBAAD,EAAW;EAC1CjC,OAAO,EAAE;kBACU,sBAAqBZ,OAAQ,IAAGsD,+BAAY,EAAG;;CAFnC,CAA5B;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/request/dist-src/fetch-wrapper.js b/node_modules/@octokit/request/dist-src/fetch-wrapper.js new file mode 100644 index 00000000..f2b80d7e --- /dev/null +++ b/node_modules/@octokit/request/dist-src/fetch-wrapper.js @@ -0,0 +1,93 @@ +import isPlainObject from "is-plain-object"; +import nodeFetch from "node-fetch"; +import { RequestError } from "@octokit/request-error"; +import getBuffer from "./get-buffer-response"; +export default function fetchWrapper(requestOptions) { + if (isPlainObject(requestOptions.body) || + Array.isArray(requestOptions.body)) { + requestOptions.body = JSON.stringify(requestOptions.body); + } + let headers = {}; + let status; + let url; + const fetch = (requestOptions.request && requestOptions.request.fetch) || nodeFetch; + return fetch(requestOptions.url, Object.assign({ + method: requestOptions.method, + body: requestOptions.body, + headers: requestOptions.headers, + redirect: requestOptions.redirect + }, requestOptions.request)) + .then(response => { + url = response.url; + status = response.status; + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; + } + if (status === 204 || status === 205) { + return; + } + // GitHub API returns 200 for HEAD requsets + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + throw new RequestError(response.statusText, status, { + headers, + request: requestOptions + }); + } + if (status === 304) { + throw new RequestError("Not modified", status, { + headers, + request: requestOptions + }); + } + if (status >= 400) { + return response + .text() + .then(message => { + const error = new RequestError(message, status, { + headers, + request: requestOptions + }); + try { + let responseBody = JSON.parse(error.message); + Object.assign(error, responseBody); + let errors = responseBody.errors; + // Assumption `errors` would always be in Array Fotmat + error.message = + error.message + ": " + errors.map(JSON.stringify).join(", "); + } + catch (e) { + // ignore, see octokit/rest.js#684 + } + throw error; + }); + } + const contentType = response.headers.get("content-type"); + if (/application\/json/.test(contentType)) { + return response.json(); + } + if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { + return response.text(); + } + return getBuffer(response); + }) + .then(data => { + return { + status, + url, + headers, + data + }; + }) + .catch(error => { + if (error instanceof RequestError) { + throw error; + } + throw new RequestError(error.message, 500, { + headers, + request: requestOptions + }); + }); +} diff --git a/node_modules/@octokit/request/dist-src/get-buffer-response.js b/node_modules/@octokit/request/dist-src/get-buffer-response.js new file mode 100644 index 00000000..845a3947 --- /dev/null +++ b/node_modules/@octokit/request/dist-src/get-buffer-response.js @@ -0,0 +1,3 @@ +export default function getBufferResponse(response) { + return response.arrayBuffer(); +} diff --git a/node_modules/@octokit/request/dist-src/index.js b/node_modules/@octokit/request/dist-src/index.js new file mode 100644 index 00000000..6a36142d --- /dev/null +++ b/node_modules/@octokit/request/dist-src/index.js @@ -0,0 +1,9 @@ +import { endpoint } from "@octokit/endpoint"; +import { getUserAgent } from "universal-user-agent"; +import { VERSION } from "./version"; +import withDefaults from "./with-defaults"; +export const request = withDefaults(endpoint, { + headers: { + "user-agent": `octokit-request.js/${VERSION} ${getUserAgent()}` + } +}); diff --git a/node_modules/@octokit/request/dist-src/version.js b/node_modules/@octokit/request/dist-src/version.js new file mode 100644 index 00000000..6250d76e --- /dev/null +++ b/node_modules/@octokit/request/dist-src/version.js @@ -0,0 +1 @@ +export const VERSION = "5.3.1"; diff --git a/node_modules/@octokit/request/dist-src/with-defaults.js b/node_modules/@octokit/request/dist-src/with-defaults.js new file mode 100644 index 00000000..8e44f46e --- /dev/null +++ b/node_modules/@octokit/request/dist-src/with-defaults.js @@ -0,0 +1,22 @@ +import fetchWrapper from "./fetch-wrapper"; +export default function withDefaults(oldEndpoint, newDefaults) { + const endpoint = oldEndpoint.defaults(newDefaults); + const newApi = function (route, parameters) { + const endpointOptions = endpoint.merge(route, parameters); + if (!endpointOptions.request || !endpointOptions.request.hook) { + return fetchWrapper(endpoint.parse(endpointOptions)); + } + const request = (route, parameters) => { + return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters))); + }; + Object.assign(request, { + endpoint, + defaults: withDefaults.bind(null, endpoint) + }); + return endpointOptions.request.hook(request, endpointOptions); + }; + return Object.assign(newApi, { + endpoint, + defaults: withDefaults.bind(null, endpoint) + }); +} diff --git a/node_modules/@octokit/request/dist-types/fetch-wrapper.d.ts b/node_modules/@octokit/request/dist-types/fetch-wrapper.d.ts new file mode 100644 index 00000000..594bce61 --- /dev/null +++ b/node_modules/@octokit/request/dist-types/fetch-wrapper.d.ts @@ -0,0 +1,11 @@ +import { EndpointInterface } from "@octokit/types"; +export default function fetchWrapper(requestOptions: ReturnType & { + redirect?: string; +}): Promise<{ + status: number; + url: string; + headers: { + [header: string]: string; + }; + data: any; +}>; diff --git a/node_modules/@octokit/request/dist-types/get-buffer-response.d.ts b/node_modules/@octokit/request/dist-types/get-buffer-response.d.ts new file mode 100644 index 00000000..915b7057 --- /dev/null +++ b/node_modules/@octokit/request/dist-types/get-buffer-response.d.ts @@ -0,0 +1,2 @@ +import { Response } from "node-fetch"; +export default function getBufferResponse(response: Response): Promise; diff --git a/node_modules/@octokit/request/dist-types/index.d.ts b/node_modules/@octokit/request/dist-types/index.d.ts new file mode 100644 index 00000000..cb9c9bad --- /dev/null +++ b/node_modules/@octokit/request/dist-types/index.d.ts @@ -0,0 +1 @@ +export declare const request: import("@octokit/types").RequestInterface; diff --git a/node_modules/@octokit/request/dist-types/version.d.ts b/node_modules/@octokit/request/dist-types/version.d.ts new file mode 100644 index 00000000..c32c7ab0 --- /dev/null +++ b/node_modules/@octokit/request/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "5.3.1"; diff --git a/node_modules/@octokit/request/dist-types/with-defaults.d.ts b/node_modules/@octokit/request/dist-types/with-defaults.d.ts new file mode 100644 index 00000000..00804693 --- /dev/null +++ b/node_modules/@octokit/request/dist-types/with-defaults.d.ts @@ -0,0 +1,2 @@ +import { EndpointInterface, RequestInterface, RequestParameters } from "@octokit/types"; +export default function withDefaults(oldEndpoint: EndpointInterface, newDefaults: RequestParameters): RequestInterface; diff --git a/node_modules/@octokit/request/dist-web/index.js b/node_modules/@octokit/request/dist-web/index.js new file mode 100644 index 00000000..3f51926e --- /dev/null +++ b/node_modules/@octokit/request/dist-web/index.js @@ -0,0 +1,132 @@ +import { endpoint } from '@octokit/endpoint'; +import { getUserAgent } from 'universal-user-agent'; +import isPlainObject from 'is-plain-object'; +import nodeFetch from 'node-fetch'; +import { RequestError } from '@octokit/request-error'; + +const VERSION = "5.3.1"; + +function getBufferResponse(response) { + return response.arrayBuffer(); +} + +function fetchWrapper(requestOptions) { + if (isPlainObject(requestOptions.body) || + Array.isArray(requestOptions.body)) { + requestOptions.body = JSON.stringify(requestOptions.body); + } + let headers = {}; + let status; + let url; + const fetch = (requestOptions.request && requestOptions.request.fetch) || nodeFetch; + return fetch(requestOptions.url, Object.assign({ + method: requestOptions.method, + body: requestOptions.body, + headers: requestOptions.headers, + redirect: requestOptions.redirect + }, requestOptions.request)) + .then(response => { + url = response.url; + status = response.status; + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; + } + if (status === 204 || status === 205) { + return; + } + // GitHub API returns 200 for HEAD requsets + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + throw new RequestError(response.statusText, status, { + headers, + request: requestOptions + }); + } + if (status === 304) { + throw new RequestError("Not modified", status, { + headers, + request: requestOptions + }); + } + if (status >= 400) { + return response + .text() + .then(message => { + const error = new RequestError(message, status, { + headers, + request: requestOptions + }); + try { + let responseBody = JSON.parse(error.message); + Object.assign(error, responseBody); + let errors = responseBody.errors; + // Assumption `errors` would always be in Array Fotmat + error.message = + error.message + ": " + errors.map(JSON.stringify).join(", "); + } + catch (e) { + // ignore, see octokit/rest.js#684 + } + throw error; + }); + } + const contentType = response.headers.get("content-type"); + if (/application\/json/.test(contentType)) { + return response.json(); + } + if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { + return response.text(); + } + return getBufferResponse(response); + }) + .then(data => { + return { + status, + url, + headers, + data + }; + }) + .catch(error => { + if (error instanceof RequestError) { + throw error; + } + throw new RequestError(error.message, 500, { + headers, + request: requestOptions + }); + }); +} + +function withDefaults(oldEndpoint, newDefaults) { + const endpoint = oldEndpoint.defaults(newDefaults); + const newApi = function (route, parameters) { + const endpointOptions = endpoint.merge(route, parameters); + if (!endpointOptions.request || !endpointOptions.request.hook) { + return fetchWrapper(endpoint.parse(endpointOptions)); + } + const request = (route, parameters) => { + return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters))); + }; + Object.assign(request, { + endpoint, + defaults: withDefaults.bind(null, endpoint) + }); + return endpointOptions.request.hook(request, endpointOptions); + }; + return Object.assign(newApi, { + endpoint, + defaults: withDefaults.bind(null, endpoint) + }); +} + +const request = withDefaults(endpoint, { + headers: { + "user-agent": `octokit-request.js/${VERSION} ${getUserAgent()}` + } +}); + +export { request }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/request/dist-web/index.js.map b/node_modules/@octokit/request/dist-web/index.js.map new file mode 100644 index 00000000..f4c30849 --- /dev/null +++ b/node_modules/@octokit/request/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/get-buffer-response.js","../dist-src/fetch-wrapper.js","../dist-src/with-defaults.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"5.3.1\";\n","export default function getBufferResponse(response) {\n return response.arrayBuffer();\n}\n","import isPlainObject from \"is-plain-object\";\nimport nodeFetch from \"node-fetch\";\nimport { RequestError } from \"@octokit/request-error\";\nimport getBuffer from \"./get-buffer-response\";\nexport default function fetchWrapper(requestOptions) {\n if (isPlainObject(requestOptions.body) ||\n Array.isArray(requestOptions.body)) {\n requestOptions.body = JSON.stringify(requestOptions.body);\n }\n let headers = {};\n let status;\n let url;\n const fetch = (requestOptions.request && requestOptions.request.fetch) || nodeFetch;\n return fetch(requestOptions.url, Object.assign({\n method: requestOptions.method,\n body: requestOptions.body,\n headers: requestOptions.headers,\n redirect: requestOptions.redirect\n }, requestOptions.request))\n .then(response => {\n url = response.url;\n status = response.status;\n for (const keyAndValue of response.headers) {\n headers[keyAndValue[0]] = keyAndValue[1];\n }\n if (status === 204 || status === 205) {\n return;\n }\n // GitHub API returns 200 for HEAD requsets\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return;\n }\n throw new RequestError(response.statusText, status, {\n headers,\n request: requestOptions\n });\n }\n if (status === 304) {\n throw new RequestError(\"Not modified\", status, {\n headers,\n request: requestOptions\n });\n }\n if (status >= 400) {\n return response\n .text()\n .then(message => {\n const error = new RequestError(message, status, {\n headers,\n request: requestOptions\n });\n try {\n let responseBody = JSON.parse(error.message);\n Object.assign(error, responseBody);\n let errors = responseBody.errors;\n // Assumption `errors` would always be in Array Fotmat\n error.message =\n error.message + \": \" + errors.map(JSON.stringify).join(\", \");\n }\n catch (e) {\n // ignore, see octokit/rest.js#684\n }\n throw error;\n });\n }\n const contentType = response.headers.get(\"content-type\");\n if (/application\\/json/.test(contentType)) {\n return response.json();\n }\n if (!contentType || /^text\\/|charset=utf-8$/.test(contentType)) {\n return response.text();\n }\n return getBuffer(response);\n })\n .then(data => {\n return {\n status,\n url,\n headers,\n data\n };\n })\n .catch(error => {\n if (error instanceof RequestError) {\n throw error;\n }\n throw new RequestError(error.message, 500, {\n headers,\n request: requestOptions\n });\n });\n}\n","import fetchWrapper from \"./fetch-wrapper\";\nexport default function withDefaults(oldEndpoint, newDefaults) {\n const endpoint = oldEndpoint.defaults(newDefaults);\n const newApi = function (route, parameters) {\n const endpointOptions = endpoint.merge(route, parameters);\n if (!endpointOptions.request || !endpointOptions.request.hook) {\n return fetchWrapper(endpoint.parse(endpointOptions));\n }\n const request = (route, parameters) => {\n return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters)));\n };\n Object.assign(request, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint)\n });\n return endpointOptions.request.hook(request, endpointOptions);\n };\n return Object.assign(newApi, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint)\n });\n}\n","import { endpoint } from \"@octokit/endpoint\";\nimport { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nimport withDefaults from \"./with-defaults\";\nexport const request = withDefaults(endpoint, {\n headers: {\n \"user-agent\": `octokit-request.js/${VERSION} ${getUserAgent()}`\n }\n});\n"],"names":["getBuffer"],"mappings":";;;;;;AAAO,MAAM,OAAO,GAAG,mBAAmB,CAAC;;ACA5B,SAAS,iBAAiB,CAAC,QAAQ,EAAE;IAChD,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC;CACjC;;ACEc,SAAS,YAAY,CAAC,cAAc,EAAE;IACjD,IAAI,aAAa,CAAC,cAAc,CAAC,IAAI,CAAC;QAClC,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE;QACpC,cAAc,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;KAC7D;IACD,IAAI,OAAO,GAAG,EAAE,CAAC;IACjB,IAAI,MAAM,CAAC;IACX,IAAI,GAAG,CAAC;IACR,MAAM,KAAK,GAAG,CAAC,cAAc,CAAC,OAAO,IAAI,cAAc,CAAC,OAAO,CAAC,KAAK,KAAK,SAAS,CAAC;IACpF,OAAO,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC;QAC3C,MAAM,EAAE,cAAc,CAAC,MAAM;QAC7B,IAAI,EAAE,cAAc,CAAC,IAAI;QACzB,OAAO,EAAE,cAAc,CAAC,OAAO;QAC/B,QAAQ,EAAE,cAAc,CAAC,QAAQ;KACpC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;SACtB,IAAI,CAAC,QAAQ,IAAI;QAClB,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC;QACnB,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;QACzB,KAAK,MAAM,WAAW,IAAI,QAAQ,CAAC,OAAO,EAAE;YACxC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;SAC5C;QACD,IAAI,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,GAAG,EAAE;YAClC,OAAO;SACV;;QAED,IAAI,cAAc,CAAC,MAAM,KAAK,MAAM,EAAE;YAClC,IAAI,MAAM,GAAG,GAAG,EAAE;gBACd,OAAO;aACV;YACD,MAAM,IAAI,YAAY,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE;gBAChD,OAAO;gBACP,OAAO,EAAE,cAAc;aAC1B,CAAC,CAAC;SACN;QACD,IAAI,MAAM,KAAK,GAAG,EAAE;YAChB,MAAM,IAAI,YAAY,CAAC,cAAc,EAAE,MAAM,EAAE;gBAC3C,OAAO;gBACP,OAAO,EAAE,cAAc;aAC1B,CAAC,CAAC;SACN;QACD,IAAI,MAAM,IAAI,GAAG,EAAE;YACf,OAAO,QAAQ;iBACV,IAAI,EAAE;iBACN,IAAI,CAAC,OAAO,IAAI;gBACjB,MAAM,KAAK,GAAG,IAAI,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE;oBAC5C,OAAO;oBACP,OAAO,EAAE,cAAc;iBAC1B,CAAC,CAAC;gBACH,IAAI;oBACA,IAAI,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;oBAC7C,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;oBACnC,IAAI,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC;;oBAEjC,KAAK,CAAC,OAAO;wBACT,KAAK,CAAC,OAAO,GAAG,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;iBACpE;gBACD,OAAO,CAAC,EAAE;;iBAET;gBACD,MAAM,KAAK,CAAC;aACf,CAAC,CAAC;SACN;QACD,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QACzD,IAAI,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;YACvC,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;SAC1B;QACD,IAAI,CAAC,WAAW,IAAI,wBAAwB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;YAC5D,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;SAC1B;QACD,OAAOA,iBAAS,CAAC,QAAQ,CAAC,CAAC;KAC9B,CAAC;SACG,IAAI,CAAC,IAAI,IAAI;QACd,OAAO;YACH,MAAM;YACN,GAAG;YACH,OAAO;YACP,IAAI;SACP,CAAC;KACL,CAAC;SACG,KAAK,CAAC,KAAK,IAAI;QAChB,IAAI,KAAK,YAAY,YAAY,EAAE;YAC/B,MAAM,KAAK,CAAC;SACf;QACD,MAAM,IAAI,YAAY,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE;YACvC,OAAO;YACP,OAAO,EAAE,cAAc;SAC1B,CAAC,CAAC;KACN,CAAC,CAAC;CACN;;AC3Fc,SAAS,YAAY,CAAC,WAAW,EAAE,WAAW,EAAE;IAC3D,MAAM,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IACnD,MAAM,MAAM,GAAG,UAAU,KAAK,EAAE,UAAU,EAAE;QACxC,MAAM,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;QAC1D,IAAI,CAAC,eAAe,CAAC,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,EAAE;YAC3D,OAAO,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;SACxD;QACD,MAAM,OAAO,GAAG,CAAC,KAAK,EAAE,UAAU,KAAK;YACnC,OAAO,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;SAC1E,CAAC;QACF,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE;YACnB,QAAQ;YACR,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;SAC9C,CAAC,CAAC;QACH,OAAO,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;KACjE,CAAC;IACF,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE;QACzB,QAAQ;QACR,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;KAC9C,CAAC,CAAC;CACN;;ACjBW,MAAC,OAAO,GAAG,YAAY,CAAC,QAAQ,EAAE;IAC1C,OAAO,EAAE;QACL,YAAY,EAAE,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;KAClE;CACJ,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/LICENSE.md b/node_modules/@octokit/request/node_modules/universal-user-agent/LICENSE.md new file mode 100644 index 00000000..f105ab0c --- /dev/null +++ b/node_modules/@octokit/request/node_modules/universal-user-agent/LICENSE.md @@ -0,0 +1,7 @@ +# [ISC License](https://spdx.org/licenses/ISC) + +Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m) + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/README.md b/node_modules/@octokit/request/node_modules/universal-user-agent/README.md new file mode 100644 index 00000000..d00d14c1 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/universal-user-agent/README.md @@ -0,0 +1,25 @@ +# universal-user-agent + +> Get a user agent string in both browser and node + +[![@latest](https://img.shields.io/npm/v/universal-user-agent.svg)](https://www.npmjs.com/package/universal-user-agent) +[![Build Status](https://travis-ci.com/gr2m/universal-user-agent.svg?branch=master)](https://travis-ci.com/gr2m/universal-user-agent) +[![Greenkeeper](https://badges.greenkeeper.io/gr2m/universal-user-agent.svg)](https://greenkeeper.io/) + +```js +const { getUserAgent } = require("universal-user-agent"); +// or import { getUserAgent } from "universal-user-agent"; + +const userAgent = getUserAgent(); +// userAgent will look like this +// in browser: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0" +// in node: Node.js/v8.9.4 (macOS High Sierra; x64) +``` + +## Credits + +The Node implementation was originally inspired by [default-user-agent](https://www.npmjs.com/package/default-user-agent). + +## License + +[ISC](LICENSE.md) diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/dist-node/index.js b/node_modules/@octokit/request/node_modules/universal-user-agent/dist-node/index.js new file mode 100644 index 00000000..80a07105 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/universal-user-agent/dist-node/index.js @@ -0,0 +1,22 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var osName = _interopDefault(require('os-name')); + +function getUserAgent() { + try { + return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`; + } catch (error) { + if (/wmic os get Caption/.test(error.message)) { + return "Windows "; + } + + throw error; + } +} + +exports.getUserAgent = getUserAgent; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/dist-node/index.js.map b/node_modules/@octokit/request/node_modules/universal-user-agent/dist-node/index.js.map new file mode 100644 index 00000000..aff09ec4 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/universal-user-agent/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/node.js"],"sourcesContent":["import osName from \"os-name\";\nexport function getUserAgent() {\n try {\n return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`;\n }\n catch (error) {\n if (/wmic os get Caption/.test(error.message)) {\n return \"Windows \";\n }\n throw error;\n }\n}\n"],"names":["getUserAgent","process","version","substr","osName","arch","error","test","message"],"mappings":";;;;;;;;AACO,SAASA,YAAT,GAAwB;MACvB;WACQ,WAAUC,OAAO,CAACC,OAAR,CAAgBC,MAAhB,CAAuB,CAAvB,CAA0B,KAAIC,MAAM,EAAG,KAAIH,OAAO,CAACI,IAAK,GAA1E;GADJ,CAGA,OAAOC,KAAP,EAAc;QACN,sBAAsBC,IAAtB,CAA2BD,KAAK,CAACE,OAAjC,CAAJ,EAA+C;aACpC,gCAAP;;;UAEEF,KAAN;;;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/dist-src/browser.js b/node_modules/@octokit/request/node_modules/universal-user-agent/dist-src/browser.js new file mode 100644 index 00000000..6f52232c --- /dev/null +++ b/node_modules/@octokit/request/node_modules/universal-user-agent/dist-src/browser.js @@ -0,0 +1,3 @@ +export function getUserAgent() { + return navigator.userAgent; +} diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/dist-src/index.js b/node_modules/@octokit/request/node_modules/universal-user-agent/dist-src/index.js new file mode 100644 index 00000000..c6253f5a --- /dev/null +++ b/node_modules/@octokit/request/node_modules/universal-user-agent/dist-src/index.js @@ -0,0 +1 @@ +export { getUserAgent } from "./node"; diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/dist-src/node.js b/node_modules/@octokit/request/node_modules/universal-user-agent/dist-src/node.js new file mode 100644 index 00000000..8b70a038 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/universal-user-agent/dist-src/node.js @@ -0,0 +1,12 @@ +import osName from "os-name"; +export function getUserAgent() { + try { + return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`; + } + catch (error) { + if (/wmic os get Caption/.test(error.message)) { + return "Windows "; + } + throw error; + } +} diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/dist-types/browser.d.ts b/node_modules/@octokit/request/node_modules/universal-user-agent/dist-types/browser.d.ts new file mode 100644 index 00000000..a7bb1c44 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/universal-user-agent/dist-types/browser.d.ts @@ -0,0 +1 @@ +export declare function getUserAgent(): string; diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/dist-types/index.d.ts b/node_modules/@octokit/request/node_modules/universal-user-agent/dist-types/index.d.ts new file mode 100644 index 00000000..c6253f5a --- /dev/null +++ b/node_modules/@octokit/request/node_modules/universal-user-agent/dist-types/index.d.ts @@ -0,0 +1 @@ +export { getUserAgent } from "./node"; diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/dist-types/node.d.ts b/node_modules/@octokit/request/node_modules/universal-user-agent/dist-types/node.d.ts new file mode 100644 index 00000000..a7bb1c44 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/universal-user-agent/dist-types/node.d.ts @@ -0,0 +1 @@ +export declare function getUserAgent(): string; diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/dist-web/index.js b/node_modules/@octokit/request/node_modules/universal-user-agent/dist-web/index.js new file mode 100644 index 00000000..11ec79b3 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/universal-user-agent/dist-web/index.js @@ -0,0 +1,6 @@ +function getUserAgent() { + return navigator.userAgent; +} + +export { getUserAgent }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/dist-web/index.js.map b/node_modules/@octokit/request/node_modules/universal-user-agent/dist-web/index.js.map new file mode 100644 index 00000000..549407ec --- /dev/null +++ b/node_modules/@octokit/request/node_modules/universal-user-agent/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/browser.js"],"sourcesContent":["export function getUserAgent() {\n return navigator.userAgent;\n}\n"],"names":[],"mappings":"AAAO,SAAS,YAAY,GAAG;IAC3B,OAAO,SAAS,CAAC,SAAS,CAAC;CAC9B;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/package.json b/node_modules/@octokit/request/node_modules/universal-user-agent/package.json new file mode 100644 index 00000000..f25e07eb --- /dev/null +++ b/node_modules/@octokit/request/node_modules/universal-user-agent/package.json @@ -0,0 +1,68 @@ +{ + "_args": [ + [ + "universal-user-agent@4.0.0", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "universal-user-agent@4.0.0", + "_id": "universal-user-agent@4.0.0", + "_inBundle": false, + "_integrity": "sha512-eM8knLpev67iBDizr/YtqkJsF3GK8gzDc6st/WKzrTuPtcsOKW/0IdL4cnMBsU69pOx0otavLWBDGTwg+dB0aA==", + "_location": "/@octokit/request/universal-user-agent", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "universal-user-agent@4.0.0", + "name": "universal-user-agent", + "escapedName": "universal-user-agent", + "rawSpec": "4.0.0", + "saveSpec": null, + "fetchSpec": "4.0.0" + }, + "_requiredBy": [ + "/@octokit/request" + ], + "_resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-4.0.0.tgz", + "_spec": "4.0.0", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "bugs": { + "url": "https://github.com/gr2m/universal-user-agent/issues" + }, + "dependencies": { + "os-name": "^3.1.0" + }, + "description": "Get a user agent string in both browser and node", + "devDependencies": { + "@gr2m/pika-plugin-build-web": "^0.6.0-issue-84.1", + "@pika/pack": "^0.5.0", + "@pika/plugin-build-node": "^0.6.0", + "@pika/plugin-ts-standard-pkg": "^0.6.0", + "@types/jest": "^24.0.18", + "jest": "^24.9.0", + "prettier": "^1.18.2", + "semantic-release": "^15.9.15", + "ts-jest": "^24.0.2", + "typescript": "^3.6.2" + }, + "files": [ + "dist-*/", + "bin/" + ], + "homepage": "https://github.com/gr2m/universal-user-agent#readme", + "keywords": [], + "license": "ISC", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "name": "universal-user-agent", + "pika": true, + "repository": { + "type": "git", + "url": "git+https://github.com/gr2m/universal-user-agent.git" + }, + "sideEffects": false, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "version": "4.0.0" +} diff --git a/node_modules/@octokit/request/package.json b/node_modules/@octokit/request/package.json new file mode 100644 index 00000000..0e26e0e6 --- /dev/null +++ b/node_modules/@octokit/request/package.json @@ -0,0 +1,97 @@ +{ + "_args": [ + [ + "@octokit/request@5.3.1", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "@octokit/request@5.3.1", + "_id": "@octokit/request@5.3.1", + "_inBundle": false, + "_integrity": "sha512-5/X0AL1ZgoU32fAepTfEoggFinO3rxsMLtzhlUX+RctLrusn/CApJuGFCd0v7GMFhF+8UiCsTTfsu7Fh1HnEJg==", + "_location": "/@octokit/request", + "_phantomChildren": { + "os-name": "3.1.0" + }, + "_requested": { + "type": "version", + "registry": true, + "raw": "@octokit/request@5.3.1", + "name": "@octokit/request", + "escapedName": "@octokit%2frequest", + "scope": "@octokit", + "rawSpec": "5.3.1", + "saveSpec": null, + "fetchSpec": "5.3.1" + }, + "_requiredBy": [ + "/", + "/@octokit/graphql", + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.3.1.tgz", + "_spec": "5.3.1", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "bugs": { + "url": "https://github.com/octokit/request.js/issues" + }, + "deno": "dist-web/index.js", + "dependencies": { + "@octokit/endpoint": "^5.5.0", + "@octokit/request-error": "^1.0.1", + "@octokit/types": "^2.0.0", + "deprecation": "^2.0.0", + "is-plain-object": "^3.0.0", + "node-fetch": "^2.3.0", + "once": "^1.4.0", + "universal-user-agent": "^4.0.0" + }, + "description": "Send parameterized requests to GitHub’s APIs with sensible defaults in browsers and Node", + "devDependencies": { + "@octokit/auth-app": "^2.1.2", + "@pika/pack": "^0.5.0", + "@pika/plugin-build-node": "^0.7.0", + "@pika/plugin-build-web": "^0.7.0", + "@pika/plugin-ts-standard-pkg": "^0.7.0", + "@types/fetch-mock": "^7.2.4", + "@types/jest": "^24.0.12", + "@types/lolex": "^3.1.1", + "@types/node": "^12.0.3", + "@types/node-fetch": "^2.3.3", + "@types/once": "^1.4.0", + "fetch-mock": "^7.2.0", + "jest": "^24.7.1", + "lolex": "^5.0.0", + "prettier": "^1.17.0", + "semantic-release": "^15.13.27", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "ts-jest": "^24.0.2", + "typescript": "^3.4.5" + }, + "files": [ + "dist-*/", + "bin/" + ], + "homepage": "https://github.com/octokit/request.js#readme", + "keywords": [ + "octokit", + "github", + "api", + "request" + ], + "license": "MIT", + "main": "dist-node/index.js", + "name": "@octokit/request", + "pika": true, + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/octokit/request.js.git" + }, + "sideEffects": false, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "version": "5.3.1" +} diff --git a/node_modules/@octokit/rest/LICENSE b/node_modules/@octokit/rest/LICENSE new file mode 100644 index 00000000..4c0d268a --- /dev/null +++ b/node_modules/@octokit/rest/LICENSE @@ -0,0 +1,22 @@ +The MIT License + +Copyright (c) 2012 Cloud9 IDE, Inc. (Mike de Boer) +Copyright (c) 2017-2018 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/@octokit/rest/README.md b/node_modules/@octokit/rest/README.md new file mode 100644 index 00000000..2a318248 --- /dev/null +++ b/node_modules/@octokit/rest/README.md @@ -0,0 +1,46 @@ +# rest.js + +> GitHub REST API client for JavaScript + +[![@latest](https://img.shields.io/npm/v/@octokit/rest.svg)](https://www.npmjs.com/package/@octokit/rest) +![Build Status](https://github.com/octokit/rest.js/workflows/Test/badge.svg) +[![Greenkeeper](https://badges.greenkeeper.io/octokit/rest.js.svg)](https://greenkeeper.io/) + +## Installation + +```shell +npm install @octokit/rest +``` + +## Usage + +```js +const Octokit = require("@octokit/rest"); +const octokit = new Octokit(); + +// Compare: https://developer.github.com/v3/repos/#list-organization-repositories +octokit.repos + .listForOrg({ + org: "octokit", + type: "public" + }) + .then(({ data }) => { + // handle data + }); +``` + +See https://octokit.github.io/rest.js/ for full documentation. + +## Contributing + +We would love you to contribute to `@octokit/rest`, pull requests are very welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for more information. + +## Credits + +`@octokit/rest` was originally created as [`node-github`](https://www.npmjs.com/package/github) in 2012 by Mike de Boer from Cloud9 IDE, Inc. + +It was adopted and renamed by GitHub in 2017 + +## LICENSE + +[MIT](LICENSE) diff --git a/node_modules/@octokit/rest/index.d.ts b/node_modules/@octokit/rest/index.d.ts new file mode 100644 index 00000000..a4550287 --- /dev/null +++ b/node_modules/@octokit/rest/index.d.ts @@ -0,0 +1,36064 @@ +/** + * This file is generated based on https://github.com/octokit/routes/ & "npm run build:ts". + * + * DO NOT EDIT MANUALLY. + */ + +/** + * This declaration file requires TypeScript 3.1 or above. + */ + +/// + +import * as http from "http"; + +declare namespace Octokit { + type json = any; + type date = string; + + export interface Static { + plugin(plugin: Plugin): Static; + new (options?: Octokit.Options): Octokit; + } + + export interface Response { + /** This is the data you would see in https://developer.github.com/v3/ */ + data: T; + + /** Response status number */ + status: number; + + /** Response headers */ + headers: { + date: string; + "x-ratelimit-limit": string; + "x-ratelimit-remaining": string; + "x-ratelimit-reset": string; + "x-Octokit-request-id": string; + "x-Octokit-media-type": string; + link: string; + "last-modified": string; + etag: string; + status: string; + }; + + [Symbol.iterator](): Iterator; + } + + export type AnyResponse = Response; + + export interface EmptyParams {} + + export interface Options { + auth?: + | string + | { username: string; password: string; on2fa: () => Promise } + | { clientId: string; clientSecret: string } + | { (): string | Promise }; + userAgent?: string; + previews?: string[]; + baseUrl?: string; + log?: { + debug?: (message: string, info?: object) => void; + info?: (message: string, info?: object) => void; + warn?: (message: string, info?: object) => void; + error?: (message: string, info?: object) => void; + }; + request?: { + agent?: http.Agent; + timeout?: number; + }; + timeout?: number; // Deprecated + headers?: { [header: string]: any }; // Deprecated + agent?: http.Agent; // Deprecated + [option: string]: any; + } + + export type RequestMethod = + | "DELETE" + | "GET" + | "HEAD" + | "PATCH" + | "POST" + | "PUT"; + + export interface EndpointOptions { + baseUrl?: string; + method?: RequestMethod; + url?: string; + headers?: { [header: string]: any }; + data?: any; + request?: { [option: string]: any }; + [parameter: string]: any; + } + + export interface RequestOptions { + method?: RequestMethod; + url?: string; + headers?: RequestHeaders; + body?: any; + request?: OctokitRequestOptions; + /** + * Media type options, see {@link https://developer.github.com/v3/media/|GitHub Developer Guide} + */ + mediaType?: { + /** + * `json` by default. Can be `raw`, `text`, `html`, `full`, `diff`, `patch`, `sha`, `base64`. Depending on endpoint + */ + format?: string; + + /** + * Custom media type names of {@link https://developer.github.com/v3/media/|API Previews} without the `-preview` suffix. + * Example for single preview: `['squirrel-girl']`. + * Example for multiple previews: `['squirrel-girl', 'mister-fantastic']`. + */ + previews?: string[]; + }; + } + + export type RequestHeaders = { + /** + * Avoid setting `accept`, use `mediaFormat.{format|previews}` instead. + */ + accept?: string; + /** + * Use `authorization` to send authenticated request, remember `token ` / `bearer ` prefixes. Example: `token 1234567890abcdef1234567890abcdef12345678` + */ + authorization?: string; + /** + * `user-agent` is set do a default and can be overwritten as needed. + */ + "user-agent"?: string; + + [header: string]: string | number | undefined; + }; + + export type OctokitRequestOptions = { + /** + * Node only. Useful for custom proxy, certificate, or dns lookup. + */ + agent?: http.Agent; + /** + * Custom replacement for built-in fetch method. Useful for testing or request hooks. + */ + fetch?: any; + /** + * Use an `AbortController` instance to cancel a request. In node you can only cancel streamed requests. + */ + signal?: any; + /** + * Node only. Request/response timeout in ms, it resets on redirect. 0 to disable (OS limit applies). `options.request.signal` is recommended instead. + */ + timeout?: number; + + [option: string]: any; + }; + + export interface Log { + debug: (message: string, additionalInfo?: object) => void; + info: (message: string, additionalInfo?: object) => void; + warn: (message: string, additionalInfo?: object) => void; + error: (message: string, additionalInfo?: object) => void; + } + + export interface Endpoint { + ( + Route: string, + EndpointOptions?: Octokit.EndpointOptions + ): Octokit.RequestOptions; + (EndpointOptions: Octokit.EndpointOptions): Octokit.RequestOptions; + /** + * Current default options + */ + DEFAULTS: Octokit.EndpointOptions; + /** + * Get the defaulted endpoint options, but without parsing them into request options: + */ + merge( + Route: string, + EndpointOptions?: Octokit.EndpointOptions + ): Octokit.RequestOptions; + merge(EndpointOptions: Octokit.EndpointOptions): Octokit.RequestOptions; + /** + * Stateless method to turn endpoint options into request options. Calling endpoint(options) is the same as calling endpoint.parse(endpoint.merge(options)). + */ + parse(EndpointOptions: Octokit.EndpointOptions): Octokit.RequestOptions; + /** + * Merges existing defaults with passed options and returns new endpoint() method with new defaults + */ + defaults(EndpointOptions: Octokit.EndpointOptions): Octokit.Endpoint; + } + + export interface Request { + (Route: string, EndpointOptions?: Octokit.EndpointOptions): Promise< + Octokit.AnyResponse + >; + (EndpointOptions: Octokit.EndpointOptions): Promise; + endpoint: Octokit.Endpoint; + } + + export interface AuthBasic { + type: "basic"; + username: string; + password: string; + } + + export interface AuthOAuthToken { + type: "oauth"; + token: string; + } + + export interface AuthOAuthSecret { + type: "oauth"; + key: string; + secret: string; + } + + export interface AuthUserToken { + type: "token"; + token: string; + } + + export interface AuthJWT { + type: "app"; + token: string; + } + + export type Link = { link: string } | { headers: { link: string } } | string; + + export interface Callback { + (error: Error | null, result: T): any; + } + + export type Plugin = (octokit: Octokit, options: Octokit.Options) => void; + + // See https://github.com/octokit/request.js#request + export type HookOptions = { + baseUrl: string; + headers: { [header: string]: string }; + method: string; + url: string; + data: any; + // See https://github.com/bitinn/node-fetch#options + request: { + follow?: number; + timeout?: number; + compress?: boolean; + size?: number; + agent?: string | null; + }; + [index: string]: any; + }; + + export type HookError = Error & { + status: number; + headers: { [header: string]: string }; + documentation_url?: string; + errors?: [ + { + resource: string; + field: string; + code: string; + } + ]; + }; + + export interface Paginate { + ( + Route: string, + EndpointOptions?: Octokit.EndpointOptions, + callback?: (response: Octokit.AnyResponse, done: () => void) => any + ): Promise; + ( + EndpointOptions: Octokit.EndpointOptions, + callback?: (response: Octokit.AnyResponse, done: () => void) => any + ): Promise; + iterator: ( + EndpointOptions: Octokit.EndpointOptions + ) => AsyncIterableIterator; + } + + // response types + type UsersUpdateAuthenticatedResponsePlan = { + collaborators: number; + name: string; + private_repos: number; + space: number; + }; + type UsersUpdateAuthenticatedResponse = { + avatar_url: string; + bio: string; + blog: string; + collaborators: number; + company: string; + created_at: string; + disk_usage: number; + email: string; + events_url: string; + followers: number; + followers_url: string; + following: number; + following_url: string; + gists_url: string; + gravatar_id: string; + hireable: boolean; + html_url: string; + id: number; + location: string; + login: string; + name: string; + node_id: string; + organizations_url: string; + owned_private_repos: number; + plan: UsersUpdateAuthenticatedResponsePlan; + private_gists: number; + public_gists: number; + public_repos: number; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + total_private_repos: number; + two_factor_authentication: boolean; + type: string; + updated_at: string; + url: string; + }; + type UsersTogglePrimaryEmailVisibilityResponseItem = { + email: string; + primary: boolean; + verified: boolean; + visibility: string; + }; + type UsersListPublicKeysForUserResponseItem = { id: number; key: string }; + type UsersListPublicKeysResponseItem = { + created_at: string; + id: number; + key: string; + read_only: boolean; + title: string; + url: string; + verified: boolean; + }; + type UsersListPublicEmailsResponseItem = { + email: string; + primary: boolean; + verified: boolean; + visibility: string; + }; + type UsersListGpgKeysForUserResponseItemSubkeysItem = { + can_certify: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + can_sign: boolean; + created_at: string; + emails: Array; + expires_at: null; + id: number; + key_id: string; + primary_key_id: number; + public_key: string; + subkeys: Array; + }; + type UsersListGpgKeysForUserResponseItemEmailsItem = { + email: string; + verified: boolean; + }; + type UsersListGpgKeysForUserResponseItem = { + can_certify: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + can_sign: boolean; + created_at: string; + emails: Array; + expires_at: null; + id: number; + key_id: string; + primary_key_id: null; + public_key: string; + subkeys: Array; + }; + type UsersListGpgKeysResponseItemSubkeysItem = { + can_certify: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + can_sign: boolean; + created_at: string; + emails: Array; + expires_at: null; + id: number; + key_id: string; + primary_key_id: number; + public_key: string; + subkeys: Array; + }; + type UsersListGpgKeysResponseItemEmailsItem = { + email: string; + verified: boolean; + }; + type UsersListGpgKeysResponseItem = { + can_certify: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + can_sign: boolean; + created_at: string; + emails: Array; + expires_at: null; + id: number; + key_id: string; + primary_key_id: null; + public_key: string; + subkeys: Array; + }; + type UsersListFollowingForUserResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type UsersListFollowingForAuthenticatedUserResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type UsersListFollowersForUserResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type UsersListFollowersForAuthenticatedUserResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type UsersListEmailsResponseItem = { + email: string; + primary: boolean; + verified: boolean; + visibility: string; + }; + type UsersListBlockedResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type UsersListResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type UsersGetPublicKeyResponse = { + created_at: string; + id: number; + key: string; + read_only: boolean; + title: string; + url: string; + verified: boolean; + }; + type UsersGetGpgKeyResponseSubkeysItem = { + can_certify: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + can_sign: boolean; + created_at: string; + emails: Array; + expires_at: null; + id: number; + key_id: string; + primary_key_id: number; + public_key: string; + subkeys: Array; + }; + type UsersGetGpgKeyResponseEmailsItem = { email: string; verified: boolean }; + type UsersGetGpgKeyResponse = { + can_certify: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + can_sign: boolean; + created_at: string; + emails: Array; + expires_at: null; + id: number; + key_id: string; + primary_key_id: null; + public_key: string; + subkeys: Array; + }; + type UsersGetContextForUserResponseContextsItem = { + message: string; + octicon: string; + }; + type UsersGetContextForUserResponse = { + contexts: Array; + }; + type UsersGetByUsernameResponsePlan = { + collaborators: number; + name: string; + private_repos: number; + space: number; + }; + type UsersGetByUsernameResponse = { + avatar_url: string; + bio: string; + blog: string; + company: string; + created_at: string; + email: string; + events_url: string; + followers: number; + followers_url: string; + following: number; + following_url: string; + gists_url: string; + gravatar_id: string; + hireable: boolean; + html_url: string; + id: number; + location: string; + login: string; + name: string; + node_id: string; + organizations_url: string; + public_gists: number; + public_repos: number; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + updated_at: string; + url: string; + plan?: UsersGetByUsernameResponsePlan; + }; + type UsersGetAuthenticatedResponsePlan = { + collaborators: number; + name: string; + private_repos: number; + space: number; + }; + type UsersGetAuthenticatedResponse = { + avatar_url: string; + bio: string; + blog: string; + collaborators?: number; + company: string; + created_at: string; + disk_usage?: number; + email: string; + events_url: string; + followers: number; + followers_url: string; + following: number; + following_url: string; + gists_url: string; + gravatar_id: string; + hireable: boolean; + html_url: string; + id: number; + location: string; + login: string; + name: string; + node_id: string; + organizations_url: string; + owned_private_repos?: number; + plan?: UsersGetAuthenticatedResponsePlan; + private_gists?: number; + public_gists: number; + public_repos: number; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + total_private_repos?: number; + two_factor_authentication?: boolean; + type: string; + updated_at: string; + url: string; + }; + type UsersCreatePublicKeyResponse = { + created_at: string; + id: number; + key: string; + read_only: boolean; + title: string; + url: string; + verified: boolean; + }; + type UsersCreateGpgKeyResponseSubkeysItem = { + can_certify: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + can_sign: boolean; + created_at: string; + emails: Array; + expires_at: null; + id: number; + key_id: string; + primary_key_id: number; + public_key: string; + subkeys: Array; + }; + type UsersCreateGpgKeyResponseEmailsItem = { + email: string; + verified: boolean; + }; + type UsersCreateGpgKeyResponse = { + can_certify: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + can_sign: boolean; + created_at: string; + emails: Array; + expires_at: null; + id: number; + key_id: string; + primary_key_id: null; + public_key: string; + subkeys: Array; + }; + type UsersAddEmailsResponseItem = { + email: string; + primary: boolean; + verified: boolean; + visibility: string | null; + }; + type TeamsUpdateDiscussionCommentResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; + }; + type TeamsUpdateDiscussionCommentResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsUpdateDiscussionCommentResponse = { + author: TeamsUpdateDiscussionCommentResponseAuthor; + body: string; + body_html: string; + body_version: string; + created_at: string; + discussion_url: string; + html_url: string; + last_edited_at: string; + node_id: string; + number: number; + reactions: TeamsUpdateDiscussionCommentResponseReactions; + updated_at: string; + url: string; + }; + type TeamsUpdateDiscussionResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; + }; + type TeamsUpdateDiscussionResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsUpdateDiscussionResponse = { + author: TeamsUpdateDiscussionResponseAuthor; + body: string; + body_html: string; + body_version: string; + comments_count: number; + comments_url: string; + created_at: string; + html_url: string; + last_edited_at: string; + node_id: string; + number: number; + pinned: boolean; + private: boolean; + reactions: TeamsUpdateDiscussionResponseReactions; + team_url: string; + title: string; + updated_at: string; + url: string; + }; + type TeamsUpdateResponseOrganization = { + avatar_url: string; + blog: string; + company: string; + created_at: string; + description: string; + email: string; + events_url: string; + followers: number; + following: number; + has_organization_projects: boolean; + has_repository_projects: boolean; + hooks_url: string; + html_url: string; + id: number; + is_verified: boolean; + issues_url: string; + location: string; + login: string; + members_url: string; + name: string; + node_id: string; + public_gists: number; + public_members_url: string; + public_repos: number; + repos_url: string; + type: string; + url: string; + }; + type TeamsUpdateResponse = { + created_at: string; + description: string; + html_url: string; + id: number; + members_count: number; + members_url: string; + name: string; + node_id: string; + organization: TeamsUpdateResponseOrganization; + parent: null; + permission: string; + privacy: string; + repos_count: number; + repositories_url: string; + slug: string; + updated_at: string; + url: string; + }; + type TeamsReviewProjectResponsePermissions = { + admin: boolean; + read: boolean; + write: boolean; + }; + type TeamsReviewProjectResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsReviewProjectResponse = { + body: string; + columns_url: string; + created_at: string; + creator: TeamsReviewProjectResponseCreator; + html_url: string; + id: number; + name: string; + node_id: string; + number: number; + organization_permission: string; + owner_url: string; + permissions: TeamsReviewProjectResponsePermissions; + private: boolean; + state: string; + updated_at: string; + url: string; + }; + type TeamsListReposResponseItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type TeamsListReposResponseItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsListReposResponseItemLicense = { + key: string; + name: string; + node_id: string; + spdx_id: string; + url: string; + }; + type TeamsListReposResponseItem = { + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + license: TeamsListReposResponseItemLicense; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: TeamsListReposResponseItemOwner; + permissions: TeamsListReposResponseItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type TeamsListProjectsResponseItemPermissions = { + admin: boolean; + read: boolean; + write: boolean; + }; + type TeamsListProjectsResponseItemCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsListProjectsResponseItem = { + body: string; + columns_url: string; + created_at: string; + creator: TeamsListProjectsResponseItemCreator; + html_url: string; + id: number; + name: string; + node_id: string; + number: number; + organization_permission: string; + owner_url: string; + permissions: TeamsListProjectsResponseItemPermissions; + private: boolean; + state: string; + updated_at: string; + url: string; + }; + type TeamsListPendingInvitationsResponseItemInviter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsListPendingInvitationsResponseItem = { + created_at: string; + email: string; + id: number; + invitation_team_url: string; + inviter: TeamsListPendingInvitationsResponseItemInviter; + login: string; + role: string; + team_count: number; + }; + type TeamsListMembersResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsListForAuthenticatedUserResponseItemOrganization = { + avatar_url: string; + blog: string; + company: string; + created_at: string; + description: string; + email: string; + events_url: string; + followers: number; + following: number; + has_organization_projects: boolean; + has_repository_projects: boolean; + hooks_url: string; + html_url: string; + id: number; + is_verified: boolean; + issues_url: string; + location: string; + login: string; + members_url: string; + name: string; + node_id: string; + public_gists: number; + public_members_url: string; + public_repos: number; + repos_url: string; + type: string; + url: string; + }; + type TeamsListForAuthenticatedUserResponseItem = { + created_at: string; + description: string; + html_url: string; + id: number; + members_count: number; + members_url: string; + name: string; + node_id: string; + organization: TeamsListForAuthenticatedUserResponseItemOrganization; + parent: null; + permission: string; + privacy: string; + repos_count: number; + repositories_url: string; + slug: string; + updated_at: string; + url: string; + }; + type TeamsListDiscussionsResponseItemReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; + }; + type TeamsListDiscussionsResponseItemAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsListDiscussionsResponseItem = { + author: TeamsListDiscussionsResponseItemAuthor; + body: string; + body_html: string; + body_version: string; + comments_count: number; + comments_url: string; + created_at: string; + html_url: string; + last_edited_at: null; + node_id: string; + number: number; + pinned: boolean; + private: boolean; + reactions: TeamsListDiscussionsResponseItemReactions; + team_url: string; + title: string; + updated_at: string; + url: string; + }; + type TeamsListDiscussionCommentsResponseItemReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; + }; + type TeamsListDiscussionCommentsResponseItemAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsListDiscussionCommentsResponseItem = { + author: TeamsListDiscussionCommentsResponseItemAuthor; + body: string; + body_html: string; + body_version: string; + created_at: string; + discussion_url: string; + html_url: string; + last_edited_at: null; + node_id: string; + number: number; + reactions: TeamsListDiscussionCommentsResponseItemReactions; + updated_at: string; + url: string; + }; + type TeamsListChildResponseItemParent = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type TeamsListChildResponseItem = { + description: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: TeamsListChildResponseItemParent; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type TeamsListResponseItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type TeamsGetMembershipResponse = { + role: string; + state: string; + url: string; + }; + type TeamsGetDiscussionCommentResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; + }; + type TeamsGetDiscussionCommentResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsGetDiscussionCommentResponse = { + author: TeamsGetDiscussionCommentResponseAuthor; + body: string; + body_html: string; + body_version: string; + created_at: string; + discussion_url: string; + html_url: string; + last_edited_at: null; + node_id: string; + number: number; + reactions: TeamsGetDiscussionCommentResponseReactions; + updated_at: string; + url: string; + }; + type TeamsGetDiscussionResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; + }; + type TeamsGetDiscussionResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsGetDiscussionResponse = { + author: TeamsGetDiscussionResponseAuthor; + body: string; + body_html: string; + body_version: string; + comments_count: number; + comments_url: string; + created_at: string; + html_url: string; + last_edited_at: null; + node_id: string; + number: number; + pinned: boolean; + private: boolean; + reactions: TeamsGetDiscussionResponseReactions; + team_url: string; + title: string; + updated_at: string; + url: string; + }; + type TeamsGetByNameResponseOrganization = { + avatar_url: string; + blog: string; + company: string; + created_at: string; + description: string; + email: string; + events_url: string; + followers: number; + following: number; + has_organization_projects: boolean; + has_repository_projects: boolean; + hooks_url: string; + html_url: string; + id: number; + is_verified: boolean; + issues_url: string; + location: string; + login: string; + members_url: string; + name: string; + node_id: string; + public_gists: number; + public_members_url: string; + public_repos: number; + repos_url: string; + type: string; + url: string; + }; + type TeamsGetByNameResponse = { + created_at: string; + description: string; + html_url: string; + id: number; + members_count: number; + members_url: string; + name: string; + node_id: string; + organization: TeamsGetByNameResponseOrganization; + parent: null; + permission: string; + privacy: string; + repos_count: number; + repositories_url: string; + slug: string; + updated_at: string; + url: string; + }; + type TeamsGetResponseOrganization = { + avatar_url: string; + blog: string; + company: string; + created_at: string; + description: string; + email: string; + events_url: string; + followers: number; + following: number; + has_organization_projects: boolean; + has_repository_projects: boolean; + hooks_url: string; + html_url: string; + id: number; + is_verified: boolean; + issues_url: string; + location: string; + login: string; + members_url: string; + name: string; + node_id: string; + public_gists: number; + public_members_url: string; + public_repos: number; + repos_url: string; + type: string; + url: string; + }; + type TeamsGetResponse = { + created_at: string; + description: string; + html_url: string; + id: number; + members_count: number; + members_url: string; + name: string; + node_id: string; + organization: TeamsGetResponseOrganization; + parent: null; + permission: string; + privacy: string; + repos_count: number; + repositories_url: string; + slug: string; + updated_at: string; + url: string; + }; + type TeamsCreateDiscussionCommentResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; + }; + type TeamsCreateDiscussionCommentResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsCreateDiscussionCommentResponse = { + author: TeamsCreateDiscussionCommentResponseAuthor; + body: string; + body_html: string; + body_version: string; + created_at: string; + discussion_url: string; + html_url: string; + last_edited_at: null; + node_id: string; + number: number; + reactions: TeamsCreateDiscussionCommentResponseReactions; + updated_at: string; + url: string; + }; + type TeamsCreateDiscussionResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; + }; + type TeamsCreateDiscussionResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsCreateDiscussionResponse = { + author: TeamsCreateDiscussionResponseAuthor; + body: string; + body_html: string; + body_version: string; + comments_count: number; + comments_url: string; + created_at: string; + html_url: string; + last_edited_at: null; + node_id: string; + number: number; + pinned: boolean; + private: boolean; + reactions: TeamsCreateDiscussionResponseReactions; + team_url: string; + title: string; + updated_at: string; + url: string; + }; + type TeamsCreateResponseOrganization = { + avatar_url: string; + blog: string; + company: string; + created_at: string; + description: string; + email: string; + events_url: string; + followers: number; + following: number; + has_organization_projects: boolean; + has_repository_projects: boolean; + hooks_url: string; + html_url: string; + id: number; + is_verified: boolean; + issues_url: string; + location: string; + login: string; + members_url: string; + name: string; + node_id: string; + public_gists: number; + public_members_url: string; + public_repos: number; + repos_url: string; + type: string; + url: string; + }; + type TeamsCreateResponse = { + created_at: string; + description: string; + html_url: string; + id: number; + members_count: number; + members_url: string; + name: string; + node_id: string; + organization: TeamsCreateResponseOrganization; + parent: null; + permission: string; + privacy: string; + repos_count: number; + repositories_url: string; + slug: string; + updated_at: string; + url: string; + }; + type TeamsCheckManagesRepoResponsePermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type TeamsCheckManagesRepoResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type TeamsCheckManagesRepoResponse = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: TeamsCheckManagesRepoResponseOwner; + permissions: TeamsCheckManagesRepoResponsePermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type TeamsAddOrUpdateProjectResponse = { + documentation_url: string; + message: string; + }; + type TeamsAddOrUpdateMembershipResponse = { + role: string; + state: string; + url: string; + }; + type TeamsAddMemberResponseErrorsItem = { + code: string; + field: string; + resource: string; + }; + type TeamsAddMemberResponse = { + errors: Array; + message: string; + }; + type SearchUsersResponseItemsItem = { + avatar_url: string; + followers_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + score: number; + subscriptions_url: string; + type: string; + url: string; + }; + type SearchUsersResponse = { + incomplete_results: boolean; + items: Array; + total_count: number; + }; + type SearchTopicsResponseItemsItem = { + created_at: string; + created_by: string; + curated: boolean; + description: string; + display_name: string; + featured: boolean; + name: string; + released: string; + score: number; + short_description: string; + updated_at: string; + }; + type SearchTopicsResponse = { + incomplete_results: boolean; + items: Array; + total_count: number; + }; + type SearchReposResponseItemsItemOwner = { + avatar_url: string; + gravatar_id: string; + id: number; + login: string; + node_id: string; + received_events_url: string; + type: string; + url: string; + }; + type SearchReposResponseItemsItem = { + created_at: string; + default_branch: string; + description: string; + fork: boolean; + forks_count: number; + full_name: string; + homepage: string; + html_url: string; + id: number; + language: string; + master_branch: string; + name: string; + node_id: string; + open_issues_count: number; + owner: SearchReposResponseItemsItemOwner; + private: boolean; + pushed_at: string; + score: number; + size: number; + stargazers_count: number; + updated_at: string; + url: string; + watchers_count: number; + }; + type SearchReposResponse = { + incomplete_results: boolean; + items: Array; + total_count: number; + }; + type SearchLabelsResponseItemsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + score: number; + url: string; + }; + type SearchLabelsResponse = { + incomplete_results: boolean; + items: Array; + total_count: number; + }; + type SearchIssuesAndPullRequestsResponseItemsItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type SearchIssuesAndPullRequestsResponseItemsItemPullRequest = { + diff_url: null; + html_url: null; + patch_url: null; + }; + type SearchIssuesAndPullRequestsResponseItemsItemLabelsItem = { + color: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type SearchIssuesAndPullRequestsResponseItemsItem = { + assignee: null; + body: string; + closed_at: null; + comments: number; + comments_url: string; + created_at: string; + events_url: string; + html_url: string; + id: number; + labels: Array; + labels_url: string; + milestone: null; + node_id: string; + number: number; + pull_request: SearchIssuesAndPullRequestsResponseItemsItemPullRequest; + repository_url: string; + score: number; + state: string; + title: string; + updated_at: string; + url: string; + user: SearchIssuesAndPullRequestsResponseItemsItemUser; + }; + type SearchIssuesAndPullRequestsResponse = { + incomplete_results: boolean; + items: Array; + total_count: number; + }; + type SearchIssuesResponseItemsItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type SearchIssuesResponseItemsItemPullRequest = { + diff_url: null; + html_url: null; + patch_url: null; + }; + type SearchIssuesResponseItemsItemLabelsItem = { + color: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type SearchIssuesResponseItemsItem = { + assignee: null; + body: string; + closed_at: null; + comments: number; + comments_url: string; + created_at: string; + events_url: string; + html_url: string; + id: number; + labels: Array; + labels_url: string; + milestone: null; + node_id: string; + number: number; + pull_request: SearchIssuesResponseItemsItemPullRequest; + repository_url: string; + score: number; + state: string; + title: string; + updated_at: string; + url: string; + user: SearchIssuesResponseItemsItemUser; + }; + type SearchIssuesResponse = { + incomplete_results: boolean; + items: Array; + total_count: number; + }; + type SearchCommitsResponseItemsItemRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type SearchCommitsResponseItemsItemRepository = { + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + description: string; + downloads_url: string; + events_url: string; + fork: boolean; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + hooks_url: string; + html_url: string; + id: number; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + name: string; + node_id: string; + notifications_url: string; + owner: SearchCommitsResponseItemsItemRepositoryOwner; + private: boolean; + pulls_url: string; + releases_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + url: string; + }; + type SearchCommitsResponseItemsItemParentsItem = { + html_url: string; + sha: string; + url: string; + }; + type SearchCommitsResponseItemsItemCommitter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type SearchCommitsResponseItemsItemCommitTree = { sha: string; url: string }; + type SearchCommitsResponseItemsItemCommitCommitter = { + date: string; + email: string; + name: string; + }; + type SearchCommitsResponseItemsItemCommitAuthor = { + date: string; + email: string; + name: string; + }; + type SearchCommitsResponseItemsItemCommit = { + author: SearchCommitsResponseItemsItemCommitAuthor; + comment_count: number; + committer: SearchCommitsResponseItemsItemCommitCommitter; + message: string; + tree: SearchCommitsResponseItemsItemCommitTree; + url: string; + }; + type SearchCommitsResponseItemsItemAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type SearchCommitsResponseItemsItem = { + author: SearchCommitsResponseItemsItemAuthor; + comments_url: string; + commit: SearchCommitsResponseItemsItemCommit; + committer: SearchCommitsResponseItemsItemCommitter; + html_url: string; + parents: Array; + repository: SearchCommitsResponseItemsItemRepository; + score: number; + sha: string; + url: string; + }; + type SearchCommitsResponse = { + incomplete_results: boolean; + items: Array; + total_count: number; + }; + type SearchCodeResponseItemsItemRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type SearchCodeResponseItemsItemRepository = { + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + description: string; + downloads_url: string; + events_url: string; + fork: boolean; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + hooks_url: string; + html_url: string; + id: number; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + name: string; + node_id: string; + notifications_url: string; + owner: SearchCodeResponseItemsItemRepositoryOwner; + private: boolean; + pulls_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + url: string; + }; + type SearchCodeResponseItemsItem = { + git_url: string; + html_url: string; + name: string; + path: string; + repository: SearchCodeResponseItemsItemRepository; + score: number; + sha: string; + url: string; + }; + type SearchCodeResponse = { + incomplete_results: boolean; + items: Array; + total_count: number; + }; + type ReposUploadReleaseAssetResponseValueUploader = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposUploadReleaseAssetResponseValue = { + browser_download_url: string; + content_type: string; + created_at: string; + download_count: number; + id: number; + label: string; + name: string; + node_id: string; + size: number; + state: string; + updated_at: string; + uploader: ReposUploadReleaseAssetResponseValueUploader; + url: string; + }; + type ReposUploadReleaseAssetResponse = { + value: ReposUploadReleaseAssetResponseValue; + }; + type ReposUpdateReleaseAssetResponseUploader = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposUpdateReleaseAssetResponse = { + browser_download_url: string; + content_type: string; + created_at: string; + download_count: number; + id: number; + label: string; + name: string; + node_id: string; + size: number; + state: string; + updated_at: string; + uploader: ReposUpdateReleaseAssetResponseUploader; + url: string; + }; + type ReposUpdateReleaseResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposUpdateReleaseResponseAssetsItemUploader = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposUpdateReleaseResponseAssetsItem = { + browser_download_url: string; + content_type: string; + created_at: string; + download_count: number; + id: number; + label: string; + name: string; + node_id: string; + size: number; + state: string; + updated_at: string; + uploader: ReposUpdateReleaseResponseAssetsItemUploader; + url: string; + }; + type ReposUpdateReleaseResponse = { + assets: Array; + assets_url: string; + author: ReposUpdateReleaseResponseAuthor; + body: string; + created_at: string; + draft: boolean; + html_url: string; + id: number; + name: string; + node_id: string; + prerelease: boolean; + published_at: string; + tag_name: string; + tarball_url: string; + target_commitish: string; + upload_url: string; + url: string; + zipball_url: string; + }; + type ReposUpdateProtectedBranchRequiredStatusChecksResponse = { + contexts: Array; + contexts_url: string; + strict: boolean; + url: string; + }; + type ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsUsersItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictions = { + teams: Array< + ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsTeamsItem + >; + teams_url: string; + url: string; + users: Array< + ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsUsersItem + >; + users_url: string; + }; + type ReposUpdateProtectedBranchPullRequestReviewEnforcementResponse = { + dismiss_stale_reviews: boolean; + dismissal_restrictions: ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictions; + require_code_owner_reviews: boolean; + required_approving_review_count: number; + url: string; + }; + type ReposUpdateInvitationResponseRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposUpdateInvitationResponseRepository = { + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + description: string; + downloads_url: string; + events_url: string; + fork: boolean; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + html_url: string; + id: number; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + name: string; + node_id: string; + notifications_url: string; + owner: ReposUpdateInvitationResponseRepositoryOwner; + private: boolean; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + url: string; + }; + type ReposUpdateInvitationResponseInviter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposUpdateInvitationResponseInvitee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposUpdateInvitationResponse = { + created_at: string; + html_url: string; + id: number; + invitee: ReposUpdateInvitationResponseInvitee; + inviter: ReposUpdateInvitationResponseInviter; + permissions: string; + repository: ReposUpdateInvitationResponseRepository; + url: string; + }; + type ReposUpdateHookResponseLastResponse = { + code: null; + message: null; + status: string; + }; + type ReposUpdateHookResponseConfig = { + content_type: string; + insecure_ssl: string; + url: string; + }; + type ReposUpdateHookResponse = { + active: boolean; + config: ReposUpdateHookResponseConfig; + created_at: string; + events: Array; + id: number; + last_response: ReposUpdateHookResponseLastResponse; + name: string; + ping_url: string; + test_url: string; + type: string; + updated_at: string; + url: string; + }; + type ReposUpdateFileResponseContentLinks = { + git: string; + html: string; + self: string; + }; + type ReposUpdateFileResponseContent = { + _links: ReposUpdateFileResponseContentLinks; + download_url: string; + git_url: string; + html_url: string; + name: string; + path: string; + sha: string; + size: number; + type: string; + url: string; + }; + type ReposUpdateFileResponseCommitVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; + }; + type ReposUpdateFileResponseCommitTree = { sha: string; url: string }; + type ReposUpdateFileResponseCommitParentsItem = { + html_url: string; + sha: string; + url: string; + }; + type ReposUpdateFileResponseCommitCommitter = { + date: string; + email: string; + name: string; + }; + type ReposUpdateFileResponseCommitAuthor = { + date: string; + email: string; + name: string; + }; + type ReposUpdateFileResponseCommit = { + author: ReposUpdateFileResponseCommitAuthor; + committer: ReposUpdateFileResponseCommitCommitter; + html_url: string; + message: string; + node_id: string; + parents: Array; + sha: string; + tree: ReposUpdateFileResponseCommitTree; + url: string; + verification: ReposUpdateFileResponseCommitVerification; + }; + type ReposUpdateFileResponse = { + commit: ReposUpdateFileResponseCommit; + content: ReposUpdateFileResponseContent; + }; + type ReposUpdateCommitCommentResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposUpdateCommitCommentResponse = { + body: string; + commit_id: string; + created_at: string; + html_url: string; + id: number; + line: number; + node_id: string; + path: string; + position: number; + updated_at: string; + url: string; + user: ReposUpdateCommitCommentResponseUser; + }; + type ReposUpdateBranchProtectionResponseRestrictionsUsersItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposUpdateBranchProtectionResponseRestrictionsTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type ReposUpdateBranchProtectionResponseRestrictionsAppsItemPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type ReposUpdateBranchProtectionResponseRestrictionsAppsItemOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type ReposUpdateBranchProtectionResponseRestrictionsAppsItem = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ReposUpdateBranchProtectionResponseRestrictionsAppsItemOwner; + permissions: ReposUpdateBranchProtectionResponseRestrictionsAppsItemPermissions; + slug: string; + updated_at: string; + }; + type ReposUpdateBranchProtectionResponseRestrictions = { + apps: Array; + apps_url: string; + teams: Array; + teams_url: string; + url: string; + users: Array; + users_url: string; + }; + type ReposUpdateBranchProtectionResponseRequiredStatusChecks = { + contexts: Array; + contexts_url: string; + strict: boolean; + url: string; + }; + type ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsUsersItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictions = { + teams: Array< + ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsTeamsItem + >; + teams_url: string; + url: string; + users: Array< + ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsUsersItem + >; + users_url: string; + }; + type ReposUpdateBranchProtectionResponseRequiredPullRequestReviews = { + dismiss_stale_reviews: boolean; + dismissal_restrictions: ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictions; + require_code_owner_reviews: boolean; + required_approving_review_count: number; + url: string; + }; + type ReposUpdateBranchProtectionResponseEnforceAdmins = { + enabled: boolean; + url: string; + }; + type ReposUpdateBranchProtectionResponse = { + enforce_admins: ReposUpdateBranchProtectionResponseEnforceAdmins; + required_pull_request_reviews: ReposUpdateBranchProtectionResponseRequiredPullRequestReviews; + required_status_checks: ReposUpdateBranchProtectionResponseRequiredStatusChecks; + restrictions: ReposUpdateBranchProtectionResponseRestrictions; + url: string; + }; + type ReposUpdateResponseSourcePermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposUpdateResponseSourceOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposUpdateResponseSource = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposUpdateResponseSourceOwner; + permissions: ReposUpdateResponseSourcePermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type ReposUpdateResponsePermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposUpdateResponseParentPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposUpdateResponseParentOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposUpdateResponseParent = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposUpdateResponseParentOwner; + permissions: ReposUpdateResponseParentPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type ReposUpdateResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposUpdateResponseOrganization = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposUpdateResponse = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + organization: ReposUpdateResponseOrganization; + owner: ReposUpdateResponseOwner; + parent: ReposUpdateResponseParent; + permissions: ReposUpdateResponsePermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + source: ReposUpdateResponseSource; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type ReposTransferResponsePermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposTransferResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposTransferResponse = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposTransferResponseOwner; + permissions: ReposTransferResponsePermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type ReposRetrieveCommunityProfileMetricsResponseFilesReadme = { + html_url: string; + url: string; + }; + type ReposRetrieveCommunityProfileMetricsResponseFilesPullRequestTemplate = { + html_url: string; + url: string; + }; + type ReposRetrieveCommunityProfileMetricsResponseFilesLicense = { + html_url: string; + key: string; + name: string; + spdx_id: string; + url: string; + }; + type ReposRetrieveCommunityProfileMetricsResponseFilesIssueTemplate = { + html_url: string; + url: string; + }; + type ReposRetrieveCommunityProfileMetricsResponseFilesContributing = { + html_url: string; + url: string; + }; + type ReposRetrieveCommunityProfileMetricsResponseFilesCodeOfConduct = { + html_url: string; + key: string; + name: string; + url: string; + }; + type ReposRetrieveCommunityProfileMetricsResponseFiles = { + code_of_conduct: ReposRetrieveCommunityProfileMetricsResponseFilesCodeOfConduct; + contributing: ReposRetrieveCommunityProfileMetricsResponseFilesContributing; + issue_template: ReposRetrieveCommunityProfileMetricsResponseFilesIssueTemplate; + license: ReposRetrieveCommunityProfileMetricsResponseFilesLicense; + pull_request_template: ReposRetrieveCommunityProfileMetricsResponseFilesPullRequestTemplate; + readme: ReposRetrieveCommunityProfileMetricsResponseFilesReadme; + }; + type ReposRetrieveCommunityProfileMetricsResponse = { + description: string; + documentation: boolean; + files: ReposRetrieveCommunityProfileMetricsResponseFiles; + health_percentage: number; + updated_at: string; + }; + type ReposRequestPageBuildResponse = { status: string; url: string }; + type ReposReplaceTopicsResponse = { names: Array }; + type ReposReplaceProtectedBranchUserRestrictionsResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposReplaceProtectedBranchTeamRestrictionsResponseItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type ReposReplaceProtectedBranchAppRestrictionsResponseItemPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type ReposReplaceProtectedBranchAppRestrictionsResponseItemOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type ReposReplaceProtectedBranchAppRestrictionsResponseItem = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ReposReplaceProtectedBranchAppRestrictionsResponseItemOwner; + permissions: ReposReplaceProtectedBranchAppRestrictionsResponseItemPermissions; + slug: string; + updated_at: string; + }; + type ReposRemoveProtectedBranchUserRestrictionsResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposRemoveProtectedBranchTeamRestrictionsResponseItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type ReposRemoveProtectedBranchAppRestrictionsResponseItemPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type ReposRemoveProtectedBranchAppRestrictionsResponseItemOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type ReposRemoveProtectedBranchAppRestrictionsResponseItem = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ReposRemoveProtectedBranchAppRestrictionsResponseItemOwner; + permissions: ReposRemoveProtectedBranchAppRestrictionsResponseItemPermissions; + slug: string; + updated_at: string; + }; + type ReposMergeResponseParentsItem = { sha: string; url: string }; + type ReposMergeResponseCommitter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposMergeResponseCommitVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; + }; + type ReposMergeResponseCommitTree = { sha: string; url: string }; + type ReposMergeResponseCommitCommitter = { + date: string; + email: string; + name: string; + }; + type ReposMergeResponseCommitAuthor = { + date: string; + email: string; + name: string; + }; + type ReposMergeResponseCommit = { + author: ReposMergeResponseCommitAuthor; + comment_count: number; + committer: ReposMergeResponseCommitCommitter; + message: string; + tree: ReposMergeResponseCommitTree; + url: string; + verification: ReposMergeResponseCommitVerification; + }; + type ReposMergeResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposMergeResponse = { + author: ReposMergeResponseAuthor; + comments_url: string; + commit: ReposMergeResponseCommit; + committer: ReposMergeResponseCommitter; + html_url: string; + node_id: string; + parents: Array; + sha: string; + url: string; + }; + type ReposListUsersWithAccessToProtectedBranchResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListTopicsResponse = { names: Array }; + type ReposListTeamsWithAccessToProtectedBranchResponseItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type ReposListTeamsResponseItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type ReposListTagsResponseItemCommit = { sha: string; url: string }; + type ReposListTagsResponseItem = { + commit: ReposListTagsResponseItemCommit; + name: string; + tarball_url: string; + zipball_url: string; + }; + type ReposListStatusesForRefResponseItemCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListStatusesForRefResponseItem = { + avatar_url: string; + context: string; + created_at: string; + creator: ReposListStatusesForRefResponseItemCreator; + description: string; + id: number; + node_id: string; + state: string; + target_url: string; + updated_at: string; + url: string; + }; + type ReposListReleasesResponseItemAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListReleasesResponseItemAssetsItemUploader = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListReleasesResponseItemAssetsItem = { + browser_download_url: string; + content_type: string; + created_at: string; + download_count: number; + id: number; + label: string; + name: string; + node_id: string; + size: number; + state: string; + updated_at: string; + uploader: ReposListReleasesResponseItemAssetsItemUploader; + url: string; + }; + type ReposListReleasesResponseItem = { + assets: Array; + assets_url: string; + author: ReposListReleasesResponseItemAuthor; + body: string; + created_at: string; + draft: boolean; + html_url: string; + id: number; + name: string; + node_id: string; + prerelease: boolean; + published_at: string; + tag_name: string; + tarball_url: string; + target_commitish: string; + upload_url: string; + url: string; + zipball_url: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemRequestedTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemRequestedReviewersItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: ReposListPullRequestsAssociatedWithCommitResponseItemMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemHeadUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepoPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepoOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepo = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepoOwner; + permissions: ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepoPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemHead = { + label: string; + ref: string; + repo: ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepo; + sha: string; + user: ReposListPullRequestsAssociatedWithCommitResponseItemHeadUser; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemBaseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepoPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepoOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepo = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepoOwner; + permissions: ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepoPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemBase = { + label: string; + ref: string; + repo: ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepo; + sha: string; + user: ReposListPullRequestsAssociatedWithCommitResponseItemBaseUser; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemLinksStatuses = { + href: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemLinksSelf = { + href: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemLinksReviewComments = { + href: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemLinksReviewComment = { + href: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemLinksIssue = { + href: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemLinksHtml = { + href: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemLinksCommits = { + href: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemLinksComments = { + href: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemLinks = { + comments: ReposListPullRequestsAssociatedWithCommitResponseItemLinksComments; + commits: ReposListPullRequestsAssociatedWithCommitResponseItemLinksCommits; + html: ReposListPullRequestsAssociatedWithCommitResponseItemLinksHtml; + issue: ReposListPullRequestsAssociatedWithCommitResponseItemLinksIssue; + review_comment: ReposListPullRequestsAssociatedWithCommitResponseItemLinksReviewComment; + review_comments: ReposListPullRequestsAssociatedWithCommitResponseItemLinksReviewComments; + self: ReposListPullRequestsAssociatedWithCommitResponseItemLinksSelf; + statuses: ReposListPullRequestsAssociatedWithCommitResponseItemLinksStatuses; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItem = { + _links: ReposListPullRequestsAssociatedWithCommitResponseItemLinks; + active_lock_reason: string; + assignee: ReposListPullRequestsAssociatedWithCommitResponseItemAssignee; + assignees: Array< + ReposListPullRequestsAssociatedWithCommitResponseItemAssigneesItem + >; + author_association: string; + base: ReposListPullRequestsAssociatedWithCommitResponseItemBase; + body: string; + closed_at: string; + comments_url: string; + commits_url: string; + created_at: string; + diff_url: string; + draft: boolean; + head: ReposListPullRequestsAssociatedWithCommitResponseItemHead; + html_url: string; + id: number; + issue_url: string; + labels: Array< + ReposListPullRequestsAssociatedWithCommitResponseItemLabelsItem + >; + locked: boolean; + merge_commit_sha: string; + merged_at: string; + milestone: ReposListPullRequestsAssociatedWithCommitResponseItemMilestone; + node_id: string; + number: number; + patch_url: string; + requested_reviewers: Array< + ReposListPullRequestsAssociatedWithCommitResponseItemRequestedReviewersItem + >; + requested_teams: Array< + ReposListPullRequestsAssociatedWithCommitResponseItemRequestedTeamsItem + >; + review_comment_url: string; + review_comments_url: string; + state: string; + statuses_url: string; + title: string; + updated_at: string; + url: string; + user: ReposListPullRequestsAssociatedWithCommitResponseItemUser; + }; + type ReposListPublicResponseItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListPublicResponseItem = { + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + description: string; + downloads_url: string; + events_url: string; + fork: boolean; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + html_url: string; + id: number; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + name: string; + node_id: string; + notifications_url: string; + owner: ReposListPublicResponseItemOwner; + private: boolean; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + url: string; + }; + type ReposListProtectedBranchUserRestrictionsResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListProtectedBranchTeamRestrictionsResponseItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type ReposListPagesBuildsResponseItemPusher = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListPagesBuildsResponseItemError = { message: null }; + type ReposListPagesBuildsResponseItem = { + commit: string; + created_at: string; + duration: number; + error: ReposListPagesBuildsResponseItemError; + pusher: ReposListPagesBuildsResponseItemPusher; + status: string; + updated_at: string; + url: string; + }; + type ReposListLanguagesResponse = { C: number; Python: number }; + type ReposListInvitationsForAuthenticatedUserResponseItemRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListInvitationsForAuthenticatedUserResponseItemRepository = { + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + description: string; + downloads_url: string; + events_url: string; + fork: boolean; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + html_url: string; + id: number; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + name: string; + node_id: string; + notifications_url: string; + owner: ReposListInvitationsForAuthenticatedUserResponseItemRepositoryOwner; + private: boolean; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + url: string; + }; + type ReposListInvitationsForAuthenticatedUserResponseItemInviter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListInvitationsForAuthenticatedUserResponseItemInvitee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListInvitationsForAuthenticatedUserResponseItem = { + created_at: string; + html_url: string; + id: number; + invitee: ReposListInvitationsForAuthenticatedUserResponseItemInvitee; + inviter: ReposListInvitationsForAuthenticatedUserResponseItemInviter; + permissions: string; + repository: ReposListInvitationsForAuthenticatedUserResponseItemRepository; + url: string; + }; + type ReposListInvitationsResponseItemRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListInvitationsResponseItemRepository = { + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + description: string; + downloads_url: string; + events_url: string; + fork: boolean; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + html_url: string; + id: number; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + name: string; + node_id: string; + notifications_url: string; + owner: ReposListInvitationsResponseItemRepositoryOwner; + private: boolean; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + url: string; + }; + type ReposListInvitationsResponseItemInviter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListInvitationsResponseItemInvitee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListInvitationsResponseItem = { + created_at: string; + html_url: string; + id: number; + invitee: ReposListInvitationsResponseItemInvitee; + inviter: ReposListInvitationsResponseItemInviter; + permissions: string; + repository: ReposListInvitationsResponseItemRepository; + url: string; + }; + type ReposListHooksResponseItemLastResponse = { + code: null; + message: null; + status: string; + }; + type ReposListHooksResponseItemConfig = { + content_type: string; + insecure_ssl: string; + url: string; + }; + type ReposListHooksResponseItem = { + active: boolean; + config: ReposListHooksResponseItemConfig; + created_at: string; + events: Array; + id: number; + last_response: ReposListHooksResponseItemLastResponse; + name: string; + ping_url: string; + test_url: string; + type: string; + updated_at: string; + url: string; + }; + type ReposListForksResponseItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposListForksResponseItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListForksResponseItemLicense = { + key: string; + name: string; + node_id: string; + spdx_id: string; + url: string; + }; + type ReposListForksResponseItem = { + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + license: ReposListForksResponseItemLicense; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposListForksResponseItemOwner; + permissions: ReposListForksResponseItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type ReposListForOrgResponseItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposListForOrgResponseItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListForOrgResponseItemLicense = { + key: string; + name: string; + node_id: string; + spdx_id: string; + url: string; + }; + type ReposListForOrgResponseItem = { + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + license: ReposListForOrgResponseItemLicense; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposListForOrgResponseItemOwner; + permissions: ReposListForOrgResponseItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type ReposListDownloadsResponseItem = { + content_type: string; + description: string; + download_count: number; + html_url: string; + id: number; + name: string; + size: number; + url: string; + }; + type ReposListDeploymentsResponseItemPayload = { deploy: string }; + type ReposListDeploymentsResponseItemCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListDeploymentsResponseItem = { + created_at: string; + creator: ReposListDeploymentsResponseItemCreator; + description: string; + environment: string; + id: number; + node_id: string; + original_environment: string; + payload: ReposListDeploymentsResponseItemPayload; + production_environment: boolean; + ref: string; + repository_url: string; + sha: string; + statuses_url: string; + task: string; + transient_environment: boolean; + updated_at: string; + url: string; + }; + type ReposListDeploymentStatusesResponseItemCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListDeploymentStatusesResponseItem = { + created_at: string; + creator: ReposListDeploymentStatusesResponseItemCreator; + deployment_url: string; + description: string; + environment: string; + environment_url: string; + id: number; + log_url: string; + node_id: string; + repository_url: string; + state: string; + target_url: string; + updated_at: string; + url: string; + }; + type ReposListDeployKeysResponseItem = { + created_at: string; + id: number; + key: string; + read_only: boolean; + title: string; + url: string; + verified: boolean; + }; + type ReposListContributorsResponseItem = { + avatar_url: string; + contributions: number; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListCommitsResponseItemParentsItem = { sha: string; url: string }; + type ReposListCommitsResponseItemCommitter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListCommitsResponseItemCommitVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; + }; + type ReposListCommitsResponseItemCommitTree = { sha: string; url: string }; + type ReposListCommitsResponseItemCommitCommitter = { + date: string; + email: string; + name: string; + }; + type ReposListCommitsResponseItemCommitAuthor = { + date: string; + email: string; + name: string; + }; + type ReposListCommitsResponseItemCommit = { + author: ReposListCommitsResponseItemCommitAuthor; + comment_count: number; + committer: ReposListCommitsResponseItemCommitCommitter; + message: string; + tree: ReposListCommitsResponseItemCommitTree; + url: string; + verification: ReposListCommitsResponseItemCommitVerification; + }; + type ReposListCommitsResponseItemAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListCommitsResponseItem = { + author: ReposListCommitsResponseItemAuthor; + comments_url: string; + commit: ReposListCommitsResponseItemCommit; + committer: ReposListCommitsResponseItemCommitter; + html_url: string; + node_id: string; + parents: Array; + sha: string; + url: string; + }; + type ReposListCommitCommentsResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListCommitCommentsResponseItem = { + body: string; + commit_id: string; + created_at: string; + html_url: string; + id: number; + line: number; + node_id: string; + path: string; + position: number; + updated_at: string; + url: string; + user: ReposListCommitCommentsResponseItemUser; + }; + type ReposListCommentsForCommitResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListCommentsForCommitResponseItem = { + body: string; + commit_id: string; + created_at: string; + html_url: string; + id: number; + line: number; + node_id: string; + path: string; + position: number; + updated_at: string; + url: string; + user: ReposListCommentsForCommitResponseItemUser; + }; + type ReposListCollaboratorsResponseItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposListCollaboratorsResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + permissions: ReposListCollaboratorsResponseItemPermissions; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListBranchesForHeadCommitResponseItemCommit = { + sha: string; + url: string; + }; + type ReposListBranchesForHeadCommitResponseItem = { + commit: ReposListBranchesForHeadCommitResponseItemCommit; + name: string; + protected: string; + }; + type ReposListBranchesResponseItemProtectionRequiredStatusChecks = { + contexts: Array; + enforcement_level: string; + }; + type ReposListBranchesResponseItemProtection = { + enabled: boolean; + required_status_checks: ReposListBranchesResponseItemProtectionRequiredStatusChecks; + }; + type ReposListBranchesResponseItemCommit = { sha: string; url: string }; + type ReposListBranchesResponseItem = { + commit: ReposListBranchesResponseItemCommit; + name: string; + protected: boolean; + protection: ReposListBranchesResponseItemProtection; + protection_url: string; + }; + type ReposListAssetsForReleaseResponseItemUploader = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposListAssetsForReleaseResponseItem = { + browser_download_url: string; + content_type: string; + created_at: string; + download_count: number; + id: number; + label: string; + name: string; + node_id: string; + size: number; + state: string; + updated_at: string; + uploader: ReposListAssetsForReleaseResponseItemUploader; + url: string; + }; + type ReposListAppsWithAccessToProtectedBranchResponseItemPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type ReposListAppsWithAccessToProtectedBranchResponseItemOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type ReposListAppsWithAccessToProtectedBranchResponseItem = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ReposListAppsWithAccessToProtectedBranchResponseItemOwner; + permissions: ReposListAppsWithAccessToProtectedBranchResponseItemPermissions; + slug: string; + updated_at: string; + }; + type ReposGetViewsResponseViewsItem = { + count: number; + timestamp: string; + uniques: number; + }; + type ReposGetViewsResponse = { + count: number; + uniques: number; + views: Array; + }; + type ReposGetUsersWithAccessToProtectedBranchResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetTopReferrersResponseItem = { + count: number; + referrer: string; + uniques: number; + }; + type ReposGetTopPathsResponseItem = { + count: number; + path: string; + title: string; + uniques: number; + }; + type ReposGetTeamsWithAccessToProtectedBranchResponseItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type ReposGetReleaseByTagResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetReleaseByTagResponseAssetsItemUploader = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetReleaseByTagResponseAssetsItem = { + browser_download_url: string; + content_type: string; + created_at: string; + download_count: number; + id: number; + label: string; + name: string; + node_id: string; + size: number; + state: string; + updated_at: string; + uploader: ReposGetReleaseByTagResponseAssetsItemUploader; + url: string; + }; + type ReposGetReleaseByTagResponse = { + assets: Array; + assets_url: string; + author: ReposGetReleaseByTagResponseAuthor; + body: string; + created_at: string; + draft: boolean; + html_url: string; + id: number; + name: string; + node_id: string; + prerelease: boolean; + published_at: string; + tag_name: string; + tarball_url: string; + target_commitish: string; + upload_url: string; + url: string; + zipball_url: string; + }; + type ReposGetReleaseAssetResponseUploader = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetReleaseAssetResponse = { + browser_download_url: string; + content_type: string; + created_at: string; + download_count: number; + id: number; + label: string; + name: string; + node_id: string; + size: number; + state: string; + updated_at: string; + uploader: ReposGetReleaseAssetResponseUploader; + url: string; + }; + type ReposGetReleaseResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetReleaseResponseAssetsItemUploader = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetReleaseResponseAssetsItem = { + browser_download_url: string; + content_type: string; + created_at: string; + download_count: number; + id: number; + label: string; + name: string; + node_id: string; + size: number; + state: string; + updated_at: string; + uploader: ReposGetReleaseResponseAssetsItemUploader; + url: string; + }; + type ReposGetReleaseResponse = { + assets: Array; + assets_url: string; + author: ReposGetReleaseResponseAuthor; + body: string; + created_at: string; + draft: boolean; + html_url: string; + id: number; + name: string; + node_id: string; + prerelease: boolean; + published_at: string; + tag_name: string; + tarball_url: string; + target_commitish: string; + upload_url: string; + url: string; + zipball_url: string; + }; + type ReposGetReadmeResponseLinks = { + git: string; + html: string; + self: string; + }; + type ReposGetReadmeResponse = { + _links: ReposGetReadmeResponseLinks; + content: string; + download_url: string; + encoding: string; + git_url: string; + html_url: string; + name: string; + path: string; + sha: string; + size: number; + type: string; + url: string; + }; + type ReposGetProtectedBranchRestrictionsResponseUsersItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetProtectedBranchRestrictionsResponseTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type ReposGetProtectedBranchRestrictionsResponseAppsItemPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type ReposGetProtectedBranchRestrictionsResponseAppsItemOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type ReposGetProtectedBranchRestrictionsResponseAppsItem = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ReposGetProtectedBranchRestrictionsResponseAppsItemOwner; + permissions: ReposGetProtectedBranchRestrictionsResponseAppsItemPermissions; + slug: string; + updated_at: string; + }; + type ReposGetProtectedBranchRestrictionsResponse = { + apps: Array; + apps_url: string; + teams: Array; + teams_url: string; + url: string; + users: Array; + users_url: string; + }; + type ReposGetProtectedBranchRequiredStatusChecksResponse = { + contexts: Array; + contexts_url: string; + strict: boolean; + url: string; + }; + type ReposGetProtectedBranchRequiredSignaturesResponse = { + enabled: boolean; + url: string; + }; + type ReposGetProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsUsersItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type ReposGetProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictions = { + teams: Array< + ReposGetProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsTeamsItem + >; + teams_url: string; + url: string; + users: Array< + ReposGetProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsUsersItem + >; + users_url: string; + }; + type ReposGetProtectedBranchPullRequestReviewEnforcementResponse = { + dismiss_stale_reviews: boolean; + dismissal_restrictions: ReposGetProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictions; + require_code_owner_reviews: boolean; + required_approving_review_count: number; + url: string; + }; + type ReposGetProtectedBranchAdminEnforcementResponse = { + enabled: boolean; + url: string; + }; + type ReposGetParticipationStatsResponse = { + all: Array; + owner: Array; + }; + type ReposGetPagesBuildResponsePusher = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetPagesBuildResponseError = { message: null }; + type ReposGetPagesBuildResponse = { + commit: string; + created_at: string; + duration: number; + error: ReposGetPagesBuildResponseError; + pusher: ReposGetPagesBuildResponsePusher; + status: string; + updated_at: string; + url: string; + }; + type ReposGetPagesResponseSource = { branch: string; directory: string }; + type ReposGetPagesResponse = { + cname: string; + custom_404: boolean; + html_url: string; + source: ReposGetPagesResponseSource; + status: string; + url: string; + }; + type ReposGetLatestReleaseResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetLatestReleaseResponseAssetsItemUploader = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetLatestReleaseResponseAssetsItem = { + browser_download_url: string; + content_type: string; + created_at: string; + download_count: number; + id: number; + label: string; + name: string; + node_id: string; + size: number; + state: string; + updated_at: string; + uploader: ReposGetLatestReleaseResponseAssetsItemUploader; + url: string; + }; + type ReposGetLatestReleaseResponse = { + assets: Array; + assets_url: string; + author: ReposGetLatestReleaseResponseAuthor; + body: string; + created_at: string; + draft: boolean; + html_url: string; + id: number; + name: string; + node_id: string; + prerelease: boolean; + published_at: string; + tag_name: string; + tarball_url: string; + target_commitish: string; + upload_url: string; + url: string; + zipball_url: string; + }; + type ReposGetLatestPagesBuildResponsePusher = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetLatestPagesBuildResponseError = { message: null }; + type ReposGetLatestPagesBuildResponse = { + commit: string; + created_at: string; + duration: number; + error: ReposGetLatestPagesBuildResponseError; + pusher: ReposGetLatestPagesBuildResponsePusher; + status: string; + updated_at: string; + url: string; + }; + type ReposGetHookResponseLastResponse = { + code: null; + message: null; + status: string; + }; + type ReposGetHookResponseConfig = { + content_type: string; + insecure_ssl: string; + url: string; + }; + type ReposGetHookResponse = { + active: boolean; + config: ReposGetHookResponseConfig; + created_at: string; + events: Array; + id: number; + last_response: ReposGetHookResponseLastResponse; + name: string; + ping_url: string; + test_url: string; + type: string; + updated_at: string; + url: string; + }; + type ReposGetDownloadResponse = { + content_type: string; + description: string; + download_count: number; + html_url: string; + id: number; + name: string; + size: number; + url: string; + }; + type ReposGetDeploymentStatusResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetDeploymentStatusResponse = { + created_at: string; + creator: ReposGetDeploymentStatusResponseCreator; + deployment_url: string; + description: string; + environment: string; + environment_url: string; + id: number; + log_url: string; + node_id: string; + repository_url: string; + state: string; + target_url: string; + updated_at: string; + url: string; + }; + type ReposGetDeploymentResponsePayload = { deploy: string }; + type ReposGetDeploymentResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetDeploymentResponse = { + created_at: string; + creator: ReposGetDeploymentResponseCreator; + description: string; + environment: string; + id: number; + node_id: string; + original_environment: string; + payload: ReposGetDeploymentResponsePayload; + production_environment: boolean; + ref: string; + repository_url: string; + sha: string; + statuses_url: string; + task: string; + transient_environment: boolean; + updated_at: string; + url: string; + }; + type ReposGetDeployKeyResponse = { + created_at: string; + id: number; + key: string; + read_only: boolean; + title: string; + url: string; + verified: boolean; + }; + type ReposGetContributorsStatsResponseItemWeeksItem = { + a: number; + c: number; + d: number; + w: string; + }; + type ReposGetContributorsStatsResponseItemAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetContributorsStatsResponseItem = { + author: ReposGetContributorsStatsResponseItemAuthor; + total: number; + weeks: Array; + }; + type ReposGetContentsResponseItemLinks = { + git: string; + html: string; + self: string; + }; + type ReposGetContentsResponseItem = { + _links: ReposGetContentsResponseItemLinks; + download_url: string | null; + git_url: string; + html_url: string; + name: string; + path: string; + sha: string; + size: number; + type: string; + url: string; + }; + type ReposGetContentsResponseLinks = { + git: string; + html: string; + self: string; + }; + type ReposGetContentsResponse = + | { + _links: ReposGetContentsResponseLinks; + content?: string; + download_url: string | null; + encoding?: string; + git_url: string; + html_url: string; + name: string; + path: string; + sha: string; + size: number; + type: string; + url: string; + target?: string; + submodule_git_url?: string; + } + | Array; + type ReposGetCommitCommentResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetCommitCommentResponse = { + body: string; + commit_id: string; + created_at: string; + html_url: string; + id: number; + line: number; + node_id: string; + path: string; + position: number; + updated_at: string; + url: string; + user: ReposGetCommitCommentResponseUser; + }; + type ReposGetCommitActivityStatsResponseItem = { + days: Array; + total: number; + week: number; + }; + type ReposGetCommitResponseStats = { + additions: number; + deletions: number; + total: number; + }; + type ReposGetCommitResponseParentsItem = { sha: string; url: string }; + type ReposGetCommitResponseFilesItem = { + additions: number; + blob_url: string; + changes: number; + deletions: number; + filename: string; + patch: string; + raw_url: string; + status: string; + }; + type ReposGetCommitResponseCommitter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetCommitResponseCommitVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; + }; + type ReposGetCommitResponseCommitTree = { sha: string; url: string }; + type ReposGetCommitResponseCommitCommitter = { + date: string; + email: string; + name: string; + }; + type ReposGetCommitResponseCommitAuthor = { + date: string; + email: string; + name: string; + }; + type ReposGetCommitResponseCommit = { + author: ReposGetCommitResponseCommitAuthor; + comment_count: number; + committer: ReposGetCommitResponseCommitCommitter; + message: string; + tree: ReposGetCommitResponseCommitTree; + url: string; + verification: ReposGetCommitResponseCommitVerification; + }; + type ReposGetCommitResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetCommitResponse = { + author: ReposGetCommitResponseAuthor; + comments_url: string; + commit: ReposGetCommitResponseCommit; + committer: ReposGetCommitResponseCommitter; + files: Array; + html_url: string; + node_id: string; + parents: Array; + sha: string; + stats: ReposGetCommitResponseStats; + url: string; + }; + type ReposGetCombinedStatusForRefResponseStatusesItem = { + avatar_url: string; + context: string; + created_at: string; + description: string; + id: number; + node_id: string; + state: string; + target_url: string; + updated_at: string; + url: string; + }; + type ReposGetCombinedStatusForRefResponseRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetCombinedStatusForRefResponseRepository = { + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + description: string; + downloads_url: string; + events_url: string; + fork: boolean; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + html_url: string; + id: number; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + name: string; + node_id: string; + notifications_url: string; + owner: ReposGetCombinedStatusForRefResponseRepositoryOwner; + private: boolean; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + url: string; + }; + type ReposGetCombinedStatusForRefResponse = { + commit_url: string; + repository: ReposGetCombinedStatusForRefResponseRepository; + sha: string; + state: string; + statuses: Array; + total_count: number; + url: string; + }; + type ReposGetCollaboratorPermissionLevelResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetCollaboratorPermissionLevelResponse = { + permission: string; + user: ReposGetCollaboratorPermissionLevelResponseUser; + }; + type ReposGetClonesResponseClonesItem = { + count: number; + timestamp: string; + uniques: number; + }; + type ReposGetClonesResponse = { + clones: Array; + count: number; + uniques: number; + }; + type ReposGetBranchProtectionResponseRestrictionsUsersItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetBranchProtectionResponseRestrictionsTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type ReposGetBranchProtectionResponseRestrictionsAppsItemPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type ReposGetBranchProtectionResponseRestrictionsAppsItemOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type ReposGetBranchProtectionResponseRestrictionsAppsItem = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ReposGetBranchProtectionResponseRestrictionsAppsItemOwner; + permissions: ReposGetBranchProtectionResponseRestrictionsAppsItemPermissions; + slug: string; + updated_at: string; + }; + type ReposGetBranchProtectionResponseRestrictions = { + apps: Array; + apps_url: string; + teams: Array; + teams_url: string; + url: string; + users: Array; + users_url: string; + }; + type ReposGetBranchProtectionResponseRequiredStatusChecks = { + contexts: Array; + contexts_url: string; + strict: boolean; + url: string; + }; + type ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsUsersItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictions = { + teams: Array< + ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsTeamsItem + >; + teams_url: string; + url: string; + users: Array< + ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsUsersItem + >; + users_url: string; + }; + type ReposGetBranchProtectionResponseRequiredPullRequestReviews = { + dismiss_stale_reviews: boolean; + dismissal_restrictions: ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictions; + require_code_owner_reviews: boolean; + required_approving_review_count: number; + url: string; + }; + type ReposGetBranchProtectionResponseEnforceAdmins = { + enabled: boolean; + url: string; + }; + type ReposGetBranchProtectionResponse = { + enforce_admins: ReposGetBranchProtectionResponseEnforceAdmins; + required_pull_request_reviews: ReposGetBranchProtectionResponseRequiredPullRequestReviews; + required_status_checks: ReposGetBranchProtectionResponseRequiredStatusChecks; + restrictions: ReposGetBranchProtectionResponseRestrictions; + url: string; + }; + type ReposGetBranchResponseProtectionRequiredStatusChecks = { + contexts: Array; + enforcement_level: string; + }; + type ReposGetBranchResponseProtection = { + enabled: boolean; + required_status_checks: ReposGetBranchResponseProtectionRequiredStatusChecks; + }; + type ReposGetBranchResponseCommitParentsItem = { sha: string; url: string }; + type ReposGetBranchResponseCommitCommitter = { + avatar_url: string; + gravatar_id: string; + id: number; + login: string; + url: string; + }; + type ReposGetBranchResponseCommitCommitVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; + }; + type ReposGetBranchResponseCommitCommitTree = { sha: string; url: string }; + type ReposGetBranchResponseCommitCommitCommitter = { + date: string; + email: string; + name: string; + }; + type ReposGetBranchResponseCommitCommitAuthor = { + date: string; + email: string; + name: string; + }; + type ReposGetBranchResponseCommitCommit = { + author: ReposGetBranchResponseCommitCommitAuthor; + committer: ReposGetBranchResponseCommitCommitCommitter; + message: string; + tree: ReposGetBranchResponseCommitCommitTree; + url: string; + verification: ReposGetBranchResponseCommitCommitVerification; + }; + type ReposGetBranchResponseCommitAuthor = { + avatar_url: string; + gravatar_id: string; + id: number; + login: string; + url: string; + }; + type ReposGetBranchResponseCommit = { + author: ReposGetBranchResponseCommitAuthor; + commit: ReposGetBranchResponseCommitCommit; + committer: ReposGetBranchResponseCommitCommitter; + node_id: string; + parents: Array; + sha: string; + url: string; + }; + type ReposGetBranchResponseLinks = { html: string; self: string }; + type ReposGetBranchResponse = { + _links: ReposGetBranchResponseLinks; + commit: ReposGetBranchResponseCommit; + name: string; + protected: boolean; + protection: ReposGetBranchResponseProtection; + protection_url: string; + }; + type ReposGetAppsWithAccessToProtectedBranchResponseItemPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type ReposGetAppsWithAccessToProtectedBranchResponseItemOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type ReposGetAppsWithAccessToProtectedBranchResponseItem = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ReposGetAppsWithAccessToProtectedBranchResponseItemOwner; + permissions: ReposGetAppsWithAccessToProtectedBranchResponseItemPermissions; + slug: string; + updated_at: string; + }; + type ReposGetResponseSourcePermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposGetResponseSourceOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetResponseSource = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposGetResponseSourceOwner; + permissions: ReposGetResponseSourcePermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type ReposGetResponsePermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposGetResponseParentPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposGetResponseParentOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetResponseParent = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposGetResponseParentOwner; + permissions: ReposGetResponseParentPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type ReposGetResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetResponseOrganization = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposGetResponseLicense = { + key: string; + name: string; + node_id: string; + spdx_id: string; + url: string; + }; + type ReposGetResponse = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + license: ReposGetResponseLicense; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + organization: ReposGetResponseOrganization; + owner: ReposGetResponseOwner; + parent: ReposGetResponseParent; + permissions: ReposGetResponsePermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + source: ReposGetResponseSource; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type ReposEnablePagesSiteResponseSource = { + branch: string; + directory: string; + }; + type ReposEnablePagesSiteResponse = { + cname: string; + custom_404: boolean; + html_url: string; + source: ReposEnablePagesSiteResponseSource; + status: string; + url: string; + }; + type ReposDeleteFileResponseCommitVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; + }; + type ReposDeleteFileResponseCommitTree = { sha: string; url: string }; + type ReposDeleteFileResponseCommitParentsItem = { + html_url: string; + sha: string; + url: string; + }; + type ReposDeleteFileResponseCommitCommitter = { + date: string; + email: string; + name: string; + }; + type ReposDeleteFileResponseCommitAuthor = { + date: string; + email: string; + name: string; + }; + type ReposDeleteFileResponseCommit = { + author: ReposDeleteFileResponseCommitAuthor; + committer: ReposDeleteFileResponseCommitCommitter; + html_url: string; + message: string; + node_id: string; + parents: Array; + sha: string; + tree: ReposDeleteFileResponseCommitTree; + url: string; + verification: ReposDeleteFileResponseCommitVerification; + }; + type ReposDeleteFileResponse = { + commit: ReposDeleteFileResponseCommit; + content: null; + }; + type ReposDeleteResponse = { documentation_url: string; message: string }; + type ReposCreateUsingTemplateResponseTemplateRepositoryPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposCreateUsingTemplateResponseTemplateRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposCreateUsingTemplateResponseTemplateRepository = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposCreateUsingTemplateResponseTemplateRepositoryOwner; + permissions: ReposCreateUsingTemplateResponseTemplateRepositoryPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type ReposCreateUsingTemplateResponsePermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposCreateUsingTemplateResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposCreateUsingTemplateResponse = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposCreateUsingTemplateResponseOwner; + permissions: ReposCreateUsingTemplateResponsePermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: ReposCreateUsingTemplateResponseTemplateRepository; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type ReposCreateStatusResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposCreateStatusResponse = { + avatar_url: string; + context: string; + created_at: string; + creator: ReposCreateStatusResponseCreator; + description: string; + id: number; + node_id: string; + state: string; + target_url: string; + updated_at: string; + url: string; + }; + type ReposCreateReleaseResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposCreateReleaseResponse = { + assets: Array; + assets_url: string; + author: ReposCreateReleaseResponseAuthor; + body: string; + created_at: string; + draft: boolean; + html_url: string; + id: number; + name: string; + node_id: string; + prerelease: boolean; + published_at: string; + tag_name: string; + tarball_url: string; + target_commitish: string; + upload_url: string; + url: string; + zipball_url: string; + }; + type ReposCreateOrUpdateFileResponseContentLinks = { + git: string; + html: string; + self: string; + }; + type ReposCreateOrUpdateFileResponseContent = { + _links: ReposCreateOrUpdateFileResponseContentLinks; + download_url: string; + git_url: string; + html_url: string; + name: string; + path: string; + sha: string; + size: number; + type: string; + url: string; + }; + type ReposCreateOrUpdateFileResponseCommitVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; + }; + type ReposCreateOrUpdateFileResponseCommitTree = { sha: string; url: string }; + type ReposCreateOrUpdateFileResponseCommitParentsItem = { + html_url: string; + sha: string; + url: string; + }; + type ReposCreateOrUpdateFileResponseCommitCommitter = { + date: string; + email: string; + name: string; + }; + type ReposCreateOrUpdateFileResponseCommitAuthor = { + date: string; + email: string; + name: string; + }; + type ReposCreateOrUpdateFileResponseCommit = { + author: ReposCreateOrUpdateFileResponseCommitAuthor; + committer: ReposCreateOrUpdateFileResponseCommitCommitter; + html_url: string; + message: string; + node_id: string; + parents: Array; + sha: string; + tree: ReposCreateOrUpdateFileResponseCommitTree; + url: string; + verification: ReposCreateOrUpdateFileResponseCommitVerification; + }; + type ReposCreateOrUpdateFileResponse = { + commit: ReposCreateOrUpdateFileResponseCommit; + content: ReposCreateOrUpdateFileResponseContent; + }; + type ReposCreateInOrgResponsePermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposCreateInOrgResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposCreateInOrgResponse = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposCreateInOrgResponseOwner; + permissions: ReposCreateInOrgResponsePermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type ReposCreateHookResponseLastResponse = { + code: null; + message: null; + status: string; + }; + type ReposCreateHookResponseConfig = { + content_type: string; + insecure_ssl: string; + url: string; + }; + type ReposCreateHookResponse = { + active: boolean; + config: ReposCreateHookResponseConfig; + created_at: string; + events: Array; + id: number; + last_response: ReposCreateHookResponseLastResponse; + name: string; + ping_url: string; + test_url: string; + type: string; + updated_at: string; + url: string; + }; + type ReposCreateForkResponsePermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposCreateForkResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposCreateForkResponse = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposCreateForkResponseOwner; + permissions: ReposCreateForkResponsePermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type ReposCreateForAuthenticatedUserResponsePermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ReposCreateForAuthenticatedUserResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposCreateForAuthenticatedUserResponse = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposCreateForAuthenticatedUserResponseOwner; + permissions: ReposCreateForAuthenticatedUserResponsePermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type ReposCreateFileResponseContentLinks = { + git: string; + html: string; + self: string; + }; + type ReposCreateFileResponseContent = { + _links: ReposCreateFileResponseContentLinks; + download_url: string; + git_url: string; + html_url: string; + name: string; + path: string; + sha: string; + size: number; + type: string; + url: string; + }; + type ReposCreateFileResponseCommitVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; + }; + type ReposCreateFileResponseCommitTree = { sha: string; url: string }; + type ReposCreateFileResponseCommitParentsItem = { + html_url: string; + sha: string; + url: string; + }; + type ReposCreateFileResponseCommitCommitter = { + date: string; + email: string; + name: string; + }; + type ReposCreateFileResponseCommitAuthor = { + date: string; + email: string; + name: string; + }; + type ReposCreateFileResponseCommit = { + author: ReposCreateFileResponseCommitAuthor; + committer: ReposCreateFileResponseCommitCommitter; + html_url: string; + message: string; + node_id: string; + parents: Array; + sha: string; + tree: ReposCreateFileResponseCommitTree; + url: string; + verification: ReposCreateFileResponseCommitVerification; + }; + type ReposCreateFileResponse = { + commit: ReposCreateFileResponseCommit; + content: ReposCreateFileResponseContent; + }; + type ReposCreateDeploymentStatusResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposCreateDeploymentStatusResponse = { + created_at: string; + creator: ReposCreateDeploymentStatusResponseCreator; + deployment_url: string; + description: string; + environment: string; + environment_url: string; + id: number; + log_url: string; + node_id: string; + repository_url: string; + state: string; + target_url: string; + updated_at: string; + url: string; + }; + type ReposCreateDeploymentResponsePayload = { deploy: string }; + type ReposCreateDeploymentResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposCreateDeploymentResponse = { + created_at: string; + creator: ReposCreateDeploymentResponseCreator; + description: string; + environment: string; + id: number; + node_id: string; + original_environment: string; + payload: ReposCreateDeploymentResponsePayload; + production_environment: boolean; + ref: string; + repository_url: string; + sha: string; + statuses_url: string; + task: string; + transient_environment: boolean; + updated_at: string; + url: string; + }; + type ReposCreateCommitCommentResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposCreateCommitCommentResponse = { + body: string; + commit_id: string; + created_at: string; + html_url: string; + id: number; + line: number; + node_id: string; + path: string; + position: number; + updated_at: string; + url: string; + user: ReposCreateCommitCommentResponseUser; + }; + type ReposCompareCommitsResponseMergeBaseCommitParentsItem = { + sha: string; + url: string; + }; + type ReposCompareCommitsResponseMergeBaseCommitCommitter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposCompareCommitsResponseMergeBaseCommitCommitVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; + }; + type ReposCompareCommitsResponseMergeBaseCommitCommitTree = { + sha: string; + url: string; + }; + type ReposCompareCommitsResponseMergeBaseCommitCommitCommitter = { + date: string; + email: string; + name: string; + }; + type ReposCompareCommitsResponseMergeBaseCommitCommitAuthor = { + date: string; + email: string; + name: string; + }; + type ReposCompareCommitsResponseMergeBaseCommitCommit = { + author: ReposCompareCommitsResponseMergeBaseCommitCommitAuthor; + comment_count: number; + committer: ReposCompareCommitsResponseMergeBaseCommitCommitCommitter; + message: string; + tree: ReposCompareCommitsResponseMergeBaseCommitCommitTree; + url: string; + verification: ReposCompareCommitsResponseMergeBaseCommitCommitVerification; + }; + type ReposCompareCommitsResponseMergeBaseCommitAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposCompareCommitsResponseMergeBaseCommit = { + author: ReposCompareCommitsResponseMergeBaseCommitAuthor; + comments_url: string; + commit: ReposCompareCommitsResponseMergeBaseCommitCommit; + committer: ReposCompareCommitsResponseMergeBaseCommitCommitter; + html_url: string; + node_id: string; + parents: Array; + sha: string; + url: string; + }; + type ReposCompareCommitsResponseFilesItem = { + additions: number; + blob_url: string; + changes: number; + contents_url: string; + deletions: number; + filename: string; + patch: string; + raw_url: string; + sha: string; + status: string; + }; + type ReposCompareCommitsResponseCommitsItemParentsItem = { + sha: string; + url: string; + }; + type ReposCompareCommitsResponseCommitsItemCommitter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposCompareCommitsResponseCommitsItemCommitVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; + }; + type ReposCompareCommitsResponseCommitsItemCommitTree = { + sha: string; + url: string; + }; + type ReposCompareCommitsResponseCommitsItemCommitCommitter = { + date: string; + email: string; + name: string; + }; + type ReposCompareCommitsResponseCommitsItemCommitAuthor = { + date: string; + email: string; + name: string; + }; + type ReposCompareCommitsResponseCommitsItemCommit = { + author: ReposCompareCommitsResponseCommitsItemCommitAuthor; + comment_count: number; + committer: ReposCompareCommitsResponseCommitsItemCommitCommitter; + message: string; + tree: ReposCompareCommitsResponseCommitsItemCommitTree; + url: string; + verification: ReposCompareCommitsResponseCommitsItemCommitVerification; + }; + type ReposCompareCommitsResponseCommitsItemAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposCompareCommitsResponseCommitsItem = { + author: ReposCompareCommitsResponseCommitsItemAuthor; + comments_url: string; + commit: ReposCompareCommitsResponseCommitsItemCommit; + committer: ReposCompareCommitsResponseCommitsItemCommitter; + html_url: string; + node_id: string; + parents: Array; + sha: string; + url: string; + }; + type ReposCompareCommitsResponseBaseCommitParentsItem = { + sha: string; + url: string; + }; + type ReposCompareCommitsResponseBaseCommitCommitter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposCompareCommitsResponseBaseCommitCommitVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; + }; + type ReposCompareCommitsResponseBaseCommitCommitTree = { + sha: string; + url: string; + }; + type ReposCompareCommitsResponseBaseCommitCommitCommitter = { + date: string; + email: string; + name: string; + }; + type ReposCompareCommitsResponseBaseCommitCommitAuthor = { + date: string; + email: string; + name: string; + }; + type ReposCompareCommitsResponseBaseCommitCommit = { + author: ReposCompareCommitsResponseBaseCommitCommitAuthor; + comment_count: number; + committer: ReposCompareCommitsResponseBaseCommitCommitCommitter; + message: string; + tree: ReposCompareCommitsResponseBaseCommitCommitTree; + url: string; + verification: ReposCompareCommitsResponseBaseCommitCommitVerification; + }; + type ReposCompareCommitsResponseBaseCommitAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposCompareCommitsResponseBaseCommit = { + author: ReposCompareCommitsResponseBaseCommitAuthor; + comments_url: string; + commit: ReposCompareCommitsResponseBaseCommitCommit; + committer: ReposCompareCommitsResponseBaseCommitCommitter; + html_url: string; + node_id: string; + parents: Array; + sha: string; + url: string; + }; + type ReposCompareCommitsResponse = { + ahead_by: number; + base_commit: ReposCompareCommitsResponseBaseCommit; + behind_by: number; + commits: Array; + diff_url: string; + files: Array; + html_url: string; + merge_base_commit: ReposCompareCommitsResponseMergeBaseCommit; + patch_url: string; + permalink_url: string; + status: string; + total_commits: number; + url: string; + }; + type ReposAddProtectedBranchUserRestrictionsResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposAddProtectedBranchTeamRestrictionsResponseItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type ReposAddProtectedBranchRequiredSignaturesResponse = { + enabled: boolean; + url: string; + }; + type ReposAddProtectedBranchAppRestrictionsResponseItemPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type ReposAddProtectedBranchAppRestrictionsResponseItemOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type ReposAddProtectedBranchAppRestrictionsResponseItem = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ReposAddProtectedBranchAppRestrictionsResponseItemOwner; + permissions: ReposAddProtectedBranchAppRestrictionsResponseItemPermissions; + slug: string; + updated_at: string; + }; + type ReposAddProtectedBranchAdminEnforcementResponse = { + enabled: boolean; + url: string; + }; + type ReposAddDeployKeyResponse = { + created_at: string; + id: number; + key: string; + read_only: boolean; + title: string; + url: string; + verified: boolean; + }; + type ReposAddCollaboratorResponseRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposAddCollaboratorResponseRepository = { + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + description: string; + downloads_url: string; + events_url: string; + fork: boolean; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + html_url: string; + id: number; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + name: string; + node_id: string; + notifications_url: string; + owner: ReposAddCollaboratorResponseRepositoryOwner; + private: boolean; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + url: string; + }; + type ReposAddCollaboratorResponseInviter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposAddCollaboratorResponseInvitee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReposAddCollaboratorResponse = { + created_at: string; + html_url: string; + id: number; + invitee: ReposAddCollaboratorResponseInvitee; + inviter: ReposAddCollaboratorResponseInviter; + permissions: string; + repository: ReposAddCollaboratorResponseRepository; + url: string; + }; + type ReactionsListForTeamDiscussionCommentResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReactionsListForTeamDiscussionCommentResponseItem = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsListForTeamDiscussionCommentResponseItemUser; + }; + type ReactionsListForTeamDiscussionResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReactionsListForTeamDiscussionResponseItem = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsListForTeamDiscussionResponseItemUser; + }; + type ReactionsListForPullRequestReviewCommentResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReactionsListForPullRequestReviewCommentResponseItem = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsListForPullRequestReviewCommentResponseItemUser; + }; + type ReactionsListForIssueCommentResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReactionsListForIssueCommentResponseItem = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsListForIssueCommentResponseItemUser; + }; + type ReactionsListForIssueResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReactionsListForIssueResponseItem = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsListForIssueResponseItemUser; + }; + type ReactionsListForCommitCommentResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReactionsListForCommitCommentResponseItem = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsListForCommitCommentResponseItemUser; + }; + type ReactionsCreateForTeamDiscussionCommentResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReactionsCreateForTeamDiscussionCommentResponse = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsCreateForTeamDiscussionCommentResponseUser; + }; + type ReactionsCreateForTeamDiscussionResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReactionsCreateForTeamDiscussionResponse = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsCreateForTeamDiscussionResponseUser; + }; + type ReactionsCreateForPullRequestReviewCommentResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReactionsCreateForPullRequestReviewCommentResponse = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsCreateForPullRequestReviewCommentResponseUser; + }; + type ReactionsCreateForIssueCommentResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReactionsCreateForIssueCommentResponse = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsCreateForIssueCommentResponseUser; + }; + type ReactionsCreateForIssueResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReactionsCreateForIssueResponse = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsCreateForIssueResponseUser; + }; + type ReactionsCreateForCommitCommentResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ReactionsCreateForCommitCommentResponse = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsCreateForCommitCommentResponseUser; + }; + type RateLimitGetResponseResourcesSearch = { + limit: number; + remaining: number; + reset: number; + }; + type RateLimitGetResponseResourcesIntegrationManifest = { + limit: number; + remaining: number; + reset: number; + }; + type RateLimitGetResponseResourcesGraphql = { + limit: number; + remaining: number; + reset: number; + }; + type RateLimitGetResponseResourcesCore = { + limit: number; + remaining: number; + reset: number; + }; + type RateLimitGetResponseResources = { + core: RateLimitGetResponseResourcesCore; + graphql: RateLimitGetResponseResourcesGraphql; + integration_manifest: RateLimitGetResponseResourcesIntegrationManifest; + search: RateLimitGetResponseResourcesSearch; + }; + type RateLimitGetResponseRate = { + limit: number; + remaining: number; + reset: number; + }; + type RateLimitGetResponse = { + rate: RateLimitGetResponseRate; + resources: RateLimitGetResponseResources; + }; + type PullsUpdateReviewResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsUpdateReviewResponseLinksPullRequest = { href: string }; + type PullsUpdateReviewResponseLinksHtml = { href: string }; + type PullsUpdateReviewResponseLinks = { + html: PullsUpdateReviewResponseLinksHtml; + pull_request: PullsUpdateReviewResponseLinksPullRequest; + }; + type PullsUpdateReviewResponse = { + _links: PullsUpdateReviewResponseLinks; + body: string; + commit_id: string; + html_url: string; + id: number; + node_id: string; + pull_request_url: string; + state: string; + user: PullsUpdateReviewResponseUser; + }; + type PullsUpdateCommentResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsUpdateCommentResponseLinksSelf = { href: string }; + type PullsUpdateCommentResponseLinksPullRequest = { href: string }; + type PullsUpdateCommentResponseLinksHtml = { href: string }; + type PullsUpdateCommentResponseLinks = { + html: PullsUpdateCommentResponseLinksHtml; + pull_request: PullsUpdateCommentResponseLinksPullRequest; + self: PullsUpdateCommentResponseLinksSelf; + }; + type PullsUpdateCommentResponse = { + _links: PullsUpdateCommentResponseLinks; + author_association: string; + body: string; + commit_id: string; + created_at: string; + diff_hunk: string; + html_url: string; + id: number; + in_reply_to_id: number; + line: number; + node_id: string; + original_commit_id: string; + original_line: number; + original_position: number; + original_start_line: number; + path: string; + position: number; + pull_request_review_id: number; + pull_request_url: string; + side: string; + start_line: number; + start_side: string; + updated_at: string; + url: string; + user: PullsUpdateCommentResponseUser; + }; + type PullsUpdateBranchResponse = { message: string; url: string }; + type PullsUpdateResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsUpdateResponseRequestedTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type PullsUpdateResponseRequestedReviewersItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsUpdateResponseMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsUpdateResponseMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: PullsUpdateResponseMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type PullsUpdateResponseMergedBy = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsUpdateResponseLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type PullsUpdateResponseHeadUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsUpdateResponseHeadRepoPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type PullsUpdateResponseHeadRepoOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsUpdateResponseHeadRepo = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: PullsUpdateResponseHeadRepoOwner; + permissions: PullsUpdateResponseHeadRepoPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type PullsUpdateResponseHead = { + label: string; + ref: string; + repo: PullsUpdateResponseHeadRepo; + sha: string; + user: PullsUpdateResponseHeadUser; + }; + type PullsUpdateResponseBaseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsUpdateResponseBaseRepoPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type PullsUpdateResponseBaseRepoOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsUpdateResponseBaseRepo = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: PullsUpdateResponseBaseRepoOwner; + permissions: PullsUpdateResponseBaseRepoPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type PullsUpdateResponseBase = { + label: string; + ref: string; + repo: PullsUpdateResponseBaseRepo; + sha: string; + user: PullsUpdateResponseBaseUser; + }; + type PullsUpdateResponseAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsUpdateResponseAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsUpdateResponseLinksStatuses = { href: string }; + type PullsUpdateResponseLinksSelf = { href: string }; + type PullsUpdateResponseLinksReviewComments = { href: string }; + type PullsUpdateResponseLinksReviewComment = { href: string }; + type PullsUpdateResponseLinksIssue = { href: string }; + type PullsUpdateResponseLinksHtml = { href: string }; + type PullsUpdateResponseLinksCommits = { href: string }; + type PullsUpdateResponseLinksComments = { href: string }; + type PullsUpdateResponseLinks = { + comments: PullsUpdateResponseLinksComments; + commits: PullsUpdateResponseLinksCommits; + html: PullsUpdateResponseLinksHtml; + issue: PullsUpdateResponseLinksIssue; + review_comment: PullsUpdateResponseLinksReviewComment; + review_comments: PullsUpdateResponseLinksReviewComments; + self: PullsUpdateResponseLinksSelf; + statuses: PullsUpdateResponseLinksStatuses; + }; + type PullsUpdateResponse = { + _links: PullsUpdateResponseLinks; + active_lock_reason: string; + additions: number; + assignee: PullsUpdateResponseAssignee; + assignees: Array; + author_association: string; + base: PullsUpdateResponseBase; + body: string; + changed_files: number; + closed_at: string; + comments: number; + comments_url: string; + commits: number; + commits_url: string; + created_at: string; + deletions: number; + diff_url: string; + draft: boolean; + head: PullsUpdateResponseHead; + html_url: string; + id: number; + issue_url: string; + labels: Array; + locked: boolean; + maintainer_can_modify: boolean; + merge_commit_sha: string; + mergeable: boolean; + mergeable_state: string; + merged: boolean; + merged_at: string; + merged_by: PullsUpdateResponseMergedBy; + milestone: PullsUpdateResponseMilestone; + node_id: string; + number: number; + patch_url: string; + rebaseable: boolean; + requested_reviewers: Array; + requested_teams: Array; + review_comment_url: string; + review_comments: number; + review_comments_url: string; + state: string; + statuses_url: string; + title: string; + updated_at: string; + url: string; + user: PullsUpdateResponseUser; + }; + type PullsSubmitReviewResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsSubmitReviewResponseLinksPullRequest = { href: string }; + type PullsSubmitReviewResponseLinksHtml = { href: string }; + type PullsSubmitReviewResponseLinks = { + html: PullsSubmitReviewResponseLinksHtml; + pull_request: PullsSubmitReviewResponseLinksPullRequest; + }; + type PullsSubmitReviewResponse = { + _links: PullsSubmitReviewResponseLinks; + body: string; + commit_id: string; + html_url: string; + id: number; + node_id: string; + pull_request_url: string; + state: string; + user: PullsSubmitReviewResponseUser; + }; + type PullsMergeResponse = { merged: boolean; message: string; sha: string }; + type PullsListReviewsResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsListReviewsResponseItemLinksPullRequest = { href: string }; + type PullsListReviewsResponseItemLinksHtml = { href: string }; + type PullsListReviewsResponseItemLinks = { + html: PullsListReviewsResponseItemLinksHtml; + pull_request: PullsListReviewsResponseItemLinksPullRequest; + }; + type PullsListReviewsResponseItem = { + _links: PullsListReviewsResponseItemLinks; + body: string; + commit_id: string; + html_url: string; + id: number; + node_id: string; + pull_request_url: string; + state: string; + user: PullsListReviewsResponseItemUser; + }; + type PullsListReviewRequestsResponseUsersItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsListReviewRequestsResponseTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type PullsListReviewRequestsResponse = { + teams: Array; + users: Array; + }; + type PullsListFilesResponseItem = { + additions: number; + blob_url: string; + changes: number; + contents_url: string; + deletions: number; + filename: string; + patch: string; + raw_url: string; + sha: string; + status: string; + }; + type PullsListCommitsResponseItemParentsItem = { sha: string; url: string }; + type PullsListCommitsResponseItemCommitter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsListCommitsResponseItemCommitVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; + }; + type PullsListCommitsResponseItemCommitTree = { sha: string; url: string }; + type PullsListCommitsResponseItemCommitCommitter = { + date: string; + email: string; + name: string; + }; + type PullsListCommitsResponseItemCommitAuthor = { + date: string; + email: string; + name: string; + }; + type PullsListCommitsResponseItemCommit = { + author: PullsListCommitsResponseItemCommitAuthor; + comment_count: number; + committer: PullsListCommitsResponseItemCommitCommitter; + message: string; + tree: PullsListCommitsResponseItemCommitTree; + url: string; + verification: PullsListCommitsResponseItemCommitVerification; + }; + type PullsListCommitsResponseItemAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsListCommitsResponseItem = { + author: PullsListCommitsResponseItemAuthor; + comments_url: string; + commit: PullsListCommitsResponseItemCommit; + committer: PullsListCommitsResponseItemCommitter; + html_url: string; + node_id: string; + parents: Array; + sha: string; + url: string; + }; + type PullsListCommentsForRepoResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsListCommentsForRepoResponseItemLinksSelf = { href: string }; + type PullsListCommentsForRepoResponseItemLinksPullRequest = { href: string }; + type PullsListCommentsForRepoResponseItemLinksHtml = { href: string }; + type PullsListCommentsForRepoResponseItemLinks = { + html: PullsListCommentsForRepoResponseItemLinksHtml; + pull_request: PullsListCommentsForRepoResponseItemLinksPullRequest; + self: PullsListCommentsForRepoResponseItemLinksSelf; + }; + type PullsListCommentsForRepoResponseItem = { + _links: PullsListCommentsForRepoResponseItemLinks; + author_association: string; + body: string; + commit_id: string; + created_at: string; + diff_hunk: string; + html_url: string; + id: number; + in_reply_to_id: number; + line: number; + node_id: string; + original_commit_id: string; + original_line: number; + original_position: number; + original_start_line: number; + path: string; + position: number; + pull_request_review_id: number; + pull_request_url: string; + side: string; + start_line: number; + start_side: string; + updated_at: string; + url: string; + user: PullsListCommentsForRepoResponseItemUser; + }; + type PullsListCommentsResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsListCommentsResponseItemLinksSelf = { href: string }; + type PullsListCommentsResponseItemLinksPullRequest = { href: string }; + type PullsListCommentsResponseItemLinksHtml = { href: string }; + type PullsListCommentsResponseItemLinks = { + html: PullsListCommentsResponseItemLinksHtml; + pull_request: PullsListCommentsResponseItemLinksPullRequest; + self: PullsListCommentsResponseItemLinksSelf; + }; + type PullsListCommentsResponseItem = { + _links: PullsListCommentsResponseItemLinks; + author_association: string; + body: string; + commit_id: string; + created_at: string; + diff_hunk: string; + html_url: string; + id: number; + in_reply_to_id: number; + line: number; + node_id: string; + original_commit_id: string; + original_line: number; + original_position: number; + original_start_line: number; + path: string; + position: number; + pull_request_review_id: number; + pull_request_url: string; + side: string; + start_line: number; + start_side: string; + updated_at: string; + url: string; + user: PullsListCommentsResponseItemUser; + }; + type PullsListResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsListResponseItemRequestedTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type PullsListResponseItemRequestedReviewersItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsListResponseItemMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsListResponseItemMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: PullsListResponseItemMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type PullsListResponseItemLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type PullsListResponseItemHeadUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsListResponseItemHeadRepoPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type PullsListResponseItemHeadRepoOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsListResponseItemHeadRepo = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: PullsListResponseItemHeadRepoOwner; + permissions: PullsListResponseItemHeadRepoPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type PullsListResponseItemHead = { + label: string; + ref: string; + repo: PullsListResponseItemHeadRepo; + sha: string; + user: PullsListResponseItemHeadUser; + }; + type PullsListResponseItemBaseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsListResponseItemBaseRepoPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type PullsListResponseItemBaseRepoOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsListResponseItemBaseRepo = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: PullsListResponseItemBaseRepoOwner; + permissions: PullsListResponseItemBaseRepoPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type PullsListResponseItemBase = { + label: string; + ref: string; + repo: PullsListResponseItemBaseRepo; + sha: string; + user: PullsListResponseItemBaseUser; + }; + type PullsListResponseItemAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsListResponseItemAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsListResponseItemLinksStatuses = { href: string }; + type PullsListResponseItemLinksSelf = { href: string }; + type PullsListResponseItemLinksReviewComments = { href: string }; + type PullsListResponseItemLinksReviewComment = { href: string }; + type PullsListResponseItemLinksIssue = { href: string }; + type PullsListResponseItemLinksHtml = { href: string }; + type PullsListResponseItemLinksCommits = { href: string }; + type PullsListResponseItemLinksComments = { href: string }; + type PullsListResponseItemLinks = { + comments: PullsListResponseItemLinksComments; + commits: PullsListResponseItemLinksCommits; + html: PullsListResponseItemLinksHtml; + issue: PullsListResponseItemLinksIssue; + review_comment: PullsListResponseItemLinksReviewComment; + review_comments: PullsListResponseItemLinksReviewComments; + self: PullsListResponseItemLinksSelf; + statuses: PullsListResponseItemLinksStatuses; + }; + type PullsListResponseItem = { + _links: PullsListResponseItemLinks; + active_lock_reason: string; + assignee: PullsListResponseItemAssignee; + assignees: Array; + author_association: string; + base: PullsListResponseItemBase; + body: string; + closed_at: string; + comments_url: string; + commits_url: string; + created_at: string; + diff_url: string; + draft: boolean; + head: PullsListResponseItemHead; + html_url: string; + id: number; + issue_url: string; + labels: Array; + locked: boolean; + merge_commit_sha: string; + merged_at: string; + milestone: PullsListResponseItemMilestone; + node_id: string; + number: number; + patch_url: string; + requested_reviewers: Array; + requested_teams: Array; + review_comment_url: string; + review_comments_url: string; + state: string; + statuses_url: string; + title: string; + updated_at: string; + url: string; + user: PullsListResponseItemUser; + }; + type PullsGetReviewResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsGetReviewResponseLinksPullRequest = { href: string }; + type PullsGetReviewResponseLinksHtml = { href: string }; + type PullsGetReviewResponseLinks = { + html: PullsGetReviewResponseLinksHtml; + pull_request: PullsGetReviewResponseLinksPullRequest; + }; + type PullsGetReviewResponse = { + _links: PullsGetReviewResponseLinks; + body: string; + commit_id: string; + html_url: string; + id: number; + node_id: string; + pull_request_url: string; + state: string; + user: PullsGetReviewResponseUser; + }; + type PullsGetCommentsForReviewResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsGetCommentsForReviewResponseItemLinksSelf = { href: string }; + type PullsGetCommentsForReviewResponseItemLinksPullRequest = { href: string }; + type PullsGetCommentsForReviewResponseItemLinksHtml = { href: string }; + type PullsGetCommentsForReviewResponseItemLinks = { + html: PullsGetCommentsForReviewResponseItemLinksHtml; + pull_request: PullsGetCommentsForReviewResponseItemLinksPullRequest; + self: PullsGetCommentsForReviewResponseItemLinksSelf; + }; + type PullsGetCommentsForReviewResponseItem = { + _links: PullsGetCommentsForReviewResponseItemLinks; + author_association: string; + body: string; + commit_id: string; + created_at: string; + diff_hunk: string; + html_url: string; + id: number; + in_reply_to_id: number; + node_id: string; + original_commit_id: string; + original_position: number; + path: string; + position: number; + pull_request_review_id: number; + pull_request_url: string; + updated_at: string; + url: string; + user: PullsGetCommentsForReviewResponseItemUser; + }; + type PullsGetCommentResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsGetCommentResponseLinksSelf = { href: string }; + type PullsGetCommentResponseLinksPullRequest = { href: string }; + type PullsGetCommentResponseLinksHtml = { href: string }; + type PullsGetCommentResponseLinks = { + html: PullsGetCommentResponseLinksHtml; + pull_request: PullsGetCommentResponseLinksPullRequest; + self: PullsGetCommentResponseLinksSelf; + }; + type PullsGetCommentResponse = { + _links: PullsGetCommentResponseLinks; + author_association: string; + body: string; + commit_id: string; + created_at: string; + diff_hunk: string; + html_url: string; + id: number; + in_reply_to_id: number; + line: number; + node_id: string; + original_commit_id: string; + original_line: number; + original_position: number; + original_start_line: number; + path: string; + position: number; + pull_request_review_id: number; + pull_request_url: string; + side: string; + start_line: number; + start_side: string; + updated_at: string; + url: string; + user: PullsGetCommentResponseUser; + }; + type PullsGetResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsGetResponseRequestedTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type PullsGetResponseRequestedReviewersItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsGetResponseMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsGetResponseMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: PullsGetResponseMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type PullsGetResponseMergedBy = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsGetResponseLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type PullsGetResponseHeadUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsGetResponseHeadRepoPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type PullsGetResponseHeadRepoOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsGetResponseHeadRepo = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: PullsGetResponseHeadRepoOwner; + permissions: PullsGetResponseHeadRepoPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type PullsGetResponseHead = { + label: string; + ref: string; + repo: PullsGetResponseHeadRepo; + sha: string; + user: PullsGetResponseHeadUser; + }; + type PullsGetResponseBaseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsGetResponseBaseRepoPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type PullsGetResponseBaseRepoOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsGetResponseBaseRepo = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: PullsGetResponseBaseRepoOwner; + permissions: PullsGetResponseBaseRepoPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type PullsGetResponseBase = { + label: string; + ref: string; + repo: PullsGetResponseBaseRepo; + sha: string; + user: PullsGetResponseBaseUser; + }; + type PullsGetResponseAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsGetResponseAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsGetResponseLinksStatuses = { href: string }; + type PullsGetResponseLinksSelf = { href: string }; + type PullsGetResponseLinksReviewComments = { href: string }; + type PullsGetResponseLinksReviewComment = { href: string }; + type PullsGetResponseLinksIssue = { href: string }; + type PullsGetResponseLinksHtml = { href: string }; + type PullsGetResponseLinksCommits = { href: string }; + type PullsGetResponseLinksComments = { href: string }; + type PullsGetResponseLinks = { + comments: PullsGetResponseLinksComments; + commits: PullsGetResponseLinksCommits; + html: PullsGetResponseLinksHtml; + issue: PullsGetResponseLinksIssue; + review_comment: PullsGetResponseLinksReviewComment; + review_comments: PullsGetResponseLinksReviewComments; + self: PullsGetResponseLinksSelf; + statuses: PullsGetResponseLinksStatuses; + }; + type PullsGetResponse = { + _links: PullsGetResponseLinks; + active_lock_reason: string; + additions: number; + assignee: PullsGetResponseAssignee; + assignees: Array; + author_association: string; + base: PullsGetResponseBase; + body: string; + changed_files: number; + closed_at: string; + comments: number; + comments_url: string; + commits: number; + commits_url: string; + created_at: string; + deletions: number; + diff_url: string; + draft: boolean; + head: PullsGetResponseHead; + html_url: string; + id: number; + issue_url: string; + labels: Array; + locked: boolean; + maintainer_can_modify: boolean; + merge_commit_sha: string; + mergeable: boolean; + mergeable_state: string; + merged: boolean; + merged_at: string; + merged_by: PullsGetResponseMergedBy; + milestone: PullsGetResponseMilestone; + node_id: string; + number: number; + patch_url: string; + rebaseable: boolean; + requested_reviewers: Array; + requested_teams: Array; + review_comment_url: string; + review_comments: number; + review_comments_url: string; + state: string; + statuses_url: string; + title: string; + updated_at: string; + url: string; + user: PullsGetResponseUser; + }; + type PullsDismissReviewResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsDismissReviewResponseLinksPullRequest = { href: string }; + type PullsDismissReviewResponseLinksHtml = { href: string }; + type PullsDismissReviewResponseLinks = { + html: PullsDismissReviewResponseLinksHtml; + pull_request: PullsDismissReviewResponseLinksPullRequest; + }; + type PullsDismissReviewResponse = { + _links: PullsDismissReviewResponseLinks; + body: string; + commit_id: string; + html_url: string; + id: number; + node_id: string; + pull_request_url: string; + state: string; + user: PullsDismissReviewResponseUser; + }; + type PullsDeletePendingReviewResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsDeletePendingReviewResponseLinksPullRequest = { href: string }; + type PullsDeletePendingReviewResponseLinksHtml = { href: string }; + type PullsDeletePendingReviewResponseLinks = { + html: PullsDeletePendingReviewResponseLinksHtml; + pull_request: PullsDeletePendingReviewResponseLinksPullRequest; + }; + type PullsDeletePendingReviewResponse = { + _links: PullsDeletePendingReviewResponseLinks; + body: string; + commit_id: string; + html_url: string; + id: number; + node_id: string; + pull_request_url: string; + state: string; + user: PullsDeletePendingReviewResponseUser; + }; + type PullsCreateReviewRequestResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateReviewRequestResponseRequestedTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type PullsCreateReviewRequestResponseRequestedReviewersItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateReviewRequestResponseMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateReviewRequestResponseMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: PullsCreateReviewRequestResponseMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type PullsCreateReviewRequestResponseLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type PullsCreateReviewRequestResponseHeadUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateReviewRequestResponseHeadRepoPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type PullsCreateReviewRequestResponseHeadRepoOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateReviewRequestResponseHeadRepo = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: PullsCreateReviewRequestResponseHeadRepoOwner; + permissions: PullsCreateReviewRequestResponseHeadRepoPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type PullsCreateReviewRequestResponseHead = { + label: string; + ref: string; + repo: PullsCreateReviewRequestResponseHeadRepo; + sha: string; + user: PullsCreateReviewRequestResponseHeadUser; + }; + type PullsCreateReviewRequestResponseBaseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateReviewRequestResponseBaseRepoPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type PullsCreateReviewRequestResponseBaseRepoOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateReviewRequestResponseBaseRepo = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: PullsCreateReviewRequestResponseBaseRepoOwner; + permissions: PullsCreateReviewRequestResponseBaseRepoPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type PullsCreateReviewRequestResponseBase = { + label: string; + ref: string; + repo: PullsCreateReviewRequestResponseBaseRepo; + sha: string; + user: PullsCreateReviewRequestResponseBaseUser; + }; + type PullsCreateReviewRequestResponseAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateReviewRequestResponseAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateReviewRequestResponseLinksStatuses = { href: string }; + type PullsCreateReviewRequestResponseLinksSelf = { href: string }; + type PullsCreateReviewRequestResponseLinksReviewComments = { href: string }; + type PullsCreateReviewRequestResponseLinksReviewComment = { href: string }; + type PullsCreateReviewRequestResponseLinksIssue = { href: string }; + type PullsCreateReviewRequestResponseLinksHtml = { href: string }; + type PullsCreateReviewRequestResponseLinksCommits = { href: string }; + type PullsCreateReviewRequestResponseLinksComments = { href: string }; + type PullsCreateReviewRequestResponseLinks = { + comments: PullsCreateReviewRequestResponseLinksComments; + commits: PullsCreateReviewRequestResponseLinksCommits; + html: PullsCreateReviewRequestResponseLinksHtml; + issue: PullsCreateReviewRequestResponseLinksIssue; + review_comment: PullsCreateReviewRequestResponseLinksReviewComment; + review_comments: PullsCreateReviewRequestResponseLinksReviewComments; + self: PullsCreateReviewRequestResponseLinksSelf; + statuses: PullsCreateReviewRequestResponseLinksStatuses; + }; + type PullsCreateReviewRequestResponse = { + _links: PullsCreateReviewRequestResponseLinks; + active_lock_reason: string; + assignee: PullsCreateReviewRequestResponseAssignee; + assignees: Array; + author_association: string; + base: PullsCreateReviewRequestResponseBase; + body: string; + closed_at: string; + comments_url: string; + commits_url: string; + created_at: string; + diff_url: string; + draft: boolean; + head: PullsCreateReviewRequestResponseHead; + html_url: string; + id: number; + issue_url: string; + labels: Array; + locked: boolean; + merge_commit_sha: string; + merged_at: string; + milestone: PullsCreateReviewRequestResponseMilestone; + node_id: string; + number: number; + patch_url: string; + requested_reviewers: Array< + PullsCreateReviewRequestResponseRequestedReviewersItem + >; + requested_teams: Array; + review_comment_url: string; + review_comments_url: string; + state: string; + statuses_url: string; + title: string; + updated_at: string; + url: string; + user: PullsCreateReviewRequestResponseUser; + }; + type PullsCreateReviewCommentReplyResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateReviewCommentReplyResponseLinksSelf = { href: string }; + type PullsCreateReviewCommentReplyResponseLinksPullRequest = { href: string }; + type PullsCreateReviewCommentReplyResponseLinksHtml = { href: string }; + type PullsCreateReviewCommentReplyResponseLinks = { + html: PullsCreateReviewCommentReplyResponseLinksHtml; + pull_request: PullsCreateReviewCommentReplyResponseLinksPullRequest; + self: PullsCreateReviewCommentReplyResponseLinksSelf; + }; + type PullsCreateReviewCommentReplyResponse = { + _links: PullsCreateReviewCommentReplyResponseLinks; + author_association: string; + body: string; + commit_id: string; + created_at: string; + diff_hunk: string; + html_url: string; + id: number; + node_id: string; + original_commit_id: string; + original_position: number; + path: string; + position: number; + pull_request_review_id: number; + pull_request_url: string; + updated_at: string; + url: string; + user: PullsCreateReviewCommentReplyResponseUser; + }; + type PullsCreateReviewResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateReviewResponseLinksPullRequest = { href: string }; + type PullsCreateReviewResponseLinksHtml = { href: string }; + type PullsCreateReviewResponseLinks = { + html: PullsCreateReviewResponseLinksHtml; + pull_request: PullsCreateReviewResponseLinksPullRequest; + }; + type PullsCreateReviewResponse = { + _links: PullsCreateReviewResponseLinks; + body: string; + commit_id: string; + html_url: string; + id: number; + node_id: string; + pull_request_url: string; + state: string; + user: PullsCreateReviewResponseUser; + }; + type PullsCreateFromIssueResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateFromIssueResponseRequestedTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type PullsCreateFromIssueResponseRequestedReviewersItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateFromIssueResponseMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateFromIssueResponseMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: PullsCreateFromIssueResponseMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type PullsCreateFromIssueResponseMergedBy = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateFromIssueResponseLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type PullsCreateFromIssueResponseHeadUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateFromIssueResponseHeadRepoPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type PullsCreateFromIssueResponseHeadRepoOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateFromIssueResponseHeadRepo = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: PullsCreateFromIssueResponseHeadRepoOwner; + permissions: PullsCreateFromIssueResponseHeadRepoPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type PullsCreateFromIssueResponseHead = { + label: string; + ref: string; + repo: PullsCreateFromIssueResponseHeadRepo; + sha: string; + user: PullsCreateFromIssueResponseHeadUser; + }; + type PullsCreateFromIssueResponseBaseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateFromIssueResponseBaseRepoPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type PullsCreateFromIssueResponseBaseRepoOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateFromIssueResponseBaseRepo = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: PullsCreateFromIssueResponseBaseRepoOwner; + permissions: PullsCreateFromIssueResponseBaseRepoPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type PullsCreateFromIssueResponseBase = { + label: string; + ref: string; + repo: PullsCreateFromIssueResponseBaseRepo; + sha: string; + user: PullsCreateFromIssueResponseBaseUser; + }; + type PullsCreateFromIssueResponseAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateFromIssueResponseAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateFromIssueResponseLinksStatuses = { href: string }; + type PullsCreateFromIssueResponseLinksSelf = { href: string }; + type PullsCreateFromIssueResponseLinksReviewComments = { href: string }; + type PullsCreateFromIssueResponseLinksReviewComment = { href: string }; + type PullsCreateFromIssueResponseLinksIssue = { href: string }; + type PullsCreateFromIssueResponseLinksHtml = { href: string }; + type PullsCreateFromIssueResponseLinksCommits = { href: string }; + type PullsCreateFromIssueResponseLinksComments = { href: string }; + type PullsCreateFromIssueResponseLinks = { + comments: PullsCreateFromIssueResponseLinksComments; + commits: PullsCreateFromIssueResponseLinksCommits; + html: PullsCreateFromIssueResponseLinksHtml; + issue: PullsCreateFromIssueResponseLinksIssue; + review_comment: PullsCreateFromIssueResponseLinksReviewComment; + review_comments: PullsCreateFromIssueResponseLinksReviewComments; + self: PullsCreateFromIssueResponseLinksSelf; + statuses: PullsCreateFromIssueResponseLinksStatuses; + }; + type PullsCreateFromIssueResponse = { + _links: PullsCreateFromIssueResponseLinks; + active_lock_reason: string; + additions: number; + assignee: PullsCreateFromIssueResponseAssignee; + assignees: Array; + author_association: string; + base: PullsCreateFromIssueResponseBase; + body: string; + changed_files: number; + closed_at: string; + comments: number; + comments_url: string; + commits: number; + commits_url: string; + created_at: string; + deletions: number; + diff_url: string; + draft: boolean; + head: PullsCreateFromIssueResponseHead; + html_url: string; + id: number; + issue_url: string; + labels: Array; + locked: boolean; + maintainer_can_modify: boolean; + merge_commit_sha: string; + mergeable: boolean; + mergeable_state: string; + merged: boolean; + merged_at: string; + merged_by: PullsCreateFromIssueResponseMergedBy; + milestone: PullsCreateFromIssueResponseMilestone; + node_id: string; + number: number; + patch_url: string; + rebaseable: boolean; + requested_reviewers: Array< + PullsCreateFromIssueResponseRequestedReviewersItem + >; + requested_teams: Array; + review_comment_url: string; + review_comments: number; + review_comments_url: string; + state: string; + statuses_url: string; + title: string; + updated_at: string; + url: string; + user: PullsCreateFromIssueResponseUser; + }; + type PullsCreateCommentReplyResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateCommentReplyResponseLinksSelf = { href: string }; + type PullsCreateCommentReplyResponseLinksPullRequest = { href: string }; + type PullsCreateCommentReplyResponseLinksHtml = { href: string }; + type PullsCreateCommentReplyResponseLinks = { + html: PullsCreateCommentReplyResponseLinksHtml; + pull_request: PullsCreateCommentReplyResponseLinksPullRequest; + self: PullsCreateCommentReplyResponseLinksSelf; + }; + type PullsCreateCommentReplyResponse = { + _links: PullsCreateCommentReplyResponseLinks; + author_association: string; + body: string; + commit_id: string; + created_at: string; + diff_hunk: string; + html_url: string; + id: number; + in_reply_to_id: number; + line: number; + node_id: string; + original_commit_id: string; + original_line: number; + original_position: number; + original_start_line: number; + path: string; + position: number; + pull_request_review_id: number; + pull_request_url: string; + side: string; + start_line: number; + start_side: string; + updated_at: string; + url: string; + user: PullsCreateCommentReplyResponseUser; + }; + type PullsCreateCommentResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateCommentResponseLinksSelf = { href: string }; + type PullsCreateCommentResponseLinksPullRequest = { href: string }; + type PullsCreateCommentResponseLinksHtml = { href: string }; + type PullsCreateCommentResponseLinks = { + html: PullsCreateCommentResponseLinksHtml; + pull_request: PullsCreateCommentResponseLinksPullRequest; + self: PullsCreateCommentResponseLinksSelf; + }; + type PullsCreateCommentResponse = { + _links: PullsCreateCommentResponseLinks; + author_association: string; + body: string; + commit_id: string; + created_at: string; + diff_hunk: string; + html_url: string; + id: number; + in_reply_to_id: number; + line: number; + node_id: string; + original_commit_id: string; + original_line: number; + original_position: number; + original_start_line: number; + path: string; + position: number; + pull_request_review_id: number; + pull_request_url: string; + side: string; + start_line: number; + start_side: string; + updated_at: string; + url: string; + user: PullsCreateCommentResponseUser; + }; + type PullsCreateResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateResponseRequestedTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type PullsCreateResponseRequestedReviewersItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateResponseMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateResponseMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: PullsCreateResponseMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type PullsCreateResponseMergedBy = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateResponseLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type PullsCreateResponseHeadUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateResponseHeadRepoPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type PullsCreateResponseHeadRepoOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateResponseHeadRepo = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: PullsCreateResponseHeadRepoOwner; + permissions: PullsCreateResponseHeadRepoPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type PullsCreateResponseHead = { + label: string; + ref: string; + repo: PullsCreateResponseHeadRepo; + sha: string; + user: PullsCreateResponseHeadUser; + }; + type PullsCreateResponseBaseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateResponseBaseRepoPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type PullsCreateResponseBaseRepoOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateResponseBaseRepo = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: PullsCreateResponseBaseRepoOwner; + permissions: PullsCreateResponseBaseRepoPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type PullsCreateResponseBase = { + label: string; + ref: string; + repo: PullsCreateResponseBaseRepo; + sha: string; + user: PullsCreateResponseBaseUser; + }; + type PullsCreateResponseAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateResponseAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type PullsCreateResponseLinksStatuses = { href: string }; + type PullsCreateResponseLinksSelf = { href: string }; + type PullsCreateResponseLinksReviewComments = { href: string }; + type PullsCreateResponseLinksReviewComment = { href: string }; + type PullsCreateResponseLinksIssue = { href: string }; + type PullsCreateResponseLinksHtml = { href: string }; + type PullsCreateResponseLinksCommits = { href: string }; + type PullsCreateResponseLinksComments = { href: string }; + type PullsCreateResponseLinks = { + comments: PullsCreateResponseLinksComments; + commits: PullsCreateResponseLinksCommits; + html: PullsCreateResponseLinksHtml; + issue: PullsCreateResponseLinksIssue; + review_comment: PullsCreateResponseLinksReviewComment; + review_comments: PullsCreateResponseLinksReviewComments; + self: PullsCreateResponseLinksSelf; + statuses: PullsCreateResponseLinksStatuses; + }; + type PullsCreateResponse = { + _links: PullsCreateResponseLinks; + active_lock_reason: string; + additions: number; + assignee: PullsCreateResponseAssignee; + assignees: Array; + author_association: string; + base: PullsCreateResponseBase; + body: string; + changed_files: number; + closed_at: string; + comments: number; + comments_url: string; + commits: number; + commits_url: string; + created_at: string; + deletions: number; + diff_url: string; + draft: boolean; + head: PullsCreateResponseHead; + html_url: string; + id: number; + issue_url: string; + labels: Array; + locked: boolean; + maintainer_can_modify: boolean; + merge_commit_sha: string; + mergeable: boolean; + mergeable_state: string; + merged: boolean; + merged_at: string; + merged_by: PullsCreateResponseMergedBy; + milestone: PullsCreateResponseMilestone; + node_id: string; + number: number; + patch_url: string; + rebaseable: boolean; + requested_reviewers: Array; + requested_teams: Array; + review_comment_url: string; + review_comments: number; + review_comments_url: string; + state: string; + statuses_url: string; + title: string; + updated_at: string; + url: string; + user: PullsCreateResponseUser; + }; + type ProjectsUpdateColumnResponse = { + cards_url: string; + created_at: string; + id: number; + name: string; + node_id: string; + project_url: string; + updated_at: string; + url: string; + }; + type ProjectsUpdateCardResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ProjectsUpdateCardResponse = { + archived: boolean; + column_url: string; + content_url: string; + created_at: string; + creator: ProjectsUpdateCardResponseCreator; + id: number; + node_id: string; + note: string; + project_url: string; + updated_at: string; + url: string; + }; + type ProjectsUpdateResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ProjectsUpdateResponse = { + body: string; + columns_url: string; + created_at: string; + creator: ProjectsUpdateResponseCreator; + html_url: string; + id: number; + name: string; + node_id: string; + number: number; + owner_url: string; + state: string; + updated_at: string; + url: string; + }; + type ProjectsReviewUserPermissionLevelResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ProjectsReviewUserPermissionLevelResponse = { + permission: string; + user: ProjectsReviewUserPermissionLevelResponseUser; + }; + type ProjectsListForUserResponseItemCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ProjectsListForUserResponseItem = { + body: string; + columns_url: string; + created_at: string; + creator: ProjectsListForUserResponseItemCreator; + html_url: string; + id: number; + name: string; + node_id: string; + number: number; + owner_url: string; + state: string; + updated_at: string; + url: string; + }; + type ProjectsListForRepoResponseItemCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ProjectsListForRepoResponseItem = { + body: string; + columns_url: string; + created_at: string; + creator: ProjectsListForRepoResponseItemCreator; + html_url: string; + id: number; + name: string; + node_id: string; + number: number; + owner_url: string; + state: string; + updated_at: string; + url: string; + }; + type ProjectsListForOrgResponseItemCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ProjectsListForOrgResponseItem = { + body: string; + columns_url: string; + created_at: string; + creator: ProjectsListForOrgResponseItemCreator; + html_url: string; + id: number; + name: string; + node_id: string; + number: number; + owner_url: string; + state: string; + updated_at: string; + url: string; + }; + type ProjectsListColumnsResponseItem = { + cards_url: string; + created_at: string; + id: number; + name: string; + node_id: string; + project_url: string; + updated_at: string; + url: string; + }; + type ProjectsListCollaboratorsResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ProjectsListCardsResponseItemCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ProjectsListCardsResponseItem = { + archived: boolean; + column_url: string; + content_url: string; + created_at: string; + creator: ProjectsListCardsResponseItemCreator; + id: number; + node_id: string; + note: string; + project_url: string; + updated_at: string; + url: string; + }; + type ProjectsGetColumnResponse = { + cards_url: string; + created_at: string; + id: number; + name: string; + node_id: string; + project_url: string; + updated_at: string; + url: string; + }; + type ProjectsGetCardResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ProjectsGetCardResponse = { + archived: boolean; + column_url: string; + content_url: string; + created_at: string; + creator: ProjectsGetCardResponseCreator; + id: number; + node_id: string; + note: string; + project_url: string; + updated_at: string; + url: string; + }; + type ProjectsGetResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ProjectsGetResponse = { + body: string; + columns_url: string; + created_at: string; + creator: ProjectsGetResponseCreator; + html_url: string; + id: number; + name: string; + node_id: string; + number: number; + owner_url: string; + state: string; + updated_at: string; + url: string; + }; + type ProjectsCreateForRepoResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ProjectsCreateForRepoResponse = { + body: string; + columns_url: string; + created_at: string; + creator: ProjectsCreateForRepoResponseCreator; + html_url: string; + id: number; + name: string; + node_id: string; + number: number; + owner_url: string; + state: string; + updated_at: string; + url: string; + }; + type ProjectsCreateForOrgResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ProjectsCreateForOrgResponse = { + body: string; + columns_url: string; + created_at: string; + creator: ProjectsCreateForOrgResponseCreator; + html_url: string; + id: number; + name: string; + node_id: string; + number: number; + owner_url: string; + state: string; + updated_at: string; + url: string; + }; + type ProjectsCreateForAuthenticatedUserResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ProjectsCreateForAuthenticatedUserResponse = { + body: string; + columns_url: string; + created_at: string; + creator: ProjectsCreateForAuthenticatedUserResponseCreator; + html_url: string; + id: number; + name: string; + node_id: string; + number: number; + owner_url: string; + state: string; + updated_at: string; + url: string; + }; + type ProjectsCreateColumnResponse = { + cards_url: string; + created_at: string; + id: number; + name: string; + node_id: string; + project_url: string; + updated_at: string; + url: string; + }; + type ProjectsCreateCardResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ProjectsCreateCardResponse = { + archived: boolean; + column_url: string; + content_url: string; + created_at: string; + creator: ProjectsCreateCardResponseCreator; + id: number; + node_id: string; + note: string; + project_url: string; + updated_at: string; + url: string; + }; + type OrgsUpdateMembershipResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type OrgsUpdateMembershipResponseOrganization = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type OrgsUpdateMembershipResponse = { + organization: OrgsUpdateMembershipResponseOrganization; + organization_url: string; + role: string; + state: string; + url: string; + user: OrgsUpdateMembershipResponseUser; + }; + type OrgsUpdateHookResponseConfig = { content_type: string; url: string }; + type OrgsUpdateHookResponse = { + active: boolean; + config: OrgsUpdateHookResponseConfig; + created_at: string; + events: Array; + id: number; + name: string; + ping_url: string; + updated_at: string; + url: string; + }; + type OrgsUpdateResponsePlan = { + name: string; + private_repos: number; + space: number; + }; + type OrgsUpdateResponse = { + avatar_url: string; + billing_email: string; + blog: string; + collaborators: number; + company: string; + created_at: string; + default_repository_settings: string; + description: string; + disk_usage: number; + email: string; + events_url: string; + followers: number; + following: number; + has_organization_projects: boolean; + has_repository_projects: boolean; + hooks_url: string; + html_url: string; + id: number; + is_verified: boolean; + issues_url: string; + location: string; + login: string; + members_allowed_repository_creation_type: string; + members_can_create_repositories: boolean; + members_url: string; + name: string; + node_id: string; + owned_private_repos: number; + plan: OrgsUpdateResponsePlan; + private_gists: number; + public_gists: number; + public_members_url: string; + public_repos: number; + repos_url: string; + total_private_repos: number; + two_factor_requirement_enabled: boolean; + type: string; + url: string; + }; + type OrgsRemoveOutsideCollaboratorResponse = { + documentation_url: string; + message: string; + }; + type OrgsListPublicMembersResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type OrgsListPendingInvitationsResponseItemInviter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type OrgsListPendingInvitationsResponseItem = { + created_at: string; + email: string; + id: number; + invitation_team_url: string; + inviter: OrgsListPendingInvitationsResponseItemInviter; + login: string; + role: string; + team_count: number; + }; + type OrgsListOutsideCollaboratorsResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type OrgsListMembershipsResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type OrgsListMembershipsResponseItemOrganization = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type OrgsListMembershipsResponseItem = { + organization: OrgsListMembershipsResponseItemOrganization; + organization_url: string; + role: string; + state: string; + url: string; + user: OrgsListMembershipsResponseItemUser; + }; + type OrgsListMembersResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type OrgsListInvitationTeamsResponseItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; + }; + type OrgsListInstallationsResponseInstallationsItemPermissions = { + deployments: string; + metadata: string; + pull_requests: string; + statuses: string; + }; + type OrgsListInstallationsResponseInstallationsItemAccount = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type OrgsListInstallationsResponseInstallationsItem = { + access_tokens_url: string; + account: OrgsListInstallationsResponseInstallationsItemAccount; + app_id: number; + created_at: string; + events: Array; + html_url: string; + id: number; + permissions: OrgsListInstallationsResponseInstallationsItemPermissions; + repositories_url: string; + repository_selection: string; + single_file_name: null; + target_id: number; + target_type: string; + updated_at: string; + }; + type OrgsListInstallationsResponse = { + installations: Array; + total_count: number; + }; + type OrgsListHooksResponseItemConfig = { content_type: string; url: string }; + type OrgsListHooksResponseItem = { + active: boolean; + config: OrgsListHooksResponseItemConfig; + created_at: string; + events: Array; + id: number; + name: string; + ping_url: string; + updated_at: string; + url: string; + }; + type OrgsListForUserResponseItem = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type OrgsListForAuthenticatedUserResponseItem = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type OrgsListBlockedUsersResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type OrgsListResponseItem = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type OrgsGetMembershipForAuthenticatedUserResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type OrgsGetMembershipForAuthenticatedUserResponseOrganization = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type OrgsGetMembershipForAuthenticatedUserResponse = { + organization: OrgsGetMembershipForAuthenticatedUserResponseOrganization; + organization_url: string; + role: string; + state: string; + url: string; + user: OrgsGetMembershipForAuthenticatedUserResponseUser; + }; + type OrgsGetMembershipResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type OrgsGetMembershipResponseOrganization = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type OrgsGetMembershipResponse = { + organization: OrgsGetMembershipResponseOrganization; + organization_url: string; + role: string; + state: string; + url: string; + user: OrgsGetMembershipResponseUser; + }; + type OrgsGetHookResponseConfig = { content_type: string; url: string }; + type OrgsGetHookResponse = { + active: boolean; + config: OrgsGetHookResponseConfig; + created_at: string; + events: Array; + id: number; + name: string; + ping_url: string; + updated_at: string; + url: string; + }; + type OrgsGetResponsePlan = { + name: string; + private_repos: number; + space: number; + filled_seats?: number; + seats?: number; + }; + type OrgsGetResponse = { + avatar_url: string; + billing_email?: string; + blog: string; + collaborators?: number; + company: string; + created_at: string; + default_repository_settings?: string; + description: string; + disk_usage?: number; + email: string; + events_url: string; + followers: number; + following: number; + has_organization_projects: boolean; + has_repository_projects: boolean; + hooks_url: string; + html_url: string; + id: number; + is_verified: boolean; + issues_url: string; + location: string; + login: string; + members_allowed_repository_creation_type?: string; + members_can_create_repositories?: boolean; + members_url: string; + name: string; + node_id: string; + owned_private_repos?: number; + plan: OrgsGetResponsePlan; + private_gists?: number; + public_gists: number; + public_members_url: string; + public_repos: number; + repos_url: string; + total_private_repos?: number; + two_factor_requirement_enabled?: boolean; + type: string; + url: string; + }; + type OrgsCreateInvitationResponseInviter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type OrgsCreateInvitationResponse = { + created_at: string; + email: string; + id: number; + invitation_team_url: string; + inviter: OrgsCreateInvitationResponseInviter; + login: string; + role: string; + team_count: number; + }; + type OrgsCreateHookResponseConfig = { content_type: string; url: string }; + type OrgsCreateHookResponse = { + active: boolean; + config: OrgsCreateHookResponseConfig; + created_at: string; + events: Array; + id: number; + name: string; + ping_url: string; + updated_at: string; + url: string; + }; + type OrgsConvertMemberToOutsideCollaboratorResponse = { + documentation_url: string; + message: string; + }; + type OrgsAddOrUpdateMembershipResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type OrgsAddOrUpdateMembershipResponseOrganization = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type OrgsAddOrUpdateMembershipResponse = { + organization: OrgsAddOrUpdateMembershipResponseOrganization; + organization_url: string; + role: string; + state: string; + url: string; + user: OrgsAddOrUpdateMembershipResponseUser; + }; + type OauthAuthorizationsUpdateAuthorizationResponseApp = { + client_id: string; + name: string; + url: string; + }; + type OauthAuthorizationsUpdateAuthorizationResponse = { + app: OauthAuthorizationsUpdateAuthorizationResponseApp; + created_at: string; + fingerprint: string; + hashed_token: string; + id: number; + note: string; + note_url: string; + scopes: Array; + token: string; + token_last_eight: string; + updated_at: string; + url: string; + }; + type OauthAuthorizationsResetAuthorizationResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type OauthAuthorizationsResetAuthorizationResponseApp = { + client_id: string; + name: string; + url: string; + }; + type OauthAuthorizationsResetAuthorizationResponse = { + app: OauthAuthorizationsResetAuthorizationResponseApp; + created_at: string; + fingerprint: string; + hashed_token: string; + id: number; + note: string; + note_url: string; + scopes: Array; + token: string; + token_last_eight: string; + updated_at: string; + url: string; + user: OauthAuthorizationsResetAuthorizationResponseUser; + }; + type OauthAuthorizationsListGrantsResponseItemApp = { + client_id: string; + name: string; + url: string; + }; + type OauthAuthorizationsListGrantsResponseItem = { + app: OauthAuthorizationsListGrantsResponseItemApp; + created_at: string; + id: number; + scopes: Array; + updated_at: string; + url: string; + }; + type OauthAuthorizationsListAuthorizationsResponseItemApp = { + client_id: string; + name: string; + url: string; + }; + type OauthAuthorizationsListAuthorizationsResponseItem = { + app: OauthAuthorizationsListAuthorizationsResponseItemApp; + created_at: string; + fingerprint: string; + hashed_token: string; + id: number; + note: string; + note_url: string; + scopes: Array; + token: string; + token_last_eight: string; + updated_at: string; + url: string; + }; + type OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintResponseApp = { + client_id: string; + name: string; + url: string; + }; + type OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintResponse = { + app: OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintResponseApp; + created_at: string; + fingerprint: string; + hashed_token: string; + id: number; + note: string; + note_url: string; + scopes: Array; + token: string; + token_last_eight: string; + updated_at: string; + url: string; + }; + type OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintResponseApp = { + client_id: string; + name: string; + url: string; + }; + type OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintResponse = { + app: OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintResponseApp; + created_at: string; + fingerprint: string; + hashed_token: string; + id: number; + note: string; + note_url: string; + scopes: Array; + token: string; + token_last_eight: string; + updated_at: string; + url: string; + }; + type OauthAuthorizationsGetOrCreateAuthorizationForAppResponseApp = { + client_id: string; + name: string; + url: string; + }; + type OauthAuthorizationsGetOrCreateAuthorizationForAppResponse = { + app: OauthAuthorizationsGetOrCreateAuthorizationForAppResponseApp; + created_at: string; + fingerprint: string; + hashed_token: string; + id: number; + note: string; + note_url: string; + scopes: Array; + token: string; + token_last_eight: string; + updated_at: string; + url: string; + }; + type OauthAuthorizationsGetGrantResponseApp = { + client_id: string; + name: string; + url: string; + }; + type OauthAuthorizationsGetGrantResponse = { + app: OauthAuthorizationsGetGrantResponseApp; + created_at: string; + id: number; + scopes: Array; + updated_at: string; + url: string; + }; + type OauthAuthorizationsGetAuthorizationResponseApp = { + client_id: string; + name: string; + url: string; + }; + type OauthAuthorizationsGetAuthorizationResponse = { + app: OauthAuthorizationsGetAuthorizationResponseApp; + created_at: string; + fingerprint: string; + hashed_token: string; + id: number; + note: string; + note_url: string; + scopes: Array; + token: string; + token_last_eight: string; + updated_at: string; + url: string; + }; + type OauthAuthorizationsCreateAuthorizationResponseApp = { + client_id: string; + name: string; + url: string; + }; + type OauthAuthorizationsCreateAuthorizationResponse = { + app: OauthAuthorizationsCreateAuthorizationResponseApp; + created_at: string; + fingerprint: string; + hashed_token: string; + id: number; + note: string; + note_url: string; + scopes: Array; + token: string; + token_last_eight: string; + updated_at: string; + url: string; + }; + type OauthAuthorizationsCheckAuthorizationResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type OauthAuthorizationsCheckAuthorizationResponseApp = { + client_id: string; + name: string; + url: string; + }; + type OauthAuthorizationsCheckAuthorizationResponse = { + app: OauthAuthorizationsCheckAuthorizationResponseApp; + created_at: string; + fingerprint: string; + hashed_token: string; + id: number; + note: string; + note_url: string; + scopes: Array; + token: string; + token_last_eight: string; + updated_at: string; + url: string; + user: OauthAuthorizationsCheckAuthorizationResponseUser; + }; + type MigrationsUpdateImportResponse = { + authors_url: string; + html_url: string; + repository_url: string; + status: string; + url: string; + use_lfs: string; + vcs: string; + vcs_url: string; + authors_count?: number; + commit_count?: number; + has_large_files?: boolean; + large_files_count?: number; + large_files_size?: number; + percent?: number; + status_text?: string; + tfvc_project?: string; + }; + type MigrationsStartImportResponse = { + authors_count: number; + authors_url: string; + commit_count: number; + has_large_files: boolean; + html_url: string; + large_files_count: number; + large_files_size: number; + percent: number; + repository_url: string; + status: string; + status_text: string; + url: string; + use_lfs: string; + vcs: string; + vcs_url: string; + }; + type MigrationsStartForOrgResponseRepositoriesItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type MigrationsStartForOrgResponseRepositoriesItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type MigrationsStartForOrgResponseRepositoriesItem = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: MigrationsStartForOrgResponseRepositoriesItemOwner; + permissions: MigrationsStartForOrgResponseRepositoriesItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type MigrationsStartForOrgResponseOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type MigrationsStartForOrgResponse = { + created_at: string; + exclude_attachments: boolean; + guid: string; + id: number; + lock_repositories: boolean; + owner: MigrationsStartForOrgResponseOwner; + repositories: Array; + state: string; + updated_at: string; + url: string; + }; + type MigrationsStartForAuthenticatedUserResponseRepositoriesItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type MigrationsStartForAuthenticatedUserResponseRepositoriesItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type MigrationsStartForAuthenticatedUserResponseRepositoriesItem = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: MigrationsStartForAuthenticatedUserResponseRepositoriesItemOwner; + permissions: MigrationsStartForAuthenticatedUserResponseRepositoriesItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type MigrationsStartForAuthenticatedUserResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type MigrationsStartForAuthenticatedUserResponse = { + created_at: string; + exclude_attachments: boolean; + guid: string; + id: number; + lock_repositories: boolean; + owner: MigrationsStartForAuthenticatedUserResponseOwner; + repositories: Array< + MigrationsStartForAuthenticatedUserResponseRepositoriesItem + >; + state: string; + updated_at: string; + url: string; + }; + type MigrationsSetLfsPreferenceResponse = { + authors_count: number; + authors_url: string; + has_large_files: boolean; + html_url: string; + large_files_count: number; + large_files_size: number; + repository_url: string; + status: string; + status_text: string; + url: string; + use_lfs: string; + vcs: string; + vcs_url: string; + }; + type MigrationsMapCommitAuthorResponse = { + email: string; + id: number; + import_url: string; + name: string; + remote_id: string; + remote_name: string; + url: string; + }; + type MigrationsListForOrgResponseItemRepositoriesItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type MigrationsListForOrgResponseItemRepositoriesItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type MigrationsListForOrgResponseItemRepositoriesItem = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: MigrationsListForOrgResponseItemRepositoriesItemOwner; + permissions: MigrationsListForOrgResponseItemRepositoriesItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type MigrationsListForOrgResponseItemOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type MigrationsListForOrgResponseItem = { + created_at: string; + exclude_attachments: boolean; + guid: string; + id: number; + lock_repositories: boolean; + owner: MigrationsListForOrgResponseItemOwner; + repositories: Array; + state: string; + updated_at: string; + url: string; + }; + type MigrationsListForAuthenticatedUserResponseItemRepositoriesItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type MigrationsListForAuthenticatedUserResponseItemRepositoriesItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type MigrationsListForAuthenticatedUserResponseItemRepositoriesItem = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: MigrationsListForAuthenticatedUserResponseItemRepositoriesItemOwner; + permissions: MigrationsListForAuthenticatedUserResponseItemRepositoriesItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type MigrationsListForAuthenticatedUserResponseItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type MigrationsListForAuthenticatedUserResponseItem = { + created_at: string; + exclude_attachments: boolean; + guid: string; + id: number; + lock_repositories: boolean; + owner: MigrationsListForAuthenticatedUserResponseItemOwner; + repositories: Array< + MigrationsListForAuthenticatedUserResponseItemRepositoriesItem + >; + state: string; + updated_at: string; + url: string; + }; + type MigrationsGetStatusForOrgResponseRepositoriesItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type MigrationsGetStatusForOrgResponseRepositoriesItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type MigrationsGetStatusForOrgResponseRepositoriesItem = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: MigrationsGetStatusForOrgResponseRepositoriesItemOwner; + permissions: MigrationsGetStatusForOrgResponseRepositoriesItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type MigrationsGetStatusForOrgResponseOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type MigrationsGetStatusForOrgResponse = { + created_at: string; + exclude_attachments: boolean; + guid: string; + id: number; + lock_repositories: boolean; + owner: MigrationsGetStatusForOrgResponseOwner; + repositories: Array; + state: string; + updated_at: string; + url: string; + }; + type MigrationsGetStatusForAuthenticatedUserResponseRepositoriesItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type MigrationsGetStatusForAuthenticatedUserResponseRepositoriesItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type MigrationsGetStatusForAuthenticatedUserResponseRepositoriesItem = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: MigrationsGetStatusForAuthenticatedUserResponseRepositoriesItemOwner; + permissions: MigrationsGetStatusForAuthenticatedUserResponseRepositoriesItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type MigrationsGetStatusForAuthenticatedUserResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type MigrationsGetStatusForAuthenticatedUserResponse = { + created_at: string; + exclude_attachments: boolean; + guid: string; + id: number; + lock_repositories: boolean; + owner: MigrationsGetStatusForAuthenticatedUserResponseOwner; + repositories: Array< + MigrationsGetStatusForAuthenticatedUserResponseRepositoriesItem + >; + state: string; + updated_at: string; + url: string; + }; + type MigrationsGetLargeFilesResponseItem = { + oid: string; + path: string; + ref_name: string; + size: number; + }; + type MigrationsGetImportProgressResponse = { + authors_count: number; + authors_url: string; + has_large_files: boolean; + html_url: string; + large_files_count: number; + large_files_size: number; + repository_url: string; + status: string; + status_text: string; + url: string; + use_lfs: string; + vcs: string; + vcs_url: string; + }; + type MigrationsGetCommitAuthorsResponseItem = { + email: string; + id: number; + import_url: string; + name: string; + remote_id: string; + remote_name: string; + url: string; + }; + type MetaGetResponse = { + git: Array; + hooks: Array; + importer: Array; + pages: Array; + verifiable_password_authentication: boolean; + }; + type LicensesListCommonlyUsedResponseItem = { + key: string; + name: string; + node_id?: string; + spdx_id: string; + url: string; + }; + type LicensesListResponseItem = { + key: string; + name: string; + node_id?: string; + spdx_id: string; + url: string; + }; + type LicensesGetForRepoResponseLicense = { + key: string; + name: string; + node_id: string; + spdx_id: string; + url: string; + }; + type LicensesGetForRepoResponseLinks = { + git: string; + html: string; + self: string; + }; + type LicensesGetForRepoResponse = { + _links: LicensesGetForRepoResponseLinks; + content: string; + download_url: string; + encoding: string; + git_url: string; + html_url: string; + license: LicensesGetForRepoResponseLicense; + name: string; + path: string; + sha: string; + size: number; + type: string; + url: string; + }; + type LicensesGetResponse = { + body: string; + conditions: Array; + description: string; + featured: boolean; + html_url: string; + implementation: string; + key: string; + limitations: Array; + name: string; + node_id: string; + permissions: Array; + spdx_id: string; + url: string; + }; + type IssuesUpdateMilestoneResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesUpdateMilestoneResponse = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: IssuesUpdateMilestoneResponseCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type IssuesUpdateLabelResponse = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesUpdateCommentResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesUpdateCommentResponse = { + body: string; + created_at: string; + html_url: string; + id: number; + node_id: string; + updated_at: string; + url: string; + user: IssuesUpdateCommentResponseUser; + }; + type IssuesUpdateResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesUpdateResponsePullRequest = { + diff_url: string; + html_url: string; + patch_url: string; + url: string; + }; + type IssuesUpdateResponseMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesUpdateResponseMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: IssuesUpdateResponseMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type IssuesUpdateResponseLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesUpdateResponseClosedBy = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesUpdateResponseAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesUpdateResponseAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesUpdateResponse = { + active_lock_reason: string; + assignee: IssuesUpdateResponseAssignee; + assignees: Array; + body: string; + closed_at: null; + closed_by: IssuesUpdateResponseClosedBy; + comments: number; + comments_url: string; + created_at: string; + events_url: string; + html_url: string; + id: number; + labels: Array; + labels_url: string; + locked: boolean; + milestone: IssuesUpdateResponseMilestone; + node_id: string; + number: number; + pull_request: IssuesUpdateResponsePullRequest; + repository_url: string; + state: string; + title: string; + updated_at: string; + url: string; + user: IssuesUpdateResponseUser; + }; + type IssuesReplaceLabelsResponseItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesRemoveLabelResponseItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesRemoveAssigneesResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesRemoveAssigneesResponsePullRequest = { + diff_url: string; + html_url: string; + patch_url: string; + url: string; + }; + type IssuesRemoveAssigneesResponseMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesRemoveAssigneesResponseMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: IssuesRemoveAssigneesResponseMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type IssuesRemoveAssigneesResponseLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesRemoveAssigneesResponseAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesRemoveAssigneesResponseAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesRemoveAssigneesResponse = { + active_lock_reason: string; + assignee: IssuesRemoveAssigneesResponseAssignee; + assignees: Array; + body: string; + closed_at: null; + comments: number; + comments_url: string; + created_at: string; + events_url: string; + html_url: string; + id: number; + labels: Array; + labels_url: string; + locked: boolean; + milestone: IssuesRemoveAssigneesResponseMilestone; + node_id: string; + number: number; + pull_request: IssuesRemoveAssigneesResponsePullRequest; + repository_url: string; + state: string; + title: string; + updated_at: string; + url: string; + user: IssuesRemoveAssigneesResponseUser; + }; + type IssuesListMilestonesForRepoResponseItemCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListMilestonesForRepoResponseItem = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: IssuesListMilestonesForRepoResponseItemCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type IssuesListLabelsOnIssueResponseItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesListLabelsForRepoResponseItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesListLabelsForMilestoneResponseItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesListForRepoResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListForRepoResponseItemPullRequest = { + diff_url: string; + html_url: string; + patch_url: string; + url: string; + }; + type IssuesListForRepoResponseItemMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListForRepoResponseItemMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: IssuesListForRepoResponseItemMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type IssuesListForRepoResponseItemLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesListForRepoResponseItemAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListForRepoResponseItemAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListForRepoResponseItem = { + active_lock_reason: string; + assignee: IssuesListForRepoResponseItemAssignee; + assignees: Array; + body: string; + closed_at: null; + comments: number; + comments_url: string; + created_at: string; + events_url: string; + html_url: string; + id: number; + labels: Array; + labels_url: string; + locked: boolean; + milestone: IssuesListForRepoResponseItemMilestone; + node_id: string; + number: number; + pull_request: IssuesListForRepoResponseItemPullRequest; + repository_url: string; + state: string; + title: string; + updated_at: string; + url: string; + user: IssuesListForRepoResponseItemUser; + }; + type IssuesListForOrgResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListForOrgResponseItemRepositoryPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type IssuesListForOrgResponseItemRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListForOrgResponseItemRepository = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: IssuesListForOrgResponseItemRepositoryOwner; + permissions: IssuesListForOrgResponseItemRepositoryPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type IssuesListForOrgResponseItemPullRequest = { + diff_url: string; + html_url: string; + patch_url: string; + url: string; + }; + type IssuesListForOrgResponseItemMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListForOrgResponseItemMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: IssuesListForOrgResponseItemMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type IssuesListForOrgResponseItemLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesListForOrgResponseItemAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListForOrgResponseItemAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListForOrgResponseItem = { + active_lock_reason: string; + assignee: IssuesListForOrgResponseItemAssignee; + assignees: Array; + body: string; + closed_at: null; + comments: number; + comments_url: string; + created_at: string; + events_url: string; + html_url: string; + id: number; + labels: Array; + labels_url: string; + locked: boolean; + milestone: IssuesListForOrgResponseItemMilestone; + node_id: string; + number: number; + pull_request: IssuesListForOrgResponseItemPullRequest; + repository: IssuesListForOrgResponseItemRepository; + repository_url: string; + state: string; + title: string; + updated_at: string; + url: string; + user: IssuesListForOrgResponseItemUser; + }; + type IssuesListForAuthenticatedUserResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListForAuthenticatedUserResponseItemRepositoryPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type IssuesListForAuthenticatedUserResponseItemRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListForAuthenticatedUserResponseItemRepository = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: IssuesListForAuthenticatedUserResponseItemRepositoryOwner; + permissions: IssuesListForAuthenticatedUserResponseItemRepositoryPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type IssuesListForAuthenticatedUserResponseItemPullRequest = { + diff_url: string; + html_url: string; + patch_url: string; + url: string; + }; + type IssuesListForAuthenticatedUserResponseItemMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListForAuthenticatedUserResponseItemMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: IssuesListForAuthenticatedUserResponseItemMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type IssuesListForAuthenticatedUserResponseItemLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesListForAuthenticatedUserResponseItemAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListForAuthenticatedUserResponseItemAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListForAuthenticatedUserResponseItem = { + active_lock_reason: string; + assignee: IssuesListForAuthenticatedUserResponseItemAssignee; + assignees: Array; + body: string; + closed_at: null; + comments: number; + comments_url: string; + created_at: string; + events_url: string; + html_url: string; + id: number; + labels: Array; + labels_url: string; + locked: boolean; + milestone: IssuesListForAuthenticatedUserResponseItemMilestone; + node_id: string; + number: number; + pull_request: IssuesListForAuthenticatedUserResponseItemPullRequest; + repository: IssuesListForAuthenticatedUserResponseItemRepository; + repository_url: string; + state: string; + title: string; + updated_at: string; + url: string; + user: IssuesListForAuthenticatedUserResponseItemUser; + }; + type IssuesListEventsForTimelineResponseItemActor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListEventsForTimelineResponseItem = { + actor: IssuesListEventsForTimelineResponseItemActor; + commit_id: string; + commit_url: string; + created_at: string; + event: string; + id: number; + node_id: string; + url: string; + }; + type IssuesListEventsForRepoResponseItemIssueUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListEventsForRepoResponseItemIssuePullRequest = { + diff_url: string; + html_url: string; + patch_url: string; + url: string; + }; + type IssuesListEventsForRepoResponseItemIssueMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListEventsForRepoResponseItemIssueMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: IssuesListEventsForRepoResponseItemIssueMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type IssuesListEventsForRepoResponseItemIssueLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesListEventsForRepoResponseItemIssueAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListEventsForRepoResponseItemIssueAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListEventsForRepoResponseItemIssue = { + active_lock_reason: string; + assignee: IssuesListEventsForRepoResponseItemIssueAssignee; + assignees: Array; + body: string; + closed_at: null; + comments: number; + comments_url: string; + created_at: string; + events_url: string; + html_url: string; + id: number; + labels: Array; + labels_url: string; + locked: boolean; + milestone: IssuesListEventsForRepoResponseItemIssueMilestone; + node_id: string; + number: number; + pull_request: IssuesListEventsForRepoResponseItemIssuePullRequest; + repository_url: string; + state: string; + title: string; + updated_at: string; + url: string; + user: IssuesListEventsForRepoResponseItemIssueUser; + }; + type IssuesListEventsForRepoResponseItemActor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListEventsForRepoResponseItem = { + actor: IssuesListEventsForRepoResponseItemActor; + commit_id: string; + commit_url: string; + created_at: string; + event: string; + id: number; + issue: IssuesListEventsForRepoResponseItemIssue; + node_id: string; + url: string; + }; + type IssuesListEventsResponseItemActor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListEventsResponseItem = { + actor: IssuesListEventsResponseItemActor; + commit_id: string; + commit_url: string; + created_at: string; + event: string; + id: number; + node_id: string; + url: string; + }; + type IssuesListCommentsForRepoResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListCommentsForRepoResponseItem = { + body: string; + created_at: string; + html_url: string; + id: number; + node_id: string; + updated_at: string; + url: string; + user: IssuesListCommentsForRepoResponseItemUser; + }; + type IssuesListCommentsResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListCommentsResponseItem = { + body: string; + created_at: string; + html_url: string; + id: number; + node_id: string; + updated_at: string; + url: string; + user: IssuesListCommentsResponseItemUser; + }; + type IssuesListAssigneesResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListResponseItemRepositoryPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type IssuesListResponseItemRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListResponseItemRepository = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: IssuesListResponseItemRepositoryOwner; + permissions: IssuesListResponseItemRepositoryPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type IssuesListResponseItemPullRequest = { + diff_url: string; + html_url: string; + patch_url: string; + url: string; + }; + type IssuesListResponseItemMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListResponseItemMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: IssuesListResponseItemMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type IssuesListResponseItemLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesListResponseItemAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListResponseItemAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesListResponseItem = { + active_lock_reason: string; + assignee: IssuesListResponseItemAssignee; + assignees: Array; + body: string; + closed_at: null; + comments: number; + comments_url: string; + created_at: string; + events_url: string; + html_url: string; + id: number; + labels: Array; + labels_url: string; + locked: boolean; + milestone: IssuesListResponseItemMilestone; + node_id: string; + number: number; + pull_request: IssuesListResponseItemPullRequest; + repository: IssuesListResponseItemRepository; + repository_url: string; + state: string; + title: string; + updated_at: string; + url: string; + user: IssuesListResponseItemUser; + }; + type IssuesGetMilestoneResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesGetMilestoneResponse = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: IssuesGetMilestoneResponseCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type IssuesGetLabelResponse = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesGetEventResponseIssueUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesGetEventResponseIssuePullRequest = { + diff_url: string; + html_url: string; + patch_url: string; + url: string; + }; + type IssuesGetEventResponseIssueMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesGetEventResponseIssueMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: IssuesGetEventResponseIssueMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type IssuesGetEventResponseIssueLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesGetEventResponseIssueAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesGetEventResponseIssueAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesGetEventResponseIssue = { + active_lock_reason: string; + assignee: IssuesGetEventResponseIssueAssignee; + assignees: Array; + body: string; + closed_at: null; + comments: number; + comments_url: string; + created_at: string; + events_url: string; + html_url: string; + id: number; + labels: Array; + labels_url: string; + locked: boolean; + milestone: IssuesGetEventResponseIssueMilestone; + node_id: string; + number: number; + pull_request: IssuesGetEventResponseIssuePullRequest; + repository_url: string; + state: string; + title: string; + updated_at: string; + url: string; + user: IssuesGetEventResponseIssueUser; + }; + type IssuesGetEventResponseActor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesGetEventResponse = { + actor: IssuesGetEventResponseActor; + commit_id: string; + commit_url: string; + created_at: string; + event: string; + id: number; + issue: IssuesGetEventResponseIssue; + node_id: string; + url: string; + }; + type IssuesGetCommentResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesGetCommentResponse = { + body: string; + created_at: string; + html_url: string; + id: number; + node_id: string; + updated_at: string; + url: string; + user: IssuesGetCommentResponseUser; + }; + type IssuesGetResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesGetResponsePullRequest = { + diff_url: string; + html_url: string; + patch_url: string; + url: string; + }; + type IssuesGetResponseMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesGetResponseMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: IssuesGetResponseMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type IssuesGetResponseLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesGetResponseClosedBy = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesGetResponseAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesGetResponseAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesGetResponse = { + active_lock_reason: string; + assignee: IssuesGetResponseAssignee; + assignees: Array; + body: string; + closed_at: null; + closed_by: IssuesGetResponseClosedBy; + comments: number; + comments_url: string; + created_at: string; + events_url: string; + html_url: string; + id: number; + labels: Array; + labels_url: string; + locked: boolean; + milestone: IssuesGetResponseMilestone; + node_id: string; + number: number; + pull_request: IssuesGetResponsePullRequest; + repository_url: string; + state: string; + title: string; + updated_at: string; + url: string; + user: IssuesGetResponseUser; + }; + type IssuesCreateMilestoneResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesCreateMilestoneResponse = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: IssuesCreateMilestoneResponseCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type IssuesCreateLabelResponse = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesCreateCommentResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesCreateCommentResponse = { + body: string; + created_at: string; + html_url: string; + id: number; + node_id: string; + updated_at: string; + url: string; + user: IssuesCreateCommentResponseUser; + }; + type IssuesCreateResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesCreateResponsePullRequest = { + diff_url: string; + html_url: string; + patch_url: string; + url: string; + }; + type IssuesCreateResponseMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesCreateResponseMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: IssuesCreateResponseMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type IssuesCreateResponseLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesCreateResponseClosedBy = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesCreateResponseAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesCreateResponseAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesCreateResponse = { + active_lock_reason: string; + assignee: IssuesCreateResponseAssignee; + assignees: Array; + body: string; + closed_at: null; + closed_by: IssuesCreateResponseClosedBy; + comments: number; + comments_url: string; + created_at: string; + events_url: string; + html_url: string; + id: number; + labels: Array; + labels_url: string; + locked: boolean; + milestone: IssuesCreateResponseMilestone; + node_id: string; + number: number; + pull_request: IssuesCreateResponsePullRequest; + repository_url: string; + state: string; + title: string; + updated_at: string; + url: string; + user: IssuesCreateResponseUser; + }; + type IssuesAddLabelsResponseItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesAddAssigneesResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesAddAssigneesResponsePullRequest = { + diff_url: string; + html_url: string; + patch_url: string; + url: string; + }; + type IssuesAddAssigneesResponseMilestoneCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesAddAssigneesResponseMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: IssuesAddAssigneesResponseMilestoneCreator; + description: string; + due_on: string; + html_url: string; + id: number; + labels_url: string; + node_id: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; + url: string; + }; + type IssuesAddAssigneesResponseLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; + }; + type IssuesAddAssigneesResponseAssigneesItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesAddAssigneesResponseAssignee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type IssuesAddAssigneesResponse = { + active_lock_reason: string; + assignee: IssuesAddAssigneesResponseAssignee; + assignees: Array; + body: string; + closed_at: null; + comments: number; + comments_url: string; + created_at: string; + events_url: string; + html_url: string; + id: number; + labels: Array; + labels_url: string; + locked: boolean; + milestone: IssuesAddAssigneesResponseMilestone; + node_id: string; + number: number; + pull_request: IssuesAddAssigneesResponsePullRequest; + repository_url: string; + state: string; + title: string; + updated_at: string; + url: string; + user: IssuesAddAssigneesResponseUser; + }; + type InteractionsGetRestrictionsForRepoResponse = { + expires_at: string; + limit: string; + origin: string; + }; + type InteractionsGetRestrictionsForOrgResponse = { + expires_at: string; + limit: string; + origin: string; + }; + type InteractionsAddOrUpdateRestrictionsForRepoResponse = { + expires_at: string; + limit: string; + origin: string; + }; + type InteractionsAddOrUpdateRestrictionsForOrgResponse = { + expires_at: string; + limit: string; + origin: string; + }; + type GitignoreGetTemplateResponse = { name: string; source: string }; + type GitUpdateRefResponseObject = { sha: string; type: string; url: string }; + type GitUpdateRefResponse = { + node_id: string; + object: GitUpdateRefResponseObject; + ref: string; + url: string; + }; + type GitListMatchingRefsResponseItemObject = { + sha: string; + type: string; + url: string; + }; + type GitListMatchingRefsResponseItem = { + node_id: string; + object: GitListMatchingRefsResponseItemObject; + ref: string; + url: string; + }; + type GitGetTagResponseVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; + }; + type GitGetTagResponseTagger = { date: string; email: string; name: string }; + type GitGetTagResponseObject = { sha: string; type: string; url: string }; + type GitGetTagResponse = { + message: string; + node_id: string; + object: GitGetTagResponseObject; + sha: string; + tag: string; + tagger: GitGetTagResponseTagger; + url: string; + verification: GitGetTagResponseVerification; + }; + type GitGetRefResponseObject = { sha: string; type: string; url: string }; + type GitGetRefResponse = { + node_id: string; + object: GitGetRefResponseObject; + ref: string; + url: string; + }; + type GitGetCommitResponseVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; + }; + type GitGetCommitResponseTree = { sha: string; url: string }; + type GitGetCommitResponseParentsItem = { sha: string; url: string }; + type GitGetCommitResponseCommitter = { + date: string; + email: string; + name: string; + }; + type GitGetCommitResponseAuthor = { + date: string; + email: string; + name: string; + }; + type GitGetCommitResponse = { + author: GitGetCommitResponseAuthor; + committer: GitGetCommitResponseCommitter; + message: string; + parents: Array; + sha: string; + tree: GitGetCommitResponseTree; + url: string; + verification: GitGetCommitResponseVerification; + }; + type GitGetBlobResponse = { + content: string; + encoding: string; + sha: string; + size: number; + url: string; + }; + type GitCreateTreeResponseTreeItem = { + mode: string; + path: string; + sha: string; + size: number; + type: string; + url: string; + }; + type GitCreateTreeResponse = { + sha: string; + tree: Array; + url: string; + }; + type GitCreateTagResponseVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; + }; + type GitCreateTagResponseTagger = { + date: string; + email: string; + name: string; + }; + type GitCreateTagResponseObject = { sha: string; type: string; url: string }; + type GitCreateTagResponse = { + message: string; + node_id: string; + object: GitCreateTagResponseObject; + sha: string; + tag: string; + tagger: GitCreateTagResponseTagger; + url: string; + verification: GitCreateTagResponseVerification; + }; + type GitCreateRefResponseObject = { sha: string; type: string; url: string }; + type GitCreateRefResponse = { + node_id: string; + object: GitCreateRefResponseObject; + ref: string; + url: string; + }; + type GitCreateCommitResponseVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; + }; + type GitCreateCommitResponseTree = { sha: string; url: string }; + type GitCreateCommitResponseParentsItem = { sha: string; url: string }; + type GitCreateCommitResponseCommitter = { + date: string; + email: string; + name: string; + }; + type GitCreateCommitResponseAuthor = { + date: string; + email: string; + name: string; + }; + type GitCreateCommitResponse = { + author: GitCreateCommitResponseAuthor; + committer: GitCreateCommitResponseCommitter; + message: string; + node_id: string; + parents: Array; + sha: string; + tree: GitCreateCommitResponseTree; + url: string; + verification: GitCreateCommitResponseVerification; + }; + type GitCreateBlobResponse = { sha: string; url: string }; + type GistsUpdateCommentResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsUpdateCommentResponse = { + body: string; + created_at: string; + id: number; + node_id: string; + updated_at: string; + url: string; + user: GistsUpdateCommentResponseUser; + }; + type GistsUpdateResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsUpdateResponseHistoryItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsUpdateResponseHistoryItemChangeStatus = { + additions: number; + deletions: number; + total: number; + }; + type GistsUpdateResponseHistoryItem = { + change_status: GistsUpdateResponseHistoryItemChangeStatus; + committed_at: string; + url: string; + user: GistsUpdateResponseHistoryItemUser; + version: string; + }; + type GistsUpdateResponseForksItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsUpdateResponseForksItem = { + created_at: string; + id: string; + updated_at: string; + url: string; + user: GistsUpdateResponseForksItemUser; + }; + type GistsUpdateResponseFilesNewFileTxt = { + content: string; + filename: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + type: string; + }; + type GistsUpdateResponseFilesHelloWorldRb = { + content: string; + filename: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + type: string; + }; + type GistsUpdateResponseFilesHelloWorldPy = { + content: string; + filename: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + type: string; + }; + type GistsUpdateResponseFilesHelloWorldMd = { + content: string; + filename: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + type: string; + }; + type GistsUpdateResponseFiles = { + "hello_world.md": GistsUpdateResponseFilesHelloWorldMd; + "hello_world.py": GistsUpdateResponseFilesHelloWorldPy; + "hello_world.rb": GistsUpdateResponseFilesHelloWorldRb; + "new_file.txt": GistsUpdateResponseFilesNewFileTxt; + }; + type GistsUpdateResponse = { + comments: number; + comments_url: string; + commits_url: string; + created_at: string; + description: string; + files: GistsUpdateResponseFiles; + forks: Array; + forks_url: string; + git_pull_url: string; + git_push_url: string; + history: Array; + html_url: string; + id: string; + node_id: string; + owner: GistsUpdateResponseOwner; + public: boolean; + truncated: boolean; + updated_at: string; + url: string; + user: null; + }; + type GistsListStarredResponseItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsListStarredResponseItemFilesHelloWorldRb = { + filename: string; + language: string; + raw_url: string; + size: number; + type: string; + }; + type GistsListStarredResponseItemFiles = { + "hello_world.rb": GistsListStarredResponseItemFilesHelloWorldRb; + }; + type GistsListStarredResponseItem = { + comments: number; + comments_url: string; + commits_url: string; + created_at: string; + description: string; + files: GistsListStarredResponseItemFiles; + forks_url: string; + git_pull_url: string; + git_push_url: string; + html_url: string; + id: string; + node_id: string; + owner: GistsListStarredResponseItemOwner; + public: boolean; + truncated: boolean; + updated_at: string; + url: string; + user: null; + }; + type GistsListPublicForUserResponseItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsListPublicForUserResponseItemFilesHelloWorldRb = { + filename: string; + language: string; + raw_url: string; + size: number; + type: string; + }; + type GistsListPublicForUserResponseItemFiles = { + "hello_world.rb": GistsListPublicForUserResponseItemFilesHelloWorldRb; + }; + type GistsListPublicForUserResponseItem = { + comments: number; + comments_url: string; + commits_url: string; + created_at: string; + description: string; + files: GistsListPublicForUserResponseItemFiles; + forks_url: string; + git_pull_url: string; + git_push_url: string; + html_url: string; + id: string; + node_id: string; + owner: GistsListPublicForUserResponseItemOwner; + public: boolean; + truncated: boolean; + updated_at: string; + url: string; + user: null; + }; + type GistsListPublicResponseItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsListPublicResponseItemFilesHelloWorldRb = { + filename: string; + language: string; + raw_url: string; + size: number; + type: string; + }; + type GistsListPublicResponseItemFiles = { + "hello_world.rb": GistsListPublicResponseItemFilesHelloWorldRb; + }; + type GistsListPublicResponseItem = { + comments: number; + comments_url: string; + commits_url: string; + created_at: string; + description: string; + files: GistsListPublicResponseItemFiles; + forks_url: string; + git_pull_url: string; + git_push_url: string; + html_url: string; + id: string; + node_id: string; + owner: GistsListPublicResponseItemOwner; + public: boolean; + truncated: boolean; + updated_at: string; + url: string; + user: null; + }; + type GistsListForksResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsListForksResponseItem = { + created_at: string; + id: string; + updated_at: string; + url: string; + user: GistsListForksResponseItemUser; + }; + type GistsListCommitsResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsListCommitsResponseItemChangeStatus = { + additions: number; + deletions: number; + total: number; + }; + type GistsListCommitsResponseItem = { + change_status: GistsListCommitsResponseItemChangeStatus; + committed_at: string; + url: string; + user: GistsListCommitsResponseItemUser; + version: string; + }; + type GistsListCommentsResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsListCommentsResponseItem = { + body: string; + created_at: string; + id: number; + node_id: string; + updated_at: string; + url: string; + user: GistsListCommentsResponseItemUser; + }; + type GistsListResponseItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsListResponseItemFilesHelloWorldRb = { + filename: string; + language: string; + raw_url: string; + size: number; + type: string; + }; + type GistsListResponseItemFiles = { + "hello_world.rb": GistsListResponseItemFilesHelloWorldRb; + }; + type GistsListResponseItem = { + comments: number; + comments_url: string; + commits_url: string; + created_at: string; + description: string; + files: GistsListResponseItemFiles; + forks_url: string; + git_pull_url: string; + git_push_url: string; + html_url: string; + id: string; + node_id: string; + owner: GistsListResponseItemOwner; + public: boolean; + truncated: boolean; + updated_at: string; + url: string; + user: null; + }; + type GistsGetRevisionResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsGetRevisionResponseHistoryItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsGetRevisionResponseHistoryItemChangeStatus = { + additions: number; + deletions: number; + total: number; + }; + type GistsGetRevisionResponseHistoryItem = { + change_status: GistsGetRevisionResponseHistoryItemChangeStatus; + committed_at: string; + url: string; + user: GistsGetRevisionResponseHistoryItemUser; + version: string; + }; + type GistsGetRevisionResponseForksItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsGetRevisionResponseForksItem = { + created_at: string; + id: string; + updated_at: string; + url: string; + user: GistsGetRevisionResponseForksItemUser; + }; + type GistsGetRevisionResponseFilesHelloWorldRubyTxt = { + content: string; + filename: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + type: string; + }; + type GistsGetRevisionResponseFilesHelloWorldPythonTxt = { + content: string; + filename: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + type: string; + }; + type GistsGetRevisionResponseFilesHelloWorldRb = { + content: string; + filename: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + type: string; + }; + type GistsGetRevisionResponseFilesHelloWorldPy = { + content: string; + filename: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + type: string; + }; + type GistsGetRevisionResponseFiles = { + "hello_world.py": GistsGetRevisionResponseFilesHelloWorldPy; + "hello_world.rb": GistsGetRevisionResponseFilesHelloWorldRb; + "hello_world_python.txt": GistsGetRevisionResponseFilesHelloWorldPythonTxt; + "hello_world_ruby.txt": GistsGetRevisionResponseFilesHelloWorldRubyTxt; + }; + type GistsGetRevisionResponse = { + comments: number; + comments_url: string; + commits_url: string; + created_at: string; + description: string; + files: GistsGetRevisionResponseFiles; + forks: Array; + forks_url: string; + git_pull_url: string; + git_push_url: string; + history: Array; + html_url: string; + id: string; + node_id: string; + owner: GistsGetRevisionResponseOwner; + public: boolean; + truncated: boolean; + updated_at: string; + url: string; + user: null; + }; + type GistsGetCommentResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsGetCommentResponse = { + body: string; + created_at: string; + id: number; + node_id: string; + updated_at: string; + url: string; + user: GistsGetCommentResponseUser; + }; + type GistsGetResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsGetResponseHistoryItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsGetResponseHistoryItemChangeStatus = { + additions: number; + deletions: number; + total: number; + }; + type GistsGetResponseHistoryItem = { + change_status: GistsGetResponseHistoryItemChangeStatus; + committed_at: string; + url: string; + user: GistsGetResponseHistoryItemUser; + version: string; + }; + type GistsGetResponseForksItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsGetResponseForksItem = { + created_at: string; + id: string; + updated_at: string; + url: string; + user: GistsGetResponseForksItemUser; + }; + type GistsGetResponseFilesHelloWorldRubyTxt = { + content: string; + filename: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + type: string; + }; + type GistsGetResponseFilesHelloWorldPythonTxt = { + content: string; + filename: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + type: string; + }; + type GistsGetResponseFilesHelloWorldRb = { + content: string; + filename: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + type: string; + }; + type GistsGetResponseFilesHelloWorldPy = { + content: string; + filename: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + type: string; + }; + type GistsGetResponseFiles = { + "hello_world.py": GistsGetResponseFilesHelloWorldPy; + "hello_world.rb": GistsGetResponseFilesHelloWorldRb; + "hello_world_python.txt": GistsGetResponseFilesHelloWorldPythonTxt; + "hello_world_ruby.txt": GistsGetResponseFilesHelloWorldRubyTxt; + }; + type GistsGetResponse = { + comments: number; + comments_url: string; + commits_url: string; + created_at: string; + description: string; + files: GistsGetResponseFiles; + forks: Array; + forks_url: string; + git_pull_url: string; + git_push_url: string; + history: Array; + html_url: string; + id: string; + node_id: string; + owner: GistsGetResponseOwner; + public: boolean; + truncated: boolean; + updated_at: string; + url: string; + user: null; + }; + type GistsForkResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsForkResponseFilesHelloWorldRb = { + filename: string; + language: string; + raw_url: string; + size: number; + type: string; + }; + type GistsForkResponseFiles = { + "hello_world.rb": GistsForkResponseFilesHelloWorldRb; + }; + type GistsForkResponse = { + comments: number; + comments_url: string; + commits_url: string; + created_at: string; + description: string; + files: GistsForkResponseFiles; + forks_url: string; + git_pull_url: string; + git_push_url: string; + html_url: string; + id: string; + node_id: string; + owner: GistsForkResponseOwner; + public: boolean; + truncated: boolean; + updated_at: string; + url: string; + user: null; + }; + type GistsCreateCommentResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsCreateCommentResponse = { + body: string; + created_at: string; + id: number; + node_id: string; + updated_at: string; + url: string; + user: GistsCreateCommentResponseUser; + }; + type GistsCreateResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsCreateResponseHistoryItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsCreateResponseHistoryItemChangeStatus = { + additions: number; + deletions: number; + total: number; + }; + type GistsCreateResponseHistoryItem = { + change_status: GistsCreateResponseHistoryItemChangeStatus; + committed_at: string; + url: string; + user: GistsCreateResponseHistoryItemUser; + version: string; + }; + type GistsCreateResponseForksItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type GistsCreateResponseForksItem = { + created_at: string; + id: string; + updated_at: string; + url: string; + user: GistsCreateResponseForksItemUser; + }; + type GistsCreateResponseFilesHelloWorldRubyTxt = { + content: string; + filename: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + type: string; + }; + type GistsCreateResponseFilesHelloWorldPythonTxt = { + content: string; + filename: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + type: string; + }; + type GistsCreateResponseFilesHelloWorldRb = { + content: string; + filename: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + type: string; + }; + type GistsCreateResponseFilesHelloWorldPy = { + content: string; + filename: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + type: string; + }; + type GistsCreateResponseFiles = { + "hello_world.py": GistsCreateResponseFilesHelloWorldPy; + "hello_world.rb": GistsCreateResponseFilesHelloWorldRb; + "hello_world_python.txt": GistsCreateResponseFilesHelloWorldPythonTxt; + "hello_world_ruby.txt": GistsCreateResponseFilesHelloWorldRubyTxt; + }; + type GistsCreateResponse = { + comments: number; + comments_url: string; + commits_url: string; + created_at: string; + description: string; + files: GistsCreateResponseFiles; + forks: Array; + forks_url: string; + git_pull_url: string; + git_push_url: string; + history: Array; + html_url: string; + id: string; + node_id: string; + owner: GistsCreateResponseOwner; + public: boolean; + truncated: boolean; + updated_at: string; + url: string; + user: null; + }; + type CodesOfConductListConductCodesResponseItem = { + key: string; + name: string; + url: string; + }; + type CodesOfConductGetForRepoResponse = { + body: string; + key: string; + name: string; + url: string; + }; + type CodesOfConductGetConductCodeResponse = { + body: string; + key: string; + name: string; + url: string; + }; + type ChecksUpdateResponsePullRequestsItemHeadRepo = { + id: number; + name: string; + url: string; + }; + type ChecksUpdateResponsePullRequestsItemHead = { + ref: string; + repo: ChecksUpdateResponsePullRequestsItemHeadRepo; + sha: string; + }; + type ChecksUpdateResponsePullRequestsItemBaseRepo = { + id: number; + name: string; + url: string; + }; + type ChecksUpdateResponsePullRequestsItemBase = { + ref: string; + repo: ChecksUpdateResponsePullRequestsItemBaseRepo; + sha: string; + }; + type ChecksUpdateResponsePullRequestsItem = { + base: ChecksUpdateResponsePullRequestsItemBase; + head: ChecksUpdateResponsePullRequestsItemHead; + id: number; + number: number; + url: string; + }; + type ChecksUpdateResponseOutput = { + annotations_count: number; + annotations_url: string; + summary: string; + text: string; + title: string; + }; + type ChecksUpdateResponseCheckSuite = { id: number }; + type ChecksUpdateResponseAppPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type ChecksUpdateResponseAppOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type ChecksUpdateResponseApp = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ChecksUpdateResponseAppOwner; + permissions: ChecksUpdateResponseAppPermissions; + slug: string; + updated_at: string; + }; + type ChecksUpdateResponse = { + app: ChecksUpdateResponseApp; + check_suite: ChecksUpdateResponseCheckSuite; + completed_at: string; + conclusion: string; + details_url: string; + external_id: string; + head_sha: string; + html_url: string; + id: number; + name: string; + node_id: string; + output: ChecksUpdateResponseOutput; + pull_requests: Array; + started_at: string; + status: string; + url: string; + }; + type ChecksSetSuitesPreferencesResponseRepositoryPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ChecksSetSuitesPreferencesResponseRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ChecksSetSuitesPreferencesResponseRepository = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ChecksSetSuitesPreferencesResponseRepositoryOwner; + permissions: ChecksSetSuitesPreferencesResponseRepositoryPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type ChecksSetSuitesPreferencesResponsePreferencesAutoTriggerChecksItem = { + app_id: number; + setting: boolean; + }; + type ChecksSetSuitesPreferencesResponsePreferences = { + auto_trigger_checks: Array< + ChecksSetSuitesPreferencesResponsePreferencesAutoTriggerChecksItem + >; + }; + type ChecksSetSuitesPreferencesResponse = { + preferences: ChecksSetSuitesPreferencesResponsePreferences; + repository: ChecksSetSuitesPreferencesResponseRepository; + }; + type ChecksListSuitesForRefResponseCheckSuitesItemRepositoryPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ChecksListSuitesForRefResponseCheckSuitesItemRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ChecksListSuitesForRefResponseCheckSuitesItemRepository = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ChecksListSuitesForRefResponseCheckSuitesItemRepositoryOwner; + permissions: ChecksListSuitesForRefResponseCheckSuitesItemRepositoryPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type ChecksListSuitesForRefResponseCheckSuitesItemAppPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type ChecksListSuitesForRefResponseCheckSuitesItemAppOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type ChecksListSuitesForRefResponseCheckSuitesItemApp = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ChecksListSuitesForRefResponseCheckSuitesItemAppOwner; + permissions: ChecksListSuitesForRefResponseCheckSuitesItemAppPermissions; + slug: string; + updated_at: string; + }; + type ChecksListSuitesForRefResponseCheckSuitesItem = { + after: string; + app: ChecksListSuitesForRefResponseCheckSuitesItemApp; + before: string; + conclusion: string; + head_branch: string; + head_sha: string; + id: number; + node_id: string; + pull_requests: Array; + repository: ChecksListSuitesForRefResponseCheckSuitesItemRepository; + status: string; + url: string; + }; + type ChecksListSuitesForRefResponse = { + check_suites: Array; + total_count: number; + }; + type ChecksListForSuiteResponseCheckRunsItemPullRequestsItemHeadRepo = { + id: number; + name: string; + url: string; + }; + type ChecksListForSuiteResponseCheckRunsItemPullRequestsItemHead = { + ref: string; + repo: ChecksListForSuiteResponseCheckRunsItemPullRequestsItemHeadRepo; + sha: string; + }; + type ChecksListForSuiteResponseCheckRunsItemPullRequestsItemBaseRepo = { + id: number; + name: string; + url: string; + }; + type ChecksListForSuiteResponseCheckRunsItemPullRequestsItemBase = { + ref: string; + repo: ChecksListForSuiteResponseCheckRunsItemPullRequestsItemBaseRepo; + sha: string; + }; + type ChecksListForSuiteResponseCheckRunsItemPullRequestsItem = { + base: ChecksListForSuiteResponseCheckRunsItemPullRequestsItemBase; + head: ChecksListForSuiteResponseCheckRunsItemPullRequestsItemHead; + id: number; + number: number; + url: string; + }; + type ChecksListForSuiteResponseCheckRunsItemOutput = { + annotations_count: number; + annotations_url: string; + summary: string; + text: string; + title: string; + }; + type ChecksListForSuiteResponseCheckRunsItemCheckSuite = { id: number }; + type ChecksListForSuiteResponseCheckRunsItemAppPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type ChecksListForSuiteResponseCheckRunsItemAppOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type ChecksListForSuiteResponseCheckRunsItemApp = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ChecksListForSuiteResponseCheckRunsItemAppOwner; + permissions: ChecksListForSuiteResponseCheckRunsItemAppPermissions; + slug: string; + updated_at: string; + }; + type ChecksListForSuiteResponseCheckRunsItem = { + app: ChecksListForSuiteResponseCheckRunsItemApp; + check_suite: ChecksListForSuiteResponseCheckRunsItemCheckSuite; + completed_at: string; + conclusion: string; + details_url: string; + external_id: string; + head_sha: string; + html_url: string; + id: number; + name: string; + node_id: string; + output: ChecksListForSuiteResponseCheckRunsItemOutput; + pull_requests: Array< + ChecksListForSuiteResponseCheckRunsItemPullRequestsItem + >; + started_at: string; + status: string; + url: string; + }; + type ChecksListForSuiteResponse = { + check_runs: Array; + total_count: number; + }; + type ChecksListForRefResponseCheckRunsItemPullRequestsItemHeadRepo = { + id: number; + name: string; + url: string; + }; + type ChecksListForRefResponseCheckRunsItemPullRequestsItemHead = { + ref: string; + repo: ChecksListForRefResponseCheckRunsItemPullRequestsItemHeadRepo; + sha: string; + }; + type ChecksListForRefResponseCheckRunsItemPullRequestsItemBaseRepo = { + id: number; + name: string; + url: string; + }; + type ChecksListForRefResponseCheckRunsItemPullRequestsItemBase = { + ref: string; + repo: ChecksListForRefResponseCheckRunsItemPullRequestsItemBaseRepo; + sha: string; + }; + type ChecksListForRefResponseCheckRunsItemPullRequestsItem = { + base: ChecksListForRefResponseCheckRunsItemPullRequestsItemBase; + head: ChecksListForRefResponseCheckRunsItemPullRequestsItemHead; + id: number; + number: number; + url: string; + }; + type ChecksListForRefResponseCheckRunsItemOutput = { + annotations_count: number; + annotations_url: string; + summary: string; + text: string; + title: string; + }; + type ChecksListForRefResponseCheckRunsItemCheckSuite = { id: number }; + type ChecksListForRefResponseCheckRunsItemAppPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type ChecksListForRefResponseCheckRunsItemAppOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type ChecksListForRefResponseCheckRunsItemApp = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ChecksListForRefResponseCheckRunsItemAppOwner; + permissions: ChecksListForRefResponseCheckRunsItemAppPermissions; + slug: string; + updated_at: string; + }; + type ChecksListForRefResponseCheckRunsItem = { + app: ChecksListForRefResponseCheckRunsItemApp; + check_suite: ChecksListForRefResponseCheckRunsItemCheckSuite; + completed_at: string; + conclusion: string; + details_url: string; + external_id: string; + head_sha: string; + html_url: string; + id: number; + name: string; + node_id: string; + output: ChecksListForRefResponseCheckRunsItemOutput; + pull_requests: Array; + started_at: string; + status: string; + url: string; + }; + type ChecksListForRefResponse = { + check_runs: Array; + total_count: number; + }; + type ChecksListAnnotationsResponseItem = { + annotation_level: string; + end_column: number; + end_line: number; + message: string; + path: string; + raw_details: string; + start_column: number; + start_line: number; + title: string; + }; + type ChecksGetSuiteResponseRepositoryPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ChecksGetSuiteResponseRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ChecksGetSuiteResponseRepository = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ChecksGetSuiteResponseRepositoryOwner; + permissions: ChecksGetSuiteResponseRepositoryPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type ChecksGetSuiteResponseAppPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type ChecksGetSuiteResponseAppOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type ChecksGetSuiteResponseApp = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ChecksGetSuiteResponseAppOwner; + permissions: ChecksGetSuiteResponseAppPermissions; + slug: string; + updated_at: string; + }; + type ChecksGetSuiteResponse = { + after: string; + app: ChecksGetSuiteResponseApp; + before: string; + conclusion: string; + head_branch: string; + head_sha: string; + id: number; + node_id: string; + pull_requests: Array; + repository: ChecksGetSuiteResponseRepository; + status: string; + url: string; + }; + type ChecksGetResponsePullRequestsItemHeadRepo = { + id: number; + name: string; + url: string; + }; + type ChecksGetResponsePullRequestsItemHead = { + ref: string; + repo: ChecksGetResponsePullRequestsItemHeadRepo; + sha: string; + }; + type ChecksGetResponsePullRequestsItemBaseRepo = { + id: number; + name: string; + url: string; + }; + type ChecksGetResponsePullRequestsItemBase = { + ref: string; + repo: ChecksGetResponsePullRequestsItemBaseRepo; + sha: string; + }; + type ChecksGetResponsePullRequestsItem = { + base: ChecksGetResponsePullRequestsItemBase; + head: ChecksGetResponsePullRequestsItemHead; + id: number; + number: number; + url: string; + }; + type ChecksGetResponseOutput = { + annotations_count: number; + annotations_url: string; + summary: string; + text: string; + title: string; + }; + type ChecksGetResponseCheckSuite = { id: number }; + type ChecksGetResponseAppPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type ChecksGetResponseAppOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type ChecksGetResponseApp = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ChecksGetResponseAppOwner; + permissions: ChecksGetResponseAppPermissions; + slug: string; + updated_at: string; + }; + type ChecksGetResponse = { + app: ChecksGetResponseApp; + check_suite: ChecksGetResponseCheckSuite; + completed_at: string; + conclusion: string; + details_url: string; + external_id: string; + head_sha: string; + html_url: string; + id: number; + name: string; + node_id: string; + output: ChecksGetResponseOutput; + pull_requests: Array; + started_at: string; + status: string; + url: string; + }; + type ChecksCreateSuiteResponseRepositoryPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ChecksCreateSuiteResponseRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ChecksCreateSuiteResponseRepository = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ChecksCreateSuiteResponseRepositoryOwner; + permissions: ChecksCreateSuiteResponseRepositoryPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type ChecksCreateSuiteResponseAppPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type ChecksCreateSuiteResponseAppOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type ChecksCreateSuiteResponseApp = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ChecksCreateSuiteResponseAppOwner; + permissions: ChecksCreateSuiteResponseAppPermissions; + slug: string; + updated_at: string; + }; + type ChecksCreateSuiteResponse = { + after: string; + app: ChecksCreateSuiteResponseApp; + before: string; + conclusion: string; + head_branch: string; + head_sha: string; + id: number; + node_id: string; + pull_requests: Array; + repository: ChecksCreateSuiteResponseRepository; + status: string; + url: string; + }; + type ChecksCreateResponsePullRequestsItemHeadRepo = { + id: number; + name: string; + url: string; + }; + type ChecksCreateResponsePullRequestsItemHead = { + ref: string; + repo: ChecksCreateResponsePullRequestsItemHeadRepo; + sha: string; + }; + type ChecksCreateResponsePullRequestsItemBaseRepo = { + id: number; + name: string; + url: string; + }; + type ChecksCreateResponsePullRequestsItemBase = { + ref: string; + repo: ChecksCreateResponsePullRequestsItemBaseRepo; + sha: string; + }; + type ChecksCreateResponsePullRequestsItem = { + base: ChecksCreateResponsePullRequestsItemBase; + head: ChecksCreateResponsePullRequestsItemHead; + id: number; + number: number; + url: string; + }; + type ChecksCreateResponseOutput = { + summary: string; + text: string; + title: string; + annotations_count?: number; + annotations_url?: string; + }; + type ChecksCreateResponseCheckSuite = { id: number }; + type ChecksCreateResponseAppPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type ChecksCreateResponseAppOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type ChecksCreateResponseApp = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ChecksCreateResponseAppOwner; + permissions: ChecksCreateResponseAppPermissions; + slug: string; + updated_at: string; + }; + type ChecksCreateResponse = { + app: ChecksCreateResponseApp; + check_suite: ChecksCreateResponseCheckSuite; + completed_at: null | string; + conclusion: null | string; + details_url: string; + external_id: string; + head_sha: string; + html_url: string; + id: number; + name: string; + node_id: string; + output: ChecksCreateResponseOutput; + pull_requests: Array; + started_at: string; + status: string; + url: string; + }; + type AppsResetTokenResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type AppsResetTokenResponseApp = { + client_id: string; + name: string; + url: string; + }; + type AppsResetTokenResponse = { + app: AppsResetTokenResponseApp; + created_at: string; + fingerprint: string; + hashed_token: string; + id: number; + note: string; + note_url: string; + scopes: Array; + token: string; + token_last_eight: string; + updated_at: string; + url: string; + user: AppsResetTokenResponseUser; + }; + type AppsResetAuthorizationResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type AppsResetAuthorizationResponseApp = { + client_id: string; + name: string; + url: string; + }; + type AppsResetAuthorizationResponse = { + app: AppsResetAuthorizationResponseApp; + created_at: string; + fingerprint: string; + hashed_token: string; + id: number; + note: string; + note_url: string; + scopes: Array; + token: string; + token_last_eight: string; + updated_at: string; + url: string; + user: AppsResetAuthorizationResponseUser; + }; + type AppsListReposResponseRepositoriesItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type AppsListReposResponseRepositoriesItem = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: AppsListReposResponseRepositoriesItemOwner; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type AppsListReposResponse = { + repositories: Array; + total_count: number; + }; + type AppsListPlansStubbedResponseItem = { + accounts_url: string; + bullets: Array; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + number: number; + price_model: string; + state: string; + unit_name: null; + url: string; + yearly_price_in_cents: number; + }; + type AppsListPlansResponseItem = { + accounts_url: string; + bullets: Array; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + number: number; + price_model: string; + state: string; + unit_name: null; + url: string; + yearly_price_in_cents: number; + }; + type AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponseItemPlan = { + accounts_url: string; + bullets: Array; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + number: number; + price_model: string; + state: string; + unit_name: null; + url: string; + yearly_price_in_cents: number; + }; + type AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponseItemAccount = { + email: null; + id: number; + login: string; + organization_billing_email: string; + type: string; + url: string; + }; + type AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponseItem = { + account: AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponseItemAccount; + billing_cycle: string; + free_trial_ends_on: string; + next_billing_date: string; + on_free_trial: boolean; + plan: AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponseItemPlan; + unit_count: null; + updated_at: string; + }; + type AppsListMarketplacePurchasesForAuthenticatedUserResponseItemPlan = { + accounts_url: string; + bullets: Array; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + number: number; + price_model: string; + state: string; + unit_name: null; + url: string; + yearly_price_in_cents: number; + }; + type AppsListMarketplacePurchasesForAuthenticatedUserResponseItemAccount = { + email: null; + id: number; + login: string; + organization_billing_email: string; + type: string; + url: string; + }; + type AppsListMarketplacePurchasesForAuthenticatedUserResponseItem = { + account: AppsListMarketplacePurchasesForAuthenticatedUserResponseItemAccount; + billing_cycle: string; + free_trial_ends_on: string; + next_billing_date: string; + on_free_trial: boolean; + plan: AppsListMarketplacePurchasesForAuthenticatedUserResponseItemPlan; + unit_count: null; + updated_at: string; + }; + type AppsListInstallationsForAuthenticatedUserResponseInstallationsItemPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type AppsListInstallationsForAuthenticatedUserResponseInstallationsItemAccount = { + avatar_url: string; + description?: string; + events_url: string; + hooks_url?: string; + id: number; + issues_url?: string; + login: string; + members_url?: string; + node_id: string; + public_members_url?: string; + repos_url: string; + url: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + gravatar_id?: string; + html_url?: string; + organizations_url?: string; + received_events_url?: string; + site_admin?: boolean; + starred_url?: string; + subscriptions_url?: string; + type?: string; + }; + type AppsListInstallationsForAuthenticatedUserResponseInstallationsItem = { + access_tokens_url: string; + account: AppsListInstallationsForAuthenticatedUserResponseInstallationsItemAccount; + app_id: number; + events: Array; + html_url: string; + id: number; + permissions: AppsListInstallationsForAuthenticatedUserResponseInstallationsItemPermissions; + repositories_url: string; + single_file_name: string; + target_id: number; + target_type: string; + }; + type AppsListInstallationsForAuthenticatedUserResponse = { + installations: Array< + AppsListInstallationsForAuthenticatedUserResponseInstallationsItem + >; + total_count: number; + }; + type AppsListInstallationsResponseItemPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type AppsListInstallationsResponseItemAccount = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type AppsListInstallationsResponseItem = { + access_tokens_url: string; + account: AppsListInstallationsResponseItemAccount; + app_id: number; + events: Array; + html_url: string; + id: number; + permissions: AppsListInstallationsResponseItemPermissions; + repositories_url: string; + repository_selection: string; + single_file_name: string; + target_id: number; + target_type: string; + }; + type AppsListInstallationReposForAuthenticatedUserResponseRepositoriesItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type AppsListInstallationReposForAuthenticatedUserResponseRepositoriesItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type AppsListInstallationReposForAuthenticatedUserResponseRepositoriesItem = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: AppsListInstallationReposForAuthenticatedUserResponseRepositoriesItemOwner; + permissions: AppsListInstallationReposForAuthenticatedUserResponseRepositoriesItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type AppsListInstallationReposForAuthenticatedUserResponse = { + repositories: Array< + AppsListInstallationReposForAuthenticatedUserResponseRepositoriesItem + >; + total_count: number; + }; + type AppsListAccountsUserOrOrgOnPlanStubbedResponseItemMarketplacePurchasePlan = { + accounts_url: string; + bullets: Array; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + number: number; + price_model: string; + state: string; + unit_name: null; + url: string; + yearly_price_in_cents: number; + }; + type AppsListAccountsUserOrOrgOnPlanStubbedResponseItemMarketplacePurchase = { + billing_cycle: string; + free_trial_ends_on: string; + next_billing_date: string; + on_free_trial: boolean; + plan: AppsListAccountsUserOrOrgOnPlanStubbedResponseItemMarketplacePurchasePlan; + unit_count: null; + updated_at: string; + }; + type AppsListAccountsUserOrOrgOnPlanStubbedResponseItemMarketplacePendingChangePlan = { + accounts_url: string; + bullets: Array; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + number: number; + price_model: string; + state: string; + unit_name: null; + url: string; + yearly_price_in_cents: number; + }; + type AppsListAccountsUserOrOrgOnPlanStubbedResponseItemMarketplacePendingChange = { + effective_date: string; + id: number; + plan: AppsListAccountsUserOrOrgOnPlanStubbedResponseItemMarketplacePendingChangePlan; + unit_count: null; + }; + type AppsListAccountsUserOrOrgOnPlanStubbedResponseItem = { + email: null; + id: number; + login: string; + marketplace_pending_change: AppsListAccountsUserOrOrgOnPlanStubbedResponseItemMarketplacePendingChange; + marketplace_purchase: AppsListAccountsUserOrOrgOnPlanStubbedResponseItemMarketplacePurchase; + organization_billing_email: string; + type: string; + url: string; + }; + type AppsListAccountsUserOrOrgOnPlanResponseItemMarketplacePurchasePlan = { + accounts_url: string; + bullets: Array; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + number: number; + price_model: string; + state: string; + unit_name: null; + url: string; + yearly_price_in_cents: number; + }; + type AppsListAccountsUserOrOrgOnPlanResponseItemMarketplacePurchase = { + billing_cycle: string; + free_trial_ends_on: string; + next_billing_date: string; + on_free_trial: boolean; + plan: AppsListAccountsUserOrOrgOnPlanResponseItemMarketplacePurchasePlan; + unit_count: null; + updated_at: string; + }; + type AppsListAccountsUserOrOrgOnPlanResponseItemMarketplacePendingChangePlan = { + accounts_url: string; + bullets: Array; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + number: number; + price_model: string; + state: string; + unit_name: null; + url: string; + yearly_price_in_cents: number; + }; + type AppsListAccountsUserOrOrgOnPlanResponseItemMarketplacePendingChange = { + effective_date: string; + id: number; + plan: AppsListAccountsUserOrOrgOnPlanResponseItemMarketplacePendingChangePlan; + unit_count: null; + }; + type AppsListAccountsUserOrOrgOnPlanResponseItem = { + email: null; + id: number; + login: string; + marketplace_pending_change: AppsListAccountsUserOrOrgOnPlanResponseItemMarketplacePendingChange; + marketplace_purchase: AppsListAccountsUserOrOrgOnPlanResponseItemMarketplacePurchase; + organization_billing_email: string; + type: string; + url: string; + }; + type AppsGetUserInstallationResponsePermissions = { + checks: string; + contents: string; + metadata: string; + }; + type AppsGetUserInstallationResponseAccount = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type AppsGetUserInstallationResponse = { + access_tokens_url: string; + account: AppsGetUserInstallationResponseAccount; + app_id: number; + created_at: string; + events: Array; + html_url: string; + id: number; + permissions: AppsGetUserInstallationResponsePermissions; + repositories_url: string; + repository_selection: string; + single_file_name: null; + target_id: number; + target_type: string; + updated_at: string; + }; + type AppsGetRepoInstallationResponsePermissions = { + checks: string; + contents: string; + metadata: string; + }; + type AppsGetRepoInstallationResponseAccount = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type AppsGetRepoInstallationResponse = { + access_tokens_url: string; + account: AppsGetRepoInstallationResponseAccount; + app_id: number; + created_at: string; + events: Array; + html_url: string; + id: number; + permissions: AppsGetRepoInstallationResponsePermissions; + repositories_url: string; + repository_selection: string; + single_file_name: null; + target_id: number; + target_type: string; + updated_at: string; + }; + type AppsGetOrgInstallationResponsePermissions = { + checks: string; + contents: string; + metadata: string; + }; + type AppsGetOrgInstallationResponseAccount = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type AppsGetOrgInstallationResponse = { + access_tokens_url: string; + account: AppsGetOrgInstallationResponseAccount; + app_id: number; + created_at: string; + events: Array; + html_url: string; + id: number; + permissions: AppsGetOrgInstallationResponsePermissions; + repositories_url: string; + repository_selection: string; + single_file_name: null; + target_id: number; + target_type: string; + updated_at: string; + }; + type AppsGetInstallationResponsePermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type AppsGetInstallationResponseAccount = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type AppsGetInstallationResponse = { + access_tokens_url: string; + account: AppsGetInstallationResponseAccount; + app_id: number; + events: Array; + html_url: string; + id: number; + permissions: AppsGetInstallationResponsePermissions; + repositories_url: string; + repository_selection: string; + single_file_name: string; + target_id: number; + target_type: string; + }; + type AppsGetBySlugResponsePermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type AppsGetBySlugResponseOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type AppsGetBySlugResponse = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: AppsGetBySlugResponseOwner; + permissions: AppsGetBySlugResponsePermissions; + slug: string; + updated_at: string; + }; + type AppsGetAuthenticatedResponsePermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; + }; + type AppsGetAuthenticatedResponseOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; + }; + type AppsGetAuthenticatedResponse = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + installations_count: number; + name: string; + node_id: string; + owner: AppsGetAuthenticatedResponseOwner; + permissions: AppsGetAuthenticatedResponsePermissions; + slug: string; + updated_at: string; + }; + type AppsFindUserInstallationResponsePermissions = { + checks: string; + contents: string; + metadata: string; + }; + type AppsFindUserInstallationResponseAccount = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type AppsFindUserInstallationResponse = { + access_tokens_url: string; + account: AppsFindUserInstallationResponseAccount; + app_id: number; + created_at: string; + events: Array; + html_url: string; + id: number; + permissions: AppsFindUserInstallationResponsePermissions; + repositories_url: string; + repository_selection: string; + single_file_name: null; + target_id: number; + target_type: string; + updated_at: string; + }; + type AppsFindRepoInstallationResponsePermissions = { + checks: string; + contents: string; + metadata: string; + }; + type AppsFindRepoInstallationResponseAccount = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type AppsFindRepoInstallationResponse = { + access_tokens_url: string; + account: AppsFindRepoInstallationResponseAccount; + app_id: number; + created_at: string; + events: Array; + html_url: string; + id: number; + permissions: AppsFindRepoInstallationResponsePermissions; + repositories_url: string; + repository_selection: string; + single_file_name: null; + target_id: number; + target_type: string; + updated_at: string; + }; + type AppsFindOrgInstallationResponsePermissions = { + checks: string; + contents: string; + metadata: string; + }; + type AppsFindOrgInstallationResponseAccount = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type AppsFindOrgInstallationResponse = { + access_tokens_url: string; + account: AppsFindOrgInstallationResponseAccount; + app_id: number; + created_at: string; + events: Array; + html_url: string; + id: number; + permissions: AppsFindOrgInstallationResponsePermissions; + repositories_url: string; + repository_selection: string; + single_file_name: null; + target_id: number; + target_type: string; + updated_at: string; + }; + type AppsCreateInstallationTokenResponseRepositoriesItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type AppsCreateInstallationTokenResponseRepositoriesItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type AppsCreateInstallationTokenResponseRepositoriesItem = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: AppsCreateInstallationTokenResponseRepositoriesItemOwner; + permissions: AppsCreateInstallationTokenResponseRepositoriesItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type AppsCreateInstallationTokenResponsePermissions = { + contents: string; + issues: string; + }; + type AppsCreateInstallationTokenResponse = { + expires_at: string; + permissions: AppsCreateInstallationTokenResponsePermissions; + repositories: Array; + token: string; + }; + type AppsCreateFromManifestResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type AppsCreateFromManifestResponse = { + client_id: string; + client_secret: string; + created_at: string; + description: null; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: AppsCreateFromManifestResponseOwner; + pem: string; + updated_at: string; + webhook_secret: string; + }; + type AppsCreateContentAttachmentResponse = { + body: string; + id: number; + title: string; + }; + type AppsCheckTokenResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type AppsCheckTokenResponseApp = { + client_id: string; + name: string; + url: string; + }; + type AppsCheckTokenResponse = { + app: AppsCheckTokenResponseApp; + created_at: string; + fingerprint: string; + hashed_token: string; + id: number; + note: string; + note_url: string; + scopes: Array; + token: string; + token_last_eight: string; + updated_at: string; + url: string; + user: AppsCheckTokenResponseUser; + }; + type AppsCheckAuthorizationResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type AppsCheckAuthorizationResponseApp = { + client_id: string; + name: string; + url: string; + }; + type AppsCheckAuthorizationResponse = { + app: AppsCheckAuthorizationResponseApp; + created_at: string; + fingerprint: string; + hashed_token: string; + id: number; + note: string; + note_url: string; + scopes: Array; + token: string; + token_last_eight: string; + updated_at: string; + url: string; + user: AppsCheckAuthorizationResponseUser; + }; + type AppsCheckAccountIsAssociatedWithAnyStubbedResponseMarketplacePurchasePlan = { + accounts_url: string; + bullets: Array; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + number: number; + price_model: string; + state: string; + unit_name: null; + url: string; + yearly_price_in_cents: number; + }; + type AppsCheckAccountIsAssociatedWithAnyStubbedResponseMarketplacePurchase = { + billing_cycle: string; + free_trial_ends_on: string; + next_billing_date: string; + on_free_trial: boolean; + plan: AppsCheckAccountIsAssociatedWithAnyStubbedResponseMarketplacePurchasePlan; + unit_count: null; + updated_at: string; + }; + type AppsCheckAccountIsAssociatedWithAnyStubbedResponseMarketplacePendingChangePlan = { + accounts_url: string; + bullets: Array; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + number: number; + price_model: string; + state: string; + unit_name: null; + url: string; + yearly_price_in_cents: number; + }; + type AppsCheckAccountIsAssociatedWithAnyStubbedResponseMarketplacePendingChange = { + effective_date: string; + id: number; + plan: AppsCheckAccountIsAssociatedWithAnyStubbedResponseMarketplacePendingChangePlan; + unit_count: null; + }; + type AppsCheckAccountIsAssociatedWithAnyStubbedResponse = { + email: null; + id: number; + login: string; + marketplace_pending_change: AppsCheckAccountIsAssociatedWithAnyStubbedResponseMarketplacePendingChange; + marketplace_purchase: AppsCheckAccountIsAssociatedWithAnyStubbedResponseMarketplacePurchase; + organization_billing_email: string; + type: string; + url: string; + }; + type AppsCheckAccountIsAssociatedWithAnyResponseMarketplacePurchasePlan = { + accounts_url: string; + bullets: Array; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + number: number; + price_model: string; + state: string; + unit_name: null; + url: string; + yearly_price_in_cents: number; + }; + type AppsCheckAccountIsAssociatedWithAnyResponseMarketplacePurchase = { + billing_cycle: string; + free_trial_ends_on: string; + next_billing_date: string; + on_free_trial: boolean; + plan: AppsCheckAccountIsAssociatedWithAnyResponseMarketplacePurchasePlan; + unit_count: null; + updated_at: string; + }; + type AppsCheckAccountIsAssociatedWithAnyResponseMarketplacePendingChangePlan = { + accounts_url: string; + bullets: Array; + description: string; + has_free_trial: boolean; + id: number; + monthly_price_in_cents: number; + name: string; + number: number; + price_model: string; + state: string; + unit_name: null; + url: string; + yearly_price_in_cents: number; + }; + type AppsCheckAccountIsAssociatedWithAnyResponseMarketplacePendingChange = { + effective_date: string; + id: number; + plan: AppsCheckAccountIsAssociatedWithAnyResponseMarketplacePendingChangePlan; + unit_count: null; + }; + type AppsCheckAccountIsAssociatedWithAnyResponse = { + email: null; + id: number; + login: string; + marketplace_pending_change: AppsCheckAccountIsAssociatedWithAnyResponseMarketplacePendingChange; + marketplace_purchase: AppsCheckAccountIsAssociatedWithAnyResponseMarketplacePurchase; + organization_billing_email: string; + type: string; + url: string; + }; + type ActivitySetThreadSubscriptionResponse = { + created_at: string; + ignored: boolean; + reason: null; + subscribed: boolean; + thread_url: string; + url: string; + }; + type ActivitySetRepoSubscriptionResponse = { + created_at: string; + ignored: boolean; + reason: null; + repository_url: string; + subscribed: boolean; + url: string; + }; + type ActivityListWatchersForRepoResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ActivityListWatchedReposForAuthenticatedUserResponseItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ActivityListWatchedReposForAuthenticatedUserResponseItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ActivityListWatchedReposForAuthenticatedUserResponseItemLicense = { + key: string; + name: string; + node_id: string; + spdx_id: string; + url: string; + }; + type ActivityListWatchedReposForAuthenticatedUserResponseItem = { + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + license: ActivityListWatchedReposForAuthenticatedUserResponseItemLicense; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ActivityListWatchedReposForAuthenticatedUserResponseItemOwner; + permissions: ActivityListWatchedReposForAuthenticatedUserResponseItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type ActivityListStargazersForRepoResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ActivityListReposWatchedByUserResponseItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ActivityListReposWatchedByUserResponseItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ActivityListReposWatchedByUserResponseItemLicense = { + key: string; + name: string; + node_id: string; + spdx_id: string; + url: string; + }; + type ActivityListReposWatchedByUserResponseItem = { + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + license: ActivityListReposWatchedByUserResponseItemLicense; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ActivityListReposWatchedByUserResponseItemOwner; + permissions: ActivityListReposWatchedByUserResponseItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type ActivityListReposStarredByUserResponseItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ActivityListReposStarredByUserResponseItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ActivityListReposStarredByUserResponseItem = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ActivityListReposStarredByUserResponseItemOwner; + permissions: ActivityListReposStarredByUserResponseItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type ActivityListReposStarredByAuthenticatedUserResponseItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; + }; + type ActivityListReposStarredByAuthenticatedUserResponseItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ActivityListReposStarredByAuthenticatedUserResponseItem = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ActivityListReposStarredByAuthenticatedUserResponseItemOwner; + permissions: ActivityListReposStarredByAuthenticatedUserResponseItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + watchers_count: number; + }; + type ActivityListNotificationsForRepoResponseItemSubject = { + latest_comment_url: string; + title: string; + type: string; + url: string; + }; + type ActivityListNotificationsForRepoResponseItemRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ActivityListNotificationsForRepoResponseItemRepository = { + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + description: string; + downloads_url: string; + events_url: string; + fork: boolean; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + html_url: string; + id: number; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + name: string; + node_id: string; + notifications_url: string; + owner: ActivityListNotificationsForRepoResponseItemRepositoryOwner; + private: boolean; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + url: string; + }; + type ActivityListNotificationsForRepoResponseItem = { + id: string; + last_read_at: string; + reason: string; + repository: ActivityListNotificationsForRepoResponseItemRepository; + subject: ActivityListNotificationsForRepoResponseItemSubject; + unread: boolean; + updated_at: string; + url: string; + }; + type ActivityListNotificationsResponseItemSubject = { + latest_comment_url: string; + title: string; + type: string; + url: string; + }; + type ActivityListNotificationsResponseItemRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ActivityListNotificationsResponseItemRepository = { + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + description: string; + downloads_url: string; + events_url: string; + fork: boolean; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + html_url: string; + id: number; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + name: string; + node_id: string; + notifications_url: string; + owner: ActivityListNotificationsResponseItemRepositoryOwner; + private: boolean; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + url: string; + }; + type ActivityListNotificationsResponseItem = { + id: string; + last_read_at: string; + reason: string; + repository: ActivityListNotificationsResponseItemRepository; + subject: ActivityListNotificationsResponseItemSubject; + unread: boolean; + updated_at: string; + url: string; + }; + type ActivityListFeedsResponseLinksUser = { href: string; type: string }; + type ActivityListFeedsResponseLinksTimeline = { href: string; type: string }; + type ActivityListFeedsResponseLinksSecurityAdvisories = { + href: string; + type: string; + }; + type ActivityListFeedsResponseLinksCurrentUserPublic = { + href: string; + type: string; + }; + type ActivityListFeedsResponseLinksCurrentUserOrganizationsItem = { + href: string; + type: string; + }; + type ActivityListFeedsResponseLinksCurrentUserOrganization = { + href: string; + type: string; + }; + type ActivityListFeedsResponseLinksCurrentUserActor = { + href: string; + type: string; + }; + type ActivityListFeedsResponseLinksCurrentUser = { + href: string; + type: string; + }; + type ActivityListFeedsResponseLinks = { + current_user: ActivityListFeedsResponseLinksCurrentUser; + current_user_actor: ActivityListFeedsResponseLinksCurrentUserActor; + current_user_organization: ActivityListFeedsResponseLinksCurrentUserOrganization; + current_user_organizations: Array< + ActivityListFeedsResponseLinksCurrentUserOrganizationsItem + >; + current_user_public: ActivityListFeedsResponseLinksCurrentUserPublic; + security_advisories: ActivityListFeedsResponseLinksSecurityAdvisories; + timeline: ActivityListFeedsResponseLinksTimeline; + user: ActivityListFeedsResponseLinksUser; + }; + type ActivityListFeedsResponse = { + _links: ActivityListFeedsResponseLinks; + current_user_actor_url: string; + current_user_organization_url: string; + current_user_organization_urls: Array; + current_user_public_url: string; + current_user_url: string; + security_advisories_url: string; + timeline_url: string; + user_url: string; + }; + type ActivityGetThreadSubscriptionResponse = { + created_at: string; + ignored: boolean; + reason: null; + subscribed: boolean; + thread_url: string; + url: string; + }; + type ActivityGetThreadResponseSubject = { + latest_comment_url: string; + title: string; + type: string; + url: string; + }; + type ActivityGetThreadResponseRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + }; + type ActivityGetThreadResponseRepository = { + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + description: string; + downloads_url: string; + events_url: string; + fork: boolean; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + html_url: string; + id: number; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + name: string; + node_id: string; + notifications_url: string; + owner: ActivityGetThreadResponseRepositoryOwner; + private: boolean; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + url: string; + }; + type ActivityGetThreadResponse = { + id: string; + last_read_at: string; + reason: string; + repository: ActivityGetThreadResponseRepository; + subject: ActivityGetThreadResponseSubject; + unread: boolean; + updated_at: string; + url: string; + }; + type ActivityGetRepoSubscriptionResponse = { + created_at: string; + ignored: boolean; + reason: null; + repository_url: string; + subscribed: boolean; + url: string; + }; + type ActivityListNotificationsResponse = Array< + ActivityListNotificationsResponseItem + >; + type ActivityListNotificationsForRepoResponse = Array< + ActivityListNotificationsForRepoResponseItem + >; + type ActivityListReposStarredByAuthenticatedUserResponse = Array< + ActivityListReposStarredByAuthenticatedUserResponseItem + >; + type ActivityListReposStarredByUserResponse = Array< + ActivityListReposStarredByUserResponseItem + >; + type ActivityListReposWatchedByUserResponse = Array< + ActivityListReposWatchedByUserResponseItem + >; + type ActivityListStargazersForRepoResponse = Array< + ActivityListStargazersForRepoResponseItem + >; + type ActivityListWatchedReposForAuthenticatedUserResponse = Array< + ActivityListWatchedReposForAuthenticatedUserResponseItem + >; + type ActivityListWatchersForRepoResponse = Array< + ActivityListWatchersForRepoResponseItem + >; + type AppsListAccountsUserOrOrgOnPlanResponse = Array< + AppsListAccountsUserOrOrgOnPlanResponseItem + >; + type AppsListAccountsUserOrOrgOnPlanStubbedResponse = Array< + AppsListAccountsUserOrOrgOnPlanStubbedResponseItem + >; + type AppsListInstallationsResponse = Array; + type AppsListMarketplacePurchasesForAuthenticatedUserResponse = Array< + AppsListMarketplacePurchasesForAuthenticatedUserResponseItem + >; + type AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponse = Array< + AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponseItem + >; + type AppsListPlansResponse = Array; + type AppsListPlansStubbedResponse = Array; + type ChecksListAnnotationsResponse = Array; + type CodesOfConductListConductCodesResponse = Array< + CodesOfConductListConductCodesResponseItem + >; + type GistsListResponse = Array; + type GistsListCommentsResponse = Array; + type GistsListCommitsResponse = Array; + type GistsListForksResponse = Array; + type GistsListPublicResponse = Array; + type GistsListPublicForUserResponse = Array< + GistsListPublicForUserResponseItem + >; + type GistsListStarredResponse = Array; + type GitListMatchingRefsResponse = Array; + type GitignoreListTemplatesResponse = Array; + type IssuesAddLabelsResponse = Array; + type IssuesListResponse = Array; + type IssuesListAssigneesResponse = Array; + type IssuesListCommentsResponse = Array; + type IssuesListCommentsForRepoResponse = Array< + IssuesListCommentsForRepoResponseItem + >; + type IssuesListEventsResponse = Array; + type IssuesListEventsForRepoResponse = Array< + IssuesListEventsForRepoResponseItem + >; + type IssuesListEventsForTimelineResponse = Array< + IssuesListEventsForTimelineResponseItem + >; + type IssuesListForAuthenticatedUserResponse = Array< + IssuesListForAuthenticatedUserResponseItem + >; + type IssuesListForOrgResponse = Array; + type IssuesListForRepoResponse = Array; + type IssuesListLabelsForMilestoneResponse = Array< + IssuesListLabelsForMilestoneResponseItem + >; + type IssuesListLabelsForRepoResponse = Array< + IssuesListLabelsForRepoResponseItem + >; + type IssuesListLabelsOnIssueResponse = Array< + IssuesListLabelsOnIssueResponseItem + >; + type IssuesListMilestonesForRepoResponse = Array< + IssuesListMilestonesForRepoResponseItem + >; + type IssuesRemoveLabelResponse = Array; + type IssuesReplaceLabelsResponse = Array; + type LicensesListResponse = Array; + type LicensesListCommonlyUsedResponse = Array< + LicensesListCommonlyUsedResponseItem + >; + type MigrationsGetCommitAuthorsResponse = Array< + MigrationsGetCommitAuthorsResponseItem + >; + type MigrationsGetLargeFilesResponse = Array< + MigrationsGetLargeFilesResponseItem + >; + type MigrationsListForAuthenticatedUserResponse = Array< + MigrationsListForAuthenticatedUserResponseItem + >; + type MigrationsListForOrgResponse = Array; + type OauthAuthorizationsListAuthorizationsResponse = Array< + OauthAuthorizationsListAuthorizationsResponseItem + >; + type OauthAuthorizationsListGrantsResponse = Array< + OauthAuthorizationsListGrantsResponseItem + >; + type OrgsListResponse = Array; + type OrgsListBlockedUsersResponse = Array; + type OrgsListForAuthenticatedUserResponse = Array< + OrgsListForAuthenticatedUserResponseItem + >; + type OrgsListForUserResponse = Array; + type OrgsListHooksResponse = Array; + type OrgsListInvitationTeamsResponse = Array< + OrgsListInvitationTeamsResponseItem + >; + type OrgsListMembersResponse = Array; + type OrgsListMembershipsResponse = Array; + type OrgsListOutsideCollaboratorsResponse = Array< + OrgsListOutsideCollaboratorsResponseItem + >; + type OrgsListPendingInvitationsResponse = Array< + OrgsListPendingInvitationsResponseItem + >; + type OrgsListPublicMembersResponse = Array; + type ProjectsListCardsResponse = Array; + type ProjectsListCollaboratorsResponse = Array< + ProjectsListCollaboratorsResponseItem + >; + type ProjectsListColumnsResponse = Array; + type ProjectsListForOrgResponse = Array; + type ProjectsListForRepoResponse = Array; + type ProjectsListForUserResponse = Array; + type PullsGetCommentsForReviewResponse = Array< + PullsGetCommentsForReviewResponseItem + >; + type PullsListResponse = Array; + type PullsListCommentsResponse = Array; + type PullsListCommentsForRepoResponse = Array< + PullsListCommentsForRepoResponseItem + >; + type PullsListCommitsResponse = Array; + type PullsListFilesResponse = Array; + type PullsListReviewsResponse = Array; + type ReactionsListForCommitCommentResponse = Array< + ReactionsListForCommitCommentResponseItem + >; + type ReactionsListForIssueResponse = Array; + type ReactionsListForIssueCommentResponse = Array< + ReactionsListForIssueCommentResponseItem + >; + type ReactionsListForPullRequestReviewCommentResponse = Array< + ReactionsListForPullRequestReviewCommentResponseItem + >; + type ReactionsListForTeamDiscussionResponse = Array< + ReactionsListForTeamDiscussionResponseItem + >; + type ReactionsListForTeamDiscussionCommentResponse = Array< + ReactionsListForTeamDiscussionCommentResponseItem + >; + type ReposAddProtectedBranchAppRestrictionsResponse = Array< + ReposAddProtectedBranchAppRestrictionsResponseItem + >; + type ReposAddProtectedBranchRequiredStatusChecksContextsResponse = Array< + string + >; + type ReposAddProtectedBranchTeamRestrictionsResponse = Array< + ReposAddProtectedBranchTeamRestrictionsResponseItem + >; + type ReposAddProtectedBranchUserRestrictionsResponse = Array< + ReposAddProtectedBranchUserRestrictionsResponseItem + >; + type ReposGetAppsWithAccessToProtectedBranchResponse = Array< + ReposGetAppsWithAccessToProtectedBranchResponseItem + >; + type ReposGetCodeFrequencyStatsResponse = Array>; + type ReposGetCommitActivityStatsResponse = Array< + ReposGetCommitActivityStatsResponseItem + >; + type ReposGetContributorsStatsResponse = Array< + ReposGetContributorsStatsResponseItem + >; + type ReposGetPunchCardStatsResponse = Array>; + type ReposGetTeamsWithAccessToProtectedBranchResponse = Array< + ReposGetTeamsWithAccessToProtectedBranchResponseItem + >; + type ReposGetTopPathsResponse = Array; + type ReposGetTopReferrersResponse = Array; + type ReposGetUsersWithAccessToProtectedBranchResponse = Array< + ReposGetUsersWithAccessToProtectedBranchResponseItem + >; + type ReposListAppsWithAccessToProtectedBranchResponse = Array< + ReposListAppsWithAccessToProtectedBranchResponseItem + >; + type ReposListAssetsForReleaseResponse = Array< + ReposListAssetsForReleaseResponseItem + >; + type ReposListBranchesResponse = Array; + type ReposListBranchesForHeadCommitResponse = Array< + ReposListBranchesForHeadCommitResponseItem + >; + type ReposListCollaboratorsResponse = Array< + ReposListCollaboratorsResponseItem + >; + type ReposListCommentsForCommitResponse = Array< + ReposListCommentsForCommitResponseItem + >; + type ReposListCommitCommentsResponse = Array< + ReposListCommitCommentsResponseItem + >; + type ReposListCommitsResponse = Array; + type ReposListContributorsResponse = Array; + type ReposListDeployKeysResponse = Array; + type ReposListDeploymentStatusesResponse = Array< + ReposListDeploymentStatusesResponseItem + >; + type ReposListDeploymentsResponse = Array; + type ReposListDownloadsResponse = Array; + type ReposListForOrgResponse = Array; + type ReposListForksResponse = Array; + type ReposListHooksResponse = Array; + type ReposListInvitationsResponse = Array; + type ReposListInvitationsForAuthenticatedUserResponse = Array< + ReposListInvitationsForAuthenticatedUserResponseItem + >; + type ReposListPagesBuildsResponse = Array; + type ReposListProtectedBranchRequiredStatusChecksContextsResponse = Array< + string + >; + type ReposListProtectedBranchTeamRestrictionsResponse = Array< + ReposListProtectedBranchTeamRestrictionsResponseItem + >; + type ReposListProtectedBranchUserRestrictionsResponse = Array< + ReposListProtectedBranchUserRestrictionsResponseItem + >; + type ReposListPublicResponse = Array; + type ReposListPullRequestsAssociatedWithCommitResponse = Array< + ReposListPullRequestsAssociatedWithCommitResponseItem + >; + type ReposListReleasesResponse = Array; + type ReposListStatusesForRefResponse = Array< + ReposListStatusesForRefResponseItem + >; + type ReposListTagsResponse = Array; + type ReposListTeamsResponse = Array; + type ReposListTeamsWithAccessToProtectedBranchResponse = Array< + ReposListTeamsWithAccessToProtectedBranchResponseItem + >; + type ReposListUsersWithAccessToProtectedBranchResponse = Array< + ReposListUsersWithAccessToProtectedBranchResponseItem + >; + type ReposRemoveProtectedBranchAppRestrictionsResponse = Array< + ReposRemoveProtectedBranchAppRestrictionsResponseItem + >; + type ReposRemoveProtectedBranchRequiredStatusChecksContextsResponse = Array< + string + >; + type ReposRemoveProtectedBranchTeamRestrictionsResponse = Array< + ReposRemoveProtectedBranchTeamRestrictionsResponseItem + >; + type ReposRemoveProtectedBranchUserRestrictionsResponse = Array< + ReposRemoveProtectedBranchUserRestrictionsResponseItem + >; + type ReposReplaceProtectedBranchAppRestrictionsResponse = Array< + ReposReplaceProtectedBranchAppRestrictionsResponseItem + >; + type ReposReplaceProtectedBranchRequiredStatusChecksContextsResponse = Array< + string + >; + type ReposReplaceProtectedBranchTeamRestrictionsResponse = Array< + ReposReplaceProtectedBranchTeamRestrictionsResponseItem + >; + type ReposReplaceProtectedBranchUserRestrictionsResponse = Array< + ReposReplaceProtectedBranchUserRestrictionsResponseItem + >; + type TeamsListResponse = Array; + type TeamsListChildResponse = Array; + type TeamsListDiscussionCommentsResponse = Array< + TeamsListDiscussionCommentsResponseItem + >; + type TeamsListDiscussionsResponse = Array; + type TeamsListForAuthenticatedUserResponse = Array< + TeamsListForAuthenticatedUserResponseItem + >; + type TeamsListMembersResponse = Array; + type TeamsListPendingInvitationsResponse = Array< + TeamsListPendingInvitationsResponseItem + >; + type TeamsListProjectsResponse = Array; + type TeamsListReposResponse = Array; + type UsersAddEmailsResponse = Array; + type UsersListResponse = Array; + type UsersListBlockedResponse = Array; + type UsersListEmailsResponse = Array; + type UsersListFollowersForAuthenticatedUserResponse = Array< + UsersListFollowersForAuthenticatedUserResponseItem + >; + type UsersListFollowersForUserResponse = Array< + UsersListFollowersForUserResponseItem + >; + type UsersListFollowingForAuthenticatedUserResponse = Array< + UsersListFollowingForAuthenticatedUserResponseItem + >; + type UsersListFollowingForUserResponse = Array< + UsersListFollowingForUserResponseItem + >; + type UsersListGpgKeysResponse = Array; + type UsersListGpgKeysForUserResponse = Array< + UsersListGpgKeysForUserResponseItem + >; + type UsersListPublicEmailsResponse = Array; + type UsersListPublicKeysResponse = Array; + type UsersListPublicKeysForUserResponse = Array< + UsersListPublicKeysForUserResponseItem + >; + type UsersTogglePrimaryEmailVisibilityResponse = Array< + UsersTogglePrimaryEmailVisibilityResponseItem + >; + + // param types + export type ActivityCheckStarringRepoParams = { + owner: string; + + repo: string; + }; + export type ActivityDeleteRepoSubscriptionParams = { + owner: string; + + repo: string; + }; + export type ActivityDeleteThreadSubscriptionParams = { + thread_id: number; + }; + export type ActivityGetRepoSubscriptionParams = { + owner: string; + + repo: string; + }; + export type ActivityGetThreadParams = { + thread_id: number; + }; + export type ActivityGetThreadSubscriptionParams = { + thread_id: number; + }; + export type ActivityListEventsForOrgParams = { + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + username: string; + }; + export type ActivityListEventsForUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + username: string; + }; + export type ActivityListNotificationsParams = { + /** + * If `true`, show notifications marked as read. + */ + all?: boolean; + /** + * Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + before?: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * If `true`, only shows notifications in which the user is directly participating or mentioned. + */ + participating?: boolean; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + }; + export type ActivityListNotificationsForRepoParams = { + /** + * If `true`, show notifications marked as read. + */ + all?: boolean; + /** + * Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + before?: string; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * If `true`, only shows notifications in which the user is directly participating or mentioned. + */ + participating?: boolean; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + /** + * Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + }; + export type ActivityListPublicEventsParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type ActivityListPublicEventsForOrgParams = { + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type ActivityListPublicEventsForRepoNetworkParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ActivityListPublicEventsForUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + username: string; + }; + export type ActivityListReceivedEventsForUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + username: string; + }; + export type ActivityListReceivedPublicEventsForUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + username: string; + }; + export type ActivityListRepoEventsParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ActivityListReposStarredByAuthenticatedUserParams = { + /** + * One of `asc` (ascending) or `desc` (descending). + */ + direction?: "asc" | "desc"; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * One of `created` (when the repository was starred) or `updated` (when it was last pushed to). + */ + sort?: "created" | "updated"; + }; + export type ActivityListReposStarredByUserParams = { + /** + * One of `asc` (ascending) or `desc` (descending). + */ + direction?: "asc" | "desc"; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * One of `created` (when the repository was starred) or `updated` (when it was last pushed to). + */ + sort?: "created" | "updated"; + + username: string; + }; + export type ActivityListReposWatchedByUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + username: string; + }; + export type ActivityListStargazersForRepoParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ActivityListWatchedReposForAuthenticatedUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type ActivityListWatchersForRepoParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ActivityMarkAsReadParams = { + /** + * Describes the last point that notifications were checked. Anything updated since this time will not be updated. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + */ + last_read_at?: string; + }; + export type ActivityMarkNotificationsAsReadForRepoParams = { + /** + * Describes the last point that notifications were checked. Anything updated since this time will not be updated. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + */ + last_read_at?: string; + + owner: string; + + repo: string; + }; + export type ActivityMarkThreadAsReadParams = { + thread_id: number; + }; + export type ActivitySetRepoSubscriptionParams = { + /** + * Determines if all notifications should be blocked from this repository. + */ + ignored?: boolean; + + owner: string; + + repo: string; + /** + * Determines if notifications should be received from this repository. + */ + subscribed?: boolean; + }; + export type ActivitySetThreadSubscriptionParams = { + /** + * Unsubscribes and subscribes you to a conversation. Set `ignored` to `true` to block all notifications from this thread. + */ + ignored?: boolean; + + thread_id: number; + }; + export type ActivityStarRepoParams = { + owner: string; + + repo: string; + }; + export type ActivityUnstarRepoParams = { + owner: string; + + repo: string; + }; + export type AppsAddRepoToInstallationParams = { + installation_id: number; + + repository_id: number; + }; + export type AppsCheckAccountIsAssociatedWithAnyParams = { + account_id: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type AppsCheckAccountIsAssociatedWithAnyStubbedParams = { + account_id: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type AppsCheckAuthorizationParams = { + access_token: string; + + client_id: string; + }; + export type AppsCheckTokenParams = { + /** + * The OAuth access token used to authenticate to the GitHub API. + */ + access_token?: string; + + client_id: string; + }; + export type AppsCreateContentAttachmentParams = { + /** + * The body text of the content attachment displayed in the body or comment of an issue or pull request. This parameter supports markdown. + */ + body: string; + + content_reference_id: number; + /** + * The title of the content attachment displayed in the body or comment of an issue or pull request. + */ + title: string; + }; + export type AppsCreateFromManifestParams = { + code: string; + }; + export type AppsCreateInstallationTokenParams = { + installation_id: number; + /** + * The permissions granted to the access token. The permissions object includes the permission names and their access type. For a complete list of permissions and allowable values, see "[GitHub App permissions](https://developer.github.com/apps/building-github-apps/creating-github-apps-using-url-parameters/#github-app-permissions)." + */ + permissions?: AppsCreateInstallationTokenParamsPermissions; + /** + * The `id`s of the repositories that the installation token can access. Providing repository `id`s restricts the access of an installation token to specific repositories. You can use the "[List repositories](https://developer.github.com/v3/apps/installations/#list-repositories)" endpoint to get the `id` of all repositories that an installation can access. For example, you can select specific repositories when creating an installation token to restrict the number of repositories that can be cloned using the token. + */ + repository_ids?: number[]; + }; + export type AppsDeleteAuthorizationParams = { + /** + * The OAuth access token used to authenticate to the GitHub API. + */ + access_token?: string; + + client_id: string; + }; + export type AppsDeleteInstallationParams = { + installation_id: number; + }; + export type AppsDeleteTokenParams = { + /** + * The OAuth access token used to authenticate to the GitHub API. + */ + access_token?: string; + + client_id: string; + }; + export type AppsFindOrgInstallationParams = { + org: string; + }; + export type AppsFindRepoInstallationParams = { + owner: string; + + repo: string; + }; + export type AppsFindUserInstallationParams = { + username: string; + }; + export type AppsGetBySlugParams = { + app_slug: string; + }; + export type AppsGetInstallationParams = { + installation_id: number; + }; + export type AppsGetOrgInstallationParams = { + org: string; + }; + export type AppsGetRepoInstallationParams = { + owner: string; + + repo: string; + }; + export type AppsGetUserInstallationParams = { + username: string; + }; + export type AppsListAccountsUserOrOrgOnPlanParams = { + /** + * To return the oldest accounts first, set to `asc`. Can be one of `asc` or `desc`. Ignored without the `sort` parameter. + */ + direction?: "asc" | "desc"; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + plan_id: number; + /** + * Sorts the GitHub accounts by the date they were created or last updated. Can be one of `created` or `updated`. + */ + sort?: "created" | "updated"; + }; + export type AppsListAccountsUserOrOrgOnPlanStubbedParams = { + /** + * To return the oldest accounts first, set to `asc`. Can be one of `asc` or `desc`. Ignored without the `sort` parameter. + */ + direction?: "asc" | "desc"; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + plan_id: number; + /** + * Sorts the GitHub accounts by the date they were created or last updated. Can be one of `created` or `updated`. + */ + sort?: "created" | "updated"; + }; + export type AppsListInstallationReposForAuthenticatedUserParams = { + installation_id: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type AppsListInstallationsParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type AppsListInstallationsForAuthenticatedUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type AppsListMarketplacePurchasesForAuthenticatedUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type AppsListMarketplacePurchasesForAuthenticatedUserStubbedParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type AppsListPlansParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type AppsListPlansStubbedParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type AppsListReposParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type AppsRemoveRepoFromInstallationParams = { + installation_id: number; + + repository_id: number; + }; + export type AppsResetAuthorizationParams = { + access_token: string; + + client_id: string; + }; + export type AppsResetTokenParams = { + /** + * The OAuth access token used to authenticate to the GitHub API. + */ + access_token?: string; + + client_id: string; + }; + export type AppsRevokeAuthorizationForApplicationParams = { + access_token: string; + + client_id: string; + }; + export type AppsRevokeGrantForApplicationParams = { + access_token: string; + + client_id: string; + }; + export type ChecksCreateParams = { + /** + * Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the [`check_run.requested_action` webhook](https://developer.github.com/v3/activity/events/types/#checkrunevent) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://developer.github.com/v3/checks/runs/#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://developer.github.com/v3/checks/runs/#check-runs-and-requested-actions)." To learn more about check runs and requested actions, see "[Check runs and requested actions](https://developer.github.com/v3/checks/runs/#check-runs-and-requested-actions)." + */ + actions?: ChecksCreateParamsActions[]; + /** + * The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + completed_at?: string; + /** + * **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, or `action_required`. When the conclusion is `action_required`, additional details should be provided on the site specified by `details_url`. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. + */ + conclusion?: + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required"; + /** + * The URL of the integrator's site that has the full details of the check. + */ + details_url?: string; + /** + * A reference for the run on the integrator's system. + */ + external_id?: string; + /** + * The SHA of the commit. + */ + head_sha: string; + /** + * The name of the check. For example, "code-coverage". + */ + name: string; + /** + * Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://developer.github.com/v3/checks/runs/#output-object) description. + */ + output?: ChecksCreateParamsOutput; + + owner: string; + + repo: string; + /** + * The time that the check run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + started_at?: string; + /** + * The current status. Can be one of `queued`, `in_progress`, or `completed`. + */ + status?: "queued" | "in_progress" | "completed"; + }; + export type ChecksCreateSuiteParams = { + /** + * The sha of the head commit. + */ + head_sha: string; + + owner: string; + + repo: string; + }; + export type ChecksGetParams = { + check_run_id: number; + + owner: string; + + repo: string; + }; + export type ChecksGetSuiteParams = { + check_suite_id: number; + + owner: string; + + repo: string; + }; + export type ChecksListAnnotationsParams = { + check_run_id: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ChecksListForRefParams = { + /** + * Returns check runs with the specified `name`. + */ + check_name?: string; + /** + * Filters check runs by their `completed_at` timestamp. Can be one of `latest` (returning the most recent check runs) or `all`. + */ + filter?: "latest" | "all"; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + ref: string; + + repo: string; + /** + * Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. + */ + status?: "queued" | "in_progress" | "completed"; + }; + export type ChecksListForSuiteParams = { + /** + * Returns check runs with the specified `name`. + */ + check_name?: string; + + check_suite_id: number; + /** + * Filters check runs by their `completed_at` timestamp. Can be one of `latest` (returning the most recent check runs) or `all`. + */ + filter?: "latest" | "all"; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + /** + * Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. + */ + status?: "queued" | "in_progress" | "completed"; + }; + export type ChecksListSuitesForRefParams = { + /** + * Filters check suites by GitHub App `id`. + */ + app_id?: number; + /** + * Filters checks suites by the name of the [check run](https://developer.github.com/v3/checks/runs/). + */ + check_name?: string; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + ref: string; + + repo: string; + }; + export type ChecksRerequestSuiteParams = { + check_suite_id: number; + + owner: string; + + repo: string; + }; + export type ChecksSetSuitesPreferencesParams = { + /** + * Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the [`auto_trigger_checks` object](https://developer.github.com/v3/checks/suites/#auto_trigger_checks-object) description for details. + */ + auto_trigger_checks?: ChecksSetSuitesPreferencesParamsAutoTriggerChecks[]; + + owner: string; + + repo: string; + }; + export type ChecksUpdateParams = { + /** + * Possible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://developer.github.com/v3/checks/runs/#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://developer.github.com/v3/checks/runs/#check-runs-and-requested-actions)." + */ + actions?: ChecksUpdateParamsActions[]; + + check_run_id: number; + /** + * The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + completed_at?: string; + /** + * **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, or `action_required`. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. + */ + conclusion?: + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required"; + /** + * The URL of the integrator's site that has the full details of the check. + */ + details_url?: string; + /** + * A reference for the run on the integrator's system. + */ + external_id?: string; + /** + * The name of the check. For example, "code-coverage". + */ + name?: string; + /** + * Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://developer.github.com/v3/checks/runs/#output-object-1) description. + */ + output?: ChecksUpdateParamsOutput; + + owner: string; + + repo: string; + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + started_at?: string; + /** + * The current status. Can be one of `queued`, `in_progress`, or `completed`. + */ + status?: "queued" | "in_progress" | "completed"; + }; + export type CodesOfConductGetConductCodeParams = { + key: string; + }; + export type CodesOfConductGetForRepoParams = { + owner: string; + + repo: string; + }; + export type GistsCheckIsStarredParams = { + gist_id: string; + }; + export type GistsCreateParams = { + /** + * A descriptive name for this gist. + */ + description?: string; + /** + * The filenames and content of each file in the gist. The keys in the `files` object represent the filename and have the type `string`. + */ + files: GistsCreateParamsFiles; + /** + * When `true`, the gist will be public and available for anyone to see. + */ + public?: boolean; + }; + export type GistsCreateCommentParams = { + /** + * The comment text. + */ + body: string; + + gist_id: string; + }; + export type GistsDeleteParams = { + gist_id: string; + }; + export type GistsDeleteCommentParams = { + comment_id: number; + + gist_id: string; + }; + export type GistsForkParams = { + gist_id: string; + }; + export type GistsGetParams = { + gist_id: string; + }; + export type GistsGetCommentParams = { + comment_id: number; + + gist_id: string; + }; + export type GistsGetRevisionParams = { + gist_id: string; + + sha: string; + }; + export type GistsListParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned. + */ + since?: string; + }; + export type GistsListCommentsParams = { + gist_id: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type GistsListCommitsParams = { + gist_id: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type GistsListForksParams = { + gist_id: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type GistsListPublicParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned. + */ + since?: string; + }; + export type GistsListPublicForUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned. + */ + since?: string; + + username: string; + }; + export type GistsListStarredParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned. + */ + since?: string; + }; + export type GistsStarParams = { + gist_id: string; + }; + export type GistsUnstarParams = { + gist_id: string; + }; + export type GistsUpdateParams = { + /** + * A descriptive name for this gist. + */ + description?: string; + /** + * The filenames and content that make up this gist. + */ + files?: GistsUpdateParamsFiles; + + gist_id: string; + }; + export type GistsUpdateCommentParams = { + /** + * The comment text. + */ + body: string; + + comment_id: number; + + gist_id: string; + }; + export type GitCreateBlobParams = { + /** + * The new blob's content. + */ + content: string; + /** + * The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. + */ + encoding?: string; + + owner: string; + + repo: string; + }; + export type GitCreateCommitParams = { + /** + * Information about the author of the commit. By default, the `author` will be the authenticated user and the current date. See the `author` and `committer` object below for details. + */ + author?: GitCreateCommitParamsAuthor; + /** + * Information about the person who is making the commit. By default, `committer` will use the information set in `author`. See the `author` and `committer` object below for details. + */ + committer?: GitCreateCommitParamsCommitter; + /** + * The commit message + */ + message: string; + + owner: string; + /** + * The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. + */ + parents: string[]; + + repo: string; + /** + * The [PGP signature](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) of the commit. GitHub adds the signature to the `gpgsig` header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a `signature` parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to [use the command line](https://git-scm.com/book/id/v2/Git-Tools-Signing-Your-Work) to create signed commits. + */ + signature?: string; + /** + * The SHA of the tree object this commit points to + */ + tree: string; + }; + export type GitCreateRefParams = { + owner: string; + /** + * The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn't start with 'refs' and have at least two slashes, it will be rejected. + */ + ref: string; + + repo: string; + /** + * The SHA1 value for this reference. + */ + sha: string; + }; + export type GitCreateTagParams = { + /** + * The tag message. + */ + message: string; + /** + * The SHA of the git object this is tagging. + */ + object: string; + + owner: string; + + repo: string; + /** + * The tag's name. This is typically a version (e.g., "v0.0.1"). + */ + tag: string; + /** + * An object with information about the individual creating the tag. + */ + tagger?: GitCreateTagParamsTagger; + /** + * The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. + */ + type: "commit" | "tree" | "blob"; + }; + export type GitCreateTreeParams = { + /** + * The SHA1 of the tree you want to update with new data. If you don't set this, the commit will be created on top of everything; however, it will only contain your change, the rest of your files will show up as deleted. + */ + base_tree?: string; + + owner: string; + + repo: string; + /** + * Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. + */ + tree: GitCreateTreeParamsTree[]; + }; + export type GitDeleteRefParams = { + owner: string; + + ref: string; + + repo: string; + }; + export type GitGetBlobParams = { + file_sha: string; + + owner: string; + + repo: string; + }; + export type GitGetCommitParams = { + commit_sha: string; + + owner: string; + + repo: string; + }; + export type GitGetRefParams = { + owner: string; + + ref: string; + + repo: string; + }; + export type GitGetTagParams = { + owner: string; + + repo: string; + + tag_sha: string; + }; + export type GitGetTreeParams = { + owner: string; + + recursive?: "1"; + + repo: string; + + tree_sha: string; + }; + export type GitListMatchingRefsParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + ref: string; + + repo: string; + }; + export type GitListRefsParams = { + /** + * Filter by sub-namespace (reference prefix). Most commen examples would be `'heads/'` and `'tags/'` to retrieve branches or tags + */ + namespace?: string; + + owner: string; + + page?: number; + + per_page?: number; + + repo: string; + }; + export type GitUpdateRefParams = { + /** + * Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to `false` will make sure you're not overwriting work. + */ + force?: boolean; + + owner: string; + + ref: string; + + repo: string; + /** + * The SHA1 value to set this reference to + */ + sha: string; + }; + export type GitignoreGetTemplateParams = { + name: string; + }; + export type InteractionsAddOrUpdateRestrictionsForOrgParams = { + /** + * Specifies the group of GitHub users who can comment, open issues, or create pull requests in public repositories for the given organization. Must be one of: `existing_users`, `contributors_only`, or `collaborators_only`. + */ + limit: "existing_users" | "contributors_only" | "collaborators_only"; + + org: string; + }; + export type InteractionsAddOrUpdateRestrictionsForRepoParams = { + /** + * Specifies the group of GitHub users who can comment, open issues, or create pull requests for the given repository. Must be one of: `existing_users`, `contributors_only`, or `collaborators_only`. + */ + limit: "existing_users" | "contributors_only" | "collaborators_only"; + + owner: string; + + repo: string; + }; + export type InteractionsGetRestrictionsForOrgParams = { + org: string; + }; + export type InteractionsGetRestrictionsForRepoParams = { + owner: string; + + repo: string; + }; + export type InteractionsRemoveRestrictionsForOrgParams = { + org: string; + }; + export type InteractionsRemoveRestrictionsForRepoParams = { + owner: string; + + repo: string; + }; + export type IssuesAddAssigneesParamsDeprecatedNumber = { + /** + * Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._ + */ + assignees?: string[]; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + + repo: string; + }; + export type IssuesAddAssigneesParams = { + /** + * Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._ + */ + assignees?: string[]; + + issue_number: number; + + owner: string; + + repo: string; + }; + export type IssuesAddLabelsParamsDeprecatedNumber = { + /** + * The name of the label to add to the issue. Must contain at least one label. **Note:** Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. + */ + labels: string[]; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + + repo: string; + }; + export type IssuesAddLabelsParams = { + issue_number: number; + /** + * The name of the label to add to the issue. Must contain at least one label. **Note:** Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. + */ + labels: string[]; + + owner: string; + + repo: string; + }; + export type IssuesCheckAssigneeParams = { + assignee: string; + + owner: string; + + repo: string; + }; + export type IssuesCreateParamsDeprecatedAssignee = { + /** + * Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is deprecated.**_ + * @deprecated "assignee" parameter has been deprecated and will be removed in future + */ + assignee?: string; + /** + * Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ + */ + assignees?: string[]; + /** + * The contents of the issue. + */ + body?: string; + /** + * Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._ + */ + labels?: string[]; + /** + * The `number` of the milestone to associate this issue with. _NOTE: Only users with push access can set the milestone for new issues. The milestone is silently dropped otherwise._ + */ + milestone?: number; + + owner: string; + + repo: string; + /** + * The title of the issue. + */ + title: string; + }; + export type IssuesCreateParams = { + /** + * Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ + */ + assignees?: string[]; + /** + * The contents of the issue. + */ + body?: string; + /** + * Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._ + */ + labels?: string[]; + /** + * The `number` of the milestone to associate this issue with. _NOTE: Only users with push access can set the milestone for new issues. The milestone is silently dropped otherwise._ + */ + milestone?: number; + + owner: string; + + repo: string; + /** + * The title of the issue. + */ + title: string; + }; + export type IssuesCreateCommentParamsDeprecatedNumber = { + /** + * The contents of the comment. + */ + body: string; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + + repo: string; + }; + export type IssuesCreateCommentParams = { + /** + * The contents of the comment. + */ + body: string; + + issue_number: number; + + owner: string; + + repo: string; + }; + export type IssuesCreateLabelParams = { + /** + * The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. + */ + color: string; + /** + * A short description of the label. + */ + description?: string; + /** + * The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see [emoji-cheat-sheet.com](http://emoji-cheat-sheet.com/). + */ + name: string; + + owner: string; + + repo: string; + }; + export type IssuesCreateMilestoneParams = { + /** + * A description of the milestone. + */ + description?: string; + /** + * The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + due_on?: string; + + owner: string; + + repo: string; + /** + * The state of the milestone. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * The title of the milestone. + */ + title: string; + }; + export type IssuesDeleteCommentParams = { + comment_id: number; + + owner: string; + + repo: string; + }; + export type IssuesDeleteLabelParams = { + name: string; + + owner: string; + + repo: string; + }; + export type IssuesDeleteMilestoneParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "milestone_number" + */ + number: number; + + owner: string; + + repo: string; + }; + export type IssuesDeleteMilestoneParams = { + milestone_number: number; + + owner: string; + + repo: string; + }; + export type IssuesGetParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + + repo: string; + }; + export type IssuesGetParams = { + issue_number: number; + + owner: string; + + repo: string; + }; + export type IssuesGetCommentParams = { + comment_id: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type IssuesGetEventParams = { + event_id: number; + + owner: string; + + repo: string; + }; + export type IssuesGetLabelParams = { + name: string; + + owner: string; + + repo: string; + }; + export type IssuesGetMilestoneParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "milestone_number" + */ + number: number; + + owner: string; + + repo: string; + }; + export type IssuesGetMilestoneParams = { + milestone_number: number; + + owner: string; + + repo: string; + }; + export type IssuesListParams = { + /** + * The direction of the sort. Can be either `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Indicates which sorts of issues to return. Can be one of: + * \* `assigned`: Issues assigned to you + * \* `created`: Issues created by you + * \* `mentioned`: Issues mentioning you + * \* `subscribed`: Issues you're subscribed to updates for + * \* `all`: All issues the authenticated user can see, regardless of participation or creation + */ + filter?: "assigned" | "created" | "mentioned" | "subscribed" | "all"; + /** + * A list of comma separated label names. Example: `bug,ui,@high` + */ + labels?: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * What to sort results by. Can be either `created`, `updated`, `comments`. + */ + sort?: "created" | "updated" | "comments"; + /** + * Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + }; + export type IssuesListAssigneesParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type IssuesListCommentsParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + /** + * Only comments updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + }; + export type IssuesListCommentsParams = { + issue_number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + /** + * Only comments updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + }; + export type IssuesListCommentsForRepoParams = { + /** + * Either `asc` or `desc`. Ignored without the `sort` parameter. + */ + direction?: "asc" | "desc"; + + owner: string; + + repo: string; + /** + * Only comments updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * Either `created` or `updated`. + */ + sort?: "created" | "updated"; + }; + export type IssuesListEventsParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type IssuesListEventsParams = { + issue_number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type IssuesListEventsForRepoParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type IssuesListEventsForTimelineParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type IssuesListEventsForTimelineParams = { + issue_number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type IssuesListForAuthenticatedUserParams = { + /** + * The direction of the sort. Can be either `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Indicates which sorts of issues to return. Can be one of: + * \* `assigned`: Issues assigned to you + * \* `created`: Issues created by you + * \* `mentioned`: Issues mentioning you + * \* `subscribed`: Issues you're subscribed to updates for + * \* `all`: All issues the authenticated user can see, regardless of participation or creation + */ + filter?: "assigned" | "created" | "mentioned" | "subscribed" | "all"; + /** + * A list of comma separated label names. Example: `bug,ui,@high` + */ + labels?: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * What to sort results by. Can be either `created`, `updated`, `comments`. + */ + sort?: "created" | "updated" | "comments"; + /** + * Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + }; + export type IssuesListForOrgParams = { + /** + * The direction of the sort. Can be either `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Indicates which sorts of issues to return. Can be one of: + * \* `assigned`: Issues assigned to you + * \* `created`: Issues created by you + * \* `mentioned`: Issues mentioning you + * \* `subscribed`: Issues you're subscribed to updates for + * \* `all`: All issues the authenticated user can see, regardless of participation or creation + */ + filter?: "assigned" | "created" | "mentioned" | "subscribed" | "all"; + /** + * A list of comma separated label names. Example: `bug,ui,@high` + */ + labels?: string; + + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * What to sort results by. Can be either `created`, `updated`, `comments`. + */ + sort?: "created" | "updated" | "comments"; + /** + * Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + }; + export type IssuesListForRepoParams = { + /** + * Can be the name of a user. Pass in `none` for issues with no assigned user, and `*` for issues assigned to any user. + */ + assignee?: string; + /** + * The user that created the issue. + */ + creator?: string; + /** + * The direction of the sort. Can be either `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * A list of comma separated label names. Example: `bug,ui,@high` + */ + labels?: string; + /** + * A user that's mentioned in the issue. + */ + mentioned?: string; + /** + * If an `integer` is passed, it should refer to a milestone by its `number` field. If the string `*` is passed, issues with any milestone are accepted. If the string `none` is passed, issues without milestones are returned. + */ + milestone?: string; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + /** + * Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * What to sort results by. Can be either `created`, `updated`, `comments`. + */ + sort?: "created" | "updated" | "comments"; + /** + * Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + }; + export type IssuesListLabelsForMilestoneParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "milestone_number" + */ + number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type IssuesListLabelsForMilestoneParams = { + milestone_number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type IssuesListLabelsForRepoParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type IssuesListLabelsOnIssueParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type IssuesListLabelsOnIssueParams = { + issue_number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type IssuesListMilestonesForRepoParams = { + /** + * The direction of the sort. Either `asc` or `desc`. + */ + direction?: "asc" | "desc"; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + /** + * What to sort results by. Either `due_on` or `completeness`. + */ + sort?: "due_on" | "completeness"; + /** + * The state of the milestone. Either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + }; + export type IssuesLockParamsDeprecatedNumber = { + /** + * The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons: + * \* `off-topic` + * \* `too heated` + * \* `resolved` + * \* `spam` + */ + lock_reason?: "off-topic" | "too heated" | "resolved" | "spam"; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + + repo: string; + }; + export type IssuesLockParams = { + issue_number: number; + /** + * The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons: + * \* `off-topic` + * \* `too heated` + * \* `resolved` + * \* `spam` + */ + lock_reason?: "off-topic" | "too heated" | "resolved" | "spam"; + + owner: string; + + repo: string; + }; + export type IssuesRemoveAssigneesParamsDeprecatedNumber = { + /** + * Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._ + */ + assignees?: string[]; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + + repo: string; + }; + export type IssuesRemoveAssigneesParams = { + /** + * Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._ + */ + assignees?: string[]; + + issue_number: number; + + owner: string; + + repo: string; + }; + export type IssuesRemoveLabelParamsDeprecatedNumber = { + name: string; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + + repo: string; + }; + export type IssuesRemoveLabelParams = { + issue_number: number; + + name: string; + + owner: string; + + repo: string; + }; + export type IssuesRemoveLabelsParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + + repo: string; + }; + export type IssuesRemoveLabelsParams = { + issue_number: number; + + owner: string; + + repo: string; + }; + export type IssuesReplaceLabelsParamsDeprecatedNumber = { + /** + * The names of the labels to add to the issue. You can pass an empty array to remove all labels. **Note:** Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. + */ + labels?: string[]; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + + repo: string; + }; + export type IssuesReplaceLabelsParams = { + issue_number: number; + /** + * The names of the labels to add to the issue. You can pass an empty array to remove all labels. **Note:** Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. + */ + labels?: string[]; + + owner: string; + + repo: string; + }; + export type IssuesUnlockParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + + repo: string; + }; + export type IssuesUnlockParams = { + issue_number: number; + + owner: string; + + repo: string; + }; + export type IssuesUpdateParamsDeprecatedNumber = { + /** + * Logins for Users to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this Issue. Send an empty array (`[]`) to clear all assignees from the Issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ + */ + assignees?: string[]; + /** + * The contents of the issue. + */ + body?: string; + /** + * Labels to associate with this issue. Pass one or more Labels to _replace_ the set of Labels on this Issue. Send an empty array (`[]`) to clear all Labels from the Issue. _NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise._ + */ + labels?: string[]; + /** + * The `number` of the milestone to associate this issue with or `null` to remove current. _NOTE: Only users with push access can set the milestone for issues. The milestone is silently dropped otherwise._ + */ + milestone?: number | null; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + + repo: string; + /** + * State of the issue. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * The title of the issue. + */ + title?: string; + }; + export type IssuesUpdateParamsDeprecatedAssignee = { + /** + * Login for the user that this issue should be assigned to. **This field is deprecated.** + * @deprecated "assignee" parameter has been deprecated and will be removed in future + */ + assignee?: string; + /** + * Logins for Users to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this Issue. Send an empty array (`[]`) to clear all assignees from the Issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ + */ + assignees?: string[]; + /** + * The contents of the issue. + */ + body?: string; + + issue_number: number; + /** + * Labels to associate with this issue. Pass one or more Labels to _replace_ the set of Labels on this Issue. Send an empty array (`[]`) to clear all Labels from the Issue. _NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise._ + */ + labels?: string[]; + /** + * The `number` of the milestone to associate this issue with or `null` to remove current. _NOTE: Only users with push access can set the milestone for issues. The milestone is silently dropped otherwise._ + */ + milestone?: number | null; + + owner: string; + + repo: string; + /** + * State of the issue. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * The title of the issue. + */ + title?: string; + }; + export type IssuesUpdateParams = { + /** + * Logins for Users to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this Issue. Send an empty array (`[]`) to clear all assignees from the Issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ + */ + assignees?: string[]; + /** + * The contents of the issue. + */ + body?: string; + + issue_number: number; + /** + * Labels to associate with this issue. Pass one or more Labels to _replace_ the set of Labels on this Issue. Send an empty array (`[]`) to clear all Labels from the Issue. _NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise._ + */ + labels?: string[]; + /** + * The `number` of the milestone to associate this issue with or `null` to remove current. _NOTE: Only users with push access can set the milestone for issues. The milestone is silently dropped otherwise._ + */ + milestone?: number | null; + + owner: string; + + repo: string; + /** + * State of the issue. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * The title of the issue. + */ + title?: string; + }; + export type IssuesUpdateCommentParams = { + /** + * The contents of the comment. + */ + body: string; + + comment_id: number; + + owner: string; + + repo: string; + }; + export type IssuesUpdateLabelParams = { + /** + * The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. + */ + color?: string; + + current_name: string; + /** + * A short description of the label. + */ + description?: string; + /** + * The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see [emoji-cheat-sheet.com](http://emoji-cheat-sheet.com/). + */ + name?: string; + + owner: string; + + repo: string; + }; + export type IssuesUpdateMilestoneParamsDeprecatedNumber = { + /** + * A description of the milestone. + */ + description?: string; + /** + * The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + due_on?: string; + /** + * @deprecated "number" parameter renamed to "milestone_number" + */ + number: number; + + owner: string; + + repo: string; + /** + * The state of the milestone. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * The title of the milestone. + */ + title?: string; + }; + export type IssuesUpdateMilestoneParams = { + /** + * A description of the milestone. + */ + description?: string; + /** + * The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + due_on?: string; + + milestone_number: number; + + owner: string; + + repo: string; + /** + * The state of the milestone. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * The title of the milestone. + */ + title?: string; + }; + export type LicensesGetParams = { + license: string; + }; + export type LicensesGetForRepoParams = { + owner: string; + + repo: string; + }; + export type MarkdownRenderParams = { + /** + * The repository context to use when creating references in `gfm` mode. Omit this parameter when using `markdown` mode. + */ + context?: string; + /** + * The rendering mode. Can be either: + * \* `markdown` to render a document in plain Markdown, just like README.md files are rendered. + * \* `gfm` to render a document in [GitHub Flavored Markdown](https://github.github.com/gfm/), which creates links for user mentions as well as references to SHA-1 hashes, issues, and pull requests. + */ + mode?: "markdown" | "gfm"; + /** + * The Markdown text to render in HTML. Markdown content must be 400 KB or less. + */ + text: string; + }; + export type MarkdownRenderRawParams = { + data: string; + }; + export type MigrationsCancelImportParams = { + owner: string; + + repo: string; + }; + export type MigrationsDeleteArchiveForAuthenticatedUserParams = { + migration_id: number; + }; + export type MigrationsDeleteArchiveForOrgParams = { + migration_id: number; + + org: string; + }; + export type MigrationsGetArchiveForAuthenticatedUserParams = { + migration_id: number; + }; + export type MigrationsGetArchiveForOrgParams = { + migration_id: number; + + org: string; + }; + export type MigrationsGetCommitAuthorsParams = { + owner: string; + + repo: string; + /** + * Only authors found after this id are returned. Provide the highest author ID you've seen so far. New authors may be added to the list at any point while the importer is performing the `raw` step. + */ + since?: string; + }; + export type MigrationsGetImportProgressParams = { + owner: string; + + repo: string; + }; + export type MigrationsGetLargeFilesParams = { + owner: string; + + repo: string; + }; + export type MigrationsGetStatusForAuthenticatedUserParams = { + migration_id: number; + }; + export type MigrationsGetStatusForOrgParams = { + migration_id: number; + + org: string; + }; + export type MigrationsListForAuthenticatedUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type MigrationsListForOrgParams = { + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type MigrationsMapCommitAuthorParams = { + author_id: number; + /** + * The new Git author email. + */ + email?: string; + /** + * The new Git author name. + */ + name?: string; + + owner: string; + + repo: string; + }; + export type MigrationsSetLfsPreferenceParams = { + owner: string; + + repo: string; + /** + * Can be one of `opt_in` (large files will be stored using Git LFS) or `opt_out` (large files will be removed during the import). + */ + use_lfs: "opt_in" | "opt_out"; + }; + export type MigrationsStartForAuthenticatedUserParams = { + /** + * Does not include attachments uploaded to GitHub.com in the migration data when set to `true`. Excluding attachments will reduce the migration archive file size. + */ + exclude_attachments?: boolean; + /** + * Locks the `repositories` to prevent changes during the migration when set to `true`. + */ + lock_repositories?: boolean; + /** + * An array of repositories to include in the migration. + */ + repositories: string[]; + }; + export type MigrationsStartForOrgParams = { + /** + * Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). + */ + exclude_attachments?: boolean; + /** + * Indicates whether repositories should be locked (to prevent manipulation) while migrating data. + */ + lock_repositories?: boolean; + + org: string; + /** + * A list of arrays indicating which repositories should be migrated. + */ + repositories: string[]; + }; + export type MigrationsStartImportParams = { + owner: string; + + repo: string; + /** + * For a tfvc import, the name of the project that is being imported. + */ + tfvc_project?: string; + /** + * The originating VCS type. Can be one of `subversion`, `git`, `mercurial`, or `tfvc`. Please be aware that without this parameter, the import job will take additional time to detect the VCS type before beginning the import. This detection step will be reflected in the response. + */ + vcs?: "subversion" | "git" | "mercurial" | "tfvc"; + /** + * If authentication is required, the password to provide to `vcs_url`. + */ + vcs_password?: string; + /** + * The URL of the originating repository. + */ + vcs_url: string; + /** + * If authentication is required, the username to provide to `vcs_url`. + */ + vcs_username?: string; + }; + export type MigrationsUnlockRepoForAuthenticatedUserParams = { + migration_id: number; + + repo_name: string; + }; + export type MigrationsUnlockRepoForOrgParams = { + migration_id: number; + + org: string; + + repo_name: string; + }; + export type MigrationsUpdateImportParams = { + owner: string; + + repo: string; + /** + * The password to provide to the originating repository. + */ + vcs_password?: string; + /** + * The username to provide to the originating repository. + */ + vcs_username?: string; + }; + export type OauthAuthorizationsCheckAuthorizationParams = { + access_token: string; + + client_id: string; + }; + export type OauthAuthorizationsCreateAuthorizationParams = { + /** + * The 20 character OAuth app client key for which to create the token. + */ + client_id?: string; + /** + * The 40 character OAuth app client secret for which to create the token. + */ + client_secret?: string; + /** + * A unique string to distinguish an authorization from others created for the same client ID and user. + */ + fingerprint?: string; + /** + * A note to remind you what the OAuth token is for. Tokens not associated with a specific OAuth application (i.e. personal access tokens) must have a unique note. + */ + note: string; + /** + * A URL to remind you what app the OAuth token is for. + */ + note_url?: string; + /** + * A list of scopes that this authorization is in. + */ + scopes?: string[]; + }; + export type OauthAuthorizationsDeleteAuthorizationParams = { + authorization_id: number; + }; + export type OauthAuthorizationsDeleteGrantParams = { + grant_id: number; + }; + export type OauthAuthorizationsGetAuthorizationParams = { + authorization_id: number; + }; + export type OauthAuthorizationsGetGrantParams = { + grant_id: number; + }; + export type OauthAuthorizationsGetOrCreateAuthorizationForAppParams = { + client_id: string; + /** + * The 40 character OAuth app client secret associated with the client ID specified in the URL. + */ + client_secret: string; + /** + * A unique string to distinguish an authorization from others created for the same client and user. If provided, this API is functionally equivalent to [Get-or-create an authorization for a specific app and fingerprint](https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app-and-fingerprint). + */ + fingerprint?: string; + /** + * A note to remind you what the OAuth token is for. + */ + note?: string; + /** + * A URL to remind you what app the OAuth token is for. + */ + note_url?: string; + /** + * A list of scopes that this authorization is in. + */ + scopes?: string[]; + }; + export type OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintParams = { + client_id: string; + /** + * The 40 character OAuth app client secret associated with the client ID specified in the URL. + */ + client_secret: string; + + fingerprint: string; + /** + * A note to remind you what the OAuth token is for. + */ + note?: string; + /** + * A URL to remind you what app the OAuth token is for. + */ + note_url?: string; + /** + * A list of scopes that this authorization is in. + */ + scopes?: string[]; + }; + export type OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintParams = { + client_id: string; + /** + * The 40 character OAuth app client secret associated with the client ID specified in the URL. + */ + client_secret: string; + + fingerprint: string; + /** + * A note to remind you what the OAuth token is for. + */ + note?: string; + /** + * A URL to remind you what app the OAuth token is for. + */ + note_url?: string; + /** + * A list of scopes that this authorization is in. + */ + scopes?: string[]; + }; + export type OauthAuthorizationsListAuthorizationsParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type OauthAuthorizationsListGrantsParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type OauthAuthorizationsResetAuthorizationParams = { + access_token: string; + + client_id: string; + }; + export type OauthAuthorizationsRevokeAuthorizationForApplicationParams = { + access_token: string; + + client_id: string; + }; + export type OauthAuthorizationsRevokeGrantForApplicationParams = { + access_token: string; + + client_id: string; + }; + export type OauthAuthorizationsUpdateAuthorizationParams = { + /** + * A list of scopes to add to this authorization. + */ + add_scopes?: string[]; + + authorization_id: number; + /** + * A unique string to distinguish an authorization from others created for the same client ID and user. + */ + fingerprint?: string; + /** + * A note to remind you what the OAuth token is for. Tokens not associated with a specific OAuth application (i.e. personal access tokens) must have a unique note. + */ + note?: string; + /** + * A URL to remind you what app the OAuth token is for. + */ + note_url?: string; + /** + * A list of scopes to remove from this authorization. + */ + remove_scopes?: string[]; + /** + * Replaces the authorization scopes with these. + */ + scopes?: string[]; + }; + export type OrgsAddOrUpdateMembershipParams = { + org: string; + /** + * The role to give the user in the organization. Can be one of: + * \* `admin` - The user will become an owner of the organization. + * \* `member` - The user will become a non-owner member of the organization. + */ + role?: "admin" | "member"; + + username: string; + }; + export type OrgsBlockUserParams = { + org: string; + + username: string; + }; + export type OrgsCheckBlockedUserParams = { + org: string; + + username: string; + }; + export type OrgsCheckMembershipParams = { + org: string; + + username: string; + }; + export type OrgsCheckPublicMembershipParams = { + org: string; + + username: string; + }; + export type OrgsConcealMembershipParams = { + org: string; + + username: string; + }; + export type OrgsConvertMemberToOutsideCollaboratorParams = { + org: string; + + username: string; + }; + export type OrgsCreateHookParams = { + /** + * Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + */ + active?: boolean; + /** + * Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/orgs/hooks/#create-hook-config-params). + */ + config: OrgsCreateHookParamsConfig; + /** + * Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. + */ + events?: string[]; + /** + * Must be passed as "web". + */ + name: string; + + org: string; + }; + export type OrgsCreateInvitationParams = { + /** + * **Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user. + */ + email?: string; + /** + * **Required unless you provide `email`**. GitHub user ID for the person you are inviting. + */ + invitee_id?: number; + + org: string; + /** + * Specify role for new member. Can be one of: + * \* `admin` - Organization owners with full administrative rights to the organization and complete access to all repositories and teams. + * \* `direct_member` - Non-owner organization members with ability to see other members and join teams by invitation. + * \* `billing_manager` - Non-owner organization members with ability to manage the billing settings of your organization. + */ + role?: "admin" | "direct_member" | "billing_manager"; + /** + * Specify IDs for the teams you want to invite new members to. + */ + team_ids?: number[]; + }; + export type OrgsDeleteHookParams = { + hook_id: number; + + org: string; + }; + export type OrgsGetParams = { + org: string; + }; + export type OrgsGetHookParams = { + hook_id: number; + + org: string; + }; + export type OrgsGetMembershipParams = { + org: string; + + username: string; + }; + export type OrgsGetMembershipForAuthenticatedUserParams = { + org: string; + }; + export type OrgsListParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * The integer ID of the last Organization that you've seen. + */ + since?: string; + }; + export type OrgsListBlockedUsersParams = { + org: string; + }; + export type OrgsListForAuthenticatedUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type OrgsListForUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + username: string; + }; + export type OrgsListHooksParams = { + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type OrgsListInstallationsParams = { + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type OrgsListInvitationTeamsParams = { + invitation_id: number; + + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type OrgsListMembersParams = { + /** + * Filter members returned in the list. Can be one of: + * \* `2fa_disabled` - Members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled. Available for organization owners. + * \* `all` - All members the authenticated user can see. + */ + filter?: "2fa_disabled" | "all"; + + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Filter members returned by their role. Can be one of: + * \* `all` - All members of the organization, regardless of role. + * \* `admin` - Organization owners. + * \* `member` - Non-owner organization members. + */ + role?: "all" | "admin" | "member"; + }; + export type OrgsListMembershipsParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Indicates the state of the memberships to return. Can be either `active` or `pending`. If not specified, the API returns both active and pending memberships. + */ + state?: "active" | "pending"; + }; + export type OrgsListOutsideCollaboratorsParams = { + /** + * Filter the list of outside collaborators. Can be one of: + * \* `2fa_disabled`: Outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled. + * \* `all`: All outside collaborators. + */ + filter?: "2fa_disabled" | "all"; + + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type OrgsListPendingInvitationsParams = { + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type OrgsListPublicMembersParams = { + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type OrgsPingHookParams = { + hook_id: number; + + org: string; + }; + export type OrgsPublicizeMembershipParams = { + org: string; + + username: string; + }; + export type OrgsRemoveMemberParams = { + org: string; + + username: string; + }; + export type OrgsRemoveMembershipParams = { + org: string; + + username: string; + }; + export type OrgsRemoveOutsideCollaboratorParams = { + org: string; + + username: string; + }; + export type OrgsUnblockUserParams = { + org: string; + + username: string; + }; + export type OrgsUpdateParams = { + /** + * Billing email address. This address is not publicized. + */ + billing_email?: string; + /** + * The company name. + */ + company?: string; + /** + * Default permission level members have for organization repositories: + * \* `read` - can pull, but not push to or administer this repository. + * \* `write` - can pull and push, but not administer this repository. + * \* `admin` - can pull, push, and administer this repository. + * \* `none` - no permissions granted by default. + */ + default_repository_permission?: "read" | "write" | "admin" | "none"; + /** + * The description of the company. + */ + description?: string; + /** + * The publicly visible email address. + */ + email?: string; + /** + * Toggles whether organization projects are enabled for the organization. + */ + has_organization_projects?: boolean; + /** + * Toggles whether repository projects are enabled for repositories that belong to the organization. + */ + has_repository_projects?: boolean; + /** + * The location. + */ + location?: string; + /** + * Specifies which types of repositories non-admin organization members can create. Can be one of: + * \* `all` - all organization members can create public and private repositories. + * \* `private` - members can create private repositories. This option is only available to repositories that are part of an organization on [GitHub Business Cloud](https://github.com/pricing/business-cloud). + * \* `none` - only admin members can create repositories. + * **Note:** Using this parameter will override values set in `members_can_create_repositories`. See [this note](https://developer.github.com/v3/orgs/#members_can_create_repositories) for details. + */ + members_allowed_repository_creation_type?: "all" | "private" | "none"; + /** + * Toggles the ability of non-admin organization members to create repositories. Can be one of: + * \* `true` - all organization members can create repositories. + * \* `false` - only admin members can create repositories. + * Default: `true` + * **Note:** Another parameter can override the this parameter. See [this note](https://developer.github.com/v3/orgs/#members_can_create_repositories) for details. **Note:** Another parameter can override the this parameter. See [this note](https://developer.github.com/v3/orgs/#members_can_create_repositories) for details. + */ + members_can_create_repositories?: boolean; + /** + * The shorthand name of the company. + */ + name?: string; + + org: string; + }; + export type OrgsUpdateHookParams = { + /** + * Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + */ + active?: boolean; + /** + * Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/orgs/hooks/#update-hook-config-params). + */ + config?: OrgsUpdateHookParamsConfig; + /** + * Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. + */ + events?: string[]; + + hook_id: number; + + org: string; + }; + export type OrgsUpdateMembershipParams = { + org: string; + /** + * The state that the membership should be in. Only `"active"` will be accepted. + */ + state: "active"; + }; + export type ProjectsAddCollaboratorParams = { + /** + * The permission to grant the collaborator. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." Can be one of: + * \* `read` - can read, but not write to or administer this project. + * \* `write` - can read and write, but not administer this project. + * \* `admin` - can read, write and administer this project. + */ + permission?: "read" | "write" | "admin"; + + project_id: number; + + username: string; + }; + export type ProjectsCreateCardParams = { + column_id: number; + /** + * The issue or pull request id you want to associate with this card. You can use the [List issues for a repository](https://developer.github.com/v3/issues/#list-issues-for-a-repository) and [List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests) endpoints to find this id. + * **Note:** Depending on whether you use the issue id or pull request id, you will need to specify `Issue` or `PullRequest` as the `content_type`. + */ + content_id?: number; + /** + * **Required if you provide `content_id`**. The type of content you want to associate with this card. Use `Issue` when `content_id` is an issue id and use `PullRequest` when `content_id` is a pull request id. + */ + content_type?: string; + /** + * The card's note content. Only valid for cards without another type of content, so you must omit when specifying `content_id` and `content_type`. + */ + note?: string; + }; + export type ProjectsCreateColumnParams = { + /** + * The name of the column. + */ + name: string; + + project_id: number; + }; + export type ProjectsCreateForAuthenticatedUserParams = { + /** + * The description of the project. + */ + body?: string; + /** + * The name of the project. + */ + name: string; + }; + export type ProjectsCreateForOrgParams = { + /** + * The description of the project. + */ + body?: string; + /** + * The name of the project. + */ + name: string; + + org: string; + }; + export type ProjectsCreateForRepoParams = { + /** + * The description of the project. + */ + body?: string; + /** + * The name of the project. + */ + name: string; + + owner: string; + + repo: string; + }; + export type ProjectsDeleteParams = { + project_id: number; + }; + export type ProjectsDeleteCardParams = { + card_id: number; + }; + export type ProjectsDeleteColumnParams = { + column_id: number; + }; + export type ProjectsGetParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + project_id: number; + }; + export type ProjectsGetCardParams = { + card_id: number; + }; + export type ProjectsGetColumnParams = { + column_id: number; + }; + export type ProjectsListCardsParams = { + /** + * Filters the project cards that are returned by the card's state. Can be one of `all`,`archived`, or `not_archived`. + */ + archived_state?: "all" | "archived" | "not_archived"; + + column_id: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type ProjectsListCollaboratorsParams = { + /** + * Filters the collaborators by their affiliation. Can be one of: + * \* `outside`: Outside collaborators of a project that are not a member of the project's organization. + * \* `direct`: Collaborators with permissions to a project, regardless of organization membership status. + * \* `all`: All collaborators the authenticated user can see. + */ + affiliation?: "outside" | "direct" | "all"; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + project_id: number; + }; + export type ProjectsListColumnsParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + project_id: number; + }; + export type ProjectsListForOrgParams = { + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + }; + export type ProjectsListForRepoParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + /** + * Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + }; + export type ProjectsListForUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + + username: string; + }; + export type ProjectsMoveCardParams = { + card_id: number; + /** + * The `id` value of a column in the same project. + */ + column_id?: number; + /** + * Can be one of `top`, `bottom`, or `after:`, where `` is the `id` value of a card in the same column, or in the new column specified by `column_id`. + */ + position: string; + }; + export type ProjectsMoveColumnParams = { + column_id: number; + /** + * Can be one of `first`, `last`, or `after:`, where `` is the `id` value of a column in the same project. + */ + position: string; + }; + export type ProjectsRemoveCollaboratorParams = { + project_id: number; + + username: string; + }; + export type ProjectsReviewUserPermissionLevelParams = { + project_id: number; + + username: string; + }; + export type ProjectsUpdateParams = { + /** + * The description of the project. + */ + body?: string; + /** + * The name of the project. + */ + name?: string; + /** + * The permission level that determines whether all members of the project's organization can see and/or make changes to the project. Setting `organization_permission` is only available for organization projects. If an organization member belongs to a team with a higher level of access or is a collaborator with a higher level of access, their permission level is not lowered by `organization_permission`. For information on changing access for a team or collaborator, see [Add or update team project](https://developer.github.com/v3/teams/#add-or-update-team-project) or [Add user as a collaborator](https://developer.github.com/v3/projects/collaborators/#add-user-as-a-collaborator). + * + * **Note:** Updating a project's `organization_permission` requires `admin` access to the project. + * + * Can be one of: + * \* `read` - Organization members can read, but not write to or administer this project. + * \* `write` - Organization members can read and write, but not administer this project. + * \* `admin` - Organization members can read, write and administer this project. + * \* `none` - Organization members can only see this project if it is public. + */ + organization_permission?: string; + /** + * Sets the visibility of a project board. Setting `private` is only available for organization and user projects. **Note:** Updating a project's visibility requires `admin` access to the project. + * + * Can be one of: + * \* `false` - Anyone can see the project. + * \* `true` - Only the user can view a project board created on a user account. Organization members with the appropriate `organization_permission` can see project boards in an organization account. + */ + private?: boolean; + + project_id: number; + /** + * State of the project. Either `open` or `closed`. + */ + state?: "open" | "closed"; + }; + export type ProjectsUpdateCardParams = { + /** + * Use `true` to archive a project card. Specify `false` if you need to restore a previously archived project card. + */ + archived?: boolean; + + card_id: number; + /** + * The card's note content. Only valid for cards without another type of content, so this cannot be specified if the card already has a `content_id` and `content_type`. + */ + note?: string; + }; + export type ProjectsUpdateColumnParams = { + column_id: number; + /** + * The new name of the column. + */ + name: string; + }; + export type PullsCheckIfMergedParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + + repo: string; + }; + export type PullsCheckIfMergedParams = { + owner: string; + + pull_number: number; + + repo: string; + }; + export type PullsCreateParams = { + /** + * The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository. + */ + base: string; + /** + * The contents of the pull request. + */ + body?: string; + /** + * Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://help.github.com/en/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. + */ + draft?: boolean; + /** + * The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`. + */ + head: string; + /** + * Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. + */ + maintainer_can_modify?: boolean; + + owner: string; + + repo: string; + /** + * The title of the new pull request. + */ + title: string; + }; + export type PullsCreateCommentParamsDeprecatedNumber = { + /** + * The text of the review comment. + */ + body: string; + /** + * The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. + */ + commit_id: string; + /** + * **Required with `comfort-fade` preview**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. + */ + line?: number; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + /** + * The relative path to the file that necessitates a comment. + */ + path: string; + /** + * **Required without `comfort-fade` preview**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. + */ + position?: number; + + repo: string; + /** + * **Required with `comfort-fade` preview**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + */ + side?: "LEFT" | "RIGHT"; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. + */ + start_line?: number; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + */ + start_side?: "LEFT" | "RIGHT" | "side"; + }; + export type PullsCreateCommentParamsDeprecatedInReplyTo = { + /** + * The text of the review comment. + */ + body: string; + /** + * The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. + */ + commit_id: string; + /** + * The comment ID to reply to. **Note**: This must be the ID of a top-level comment, not a reply to that comment. Replies to replies are not supported. + * @deprecated "in_reply_to" parameter has been deprecated and will be removed in future + */ + in_reply_to?: number; + /** + * **Required with `comfort-fade` preview**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. + */ + line?: number; + + owner: string; + /** + * The relative path to the file that necessitates a comment. + */ + path: string; + /** + * **Required without `comfort-fade` preview**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. + */ + position?: number; + + pull_number: number; + + repo: string; + /** + * **Required with `comfort-fade` preview**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + */ + side?: "LEFT" | "RIGHT"; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. + */ + start_line?: number; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + */ + start_side?: "LEFT" | "RIGHT" | "side"; + }; + export type PullsCreateCommentParams = { + /** + * The text of the review comment. + */ + body: string; + /** + * The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. + */ + commit_id: string; + /** + * **Required with `comfort-fade` preview**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. + */ + line?: number; + + owner: string; + /** + * The relative path to the file that necessitates a comment. + */ + path: string; + /** + * **Required without `comfort-fade` preview**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. + */ + position?: number; + + pull_number: number; + + repo: string; + /** + * **Required with `comfort-fade` preview**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + */ + side?: "LEFT" | "RIGHT"; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. + */ + start_line?: number; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + */ + start_side?: "LEFT" | "RIGHT" | "side"; + }; + export type PullsCreateCommentReplyParamsDeprecatedNumber = { + /** + * The text of the review comment. + */ + body: string; + /** + * The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. + */ + commit_id: string; + /** + * **Required with `comfort-fade` preview**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. + */ + line?: number; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + /** + * The relative path to the file that necessitates a comment. + */ + path: string; + /** + * **Required without `comfort-fade` preview**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. + */ + position?: number; + + repo: string; + /** + * **Required with `comfort-fade` preview**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + */ + side?: "LEFT" | "RIGHT"; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. + */ + start_line?: number; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + */ + start_side?: "LEFT" | "RIGHT" | "side"; + }; + export type PullsCreateCommentReplyParamsDeprecatedInReplyTo = { + /** + * The text of the review comment. + */ + body: string; + /** + * The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. + */ + commit_id: string; + /** + * The comment ID to reply to. **Note**: This must be the ID of a top-level comment, not a reply to that comment. Replies to replies are not supported. + * @deprecated "in_reply_to" parameter has been deprecated and will be removed in future + */ + in_reply_to?: number; + /** + * **Required with `comfort-fade` preview**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. + */ + line?: number; + + owner: string; + /** + * The relative path to the file that necessitates a comment. + */ + path: string; + /** + * **Required without `comfort-fade` preview**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. + */ + position?: number; + + pull_number: number; + + repo: string; + /** + * **Required with `comfort-fade` preview**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + */ + side?: "LEFT" | "RIGHT"; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. + */ + start_line?: number; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + */ + start_side?: "LEFT" | "RIGHT" | "side"; + }; + export type PullsCreateCommentReplyParams = { + /** + * The text of the review comment. + */ + body: string; + /** + * The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. + */ + commit_id: string; + /** + * **Required with `comfort-fade` preview**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. + */ + line?: number; + + owner: string; + /** + * The relative path to the file that necessitates a comment. + */ + path: string; + /** + * **Required without `comfort-fade` preview**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. + */ + position?: number; + + pull_number: number; + + repo: string; + /** + * **Required with `comfort-fade` preview**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + */ + side?: "LEFT" | "RIGHT"; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. + */ + start_line?: number; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + */ + start_side?: "LEFT" | "RIGHT" | "side"; + }; + export type PullsCreateFromIssueParams = { + base: string; + + draft?: boolean; + + head: string; + + issue: number; + + maintainer_can_modify?: boolean; + + owner: string; + + repo: string; + }; + export type PullsCreateReviewParamsDeprecatedNumber = { + /** + * **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. + */ + body?: string; + /** + * Use the following table to specify the location, destination, and contents of the draft review comment. + */ + comments?: PullsCreateReviewParamsComments[]; + /** + * The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value. + */ + commit_id?: string; + /** + * The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https://developer.github.com/v3/pulls/reviews/#submit-a-pull-request-review) when you are ready. + */ + event?: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + + repo: string; + }; + export type PullsCreateReviewParams = { + /** + * **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. + */ + body?: string; + /** + * Use the following table to specify the location, destination, and contents of the draft review comment. + */ + comments?: PullsCreateReviewParamsComments[]; + /** + * The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value. + */ + commit_id?: string; + /** + * The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https://developer.github.com/v3/pulls/reviews/#submit-a-pull-request-review) when you are ready. + */ + event?: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + + owner: string; + + pull_number: number; + + repo: string; + }; + export type PullsCreateReviewCommentReplyParams = { + /** + * The text of the review comment. + */ + body: string; + + comment_id: number; + + owner: string; + + pull_number: number; + + repo: string; + }; + export type PullsCreateReviewRequestParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + + repo: string; + /** + * An array of user `login`s that will be requested. + */ + reviewers?: string[]; + /** + * An array of team `slug`s that will be requested. + */ + team_reviewers?: string[]; + }; + export type PullsCreateReviewRequestParams = { + owner: string; + + pull_number: number; + + repo: string; + /** + * An array of user `login`s that will be requested. + */ + reviewers?: string[]; + /** + * An array of team `slug`s that will be requested. + */ + team_reviewers?: string[]; + }; + export type PullsDeleteCommentParams = { + comment_id: number; + + owner: string; + + repo: string; + }; + export type PullsDeletePendingReviewParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + + repo: string; + + review_id: number; + }; + export type PullsDeletePendingReviewParams = { + owner: string; + + pull_number: number; + + repo: string; + + review_id: number; + }; + export type PullsDeleteReviewRequestParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + + repo: string; + /** + * An array of user `login`s that will be removed. + */ + reviewers?: string[]; + /** + * An array of team `slug`s that will be removed. + */ + team_reviewers?: string[]; + }; + export type PullsDeleteReviewRequestParams = { + owner: string; + + pull_number: number; + + repo: string; + /** + * An array of user `login`s that will be removed. + */ + reviewers?: string[]; + /** + * An array of team `slug`s that will be removed. + */ + team_reviewers?: string[]; + }; + export type PullsDismissReviewParamsDeprecatedNumber = { + /** + * The message for the pull request review dismissal + */ + message: string; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + + repo: string; + + review_id: number; + }; + export type PullsDismissReviewParams = { + /** + * The message for the pull request review dismissal + */ + message: string; + + owner: string; + + pull_number: number; + + repo: string; + + review_id: number; + }; + export type PullsGetParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + + repo: string; + }; + export type PullsGetParams = { + owner: string; + + pull_number: number; + + repo: string; + }; + export type PullsGetCommentParams = { + comment_id: number; + + owner: string; + + repo: string; + }; + export type PullsGetCommentsForReviewParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + + review_id: number; + }; + export type PullsGetCommentsForReviewParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + pull_number: number; + + repo: string; + + review_id: number; + }; + export type PullsGetReviewParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + + repo: string; + + review_id: number; + }; + export type PullsGetReviewParams = { + owner: string; + + pull_number: number; + + repo: string; + + review_id: number; + }; + export type PullsListParams = { + /** + * Filter pulls by base branch name. Example: `gh-pages`. + */ + base?: string; + /** + * The direction of the sort. Can be either `asc` or `desc`. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`. + */ + direction?: "asc" | "desc"; + /** + * Filter pulls by head user or head organization and branch name in the format of `user:ref-name` or `organization:ref-name`. For example: `github:new-script-format` or `octocat:test-branch`. + */ + head?: string; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + /** + * What to sort results by. Can be either `created`, `updated`, `popularity` (comment count) or `long-running` (age, filtering by pulls updated in the last month). + */ + sort?: "created" | "updated" | "popularity" | "long-running"; + /** + * Either `open`, `closed`, or `all` to filter by state. + */ + state?: "open" | "closed" | "all"; + }; + export type PullsListCommentsParamsDeprecatedNumber = { + /** + * Can be either `asc` or `desc`. Ignored without `sort` parameter. + */ + direction?: "asc" | "desc"; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only returns comments `updated` at or after this time. + */ + since?: string; + /** + * Can be either `created` or `updated` comments. + */ + sort?: "created" | "updated"; + }; + export type PullsListCommentsParams = { + /** + * Can be either `asc` or `desc`. Ignored without `sort` parameter. + */ + direction?: "asc" | "desc"; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + pull_number: number; + + repo: string; + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only returns comments `updated` at or after this time. + */ + since?: string; + /** + * Can be either `created` or `updated` comments. + */ + sort?: "created" | "updated"; + }; + export type PullsListCommentsForRepoParams = { + /** + * Can be either `asc` or `desc`. Ignored without `sort` parameter. + */ + direction?: "asc" | "desc"; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only returns comments `updated` at or after this time. + */ + since?: string; + /** + * Can be either `created` or `updated` comments. + */ + sort?: "created" | "updated"; + }; + export type PullsListCommitsParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type PullsListCommitsParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + pull_number: number; + + repo: string; + }; + export type PullsListFilesParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type PullsListFilesParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + pull_number: number; + + repo: string; + }; + export type PullsListReviewRequestsParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type PullsListReviewRequestsParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + pull_number: number; + + repo: string; + }; + export type PullsListReviewsParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type PullsListReviewsParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + pull_number: number; + + repo: string; + }; + export type PullsMergeParamsDeprecatedNumber = { + /** + * Extra detail to append to automatic commit message. + */ + commit_message?: string; + /** + * Title for the automatic commit message. + */ + commit_title?: string; + /** + * Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. + */ + merge_method?: "merge" | "squash" | "rebase"; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + + repo: string; + /** + * SHA that pull request head must match to allow merge. + */ + sha?: string; + }; + export type PullsMergeParams = { + /** + * Extra detail to append to automatic commit message. + */ + commit_message?: string; + /** + * Title for the automatic commit message. + */ + commit_title?: string; + /** + * Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. + */ + merge_method?: "merge" | "squash" | "rebase"; + + owner: string; + + pull_number: number; + + repo: string; + /** + * SHA that pull request head must match to allow merge. + */ + sha?: string; + }; + export type PullsSubmitReviewParamsDeprecatedNumber = { + /** + * The body text of the pull request review + */ + body?: string; + /** + * The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When you leave this blank, the API returns _HTTP 422 (Unrecognizable entity)_ and sets the review action state to `PENDING`, which means you will need to re-submit the pull request review using a review action. + */ + event: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + + repo: string; + + review_id: number; + }; + export type PullsSubmitReviewParams = { + /** + * The body text of the pull request review + */ + body?: string; + /** + * The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When you leave this blank, the API returns _HTTP 422 (Unrecognizable entity)_ and sets the review action state to `PENDING`, which means you will need to re-submit the pull request review using a review action. + */ + event: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + + owner: string; + + pull_number: number; + + repo: string; + + review_id: number; + }; + export type PullsUpdateParamsDeprecatedNumber = { + /** + * The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository. + */ + base?: string; + /** + * The contents of the pull request. + */ + body?: string; + /** + * Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. + */ + maintainer_can_modify?: boolean; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + + repo: string; + /** + * State of this Pull Request. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * The title of the pull request. + */ + title?: string; + }; + export type PullsUpdateParams = { + /** + * The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository. + */ + base?: string; + /** + * The contents of the pull request. + */ + body?: string; + /** + * Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. + */ + maintainer_can_modify?: boolean; + + owner: string; + + pull_number: number; + + repo: string; + /** + * State of this Pull Request. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * The title of the pull request. + */ + title?: string; + }; + export type PullsUpdateBranchParams = { + /** + * The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a `422 Unprocessable Entity` status. You can use the "[List commits on a repository](https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. + */ + expected_head_sha?: string; + + owner: string; + + pull_number: number; + + repo: string; + }; + export type PullsUpdateCommentParams = { + /** + * The text of the reply to the review comment. + */ + body: string; + + comment_id: number; + + owner: string; + + repo: string; + }; + export type PullsUpdateReviewParamsDeprecatedNumber = { + /** + * The body text of the pull request review. + */ + body: string; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + + repo: string; + + review_id: number; + }; + export type PullsUpdateReviewParams = { + /** + * The body text of the pull request review. + */ + body: string; + + owner: string; + + pull_number: number; + + repo: string; + + review_id: number; + }; + export type ReactionsCreateForCommitCommentParams = { + comment_id: number; + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the commit comment. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + owner: string; + + repo: string; + }; + export type ReactionsCreateForIssueParamsDeprecatedNumber = { + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the issue. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + + repo: string; + }; + export type ReactionsCreateForIssueParams = { + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the issue. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + issue_number: number; + + owner: string; + + repo: string; + }; + export type ReactionsCreateForIssueCommentParams = { + comment_id: number; + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the issue comment. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + owner: string; + + repo: string; + }; + export type ReactionsCreateForPullRequestReviewCommentParams = { + comment_id: number; + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the pull request review comment. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + owner: string; + + repo: string; + }; + export type ReactionsCreateForTeamDiscussionParams = { + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + discussion_number: number; + + team_id: number; + }; + export type ReactionsCreateForTeamDiscussionCommentParams = { + comment_number: number; + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion comment. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + discussion_number: number; + + team_id: number; + }; + export type ReactionsDeleteParams = { + reaction_id: number; + }; + export type ReactionsListForCommitCommentParams = { + comment_id: number; + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a commit comment. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReactionsListForIssueParamsDeprecatedNumber = { + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to an issue. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReactionsListForIssueParams = { + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to an issue. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + issue_number: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReactionsListForIssueCommentParams = { + comment_id: number; + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to an issue comment. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReactionsListForPullRequestReviewCommentParams = { + comment_id: number; + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a pull request review comment. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReactionsListForTeamDiscussionParams = { + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a team discussion. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + discussion_number: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + team_id: number; + }; + export type ReactionsListForTeamDiscussionCommentParams = { + comment_number: number; + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a team discussion comment. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + discussion_number: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + team_id: number; + }; + export type ReposAcceptInvitationParams = { + invitation_id: number; + }; + export type ReposAddCollaboratorParams = { + owner: string; + /** + * The permission to grant the collaborator. **Only valid on organization-owned repositories.** Can be one of: + * \* `pull` - can pull, but not push to or administer this repository. + * \* `push` - can pull and push, but not administer this repository. + * \* `admin` - can pull, push and administer this repository. + */ + permission?: "pull" | "push" | "admin"; + + repo: string; + + username: string; + }; + export type ReposAddDeployKeyParams = { + /** + * The contents of the key. + */ + key: string; + + owner: string; + /** + * If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write. + * + * Deploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see "[Repository permission levels for an organization](https://help.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://help.github.com/articles/permission-levels-for-a-user-account-repository/)." + */ + read_only?: boolean; + + repo: string; + /** + * A name for the key. + */ + title?: string; + }; + export type ReposAddProtectedBranchAdminEnforcementParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposAddProtectedBranchAppRestrictionsParams = { + apps: string[]; + + branch: string; + + owner: string; + + repo: string; + }; + export type ReposAddProtectedBranchRequiredSignaturesParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposAddProtectedBranchRequiredStatusChecksContextsParams = { + branch: string; + + contexts: string[]; + + owner: string; + + repo: string; + }; + export type ReposAddProtectedBranchTeamRestrictionsParams = { + branch: string; + + owner: string; + + repo: string; + + teams: string[]; + }; + export type ReposAddProtectedBranchUserRestrictionsParams = { + branch: string; + + owner: string; + + repo: string; + + users: string[]; + }; + export type ReposCheckCollaboratorParams = { + owner: string; + + repo: string; + + username: string; + }; + export type ReposCheckVulnerabilityAlertsParams = { + owner: string; + + repo: string; + }; + export type ReposCompareCommitsParams = { + base: string; + + head: string; + + owner: string; + + repo: string; + }; + export type ReposCreateCommitCommentParamsDeprecatedSha = { + /** + * The contents of the comment. + */ + body: string; + + owner: string; + /** + * Relative path of the file to comment on. + */ + path?: string; + /** + * Line index in the diff to comment on. + */ + position?: number; + + repo: string; + /** + * @deprecated "sha" parameter renamed to "commit_sha" + */ + sha: string; + }; + export type ReposCreateCommitCommentParamsDeprecatedLine = { + /** + * The contents of the comment. + */ + body: string; + + commit_sha: string; + /** + * **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. + * @deprecated "line" parameter has been deprecated and will be removed in future + */ + line?: number; + + owner: string; + /** + * Relative path of the file to comment on. + */ + path?: string; + /** + * Line index in the diff to comment on. + */ + position?: number; + + repo: string; + }; + export type ReposCreateCommitCommentParams = { + /** + * The contents of the comment. + */ + body: string; + + commit_sha: string; + + owner: string; + /** + * Relative path of the file to comment on. + */ + path?: string; + /** + * Line index in the diff to comment on. + */ + position?: number; + + repo: string; + }; + export type ReposCreateDeploymentParams = { + /** + * Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. + */ + auto_merge?: boolean; + /** + * Short description of the deployment. + */ + description?: string; + /** + * Name for the target deployment environment (e.g., `production`, `staging`, `qa`). + */ + environment?: string; + + owner: string; + /** + * JSON payload with extra information about the deployment. + */ + payload?: string; + /** + * Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. + */ + production_environment?: boolean; + /** + * The ref to deploy. This can be a branch, tag, or SHA. + */ + ref: string; + + repo: string; + /** + * The [status](https://developer.github.com/v3/repos/statuses/) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts. + */ + required_contexts?: string[]; + /** + * Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). + */ + task?: string; + /** + * Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. + */ + transient_environment?: boolean; + }; + export type ReposCreateDeploymentStatusParams = { + /** + * Adds a new `inactive` status to all prior non-transient, non-production environment deployments with the same repository and `environment` name as the created status's deployment. An `inactive` status is only added to deployments that had a `success` state. Default: `true` + * **Note:** To add an `inactive` status to `production` environments, you must use the [`application/vnd.github.flash-preview+json`](https://developer.github.com/v3/previews/#deployment-statuses) custom media type. + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. + */ + auto_inactive?: boolean; + + deployment_id: number; + /** + * A short description of the status. The maximum description length is 140 characters. + */ + description?: string; + /** + * Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. **Note:** This parameter requires you to use the [`application/vnd.github.flash-preview+json`](https://developer.github.com/v3/previews/#deployment-statuses) custom media type. + */ + environment?: "production" | "staging" | "qa"; + /** + * Sets the URL for accessing your environment. Default: `""` + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. + */ + environment_url?: string; + /** + * The full URL of the deployment's output. This parameter replaces `target_url`. We will continue to accept `target_url` to support legacy uses, but we recommend replacing `target_url` with `log_url`. Setting `log_url` will automatically set `target_url` to the same value. Default: `""` + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. + */ + log_url?: string; + + owner: string; + + repo: string; + /** + * The state of the status. Can be one of `error`, `failure`, `inactive`, `in_progress`, `queued` `pending`, or `success`. **Note:** To use the `inactive` state, you must provide the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. To use the `in_progress` and `queued` states, you must provide the [`application/vnd.github.flash-preview+json`](https://developer.github.com/v3/previews/#deployment-statuses) custom media type. + */ + state: + | "error" + | "failure" + | "inactive" + | "in_progress" + | "queued" + | "pending" + | "success"; + /** + * The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. **Note:** It's recommended to use the `log_url` parameter, which replaces `target_url`. + */ + target_url?: string; + }; + export type ReposCreateDispatchEventParams = { + /** + * JSON payload with extra information about the webhook event that your action or worklow may use. + */ + client_payload?: ReposCreateDispatchEventParamsClientPayload; + /** + * **Required:** A custom webhook event name. + */ + event_type?: string; + + owner: string; + + repo: string; + }; + export type ReposCreateFileParams = { + /** + * The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. + */ + author?: ReposCreateFileParamsAuthor; + /** + * The branch name. Default: the repository’s default branch (usually `master`) + */ + branch?: string; + /** + * The person that committed the file. Default: the authenticated user. + */ + committer?: ReposCreateFileParamsCommitter; + /** + * The new file content, using Base64 encoding. + */ + content: string; + /** + * The commit message. + */ + message: string; + + owner: string; + + path: string; + + repo: string; + /** + * **Required if you are updating a file**. The blob SHA of the file being replaced. + */ + sha?: string; + }; + export type ReposCreateForAuthenticatedUserParams = { + /** + * Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + */ + allow_merge_commit?: boolean; + /** + * Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + */ + allow_rebase_merge?: boolean; + /** + * Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + */ + allow_squash_merge?: boolean; + /** + * Pass `true` to create an initial commit with empty README. + */ + auto_init?: boolean; + /** + * A short description of the repository. + */ + description?: string; + /** + * Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, "Haskell". + */ + gitignore_template?: string; + /** + * Either `true` to enable issues for this repository or `false` to disable them. + */ + has_issues?: boolean; + /** + * Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. + */ + has_projects?: boolean; + /** + * Either `true` to enable the wiki for this repository or `false` to disable it. + */ + has_wiki?: boolean; + /** + * A URL with more information about the repository. + */ + homepage?: string; + /** + * Either `true` to make this repo available as a template repository or `false` to prevent it. + */ + is_template?: boolean; + /** + * Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://help.github.com/articles/licensing-a-repository/#searching-github-by-license-type) as the `license_template` string. For example, "mit" or "mpl-2.0". + */ + license_template?: string; + /** + * The name of the repository. + */ + name: string; + /** + * Either `true` to create a private repository or `false` to create a public one. Creating private repositories requires a paid GitHub account. + */ + private?: boolean; + /** + * The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. + */ + team_id?: number; + }; + export type ReposCreateForkParams = { + /** + * Optional parameter to specify the organization name if forking into an organization. + */ + organization?: string; + + owner: string; + + repo: string; + }; + export type ReposCreateHookParams = { + /** + * Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + */ + active?: boolean; + /** + * Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/repos/hooks/#create-hook-config-params). + */ + config: ReposCreateHookParamsConfig; + /** + * Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. + */ + events?: string[]; + /** + * Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. + */ + name?: string; + + owner: string; + + repo: string; + }; + export type ReposCreateInOrgParams = { + /** + * Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + */ + allow_merge_commit?: boolean; + /** + * Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + */ + allow_rebase_merge?: boolean; + /** + * Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + */ + allow_squash_merge?: boolean; + /** + * Pass `true` to create an initial commit with empty README. + */ + auto_init?: boolean; + /** + * A short description of the repository. + */ + description?: string; + /** + * Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, "Haskell". + */ + gitignore_template?: string; + /** + * Either `true` to enable issues for this repository or `false` to disable them. + */ + has_issues?: boolean; + /** + * Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. + */ + has_projects?: boolean; + /** + * Either `true` to enable the wiki for this repository or `false` to disable it. + */ + has_wiki?: boolean; + /** + * A URL with more information about the repository. + */ + homepage?: string; + /** + * Either `true` to make this repo available as a template repository or `false` to prevent it. + */ + is_template?: boolean; + /** + * Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://help.github.com/articles/licensing-a-repository/#searching-github-by-license-type) as the `license_template` string. For example, "mit" or "mpl-2.0". + */ + license_template?: string; + /** + * The name of the repository. + */ + name: string; + + org: string; + /** + * Either `true` to create a private repository or `false` to create a public one. Creating private repositories requires a paid GitHub account. + */ + private?: boolean; + /** + * The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. + */ + team_id?: number; + }; + export type ReposCreateOrUpdateFileParams = { + /** + * The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. + */ + author?: ReposCreateOrUpdateFileParamsAuthor; + /** + * The branch name. Default: the repository’s default branch (usually `master`) + */ + branch?: string; + /** + * The person that committed the file. Default: the authenticated user. + */ + committer?: ReposCreateOrUpdateFileParamsCommitter; + /** + * The new file content, using Base64 encoding. + */ + content: string; + /** + * The commit message. + */ + message: string; + + owner: string; + + path: string; + + repo: string; + /** + * **Required if you are updating a file**. The blob SHA of the file being replaced. + */ + sha?: string; + }; + export type ReposCreateReleaseParams = { + /** + * Text describing the contents of the tag. + */ + body?: string; + /** + * `true` to create a draft (unpublished) release, `false` to create a published one. + */ + draft?: boolean; + /** + * The name of the release. + */ + name?: string; + + owner: string; + /** + * `true` to identify the release as a prerelease. `false` to identify the release as a full release. + */ + prerelease?: boolean; + + repo: string; + /** + * The name of the tag. + */ + tag_name: string; + /** + * Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). + */ + target_commitish?: string; + }; + export type ReposCreateStatusParams = { + /** + * A string label to differentiate this status from the status of other systems. + */ + context?: string; + /** + * A short description of the status. + */ + description?: string; + + owner: string; + + repo: string; + + sha: string; + /** + * The state of the status. Can be one of `error`, `failure`, `pending`, or `success`. + */ + state: "error" | "failure" | "pending" | "success"; + /** + * The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status. + * For example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA: + * `http://ci.example.com/user/repo/build/sha` + */ + target_url?: string; + }; + export type ReposCreateUsingTemplateParams = { + /** + * A short description of the new repository. + */ + description?: string; + /** + * The name of the new repository. + */ + name: string; + /** + * The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization. + */ + owner?: string; + /** + * Either `true` to create a new private repository or `false` to create a new public one. + */ + private?: boolean; + + template_owner: string; + + template_repo: string; + }; + export type ReposDeclineInvitationParams = { + invitation_id: number; + }; + export type ReposDeleteParams = { + owner: string; + + repo: string; + }; + export type ReposDeleteCommitCommentParams = { + comment_id: number; + + owner: string; + + repo: string; + }; + export type ReposDeleteDownloadParams = { + download_id: number; + + owner: string; + + repo: string; + }; + export type ReposDeleteFileParams = { + /** + * object containing information about the author. + */ + author?: ReposDeleteFileParamsAuthor; + /** + * The branch name. Default: the repository’s default branch (usually `master`) + */ + branch?: string; + /** + * object containing information about the committer. + */ + committer?: ReposDeleteFileParamsCommitter; + /** + * The commit message. + */ + message: string; + + owner: string; + + path: string; + + repo: string; + /** + * The blob SHA of the file being replaced. + */ + sha: string; + }; + export type ReposDeleteHookParams = { + hook_id: number; + + owner: string; + + repo: string; + }; + export type ReposDeleteInvitationParams = { + invitation_id: number; + + owner: string; + + repo: string; + }; + export type ReposDeleteReleaseParams = { + owner: string; + + release_id: number; + + repo: string; + }; + export type ReposDeleteReleaseAssetParams = { + asset_id: number; + + owner: string; + + repo: string; + }; + export type ReposDisableAutomatedSecurityFixesParams = { + owner: string; + + repo: string; + }; + export type ReposDisablePagesSiteParams = { + owner: string; + + repo: string; + }; + export type ReposDisableVulnerabilityAlertsParams = { + owner: string; + + repo: string; + }; + export type ReposEnableAutomatedSecurityFixesParams = { + owner: string; + + repo: string; + }; + export type ReposEnablePagesSiteParams = { + owner: string; + + repo: string; + + source?: ReposEnablePagesSiteParamsSource; + }; + export type ReposEnableVulnerabilityAlertsParams = { + owner: string; + + repo: string; + }; + export type ReposGetParams = { + owner: string; + + repo: string; + }; + export type ReposGetAppsWithAccessToProtectedBranchParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposGetArchiveLinkParams = { + archive_format: string; + + owner: string; + + ref: string; + + repo: string; + }; + export type ReposGetBranchParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposGetBranchProtectionParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposGetClonesParams = { + owner: string; + /** + * Must be one of: `day`, `week`. + */ + per?: "day" | "week"; + + repo: string; + }; + export type ReposGetCodeFrequencyStatsParams = { + owner: string; + + repo: string; + }; + export type ReposGetCollaboratorPermissionLevelParams = { + owner: string; + + repo: string; + + username: string; + }; + export type ReposGetCombinedStatusForRefParams = { + owner: string; + + ref: string; + + repo: string; + }; + export type ReposGetCommitParamsDeprecatedSha = { + owner: string; + + repo: string; + /** + * @deprecated "sha" parameter renamed to "ref" + */ + sha: string; + }; + export type ReposGetCommitParamsDeprecatedCommitSha = { + /** + * @deprecated "commit_sha" parameter renamed to "ref" + */ + commit_sha: string; + + owner: string; + + repo: string; + }; + export type ReposGetCommitParams = { + owner: string; + + ref: string; + + repo: string; + }; + export type ReposGetCommitActivityStatsParams = { + owner: string; + + repo: string; + }; + export type ReposGetCommitCommentParams = { + comment_id: number; + + owner: string; + + repo: string; + }; + export type ReposGetCommitRefShaParams = { + owner: string; + + ref: string; + + repo: string; + }; + export type ReposGetContentsParams = { + owner: string; + + path: string; + /** + * The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) + */ + ref?: string; + + repo: string; + }; + export type ReposGetContributorsStatsParams = { + owner: string; + + repo: string; + }; + export type ReposGetDeployKeyParams = { + key_id: number; + + owner: string; + + repo: string; + }; + export type ReposGetDeploymentParams = { + deployment_id: number; + + owner: string; + + repo: string; + }; + export type ReposGetDeploymentStatusParams = { + deployment_id: number; + + owner: string; + + repo: string; + + status_id: number; + }; + export type ReposGetDownloadParams = { + download_id: number; + + owner: string; + + repo: string; + }; + export type ReposGetHookParams = { + hook_id: number; + + owner: string; + + repo: string; + }; + export type ReposGetLatestPagesBuildParams = { + owner: string; + + repo: string; + }; + export type ReposGetLatestReleaseParams = { + owner: string; + + repo: string; + }; + export type ReposGetPagesParams = { + owner: string; + + repo: string; + }; + export type ReposGetPagesBuildParams = { + build_id: number; + + owner: string; + + repo: string; + }; + export type ReposGetParticipationStatsParams = { + owner: string; + + repo: string; + }; + export type ReposGetProtectedBranchAdminEnforcementParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposGetProtectedBranchPullRequestReviewEnforcementParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposGetProtectedBranchRequiredSignaturesParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposGetProtectedBranchRequiredStatusChecksParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposGetProtectedBranchRestrictionsParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposGetPunchCardStatsParams = { + owner: string; + + repo: string; + }; + export type ReposGetReadmeParams = { + owner: string; + /** + * The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) + */ + ref?: string; + + repo: string; + }; + export type ReposGetReleaseParams = { + owner: string; + + release_id: number; + + repo: string; + }; + export type ReposGetReleaseAssetParams = { + asset_id: number; + + owner: string; + + repo: string; + }; + export type ReposGetReleaseByTagParams = { + owner: string; + + repo: string; + + tag: string; + }; + export type ReposGetTeamsWithAccessToProtectedBranchParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposGetTopPathsParams = { + owner: string; + + repo: string; + }; + export type ReposGetTopReferrersParams = { + owner: string; + + repo: string; + }; + export type ReposGetUsersWithAccessToProtectedBranchParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposGetViewsParams = { + owner: string; + /** + * Must be one of: `day`, `week`. + */ + per?: "day" | "week"; + + repo: string; + }; + export type ReposListParams = { + /** + * Comma-separated list of values. Can include: + * \* `owner`: Repositories that are owned by the authenticated user. + * \* `collaborator`: Repositories that the user has been added to as a collaborator. + * \* `organization_member`: Repositories that the user has access to through being a member of an organization. This includes every repository on every team that the user is on. + */ + affiliation?: string; + /** + * Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc` + */ + direction?: "asc" | "desc"; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Can be one of `created`, `updated`, `pushed`, `full_name`. + */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** + * Can be one of `all`, `owner`, `public`, `private`, `member`. Default: `all` + * + * Will cause a `422` error if used in the same request as **visibility** or **affiliation**. Will cause a `422` error if used in the same request as **visibility** or **affiliation**. + */ + type?: "all" | "owner" | "public" | "private" | "member"; + /** + * Can be one of `all`, `public`, or `private`. + */ + visibility?: "all" | "public" | "private"; + }; + export type ReposListAppsWithAccessToProtectedBranchParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposListAssetsForReleaseParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + release_id: number; + + repo: string; + }; + export type ReposListBranchesParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Setting to `true` returns only protected branches. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches. + */ + protected?: boolean; + + repo: string; + }; + export type ReposListBranchesForHeadCommitParams = { + commit_sha: string; + + owner: string; + + repo: string; + }; + export type ReposListCollaboratorsParams = { + /** + * Filter collaborators returned by their affiliation. Can be one of: + * \* `outside`: All outside collaborators of an organization-owned repository. + * \* `direct`: All collaborators with permissions to an organization-owned repository, regardless of organization membership status. + * \* `all`: All collaborators the authenticated user can see. + */ + affiliation?: "outside" | "direct" | "all"; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReposListCommentsForCommitParamsDeprecatedRef = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * @deprecated "ref" parameter renamed to "commit_sha" + */ + ref: string; + + repo: string; + }; + export type ReposListCommentsForCommitParams = { + commit_sha: string; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReposListCommitCommentsParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReposListCommitsParams = { + /** + * GitHub login or email address by which to filter by commit author. + */ + author?: string; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Only commits containing this file path will be returned. + */ + path?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + /** + * SHA or branch to start listing commits from. Default: the repository’s default branch (usually `master`). + */ + sha?: string; + /** + * Only commits after this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * Only commits before this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + until?: string; + }; + export type ReposListContributorsParams = { + /** + * Set to `1` or `true` to include anonymous contributors in results. + */ + anon?: string; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReposListDeployKeysParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReposListDeploymentStatusesParams = { + deployment_id: number; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReposListDeploymentsParams = { + /** + * The name of the environment that was deployed to (e.g., `staging` or `production`). + */ + environment?: string; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * The name of the ref. This can be a branch, tag, or SHA. + */ + ref?: string; + + repo: string; + /** + * The SHA recorded at creation time. + */ + sha?: string; + /** + * The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`). + */ + task?: string; + }; + export type ReposListDownloadsParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReposListForOrgParams = { + /** + * Can be one of `asc` or `desc`. Default: when using `full_name`: `asc`, otherwise `desc` + */ + direction?: "asc" | "desc"; + + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Can be one of `created`, `updated`, `pushed`, `full_name`. + */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** + * Can be one of `all`, `public`, `private`, `forks`, `sources`, `member`. + */ + type?: "all" | "public" | "private" | "forks" | "sources" | "member"; + }; + export type ReposListForUserParams = { + /** + * Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc` + */ + direction?: "asc" | "desc"; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Can be one of `created`, `updated`, `pushed`, `full_name`. + */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** + * Can be one of `all`, `owner`, `member`. + */ + type?: "all" | "owner" | "member"; + + username: string; + }; + export type ReposListForksParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + /** + * The sort order. Can be either `newest`, `oldest`, or `stargazers`. + */ + sort?: "newest" | "oldest" | "stargazers"; + }; + export type ReposListHooksParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReposListInvitationsParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReposListInvitationsForAuthenticatedUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type ReposListLanguagesParams = { + owner: string; + + repo: string; + }; + export type ReposListPagesBuildsParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReposListProtectedBranchRequiredStatusChecksContextsParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposListProtectedBranchTeamRestrictionsParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposListProtectedBranchUserRestrictionsParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposListPublicParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * The integer ID of the last Repository that you've seen. + */ + since?: string; + }; + export type ReposListPullRequestsAssociatedWithCommitParams = { + commit_sha: string; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReposListReleasesParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReposListStatusesForRefParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + ref: string; + + repo: string; + }; + export type ReposListTagsParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReposListTeamsParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + }; + export type ReposListTeamsWithAccessToProtectedBranchParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposListTopicsParams = { + owner: string; + + repo: string; + }; + export type ReposListUsersWithAccessToProtectedBranchParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposMergeParams = { + /** + * The name of the base branch that the head will be merged into. + */ + base: string; + /** + * Commit message to use for the merge commit. If omitted, a default message will be used. + */ + commit_message?: string; + /** + * The head to merge. This can be a branch name or a commit SHA1. + */ + head: string; + + owner: string; + + repo: string; + }; + export type ReposPingHookParams = { + hook_id: number; + + owner: string; + + repo: string; + }; + export type ReposRemoveBranchProtectionParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposRemoveCollaboratorParams = { + owner: string; + + repo: string; + + username: string; + }; + export type ReposRemoveDeployKeyParams = { + key_id: number; + + owner: string; + + repo: string; + }; + export type ReposRemoveProtectedBranchAdminEnforcementParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposRemoveProtectedBranchAppRestrictionsParams = { + apps: string[]; + + branch: string; + + owner: string; + + repo: string; + }; + export type ReposRemoveProtectedBranchPullRequestReviewEnforcementParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposRemoveProtectedBranchRequiredSignaturesParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposRemoveProtectedBranchRequiredStatusChecksParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposRemoveProtectedBranchRequiredStatusChecksContextsParams = { + branch: string; + + contexts: string[]; + + owner: string; + + repo: string; + }; + export type ReposRemoveProtectedBranchRestrictionsParams = { + branch: string; + + owner: string; + + repo: string; + }; + export type ReposRemoveProtectedBranchTeamRestrictionsParams = { + branch: string; + + owner: string; + + repo: string; + + teams: string[]; + }; + export type ReposRemoveProtectedBranchUserRestrictionsParams = { + branch: string; + + owner: string; + + repo: string; + + users: string[]; + }; + export type ReposReplaceProtectedBranchAppRestrictionsParams = { + apps: string[]; + + branch: string; + + owner: string; + + repo: string; + }; + export type ReposReplaceProtectedBranchRequiredStatusChecksContextsParams = { + branch: string; + + contexts: string[]; + + owner: string; + + repo: string; + }; + export type ReposReplaceProtectedBranchTeamRestrictionsParams = { + branch: string; + + owner: string; + + repo: string; + + teams: string[]; + }; + export type ReposReplaceProtectedBranchUserRestrictionsParams = { + branch: string; + + owner: string; + + repo: string; + + users: string[]; + }; + export type ReposReplaceTopicsParams = { + /** + * An array of topics to add to the repository. Pass one or more topics to _replace_ the set of existing topics. Send an empty array (`[]`) to clear all topics from the repository. **Note:** Topic `names` cannot contain uppercase letters. + */ + names: string[]; + + owner: string; + + repo: string; + }; + export type ReposRequestPageBuildParams = { + owner: string; + + repo: string; + }; + export type ReposRetrieveCommunityProfileMetricsParams = { + owner: string; + + repo: string; + }; + export type ReposTestPushHookParams = { + hook_id: number; + + owner: string; + + repo: string; + }; + export type ReposTransferParams = { + /** + * **Required:** The username or organization name the repository will be transferred to. + */ + new_owner?: string; + + owner: string; + + repo: string; + /** + * ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. + */ + team_ids?: number[]; + }; + export type ReposUpdateParams = { + /** + * Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + */ + allow_merge_commit?: boolean; + /** + * Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + */ + allow_rebase_merge?: boolean; + /** + * Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + */ + allow_squash_merge?: boolean; + /** + * `true` to archive this repository. **Note**: You cannot unarchive repositories through the API. + */ + archived?: boolean; + /** + * Updates the default branch for this repository. + */ + default_branch?: string; + /** + * A short description of the repository. + */ + description?: string; + /** + * Either `true` to enable issues for this repository or `false` to disable them. + */ + has_issues?: boolean; + /** + * Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. + */ + has_projects?: boolean; + /** + * Either `true` to enable the wiki for this repository or `false` to disable it. + */ + has_wiki?: boolean; + /** + * A URL with more information about the repository. + */ + homepage?: string; + /** + * Either `true` to make this repo available as a template repository or `false` to prevent it. + */ + is_template?: boolean; + /** + * The name of the repository. + */ + name?: string; + + owner: string; + /** + * Either `true` to make the repository private or `false` to make it public. Creating private repositories requires a paid GitHub account. Default: `false`. + * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://help.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://help.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. + */ + private?: boolean; + + repo: string; + }; + export type ReposUpdateBranchProtectionParams = { + branch: string; + /** + * Enforce all configured restrictions for administrators. Set to `true` to enforce required status checks for repository administrators. Set to `null` to disable. + */ + enforce_admins: boolean | null; + + owner: string; + + repo: string; + /** + * Require at least one approving review on a pull request, before merging. Set to `null` to disable. + */ + required_pull_request_reviews: ReposUpdateBranchProtectionParamsRequiredPullRequestReviews | null; + /** + * Require status checks to pass before merging. Set to `null` to disable. + */ + required_status_checks: ReposUpdateBranchProtectionParamsRequiredStatusChecks | null; + /** + * Restrict who can push to this branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable. + */ + restrictions: ReposUpdateBranchProtectionParamsRestrictions | null; + }; + export type ReposUpdateCommitCommentParams = { + /** + * The contents of the comment + */ + body: string; + + comment_id: number; + + owner: string; + + repo: string; + }; + export type ReposUpdateFileParams = { + /** + * The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. + */ + author?: ReposUpdateFileParamsAuthor; + /** + * The branch name. Default: the repository’s default branch (usually `master`) + */ + branch?: string; + /** + * The person that committed the file. Default: the authenticated user. + */ + committer?: ReposUpdateFileParamsCommitter; + /** + * The new file content, using Base64 encoding. + */ + content: string; + /** + * The commit message. + */ + message: string; + + owner: string; + + path: string; + + repo: string; + /** + * **Required if you are updating a file**. The blob SHA of the file being replaced. + */ + sha?: string; + }; + export type ReposUpdateHookParams = { + /** + * Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + */ + active?: boolean; + /** + * Determines a list of events to be added to the list of events that the Hook triggers for. + */ + add_events?: string[]; + /** + * Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/repos/hooks/#create-hook-config-params). + */ + config?: ReposUpdateHookParamsConfig; + /** + * Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. This replaces the entire array of events. + */ + events?: string[]; + + hook_id: number; + + owner: string; + /** + * Determines a list of events to be removed from the list of events that the Hook triggers for. + */ + remove_events?: string[]; + + repo: string; + }; + export type ReposUpdateInformationAboutPagesSiteParams = { + /** + * Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see "[Using a custom domain with GitHub Pages](https://help.github.com/articles/using-a-custom-domain-with-github-pages/)." + */ + cname?: string; + + owner: string; + + repo: string; + /** + * Update the source for the repository. Must include the branch name, and may optionally specify the subdirectory `/docs`. Possible values are `"gh-pages"`, `"master"`, and `"master /docs"`. + */ + source?: '"gh-pages"' | '"master"' | '"master /docs"'; + }; + export type ReposUpdateInvitationParams = { + invitation_id: number; + + owner: string; + /** + * The permissions that the associated user will have on the repository. Valid values are `read`, `write`, and `admin`. + */ + permissions?: "read" | "write" | "admin"; + + repo: string; + }; + export type ReposUpdateProtectedBranchPullRequestReviewEnforcementParams = { + branch: string; + /** + * Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. + */ + dismiss_stale_reviews?: boolean; + /** + * Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. + */ + dismissal_restrictions?: ReposUpdateProtectedBranchPullRequestReviewEnforcementParamsDismissalRestrictions; + + owner: string; + + repo: string; + /** + * Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) have reviewed. + */ + require_code_owner_reviews?: boolean; + /** + * Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6. + */ + required_approving_review_count?: number; + }; + export type ReposUpdateProtectedBranchRequiredStatusChecksParams = { + branch: string; + /** + * The list of status checks to require in order to merge into this branch + */ + contexts?: string[]; + + owner: string; + + repo: string; + /** + * Require branches to be up to date before merging. + */ + strict?: boolean; + }; + export type ReposUpdateReleaseParams = { + /** + * Text describing the contents of the tag. + */ + body?: string; + /** + * `true` makes the release a draft, and `false` publishes the release. + */ + draft?: boolean; + /** + * The name of the release. + */ + name?: string; + + owner: string; + /** + * `true` to identify the release as a prerelease, `false` to identify the release as a full release. + */ + prerelease?: boolean; + + release_id: number; + + repo: string; + /** + * The name of the tag. + */ + tag_name?: string; + /** + * Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). + */ + target_commitish?: string; + }; + export type ReposUpdateReleaseAssetParams = { + asset_id: number; + /** + * An alternate short description of the asset. Used in place of the filename. + */ + label?: string; + /** + * The file name of the asset. + */ + name?: string; + + owner: string; + + repo: string; + }; + export type ReposUploadReleaseAssetParams = { + file: string | object; + + headers: ReposUploadReleaseAssetParamsHeaders; + /** + * An alternate short description of the asset. Used in place of the filename. This should be set in a URI query parameter. + */ + label?: string; + /** + * The file name of the asset. This should be set in a URI query parameter. + */ + name: string; + /** + * The `upload_url` key returned from creating or getting a release + */ + url: string; + }; + export type SearchCodeParams = { + /** + * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + */ + order?: "desc" | "asc"; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching code](https://help.github.com/articles/searching-code/)" for a detailed list of qualifiers. + */ + q: string; + /** + * Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub search infrastructure. Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) + */ + sort?: "indexed"; + }; + export type SearchCommitsParams = { + /** + * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + */ + order?: "desc" | "asc"; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching commits](https://help.github.com/articles/searching-commits/)" for a detailed list of qualifiers. + */ + q: string; + /** + * Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) + */ + sort?: "author-date" | "committer-date"; + }; + export type SearchIssuesParams = { + /** + * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + */ + order?: "desc" | "asc"; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching issues and pull requests](https://help.github.com/articles/searching-issues-and-pull-requests/)" for a detailed list of qualifiers. + */ + q: string; + /** + * Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) + */ + sort?: + | "comments" + | "reactions" + | "reactions-+1" + | "reactions--1" + | "reactions-smile" + | "reactions-thinking_face" + | "reactions-heart" + | "reactions-tada" + | "interactions" + | "created" + | "updated"; + }; + export type SearchIssuesAndPullRequestsParams = { + /** + * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + */ + order?: "desc" | "asc"; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching issues and pull requests](https://help.github.com/articles/searching-issues-and-pull-requests/)" for a detailed list of qualifiers. + */ + q: string; + /** + * Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) + */ + sort?: + | "comments" + | "reactions" + | "reactions-+1" + | "reactions--1" + | "reactions-smile" + | "reactions-thinking_face" + | "reactions-heart" + | "reactions-tada" + | "interactions" + | "created" + | "updated"; + }; + export type SearchLabelsParams = { + /** + * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + */ + order?: "desc" | "asc"; + /** + * The search keywords. This endpoint does not accept qualifiers in the query. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). + */ + q: string; + /** + * The id of the repository. + */ + repository_id: number; + /** + * Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) + */ + sort?: "created" | "updated"; + }; + export type SearchReposParams = { + /** + * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + */ + order?: "desc" | "asc"; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching for repositories](https://help.github.com/articles/searching-for-repositories/)" for a detailed list of qualifiers. + */ + q: string; + /** + * Sorts the results of your query by number of `stars`, `forks`, or `help-wanted-issues` or how recently the items were `updated`. Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) + */ + sort?: "stars" | "forks" | "help-wanted-issues" | "updated"; + }; + export type SearchTopicsParams = { + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). + */ + q: string; + }; + export type SearchUsersParams = { + /** + * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + */ + order?: "desc" | "asc"; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching users](https://help.github.com/articles/searching-users/)" for a detailed list of qualifiers. + */ + q: string; + /** + * Sorts the results of your query by number of `followers` or `repositories`, or when the person `joined` GitHub. Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) + */ + sort?: "followers" | "repositories" | "joined"; + }; + export type TeamsAddMemberParams = { + team_id: number; + + username: string; + }; + export type TeamsAddOrUpdateMembershipParams = { + /** + * The role that this user should have in the team. Can be one of: + * \* `member` - a normal member of the team. + * \* `maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description. + */ + role?: "member" | "maintainer"; + + team_id: number; + + username: string; + }; + export type TeamsAddOrUpdateProjectParams = { + /** + * The permission to grant to the team for this project. Can be one of: + * \* `read` - team members can read, but not write to or administer this project. + * \* `write` - team members can read and write, but not administer this project. + * \* `admin` - team members can read, write and administer this project. + * Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + * **Note**: If you pass the `hellcat-preview` media type, you can promote—but not demote—a `permission` attribute inherited from a parent team. + */ + permission?: "read" | "write" | "admin"; + + project_id: number; + + team_id: number; + }; + export type TeamsAddOrUpdateRepoParams = { + owner: string; + /** + * The permission to grant the team on this repository. Can be one of: + * \* `pull` - team members can pull, but not push to or administer this repository. + * \* `push` - team members can pull and push, but not administer this repository. + * \* `admin` - team members can pull, push and administer this repository. + * + * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + * **Note**: If you pass the `hellcat-preview` media type, you can promote—but not demote—a `permission` attribute inherited through a parent team. + */ + permission?: "pull" | "push" | "admin"; + + repo: string; + + team_id: number; + }; + export type TeamsCheckManagesRepoParams = { + owner: string; + + repo: string; + + team_id: number; + }; + export type TeamsCreateParamsDeprecatedPermission = { + /** + * The description of the team. + */ + description?: string; + /** + * The logins of organization members to add as maintainers of the team. + */ + maintainers?: string[]; + /** + * The name of the team. + */ + name: string; + + org: string; + /** + * The ID of a team to set as the parent team. **Note**: You must pass the `hellcat-preview` media type to use this parameter. + */ + parent_team_id?: number; + /** + * **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: + * \* `pull` - team members can pull, but not push to or administer newly-added repositories. + * \* `push` - team members can pull and push, but not administer newly-added repositories. + * \* `admin` - team members can pull, push and administer newly-added repositories. + * @deprecated "permission" parameter has been deprecated and will be removed in future + */ + permission?: string; + /** + * The level of privacy this team should have. The options are: + * **For a non-nested team:** + * \* `secret` - only visible to organization owners and members of this team. + * \* `closed` - visible to all members of this organization. + * Default: `secret` + * **For a parent or child team:** + * \* `closed` - visible to all members of this organization. + * Default for child team: `closed` + * **Note**: You must pass the `hellcat-preview` media type to set privacy default to `closed` for child teams. + */ + privacy?: "secret" | "closed"; + /** + * The full name (e.g., "organization-name/repository-name") of repositories to add the team to. + */ + repo_names?: string[]; + }; + export type TeamsCreateParams = { + /** + * The description of the team. + */ + description?: string; + /** + * The logins of organization members to add as maintainers of the team. + */ + maintainers?: string[]; + /** + * The name of the team. + */ + name: string; + + org: string; + /** + * The ID of a team to set as the parent team. **Note**: You must pass the `hellcat-preview` media type to use this parameter. + */ + parent_team_id?: number; + /** + * The level of privacy this team should have. The options are: + * **For a non-nested team:** + * \* `secret` - only visible to organization owners and members of this team. + * \* `closed` - visible to all members of this organization. + * Default: `secret` + * **For a parent or child team:** + * \* `closed` - visible to all members of this organization. + * Default for child team: `closed` + * **Note**: You must pass the `hellcat-preview` media type to set privacy default to `closed` for child teams. + */ + privacy?: "secret" | "closed"; + /** + * The full name (e.g., "organization-name/repository-name") of repositories to add the team to. + */ + repo_names?: string[]; + }; + export type TeamsCreateDiscussionParams = { + /** + * The discussion post's body text. + */ + body: string; + /** + * Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. + */ + private?: boolean; + + team_id: number; + /** + * The discussion post's title. + */ + title: string; + }; + export type TeamsCreateDiscussionCommentParams = { + /** + * The discussion comment's body text. + */ + body: string; + + discussion_number: number; + + team_id: number; + }; + export type TeamsDeleteParams = { + team_id: number; + }; + export type TeamsDeleteDiscussionParams = { + discussion_number: number; + + team_id: number; + }; + export type TeamsDeleteDiscussionCommentParams = { + comment_number: number; + + discussion_number: number; + + team_id: number; + }; + export type TeamsGetParams = { + team_id: number; + }; + export type TeamsGetByNameParams = { + org: string; + + team_slug: string; + }; + export type TeamsGetDiscussionParams = { + discussion_number: number; + + team_id: number; + }; + export type TeamsGetDiscussionCommentParams = { + comment_number: number; + + discussion_number: number; + + team_id: number; + }; + export type TeamsGetMemberParams = { + team_id: number; + + username: string; + }; + export type TeamsGetMembershipParams = { + team_id: number; + + username: string; + }; + export type TeamsListParams = { + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type TeamsListChildParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + team_id: number; + }; + export type TeamsListDiscussionCommentsParams = { + /** + * Sorts the discussion comments by the date they were created. To return the oldest comments first, set to `asc`. Can be one of `asc` or `desc`. + */ + direction?: "asc" | "desc"; + + discussion_number: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + team_id: number; + }; + export type TeamsListDiscussionsParams = { + /** + * Sorts the discussion comments by the date they were created. To return the oldest comments first, set to `asc`. Can be one of `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + team_id: number; + }; + export type TeamsListForAuthenticatedUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type TeamsListMembersParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Filters members returned by their role in the team. Can be one of: + * \* `member` - normal members of the team. + * \* `maintainer` - team maintainers. + * \* `all` - all members of the team. + */ + role?: "member" | "maintainer" | "all"; + + team_id: number; + }; + export type TeamsListPendingInvitationsParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + team_id: number; + }; + export type TeamsListProjectsParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + team_id: number; + }; + export type TeamsListReposParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + team_id: number; + }; + export type TeamsRemoveMemberParams = { + team_id: number; + + username: string; + }; + export type TeamsRemoveMembershipParams = { + team_id: number; + + username: string; + }; + export type TeamsRemoveProjectParams = { + project_id: number; + + team_id: number; + }; + export type TeamsRemoveRepoParams = { + owner: string; + + repo: string; + + team_id: number; + }; + export type TeamsReviewProjectParams = { + project_id: number; + + team_id: number; + }; + export type TeamsUpdateParamsDeprecatedPermission = { + /** + * The description of the team. + */ + description?: string; + /** + * The name of the team. + */ + name: string; + /** + * The ID of a team to set as the parent team. **Note**: You must pass the `hellcat-preview` media type to use this parameter. + */ + parent_team_id?: number; + /** + * **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: + * \* `pull` - team members can pull, but not push to or administer newly-added repositories. + * \* `push` - team members can pull and push, but not administer newly-added repositories. + * \* `admin` - team members can pull, push and administer newly-added repositories. + * @deprecated "permission" parameter has been deprecated and will be removed in future + */ + permission?: string; + /** + * The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. The options are: + * **For a non-nested team:** + * \* `secret` - only visible to organization owners and members of this team. + * \* `closed` - visible to all members of this organization. + * **For a parent or child team:** + * \* `closed` - visible to all members of this organization. + */ + privacy?: "secret" | "closed"; + + team_id: number; + }; + export type TeamsUpdateParams = { + /** + * The description of the team. + */ + description?: string; + /** + * The name of the team. + */ + name: string; + /** + * The ID of a team to set as the parent team. **Note**: You must pass the `hellcat-preview` media type to use this parameter. + */ + parent_team_id?: number; + /** + * The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. The options are: + * **For a non-nested team:** + * \* `secret` - only visible to organization owners and members of this team. + * \* `closed` - visible to all members of this organization. + * **For a parent or child team:** + * \* `closed` - visible to all members of this organization. + */ + privacy?: "secret" | "closed"; + + team_id: number; + }; + export type TeamsUpdateDiscussionParams = { + /** + * The discussion post's body text. + */ + body?: string; + + discussion_number: number; + + team_id: number; + /** + * The discussion post's title. + */ + title?: string; + }; + export type TeamsUpdateDiscussionCommentParams = { + /** + * The discussion comment's body text. + */ + body: string; + + comment_number: number; + + discussion_number: number; + + team_id: number; + }; + export type UsersAddEmailsParams = { + /** + * Adds one or more email addresses to your GitHub account. Must contain at least one email address. **Note:** Alternatively, you can pass a single email address or an `array` of emails addresses directly, but we recommend that you pass an object using the `emails` key. + */ + emails: string[]; + }; + export type UsersBlockParams = { + username: string; + }; + export type UsersCheckBlockedParams = { + username: string; + }; + export type UsersCheckFollowingParams = { + username: string; + }; + export type UsersCheckFollowingForUserParams = { + target_user: string; + + username: string; + }; + export type UsersCreateGpgKeyParams = { + /** + * Your GPG key, generated in ASCII-armored format. See "[Generating a new GPG key](https://help.github.com/articles/generating-a-new-gpg-key/)" for help creating a GPG key. + */ + armored_public_key?: string; + }; + export type UsersCreatePublicKeyParams = { + /** + * The public SSH key to add to your GitHub account. See "[Generating a new SSH key](https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/)" for guidance on how to create a public SSH key. + */ + key?: string; + /** + * A descriptive name for the new key. Use a name that will help you recognize this key in your GitHub account. For example, if you're using a personal Mac, you might call this key "Personal MacBook Air". + */ + title?: string; + }; + export type UsersDeleteEmailsParams = { + /** + * Deletes one or more email addresses from your GitHub account. Must contain at least one email address. **Note:** Alternatively, you can pass a single email address or an `array` of emails addresses directly, but we recommend that you pass an object using the `emails` key. + */ + emails: string[]; + }; + export type UsersDeleteGpgKeyParams = { + gpg_key_id: number; + }; + export type UsersDeletePublicKeyParams = { + key_id: number; + }; + export type UsersFollowParams = { + username: string; + }; + export type UsersGetByUsernameParams = { + username: string; + }; + export type UsersGetContextForUserParams = { + /** + * Uses the ID for the `subject_type` you specified. **Required** when using `subject_type`. + */ + subject_id?: string; + /** + * Identifies which additional information you'd like to receive about the person's hovercard. Can be `organization`, `repository`, `issue`, `pull_request`. **Required** when using `subject_id`. + */ + subject_type?: "organization" | "repository" | "issue" | "pull_request"; + + username: string; + }; + export type UsersGetGpgKeyParams = { + gpg_key_id: number; + }; + export type UsersGetPublicKeyParams = { + key_id: number; + }; + export type UsersListParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * The integer ID of the last User that you've seen. + */ + since?: string; + }; + export type UsersListEmailsParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type UsersListFollowersForAuthenticatedUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type UsersListFollowersForUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + username: string; + }; + export type UsersListFollowingForAuthenticatedUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type UsersListFollowingForUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + username: string; + }; + export type UsersListGpgKeysParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type UsersListGpgKeysForUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + username: string; + }; + export type UsersListPublicEmailsParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type UsersListPublicKeysParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + }; + export type UsersListPublicKeysForUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + username: string; + }; + export type UsersTogglePrimaryEmailVisibilityParams = { + /** + * Specify the _primary_ email address that needs a visibility change. + */ + email: string; + /** + * Use `public` to enable an authenticated user to view the specified email address, or use `private` so this primary email address cannot be seen publicly. + */ + visibility: string; + }; + export type UsersUnblockParams = { + username: string; + }; + export type UsersUnfollowParams = { + username: string; + }; + export type UsersUpdateAuthenticatedParams = { + /** + * The new short biography of the user. + */ + bio?: string; + /** + * The new blog URL of the user. + */ + blog?: string; + /** + * The new company of the user. + */ + company?: string; + /** + * The publicly visible email address of the user. + */ + email?: string; + /** + * The new hiring availability of the user. + */ + hireable?: boolean; + /** + * The new location of the user. + */ + location?: string; + /** + * The new name of the user. + */ + name?: string; + }; + + // child param types + export type AppsCreateInstallationTokenParamsPermissions = {}; + export type ChecksCreateParamsActions = { + description: string; + identifier: string; + label: string; + }; + export type ChecksCreateParamsOutput = { + annotations?: ChecksCreateParamsOutputAnnotations[]; + images?: ChecksCreateParamsOutputImages[]; + summary: string; + text?: string; + title: string; + }; + export type ChecksCreateParamsOutputAnnotations = { + annotation_level: "notice" | "warning" | "failure"; + end_column?: number; + end_line: number; + message: string; + path: string; + raw_details?: string; + start_column?: number; + start_line: number; + title?: string; + }; + export type ChecksCreateParamsOutputImages = { + alt: string; + caption?: string; + image_url: string; + }; + export type ChecksSetSuitesPreferencesParamsAutoTriggerChecks = { + app_id: number; + setting: boolean; + }; + export type ChecksUpdateParamsActions = { + description: string; + identifier: string; + label: string; + }; + export type ChecksUpdateParamsOutput = { + annotations?: ChecksUpdateParamsOutputAnnotations[]; + images?: ChecksUpdateParamsOutputImages[]; + summary: string; + text?: string; + title?: string; + }; + export type ChecksUpdateParamsOutputAnnotations = { + annotation_level: "notice" | "warning" | "failure"; + end_column?: number; + end_line: number; + message: string; + path: string; + raw_details?: string; + start_column?: number; + start_line: number; + title?: string; + }; + export type ChecksUpdateParamsOutputImages = { + alt: string; + caption?: string; + image_url: string; + }; + export type GistsCreateParamsFiles = { + content?: string; + }; + export type GistsUpdateParamsFiles = { + content?: string; + filename?: string; + }; + export type GitCreateCommitParamsAuthor = { + date?: string; + email?: string; + name?: string; + }; + export type GitCreateCommitParamsCommitter = { + date?: string; + email?: string; + name?: string; + }; + export type GitCreateTagParamsTagger = { + date?: string; + email?: string; + name?: string; + }; + export type GitCreateTreeParamsTree = { + content?: string; + mode?: "100644" | "100755" | "040000" | "160000" | "120000"; + path?: string; + sha?: string; + type?: "blob" | "tree" | "commit"; + }; + export type OrgsCreateHookParamsConfig = { + content_type?: string; + insecure_ssl?: string; + secret?: string; + url: string; + }; + export type OrgsUpdateHookParamsConfig = { + content_type?: string; + insecure_ssl?: string; + secret?: string; + url: string; + }; + export type PullsCreateReviewParamsComments = { + body: string; + path: string; + position: number; + }; + export type ReposCreateDispatchEventParamsClientPayload = {}; + export type ReposCreateFileParamsAuthor = { + email: string; + name: string; + }; + export type ReposCreateFileParamsCommitter = { + email: string; + name: string; + }; + export type ReposCreateHookParamsConfig = { + content_type?: string; + insecure_ssl?: string; + secret?: string; + url: string; + }; + export type ReposCreateOrUpdateFileParamsAuthor = { + email: string; + name: string; + }; + export type ReposCreateOrUpdateFileParamsCommitter = { + email: string; + name: string; + }; + export type ReposDeleteFileParamsAuthor = { + email?: string; + name?: string; + }; + export type ReposDeleteFileParamsCommitter = { + email?: string; + name?: string; + }; + export type ReposEnablePagesSiteParamsSource = { + branch?: "master" | "gh-pages"; + path?: string; + }; + export type ReposUpdateBranchProtectionParamsRequiredPullRequestReviews = { + dismiss_stale_reviews?: boolean; + dismissal_restrictions?: ReposUpdateBranchProtectionParamsRequiredPullRequestReviewsDismissalRestrictions; + require_code_owner_reviews?: boolean; + required_approving_review_count?: number; + }; + export type ReposUpdateBranchProtectionParamsRequiredPullRequestReviewsDismissalRestrictions = { + teams?: string[]; + users?: string[]; + }; + export type ReposUpdateBranchProtectionParamsRequiredStatusChecks = { + contexts: string[]; + strict: boolean; + }; + export type ReposUpdateBranchProtectionParamsRestrictions = { + apps?: string[]; + teams: string[]; + users: string[]; + }; + export type ReposUpdateFileParamsAuthor = { + email: string; + name: string; + }; + export type ReposUpdateFileParamsCommitter = { + email: string; + name: string; + }; + export type ReposUpdateHookParamsConfig = { + content_type?: string; + insecure_ssl?: string; + secret?: string; + url: string; + }; + export type ReposUpdateProtectedBranchPullRequestReviewEnforcementParamsDismissalRestrictions = { + teams?: string[]; + users?: string[]; + }; + export type ReposUploadReleaseAssetParamsHeaders = { + "content-length": number; + "content-type": string; + }; +} + +declare class Octokit { + constructor(options?: Octokit.Options); + authenticate(auth: Octokit.AuthBasic): void; + authenticate(auth: Octokit.AuthOAuthToken): void; + authenticate(auth: Octokit.AuthOAuthSecret): void; + authenticate(auth: Octokit.AuthUserToken): void; + authenticate(auth: Octokit.AuthJWT): void; + + hook: { + before( + name: string, + callback: (options: Octokit.HookOptions) => void + ): void; + after( + name: string, + callback: ( + response: Octokit.Response, + options: Octokit.HookOptions + ) => void + ): void; + error( + name: string, + callback: (error: Octokit.HookError, options: Octokit.HookOptions) => void + ): void; + wrap( + name: string, + callback: ( + request: ( + options: Octokit.HookOptions + ) => Promise>, + options: Octokit.HookOptions + ) => void + ): void; + }; + + static plugin(plugin: Octokit.Plugin | Octokit.Plugin[]): Octokit.Static; + + registerEndpoints(endpoints: { + [scope: string]: Octokit.EndpointOptions; + }): void; + + request: Octokit.Request; + + paginate: Octokit.Paginate; + + log: Octokit.Log; + + activity: { + /** + * Requires for the user to be authenticated. + */ + checkStarringRepo: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityCheckStarringRepoParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * This endpoint should only be used to stop watching a repository. To control whether or not you wish to receive notifications from a repository, [set the repository's subscription manually](https://developer.github.com/v3/activity/watching/#set-a-repository-subscription). + */ + deleteRepoSubscription: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityDeleteRepoSubscriptionParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Mutes all future notifications for a conversation until you comment on the thread or get **@mention**ed. + */ + deleteThreadSubscription: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityDeleteThreadSubscriptionParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + getRepoSubscription: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityGetRepoSubscriptionParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + getThread: { + ( + params?: Octokit.RequestOptions & Octokit.ActivityGetThreadParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://developer.github.com/v3/activity/watching/#get-a-repository-subscription). + * + * Note that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were **@mentioned**, or manually subscribe to a thread. + */ + getThreadSubscription: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityGetThreadSubscriptionParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This is the user's organization dashboard. You must be authenticated as the user to view this. + */ + listEventsForOrg: { + ( + params?: Octokit.RequestOptions & Octokit.ActivityListEventsForOrgParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. + */ + listEventsForUser: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityListEventsForUserParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * GitHub provides several timeline resources in [Atom](http://en.wikipedia.org/wiki/Atom_(standard)) format. The Feeds API lists all the feeds available to the authenticated user: + * + * * **Timeline**: The GitHub global public timeline + * * **User**: The public timeline for any user, using [URI template](https://developer.github.com/v3/#hypermedia) + * * **Current user public**: The public timeline for the authenticated user + * * **Current user**: The private timeline for the authenticated user + * * **Current user actor**: The private timeline for activity created by the authenticated user + * * **Current user organizations**: The private timeline for the organizations the authenticated user is a member of. + * * **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub. + * + * **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://developer.github.com/v3/#basic-authentication) since current feed URIs use the older, non revocable auth tokens. + */ + listFeeds: { + (params?: Octokit.RequestOptions & Octokit.EmptyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List all notifications for the current user, sorted by most recently updated. + * + * The following example uses the `since` parameter to list notifications that have been updated after the specified time. + */ + listNotifications: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityListNotificationsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * List all notifications for the current user. + */ + listNotificationsForRepo: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityListNotificationsForRepoParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago. + */ + listPublicEvents: { + ( + params?: Octokit.RequestOptions & Octokit.ActivityListPublicEventsParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + listPublicEventsForOrg: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityListPublicEventsForOrgParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + listPublicEventsForRepoNetwork: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityListPublicEventsForRepoNetworkParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + listPublicEventsForUser: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityListPublicEventsForUserParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * These are events that you've received by watching repos and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events. + */ + listReceivedEventsForUser: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityListReceivedEventsForUserParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + listReceivedPublicEventsForUser: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityListReceivedPublicEventsForUserParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + listRepoEvents: { + ( + params?: Octokit.RequestOptions & Octokit.ActivityListRepoEventsParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * You can also find out _when_ stars were created by passing the following custom [media type](https://developer.github.com/v3/media/) via the `Accept` header: + */ + listReposStarredByAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityListReposStarredByAuthenticatedUserParams + ): Promise< + Octokit.Response< + Octokit.ActivityListReposStarredByAuthenticatedUserResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * You can also find out _when_ stars were created by passing the following custom [media type](https://developer.github.com/v3/media/) via the `Accept` header: + */ + listReposStarredByUser: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityListReposStarredByUserParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listReposWatchedByUser: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityListReposWatchedByUserParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * You can also find out _when_ stars were created by passing the following custom [media type](https://developer.github.com/v3/media/) via the `Accept` header: + */ + listStargazersForRepo: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityListStargazersForRepoParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listWatchedReposForAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityListWatchedReposForAuthenticatedUserParams + ): Promise< + Octokit.Response< + Octokit.ActivityListWatchedReposForAuthenticatedUserResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + + listWatchersForRepo: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityListWatchersForRepoParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Marks a notification as "read" removes it from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List your notifications](https://developer.github.com/v3/activity/notifications/#list-your-notifications) endpoint and pass the query parameter `all=false`. + */ + markAsRead: { + ( + params?: Octokit.RequestOptions & Octokit.ActivityMarkAsReadParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Marks all notifications in a repository as "read" removes them from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List your notifications in a repository](https://developer.github.com/v3/activity/notifications/#list-your-notifications-in-a-repository) endpoint and pass the query parameter `all=false`. + */ + markNotificationsAsReadForRepo: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivityMarkNotificationsAsReadForRepoParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + markThreadAsRead: { + ( + params?: Octokit.RequestOptions & Octokit.ActivityMarkThreadAsReadParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * If you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://developer.github.com/v3/activity/watching/#delete-a-repository-subscription) completely. + */ + setRepoSubscription: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivitySetRepoSubscriptionParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * This lets you subscribe or unsubscribe from a conversation. + */ + setThreadSubscription: { + ( + params?: Octokit.RequestOptions & + Octokit.ActivitySetThreadSubscriptionParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Requires for the user to be authenticated. + * + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + */ + starRepo: { + ( + params?: Octokit.RequestOptions & Octokit.ActivityStarRepoParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Requires for the user to be authenticated. + */ + unstarRepo: { + ( + params?: Octokit.RequestOptions & Octokit.ActivityUnstarRepoParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + }; + apps: { + /** + * Add a single repository to an installation. The authenticated user must have admin access to the repository. + * + * You must use a personal access token (which you can create via the [command line](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization)) or [Basic Authentication](https://developer.github.com/v3/auth/#basic-authentication) to access this endpoint. + */ + addRepoToInstallation: { + ( + params?: Octokit.RequestOptions & + Octokit.AppsAddRepoToInstallationParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. + */ + checkAccountIsAssociatedWithAny: { + ( + params?: Octokit.RequestOptions & + Octokit.AppsCheckAccountIsAssociatedWithAnyParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. + */ + checkAccountIsAssociatedWithAnyStubbed: { + ( + params?: Octokit.RequestOptions & + Octokit.AppsCheckAccountIsAssociatedWithAnyStubbedParams + ): Promise< + Octokit.Response< + Octokit.AppsCheckAccountIsAssociatedWithAnyStubbedResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. + * @deprecated octokit.apps.checkAuthorization() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#check-an-authorization + */ + checkAuthorization: { + ( + params?: Octokit.RequestOptions & Octokit.AppsCheckAuthorizationParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. + */ + checkToken: { + (params?: Octokit.RequestOptions & Octokit.AppsCheckTokenParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` of the content reference from the [`content_reference` event](https://developer.github.com/v3/activity/events/types/#contentreferenceevent) to create an attachment. + * + * The app must create a content attachment within six hours of the content reference URL being posted. See "[Using content attachments](https://developer.github.com/apps/using-content-attachments/)" for details about content attachments. + * + * You must use an [installation access token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + * + * This example creates a content attachment for the domain `https://errors.ai/`. + */ + createContentAttachment: { + ( + params?: Octokit.RequestOptions & + Octokit.AppsCreateContentAttachmentParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://developer.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/). When you create a GitHub App with the manifest flow, you receive a temporary `code` used to retrieve the GitHub App's `id`, `pem` (private key), and `webhook_secret`. + */ + createFromManifest: { + ( + params?: Octokit.RequestOptions & Octokit.AppsCreateFromManifestParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. + * + * By default the installation token has access to all repositories that the installation can access. To restrict the access to specific repositories, you can provide the `repository_ids` when creating the token. When you omit `repository_ids`, the response does not contain the `repositories` key. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * + * This example grants the token "Read and write" permission to `issues` and "Read" permission to `contents`, and restricts the token's access to the repository with an `id` of 1296269. + */ + createInstallationToken: { + ( + params?: Octokit.RequestOptions & + Octokit.AppsCreateInstallationTokenParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. + * + * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). + */ + deleteAuthorization: { + ( + params?: Octokit.RequestOptions & Octokit.AppsDeleteAuthorizationParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Uninstalls a GitHub App on a user, organization, or business account. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + deleteInstallation: { + ( + params?: Octokit.RequestOptions & Octokit.AppsDeleteInstallationParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. + */ + deleteToken: { + ( + params?: Octokit.RequestOptions & Octokit.AppsDeleteTokenParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Enables an authenticated GitHub App to find the organization's installation information. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * @deprecated octokit.apps.findOrgInstallation() has been renamed to octokit.apps.getOrgInstallation() (2019-04-10) + */ + findOrgInstallation: { + ( + params?: Octokit.RequestOptions & Octokit.AppsFindOrgInstallationParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * @deprecated octokit.apps.findRepoInstallation() has been renamed to octokit.apps.getRepoInstallation() (2019-04-10) + */ + findRepoInstallation: { + ( + params?: Octokit.RequestOptions & Octokit.AppsFindRepoInstallationParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Enables an authenticated GitHub App to find the user’s installation information. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * @deprecated octokit.apps.findUserInstallation() has been renamed to octokit.apps.getUserInstallation() (2019-04-10) + */ + findUserInstallation: { + ( + params?: Octokit.RequestOptions & Octokit.AppsFindUserInstallationParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Returns the GitHub App associated with the authentication credentials used. To see how many app installations are associated with this GitHub App, see the `installations_count` in the response. For more details about your app's installations, see the "[List installations](https://developer.github.com/v3/apps/#list-installations)" endpoint. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + getAuthenticated: { + (params?: Octokit.RequestOptions & Octokit.EmptyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). + * + * If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + getBySlug: { + (params?: Octokit.RequestOptions & Octokit.AppsGetBySlugParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + getInstallation: { + ( + params?: Octokit.RequestOptions & Octokit.AppsGetInstallationParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Enables an authenticated GitHub App to find the organization's installation information. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + getOrgInstallation: { + ( + params?: Octokit.RequestOptions & Octokit.AppsGetOrgInstallationParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + getRepoInstallation: { + ( + params?: Octokit.RequestOptions & Octokit.AppsGetRepoInstallationParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Enables an authenticated GitHub App to find the user’s installation information. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + getUserInstallation: { + ( + params?: Octokit.RequestOptions & Octokit.AppsGetUserInstallationParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Returns any accounts associated with a plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. + */ + listAccountsUserOrOrgOnPlan: { + ( + params?: Octokit.RequestOptions & + Octokit.AppsListAccountsUserOrOrgOnPlanParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Returns any accounts associated with a plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. + */ + listAccountsUserOrOrgOnPlanStubbed: { + ( + params?: Octokit.RequestOptions & + Octokit.AppsListAccountsUserOrOrgOnPlanStubbedParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access for an installation. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + * + * You must use a [user-to-server OAuth access token](https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. + * + * The access the user has to each repository is included in the hash under the `permissions` key. + */ + listInstallationReposForAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.AppsListInstallationReposForAuthenticatedUserParams + ): Promise< + Octokit.Response< + Octokit.AppsListInstallationReposForAuthenticatedUserResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * + * The permissions the installation has are included under the `permissions` key. + */ + listInstallations: { + ( + params?: Octokit.RequestOptions & Octokit.AppsListInstallationsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. + * + * You must use a [user-to-server OAuth access token](https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + * + * You can find the permissions for the installation under the `permissions` key. + */ + listInstallationsForAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.AppsListInstallationsForAuthenticatedUserParams + ): Promise< + Octokit.Response< + Octokit.AppsListInstallationsForAuthenticatedUserResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Returns only active subscriptions. You must use a [user-to-server OAuth access token](https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/). + */ + listMarketplacePurchasesForAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.AppsListMarketplacePurchasesForAuthenticatedUserParams + ): Promise< + Octokit.Response< + Octokit.AppsListMarketplacePurchasesForAuthenticatedUserResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Returns only active subscriptions. You must use a [user-to-server OAuth access token](https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/). + */ + listMarketplacePurchasesForAuthenticatedUserStubbed: { + ( + params?: Octokit.RequestOptions & + Octokit.AppsListMarketplacePurchasesForAuthenticatedUserStubbedParams + ): Promise< + Octokit.Response< + Octokit.AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * GitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. + */ + listPlans: { + (params?: Octokit.RequestOptions & Octokit.AppsListPlansParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * GitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. + */ + listPlansStubbed: { + ( + params?: Octokit.RequestOptions & Octokit.AppsListPlansStubbedParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * List repositories that an installation can access. + * + * You must use an [installation access token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + listRepos: { + (params?: Octokit.RequestOptions & Octokit.AppsListReposParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Remove a single repository from an installation. The authenticated user must have admin access to the repository. + * + * You must use a personal access token (which you can create via the [command line](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization)) or [Basic Authentication](https://developer.github.com/v3/auth/#basic-authentication) to access this endpoint. + */ + removeRepoFromInstallation: { + ( + params?: Octokit.RequestOptions & + Octokit.AppsRemoveRepoFromInstallationParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. + * @deprecated octokit.apps.resetAuthorization() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#reset-an-authorization + */ + resetAuthorization: { + ( + params?: Octokit.RequestOptions & Octokit.AppsResetAuthorizationParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. + */ + resetToken: { + (params?: Octokit.RequestOptions & Octokit.AppsResetTokenParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. + * @deprecated octokit.apps.revokeAuthorizationForApplication() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#revoke-an-authorization-for-an-application + */ + revokeAuthorizationForApplication: { + ( + params?: Octokit.RequestOptions & + Octokit.AppsRevokeAuthorizationForApplicationParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid token as `:access_token` and the grant for the token's owner will be deleted. + * + * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the Applications settings page under "Authorized OAuth Apps" on GitHub](https://github.com/settings/applications#authorized). + * @deprecated octokit.apps.revokeGrantForApplication() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#revoke-a-grant-for-an-application + */ + revokeGrantForApplication: { + ( + params?: Octokit.RequestOptions & + Octokit.AppsRevokeGrantForApplicationParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + }; + checks: { + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Creates a new check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to create check runs. + */ + create: { + (params?: Octokit.RequestOptions & Octokit.ChecksCreateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + * + * By default, check suites are automatically created when you create a [check run](https://developer.github.com/v3/checks/runs/). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Set preferences for check suites on a repository](https://developer.github.com/v3/checks/suites/#set-preferences-for-check-suites-on-a-repository)". Your GitHub App must have the `checks:write` permission to create check suites. + */ + createSuite: { + ( + params?: Octokit.RequestOptions & Octokit.ChecksCreateSuiteParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Gets a single check run using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. + */ + get: { + (params?: Octokit.RequestOptions & Octokit.ChecksGetParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + * + * Gets a single check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository. + */ + getSuite: { + (params?: Octokit.RequestOptions & Octokit.ChecksGetSuiteParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists annotations for a check run using the annotation `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get annotations for a check run. OAuth Apps and authenticated users must have the `repo` scope to get annotations for a check run in a private repository. + */ + listAnnotations: { + ( + params?: Octokit.RequestOptions & Octokit.ChecksListAnnotationsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. + */ + listForRef: { + ( + params?: Octokit.RequestOptions & Octokit.ChecksListForRefParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Lists check runs for a check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. + */ + listForSuite: { + ( + params?: Octokit.RequestOptions & Octokit.ChecksListForSuiteParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + * + * Lists check suites for a commit `ref`. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to list check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository. + */ + listSuitesForRef: { + ( + params?: Octokit.RequestOptions & Octokit.ChecksListSuitesForRefParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://developer.github.com/v3/activity/events/types/#checksuiteevent) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * To rerequest a check suite, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + */ + rerequestSuite: { + ( + params?: Octokit.RequestOptions & Octokit.ChecksRerequestSuiteParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Changes the default automatic flow when creating check suites. By default, the CheckSuiteEvent is automatically created each time code is pushed to a repository. When you disable the automatic creation of check suites, you can manually [Create a check suite](https://developer.github.com/v3/checks/suites/#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. + */ + setSuitesPreferences: { + ( + params?: Octokit.RequestOptions & + Octokit.ChecksSetSuitesPreferencesParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Updates a check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to edit check runs. + */ + update: { + (params?: Octokit.RequestOptions & Octokit.ChecksUpdateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + codesOfConduct: { + getConductCode: { + ( + params?: Octokit.RequestOptions & + Octokit.CodesOfConductGetConductCodeParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This method returns the contents of the repository's code of conduct file, if one is detected. + */ + getForRepo: { + ( + params?: Octokit.RequestOptions & Octokit.CodesOfConductGetForRepoParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listConductCodes: { + (params?: Octokit.RequestOptions & Octokit.EmptyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + emojis: { + /** + * Lists all the emojis available to use on GitHub. + */ + get: { + (params?: Octokit.RequestOptions & Octokit.EmptyParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + }; + gists: { + checkIsStarred: { + ( + params?: Octokit.RequestOptions & Octokit.GistsCheckIsStarredParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Allows you to add a new gist with one or more files. + * + * **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. + */ + create: { + (params?: Octokit.RequestOptions & Octokit.GistsCreateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + createComment: { + ( + params?: Octokit.RequestOptions & Octokit.GistsCreateCommentParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + delete: { + (params?: Octokit.RequestOptions & Octokit.GistsDeleteParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + + deleteComment: { + ( + params?: Octokit.RequestOptions & Octokit.GistsDeleteCommentParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note**: This was previously `/gists/:gist_id/fork`. + */ + fork: { + (params?: Octokit.RequestOptions & Octokit.GistsForkParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + get: { + (params?: Octokit.RequestOptions & Octokit.GistsGetParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getComment: { + ( + params?: Octokit.RequestOptions & Octokit.GistsGetCommentParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + getRevision: { + ( + params?: Octokit.RequestOptions & Octokit.GistsGetRevisionParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + list: { + (params?: Octokit.RequestOptions & Octokit.GistsListParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listComments: { + ( + params?: Octokit.RequestOptions & Octokit.GistsListCommentsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listCommits: { + ( + params?: Octokit.RequestOptions & Octokit.GistsListCommitsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listForks: { + (params?: Octokit.RequestOptions & Octokit.GistsListForksParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List all public gists sorted by most recently updated to least recently updated. + * + * Note: With [pagination](https://developer.github.com/v3/#pagination), you can fetch up to 3000 gists. For example, you can fetch 100 pages with 30 gists per page or 30 pages with 100 gists per page. + */ + listPublic: { + ( + params?: Octokit.RequestOptions & Octokit.GistsListPublicParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listPublicForUser: { + ( + params?: Octokit.RequestOptions & Octokit.GistsListPublicForUserParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * List the authenticated user's starred gists: + */ + listStarred: { + ( + params?: Octokit.RequestOptions & Octokit.GistsListStarredParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + */ + star: { + (params?: Octokit.RequestOptions & Octokit.GistsStarParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + + unstar: { + (params?: Octokit.RequestOptions & Octokit.GistsUnstarParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Allows you to update or delete a gist file and rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged. + */ + update: { + (params?: Octokit.RequestOptions & Octokit.GistsUpdateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + updateComment: { + ( + params?: Octokit.RequestOptions & Octokit.GistsUpdateCommentParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + }; + git: { + createBlob: { + (params?: Octokit.RequestOptions & Octokit.GitCreateBlobParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates a new Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects). + * + * In this example, the payload of the signature would be: + * + * + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + createCommit: { + ( + params?: Octokit.RequestOptions & Octokit.GitCreateCommitParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates a reference for your repository. You are unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Empty repositories are repositories without branches. + */ + createRef: { + (params?: Octokit.RequestOptions & Octokit.GitCreateRefParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://developer.github.com/v3/git/refs/#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://developer.github.com/v3/git/refs/#create-a-reference) the tag reference - this call would be unnecessary. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + createTag: { + (params?: Octokit.RequestOptions & Octokit.GitCreateTagParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. + * + * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://developer.github.com/v3/git/commits/#create-a-commit)" and "[Update a reference](https://developer.github.com/v3/git/refs/#update-a-reference)." + */ + createTree: { + (params?: Octokit.RequestOptions & Octokit.GitCreateTreeParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * ``` + * DELETE /repos/octocat/Hello-World/git/refs/heads/feature-a + * ``` + * + * ``` + * DELETE /repos/octocat/Hello-World/git/refs/tags/v1.0 + * ``` + */ + deleteRef: { + (params?: Octokit.RequestOptions & Octokit.GitDeleteRefParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * The `content` in the response will always be Base64 encoded. + * + * _Note_: This API supports blobs up to 100 megabytes in size. + */ + getBlob: { + (params?: Octokit.RequestOptions & Octokit.GitGetBlobParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Gets a Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects). + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + getCommit: { + (params?: Octokit.RequestOptions & Octokit.GitGetCommitParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. + * + * **Note:** You need to explicitly [request a pull request](https://developer.github.com/v3/pulls/#get-a-single-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://developer.github.com/v3/git/#checking-mergeability-of-pull-requests)". + * + * To get the reference for a branch named `skunkworkz/featureA`, the endpoint route is: + */ + getRef: { + (params?: Octokit.RequestOptions & Octokit.GitGetRefParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + getTag: { + (params?: Octokit.RequestOptions & Octokit.GitGetTagParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * If `truncated` is `true`, the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, you can clone the repository and iterate over the Git data locally. + */ + getTree: { + (params?: Octokit.RequestOptions & Octokit.GitGetTreeParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array. + * + * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. + * + * **Note:** You need to explicitly [request a pull request](https://developer.github.com/v3/pulls/#get-a-single-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://developer.github.com/v3/git/#checking-mergeability-of-pull-requests)". + * + * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. + */ + listMatchingRefs: { + ( + params?: Octokit.RequestOptions & Octokit.GitListMatchingRefsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Returns an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. If there are no references to list, a `404` is returned. + */ + listRefs: { + (params?: Octokit.RequestOptions & Octokit.GitListRefsParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + + updateRef: { + (params?: Octokit.RequestOptions & Octokit.GitUpdateRefParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + gitignore: { + /** + * The API also allows fetching the source of a single template. + * + * Use the raw [media type](https://developer.github.com/v3/media/) to get the raw contents. + */ + getTemplate: { + ( + params?: Octokit.RequestOptions & Octokit.GitignoreGetTemplateParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * List all templates available to pass as an option when [creating a repository](https://developer.github.com/v3/repos/#create). + */ + listTemplates: { + (params?: Octokit.RequestOptions & Octokit.EmptyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + interactions: { + /** + * Temporarily restricts interactions to certain GitHub users in any public repository in the given organization. You must be an organization owner to set these restrictions. + */ + addOrUpdateRestrictionsForOrg: { + ( + params?: Octokit.RequestOptions & + Octokit.InteractionsAddOrUpdateRestrictionsForOrgParams + ): Promise< + Octokit.Response< + Octokit.InteractionsAddOrUpdateRestrictionsForOrgResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Temporarily restricts interactions to certain GitHub users within the given repository. You must have owner or admin access to set restrictions. + */ + addOrUpdateRestrictionsForRepo: { + ( + params?: Octokit.RequestOptions & + Octokit.InteractionsAddOrUpdateRestrictionsForRepoParams + ): Promise< + Octokit.Response< + Octokit.InteractionsAddOrUpdateRestrictionsForRepoResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Shows which group of GitHub users can interact with this organization and when the restriction expires. If there are no restrictions, you will see an empty response. + */ + getRestrictionsForOrg: { + ( + params?: Octokit.RequestOptions & + Octokit.InteractionsGetRestrictionsForOrgParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Shows which group of GitHub users can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. + */ + getRestrictionsForRepo: { + ( + params?: Octokit.RequestOptions & + Octokit.InteractionsGetRestrictionsForRepoParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. + */ + removeRestrictionsForOrg: { + ( + params?: Octokit.RequestOptions & + Octokit.InteractionsRemoveRestrictionsForOrgParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. + */ + removeRestrictionsForRepo: { + ( + params?: Octokit.RequestOptions & + Octokit.InteractionsRemoveRestrictionsForRepoParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + }; + issues: { + /** + * Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. + * + * This example adds two assignees to the existing `octocat` assignee. + */ + addAssignees: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesAddAssigneesParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.IssuesAddAssigneesParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + addLabels: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesAddLabelsParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.IssuesAddLabelsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Checks if a user has permission to be assigned to an issue in this repository. + * + * If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned. + * + * Otherwise a `404` status code is returned. + */ + checkAssignee: { + ( + params?: Octokit.RequestOptions & Octokit.IssuesCheckAssigneeParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://help.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + */ + create: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesCreateParamsDeprecatedAssignee + ): Promise>; + (params?: Octokit.RequestOptions & Octokit.IssuesCreateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + */ + createComment: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesCreateCommentParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.IssuesCreateCommentParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + createLabel: { + ( + params?: Octokit.RequestOptions & Octokit.IssuesCreateLabelParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + createMilestone: { + ( + params?: Octokit.RequestOptions & Octokit.IssuesCreateMilestoneParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + deleteComment: { + ( + params?: Octokit.RequestOptions & Octokit.IssuesDeleteCommentParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + deleteLabel: { + ( + params?: Octokit.RequestOptions & Octokit.IssuesDeleteLabelParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + deleteMilestone: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesDeleteMilestoneParamsDeprecatedNumber + ): Promise; + ( + params?: Octokit.RequestOptions & Octokit.IssuesDeleteMilestoneParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * The API returns a [`301 Moved Permanently` status](https://developer.github.com/v3/#http-redirects) if the issue was [transferred](https://help.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe to the [`issues`](https://developer.github.com/v3/activity/events/types/#issuesevent) webhook. + * + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. + * + * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. + */ + get: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesGetParamsDeprecatedNumber + ): Promise>; + (params?: Octokit.RequestOptions & Octokit.IssuesGetParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getComment: { + ( + params?: Octokit.RequestOptions & Octokit.IssuesGetCommentParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + getEvent: { + (params?: Octokit.RequestOptions & Octokit.IssuesGetEventParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getLabel: { + (params?: Octokit.RequestOptions & Octokit.IssuesGetLabelParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getMilestone: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesGetMilestoneParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.IssuesGetMilestoneParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. + * + * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. + */ + list: { + (params?: Octokit.RequestOptions & Octokit.IssuesListParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists the [available assignees](https://help.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. + */ + listAssignees: { + ( + params?: Octokit.RequestOptions & Octokit.IssuesListAssigneesParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Issue Comments are ordered by ascending ID. + */ + listComments: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesListCommentsParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.IssuesListCommentsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * By default, Issue Comments are ordered by ascending ID. + */ + listCommentsForRepo: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesListCommentsForRepoParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listEvents: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesListEventsParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.IssuesListEventsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listEventsForRepo: { + ( + params?: Octokit.RequestOptions & Octokit.IssuesListEventsForRepoParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listEventsForTimeline: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesListEventsForTimelineParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & + Octokit.IssuesListEventsForTimelineParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. + * + * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. + */ + listForAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesListForAuthenticatedUserParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. + * + * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. + */ + listForOrg: { + ( + params?: Octokit.RequestOptions & Octokit.IssuesListForOrgParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. + * + * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. + */ + listForRepo: { + ( + params?: Octokit.RequestOptions & Octokit.IssuesListForRepoParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listLabelsForMilestone: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesListLabelsForMilestoneParamsDeprecatedNumber + ): Promise< + Octokit.Response + >; + ( + params?: Octokit.RequestOptions & + Octokit.IssuesListLabelsForMilestoneParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listLabelsForRepo: { + ( + params?: Octokit.RequestOptions & Octokit.IssuesListLabelsForRepoParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listLabelsOnIssue: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesListLabelsOnIssueParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.IssuesListLabelsOnIssueParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listMilestonesForRepo: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesListMilestonesForRepoParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Users with push access can lock an issue or pull request's conversation. + * + * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + */ + lock: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesLockParamsDeprecatedNumber + ): Promise; + (params?: Octokit.RequestOptions & Octokit.IssuesLockParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Removes one or more assignees from an issue. + * + * This example removes two of three assignees, leaving the `octocat` assignee. + */ + removeAssignees: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesRemoveAssigneesParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.IssuesRemoveAssigneesParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Removes the specified label from the issue, and returns the remaining labels on the issue. This endpoint returns a `404 Not Found` status if the label does not exist. + */ + removeLabel: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesRemoveLabelParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.IssuesRemoveLabelParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + removeLabels: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesRemoveLabelsParamsDeprecatedNumber + ): Promise; + ( + params?: Octokit.RequestOptions & Octokit.IssuesRemoveLabelsParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + replaceLabels: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesReplaceLabelsParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.IssuesReplaceLabelsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Users with push access can unlock an issue's conversation. + */ + unlock: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesUnlockParamsDeprecatedNumber + ): Promise; + (params?: Octokit.RequestOptions & Octokit.IssuesUnlockParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Issue owners and users with push access can edit an issue. + */ + update: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesUpdateParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & + Octokit.IssuesUpdateParamsDeprecatedAssignee + ): Promise>; + (params?: Octokit.RequestOptions & Octokit.IssuesUpdateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + updateComment: { + ( + params?: Octokit.RequestOptions & Octokit.IssuesUpdateCommentParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + updateLabel: { + ( + params?: Octokit.RequestOptions & Octokit.IssuesUpdateLabelParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + updateMilestone: { + ( + params?: Octokit.RequestOptions & + Octokit.IssuesUpdateMilestoneParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.IssuesUpdateMilestoneParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + }; + licenses: { + get: { + (params?: Octokit.RequestOptions & Octokit.LicensesGetParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This method returns the contents of the repository's license file, if one is detected. + * + * Similar to [the repository contents API](https://developer.github.com/v3/repos/contents/#get-contents), this method also supports [custom media types](https://developer.github.com/v3/repos/contents/#custom-media-types) for retrieving the raw license content or rendered license HTML. + */ + getForRepo: { + ( + params?: Octokit.RequestOptions & Octokit.LicensesGetForRepoParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * @deprecated octokit.licenses.list() has been renamed to octokit.licenses.listCommonlyUsed() (2019-03-05) + */ + list: { + (params?: Octokit.RequestOptions & Octokit.EmptyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listCommonlyUsed: { + (params?: Octokit.RequestOptions & Octokit.EmptyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + markdown: { + render: { + (params?: Octokit.RequestOptions & Octokit.MarkdownRenderParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * You must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less. + */ + renderRaw: { + ( + params?: Octokit.RequestOptions & Octokit.MarkdownRenderRawParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + }; + meta: { + /** + * This endpoint provides a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://help.github.com/articles/about-github-s-ip-addresses/)." + */ + get: { + (params?: Octokit.RequestOptions & Octokit.EmptyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + migrations: { + /** + * Stop an import for a repository. + */ + cancelImport: { + ( + params?: Octokit.RequestOptions & Octokit.MigrationsCancelImportParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [Get a list of user migrations](https://developer.github.com/v3/migrations/users/#get-a-list-of-user-migrations) and [Get the status of a user migration](https://developer.github.com/v3/migrations/users/#get-the-status-of-a-user-migration) endpoints, will continue to be available even after an archive is deleted. + */ + deleteArchiveForAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.MigrationsDeleteArchiveForAuthenticatedUserParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Deletes a previous migration archive. Migration archives are automatically deleted after seven days. + */ + deleteArchiveForOrg: { + ( + params?: Octokit.RequestOptions & + Octokit.MigrationsDeleteArchiveForOrgParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Fetches the URL to download the migration archive as a `tar.gz` file. Depending on the resources your repository uses, the migration archive can contain JSON files with data for these objects: + * + * * attachments + * * bases + * * commit\_comments + * * issue\_comments + * * issue\_events + * * issues + * * milestones + * * organizations + * * projects + * * protected\_branches + * * pull\_request\_reviews + * * pull\_requests + * * releases + * * repositories + * * review\_comments + * * schema + * * users + * + * The archive will also contain an `attachments` directory that includes all attachment files uploaded to GitHub.com and a `repositories` directory that contains the repository's Git data. + */ + getArchiveForAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.MigrationsGetArchiveForAuthenticatedUserParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Fetches the URL to a migration archive. + */ + getArchiveForOrg: { + ( + params?: Octokit.RequestOptions & + Octokit.MigrationsGetArchiveForOrgParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Each type of source control system represents authors in a different way. For example, a Git commit author has a display name and an email address, but a Subversion commit author just has a username. The GitHub Importer will make the author information valid, but the author might not be correct. For example, it will change the bare Subversion username `hubot` into something like `hubot `. + * + * This API method and the "Map a commit author" method allow you to provide correct Git author information. + */ + getCommitAuthors: { + ( + params?: Octokit.RequestOptions & + Octokit.MigrationsGetCommitAuthorsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * View the progress of an import. + * + * **Import status** + * + * This section includes details about the possible values of the `status` field of the Import Progress response. + * + * An import that does not have errors will progress through these steps: + * + * * `detecting` - the "detection" step of the import is in progress because the request did not include a `vcs` parameter. The import is identifying the type of source control present at the URL. + * * `importing` - the "raw" step of the import is in progress. This is where commit data is fetched from the original repository. The import progress response will include `commit_count` (the total number of raw commits that will be imported) and `percent` (0 - 100, the current progress through the import). + * * `mapping` - the "rewrite" step of the import is in progress. This is where SVN branches are converted to Git branches, and where author updates are applied. The import progress response does not include progress information. + * * `pushing` - the "push" step of the import is in progress. This is where the importer updates the repository on GitHub. The import progress response will include `push_percent`, which is the percent value reported by `git push` when it is "Writing objects". + * * `complete` - the import is complete, and the repository is ready on GitHub. + * + * If there are problems, you will see one of these in the `status` field: + * + * * `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update Existing Import](https://developer.github.com/v3/migrations/source_imports/#update-existing-import) section. + * * `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://github.com/contact) for more information. + * * `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update Existing Import](https://developer.github.com/v3/migrations/source_imports/#update-existing-import) section. + * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://developer.github.com/v3/migrations/source_imports/#cancel-an-import) and [retry](https://developer.github.com/v3/migrations/source_imports/#start-an-import) with the correct URL. + * * `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update Existing Import](https://developer.github.com/v3/migrations/source_imports/#update-existing-import) section. + * + * **The project_choices field** + * + * When multiple projects are found at the provided URL, the response hash will include a `project_choices` field, the value of which is an array of hashes each representing a project choice. The exact key/value pairs of the project hashes will differ depending on the version control type. + * + * **Git LFS related fields** + * + * This section includes details about Git LFS related fields that may be present in the Import Progress response. + * + * * `use_lfs` - describes whether the import has been opted in or out of using Git LFS. The value can be `opt_in`, `opt_out`, or `undecided` if no action has been taken. + * * `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step. + * * `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository. + * * `large_files_count` - the total number of files larger than 100MB found in the originating repository. To see a list of these files, make a "Get Large Files" request. + */ + getImportProgress: { + ( + params?: Octokit.RequestOptions & + Octokit.MigrationsGetImportProgressParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * List files larger than 100MB found during the import + */ + getLargeFiles: { + ( + params?: Octokit.RequestOptions & Octokit.MigrationsGetLargeFilesParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Fetches a single user migration. The response includes the `state` of the migration, which can be one of the following values: + * + * * `pending` - the migration hasn't started yet. + * * `exporting` - the migration is in progress. + * * `exported` - the migration finished successfully. + * * `failed` - the migration failed. + * + * Once the migration has been `exported` you can [download the migration archive](https://developer.github.com/v3/migrations/users/#download-a-user-migration-archive). + */ + getStatusForAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.MigrationsGetStatusForAuthenticatedUserParams + ): Promise< + Octokit.Response< + Octokit.MigrationsGetStatusForAuthenticatedUserResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Fetches the status of a migration. + * + * The `state` of a migration can be one of the following values: + * + * * `pending`, which means the migration hasn't started yet. + * * `exporting`, which means the migration is in progress. + * * `exported`, which means the migration finished successfully. + * * `failed`, which means the migration failed. + */ + getStatusForOrg: { + ( + params?: Octokit.RequestOptions & + Octokit.MigrationsGetStatusForOrgParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists all migrations a user has started. + */ + listForAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.MigrationsListForAuthenticatedUserParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists the most recent migrations. + */ + listForOrg: { + ( + params?: Octokit.RequestOptions & Octokit.MigrationsListForOrgParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. + */ + mapCommitAuthor: { + ( + params?: Octokit.RequestOptions & + Octokit.MigrationsMapCommitAuthorParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability is powered by [Git LFS](https://git-lfs.github.com). You can learn more about our LFS feature and working with large files [on our help site](https://help.github.com/articles/versioning-large-files/). + */ + setLfsPreference: { + ( + params?: Octokit.RequestOptions & + Octokit.MigrationsSetLfsPreferenceParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Initiates the generation of a user migration archive. + */ + startForAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.MigrationsStartForAuthenticatedUserParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Initiates the generation of a migration archive. + */ + startForOrg: { + ( + params?: Octokit.RequestOptions & Octokit.MigrationsStartForOrgParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Start a source import to a GitHub repository using GitHub Importer. + */ + startImport: { + ( + params?: Octokit.RequestOptions & Octokit.MigrationsStartImportParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Unlocks a repository. You can lock repositories when you [start a user migration](https://developer.github.com/v3/migrations/users/#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://developer.github.com/v3/repos/#delete-a-repository) if you no longer need the source data. Returns a status of `404 Not Found` if the repository is not locked. + */ + unlockRepoForAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.MigrationsUnlockRepoForAuthenticatedUserParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://developer.github.com/v3/repos/#delete-a-repository) when the migration is complete and you no longer need the source data. + */ + unlockRepoForOrg: { + ( + params?: Octokit.RequestOptions & + Octokit.MigrationsUnlockRepoForOrgParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * An import can be updated with credentials or a project choice by passing in the appropriate parameters in this API request. If no parameters are provided, the import will be restarted. + * + * Some servers (e.g. TFS servers) can have several projects at a single URL. In those cases the import progress will have the status `detection_found_multiple` and the Import Progress response will include a `project_choices` array. You can select the project to import by providing one of the objects in the `project_choices` array in the update request. + * + * The following example demonstrates the workflow for updating an import with "project1" as the project choice. Given a `project_choices` array like such: + * + * To restart an import, no parameters are provided in the update request. + */ + updateImport: { + ( + params?: Octokit.RequestOptions & Octokit.MigrationsUpdateImportParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + }; + oauthAuthorizations: { + /** + * **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. + * @deprecated octokit.apps.checkAuthorization() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#check-an-authorization + */ + checkAuthorization: { + ( + params?: Octokit.RequestOptions & + Octokit.OauthAuthorizationsCheckAuthorizationParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * **Warning:** Apps must use the [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * Creates OAuth tokens using [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication). If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://developer.github.com/v3/auth/#working-with-two-factor-authentication)." + * + * To create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use `fingerprint` to differentiate between them. + * + * You can also create tokens on GitHub from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://help.github.com/articles/creating-an-access-token-for-command-line-use). + * + * Organizations that enforce SAML SSO require personal access tokens to be whitelisted. Read more about whitelisting tokens in [the GitHub Help documentation](https://help.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). + * @deprecated octokit.oauthAuthorizations.createAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization + */ + createAuthorization: { + ( + params?: Octokit.RequestOptions & + Octokit.OauthAuthorizationsCreateAuthorizationParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * @deprecated octokit.oauthAuthorizations.deleteAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#delete-an-authorization + */ + deleteAuthorization: { + ( + params?: Octokit.RequestOptions & + Octokit.OauthAuthorizationsDeleteAuthorizationParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for your user. Once deleted, the application has no access to your account and is no longer listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). + * @deprecated octokit.oauthAuthorizations.deleteGrant() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#delete-a-grant + */ + deleteGrant: { + ( + params?: Octokit.RequestOptions & + Octokit.OauthAuthorizationsDeleteGrantParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * @deprecated octokit.oauthAuthorizations.getAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-a-single-authorization + */ + getAuthorization: { + ( + params?: Octokit.RequestOptions & + Octokit.OauthAuthorizationsGetAuthorizationParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * @deprecated octokit.oauthAuthorizations.getGrant() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-a-single-grant + */ + getGrant: { + ( + params?: Octokit.RequestOptions & + Octokit.OauthAuthorizationsGetGrantParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * **Warning:** Apps must use the [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * Creates a new authorization for the specified OAuth application, only if an authorization for that application doesn't already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one. + * + * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://developer.github.com/v3/auth/#working-with-two-factor-authentication)." + * + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * @deprecated octokit.oauthAuthorizations.getOrCreateAuthorizationForApp() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app + */ + getOrCreateAuthorizationForApp: { + ( + params?: Octokit.RequestOptions & + Octokit.OauthAuthorizationsGetOrCreateAuthorizationForAppParams + ): Promise< + Octokit.Response< + Octokit.OauthAuthorizationsGetOrCreateAuthorizationForAppResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * **Warning:** Apps must use the [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * This method will create a new authorization for the specified OAuth application, only if an authorization for that application and fingerprint do not already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. `fingerprint` is a unique string to distinguish an authorization from others created for the same client ID and user. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one. + * + * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://developer.github.com/v3/auth/#working-with-two-factor-authentication)." + * @deprecated octokit.oauthAuthorizations.getOrCreateAuthorizationForAppAndFingerprint() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app-and-fingerprint + */ + getOrCreateAuthorizationForAppAndFingerprint: { + ( + params?: Octokit.RequestOptions & + Octokit.OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintParams + ): Promise< + Octokit.Response< + Octokit.OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * **Warning:** Apps must use the [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * This method will create a new authorization for the specified OAuth application, only if an authorization for that application and fingerprint do not already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. `fingerprint` is a unique string to distinguish an authorization from others created for the same client ID and user. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one. + * + * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://developer.github.com/v3/auth/#working-with-two-factor-authentication)." + * @deprecated octokit.oauthAuthorizations.getOrCreateAuthorizationForAppFingerprint() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app-and-fingerprint + */ + getOrCreateAuthorizationForAppFingerprint: { + ( + params?: Octokit.RequestOptions & + Octokit.OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintParams + ): Promise< + Octokit.Response< + Octokit.OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * @deprecated octokit.oauthAuthorizations.listAuthorizations() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#list-your-authorizations + */ + listAuthorizations: { + ( + params?: Octokit.RequestOptions & + Octokit.OauthAuthorizationsListAuthorizationsParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * You can use this API to list the set of OAuth applications that have been granted access to your account. Unlike the [list your authorizations](https://developer.github.com/v3/oauth_authorizations/#list-your-authorizations) API, this API does not manage individual tokens. This API will return one entry for each OAuth application that has been granted access to your account, regardless of the number of tokens an application has generated for your user. The list of OAuth applications returned matches what is shown on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). The `scopes` returned are the union of scopes authorized for the application. For example, if an application has one token with `repo` scope and another token with `user` scope, the grant will return `["repo", "user"]`. + * @deprecated octokit.oauthAuthorizations.listGrants() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#list-your-grants + */ + listGrants: { + ( + params?: Octokit.RequestOptions & + Octokit.OauthAuthorizationsListGrantsParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. + * @deprecated octokit.apps.resetAuthorization() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#reset-an-authorization + */ + resetAuthorization: { + ( + params?: Octokit.RequestOptions & + Octokit.OauthAuthorizationsResetAuthorizationParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. + * @deprecated octokit.apps.revokeAuthorizationForApplication() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#revoke-an-authorization-for-an-application + */ + revokeAuthorizationForApplication: { + ( + params?: Octokit.RequestOptions & + Octokit.OauthAuthorizationsRevokeAuthorizationForApplicationParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid token as `:access_token` and the grant for the token's owner will be deleted. + * + * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the Applications settings page under "Authorized OAuth Apps" on GitHub](https://github.com/settings/applications#authorized). + * @deprecated octokit.apps.revokeGrantForApplication() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#revoke-a-grant-for-an-application + */ + revokeGrantForApplication: { + ( + params?: Octokit.RequestOptions & + Octokit.OauthAuthorizationsRevokeGrantForApplicationParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://developer.github.com/v3/auth/#working-with-two-factor-authentication)." + * + * You can only send one of these scope keys at a time. + * @deprecated octokit.oauthAuthorizations.updateAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#update-an-existing-authorization + */ + updateAuthorization: { + ( + params?: Octokit.RequestOptions & + Octokit.OauthAuthorizationsUpdateAuthorizationParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + orgs: { + /** + * Only authenticated organization owners can add a member to the organization or update the member's role. + * + * * If the authenticated user is _adding_ a member to the organization, the invited user will receive an email inviting them to the organization. The user's [membership status](https://developer.github.com/v3/orgs/members/#get-organization-membership) will be `pending` until they accept the invitation. + * + * * Authenticated users can _update_ a user's membership by passing the `role` parameter. If the authenticated user changes a member's role to `admin`, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to `member`, no email will be sent. + * + * **Rate limits** + * + * To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. + */ + addOrUpdateMembership: { + ( + params?: Octokit.RequestOptions & + Octokit.OrgsAddOrUpdateMembershipParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + blockUser: { + (params?: Octokit.RequestOptions & Octokit.OrgsBlockUserParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * If the user is blocked: + * + * If the user is not blocked: + */ + checkBlockedUser: { + ( + params?: Octokit.RequestOptions & Octokit.OrgsCheckBlockedUserParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Check if a user is, publicly or privately, a member of the organization. + */ + checkMembership: { + ( + params?: Octokit.RequestOptions & Octokit.OrgsCheckMembershipParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + checkPublicMembership: { + ( + params?: Octokit.RequestOptions & + Octokit.OrgsCheckPublicMembershipParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + concealMembership: { + ( + params?: Octokit.RequestOptions & Octokit.OrgsConcealMembershipParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://help.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". + */ + convertMemberToOutsideCollaborator: { + ( + params?: Octokit.RequestOptions & + Octokit.OrgsConvertMemberToOutsideCollaboratorParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Here's how you can create a hook that posts payloads in JSON format: + */ + createHook: { + (params?: Octokit.RequestOptions & Octokit.OrgsCreateHookParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner. + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + */ + createInvitation: { + ( + params?: Octokit.RequestOptions & Octokit.OrgsCreateInvitationParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + deleteHook: { + (params?: Octokit.RequestOptions & Octokit.OrgsDeleteHookParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://help.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). + * + * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub plan. See "[Authenticating with GitHub Apps](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see "[Response with GitHub plan information](https://developer.github.com/v3/orgs/#response-with-github-plan-information)." + */ + get: { + (params?: Octokit.RequestOptions & Octokit.OrgsGetParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getHook: { + (params?: Octokit.RequestOptions & Octokit.OrgsGetHookParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * In order to get a user's membership with an organization, the authenticated user must be an organization member. + */ + getMembership: { + ( + params?: Octokit.RequestOptions & Octokit.OrgsGetMembershipParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + getMembershipForAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.OrgsGetMembershipForAuthenticatedUserParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists all organizations, in the order that they were created on GitHub. + * + * **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://developer.github.com/v3/#link-header) to get the URL for the next page of organizations. + */ + list: { + (params?: Octokit.RequestOptions & Octokit.OrgsListParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List the users blocked by an organization. + */ + listBlockedUsers: { + ( + params?: Octokit.RequestOptions & Octokit.OrgsListBlockedUsersParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * List organizations for the authenticated user. + * + * **OAuth scope requirements** + * + * This only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope. OAuth requests with insufficient scope receive a `403 Forbidden` response. + */ + listForAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.OrgsListForAuthenticatedUserParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List [public organization memberships](https://help.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user. + * + * This method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List your organizations](https://developer.github.com/v3/orgs/#list-your-organizations) API instead. + */ + listForUser: { + ( + params?: Octokit.RequestOptions & Octokit.OrgsListForUserParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listHooks: { + (params?: Octokit.RequestOptions & Octokit.OrgsListHooksParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. + */ + listInstallations: { + ( + params?: Octokit.RequestOptions & Octokit.OrgsListInstallationsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. + */ + listInvitationTeams: { + ( + params?: Octokit.RequestOptions & Octokit.OrgsListInvitationTeamsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned. + */ + listMembers: { + ( + params?: Octokit.RequestOptions & Octokit.OrgsListMembersParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listMemberships: { + ( + params?: Octokit.RequestOptions & Octokit.OrgsListMembershipsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * List all users who are outside collaborators of an organization. + */ + listOutsideCollaborators: { + ( + params?: Octokit.RequestOptions & + Octokit.OrgsListOutsideCollaboratorsParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + */ + listPendingInvitations: { + ( + params?: Octokit.RequestOptions & + Octokit.OrgsListPendingInvitationsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Members of an organization can choose to have their membership publicized or not. + */ + listPublicMembers: { + ( + params?: Octokit.RequestOptions & Octokit.OrgsListPublicMembersParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * This will trigger a [ping event](https://developer.github.com/webhooks/#ping-event) to be sent to the hook. + */ + pingHook: { + (params?: Octokit.RequestOptions & Octokit.OrgsPingHookParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * The user can publicize their own membership. (A user cannot publicize the membership for another user.) + * + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + */ + publicizeMembership: { + ( + params?: Octokit.RequestOptions & Octokit.OrgsPublicizeMembershipParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories. + */ + removeMember: { + ( + params?: Octokit.RequestOptions & Octokit.OrgsRemoveMemberParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * In order to remove a user's membership with an organization, the authenticated user must be an organization owner. + * + * If the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases. + */ + removeMembership: { + ( + params?: Octokit.RequestOptions & Octokit.OrgsRemoveMembershipParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Removing a user from this list will remove them from all the organization's repositories. + */ + removeOutsideCollaborator: { + ( + params?: Octokit.RequestOptions & + Octokit.OrgsRemoveOutsideCollaboratorParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + unblockUser: { + ( + params?: Octokit.RequestOptions & Octokit.OrgsUnblockUserParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** The new `members_allowed_repository_creation_type` replaces the functionality of `members_can_create_repositories`. + * + * Setting `members_allowed_repository_creation_type` will override the value of `members_can_create_repositories` in the following ways: + * + * * Setting `members_allowed_repository_creation_type` to `all` or `private` sets `members_can_create_repositories` to `true`. + * * Setting `members_allowed_repository_creation_type` to `none` sets `members_can_create_repositories` to `false`. + * * If you omit `members_allowed_repository_creation_type`, `members_can_create_repositories` is not modified. + */ + update: { + (params?: Octokit.RequestOptions & Octokit.OrgsUpdateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + updateHook: { + (params?: Octokit.RequestOptions & Octokit.OrgsUpdateHookParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + updateMembership: { + ( + params?: Octokit.RequestOptions & Octokit.OrgsUpdateMembershipParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + }; + projects: { + /** + * Adds a collaborator to a an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. + */ + addCollaborator: { + ( + params?: Octokit.RequestOptions & Octokit.ProjectsAddCollaboratorParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. + * + * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. + */ + createCard: { + ( + params?: Octokit.RequestOptions & Octokit.ProjectsCreateCardParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + createColumn: { + ( + params?: Octokit.RequestOptions & Octokit.ProjectsCreateColumnParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + createForAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.ProjectsCreateForAuthenticatedUserParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates an organization project board. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + createForOrg: { + ( + params?: Octokit.RequestOptions & Octokit.ProjectsCreateForOrgParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates a repository project board. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + createForRepo: { + ( + params?: Octokit.RequestOptions & Octokit.ProjectsCreateForRepoParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Deletes a project board. Returns a `404 Not Found` status if projects are disabled. + */ + delete: { + (params?: Octokit.RequestOptions & Octokit.ProjectsDeleteParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + + deleteCard: { + ( + params?: Octokit.RequestOptions & Octokit.ProjectsDeleteCardParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + deleteColumn: { + ( + params?: Octokit.RequestOptions & Octokit.ProjectsDeleteColumnParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Gets a project by its `id`. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + get: { + (params?: Octokit.RequestOptions & Octokit.ProjectsGetParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getCard: { + ( + params?: Octokit.RequestOptions & Octokit.ProjectsGetCardParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + getColumn: { + ( + params?: Octokit.RequestOptions & Octokit.ProjectsGetColumnParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listCards: { + ( + params?: Octokit.RequestOptions & Octokit.ProjectsListCardsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists the collaborators for an organization project. For a project, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. You must be an organization owner or a project `admin` to list collaborators. + */ + listCollaborators: { + ( + params?: Octokit.RequestOptions & + Octokit.ProjectsListCollaboratorsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listColumns: { + ( + params?: Octokit.RequestOptions & Octokit.ProjectsListColumnsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists the projects in an organization. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + * + * s + */ + listForOrg: { + ( + params?: Octokit.RequestOptions & Octokit.ProjectsListForOrgParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists the projects in a repository. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + listForRepo: { + ( + params?: Octokit.RequestOptions & Octokit.ProjectsListForRepoParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listForUser: { + ( + params?: Octokit.RequestOptions & Octokit.ProjectsListForUserParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + moveCard: { + ( + params?: Octokit.RequestOptions & Octokit.ProjectsMoveCardParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + moveColumn: { + ( + params?: Octokit.RequestOptions & Octokit.ProjectsMoveColumnParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. + */ + removeCollaborator: { + ( + params?: Octokit.RequestOptions & + Octokit.ProjectsRemoveCollaboratorParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Returns the collaborator's permission level for an organization project. Possible values for the `permission` key: `admin`, `write`, `read`, `none`. You must be an organization owner or a project `admin` to review a user's permission level. + */ + reviewUserPermissionLevel: { + ( + params?: Octokit.RequestOptions & + Octokit.ProjectsReviewUserPermissionLevelParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Updates a project board's information. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + update: { + (params?: Octokit.RequestOptions & Octokit.ProjectsUpdateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + updateCard: { + ( + params?: Octokit.RequestOptions & Octokit.ProjectsUpdateCardParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + updateColumn: { + ( + params?: Octokit.RequestOptions & Octokit.ProjectsUpdateColumnParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + }; + pulls: { + checkIfMerged: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsCheckIfMergedParamsDeprecatedNumber + ): Promise; + ( + params?: Octokit.RequestOptions & Octokit.PullsCheckIfMergedParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Pro, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. + * + * You can create a new pull request. + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + */ + create: { + (params?: Octokit.RequestOptions & Octokit.PullsCreateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** Multi-line comments on pull requests are currently in public beta and subject to change. + * + * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Comments](https://developer.github.com/v3/issues/comments/#create-a-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. + * + * You can still create a review comment using the `position` parameter. When you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. For more information, see [Multi-line comment summary](https://developer.github.com/v3/pulls/comments/#multi-line-comment-summary-3). + * + * **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * + * **Multi-line comment summary** + * + * **Note:** New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2019-10-03-multi-line-comments) for full details. + * + * Use the `comfort-fade` preview header and the `line` parameter to show multi-line comment-supported fields in the response. + * + * If you use the `comfort-fade` preview header, your response will show: + * + * * For multi-line comments, values for `start_line`, `original_start_line`, `start_side`, `line`, `original_line`, and `side`. + * * For single-line comments, values for `line`, `original_line`, and `side` and a `null` value for `start_line`, `original_start_line`, and `start_side`. + * + * If you don't use the `comfort-fade` preview header, multi-line and single-line comments will appear the same way in the response with a single `position` attribute. Your response will show: + * + * * For multi-line comments, the last line of the comment range for the `position` attribute. + * * For single-line comments, the diff-positioned way of referencing comments for the `position` attribute. For more information, see `position` in the [input parameters](https://developer.github.com/v3/pulls/comments/#parameters-2) table. + */ + createComment: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsCreateCommentParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & + Octokit.PullsCreateCommentParamsDeprecatedInReplyTo + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.PullsCreateCommentParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** Multi-line comments on pull requests are currently in public beta and subject to change. + * + * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Comments](https://developer.github.com/v3/issues/comments/#create-a-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. + * + * You can still create a review comment using the `position` parameter. When you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. For more information, see [Multi-line comment summary](https://developer.github.com/v3/pulls/comments/#multi-line-comment-summary-3). + * + * **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * + * **Multi-line comment summary** + * + * **Note:** New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2019-10-03-multi-line-comments) for full details. + * + * Use the `comfort-fade` preview header and the `line` parameter to show multi-line comment-supported fields in the response. + * + * If you use the `comfort-fade` preview header, your response will show: + * + * * For multi-line comments, values for `start_line`, `original_start_line`, `start_side`, `line`, `original_line`, and `side`. + * * For single-line comments, values for `line`, `original_line`, and `side` and a `null` value for `start_line`, `original_start_line`, and `start_side`. + * + * If you don't use the `comfort-fade` preview header, multi-line and single-line comments will appear the same way in the response with a single `position` attribute. Your response will show: + * + * * For multi-line comments, the last line of the comment range for the `position` attribute. + * * For single-line comments, the diff-positioned way of referencing comments for the `position` attribute. For more information, see `position` in the [input parameters](https://developer.github.com/v3/pulls/comments/#parameters-2) table. + * @deprecated octokit.pulls.createCommentReply() has been renamed to octokit.pulls.createComment() (2019-09-09) + */ + createCommentReply: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsCreateCommentReplyParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & + Octokit.PullsCreateCommentReplyParamsDeprecatedInReplyTo + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.PullsCreateCommentReplyParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + createFromIssue: { + ( + params?: Octokit.RequestOptions & Octokit.PullsCreateFromIssueParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * + * **Note:** To comment on a specific line in a file, you need to first determine the _position_ of that line in the diff. The GitHub REST API v3 offers the `application/vnd.github.v3.diff` [media type](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests). To see a pull request diff, add this media type to the `Accept` header of a call to the [single pull request](https://developer.github.com/v3/pulls/#get-a-single-pull-request) endpoint. + * + * The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. + */ + createReview: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsCreateReviewParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.PullsCreateReviewParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + */ + createReviewCommentReply: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsCreateReviewCommentReplyParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + */ + createReviewRequest: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsCreateReviewRequestParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.PullsCreateReviewRequestParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Deletes a review comment. + */ + deleteComment: { + ( + params?: Octokit.RequestOptions & Octokit.PullsDeleteCommentParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + deletePendingReview: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsDeletePendingReviewParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.PullsDeletePendingReviewParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + deleteReviewRequest: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsDeleteReviewRequestParamsDeprecatedNumber + ): Promise; + ( + params?: Octokit.RequestOptions & Octokit.PullsDeleteReviewRequestParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** To dismiss a pull request review on a [protected branch](https://developer.github.com/v3/repos/branches/), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. + */ + dismissReview: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsDismissReviewParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.PullsDismissReviewParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Pro, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Lists details of a pull request by providing its number. + * + * When you get, [create](https://developer.github.com/v3/pulls/#create-a-pull-request), or [edit](https://developer.github.com/v3/pulls/#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see "[Checking mergeability of pull requests](https://developer.github.com/v3/git/#checking-mergeability-of-pull-requests)". + * + * The value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit. + * + * The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request: + * + * * If merged as a [merge commit](https://help.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://help.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch. + * * If [rebased](https://help.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to. + * + * Pass the appropriate [media type](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + */ + get: { + ( + params?: Octokit.RequestOptions & Octokit.PullsGetParamsDeprecatedNumber + ): Promise>; + (params?: Octokit.RequestOptions & Octokit.PullsGetParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** Multi-line comments on pull requests are currently in public beta and subject to change. + * + * Provides details for a review comment. + * + * **Multi-line comment summary** + * + * **Note:** New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2019-10-03-multi-line-comments) for full details. + * + * Use the `comfort-fade` preview header and the `line` parameter to show multi-line comment-supported fields in the response. + * + * If you use the `comfort-fade` preview header, your response will show: + * + * * For multi-line comments, values for `start_line`, `original_start_line`, `start_side`, `line`, `original_line`, and `side`. + * * For single-line comments, values for `line`, `original_line`, and `side` and a `null` value for `start_line`, `original_start_line`, and `start_side`. + * + * If you don't use the `comfort-fade` preview header, multi-line and single-line comments will appear the same way in the response with a single `position` attribute. Your response will show: + * + * * For multi-line comments, the last line of the comment range for the `position` attribute. + * * For single-line comments, the diff-positioned way of referencing comments for the `position` attribute. For more information, see `position` in the [input parameters](https://developer.github.com/v3/pulls/comments/#parameters-2) table. + * + * The `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions. + */ + getComment: { + ( + params?: Octokit.RequestOptions & Octokit.PullsGetCommentParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + getCommentsForReview: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsGetCommentsForReviewParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & + Octokit.PullsGetCommentsForReviewParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + getReview: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsGetReviewParamsDeprecatedNumber + ): Promise>; + (params?: Octokit.RequestOptions & Octokit.PullsGetReviewParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Pro, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + */ + list: { + (params?: Octokit.RequestOptions & Octokit.PullsListParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** Multi-line comments on pull requests are currently in public beta and subject to change. + * + * Lists review comments for a pull request. By default, review comments are in ascending order by ID. + * + * **Multi-line comment summary** + * + * **Note:** New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2019-10-03-multi-line-comments) for full details. + * + * Use the `comfort-fade` preview header and the `line` parameter to show multi-line comment-supported fields in the response. + * + * If you use the `comfort-fade` preview header, your response will show: + * + * * For multi-line comments, values for `start_line`, `original_start_line`, `start_side`, `line`, `original_line`, and `side`. + * * For single-line comments, values for `line`, `original_line`, and `side` and a `null` value for `start_line`, `original_start_line`, and `start_side`. + * + * If you don't use the `comfort-fade` preview header, multi-line and single-line comments will appear the same way in the response with a single `position` attribute. Your response will show: + * + * * For multi-line comments, the last line of the comment range for the `position` attribute. + * * For single-line comments, the diff-positioned way of referencing comments for the `position` attribute. For more information, see `position` in the [input parameters](https://developer.github.com/v3/pulls/comments/#parameters-2) table. + * + * The `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions. + */ + listComments: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsListCommentsParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.PullsListCommentsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** Multi-line comments on pull requests are currently in public beta and subject to change. + * + * Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. + * + * **Multi-line comment summary** + * + * **Note:** New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2019-10-03-multi-line-comments) for full details. + * + * Use the `comfort-fade` preview header and the `line` parameter to show multi-line comment-supported fields in the response. + * + * If you use the `comfort-fade` preview header, your response will show: + * + * * For multi-line comments, values for `start_line`, `original_start_line`, `start_side`, `line`, `original_line`, and `side`. + * * For single-line comments, values for `line`, `original_line`, and `side` and a `null` value for `start_line`, `original_start_line`, and `start_side`. + * + * If you don't use the `comfort-fade` preview header, multi-line and single-line comments will appear the same way in the response with a single `position` attribute. Your response will show: + * + * * For multi-line comments, the last line of the comment range for the `position` attribute. + * * For single-line comments, the diff-positioned way of referencing comments for the `position` attribute. For more information, see `position` in the [input parameters](https://developer.github.com/v3/pulls/comments/#parameters-2) table. + * + * The `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions. + */ + listCommentsForRepo: { + ( + params?: Octokit.RequestOptions & Octokit.PullsListCommentsForRepoParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the [Commit List API](https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository). + */ + listCommits: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsListCommitsParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.PullsListCommitsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** The response includes a maximum of 300 files. + */ + listFiles: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsListFilesParamsDeprecatedNumber + ): Promise>; + (params?: Octokit.RequestOptions & Octokit.PullsListFilesParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listReviewRequests: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsListReviewRequestsParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.PullsListReviewRequestsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * The list of reviews returns in chronological order. + */ + listReviews: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsListReviewsParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.PullsListReviewsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + */ + merge: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsMergeParamsDeprecatedNumber + ): Promise>; + (params?: Octokit.RequestOptions & Octokit.PullsMergeParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + submitReview: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsSubmitReviewParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.PullsSubmitReviewParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Pro, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. + */ + update: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsUpdateParamsDeprecatedNumber + ): Promise>; + (params?: Octokit.RequestOptions & Octokit.PullsUpdateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. + */ + updateBranch: { + ( + params?: Octokit.RequestOptions & Octokit.PullsUpdateBranchParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** Multi-line comments on pull requests are currently in public beta and subject to change. + * + * Enables you to edit a review comment. + * + * **Multi-line comment summary** + * + * **Note:** New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2019-10-03-multi-line-comments) for full details. + * + * Use the `comfort-fade` preview header and the `line` parameter to show multi-line comment-supported fields in the response. + * + * If you use the `comfort-fade` preview header, your response will show: + * + * * For multi-line comments, values for `start_line`, `original_start_line`, `start_side`, `line`, `original_line`, and `side`. + * * For single-line comments, values for `line`, `original_line`, and `side` and a `null` value for `start_line`, `original_start_line`, and `start_side`. + * + * If you don't use the `comfort-fade` preview header, multi-line and single-line comments will appear the same way in the response with a single `position` attribute. Your response will show: + * + * * For multi-line comments, the last line of the comment range for the `position` attribute. + * * For single-line comments, the diff-positioned way of referencing comments for the `position` attribute. For more information, see `position` in the [input parameters](https://developer.github.com/v3/pulls/comments/#parameters-2) table. + */ + updateComment: { + ( + params?: Octokit.RequestOptions & Octokit.PullsUpdateCommentParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Update the review summary comment with new text. + */ + updateReview: { + ( + params?: Octokit.RequestOptions & + Octokit.PullsUpdateReviewParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.PullsUpdateReviewParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + }; + rateLimit: { + /** + * **Note:** Accessing this endpoint does not count against your REST API rate limit. + * + * **Understanding your rate limit status** + * + * The Search API has a [custom rate limit](https://developer.github.com/v3/search/#rate-limit), separate from the rate limit governing the rest of the REST API. The GraphQL API also has a [custom rate limit](https://developer.github.com/v4/guides/resource-limitations/#rate-limit) that is separate from and calculated differently than rate limits in the REST API. + * + * For these reasons, the Rate Limit API response categorizes your rate limit. Under `resources`, you'll see four objects: + * + * * The `core` object provides your rate limit status for all non-search-related resources in the REST API. + * * The `search` object provides your rate limit status for the [Search API](https://developer.github.com/v3/search/). + * * The `graphql` object provides your rate limit status for the [GraphQL API](https://developer.github.com/v4/). + * * The `integration_manifest` object provides your rate limit status for the [GitHub App Manifest code conversion](https://developer.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/#3-you-exchange-the-temporary-code-to-retrieve-the-app-configuration) endpoint. + * + * For more information on the headers and values in the rate limit response, see "[Rate limiting](https://developer.github.com/v3/#rate-limiting)." + * + * The `rate` object (shown at the bottom of the response above) is deprecated. + * + * If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. + */ + get: { + (params?: Octokit.RequestOptions & Octokit.EmptyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + reactions: { + /** + * Create a reaction to a [commit comment](https://developer.github.com/v3/repos/comments/). A response with a `Status: 200 OK` means that you already added the reaction type to this commit comment. + */ + createForCommitComment: { + ( + params?: Octokit.RequestOptions & + Octokit.ReactionsCreateForCommitCommentParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Create a reaction to an [issue](https://developer.github.com/v3/issues/). A response with a `Status: 200 OK` means that you already added the reaction type to this issue. + */ + createForIssue: { + ( + params?: Octokit.RequestOptions & + Octokit.ReactionsCreateForIssueParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.ReactionsCreateForIssueParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Create a reaction to an [issue comment](https://developer.github.com/v3/issues/comments/). A response with a `Status: 200 OK` means that you already added the reaction type to this issue comment. + */ + createForIssueComment: { + ( + params?: Octokit.RequestOptions & + Octokit.ReactionsCreateForIssueCommentParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Create a reaction to a [pull request review comment](https://developer.github.com/v3/pulls/comments/). A response with a `Status: 200 OK` means that you already added the reaction type to this pull request review comment. + */ + createForPullRequestReviewComment: { + ( + params?: Octokit.RequestOptions & + Octokit.ReactionsCreateForPullRequestReviewCommentParams + ): Promise< + Octokit.Response< + Octokit.ReactionsCreateForPullRequestReviewCommentResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Create a reaction to a [team discussion](https://developer.github.com/v3/teams/discussions/). OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with a `Status: 200 OK` means that you already added the reaction type to this team discussion. + */ + createForTeamDiscussion: { + ( + params?: Octokit.RequestOptions & + Octokit.ReactionsCreateForTeamDiscussionParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Create a reaction to a [team discussion comment](https://developer.github.com/v3/teams/discussion_comments/). OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with a `Status: 200 OK` means that you already added the reaction type to this team discussion comment. + */ + createForTeamDiscussionComment: { + ( + params?: Octokit.RequestOptions & + Octokit.ReactionsCreateForTeamDiscussionCommentParams + ): Promise< + Octokit.Response< + Octokit.ReactionsCreateForTeamDiscussionCommentResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), when deleting a [team discussion](https://developer.github.com/v3/teams/discussions/) or [team discussion comment](https://developer.github.com/v3/teams/discussion_comments/). + */ + delete: { + ( + params?: Octokit.RequestOptions & Octokit.ReactionsDeleteParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * List the reactions to a [commit comment](https://developer.github.com/v3/repos/comments/). + */ + listForCommitComment: { + ( + params?: Octokit.RequestOptions & + Octokit.ReactionsListForCommitCommentParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List the reactions to an [issue](https://developer.github.com/v3/issues/). + */ + listForIssue: { + ( + params?: Octokit.RequestOptions & + Octokit.ReactionsListForIssueParamsDeprecatedNumber + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.ReactionsListForIssueParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * List the reactions to an [issue comment](https://developer.github.com/v3/issues/comments/). + */ + listForIssueComment: { + ( + params?: Octokit.RequestOptions & + Octokit.ReactionsListForIssueCommentParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List the reactions to a [pull request review comment](https://developer.github.com/v3/pulls/comments/). + */ + listForPullRequestReviewComment: { + ( + params?: Octokit.RequestOptions & + Octokit.ReactionsListForPullRequestReviewCommentParams + ): Promise< + Octokit.Response< + Octokit.ReactionsListForPullRequestReviewCommentResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List the reactions to a [team discussion](https://developer.github.com/v3/teams/discussions/). OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + listForTeamDiscussion: { + ( + params?: Octokit.RequestOptions & + Octokit.ReactionsListForTeamDiscussionParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List the reactions to a [team discussion comment](https://developer.github.com/v3/teams/discussion_comments/). OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + listForTeamDiscussionComment: { + ( + params?: Octokit.RequestOptions & + Octokit.ReactionsListForTeamDiscussionCommentParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + repos: { + acceptInvitation: { + ( + params?: Octokit.RequestOptions & Octokit.ReposAcceptInvitationParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * + * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + * + * The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [repository invitations API endpoints](https://developer.github.com/v3/repos/invitations/). + * + * **Rate limits** + * + * To prevent abuse, you are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository. + */ + addCollaborator: { + ( + params?: Octokit.RequestOptions & Octokit.ReposAddCollaboratorParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Here's how you can create a read-only deploy key: + */ + addDeployKey: { + ( + params?: Octokit.RequestOptions & Octokit.ReposAddDeployKeyParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + addProtectedBranchAdminEnforcement: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposAddProtectedBranchAdminEnforcementParams + ): Promise< + Octokit.Response< + Octokit.ReposAddProtectedBranchAdminEnforcementResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Grants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + addProtectedBranchAppRestrictions: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposAddProtectedBranchAppRestrictionsParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * When authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits. + */ + addProtectedBranchRequiredSignatures: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposAddProtectedBranchRequiredSignaturesParams + ): Promise< + Octokit.Response< + Octokit.ReposAddProtectedBranchRequiredSignaturesResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + */ + addProtectedBranchRequiredStatusChecksContexts: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposAddProtectedBranchRequiredStatusChecksContextsParams + ): Promise< + Octokit.Response< + Octokit.ReposAddProtectedBranchRequiredStatusChecksContextsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Grants the specified teams push access for this branch. If you pass the `hellcat-preview` media type, you can also give push access to child teams. + * + * | Type | Description | + * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | + * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + addProtectedBranchTeamRestrictions: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposAddProtectedBranchTeamRestrictionsParams + ): Promise< + Octokit.Response< + Octokit.ReposAddProtectedBranchTeamRestrictionsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Grants the specified people push access for this branch. + * + * | Type | Description | + * | ------- | ----------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + addProtectedBranchUserRestrictions: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposAddProtectedBranchUserRestrictionsParams + ): Promise< + Octokit.Response< + Octokit.ReposAddProtectedBranchUserRestrictionsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. + * + * If you pass the `hellcat-preview` media type, team members will include the members of child teams. + */ + checkCollaborator: { + ( + params?: Octokit.RequestOptions & Octokit.ReposCheckCollaboratorParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Shows whether vulnerability alerts are enabled or disabled for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://help.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)" in the GitHub Help documentation. + */ + checkVulnerabilityAlerts: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposCheckVulnerabilityAlertsParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Both `:base` and `:head` must be branch names in `:repo`. To compare branches across other repositories in the same network as `:repo`, use the format `:branch`. + * + * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * + * The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file. + * + * **Working with large comparisons** + * + * The response will include a comparison of up to 250 commits. If you are working with a larger commit range, you can use the [Commit List API](https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository) to enumerate all commits in the range. + * + * For comparisons with extremely large diffs, you may receive an error response indicating that the diff took too long to generate. You can typically resolve this error by using a smaller commit range. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + compareCommits: { + ( + params?: Octokit.RequestOptions & Octokit.ReposCompareCommitsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Create a comment for a commit using its `:commit_sha`. + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + */ + createCommitComment: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposCreateCommitCommentParamsDeprecatedSha + ): Promise>; + ( + params?: Octokit.RequestOptions & + Octokit.ReposCreateCommitCommentParamsDeprecatedLine + ): Promise>; + ( + params?: Octokit.RequestOptions & Octokit.ReposCreateCommitCommentParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Deployments offer a few configurable parameters with sane defaults. + * + * The `ref` parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them before we merge a pull request. + * + * The `environment` parameter allows deployments to be issued to different runtime environments. Teams often have multiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter makes it easier to track which environments have requested deployments. The default environment is `production`. + * + * The `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If the ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds, the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will return a failure response. + * + * By default, [commit statuses](https://developer.github.com/v3/repos/statuses) for every submitted context must be in a `success` state. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to specify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do not require any contexts or create any commit statuses, the deployment will always succeed. + * + * The `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text field that will be passed on when a deployment event is dispatched. + * + * The `task` parameter is used by the deployment system to allow different execution paths. In the web world this might be `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an application with debugging enabled. + * + * Users with `repo` or `repo_deployment` scopes can create a deployment for a given ref: + * + * A simple example putting the user and room into the payload to notify back to chat networks. + * + * A more advanced example specifying required commit statuses and bypassing auto-merging. + * + * You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating a deployment. This auto-merge happens when: + * + * * Auto-merge option is enabled in the repository + * * Topic branch does not include the latest changes on the base branch, which is `master`in the response example + * * There are no merge conflicts + * + * If there are no new commits in the base branch, a new request to create a deployment should give a successful response. + * + * This error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't be merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts. + * + * This error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success` status for the commit to be deployed, but one or more of the required contexts do not have a state of `success`. + */ + createDeployment: { + ( + params?: Octokit.RequestOptions & Octokit.ReposCreateDeploymentParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Users with `push` access can create deployment statuses for a given deployment. + * + * GitHub Apps require `read & write` access to "Deployments" and `read-only` access to "Repo contents" (for private repos). OAuth Apps require the `repo_deployment` scope. + */ + createDeploymentStatus: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposCreateDeploymentStatusParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://developer.github.com/v3/activity/events/types/#repositorydispatchevent)." + * + * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. For a test example, see the [input example](https://developer.github.com/v3/repos/#example-4). + * + * To give you write access to the repository, you must use a personal access token with the `repo` scope. For more information, see "[Creating a personal access token for the command line](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. + * + * This input example shows how you can use the `client_payload` as a test to debug your workflow. + */ + createDispatchEvent: { + ( + params?: Octokit.RequestOptions & Octokit.ReposCreateDispatchEventParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates a new file or updates an existing file in a repository. + * @deprecated octokit.repos.createFile() has been renamed to octokit.repos.createOrUpdateFile() (2019-06-07) + */ + createFile: { + ( + params?: Octokit.RequestOptions & Octokit.ReposCreateFileParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates a new repository for the authenticated user. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * + * * `public_repo` scope or `repo` scope to create a public repository + * * `repo` scope to create a private repository + */ + createForAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposCreateForAuthenticatedUserParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Create a fork for the authenticated user. + * + * **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://github.com/contact). + */ + createFork: { + ( + params?: Octokit.RequestOptions & Octokit.ReposCreateForkParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks can share the same `config` as long as those webhooks do not have any `events` that overlap. + * + * Here's how you can create a hook that posts payloads in JSON format: + */ + createHook: { + ( + params?: Octokit.RequestOptions & Octokit.ReposCreateHookParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates a new repository for the authenticated user. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * + * * `public_repo` scope or `repo` scope to create a public repository + * * `repo` scope to create a private repository + */ + createInOrg: { + ( + params?: Octokit.RequestOptions & Octokit.ReposCreateInOrgParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates a new file or updates an existing file in a repository. + */ + createOrUpdateFile: { + ( + params?: Octokit.RequestOptions & Octokit.ReposCreateOrUpdateFileParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Users with push access to the repository can create a release. + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + */ + createRelease: { + ( + params?: Octokit.RequestOptions & Octokit.ReposCreateReleaseParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Users with push access in a repository can create commit statuses for a given SHA. + * + * Note: there is a limit of 1000 statuses per `sha` and `context` within a repository. Attempts to create more than 1000 statuses will result in a validation error. + */ + createStatus: { + ( + params?: Octokit.RequestOptions & Octokit.ReposCreateStatusParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. The authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [`GET /repos/:owner/:repo`](https://developer.github.com/v3/repos/#get) endpoint and check that the `is_template` key is `true`. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * + * * `public_repo` scope or `repo` scope to create a public repository + * * `repo` scope to create a private repository + * + * \` + */ + createUsingTemplate: { + ( + params?: Octokit.RequestOptions & Octokit.ReposCreateUsingTemplateParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + declineInvitation: { + ( + params?: Octokit.RequestOptions & Octokit.ReposDeclineInvitationParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required. + * + * If an organization owner has configured the organization to prevent members from deleting organization-owned repositories, a member will get this response: + */ + delete: { + (params?: Octokit.RequestOptions & Octokit.ReposDeleteParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + deleteCommitComment: { + ( + params?: Octokit.RequestOptions & Octokit.ReposDeleteCommitCommentParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + deleteDownload: { + ( + params?: Octokit.RequestOptions & Octokit.ReposDeleteDownloadParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Deletes a file in a repository. + * + * You can provide an additional `committer` parameter, which is an object containing information about the committer. Or, you can provide an `author` parameter, which is an object containing information about the author. + * + * The `author` section is optional and is filled in with the `committer` information if omitted. If the `committer` information is omitted, the authenticated user's information is used. + * + * You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code. + */ + deleteFile: { + ( + params?: Octokit.RequestOptions & Octokit.ReposDeleteFileParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + deleteHook: { + ( + params?: Octokit.RequestOptions & Octokit.ReposDeleteHookParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + deleteInvitation: { + ( + params?: Octokit.RequestOptions & Octokit.ReposDeleteInvitationParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Users with push access to the repository can delete a release. + */ + deleteRelease: { + ( + params?: Octokit.RequestOptions & Octokit.ReposDeleteReleaseParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + deleteReleaseAsset: { + ( + params?: Octokit.RequestOptions & Octokit.ReposDeleteReleaseAssetParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://help.github.com/en/articles/configuring-automated-security-fixes)" in the GitHub Help documentation. + */ + disableAutomatedSecurityFixes: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposDisableAutomatedSecurityFixesParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + disablePagesSite: { + ( + params?: Octokit.RequestOptions & Octokit.ReposDisablePagesSiteParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Disables vulnerability alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://help.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)" in the GitHub Help documentation. + */ + disableVulnerabilityAlerts: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposDisableVulnerabilityAlertsParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://help.github.com/en/articles/configuring-automated-security-fixes)" in the GitHub Help documentation. + */ + enableAutomatedSecurityFixes: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposEnableAutomatedSecurityFixesParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + enablePagesSite: { + ( + params?: Octokit.RequestOptions & Octokit.ReposEnablePagesSiteParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Enables vulnerability alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://help.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)" in the GitHub Help documentation. + */ + enableVulnerabilityAlerts: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposEnableVulnerabilityAlertsParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. + */ + get: { + (params?: Octokit.RequestOptions & Octokit.ReposGetParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + getAppsWithAccessToProtectedBranch: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposGetAppsWithAccessToProtectedBranchParams + ): Promise< + Octokit.Response< + Octokit.ReposGetAppsWithAccessToProtectedBranchResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Gets a redirect URL to download an archive for a repository. The `:archive_format` can be either `tarball` or `zipball`. The `:ref` must be a valid Git reference. If you omit `:ref`, the repository’s default branch (usually `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use the `Location` header to make a second `GET` request. + * + * _Note_: For private repositories, these links are temporary and expire after five minutes. + * + * To follow redirects with curl, use the `-L` switch: + */ + getArchiveLink: { + ( + params?: Octokit.RequestOptions & Octokit.ReposGetArchiveLinkParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + getBranch: { + (params?: Octokit.RequestOptions & Octokit.ReposGetBranchParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + */ + getBranchProtection: { + ( + params?: Octokit.RequestOptions & Octokit.ReposGetBranchProtectionParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Get the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. + */ + getClones: { + (params?: Octokit.RequestOptions & Octokit.ReposGetClonesParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Returns a weekly aggregate of the number of additions and deletions pushed to a repository. + */ + getCodeFrequencyStats: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposGetCodeFrequencyStatsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Possible values for the `permission` key: `admin`, `write`, `read`, `none`. + */ + getCollaboratorPermissionLevel: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposGetCollaboratorPermissionLevelParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. + * + * The most recent status for each context is returned, up to 100. This field [paginates](https://developer.github.com/v3/#pagination) if there are over 100 contexts. + * + * Additionally, a combined `state` is returned. The `state` is one of: + * + * * **failure** if any of the contexts report as `error` or `failure` + * * **pending** if there are no statuses or a context is `pending` + * * **success** if the latest status for all contexts is `success` + */ + getCombinedStatusForRef: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposGetCombinedStatusForRefParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. + * + * You can pass the appropriate [media type](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests) to fetch `diff` and `patch` formats. Diffs with binary data will have no `patch` property. + * + * To return only the SHA-1 hash of the commit reference, you can provide the `sha` custom [media type](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests) in the `Accept` header. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + getCommit: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposGetCommitParamsDeprecatedSha + ): Promise>; + ( + params?: Octokit.RequestOptions & + Octokit.ReposGetCommitParamsDeprecatedCommitSha + ): Promise>; + (params?: Octokit.RequestOptions & Octokit.ReposGetCommitParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. + */ + getCommitActivityStats: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposGetCommitActivityStatsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + getCommitComment: { + ( + params?: Octokit.RequestOptions & Octokit.ReposGetCommitCommentParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** To access this endpoint, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header: + * ``` + * application/vnd.github.VERSION.sha + * ``` + * Returns the SHA-1 of the commit reference. You must have `read` access for the repository to get the SHA-1 of a commit reference. You can use this endpoint to check if a remote reference's SHA-1 is the same as your local reference's SHA-1 by providing the local SHA-1 reference as the ETag. + * @deprecated "Get the SHA-1 of a commit reference" will be removed. Use "Get a single commit" instead with media type format set to "sha" instead. + */ + getCommitRefSha: { + ( + params?: Octokit.RequestOptions & Octokit.ReposGetCommitRefShaParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit `:path`, you will receive the contents of all files in the repository. + * + * Files and symlinks support [a custom media type](https://developer.github.com/v3/repos/contents/#custom-media-types) for retrieving the raw content or rendered HTML (when supported). All content types support [a custom media type](https://developer.github.com/v3/repos/contents/#custom-media-types) to ensure the content is returned in a consistent object format. + * + * **Note**: + * + * * To get a repository's contents recursively, you can [recursively get the tree](https://developer.github.com/v3/git/trees/). + * * This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees API](https://developer.github.com/v3/git/trees/#get-a-tree). + * * This API supports files up to 1 megabyte in size. + * + * The response will be an array of objects, one object for each item in the directory. + * + * When listing the contents of a directory, submodules have their "type" specified as "file". Logically, the value _should_ be "submodule". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW). In the next major version of the API, the type will be returned as "submodule". + * + * If the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the API responds with the content of the file (in the [format shown above](https://developer.github.com/v3/repos/contents/#response-if-content-is-a-file)). + * + * Otherwise, the API responds with an object describing the symlink itself: + * + * The `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific commit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out the submodule at that specific commit. + * + * If the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links["git"]`) and the github.com URLs (`html_url` and `_links["html"]`) will have null values. + */ + getContents: { + ( + params?: Octokit.RequestOptions & Octokit.ReposGetContentsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * * `total` - The Total number of commits authored by the contributor. + * + * Weekly Hash (`weeks` array): + * + * * `w` - Start of the week, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). + * * `a` - Number of additions + * * `d` - Number of deletions + * * `c` - Number of commits + */ + getContributorsStats: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposGetContributorsStatsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + getDeployKey: { + ( + params?: Octokit.RequestOptions & Octokit.ReposGetDeployKeyParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + getDeployment: { + ( + params?: Octokit.RequestOptions & Octokit.ReposGetDeploymentParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Users with pull access can view a deployment status for a deployment: + */ + getDeploymentStatus: { + ( + params?: Octokit.RequestOptions & Octokit.ReposGetDeploymentStatusParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + getDownload: { + ( + params?: Octokit.RequestOptions & Octokit.ReposGetDownloadParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + getHook: { + (params?: Octokit.RequestOptions & Octokit.ReposGetHookParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getLatestPagesBuild: { + ( + params?: Octokit.RequestOptions & Octokit.ReposGetLatestPagesBuildParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * View the latest published full release for the repository. + * + * The latest release is the most recent non-prerelease, non-draft release, sorted by the `created_at` attribute. The `created_at` attribute is the date of the commit used for the release, and not the date when the release was drafted or published. + */ + getLatestRelease: { + ( + params?: Octokit.RequestOptions & Octokit.ReposGetLatestReleaseParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + getPages: { + (params?: Octokit.RequestOptions & Octokit.ReposGetPagesParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getPagesBuild: { + ( + params?: Octokit.RequestOptions & Octokit.ReposGetPagesBuildParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Returns the total commit counts for the `owner` and total commit counts in `all`. `all` is everyone combined, including the `owner` in the last 52 weeks. If you'd like to get the commit counts for non-owners, you can subtract `owner` from `all`. + * + * The array order is oldest week (index 0) to most recent week. + */ + getParticipationStats: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposGetParticipationStatsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + */ + getProtectedBranchAdminEnforcement: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposGetProtectedBranchAdminEnforcementParams + ): Promise< + Octokit.Response< + Octokit.ReposGetProtectedBranchAdminEnforcementResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + */ + getProtectedBranchPullRequestReviewEnforcement: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposGetProtectedBranchPullRequestReviewEnforcementParams + ): Promise< + Octokit.Response< + Octokit.ReposGetProtectedBranchPullRequestReviewEnforcementResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of `true` indicates you must sign commits on this branch. For more information, see [Signing commits with GPG](https://help.github.com/articles/signing-commits-with-gpg) in GitHub Help. + * + * **Note**: You must enable branch protection to require signed commits. + */ + getProtectedBranchRequiredSignatures: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposGetProtectedBranchRequiredSignaturesParams + ): Promise< + Octokit.Response< + Octokit.ReposGetProtectedBranchRequiredSignaturesResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + */ + getProtectedBranchRequiredStatusChecks: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposGetProtectedBranchRequiredStatusChecksParams + ): Promise< + Octokit.Response< + Octokit.ReposGetProtectedBranchRequiredStatusChecksResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Lists who has access to this protected branch. {{#note}} + * + * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + */ + getProtectedBranchRestrictions: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposGetProtectedBranchRestrictionsParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Each array contains the day number, hour number, and number of commits: + * + * * `0-6`: Sunday - Saturday + * * `0-23`: Hour of day + * * Number of commits + * + * For example, `[2, 14, 25]` indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits. + */ + getPunchCardStats: { + ( + params?: Octokit.RequestOptions & Octokit.ReposGetPunchCardStatsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Gets the preferred README for a repository. + * + * READMEs support [custom media types](https://developer.github.com/v3/repos/contents/#custom-media-types) for retrieving the raw content or rendered HTML. + */ + getReadme: { + (params?: Octokit.RequestOptions & Octokit.ReposGetReadmeParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://developer.github.com/v3/#hypermedia). + */ + getRelease: { + ( + params?: Octokit.RequestOptions & Octokit.ReposGetReleaseParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://developer.github.com/v3/media/#media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. + */ + getReleaseAsset: { + ( + params?: Octokit.RequestOptions & Octokit.ReposGetReleaseAssetParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Get a published release with the specified tag. + */ + getReleaseByTag: { + ( + params?: Octokit.RequestOptions & Octokit.ReposGetReleaseByTagParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Lists the teams who have push access to this branch. If you pass the `hellcat-preview` media type, the list includes child teams. + */ + getTeamsWithAccessToProtectedBranch: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposGetTeamsWithAccessToProtectedBranchParams + ): Promise< + Octokit.Response< + Octokit.ReposGetTeamsWithAccessToProtectedBranchResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Get the top 10 popular contents over the last 14 days. + */ + getTopPaths: { + ( + params?: Octokit.RequestOptions & Octokit.ReposGetTopPathsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Get the top 10 referrers over the last 14 days. + */ + getTopReferrers: { + ( + params?: Octokit.RequestOptions & Octokit.ReposGetTopReferrersParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Lists the people who have push access to this branch. + */ + getUsersWithAccessToProtectedBranch: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposGetUsersWithAccessToProtectedBranchParams + ): Promise< + Octokit.Response< + Octokit.ReposGetUsersWithAccessToProtectedBranchResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Get the total number of views and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. + */ + getViews: { + (params?: Octokit.RequestOptions & Octokit.ReposGetViewsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + */ + list: { + (params?: Octokit.RequestOptions & Octokit.ReposListParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * @deprecated octokit.repos.listAppsWithAccessToProtectedBranch() has been renamed to octokit.repos.getAppsWithAccessToProtectedBranch() (2019-09-13) + */ + listAppsWithAccessToProtectedBranch: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposListAppsWithAccessToProtectedBranchParams + ): Promise< + Octokit.Response< + Octokit.ReposListAppsWithAccessToProtectedBranchResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + + listAssetsForRelease: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposListAssetsForReleaseParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listBranches: { + ( + params?: Octokit.RequestOptions & Octokit.ReposListBranchesParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. + */ + listBranchesForHeadCommit: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposListBranchesForHeadCommitParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. + * + * If you pass the `hellcat-preview` media type, team members will include the members of child teams. + */ + listCollaborators: { + ( + params?: Octokit.RequestOptions & Octokit.ReposListCollaboratorsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Use the `:commit_sha` to specify the commit that will have its comments listed. + */ + listCommentsForCommit: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposListCommentsForCommitParamsDeprecatedRef + ): Promise>; + ( + params?: Octokit.RequestOptions & + Octokit.ReposListCommentsForCommitParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Commit Comments use [these custom media types](https://developer.github.com/v3/repos/comments/#custom-media-types). You can read more about the use of media types in the API [here](https://developer.github.com/v3/media/). + * + * Comments are ordered by ascending ID. + */ + listCommitComments: { + ( + params?: Octokit.RequestOptions & Octokit.ReposListCommitCommentsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + listCommits: { + ( + params?: Octokit.RequestOptions & Octokit.ReposListCommitsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists contributors to the specified repository and sorts them by the number of commits per contributor in descending order. This endpoint may return information that is a few hours old because the GitHub REST API v3 caches contributor data to improve performance. + * + * GitHub identifies contributors by author email address. This endpoint groups contribution counts by GitHub user, which includes all associated email addresses. To improve performance, only the first 500 author email addresses in the repository link to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information. + */ + listContributors: { + ( + params?: Octokit.RequestOptions & Octokit.ReposListContributorsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listDeployKeys: { + ( + params?: Octokit.RequestOptions & Octokit.ReposListDeployKeysParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Users with pull access can view deployment statuses for a deployment: + */ + listDeploymentStatuses: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposListDeploymentStatusesParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Simple filtering of deployments is available via query parameters: + */ + listDeployments: { + ( + params?: Octokit.RequestOptions & Octokit.ReposListDeploymentsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listDownloads: { + ( + params?: Octokit.RequestOptions & Octokit.ReposListDownloadsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists repositories for the specified organization. + */ + listForOrg: { + ( + params?: Octokit.RequestOptions & Octokit.ReposListForOrgParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists public repositories for the specified user. + */ + listForUser: { + ( + params?: Octokit.RequestOptions & Octokit.ReposListForUserParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + listForks: { + (params?: Octokit.RequestOptions & Octokit.ReposListForksParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listHooks: { + (params?: Octokit.RequestOptions & Octokit.ReposListHooksParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. + */ + listInvitations: { + ( + params?: Octokit.RequestOptions & Octokit.ReposListInvitationsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * When authenticating as a user, this endpoint will list all currently open repository invitations for that user. + */ + listInvitationsForAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposListInvitationsForAuthenticatedUserParams + ): Promise< + Octokit.Response< + Octokit.ReposListInvitationsForAuthenticatedUserResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. + */ + listLanguages: { + ( + params?: Octokit.RequestOptions & Octokit.ReposListLanguagesParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listPagesBuilds: { + ( + params?: Octokit.RequestOptions & Octokit.ReposListPagesBuildsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + */ + listProtectedBranchRequiredStatusChecksContexts: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposListProtectedBranchRequiredStatusChecksContextsParams + ): Promise< + Octokit.Response< + Octokit.ReposListProtectedBranchRequiredStatusChecksContextsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Lists the teams who have push access to this branch. If you pass the `hellcat-preview` media type, the list includes child teams. + * @deprecated octokit.repos.listProtectedBranchTeamRestrictions() has been renamed to octokit.repos.getTeamsWithAccessToProtectedBranch() (2019-09-09) + */ + listProtectedBranchTeamRestrictions: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposListProtectedBranchTeamRestrictionsParams + ): Promise< + Octokit.Response< + Octokit.ReposListProtectedBranchTeamRestrictionsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Lists the people who have push access to this branch. + * @deprecated octokit.repos.listProtectedBranchUserRestrictions() has been renamed to octokit.repos.getUsersWithAccessToProtectedBranch() (2019-09-09) + */ + listProtectedBranchUserRestrictions: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposListProtectedBranchUserRestrictionsParams + ): Promise< + Octokit.Response< + Octokit.ReposListProtectedBranchUserRestrictionsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists all public repositories in the order that they were created. + * + * Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://developer.github.com/v3/#link-header) to get the URL for the next page of repositories. + */ + listPublic: { + ( + params?: Octokit.RequestOptions & Octokit.ReposListPublicParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists all pull requests containing the provided commit SHA, which can be from any point in the commit history. The results will include open and closed pull requests. Additional preview headers may be required to see certain details for associated pull requests, such as whether a pull request is in a draft state. For more information about previews that might affect this endpoint, see the [List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests) endpoint. + */ + listPullRequestsAssociatedWithCommit: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposListPullRequestsAssociatedWithCommitParams + ): Promise< + Octokit.Response< + Octokit.ReposListPullRequestsAssociatedWithCommitResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the [Repository Tags API](https://developer.github.com/v3/repos/#list-tags). + * + * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + */ + listReleases: { + ( + params?: Octokit.RequestOptions & Octokit.ReposListReleasesParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Users with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one. + * + * This resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`. + */ + listStatusesForRef: { + ( + params?: Octokit.RequestOptions & Octokit.ReposListStatusesForRefParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listTags: { + (params?: Octokit.RequestOptions & Octokit.ReposListTagsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listTeams: { + (params?: Octokit.RequestOptions & Octokit.ReposListTeamsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Lists the teams who have push access to this branch. If you pass the `hellcat-preview` media type, the list includes child teams. + * @deprecated octokit.repos.listTeamsWithAccessToProtectedBranch() has been renamed to octokit.repos.getTeamsWithAccessToProtectedBranch() (2019-09-13) + */ + listTeamsWithAccessToProtectedBranch: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposListTeamsWithAccessToProtectedBranchParams + ): Promise< + Octokit.Response< + Octokit.ReposListTeamsWithAccessToProtectedBranchResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + + listTopics: { + ( + params?: Octokit.RequestOptions & Octokit.ReposListTopicsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Lists the people who have push access to this branch. + * @deprecated octokit.repos.listUsersWithAccessToProtectedBranch() has been renamed to octokit.repos.getUsersWithAccessToProtectedBranch() (2019-09-13) + */ + listUsersWithAccessToProtectedBranch: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposListUsersWithAccessToProtectedBranchParams + ): Promise< + Octokit.Response< + Octokit.ReposListUsersWithAccessToProtectedBranchResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + + merge: { + (params?: Octokit.RequestOptions & Octokit.ReposMergeParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This will trigger a [ping event](https://developer.github.com/webhooks/#ping-event) to be sent to the hook. + */ + pingHook: { + (params?: Octokit.RequestOptions & Octokit.ReposPingHookParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + */ + removeBranchProtection: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposRemoveBranchProtectionParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + removeCollaborator: { + ( + params?: Octokit.RequestOptions & Octokit.ReposRemoveCollaboratorParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + removeDeployKey: { + ( + params?: Octokit.RequestOptions & Octokit.ReposRemoveDeployKeyParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + removeProtectedBranchAdminEnforcement: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposRemoveProtectedBranchAdminEnforcementParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Removes the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + removeProtectedBranchAppRestrictions: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposRemoveProtectedBranchAppRestrictionsParams + ): Promise< + Octokit.Response< + Octokit.ReposRemoveProtectedBranchAppRestrictionsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + */ + removeProtectedBranchPullRequestReviewEnforcement: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposRemoveProtectedBranchPullRequestReviewEnforcementParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * When authenticated with admin or owner permissions to the repository, you can use this endpoint to disable required signed commits on a branch. You must enable branch protection to require signed commits. + */ + removeProtectedBranchRequiredSignatures: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposRemoveProtectedBranchRequiredSignaturesParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + */ + removeProtectedBranchRequiredStatusChecks: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposRemoveProtectedBranchRequiredStatusChecksParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + */ + removeProtectedBranchRequiredStatusChecksContexts: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposRemoveProtectedBranchRequiredStatusChecksContextsParams + ): Promise< + Octokit.Response< + Octokit.ReposRemoveProtectedBranchRequiredStatusChecksContextsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Disables the ability to restrict who can push to this branch. + */ + removeProtectedBranchRestrictions: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposRemoveProtectedBranchRestrictionsParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Removes the ability of a team to push to this branch. If you pass the `hellcat-preview` media type, you can include child teams. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + removeProtectedBranchTeamRestrictions: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposRemoveProtectedBranchTeamRestrictionsParams + ): Promise< + Octokit.Response< + Octokit.ReposRemoveProtectedBranchTeamRestrictionsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Removes the ability of a user to push to this branch. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + removeProtectedBranchUserRestrictions: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposRemoveProtectedBranchUserRestrictionsParams + ): Promise< + Octokit.Response< + Octokit.ReposRemoveProtectedBranchUserRestrictionsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + replaceProtectedBranchAppRestrictions: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposReplaceProtectedBranchAppRestrictionsParams + ): Promise< + Octokit.Response< + Octokit.ReposReplaceProtectedBranchAppRestrictionsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + */ + replaceProtectedBranchRequiredStatusChecksContexts: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposReplaceProtectedBranchRequiredStatusChecksContextsParams + ): Promise< + Octokit.Response< + Octokit.ReposReplaceProtectedBranchRequiredStatusChecksContextsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Replaces the list of teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. If you pass the `hellcat-preview` media type, you can include child teams. + * + * | Type | Description | + * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | + * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + replaceProtectedBranchTeamRestrictions: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposReplaceProtectedBranchTeamRestrictionsParams + ): Promise< + Octokit.Response< + Octokit.ReposReplaceProtectedBranchTeamRestrictionsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Replaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people. + * + * | Type | Description | + * | ------- | ----------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + replaceProtectedBranchUserRestrictions: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposReplaceProtectedBranchUserRestrictionsParams + ): Promise< + Octokit.Response< + Octokit.ReposReplaceProtectedBranchUserRestrictionsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + + replaceTopics: { + ( + params?: Octokit.RequestOptions & Octokit.ReposReplaceTopicsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * You can request that your site be built from the latest revision on the default branch. This has the same effect as pushing a commit to your default branch, but does not require an additional commit. Manually triggering page builds can be helpful when diagnosing build warnings and failures. + * + * Build requests are limited to one concurrent build per repository and one concurrent build per requester. If you request a build while another is still in progress, the second request will be queued until the first completes. + */ + requestPageBuild: { + ( + params?: Octokit.RequestOptions & Octokit.ReposRequestPageBuildParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * This endpoint will return all community profile metrics, including an overall health score, repository description, the presence of documentation, detected code of conduct, detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, README, and CONTRIBUTING files. + */ + retrieveCommunityProfileMetrics: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposRetrieveCommunityProfileMetricsParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated. + * + * **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` + */ + testPushHook: { + ( + params?: Octokit.RequestOptions & Octokit.ReposTestPushHookParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://help.github.com/articles/about-repository-transfers/). + */ + transfer: { + (params?: Octokit.RequestOptions & Octokit.ReposTransferParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note**: To edit a repository's topics, use the [`topics` endpoint](https://developer.github.com/v3/repos/#replace-all-topics-for-a-repository). + */ + update: { + (params?: Octokit.RequestOptions & Octokit.ReposUpdateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Protecting a branch requires admin or owner permissions to the repository. + * + * **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + * + * **Note**: The list of users, apps, and teams in total is limited to 100 items. + */ + updateBranchProtection: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposUpdateBranchProtectionParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + updateCommitComment: { + ( + params?: Octokit.RequestOptions & Octokit.ReposUpdateCommitCommentParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates a new file or updates an existing file in a repository. + * @deprecated octokit.repos.updateFile() has been renamed to octokit.repos.createOrUpdateFile() (2019-06-07) + */ + updateFile: { + ( + params?: Octokit.RequestOptions & Octokit.ReposUpdateFileParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + updateHook: { + ( + params?: Octokit.RequestOptions & Octokit.ReposUpdateHookParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + updateInformationAboutPagesSite: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposUpdateInformationAboutPagesSiteParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + updateInvitation: { + ( + params?: Octokit.RequestOptions & Octokit.ReposUpdateInvitationParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + * + * **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + */ + updateProtectedBranchPullRequestReviewEnforcement: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposUpdateProtectedBranchPullRequestReviewEnforcementParams + ): Promise< + Octokit.Response< + Octokit.ReposUpdateProtectedBranchPullRequestReviewEnforcementResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. + */ + updateProtectedBranchRequiredStatusChecks: { + ( + params?: Octokit.RequestOptions & + Octokit.ReposUpdateProtectedBranchRequiredStatusChecksParams + ): Promise< + Octokit.Response< + Octokit.ReposUpdateProtectedBranchRequiredStatusChecksResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Users with push access to the repository can edit a release. + */ + updateRelease: { + ( + params?: Octokit.RequestOptions & Octokit.ReposUpdateReleaseParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Users with push access to the repository can edit a release asset. + */ + updateReleaseAsset: { + ( + params?: Octokit.RequestOptions & Octokit.ReposUpdateReleaseAssetParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * This endpoint makes use of [a Hypermedia relation](https://developer.github.com/v3/#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in the response of the [Create a release endpoint](https://developer.github.com/v3/repos/releases/#create-a-release) to upload a release asset. + * + * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. + * + * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: + * + * `application/zip` + * + * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example, you'll still need to pass your authentication to be able to upload an asset. + */ + uploadReleaseAsset: { + ( + params?: Octokit.RequestOptions & Octokit.ReposUploadReleaseAssetParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + }; + search: { + /** + * Find file contents via various criteria. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). + * + * When searching for code, you can get text match metadata for the file **content** and file **path** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). + * + * **Note:** You must [authenticate](https://developer.github.com/v3/#authentication) to search for code across all public repositories. + * + * **Considerations for code search** + * + * Due to the complexity of searching code, there are a few restrictions on how searches are performed: + * + * * Only the _default branch_ is considered. In most cases, this will be the `master` branch. + * * Only files smaller than 384 KB are searchable. + * * You must always include at least one search term when searching source code. For example, searching for [`language:go`](https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code) is not valid, while [`amazing language:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is. + * + * Suppose you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery). Your query would look something like this: + * + * Here, we're searching for the keyword `addClass` within a file's contents. We're making sure that we're only looking in files where the language is JavaScript. And we're scoping the search to the `repo:jquery/jquery` repository. + */ + code: { + (params?: Octokit.RequestOptions & Octokit.SearchCodeParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Find commits via various criteria. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). + * + * When searching for commits, you can get text match metadata for the **message** field when you provide the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). + * + * **Considerations for commit search** + * + * Only the _default branch_ is considered. In most cases, this will be the `master` branch. + * + * Suppose you want to find commits related to CSS in the [octocat/Spoon-Knife](https://github.com/octocat/Spoon-Knife) repository. Your query would look something like this: + */ + commits: { + (params?: Octokit.RequestOptions & Octokit.SearchCommitsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Find issues by state and keyword. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). + * + * When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). + * + * Let's say you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * + * In this query, we're searching for the keyword `windows`, within any open issue that's labeled as `bug`. The search runs across repositories whose primary language is Python. We’re sorting by creation date in ascending order, so that the oldest issues appear first in the search results. + * @deprecated octokit.search.issues() has been renamed to octokit.search.issuesAndPullRequests() (2018-12-27) + */ + issues: { + (params?: Octokit.RequestOptions & Octokit.SearchIssuesParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Find issues by state and keyword. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). + * + * When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). + * + * Let's say you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * + * In this query, we're searching for the keyword `windows`, within any open issue that's labeled as `bug`. The search runs across repositories whose primary language is Python. We’re sorting by creation date in ascending order, so that the oldest issues appear first in the search results. + */ + issuesAndPullRequests: { + ( + params?: Octokit.RequestOptions & + Octokit.SearchIssuesAndPullRequestsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://developer.github.com/v3/#pagination). + * + * When searching for labels, you can get text match metadata for the label **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). + * + * Suppose you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: + * + * The labels that best match for the query appear first in the search results. + */ + labels: { + (params?: Octokit.RequestOptions & Octokit.SearchLabelsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Find repositories via various criteria. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). + * + * When searching for repositories, you can get text match metadata for the **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). + * + * Suppose you want to search for popular Tetris repositories written in Assembly. Your query might look like this. + * + * You can search for multiple topics by adding more `topic:` instances, and including the `mercy-preview` header. For example: + * + * In this request, we're searching for repositories with the word `tetris` in the name, the description, or the README. We're limiting the results to only find repositories where the primary language is Assembly. We're sorting by stars in descending order, so that the most popular repositories appear first in the search results. + */ + repos: { + (params?: Octokit.RequestOptions & Octokit.SearchReposParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). + * + * When searching for topics, you can get text match metadata for the topic's **short\_description**, **description**, **name**, or **display\_name** field when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). + * + * See "[Searching topics](https://help.github.com/articles/searching-topics/)" for a detailed list of qualifiers. + * + * Suppose you want to search for topics related to Ruby that are featured on [https://github.com/topics](https://github.com/topics). Your query might look like this: + * + * In this request, we're searching for topics with the keyword `ruby`, and we're limiting the results to find only topics that are featured. The topics that are the best match for the query appear first in the search results. + * + * **Note:** A search for featured Ruby topics only has 6 total results, so a [Link header](https://developer.github.com/v3/#link-header) indicating pagination is not included in the response. + */ + topics: { + (params?: Octokit.RequestOptions & Octokit.SearchTopicsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Find users via various criteria. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). + * + * When searching for users, you can get text match metadata for the issue **login**, **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). + * + * Imagine you're looking for a list of popular users. You might try out this query: + * + * Here, we're looking at users with the name Tom. We're only interested in those with more than 42 repositories, and only if they have over 1,000 followers. + */ + users: { + (params?: Octokit.RequestOptions & Octokit.SearchUsersParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + teams: { + /** + * The "Add team member" API (described below) is deprecated. + * + * We recommend using the [Add team membership API](https://developer.github.com/v3/teams/members/#add-or-update-team-membership) instead. It allows you to invite new organization members to your teams. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/articles/github-s-products) in the GitHub Help documentation. + * + * To add someone to a team, the authenticated user must be a team maintainer in the team they're changing or be an owner of the organization that the team is associated with. The person being added to the team must be a member of the team's organization. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + * @deprecated octokit.teams.addMember() is deprecated, see https://developer.github.com/v3/teams/members/#add-team-member + */ + addMember: { + (params?: Octokit.RequestOptions & Octokit.TeamsAddMemberParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/articles/github-s-products) in the GitHub Help documentation. + * + * If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a maintainer of the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. + * + * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a maintainer of the team. + */ + addOrUpdateMembership: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsAddOrUpdateMembershipParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. + */ + addOrUpdateProject: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsAddOrUpdateProjectParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. + * + * If you pass the `hellcat-preview` media type, you can modify repository permissions of child teams. + * + * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + */ + addOrUpdateRepo: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsAddOrUpdateRepoParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note**: If you pass the `hellcat-preview` media type, repositories inherited through a parent team will be checked. + * + * You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://developer.github.com/v3/media/) via the `Accept` header: + */ + checkManagesRepo: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsCheckManagesRepoParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * To create a team, the authenticated user must be a member or owner of `:org`. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see "[Setting team creation permissions](https://help.github.com/en/articles/setting-team-creation-permissions-in-your-organization)." + */ + create: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsCreateParamsDeprecatedPermission + ): Promise>; + (params?: Octokit.RequestOptions & Octokit.TeamsCreateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + */ + createDiscussion: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsCreateDiscussionParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + */ + createDiscussionComment: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsCreateDiscussionCommentParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * To delete a team, the authenticated user must be a team maintainer or an owner of the org associated with the team. + * + * If you are an organization owner and you pass the `hellcat-preview` media type, deleting a parent team will delete all of its child teams as well. + */ + delete: { + (params?: Octokit.RequestOptions & Octokit.TeamsDeleteParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + deleteDiscussion: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsDeleteDiscussionParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + deleteDiscussionComment: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsDeleteDiscussionCommentParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + get: { + (params?: Octokit.RequestOptions & Octokit.TeamsGetParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. + */ + getByName: { + (params?: Octokit.RequestOptions & Octokit.TeamsGetByNameParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + getDiscussion: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsGetDiscussionParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + getDiscussionComment: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsGetDiscussionCommentParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * The "Get team member" API (described below) is deprecated. + * + * We recommend using the [Get team membership API](https://developer.github.com/v3/teams/members/#get-team-membership) instead. It allows you to get both active and pending memberships. + * + * To list members in a team, the team must be visible to the authenticated user. + * @deprecated octokit.teams.getMember() is deprecated, see https://developer.github.com/v3/teams/members/#get-team-member + */ + getMember: { + (params?: Octokit.RequestOptions & Octokit.TeamsGetMemberParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * If you pass the `hellcat-preview` media type, team members will include the members of child teams. + * + * To get a user's membership with a team, the team must be visible to the authenticated user. + * + * **Note:** The `role` for organization owners returns as `maintainer`. For more information about `maintainer` roles, see [Create team](https://developer.github.com/v3/teams#create-team). + */ + getMembership: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsGetMembershipParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + list: { + (params?: Octokit.RequestOptions & Octokit.TeamsListParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * At this time, the `hellcat-preview` media type is required to use this endpoint. + */ + listChild: { + (params?: Octokit.RequestOptions & Octokit.TeamsListChildParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + listDiscussionComments: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsListDiscussionCommentsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + listDiscussions: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsListDiscussionsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * List all of the teams across all of the organizations to which the authenticated user belongs. This method requires `user`, `repo`, or `read:org` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://developer.github.com/apps/building-oauth-apps/). + */ + listForAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsListForAuthenticatedUserParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * If you pass the `hellcat-preview` media type, team members will include the members of child teams. + */ + listMembers: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsListMembersParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + */ + listPendingInvitations: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsListPendingInvitationsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists the organization projects for a team. If you pass the `hellcat-preview` media type, the response will include projects inherited from a parent team. + */ + listProjects: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsListProjectsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note**: If you pass the `hellcat-preview` media type, the response will include any repositories inherited through a parent team. + */ + listRepos: { + (params?: Octokit.RequestOptions & Octokit.TeamsListReposParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * The "Remove team member" API (described below) is deprecated. + * + * We recommend using the [Remove team membership endpoint](https://developer.github.com/v3/teams/members/#remove-team-membership) instead. It allows you to remove both active and pending memberships. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/articles/github-s-products) in the GitHub Help documentation. + * + * To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * @deprecated octokit.teams.removeMember() is deprecated, see https://developer.github.com/v3/teams/members/#remove-team-member + */ + removeMember: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsRemoveMemberParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/articles/github-s-products) in the GitHub Help documentation. + * + * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + removeMembership: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsRemoveMembershipParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it. + */ + removeProject: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsRemoveProjectParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team. + */ + removeRepo: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsRemoveRepoParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. If you pass the `hellcat-preview` media type, the response will include projects inherited from a parent team. + */ + reviewProject: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsReviewProjectParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * To edit a team, the authenticated user must either be an owner of the org that the team is associated with, or a maintainer of the team. + * + * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + */ + update: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsUpdateParamsDeprecatedPermission + ): Promise>; + (params?: Octokit.RequestOptions & Octokit.TeamsUpdateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + updateDiscussion: { + ( + params?: Octokit.RequestOptions & Octokit.TeamsUpdateDiscussionParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + updateDiscussionComment: { + ( + params?: Octokit.RequestOptions & + Octokit.TeamsUpdateDiscussionCommentParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + users: { + /** + * This endpoint is accessible with the `user` scope. + */ + addEmails: { + (params?: Octokit.RequestOptions & Octokit.UsersAddEmailsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + block: { + (params?: Octokit.RequestOptions & Octokit.UsersBlockParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * If the user is blocked: + * + * If the user is not blocked: + */ + checkBlocked: { + ( + params?: Octokit.RequestOptions & Octokit.UsersCheckBlockedParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + checkFollowing: { + ( + params?: Octokit.RequestOptions & Octokit.UsersCheckFollowingParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + + checkFollowingForUser: { + ( + params?: Octokit.RequestOptions & + Octokit.UsersCheckFollowingForUserParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Adds a GPG key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:gpg_key` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + createGpgKey: { + ( + params?: Octokit.RequestOptions & Octokit.UsersCreateGpgKeyParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Adds a public SSH key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:public_key` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + createPublicKey: { + ( + params?: Octokit.RequestOptions & Octokit.UsersCreatePublicKeyParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * This endpoint is accessible with the `user` scope. + */ + deleteEmails: { + ( + params?: Octokit.RequestOptions & Octokit.UsersDeleteEmailsParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Removes a GPG key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:gpg_key` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + deleteGpgKey: { + ( + params?: Octokit.RequestOptions & Octokit.UsersDeleteGpgKeyParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Removes a public SSH key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:public_key` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + deletePublicKey: { + ( + params?: Octokit.RequestOptions & Octokit.UsersDeletePublicKeyParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + * + * Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. + */ + follow: { + (params?: Octokit.RequestOptions & Octokit.UsersFollowParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists public and private profile information when authenticated through basic auth or OAuth with the `user` scope. + * + * Lists public profile information when authenticated through OAuth without the `user` scope. + */ + getAuthenticated: { + (params?: Octokit.RequestOptions & Octokit.EmptyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Provides publicly available information about someone with a GitHub account. + * + * GitHub Apps with the `Plan` user permission can use this endpoint to retrieve information about a user's GitHub plan. The GitHub App must be authenticated as a user. See "[Identifying and authorizing users for GitHub Apps](https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)" for details about authentication. For an example response, see "[Response with GitHub plan information](https://developer.github.com/v3/users/#response-with-github-plan-information)." + * + * The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://developer.github.com/v3/#authentication). + * + * The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://developer.github.com/v3/users/emails/)". + */ + getByUsername: { + ( + params?: Octokit.RequestOptions & Octokit.UsersGetByUsernameParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Provides hovercard information when authenticated through basic auth or OAuth with the `repo` scope. You can find out more about someone in relation to their pull requests, issues, repositories, and organizations. + * + * The `subject_type` and `subject_id` parameters provide context for the person's hovercard, which returns more information than without the parameters. For example, if you wanted to find out more about `octocat` who owns the `Spoon-Knife` repository via cURL, it would look like this: + */ + getContextForUser: { + ( + params?: Octokit.RequestOptions & Octokit.UsersGetContextForUserParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * View extended details for a single GPG key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + getGpgKey: { + (params?: Octokit.RequestOptions & Octokit.UsersGetGpgKeyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * View extended details for a single public SSH key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + getPublicKey: { + ( + params?: Octokit.RequestOptions & Octokit.UsersGetPublicKeyParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts. + * + * Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://developer.github.com/v3/#link-header) to get the URL for the next page of users. + */ + list: { + (params?: Octokit.RequestOptions & Octokit.UsersListParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List the users you've blocked on your personal account. + */ + listBlocked: { + (params?: Octokit.RequestOptions & Octokit.EmptyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. + */ + listEmails: { + ( + params?: Octokit.RequestOptions & Octokit.UsersListEmailsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listFollowersForAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.UsersListFollowersForAuthenticatedUserParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listFollowersForUser: { + ( + params?: Octokit.RequestOptions & + Octokit.UsersListFollowersForUserParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + + listFollowingForAuthenticatedUser: { + ( + params?: Octokit.RequestOptions & + Octokit.UsersListFollowingForAuthenticatedUserParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listFollowingForUser: { + ( + params?: Octokit.RequestOptions & + Octokit.UsersListFollowingForUserParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists the current user's GPG keys. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + listGpgKeys: { + ( + params?: Octokit.RequestOptions & Octokit.UsersListGpgKeysParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists the GPG keys for a user. This information is accessible by anyone. + */ + listGpgKeysForUser: { + ( + params?: Octokit.RequestOptions & Octokit.UsersListGpgKeysForUserParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists your publicly visible email address, which you can set with the [Toggle primary email visibility](https://developer.github.com/v3/users/emails/#toggle-primary-email-visibility) endpoint. This endpoint is accessible with the `user:email` scope. + */ + listPublicEmails: { + ( + params?: Octokit.RequestOptions & Octokit.UsersListPublicEmailsParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists the public SSH keys for the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + listPublicKeys: { + ( + params?: Octokit.RequestOptions & Octokit.UsersListPublicKeysParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists the _verified_ public SSH keys for a user. This is accessible by anyone. + */ + listPublicKeysForUser: { + ( + params?: Octokit.RequestOptions & + Octokit.UsersListPublicKeysForUserParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + /** + * Sets the visibility for your primary email addresses. + */ + togglePrimaryEmailVisibility: { + ( + params?: Octokit.RequestOptions & + Octokit.UsersTogglePrimaryEmailVisibilityParams + ): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + unblock: { + (params?: Octokit.RequestOptions & Octokit.UsersUnblockParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. + */ + unfollow: { + (params?: Octokit.RequestOptions & Octokit.UsersUnfollowParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** If your email is set to private and you send an `email` parameter as part of this request to update your profile, your privacy settings are still enforced: the email address will not be displayed on your public profile or via the API. + */ + updateAuthenticated: { + ( + params?: Octokit.RequestOptions & Octokit.UsersUpdateAuthenticatedParams + ): Promise>; + + endpoint: Octokit.Endpoint; + }; + }; +} + +export = Octokit; diff --git a/node_modules/@octokit/rest/index.js b/node_modules/@octokit/rest/index.js new file mode 100644 index 00000000..5a228f3f --- /dev/null +++ b/node_modules/@octokit/rest/index.js @@ -0,0 +1,15 @@ +const Octokit = require("./lib/core"); + +const CORE_PLUGINS = [ + require("./plugins/log"), + require("./plugins/authentication-deprecated"), // deprecated: remove in v17 + require("./plugins/authentication"), + require("./plugins/pagination"), + require("./plugins/register-endpoints"), + require("./plugins/rest-api-endpoints"), + require("./plugins/validate"), + + require("octokit-pagination-methods") // deprecated: remove in v17 +]; + +module.exports = Octokit.plugin(CORE_PLUGINS); diff --git a/node_modules/@octokit/rest/lib/constructor.js b/node_modules/@octokit/rest/lib/constructor.js new file mode 100644 index 00000000..d83cf6b4 --- /dev/null +++ b/node_modules/@octokit/rest/lib/constructor.js @@ -0,0 +1,29 @@ +module.exports = Octokit; + +const { request } = require("@octokit/request"); +const Hook = require("before-after-hook"); + +const parseClientOptions = require("./parse-client-options"); + +function Octokit(plugins, options) { + options = options || {}; + const hook = new Hook.Collection(); + const log = Object.assign( + { + debug: () => {}, + info: () => {}, + warn: console.warn, + error: console.error + }, + options && options.log + ); + const api = { + hook, + log, + request: request.defaults(parseClientOptions(options, log, hook)) + }; + + plugins.forEach(pluginFunction => pluginFunction(api, options)); + + return api; +} diff --git a/node_modules/@octokit/rest/lib/core.js b/node_modules/@octokit/rest/lib/core.js new file mode 100644 index 00000000..4943ffad --- /dev/null +++ b/node_modules/@octokit/rest/lib/core.js @@ -0,0 +1,3 @@ +const factory = require("./factory"); + +module.exports = factory(); diff --git a/node_modules/@octokit/rest/lib/factory.js b/node_modules/@octokit/rest/lib/factory.js new file mode 100644 index 00000000..5dc20652 --- /dev/null +++ b/node_modules/@octokit/rest/lib/factory.js @@ -0,0 +1,10 @@ +module.exports = factory; + +const Octokit = require("./constructor"); +const registerPlugin = require("./register-plugin"); + +function factory(plugins) { + const Api = Octokit.bind(null, plugins || []); + Api.plugin = registerPlugin.bind(null, plugins || []); + return Api; +} diff --git a/node_modules/@octokit/rest/lib/parse-client-options.js b/node_modules/@octokit/rest/lib/parse-client-options.js new file mode 100644 index 00000000..c7c097dd --- /dev/null +++ b/node_modules/@octokit/rest/lib/parse-client-options.js @@ -0,0 +1,89 @@ +module.exports = parseOptions; + +const { Deprecation } = require("deprecation"); +const { getUserAgent } = require("universal-user-agent"); +const once = require("once"); + +const pkg = require("../package.json"); + +const deprecateOptionsTimeout = once((log, deprecation) => + log.warn(deprecation) +); +const deprecateOptionsAgent = once((log, deprecation) => log.warn(deprecation)); +const deprecateOptionsHeaders = once((log, deprecation) => + log.warn(deprecation) +); + +function parseOptions(options, log, hook) { + if (options.headers) { + options.headers = Object.keys(options.headers).reduce((newObj, key) => { + newObj[key.toLowerCase()] = options.headers[key]; + return newObj; + }, {}); + } + + const clientDefaults = { + headers: options.headers || {}, + request: options.request || {}, + mediaType: { + previews: [], + format: "" + } + }; + + if (options.baseUrl) { + clientDefaults.baseUrl = options.baseUrl; + } + + if (options.userAgent) { + clientDefaults.headers["user-agent"] = options.userAgent; + } + + if (options.previews) { + clientDefaults.mediaType.previews = options.previews; + } + + if (options.timeZone) { + clientDefaults.headers["time-zone"] = options.timeZone; + } + + if (options.timeout) { + deprecateOptionsTimeout( + log, + new Deprecation( + "[@octokit/rest] new Octokit({timeout}) is deprecated. Use {request: {timeout}} instead. See https://github.com/octokit/request.js#request" + ) + ); + clientDefaults.request.timeout = options.timeout; + } + + if (options.agent) { + deprecateOptionsAgent( + log, + new Deprecation( + "[@octokit/rest] new Octokit({agent}) is deprecated. Use {request: {agent}} instead. See https://github.com/octokit/request.js#request" + ) + ); + clientDefaults.request.agent = options.agent; + } + + if (options.headers) { + deprecateOptionsHeaders( + log, + new Deprecation( + "[@octokit/rest] new Octokit({headers}) is deprecated. Use {userAgent, previews} instead. See https://github.com/octokit/request.js#request" + ) + ); + } + + const userAgentOption = clientDefaults.headers["user-agent"]; + const defaultUserAgent = `octokit.js/${pkg.version} ${getUserAgent()}`; + + clientDefaults.headers["user-agent"] = [userAgentOption, defaultUserAgent] + .filter(Boolean) + .join(" "); + + clientDefaults.request.hook = hook.bind(null, "request"); + + return clientDefaults; +} diff --git a/node_modules/@octokit/rest/lib/register-plugin.js b/node_modules/@octokit/rest/lib/register-plugin.js new file mode 100644 index 00000000..c1ae7754 --- /dev/null +++ b/node_modules/@octokit/rest/lib/register-plugin.js @@ -0,0 +1,9 @@ +module.exports = registerPlugin; + +const factory = require("./factory"); + +function registerPlugin(plugins, pluginFunction) { + return factory( + plugins.includes(pluginFunction) ? plugins : plugins.concat(pluginFunction) + ); +} diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/LICENSE.md b/node_modules/@octokit/rest/node_modules/universal-user-agent/LICENSE.md new file mode 100644 index 00000000..f105ab0c --- /dev/null +++ b/node_modules/@octokit/rest/node_modules/universal-user-agent/LICENSE.md @@ -0,0 +1,7 @@ +# [ISC License](https://spdx.org/licenses/ISC) + +Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m) + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/README.md b/node_modules/@octokit/rest/node_modules/universal-user-agent/README.md new file mode 100644 index 00000000..d00d14c1 --- /dev/null +++ b/node_modules/@octokit/rest/node_modules/universal-user-agent/README.md @@ -0,0 +1,25 @@ +# universal-user-agent + +> Get a user agent string in both browser and node + +[![@latest](https://img.shields.io/npm/v/universal-user-agent.svg)](https://www.npmjs.com/package/universal-user-agent) +[![Build Status](https://travis-ci.com/gr2m/universal-user-agent.svg?branch=master)](https://travis-ci.com/gr2m/universal-user-agent) +[![Greenkeeper](https://badges.greenkeeper.io/gr2m/universal-user-agent.svg)](https://greenkeeper.io/) + +```js +const { getUserAgent } = require("universal-user-agent"); +// or import { getUserAgent } from "universal-user-agent"; + +const userAgent = getUserAgent(); +// userAgent will look like this +// in browser: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0" +// in node: Node.js/v8.9.4 (macOS High Sierra; x64) +``` + +## Credits + +The Node implementation was originally inspired by [default-user-agent](https://www.npmjs.com/package/default-user-agent). + +## License + +[ISC](LICENSE.md) diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-node/index.js b/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-node/index.js new file mode 100644 index 00000000..80a07105 --- /dev/null +++ b/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-node/index.js @@ -0,0 +1,22 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var osName = _interopDefault(require('os-name')); + +function getUserAgent() { + try { + return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`; + } catch (error) { + if (/wmic os get Caption/.test(error.message)) { + return "Windows "; + } + + throw error; + } +} + +exports.getUserAgent = getUserAgent; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-node/index.js.map b/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-node/index.js.map new file mode 100644 index 00000000..aff09ec4 --- /dev/null +++ b/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/node.js"],"sourcesContent":["import osName from \"os-name\";\nexport function getUserAgent() {\n try {\n return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`;\n }\n catch (error) {\n if (/wmic os get Caption/.test(error.message)) {\n return \"Windows \";\n }\n throw error;\n }\n}\n"],"names":["getUserAgent","process","version","substr","osName","arch","error","test","message"],"mappings":";;;;;;;;AACO,SAASA,YAAT,GAAwB;MACvB;WACQ,WAAUC,OAAO,CAACC,OAAR,CAAgBC,MAAhB,CAAuB,CAAvB,CAA0B,KAAIC,MAAM,EAAG,KAAIH,OAAO,CAACI,IAAK,GAA1E;GADJ,CAGA,OAAOC,KAAP,EAAc;QACN,sBAAsBC,IAAtB,CAA2BD,KAAK,CAACE,OAAjC,CAAJ,EAA+C;aACpC,gCAAP;;;UAEEF,KAAN;;;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-src/browser.js b/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-src/browser.js new file mode 100644 index 00000000..6f52232c --- /dev/null +++ b/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-src/browser.js @@ -0,0 +1,3 @@ +export function getUserAgent() { + return navigator.userAgent; +} diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-src/index.js b/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-src/index.js new file mode 100644 index 00000000..c6253f5a --- /dev/null +++ b/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-src/index.js @@ -0,0 +1 @@ +export { getUserAgent } from "./node"; diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-src/node.js b/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-src/node.js new file mode 100644 index 00000000..8b70a038 --- /dev/null +++ b/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-src/node.js @@ -0,0 +1,12 @@ +import osName from "os-name"; +export function getUserAgent() { + try { + return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`; + } + catch (error) { + if (/wmic os get Caption/.test(error.message)) { + return "Windows "; + } + throw error; + } +} diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-types/browser.d.ts b/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-types/browser.d.ts new file mode 100644 index 00000000..a7bb1c44 --- /dev/null +++ b/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-types/browser.d.ts @@ -0,0 +1 @@ +export declare function getUserAgent(): string; diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-types/index.d.ts b/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-types/index.d.ts new file mode 100644 index 00000000..c6253f5a --- /dev/null +++ b/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-types/index.d.ts @@ -0,0 +1 @@ +export { getUserAgent } from "./node"; diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-types/node.d.ts b/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-types/node.d.ts new file mode 100644 index 00000000..a7bb1c44 --- /dev/null +++ b/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-types/node.d.ts @@ -0,0 +1 @@ +export declare function getUserAgent(): string; diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-web/index.js b/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-web/index.js new file mode 100644 index 00000000..11ec79b3 --- /dev/null +++ b/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-web/index.js @@ -0,0 +1,6 @@ +function getUserAgent() { + return navigator.userAgent; +} + +export { getUserAgent }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-web/index.js.map b/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-web/index.js.map new file mode 100644 index 00000000..549407ec --- /dev/null +++ b/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/browser.js"],"sourcesContent":["export function getUserAgent() {\n return navigator.userAgent;\n}\n"],"names":[],"mappings":"AAAO,SAAS,YAAY,GAAG;IAC3B,OAAO,SAAS,CAAC,SAAS,CAAC;CAC9B;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/package.json b/node_modules/@octokit/rest/node_modules/universal-user-agent/package.json new file mode 100644 index 00000000..211b8c26 --- /dev/null +++ b/node_modules/@octokit/rest/node_modules/universal-user-agent/package.json @@ -0,0 +1,68 @@ +{ + "_args": [ + [ + "universal-user-agent@4.0.0", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "universal-user-agent@4.0.0", + "_id": "universal-user-agent@4.0.0", + "_inBundle": false, + "_integrity": "sha512-eM8knLpev67iBDizr/YtqkJsF3GK8gzDc6st/WKzrTuPtcsOKW/0IdL4cnMBsU69pOx0otavLWBDGTwg+dB0aA==", + "_location": "/@octokit/rest/universal-user-agent", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "universal-user-agent@4.0.0", + "name": "universal-user-agent", + "escapedName": "universal-user-agent", + "rawSpec": "4.0.0", + "saveSpec": null, + "fetchSpec": "4.0.0" + }, + "_requiredBy": [ + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-4.0.0.tgz", + "_spec": "4.0.0", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "bugs": { + "url": "https://github.com/gr2m/universal-user-agent/issues" + }, + "dependencies": { + "os-name": "^3.1.0" + }, + "description": "Get a user agent string in both browser and node", + "devDependencies": { + "@gr2m/pika-plugin-build-web": "^0.6.0-issue-84.1", + "@pika/pack": "^0.5.0", + "@pika/plugin-build-node": "^0.6.0", + "@pika/plugin-ts-standard-pkg": "^0.6.0", + "@types/jest": "^24.0.18", + "jest": "^24.9.0", + "prettier": "^1.18.2", + "semantic-release": "^15.9.15", + "ts-jest": "^24.0.2", + "typescript": "^3.6.2" + }, + "files": [ + "dist-*/", + "bin/" + ], + "homepage": "https://github.com/gr2m/universal-user-agent#readme", + "keywords": [], + "license": "ISC", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "name": "universal-user-agent", + "pika": true, + "repository": { + "type": "git", + "url": "git+https://github.com/gr2m/universal-user-agent.git" + }, + "sideEffects": false, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "version": "4.0.0" +} diff --git a/node_modules/@octokit/rest/package.json b/node_modules/@octokit/rest/package.json new file mode 100644 index 00000000..01a8402a --- /dev/null +++ b/node_modules/@octokit/rest/package.json @@ -0,0 +1,176 @@ +{ + "_args": [ + [ + "@octokit/rest@16.35.0", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "@octokit/rest@16.35.0", + "_id": "@octokit/rest@16.35.0", + "_inBundle": false, + "_integrity": "sha512-9ShFqYWo0CLoGYhA1FdtdykJuMzS/9H6vSbbQWDX4pWr4p9v+15MsH/wpd/3fIU+tSxylaNO48+PIHqOkBRx3w==", + "_location": "/@octokit/rest", + "_phantomChildren": { + "os-name": "3.1.0" + }, + "_requested": { + "type": "version", + "registry": true, + "raw": "@octokit/rest@16.35.0", + "name": "@octokit/rest", + "escapedName": "@octokit%2frest", + "scope": "@octokit", + "rawSpec": "16.35.0", + "saveSpec": null, + "fetchSpec": "16.35.0" + }, + "_requiredBy": [ + "/@actions/github" + ], + "_resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-16.35.0.tgz", + "_spec": "16.35.0", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "Gregor Martynus", + "url": "https://github.com/gr2m" + }, + "bugs": { + "url": "https://github.com/octokit/rest.js/issues" + }, + "bundlesize": [ + { + "path": "./dist/octokit-rest.min.js.gz", + "maxSize": "33 kB" + } + ], + "contributors": [ + { + "name": "Mike de Boer", + "email": "info@mikedeboer.nl" + }, + { + "name": "Fabian Jakobs", + "email": "fabian@c9.io" + }, + { + "name": "Joe Gallo", + "email": "joe@brassafrax.com" + }, + { + "name": "Gregor Martynus", + "url": "https://github.com/gr2m" + } + ], + "dependencies": { + "@octokit/request": "^5.2.0", + "@octokit/request-error": "^1.0.2", + "atob-lite": "^2.0.0", + "before-after-hook": "^2.0.0", + "btoa-lite": "^1.0.0", + "deprecation": "^2.0.0", + "lodash.get": "^4.4.2", + "lodash.set": "^4.3.2", + "lodash.uniq": "^4.5.0", + "octokit-pagination-methods": "^1.1.0", + "once": "^1.4.0", + "universal-user-agent": "^4.0.0" + }, + "description": "GitHub REST API client for Node.js", + "devDependencies": { + "@gimenete/type-writer": "^0.1.3", + "@octokit/fixtures-server": "^5.0.6", + "@octokit/graphql": "^4.2.0", + "@types/node": "^12.0.0", + "bundlesize": "^0.18.0", + "chai": "^4.1.2", + "compression-webpack-plugin": "^3.0.0", + "cypress": "^3.0.0", + "glob": "^7.1.2", + "http-proxy-agent": "^2.1.0", + "lodash.camelcase": "^4.3.0", + "lodash.merge": "^4.6.1", + "lodash.upperfirst": "^4.3.1", + "mkdirp": "^0.5.1", + "mocha": "^6.0.0", + "mustache": "^3.0.0", + "nock": "^11.3.3", + "npm-run-all": "^4.1.2", + "nyc": "^14.0.0", + "prettier": "^1.14.2", + "proxy": "^1.0.0", + "semantic-release": "^15.0.0", + "sinon": "^7.2.4", + "sinon-chai": "^3.0.0", + "sort-keys": "^4.0.0", + "string-to-arraybuffer": "^1.0.0", + "string-to-jsdoc-comment": "^1.0.0", + "typescript": "^3.3.1", + "webpack": "^4.0.0", + "webpack-bundle-analyzer": "^3.0.0", + "webpack-cli": "^3.0.0" + }, + "files": [ + "index.js", + "index.d.ts", + "lib", + "plugins" + ], + "homepage": "https://github.com/octokit/rest.js#readme", + "keywords": [ + "octokit", + "github", + "rest", + "api-client" + ], + "license": "MIT", + "name": "@octokit/rest", + "nyc": { + "ignore": [ + "test" + ] + }, + "publishConfig": { + "access": "public" + }, + "release": { + "publish": [ + "@semantic-release/npm", + { + "path": "@semantic-release/github", + "assets": [ + "dist/*", + "!dist/*.map.gz" + ] + } + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/octokit/rest.js.git" + }, + "scripts": { + "build": "npm-run-all build:*", + "build:browser": "npm-run-all build:browser:*", + "build:browser:development": "webpack --mode development --entry . --output-library=Octokit --output=./dist/octokit-rest.js --profile --json > dist/bundle-stats.json", + "build:browser:production": "webpack --mode production --entry . --plugin=compression-webpack-plugin --output-library=Octokit --output-path=./dist --output-filename=octokit-rest.min.js --devtool source-map", + "build:ts": "npm run -s update-endpoints:typescript", + "coverage": "nyc report --reporter=html && open coverage/index.html", + "generate-bundle-report": "webpack-bundle-analyzer dist/bundle-stats.json --mode=static --no-open --report dist/bundle-report.html", + "lint": "prettier --check '{lib,plugins,scripts,test}/**/*.{js,json,ts}' 'docs/*.{js,json}' 'docs/src/**/*' index.js README.md package.json", + "lint:fix": "prettier --write '{lib,plugins,scripts,test}/**/*.{js,json,ts}' 'docs/*.{js,json}' 'docs/src/**/*' index.js README.md package.json", + "postvalidate:ts": "tsc --noEmit --target es6 test/typescript-validate.ts", + "prebuild:browser": "mkdirp dist/", + "pretest": "npm run -s lint", + "prevalidate:ts": "npm run -s build:ts", + "start-fixtures-server": "octokit-fixtures-server", + "test": "nyc mocha test/mocha-node-setup.js \"test/*/**/*-test.js\"", + "test:browser": "cypress run --browser chrome", + "update-endpoints": "npm-run-all update-endpoints:*", + "update-endpoints:code": "node scripts/update-endpoints/code", + "update-endpoints:fetch-json": "node scripts/update-endpoints/fetch-json", + "update-endpoints:typescript": "node scripts/update-endpoints/typescript", + "validate:ts": "tsc --target es6 --noImplicitAny index.d.ts" + }, + "types": "index.d.ts", + "version": "16.35.0" +} diff --git a/node_modules/@octokit/rest/plugins/authentication-deprecated/authenticate.js b/node_modules/@octokit/rest/plugins/authentication-deprecated/authenticate.js new file mode 100644 index 00000000..86ce9e95 --- /dev/null +++ b/node_modules/@octokit/rest/plugins/authentication-deprecated/authenticate.js @@ -0,0 +1,52 @@ +module.exports = authenticate; + +const { Deprecation } = require("deprecation"); +const once = require("once"); + +const deprecateAuthenticate = once((log, deprecation) => log.warn(deprecation)); + +function authenticate(state, options) { + deprecateAuthenticate( + state.octokit.log, + new Deprecation( + '[@octokit/rest] octokit.authenticate() is deprecated. Use "auth" constructor option instead.' + ) + ); + + if (!options) { + state.auth = false; + return; + } + + switch (options.type) { + case "basic": + if (!options.username || !options.password) { + throw new Error( + "Basic authentication requires both a username and password to be set" + ); + } + break; + + case "oauth": + if (!options.token && !(options.key && options.secret)) { + throw new Error( + "OAuth2 authentication requires a token or key & secret to be set" + ); + } + break; + + case "token": + case "app": + if (!options.token) { + throw new Error("Token authentication requires a token to be set"); + } + break; + + default: + throw new Error( + "Invalid authentication type, must be 'basic', 'oauth', 'token' or 'app'" + ); + } + + state.auth = options; +} diff --git a/node_modules/@octokit/rest/plugins/authentication-deprecated/before-request.js b/node_modules/@octokit/rest/plugins/authentication-deprecated/before-request.js new file mode 100644 index 00000000..dbb83abd --- /dev/null +++ b/node_modules/@octokit/rest/plugins/authentication-deprecated/before-request.js @@ -0,0 +1,43 @@ +module.exports = authenticationBeforeRequest; + +const btoa = require("btoa-lite"); +const uniq = require("lodash.uniq"); + +function authenticationBeforeRequest(state, options) { + if (!state.auth.type) { + return; + } + + if (state.auth.type === "basic") { + const hash = btoa(`${state.auth.username}:${state.auth.password}`); + options.headers.authorization = `Basic ${hash}`; + return; + } + + if (state.auth.type === "token") { + options.headers.authorization = `token ${state.auth.token}`; + return; + } + + if (state.auth.type === "app") { + options.headers.authorization = `Bearer ${state.auth.token}`; + const acceptHeaders = options.headers.accept + .split(",") + .concat("application/vnd.github.machine-man-preview+json"); + options.headers.accept = uniq(acceptHeaders) + .filter(Boolean) + .join(","); + return; + } + + options.url += options.url.indexOf("?") === -1 ? "?" : "&"; + + if (state.auth.token) { + options.url += `access_token=${encodeURIComponent(state.auth.token)}`; + return; + } + + const key = encodeURIComponent(state.auth.key); + const secret = encodeURIComponent(state.auth.secret); + options.url += `client_id=${key}&client_secret=${secret}`; +} diff --git a/node_modules/@octokit/rest/plugins/authentication-deprecated/index.js b/node_modules/@octokit/rest/plugins/authentication-deprecated/index.js new file mode 100644 index 00000000..7e0cc4f9 --- /dev/null +++ b/node_modules/@octokit/rest/plugins/authentication-deprecated/index.js @@ -0,0 +1,31 @@ +module.exports = authenticationPlugin; + +const { Deprecation } = require("deprecation"); +const once = require("once"); + +const deprecateAuthenticate = once((log, deprecation) => log.warn(deprecation)); + +const authenticate = require("./authenticate"); +const beforeRequest = require("./before-request"); +const requestError = require("./request-error"); + +function authenticationPlugin(octokit, options) { + if (options.auth) { + octokit.authenticate = () => { + deprecateAuthenticate( + octokit.log, + new Deprecation( + '[@octokit/rest] octokit.authenticate() is deprecated and has no effect when "auth" option is set on Octokit constructor' + ) + ); + }; + return; + } + const state = { + octokit, + auth: false + }; + octokit.authenticate = authenticate.bind(null, state); + octokit.hook.before("request", beforeRequest.bind(null, state)); + octokit.hook.error("request", requestError.bind(null, state)); +} diff --git a/node_modules/@octokit/rest/plugins/authentication-deprecated/request-error.js b/node_modules/@octokit/rest/plugins/authentication-deprecated/request-error.js new file mode 100644 index 00000000..d2e7baae --- /dev/null +++ b/node_modules/@octokit/rest/plugins/authentication-deprecated/request-error.js @@ -0,0 +1,55 @@ +module.exports = authenticationRequestError; + +const { RequestError } = require("@octokit/request-error"); + +function authenticationRequestError(state, error, options) { + /* istanbul ignore next */ + if (!error.headers) throw error; + + const otpRequired = /required/.test(error.headers["x-github-otp"] || ""); + // handle "2FA required" error only + if (error.status !== 401 || !otpRequired) { + throw error; + } + + if ( + error.status === 401 && + otpRequired && + error.request && + error.request.headers["x-github-otp"] + ) { + throw new RequestError( + "Invalid one-time password for two-factor authentication", + 401, + { + headers: error.headers, + request: options + } + ); + } + + if (typeof state.auth.on2fa !== "function") { + throw new RequestError( + "2FA required, but options.on2fa is not a function. See https://github.com/octokit/rest.js#authentication", + 401, + { + headers: error.headers, + request: options + } + ); + } + + return Promise.resolve() + .then(() => { + return state.auth.on2fa(); + }) + .then(oneTimePassword => { + const newOptions = Object.assign(options, { + headers: Object.assign( + { "x-github-otp": oneTimePassword }, + options.headers + ) + }); + return state.octokit.request(newOptions); + }); +} diff --git a/node_modules/@octokit/rest/plugins/authentication/before-request.js b/node_modules/@octokit/rest/plugins/authentication/before-request.js new file mode 100644 index 00000000..c18df95c --- /dev/null +++ b/node_modules/@octokit/rest/plugins/authentication/before-request.js @@ -0,0 +1,65 @@ +module.exports = authenticationBeforeRequest; + +const btoa = require("btoa-lite"); + +const withAuthorizationPrefix = require("./with-authorization-prefix"); + +function authenticationBeforeRequest(state, options) { + if (typeof state.auth === "string") { + options.headers.authorization = withAuthorizationPrefix(state.auth); + + // https://developer.github.com/v3/previews/#integrations + if ( + /^bearer /i.test(state.auth) && + !/machine-man/.test(options.headers.accept) + ) { + const acceptHeaders = options.headers.accept + .split(",") + .concat("application/vnd.github.machine-man-preview+json"); + options.headers.accept = acceptHeaders.filter(Boolean).join(","); + } + + return; + } + + if (state.auth.username) { + const hash = btoa(`${state.auth.username}:${state.auth.password}`); + options.headers.authorization = `Basic ${hash}`; + if (state.otp) { + options.headers["x-github-otp"] = state.otp; + } + return; + } + + if (state.auth.clientId) { + // There is a special case for OAuth applications, when `clientId` and `clientSecret` is passed as + // Basic Authorization instead of query parameters. The only routes where that applies share the same + // URL though: `/applications/:client_id/tokens/:access_token`. + // + // 1. [Check an authorization](https://developer.github.com/v3/oauth_authorizations/#check-an-authorization) + // 2. [Reset an authorization](https://developer.github.com/v3/oauth_authorizations/#reset-an-authorization) + // 3. [Revoke an authorization for an application](https://developer.github.com/v3/oauth_authorizations/#revoke-an-authorization-for-an-application) + // + // We identify by checking the URL. It must merge both "/applications/:client_id/tokens/:access_token" + // as well as "/applications/123/tokens/token456" + if (/\/applications\/:?[\w_]+\/tokens\/:?[\w_]+($|\?)/.test(options.url)) { + const hash = btoa(`${state.auth.clientId}:${state.auth.clientSecret}`); + options.headers.authorization = `Basic ${hash}`; + return; + } + + options.url += options.url.indexOf("?") === -1 ? "?" : "&"; + options.url += `client_id=${state.auth.clientId}&client_secret=${state.auth.clientSecret}`; + return; + } + + return Promise.resolve() + + .then(() => { + return state.auth(); + }) + + .then(authorization => { + options.headers.authorization = withAuthorizationPrefix(authorization); + }); +} diff --git a/node_modules/@octokit/rest/plugins/authentication/index.js b/node_modules/@octokit/rest/plugins/authentication/index.js new file mode 100644 index 00000000..6a51d42b --- /dev/null +++ b/node_modules/@octokit/rest/plugins/authentication/index.js @@ -0,0 +1,21 @@ +module.exports = authenticationPlugin; + +const beforeRequest = require("./before-request"); +const requestError = require("./request-error"); +const validate = require("./validate"); + +function authenticationPlugin(octokit, options) { + if (!options.auth) { + return; + } + + validate(options.auth); + + const state = { + octokit, + auth: options.auth + }; + + octokit.hook.before("request", beforeRequest.bind(null, state)); + octokit.hook.error("request", requestError.bind(null, state)); +} diff --git a/node_modules/@octokit/rest/plugins/authentication/request-error.js b/node_modules/@octokit/rest/plugins/authentication/request-error.js new file mode 100644 index 00000000..9c67d550 --- /dev/null +++ b/node_modules/@octokit/rest/plugins/authentication/request-error.js @@ -0,0 +1,61 @@ +module.exports = authenticationRequestError; + +const { RequestError } = require("@octokit/request-error"); + +function authenticationRequestError(state, error, options) { + if (!error.headers) throw error; + + const otpRequired = /required/.test(error.headers["x-github-otp"] || ""); + // handle "2FA required" error only + if (error.status !== 401 || !otpRequired) { + throw error; + } + + if ( + error.status === 401 && + otpRequired && + error.request && + error.request.headers["x-github-otp"] + ) { + if (state.otp) { + delete state.otp; // no longer valid, request again + } else { + throw new RequestError( + "Invalid one-time password for two-factor authentication", + 401, + { + headers: error.headers, + request: options + } + ); + } + } + + if (typeof state.auth.on2fa !== "function") { + throw new RequestError( + "2FA required, but options.on2fa is not a function. See https://github.com/octokit/rest.js#authentication", + 401, + { + headers: error.headers, + request: options + } + ); + } + + return Promise.resolve() + .then(() => { + return state.auth.on2fa(); + }) + .then(oneTimePassword => { + const newOptions = Object.assign(options, { + headers: Object.assign(options.headers, { + "x-github-otp": oneTimePassword + }) + }); + return state.octokit.request(newOptions).then(response => { + // If OTP still valid, then persist it for following requests + state.otp = oneTimePassword; + return response; + }); + }); +} diff --git a/node_modules/@octokit/rest/plugins/authentication/validate.js b/node_modules/@octokit/rest/plugins/authentication/validate.js new file mode 100644 index 00000000..abf83779 --- /dev/null +++ b/node_modules/@octokit/rest/plugins/authentication/validate.js @@ -0,0 +1,21 @@ +module.exports = validateAuth; + +function validateAuth(auth) { + if (typeof auth === "string") { + return; + } + + if (typeof auth === "function") { + return; + } + + if (auth.username && auth.password) { + return; + } + + if (auth.clientId && auth.clientSecret) { + return; + } + + throw new Error(`Invalid "auth" option: ${JSON.stringify(auth)}`); +} diff --git a/node_modules/@octokit/rest/plugins/authentication/with-authorization-prefix.js b/node_modules/@octokit/rest/plugins/authentication/with-authorization-prefix.js new file mode 100644 index 00000000..122cab73 --- /dev/null +++ b/node_modules/@octokit/rest/plugins/authentication/with-authorization-prefix.js @@ -0,0 +1,23 @@ +module.exports = withAuthorizationPrefix; + +const atob = require("atob-lite"); + +const REGEX_IS_BASIC_AUTH = /^[\w-]+:/; + +function withAuthorizationPrefix(authorization) { + if (/^(basic|bearer|token) /i.test(authorization)) { + return authorization; + } + + try { + if (REGEX_IS_BASIC_AUTH.test(atob(authorization))) { + return `basic ${authorization}`; + } + } catch (error) {} + + if (authorization.split(/\./).length === 3) { + return `bearer ${authorization}`; + } + + return `token ${authorization}`; +} diff --git a/node_modules/@octokit/rest/plugins/log/index.js b/node_modules/@octokit/rest/plugins/log/index.js new file mode 100644 index 00000000..fed446a4 --- /dev/null +++ b/node_modules/@octokit/rest/plugins/log/index.js @@ -0,0 +1,28 @@ +module.exports = octokitDebug; + +function octokitDebug(octokit) { + octokit.hook.wrap("request", (request, options) => { + octokit.log.debug("request", options); + const start = Date.now(); + const requestOptions = octokit.request.endpoint.parse(options); + const path = requestOptions.url.replace(options.baseUrl, ""); + + return request(options) + .then(response => { + octokit.log.info( + `${requestOptions.method} ${path} - ${ + response.status + } in ${Date.now() - start}ms` + ); + return response; + }) + + .catch(error => { + octokit.log.info( + `${requestOptions.method} ${path} - ${error.status} in ${Date.now() - + start}ms` + ); + throw error; + }); + }); +} diff --git a/node_modules/@octokit/rest/plugins/pagination/index.js b/node_modules/@octokit/rest/plugins/pagination/index.js new file mode 100644 index 00000000..e7673bc7 --- /dev/null +++ b/node_modules/@octokit/rest/plugins/pagination/index.js @@ -0,0 +1,9 @@ +module.exports = paginatePlugin; + +const iterator = require("./iterator"); +const paginate = require("./paginate"); + +function paginatePlugin(octokit) { + octokit.paginate = paginate.bind(null, octokit); + octokit.paginate.iterator = iterator.bind(null, octokit); +} diff --git a/node_modules/@octokit/rest/plugins/pagination/iterator.js b/node_modules/@octokit/rest/plugins/pagination/iterator.js new file mode 100644 index 00000000..00ea8ebb --- /dev/null +++ b/node_modules/@octokit/rest/plugins/pagination/iterator.js @@ -0,0 +1,34 @@ +module.exports = iterator; + +const normalizePaginatedListResponse = require("./normalize-paginated-list-response"); + +function iterator(octokit, options) { + const headers = options.headers; + let url = octokit.request.endpoint(options).url; + + return { + [Symbol.asyncIterator]: () => ({ + next() { + if (!url) { + return Promise.resolve({ done: true }); + } + + return octokit + .request({ url, headers }) + + .then(response => { + normalizePaginatedListResponse(octokit, url, response); + + // `response.headers.link` format: + // '; rel="next", ; rel="last"' + // sets `url` to undefined if "next" URL is not present or `link` header is not set + url = ((response.headers.link || "").match( + /<([^>]+)>;\s*rel="next"/ + ) || [])[1]; + + return { value: response }; + }); + } + }) + }; +} diff --git a/node_modules/@octokit/rest/plugins/pagination/normalize-paginated-list-response.js b/node_modules/@octokit/rest/plugins/pagination/normalize-paginated-list-response.js new file mode 100644 index 00000000..e664142a --- /dev/null +++ b/node_modules/@octokit/rest/plugins/pagination/normalize-paginated-list-response.js @@ -0,0 +1,116 @@ +/** + * Some “list” response that can be paginated have a different response structure + * + * They have a `total_count` key in the response (search also has `incomplete_results`, + * /installation/repositories also has `repository_selection`), as well as a key with + * the list of the items which name varies from endpoint to endpoint: + * + * - https://developer.github.com/v3/search/#example (key `items`) + * - https://developer.github.com/v3/checks/runs/#response-3 (key: `check_runs`) + * - https://developer.github.com/v3/checks/suites/#response-1 (key: `check_suites`) + * - https://developer.github.com/v3/apps/installations/#list-repositories (key: `repositories`) + * - https://developer.github.com/v3/apps/installations/#list-installations-for-a-user (key `installations`) + * - https://developer.github.com/v3/orgs/#list-installations-for-an-organization (key `installations`) + * + * Octokit normalizes these responses so that paginated results are always returned following + * the same structure. One challenge is that if the list response has only one page, no Link + * header is provided, so this header alone is not sufficient to check wether a response is + * paginated or not. For the exceptions with the namespace, a fallback check for the route + * paths has to be added in order to normalize the response. We cannot check for the total_count + * property because it also exists in the response of Get the combined status for a specific ref. + */ + +module.exports = normalizePaginatedListResponse; + +const { Deprecation } = require("deprecation"); +const once = require("once"); + +const deprecateIncompleteResults = once((log, deprecation) => + log.warn(deprecation) +); +const deprecateTotalCount = once((log, deprecation) => log.warn(deprecation)); +const deprecateNamespace = once((log, deprecation) => log.warn(deprecation)); + +const REGEX_IS_SEARCH_PATH = /^\/search\//; +const REGEX_IS_CHECKS_PATH = /^\/repos\/[^/]+\/[^/]+\/commits\/[^/]+\/(check-runs|check-suites)/; +const REGEX_IS_INSTALLATION_REPOSITORIES_PATH = /^\/installation\/repositories/; +const REGEX_IS_USER_INSTALLATIONS_PATH = /^\/user\/installations/; +const REGEX_IS_ORG_INSTALLATIONS_PATH = /^\/orgs\/[^/]+\/installations/; + +function normalizePaginatedListResponse(octokit, url, response) { + const path = url.replace(octokit.request.endpoint.DEFAULTS.baseUrl, ""); + if ( + !REGEX_IS_SEARCH_PATH.test(path) && + !REGEX_IS_CHECKS_PATH.test(path) && + !REGEX_IS_INSTALLATION_REPOSITORIES_PATH.test(path) && + !REGEX_IS_USER_INSTALLATIONS_PATH.test(path) && + !REGEX_IS_ORG_INSTALLATIONS_PATH.test(path) + ) { + return; + } + + // keep the additional properties intact to avoid a breaking change, + // but log a deprecation warning when accessed + const incompleteResults = response.data.incomplete_results; + const repositorySelection = response.data.repository_selection; + const totalCount = response.data.total_count; + delete response.data.incomplete_results; + delete response.data.repository_selection; + delete response.data.total_count; + + const namespaceKey = Object.keys(response.data)[0]; + + response.data = response.data[namespaceKey]; + + Object.defineProperty(response.data, namespaceKey, { + get() { + deprecateNamespace( + octokit.log, + new Deprecation( + `[@octokit/rest] "result.data.${namespaceKey}" is deprecated. Use "result.data" instead` + ) + ); + return response.data; + } + }); + + if (typeof incompleteResults !== "undefined") { + Object.defineProperty(response.data, "incomplete_results", { + get() { + deprecateIncompleteResults( + octokit.log, + new Deprecation( + '[@octokit/rest] "result.data.incomplete_results" is deprecated.' + ) + ); + return incompleteResults; + } + }); + } + + if (typeof repositorySelection !== "undefined") { + Object.defineProperty(response.data, "repository_selection", { + get() { + deprecateTotalCount( + octokit.log, + new Deprecation( + '[@octokit/rest] "result.data.repository_selection" is deprecated.' + ) + ); + return repositorySelection; + } + }); + } + + Object.defineProperty(response.data, "total_count", { + get() { + deprecateTotalCount( + octokit.log, + new Deprecation( + '[@octokit/rest] "result.data.total_count" is deprecated.' + ) + ); + return totalCount; + } + }); +} diff --git a/node_modules/@octokit/rest/plugins/pagination/paginate.js b/node_modules/@octokit/rest/plugins/pagination/paginate.js new file mode 100644 index 00000000..db4752b4 --- /dev/null +++ b/node_modules/@octokit/rest/plugins/pagination/paginate.js @@ -0,0 +1,40 @@ +module.exports = paginate; + +const iterator = require("./iterator"); + +function paginate(octokit, route, options, mapFn) { + if (typeof options === "function") { + mapFn = options; + options = undefined; + } + options = octokit.request.endpoint.merge(route, options); + return gather( + octokit, + [], + iterator(octokit, options)[Symbol.asyncIterator](), + mapFn + ); +} + +function gather(octokit, results, iterator, mapFn) { + return iterator.next().then(result => { + if (result.done) { + return results; + } + + let earlyExit = false; + function done() { + earlyExit = true; + } + + results = results.concat( + mapFn ? mapFn(result.value, done) : result.value.data + ); + + if (earlyExit) { + return results; + } + + return gather(octokit, results, iterator, mapFn); + }); +} diff --git a/node_modules/@octokit/rest/plugins/register-endpoints/index.js b/node_modules/@octokit/rest/plugins/register-endpoints/index.js new file mode 100644 index 00000000..8b92538a --- /dev/null +++ b/node_modules/@octokit/rest/plugins/register-endpoints/index.js @@ -0,0 +1,7 @@ +module.exports = octokitRegisterEndpoints; + +const registerEndpoints = require("./register-endpoints"); + +function octokitRegisterEndpoints(octokit) { + octokit.registerEndpoints = registerEndpoints.bind(null, octokit); +} diff --git a/node_modules/@octokit/rest/plugins/register-endpoints/register-endpoints.js b/node_modules/@octokit/rest/plugins/register-endpoints/register-endpoints.js new file mode 100644 index 00000000..0ffd7844 --- /dev/null +++ b/node_modules/@octokit/rest/plugins/register-endpoints/register-endpoints.js @@ -0,0 +1,98 @@ +module.exports = registerEndpoints; + +const { Deprecation } = require("deprecation"); + +function registerEndpoints(octokit, routes) { + Object.keys(routes).forEach(namespaceName => { + if (!octokit[namespaceName]) { + octokit[namespaceName] = {}; + } + + Object.keys(routes[namespaceName]).forEach(apiName => { + const apiOptions = routes[namespaceName][apiName]; + + const endpointDefaults = ["method", "url", "headers"].reduce( + (map, key) => { + if (typeof apiOptions[key] !== "undefined") { + map[key] = apiOptions[key]; + } + + return map; + }, + {} + ); + + endpointDefaults.request = { + validate: apiOptions.params + }; + + let request = octokit.request.defaults(endpointDefaults); + + // patch request & endpoint methods to support deprecated parameters. + // Not the most elegant solution, but we don’t want to move deprecation + // logic into octokit/endpoint.js as it’s out of scope + const hasDeprecatedParam = Object.keys(apiOptions.params || {}).find( + key => apiOptions.params[key].deprecated + ); + if (hasDeprecatedParam) { + const patch = patchForDeprecation.bind(null, octokit, apiOptions); + request = patch( + octokit.request.defaults(endpointDefaults), + `.${namespaceName}.${apiName}()` + ); + request.endpoint = patch( + request.endpoint, + `.${namespaceName}.${apiName}.endpoint()` + ); + request.endpoint.merge = patch( + request.endpoint.merge, + `.${namespaceName}.${apiName}.endpoint.merge()` + ); + } + + if (apiOptions.deprecated) { + octokit[namespaceName][apiName] = function deprecatedEndpointMethod() { + octokit.log.warn( + new Deprecation(`[@octokit/rest] ${apiOptions.deprecated}`) + ); + octokit[namespaceName][apiName] = request; + return request.apply(null, arguments); + }; + + return; + } + + octokit[namespaceName][apiName] = request; + }); + }); +} + +function patchForDeprecation(octokit, apiOptions, method, methodName) { + const patchedMethod = options => { + options = Object.assign({}, options); + + Object.keys(options).forEach(key => { + if (apiOptions.params[key] && apiOptions.params[key].deprecated) { + const aliasKey = apiOptions.params[key].alias; + + octokit.log.warn( + new Deprecation( + `[@octokit/rest] "${key}" parameter is deprecated for "${methodName}". Use "${aliasKey}" instead` + ) + ); + + if (!(aliasKey in options)) { + options[aliasKey] = options[key]; + } + delete options[key]; + } + }); + + return method(options); + }; + Object.keys(method).forEach(key => { + patchedMethod[key] = method[key]; + }); + + return patchedMethod; +} diff --git a/node_modules/@octokit/rest/plugins/rest-api-endpoints/index.js b/node_modules/@octokit/rest/plugins/rest-api-endpoints/index.js new file mode 100644 index 00000000..4835ceec --- /dev/null +++ b/node_modules/@octokit/rest/plugins/rest-api-endpoints/index.js @@ -0,0 +1,13 @@ +module.exports = octokitRestApiEndpoints; + +const ROUTES = require("./routes.json"); + +function octokitRestApiEndpoints(octokit) { + // Aliasing scopes for backward compatibility + // See https://github.com/octokit/rest.js/pull/1134 + ROUTES.gitdata = ROUTES.git; + ROUTES.authorization = ROUTES.oauthAuthorizations; + ROUTES.pullRequests = ROUTES.pulls; + + octokit.registerEndpoints(ROUTES); +} diff --git a/node_modules/@octokit/rest/plugins/rest-api-endpoints/routes.json b/node_modules/@octokit/rest/plugins/rest-api-endpoints/routes.json new file mode 100644 index 00000000..31e3fca3 --- /dev/null +++ b/node_modules/@octokit/rest/plugins/rest-api-endpoints/routes.json @@ -0,0 +1,5927 @@ +{ + "activity": { + "checkStarringRepo": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/user/starred/:owner/:repo" + }, + "deleteRepoSubscription": { + "method": "DELETE", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/subscription" + }, + "deleteThreadSubscription": { + "method": "DELETE", + "params": { "thread_id": { "required": true, "type": "integer" } }, + "url": "/notifications/threads/:thread_id/subscription" + }, + "getRepoSubscription": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/subscription" + }, + "getThread": { + "method": "GET", + "params": { "thread_id": { "required": true, "type": "integer" } }, + "url": "/notifications/threads/:thread_id" + }, + "getThreadSubscription": { + "method": "GET", + "params": { "thread_id": { "required": true, "type": "integer" } }, + "url": "/notifications/threads/:thread_id/subscription" + }, + "listEventsForOrg": { + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/events/orgs/:org" + }, + "listEventsForUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/events" + }, + "listFeeds": { "method": "GET", "params": {}, "url": "/feeds" }, + "listNotifications": { + "method": "GET", + "params": { + "all": { "type": "boolean" }, + "before": { "type": "string" }, + "page": { "type": "integer" }, + "participating": { "type": "boolean" }, + "per_page": { "type": "integer" }, + "since": { "type": "string" } + }, + "url": "/notifications" + }, + "listNotificationsForRepo": { + "method": "GET", + "params": { + "all": { "type": "boolean" }, + "before": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "participating": { "type": "boolean" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "since": { "type": "string" } + }, + "url": "/repos/:owner/:repo/notifications" + }, + "listPublicEvents": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/events" + }, + "listPublicEventsForOrg": { + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/orgs/:org/events" + }, + "listPublicEventsForRepoNetwork": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/networks/:owner/:repo/events" + }, + "listPublicEventsForUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/events/public" + }, + "listReceivedEventsForUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/received_events" + }, + "listReceivedPublicEventsForUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/received_events/public" + }, + "listRepoEvents": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/events" + }, + "listReposStarredByAuthenticatedUser": { + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "sort": { "enum": ["created", "updated"], "type": "string" } + }, + "url": "/user/starred" + }, + "listReposStarredByUser": { + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "sort": { "enum": ["created", "updated"], "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/starred" + }, + "listReposWatchedByUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/subscriptions" + }, + "listStargazersForRepo": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/stargazers" + }, + "listWatchedReposForAuthenticatedUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/user/subscriptions" + }, + "listWatchersForRepo": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/subscribers" + }, + "markAsRead": { + "method": "PUT", + "params": { "last_read_at": { "type": "string" } }, + "url": "/notifications" + }, + "markNotificationsAsReadForRepo": { + "method": "PUT", + "params": { + "last_read_at": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/notifications" + }, + "markThreadAsRead": { + "method": "PATCH", + "params": { "thread_id": { "required": true, "type": "integer" } }, + "url": "/notifications/threads/:thread_id" + }, + "setRepoSubscription": { + "method": "PUT", + "params": { + "ignored": { "type": "boolean" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "subscribed": { "type": "boolean" } + }, + "url": "/repos/:owner/:repo/subscription" + }, + "setThreadSubscription": { + "method": "PUT", + "params": { + "ignored": { "type": "boolean" }, + "thread_id": { "required": true, "type": "integer" } + }, + "url": "/notifications/threads/:thread_id/subscription" + }, + "starRepo": { + "method": "PUT", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/user/starred/:owner/:repo" + }, + "unstarRepo": { + "method": "DELETE", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/user/starred/:owner/:repo" + } + }, + "apps": { + "addRepoToInstallation": { + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "PUT", + "params": { + "installation_id": { "required": true, "type": "integer" }, + "repository_id": { "required": true, "type": "integer" } + }, + "url": "/user/installations/:installation_id/repositories/:repository_id" + }, + "checkAccountIsAssociatedWithAny": { + "method": "GET", + "params": { + "account_id": { "required": true, "type": "integer" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/marketplace_listing/accounts/:account_id" + }, + "checkAccountIsAssociatedWithAnyStubbed": { + "method": "GET", + "params": { + "account_id": { "required": true, "type": "integer" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/marketplace_listing/stubbed/accounts/:account_id" + }, + "checkAuthorization": { + "deprecated": "octokit.oauthAuthorizations.checkAuthorization() has been renamed to octokit.apps.checkAuthorization() (2019-11-05)", + "method": "GET", + "params": { + "access_token": { "required": true, "type": "string" }, + "client_id": { "required": true, "type": "string" } + }, + "url": "/applications/:client_id/tokens/:access_token" + }, + "checkToken": { + "headers": { + "accept": "application/vnd.github.doctor-strange-preview+json" + }, + "method": "POST", + "params": { + "access_token": { "type": "string" }, + "client_id": { "required": true, "type": "string" } + }, + "url": "/applications/:client_id/token" + }, + "createContentAttachment": { + "headers": { "accept": "application/vnd.github.corsair-preview+json" }, + "method": "POST", + "params": { + "body": { "required": true, "type": "string" }, + "content_reference_id": { "required": true, "type": "integer" }, + "title": { "required": true, "type": "string" } + }, + "url": "/content_references/:content_reference_id/attachments" + }, + "createFromManifest": { + "headers": { "accept": "application/vnd.github.fury-preview+json" }, + "method": "POST", + "params": { "code": { "required": true, "type": "string" } }, + "url": "/app-manifests/:code/conversions" + }, + "createInstallationToken": { + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "POST", + "params": { + "installation_id": { "required": true, "type": "integer" }, + "permissions": { "type": "object" }, + "repository_ids": { "type": "integer[]" } + }, + "url": "/app/installations/:installation_id/access_tokens" + }, + "deleteAuthorization": { + "headers": { + "accept": "application/vnd.github.doctor-strange-preview+json" + }, + "method": "DELETE", + "params": { + "access_token": { "type": "string" }, + "client_id": { "required": true, "type": "string" } + }, + "url": "/applications/:client_id/grant" + }, + "deleteInstallation": { + "headers": { + "accept": "application/vnd.github.gambit-preview+json,application/vnd.github.machine-man-preview+json" + }, + "method": "DELETE", + "params": { "installation_id": { "required": true, "type": "integer" } }, + "url": "/app/installations/:installation_id" + }, + "deleteToken": { + "headers": { + "accept": "application/vnd.github.doctor-strange-preview+json" + }, + "method": "DELETE", + "params": { + "access_token": { "type": "string" }, + "client_id": { "required": true, "type": "string" } + }, + "url": "/applications/:client_id/token" + }, + "findOrgInstallation": { + "deprecated": "octokit.apps.findOrgInstallation() has been renamed to octokit.apps.getOrgInstallation() (2019-04-10)", + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "GET", + "params": { "org": { "required": true, "type": "string" } }, + "url": "/orgs/:org/installation" + }, + "findRepoInstallation": { + "deprecated": "octokit.apps.findRepoInstallation() has been renamed to octokit.apps.getRepoInstallation() (2019-04-10)", + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/installation" + }, + "findUserInstallation": { + "deprecated": "octokit.apps.findUserInstallation() has been renamed to octokit.apps.getUserInstallation() (2019-04-10)", + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "GET", + "params": { "username": { "required": true, "type": "string" } }, + "url": "/users/:username/installation" + }, + "getAuthenticated": { + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "GET", + "params": {}, + "url": "/app" + }, + "getBySlug": { + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "GET", + "params": { "app_slug": { "required": true, "type": "string" } }, + "url": "/apps/:app_slug" + }, + "getInstallation": { + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "GET", + "params": { "installation_id": { "required": true, "type": "integer" } }, + "url": "/app/installations/:installation_id" + }, + "getOrgInstallation": { + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "GET", + "params": { "org": { "required": true, "type": "string" } }, + "url": "/orgs/:org/installation" + }, + "getRepoInstallation": { + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/installation" + }, + "getUserInstallation": { + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "GET", + "params": { "username": { "required": true, "type": "string" } }, + "url": "/users/:username/installation" + }, + "listAccountsUserOrOrgOnPlan": { + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "plan_id": { "required": true, "type": "integer" }, + "sort": { "enum": ["created", "updated"], "type": "string" } + }, + "url": "/marketplace_listing/plans/:plan_id/accounts" + }, + "listAccountsUserOrOrgOnPlanStubbed": { + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "plan_id": { "required": true, "type": "integer" }, + "sort": { "enum": ["created", "updated"], "type": "string" } + }, + "url": "/marketplace_listing/stubbed/plans/:plan_id/accounts" + }, + "listInstallationReposForAuthenticatedUser": { + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "GET", + "params": { + "installation_id": { "required": true, "type": "integer" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/user/installations/:installation_id/repositories" + }, + "listInstallations": { + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/app/installations" + }, + "listInstallationsForAuthenticatedUser": { + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/user/installations" + }, + "listMarketplacePurchasesForAuthenticatedUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/user/marketplace_purchases" + }, + "listMarketplacePurchasesForAuthenticatedUserStubbed": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/user/marketplace_purchases/stubbed" + }, + "listPlans": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/marketplace_listing/plans" + }, + "listPlansStubbed": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/marketplace_listing/stubbed/plans" + }, + "listRepos": { + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/installation/repositories" + }, + "removeRepoFromInstallation": { + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "DELETE", + "params": { + "installation_id": { "required": true, "type": "integer" }, + "repository_id": { "required": true, "type": "integer" } + }, + "url": "/user/installations/:installation_id/repositories/:repository_id" + }, + "resetAuthorization": { + "deprecated": "octokit.oauthAuthorizations.resetAuthorization() has been renamed to octokit.apps.resetAuthorization() (2019-11-05)", + "method": "POST", + "params": { + "access_token": { "required": true, "type": "string" }, + "client_id": { "required": true, "type": "string" } + }, + "url": "/applications/:client_id/tokens/:access_token" + }, + "resetToken": { + "headers": { + "accept": "application/vnd.github.doctor-strange-preview+json" + }, + "method": "PATCH", + "params": { + "access_token": { "type": "string" }, + "client_id": { "required": true, "type": "string" } + }, + "url": "/applications/:client_id/token" + }, + "revokeAuthorizationForApplication": { + "deprecated": "octokit.oauthAuthorizations.revokeAuthorizationForApplication() has been renamed to octokit.apps.revokeAuthorizationForApplication() (2019-11-05)", + "method": "DELETE", + "params": { + "access_token": { "required": true, "type": "string" }, + "client_id": { "required": true, "type": "string" } + }, + "url": "/applications/:client_id/tokens/:access_token" + }, + "revokeGrantForApplication": { + "deprecated": "octokit.oauthAuthorizations.revokeGrantForApplication() has been renamed to octokit.apps.revokeGrantForApplication() (2019-11-05)", + "method": "DELETE", + "params": { + "access_token": { "required": true, "type": "string" }, + "client_id": { "required": true, "type": "string" } + }, + "url": "/applications/:client_id/grants/:access_token" + } + }, + "checks": { + "create": { + "headers": { "accept": "application/vnd.github.antiope-preview+json" }, + "method": "POST", + "params": { + "actions": { "type": "object[]" }, + "actions[].description": { "required": true, "type": "string" }, + "actions[].identifier": { "required": true, "type": "string" }, + "actions[].label": { "required": true, "type": "string" }, + "completed_at": { "type": "string" }, + "conclusion": { + "enum": [ + "success", + "failure", + "neutral", + "cancelled", + "timed_out", + "action_required" + ], + "type": "string" + }, + "details_url": { "type": "string" }, + "external_id": { "type": "string" }, + "head_sha": { "required": true, "type": "string" }, + "name": { "required": true, "type": "string" }, + "output": { "type": "object" }, + "output.annotations": { "type": "object[]" }, + "output.annotations[].annotation_level": { + "enum": ["notice", "warning", "failure"], + "required": true, + "type": "string" + }, + "output.annotations[].end_column": { "type": "integer" }, + "output.annotations[].end_line": { + "required": true, + "type": "integer" + }, + "output.annotations[].message": { "required": true, "type": "string" }, + "output.annotations[].path": { "required": true, "type": "string" }, + "output.annotations[].raw_details": { "type": "string" }, + "output.annotations[].start_column": { "type": "integer" }, + "output.annotations[].start_line": { + "required": true, + "type": "integer" + }, + "output.annotations[].title": { "type": "string" }, + "output.images": { "type": "object[]" }, + "output.images[].alt": { "required": true, "type": "string" }, + "output.images[].caption": { "type": "string" }, + "output.images[].image_url": { "required": true, "type": "string" }, + "output.summary": { "required": true, "type": "string" }, + "output.text": { "type": "string" }, + "output.title": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "started_at": { "type": "string" }, + "status": { + "enum": ["queued", "in_progress", "completed"], + "type": "string" + } + }, + "url": "/repos/:owner/:repo/check-runs" + }, + "createSuite": { + "headers": { "accept": "application/vnd.github.antiope-preview+json" }, + "method": "POST", + "params": { + "head_sha": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/check-suites" + }, + "get": { + "headers": { "accept": "application/vnd.github.antiope-preview+json" }, + "method": "GET", + "params": { + "check_run_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/check-runs/:check_run_id" + }, + "getSuite": { + "headers": { "accept": "application/vnd.github.antiope-preview+json" }, + "method": "GET", + "params": { + "check_suite_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/check-suites/:check_suite_id" + }, + "listAnnotations": { + "headers": { "accept": "application/vnd.github.antiope-preview+json" }, + "method": "GET", + "params": { + "check_run_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/check-runs/:check_run_id/annotations" + }, + "listForRef": { + "headers": { "accept": "application/vnd.github.antiope-preview+json" }, + "method": "GET", + "params": { + "check_name": { "type": "string" }, + "filter": { "enum": ["latest", "all"], "type": "string" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "ref": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "status": { + "enum": ["queued", "in_progress", "completed"], + "type": "string" + } + }, + "url": "/repos/:owner/:repo/commits/:ref/check-runs" + }, + "listForSuite": { + "headers": { "accept": "application/vnd.github.antiope-preview+json" }, + "method": "GET", + "params": { + "check_name": { "type": "string" }, + "check_suite_id": { "required": true, "type": "integer" }, + "filter": { "enum": ["latest", "all"], "type": "string" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "status": { + "enum": ["queued", "in_progress", "completed"], + "type": "string" + } + }, + "url": "/repos/:owner/:repo/check-suites/:check_suite_id/check-runs" + }, + "listSuitesForRef": { + "headers": { "accept": "application/vnd.github.antiope-preview+json" }, + "method": "GET", + "params": { + "app_id": { "type": "integer" }, + "check_name": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "ref": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/commits/:ref/check-suites" + }, + "rerequestSuite": { + "headers": { "accept": "application/vnd.github.antiope-preview+json" }, + "method": "POST", + "params": { + "check_suite_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/check-suites/:check_suite_id/rerequest" + }, + "setSuitesPreferences": { + "headers": { "accept": "application/vnd.github.antiope-preview+json" }, + "method": "PATCH", + "params": { + "auto_trigger_checks": { "type": "object[]" }, + "auto_trigger_checks[].app_id": { "required": true, "type": "integer" }, + "auto_trigger_checks[].setting": { + "required": true, + "type": "boolean" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/check-suites/preferences" + }, + "update": { + "headers": { "accept": "application/vnd.github.antiope-preview+json" }, + "method": "PATCH", + "params": { + "actions": { "type": "object[]" }, + "actions[].description": { "required": true, "type": "string" }, + "actions[].identifier": { "required": true, "type": "string" }, + "actions[].label": { "required": true, "type": "string" }, + "check_run_id": { "required": true, "type": "integer" }, + "completed_at": { "type": "string" }, + "conclusion": { + "enum": [ + "success", + "failure", + "neutral", + "cancelled", + "timed_out", + "action_required" + ], + "type": "string" + }, + "details_url": { "type": "string" }, + "external_id": { "type": "string" }, + "name": { "type": "string" }, + "output": { "type": "object" }, + "output.annotations": { "type": "object[]" }, + "output.annotations[].annotation_level": { + "enum": ["notice", "warning", "failure"], + "required": true, + "type": "string" + }, + "output.annotations[].end_column": { "type": "integer" }, + "output.annotations[].end_line": { + "required": true, + "type": "integer" + }, + "output.annotations[].message": { "required": true, "type": "string" }, + "output.annotations[].path": { "required": true, "type": "string" }, + "output.annotations[].raw_details": { "type": "string" }, + "output.annotations[].start_column": { "type": "integer" }, + "output.annotations[].start_line": { + "required": true, + "type": "integer" + }, + "output.annotations[].title": { "type": "string" }, + "output.images": { "type": "object[]" }, + "output.images[].alt": { "required": true, "type": "string" }, + "output.images[].caption": { "type": "string" }, + "output.images[].image_url": { "required": true, "type": "string" }, + "output.summary": { "required": true, "type": "string" }, + "output.text": { "type": "string" }, + "output.title": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "started_at": { "type": "string" }, + "status": { + "enum": ["queued", "in_progress", "completed"], + "type": "string" + } + }, + "url": "/repos/:owner/:repo/check-runs/:check_run_id" + } + }, + "codesOfConduct": { + "getConductCode": { + "headers": { + "accept": "application/vnd.github.scarlet-witch-preview+json" + }, + "method": "GET", + "params": { "key": { "required": true, "type": "string" } }, + "url": "/codes_of_conduct/:key" + }, + "getForRepo": { + "headers": { + "accept": "application/vnd.github.scarlet-witch-preview+json" + }, + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/community/code_of_conduct" + }, + "listConductCodes": { + "headers": { + "accept": "application/vnd.github.scarlet-witch-preview+json" + }, + "method": "GET", + "params": {}, + "url": "/codes_of_conduct" + } + }, + "emojis": { "get": { "method": "GET", "params": {}, "url": "/emojis" } }, + "gists": { + "checkIsStarred": { + "method": "GET", + "params": { "gist_id": { "required": true, "type": "string" } }, + "url": "/gists/:gist_id/star" + }, + "create": { + "method": "POST", + "params": { + "description": { "type": "string" }, + "files": { "required": true, "type": "object" }, + "files.content": { "type": "string" }, + "public": { "type": "boolean" } + }, + "url": "/gists" + }, + "createComment": { + "method": "POST", + "params": { + "body": { "required": true, "type": "string" }, + "gist_id": { "required": true, "type": "string" } + }, + "url": "/gists/:gist_id/comments" + }, + "delete": { + "method": "DELETE", + "params": { "gist_id": { "required": true, "type": "string" } }, + "url": "/gists/:gist_id" + }, + "deleteComment": { + "method": "DELETE", + "params": { + "comment_id": { "required": true, "type": "integer" }, + "gist_id": { "required": true, "type": "string" } + }, + "url": "/gists/:gist_id/comments/:comment_id" + }, + "fork": { + "method": "POST", + "params": { "gist_id": { "required": true, "type": "string" } }, + "url": "/gists/:gist_id/forks" + }, + "get": { + "method": "GET", + "params": { "gist_id": { "required": true, "type": "string" } }, + "url": "/gists/:gist_id" + }, + "getComment": { + "method": "GET", + "params": { + "comment_id": { "required": true, "type": "integer" }, + "gist_id": { "required": true, "type": "string" } + }, + "url": "/gists/:gist_id/comments/:comment_id" + }, + "getRevision": { + "method": "GET", + "params": { + "gist_id": { "required": true, "type": "string" }, + "sha": { "required": true, "type": "string" } + }, + "url": "/gists/:gist_id/:sha" + }, + "list": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "since": { "type": "string" } + }, + "url": "/gists" + }, + "listComments": { + "method": "GET", + "params": { + "gist_id": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/gists/:gist_id/comments" + }, + "listCommits": { + "method": "GET", + "params": { + "gist_id": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/gists/:gist_id/commits" + }, + "listForks": { + "method": "GET", + "params": { + "gist_id": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/gists/:gist_id/forks" + }, + "listPublic": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "since": { "type": "string" } + }, + "url": "/gists/public" + }, + "listPublicForUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "since": { "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/gists" + }, + "listStarred": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "since": { "type": "string" } + }, + "url": "/gists/starred" + }, + "star": { + "method": "PUT", + "params": { "gist_id": { "required": true, "type": "string" } }, + "url": "/gists/:gist_id/star" + }, + "unstar": { + "method": "DELETE", + "params": { "gist_id": { "required": true, "type": "string" } }, + "url": "/gists/:gist_id/star" + }, + "update": { + "method": "PATCH", + "params": { + "description": { "type": "string" }, + "files": { "type": "object" }, + "files.content": { "type": "string" }, + "files.filename": { "type": "string" }, + "gist_id": { "required": true, "type": "string" } + }, + "url": "/gists/:gist_id" + }, + "updateComment": { + "method": "PATCH", + "params": { + "body": { "required": true, "type": "string" }, + "comment_id": { "required": true, "type": "integer" }, + "gist_id": { "required": true, "type": "string" } + }, + "url": "/gists/:gist_id/comments/:comment_id" + } + }, + "git": { + "createBlob": { + "method": "POST", + "params": { + "content": { "required": true, "type": "string" }, + "encoding": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/git/blobs" + }, + "createCommit": { + "method": "POST", + "params": { + "author": { "type": "object" }, + "author.date": { "type": "string" }, + "author.email": { "type": "string" }, + "author.name": { "type": "string" }, + "committer": { "type": "object" }, + "committer.date": { "type": "string" }, + "committer.email": { "type": "string" }, + "committer.name": { "type": "string" }, + "message": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "parents": { "required": true, "type": "string[]" }, + "repo": { "required": true, "type": "string" }, + "signature": { "type": "string" }, + "tree": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/git/commits" + }, + "createRef": { + "method": "POST", + "params": { + "owner": { "required": true, "type": "string" }, + "ref": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "sha": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/git/refs" + }, + "createTag": { + "method": "POST", + "params": { + "message": { "required": true, "type": "string" }, + "object": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "tag": { "required": true, "type": "string" }, + "tagger": { "type": "object" }, + "tagger.date": { "type": "string" }, + "tagger.email": { "type": "string" }, + "tagger.name": { "type": "string" }, + "type": { + "enum": ["commit", "tree", "blob"], + "required": true, + "type": "string" + } + }, + "url": "/repos/:owner/:repo/git/tags" + }, + "createTree": { + "method": "POST", + "params": { + "base_tree": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "tree": { "required": true, "type": "object[]" }, + "tree[].content": { "type": "string" }, + "tree[].mode": { + "enum": ["100644", "100755", "040000", "160000", "120000"], + "type": "string" + }, + "tree[].path": { "type": "string" }, + "tree[].sha": { "allowNull": true, "type": "string" }, + "tree[].type": { "enum": ["blob", "tree", "commit"], "type": "string" } + }, + "url": "/repos/:owner/:repo/git/trees" + }, + "deleteRef": { + "method": "DELETE", + "params": { + "owner": { "required": true, "type": "string" }, + "ref": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/git/refs/:ref" + }, + "getBlob": { + "method": "GET", + "params": { + "file_sha": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/git/blobs/:file_sha" + }, + "getCommit": { + "method": "GET", + "params": { + "commit_sha": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/git/commits/:commit_sha" + }, + "getRef": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "ref": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/git/ref/:ref" + }, + "getTag": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "tag_sha": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/git/tags/:tag_sha" + }, + "getTree": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "recursive": { "enum": ["1"], "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "tree_sha": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/git/trees/:tree_sha" + }, + "listMatchingRefs": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "ref": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/git/matching-refs/:ref" + }, + "listRefs": { + "method": "GET", + "params": { + "namespace": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/git/refs/:namespace" + }, + "updateRef": { + "method": "PATCH", + "params": { + "force": { "type": "boolean" }, + "owner": { "required": true, "type": "string" }, + "ref": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "sha": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/git/refs/:ref" + } + }, + "gitignore": { + "getTemplate": { + "method": "GET", + "params": { "name": { "required": true, "type": "string" } }, + "url": "/gitignore/templates/:name" + }, + "listTemplates": { + "method": "GET", + "params": {}, + "url": "/gitignore/templates" + } + }, + "interactions": { + "addOrUpdateRestrictionsForOrg": { + "headers": { "accept": "application/vnd.github.sombra-preview+json" }, + "method": "PUT", + "params": { + "limit": { + "enum": ["existing_users", "contributors_only", "collaborators_only"], + "required": true, + "type": "string" + }, + "org": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/interaction-limits" + }, + "addOrUpdateRestrictionsForRepo": { + "headers": { "accept": "application/vnd.github.sombra-preview+json" }, + "method": "PUT", + "params": { + "limit": { + "enum": ["existing_users", "contributors_only", "collaborators_only"], + "required": true, + "type": "string" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/interaction-limits" + }, + "getRestrictionsForOrg": { + "headers": { "accept": "application/vnd.github.sombra-preview+json" }, + "method": "GET", + "params": { "org": { "required": true, "type": "string" } }, + "url": "/orgs/:org/interaction-limits" + }, + "getRestrictionsForRepo": { + "headers": { "accept": "application/vnd.github.sombra-preview+json" }, + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/interaction-limits" + }, + "removeRestrictionsForOrg": { + "headers": { "accept": "application/vnd.github.sombra-preview+json" }, + "method": "DELETE", + "params": { "org": { "required": true, "type": "string" } }, + "url": "/orgs/:org/interaction-limits" + }, + "removeRestrictionsForRepo": { + "headers": { "accept": "application/vnd.github.sombra-preview+json" }, + "method": "DELETE", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/interaction-limits" + } + }, + "issues": { + "addAssignees": { + "method": "POST", + "params": { + "assignees": { "type": "string[]" }, + "issue_number": { "required": true, "type": "integer" }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number/assignees" + }, + "addLabels": { + "method": "POST", + "params": { + "issue_number": { "required": true, "type": "integer" }, + "labels": { "required": true, "type": "string[]" }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number/labels" + }, + "checkAssignee": { + "method": "GET", + "params": { + "assignee": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/assignees/:assignee" + }, + "create": { + "method": "POST", + "params": { + "assignee": { "type": "string" }, + "assignees": { "type": "string[]" }, + "body": { "type": "string" }, + "labels": { "type": "string[]" }, + "milestone": { "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "title": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues" + }, + "createComment": { + "method": "POST", + "params": { + "body": { "required": true, "type": "string" }, + "issue_number": { "required": true, "type": "integer" }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number/comments" + }, + "createLabel": { + "method": "POST", + "params": { + "color": { "required": true, "type": "string" }, + "description": { "type": "string" }, + "name": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/labels" + }, + "createMilestone": { + "method": "POST", + "params": { + "description": { "type": "string" }, + "due_on": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "state": { "enum": ["open", "closed"], "type": "string" }, + "title": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/milestones" + }, + "deleteComment": { + "method": "DELETE", + "params": { + "comment_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/comments/:comment_id" + }, + "deleteLabel": { + "method": "DELETE", + "params": { + "name": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/labels/:name" + }, + "deleteMilestone": { + "method": "DELETE", + "params": { + "milestone_number": { "required": true, "type": "integer" }, + "number": { + "alias": "milestone_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/milestones/:milestone_number" + }, + "get": { + "method": "GET", + "params": { + "issue_number": { "required": true, "type": "integer" }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number" + }, + "getComment": { + "method": "GET", + "params": { + "comment_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/comments/:comment_id" + }, + "getEvent": { + "method": "GET", + "params": { + "event_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/events/:event_id" + }, + "getLabel": { + "method": "GET", + "params": { + "name": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/labels/:name" + }, + "getMilestone": { + "method": "GET", + "params": { + "milestone_number": { "required": true, "type": "integer" }, + "number": { + "alias": "milestone_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/milestones/:milestone_number" + }, + "list": { + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "filter": { + "enum": ["assigned", "created", "mentioned", "subscribed", "all"], + "type": "string" + }, + "labels": { "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "since": { "type": "string" }, + "sort": { + "enum": ["created", "updated", "comments"], + "type": "string" + }, + "state": { "enum": ["open", "closed", "all"], "type": "string" } + }, + "url": "/issues" + }, + "listAssignees": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/assignees" + }, + "listComments": { + "method": "GET", + "params": { + "issue_number": { "required": true, "type": "integer" }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "since": { "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number/comments" + }, + "listCommentsForRepo": { + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "since": { "type": "string" }, + "sort": { "enum": ["created", "updated"], "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/comments" + }, + "listEvents": { + "method": "GET", + "params": { + "issue_number": { "required": true, "type": "integer" }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number/events" + }, + "listEventsForRepo": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/events" + }, + "listEventsForTimeline": { + "headers": { + "accept": "application/vnd.github.mockingbird-preview+json" + }, + "method": "GET", + "params": { + "issue_number": { "required": true, "type": "integer" }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number/timeline" + }, + "listForAuthenticatedUser": { + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "filter": { + "enum": ["assigned", "created", "mentioned", "subscribed", "all"], + "type": "string" + }, + "labels": { "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "since": { "type": "string" }, + "sort": { + "enum": ["created", "updated", "comments"], + "type": "string" + }, + "state": { "enum": ["open", "closed", "all"], "type": "string" } + }, + "url": "/user/issues" + }, + "listForOrg": { + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "filter": { + "enum": ["assigned", "created", "mentioned", "subscribed", "all"], + "type": "string" + }, + "labels": { "type": "string" }, + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "since": { "type": "string" }, + "sort": { + "enum": ["created", "updated", "comments"], + "type": "string" + }, + "state": { "enum": ["open", "closed", "all"], "type": "string" } + }, + "url": "/orgs/:org/issues" + }, + "listForRepo": { + "method": "GET", + "params": { + "assignee": { "type": "string" }, + "creator": { "type": "string" }, + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "labels": { "type": "string" }, + "mentioned": { "type": "string" }, + "milestone": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "since": { "type": "string" }, + "sort": { + "enum": ["created", "updated", "comments"], + "type": "string" + }, + "state": { "enum": ["open", "closed", "all"], "type": "string" } + }, + "url": "/repos/:owner/:repo/issues" + }, + "listLabelsForMilestone": { + "method": "GET", + "params": { + "milestone_number": { "required": true, "type": "integer" }, + "number": { + "alias": "milestone_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/milestones/:milestone_number/labels" + }, + "listLabelsForRepo": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/labels" + }, + "listLabelsOnIssue": { + "method": "GET", + "params": { + "issue_number": { "required": true, "type": "integer" }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number/labels" + }, + "listMilestonesForRepo": { + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "sort": { "enum": ["due_on", "completeness"], "type": "string" }, + "state": { "enum": ["open", "closed", "all"], "type": "string" } + }, + "url": "/repos/:owner/:repo/milestones" + }, + "lock": { + "method": "PUT", + "params": { + "issue_number": { "required": true, "type": "integer" }, + "lock_reason": { + "enum": ["off-topic", "too heated", "resolved", "spam"], + "type": "string" + }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number/lock" + }, + "removeAssignees": { + "method": "DELETE", + "params": { + "assignees": { "type": "string[]" }, + "issue_number": { "required": true, "type": "integer" }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number/assignees" + }, + "removeLabel": { + "method": "DELETE", + "params": { + "issue_number": { "required": true, "type": "integer" }, + "name": { "required": true, "type": "string" }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number/labels/:name" + }, + "removeLabels": { + "method": "DELETE", + "params": { + "issue_number": { "required": true, "type": "integer" }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number/labels" + }, + "replaceLabels": { + "method": "PUT", + "params": { + "issue_number": { "required": true, "type": "integer" }, + "labels": { "type": "string[]" }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number/labels" + }, + "unlock": { + "method": "DELETE", + "params": { + "issue_number": { "required": true, "type": "integer" }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number/lock" + }, + "update": { + "method": "PATCH", + "params": { + "assignee": { "type": "string" }, + "assignees": { "type": "string[]" }, + "body": { "type": "string" }, + "issue_number": { "required": true, "type": "integer" }, + "labels": { "type": "string[]" }, + "milestone": { "allowNull": true, "type": "integer" }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "state": { "enum": ["open", "closed"], "type": "string" }, + "title": { "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number" + }, + "updateComment": { + "method": "PATCH", + "params": { + "body": { "required": true, "type": "string" }, + "comment_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/comments/:comment_id" + }, + "updateLabel": { + "method": "PATCH", + "params": { + "color": { "type": "string" }, + "current_name": { "required": true, "type": "string" }, + "description": { "type": "string" }, + "name": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/labels/:current_name" + }, + "updateMilestone": { + "method": "PATCH", + "params": { + "description": { "type": "string" }, + "due_on": { "type": "string" }, + "milestone_number": { "required": true, "type": "integer" }, + "number": { + "alias": "milestone_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "state": { "enum": ["open", "closed"], "type": "string" }, + "title": { "type": "string" } + }, + "url": "/repos/:owner/:repo/milestones/:milestone_number" + } + }, + "licenses": { + "get": { + "method": "GET", + "params": { "license": { "required": true, "type": "string" } }, + "url": "/licenses/:license" + }, + "getForRepo": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/license" + }, + "list": { + "deprecated": "octokit.licenses.list() has been renamed to octokit.licenses.listCommonlyUsed() (2019-03-05)", + "method": "GET", + "params": {}, + "url": "/licenses" + }, + "listCommonlyUsed": { "method": "GET", "params": {}, "url": "/licenses" } + }, + "markdown": { + "render": { + "method": "POST", + "params": { + "context": { "type": "string" }, + "mode": { "enum": ["markdown", "gfm"], "type": "string" }, + "text": { "required": true, "type": "string" } + }, + "url": "/markdown" + }, + "renderRaw": { + "headers": { "content-type": "text/plain; charset=utf-8" }, + "method": "POST", + "params": { + "data": { "mapTo": "data", "required": true, "type": "string" } + }, + "url": "/markdown/raw" + } + }, + "meta": { "get": { "method": "GET", "params": {}, "url": "/meta" } }, + "migrations": { + "cancelImport": { + "headers": { + "accept": "application/vnd.github.barred-rock-preview+json" + }, + "method": "DELETE", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/import" + }, + "deleteArchiveForAuthenticatedUser": { + "headers": { "accept": "application/vnd.github.wyandotte-preview+json" }, + "method": "DELETE", + "params": { "migration_id": { "required": true, "type": "integer" } }, + "url": "/user/migrations/:migration_id/archive" + }, + "deleteArchiveForOrg": { + "headers": { "accept": "application/vnd.github.wyandotte-preview+json" }, + "method": "DELETE", + "params": { + "migration_id": { "required": true, "type": "integer" }, + "org": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/migrations/:migration_id/archive" + }, + "getArchiveForAuthenticatedUser": { + "headers": { "accept": "application/vnd.github.wyandotte-preview+json" }, + "method": "GET", + "params": { "migration_id": { "required": true, "type": "integer" } }, + "url": "/user/migrations/:migration_id/archive" + }, + "getArchiveForOrg": { + "headers": { "accept": "application/vnd.github.wyandotte-preview+json" }, + "method": "GET", + "params": { + "migration_id": { "required": true, "type": "integer" }, + "org": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/migrations/:migration_id/archive" + }, + "getCommitAuthors": { + "headers": { + "accept": "application/vnd.github.barred-rock-preview+json" + }, + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "since": { "type": "string" } + }, + "url": "/repos/:owner/:repo/import/authors" + }, + "getImportProgress": { + "headers": { + "accept": "application/vnd.github.barred-rock-preview+json" + }, + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/import" + }, + "getLargeFiles": { + "headers": { + "accept": "application/vnd.github.barred-rock-preview+json" + }, + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/import/large_files" + }, + "getStatusForAuthenticatedUser": { + "headers": { "accept": "application/vnd.github.wyandotte-preview+json" }, + "method": "GET", + "params": { "migration_id": { "required": true, "type": "integer" } }, + "url": "/user/migrations/:migration_id" + }, + "getStatusForOrg": { + "headers": { "accept": "application/vnd.github.wyandotte-preview+json" }, + "method": "GET", + "params": { + "migration_id": { "required": true, "type": "integer" }, + "org": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/migrations/:migration_id" + }, + "listForAuthenticatedUser": { + "headers": { "accept": "application/vnd.github.wyandotte-preview+json" }, + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/user/migrations" + }, + "listForOrg": { + "headers": { "accept": "application/vnd.github.wyandotte-preview+json" }, + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/orgs/:org/migrations" + }, + "mapCommitAuthor": { + "headers": { + "accept": "application/vnd.github.barred-rock-preview+json" + }, + "method": "PATCH", + "params": { + "author_id": { "required": true, "type": "integer" }, + "email": { "type": "string" }, + "name": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/import/authors/:author_id" + }, + "setLfsPreference": { + "headers": { + "accept": "application/vnd.github.barred-rock-preview+json" + }, + "method": "PATCH", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "use_lfs": { + "enum": ["opt_in", "opt_out"], + "required": true, + "type": "string" + } + }, + "url": "/repos/:owner/:repo/import/lfs" + }, + "startForAuthenticatedUser": { + "method": "POST", + "params": { + "exclude_attachments": { "type": "boolean" }, + "lock_repositories": { "type": "boolean" }, + "repositories": { "required": true, "type": "string[]" } + }, + "url": "/user/migrations" + }, + "startForOrg": { + "method": "POST", + "params": { + "exclude_attachments": { "type": "boolean" }, + "lock_repositories": { "type": "boolean" }, + "org": { "required": true, "type": "string" }, + "repositories": { "required": true, "type": "string[]" } + }, + "url": "/orgs/:org/migrations" + }, + "startImport": { + "headers": { + "accept": "application/vnd.github.barred-rock-preview+json" + }, + "method": "PUT", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "tfvc_project": { "type": "string" }, + "vcs": { + "enum": ["subversion", "git", "mercurial", "tfvc"], + "type": "string" + }, + "vcs_password": { "type": "string" }, + "vcs_url": { "required": true, "type": "string" }, + "vcs_username": { "type": "string" } + }, + "url": "/repos/:owner/:repo/import" + }, + "unlockRepoForAuthenticatedUser": { + "headers": { "accept": "application/vnd.github.wyandotte-preview+json" }, + "method": "DELETE", + "params": { + "migration_id": { "required": true, "type": "integer" }, + "repo_name": { "required": true, "type": "string" } + }, + "url": "/user/migrations/:migration_id/repos/:repo_name/lock" + }, + "unlockRepoForOrg": { + "headers": { "accept": "application/vnd.github.wyandotte-preview+json" }, + "method": "DELETE", + "params": { + "migration_id": { "required": true, "type": "integer" }, + "org": { "required": true, "type": "string" }, + "repo_name": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/migrations/:migration_id/repos/:repo_name/lock" + }, + "updateImport": { + "headers": { + "accept": "application/vnd.github.barred-rock-preview+json" + }, + "method": "PATCH", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "vcs_password": { "type": "string" }, + "vcs_username": { "type": "string" } + }, + "url": "/repos/:owner/:repo/import" + } + }, + "oauthAuthorizations": { + "checkAuthorization": { + "deprecated": "octokit.oauthAuthorizations.checkAuthorization() has been renamed to octokit.apps.checkAuthorization() (2019-11-05)", + "method": "GET", + "params": { + "access_token": { "required": true, "type": "string" }, + "client_id": { "required": true, "type": "string" } + }, + "url": "/applications/:client_id/tokens/:access_token" + }, + "createAuthorization": { + "deprecated": "octokit.oauthAuthorizations.createAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization", + "method": "POST", + "params": { + "client_id": { "type": "string" }, + "client_secret": { "type": "string" }, + "fingerprint": { "type": "string" }, + "note": { "required": true, "type": "string" }, + "note_url": { "type": "string" }, + "scopes": { "type": "string[]" } + }, + "url": "/authorizations" + }, + "deleteAuthorization": { + "deprecated": "octokit.oauthAuthorizations.deleteAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#delete-an-authorization", + "method": "DELETE", + "params": { "authorization_id": { "required": true, "type": "integer" } }, + "url": "/authorizations/:authorization_id" + }, + "deleteGrant": { + "deprecated": "octokit.oauthAuthorizations.deleteGrant() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#delete-a-grant", + "method": "DELETE", + "params": { "grant_id": { "required": true, "type": "integer" } }, + "url": "/applications/grants/:grant_id" + }, + "getAuthorization": { + "deprecated": "octokit.oauthAuthorizations.getAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-a-single-authorization", + "method": "GET", + "params": { "authorization_id": { "required": true, "type": "integer" } }, + "url": "/authorizations/:authorization_id" + }, + "getGrant": { + "deprecated": "octokit.oauthAuthorizations.getGrant() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-a-single-grant", + "method": "GET", + "params": { "grant_id": { "required": true, "type": "integer" } }, + "url": "/applications/grants/:grant_id" + }, + "getOrCreateAuthorizationForApp": { + "deprecated": "octokit.oauthAuthorizations.getOrCreateAuthorizationForApp() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app", + "method": "PUT", + "params": { + "client_id": { "required": true, "type": "string" }, + "client_secret": { "required": true, "type": "string" }, + "fingerprint": { "type": "string" }, + "note": { "type": "string" }, + "note_url": { "type": "string" }, + "scopes": { "type": "string[]" } + }, + "url": "/authorizations/clients/:client_id" + }, + "getOrCreateAuthorizationForAppAndFingerprint": { + "deprecated": "octokit.oauthAuthorizations.getOrCreateAuthorizationForAppAndFingerprint() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app-and-fingerprint", + "method": "PUT", + "params": { + "client_id": { "required": true, "type": "string" }, + "client_secret": { "required": true, "type": "string" }, + "fingerprint": { "required": true, "type": "string" }, + "note": { "type": "string" }, + "note_url": { "type": "string" }, + "scopes": { "type": "string[]" } + }, + "url": "/authorizations/clients/:client_id/:fingerprint" + }, + "getOrCreateAuthorizationForAppFingerprint": { + "deprecated": "octokit.oauthAuthorizations.getOrCreateAuthorizationForAppFingerprint() has been renamed to octokit.oauthAuthorizations.getOrCreateAuthorizationForAppAndFingerprint() (2018-12-27)", + "method": "PUT", + "params": { + "client_id": { "required": true, "type": "string" }, + "client_secret": { "required": true, "type": "string" }, + "fingerprint": { "required": true, "type": "string" }, + "note": { "type": "string" }, + "note_url": { "type": "string" }, + "scopes": { "type": "string[]" } + }, + "url": "/authorizations/clients/:client_id/:fingerprint" + }, + "listAuthorizations": { + "deprecated": "octokit.oauthAuthorizations.listAuthorizations() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#list-your-authorizations", + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/authorizations" + }, + "listGrants": { + "deprecated": "octokit.oauthAuthorizations.listGrants() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#list-your-grants", + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/applications/grants" + }, + "resetAuthorization": { + "deprecated": "octokit.oauthAuthorizations.resetAuthorization() has been renamed to octokit.apps.resetAuthorization() (2019-11-05)", + "method": "POST", + "params": { + "access_token": { "required": true, "type": "string" }, + "client_id": { "required": true, "type": "string" } + }, + "url": "/applications/:client_id/tokens/:access_token" + }, + "revokeAuthorizationForApplication": { + "deprecated": "octokit.oauthAuthorizations.revokeAuthorizationForApplication() has been renamed to octokit.apps.revokeAuthorizationForApplication() (2019-11-05)", + "method": "DELETE", + "params": { + "access_token": { "required": true, "type": "string" }, + "client_id": { "required": true, "type": "string" } + }, + "url": "/applications/:client_id/tokens/:access_token" + }, + "revokeGrantForApplication": { + "deprecated": "octokit.oauthAuthorizations.revokeGrantForApplication() has been renamed to octokit.apps.revokeGrantForApplication() (2019-11-05)", + "method": "DELETE", + "params": { + "access_token": { "required": true, "type": "string" }, + "client_id": { "required": true, "type": "string" } + }, + "url": "/applications/:client_id/grants/:access_token" + }, + "updateAuthorization": { + "deprecated": "octokit.oauthAuthorizations.updateAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#update-an-existing-authorization", + "method": "PATCH", + "params": { + "add_scopes": { "type": "string[]" }, + "authorization_id": { "required": true, "type": "integer" }, + "fingerprint": { "type": "string" }, + "note": { "type": "string" }, + "note_url": { "type": "string" }, + "remove_scopes": { "type": "string[]" }, + "scopes": { "type": "string[]" } + }, + "url": "/authorizations/:authorization_id" + } + }, + "orgs": { + "addOrUpdateMembership": { + "method": "PUT", + "params": { + "org": { "required": true, "type": "string" }, + "role": { "enum": ["admin", "member"], "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/memberships/:username" + }, + "blockUser": { + "method": "PUT", + "params": { + "org": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/blocks/:username" + }, + "checkBlockedUser": { + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/blocks/:username" + }, + "checkMembership": { + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/members/:username" + }, + "checkPublicMembership": { + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/public_members/:username" + }, + "concealMembership": { + "method": "DELETE", + "params": { + "org": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/public_members/:username" + }, + "convertMemberToOutsideCollaborator": { + "method": "PUT", + "params": { + "org": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/outside_collaborators/:username" + }, + "createHook": { + "method": "POST", + "params": { + "active": { "type": "boolean" }, + "config": { "required": true, "type": "object" }, + "config.content_type": { "type": "string" }, + "config.insecure_ssl": { "type": "string" }, + "config.secret": { "type": "string" }, + "config.url": { "required": true, "type": "string" }, + "events": { "type": "string[]" }, + "name": { "required": true, "type": "string" }, + "org": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/hooks" + }, + "createInvitation": { + "method": "POST", + "params": { + "email": { "type": "string" }, + "invitee_id": { "type": "integer" }, + "org": { "required": true, "type": "string" }, + "role": { + "enum": ["admin", "direct_member", "billing_manager"], + "type": "string" + }, + "team_ids": { "type": "integer[]" } + }, + "url": "/orgs/:org/invitations" + }, + "deleteHook": { + "method": "DELETE", + "params": { + "hook_id": { "required": true, "type": "integer" }, + "org": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/hooks/:hook_id" + }, + "get": { + "method": "GET", + "params": { "org": { "required": true, "type": "string" } }, + "url": "/orgs/:org" + }, + "getHook": { + "method": "GET", + "params": { + "hook_id": { "required": true, "type": "integer" }, + "org": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/hooks/:hook_id" + }, + "getMembership": { + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/memberships/:username" + }, + "getMembershipForAuthenticatedUser": { + "method": "GET", + "params": { "org": { "required": true, "type": "string" } }, + "url": "/user/memberships/orgs/:org" + }, + "list": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "since": { "type": "string" } + }, + "url": "/organizations" + }, + "listBlockedUsers": { + "method": "GET", + "params": { "org": { "required": true, "type": "string" } }, + "url": "/orgs/:org/blocks" + }, + "listForAuthenticatedUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/user/orgs" + }, + "listForUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/orgs" + }, + "listHooks": { + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/orgs/:org/hooks" + }, + "listInstallations": { + "headers": { + "accept": "application/vnd.github.machine-man-preview+json" + }, + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/orgs/:org/installations" + }, + "listInvitationTeams": { + "method": "GET", + "params": { + "invitation_id": { "required": true, "type": "integer" }, + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/orgs/:org/invitations/:invitation_id/teams" + }, + "listMembers": { + "method": "GET", + "params": { + "filter": { "enum": ["2fa_disabled", "all"], "type": "string" }, + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "role": { "enum": ["all", "admin", "member"], "type": "string" } + }, + "url": "/orgs/:org/members" + }, + "listMemberships": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "state": { "enum": ["active", "pending"], "type": "string" } + }, + "url": "/user/memberships/orgs" + }, + "listOutsideCollaborators": { + "method": "GET", + "params": { + "filter": { "enum": ["2fa_disabled", "all"], "type": "string" }, + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/orgs/:org/outside_collaborators" + }, + "listPendingInvitations": { + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/orgs/:org/invitations" + }, + "listPublicMembers": { + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/orgs/:org/public_members" + }, + "pingHook": { + "method": "POST", + "params": { + "hook_id": { "required": true, "type": "integer" }, + "org": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/hooks/:hook_id/pings" + }, + "publicizeMembership": { + "method": "PUT", + "params": { + "org": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/public_members/:username" + }, + "removeMember": { + "method": "DELETE", + "params": { + "org": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/members/:username" + }, + "removeMembership": { + "method": "DELETE", + "params": { + "org": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/memberships/:username" + }, + "removeOutsideCollaborator": { + "method": "DELETE", + "params": { + "org": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/outside_collaborators/:username" + }, + "unblockUser": { + "method": "DELETE", + "params": { + "org": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/blocks/:username" + }, + "update": { + "method": "PATCH", + "params": { + "billing_email": { "type": "string" }, + "company": { "type": "string" }, + "default_repository_permission": { + "enum": ["read", "write", "admin", "none"], + "type": "string" + }, + "description": { "type": "string" }, + "email": { "type": "string" }, + "has_organization_projects": { "type": "boolean" }, + "has_repository_projects": { "type": "boolean" }, + "location": { "type": "string" }, + "members_allowed_repository_creation_type": { + "enum": ["all", "private", "none"], + "type": "string" + }, + "members_can_create_repositories": { "type": "boolean" }, + "name": { "type": "string" }, + "org": { "required": true, "type": "string" } + }, + "url": "/orgs/:org" + }, + "updateHook": { + "method": "PATCH", + "params": { + "active": { "type": "boolean" }, + "config": { "type": "object" }, + "config.content_type": { "type": "string" }, + "config.insecure_ssl": { "type": "string" }, + "config.secret": { "type": "string" }, + "config.url": { "required": true, "type": "string" }, + "events": { "type": "string[]" }, + "hook_id": { "required": true, "type": "integer" }, + "org": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/hooks/:hook_id" + }, + "updateMembership": { + "method": "PATCH", + "params": { + "org": { "required": true, "type": "string" }, + "state": { "enum": ["active"], "required": true, "type": "string" } + }, + "url": "/user/memberships/orgs/:org" + } + }, + "projects": { + "addCollaborator": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "PUT", + "params": { + "permission": { "enum": ["read", "write", "admin"], "type": "string" }, + "project_id": { "required": true, "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/projects/:project_id/collaborators/:username" + }, + "createCard": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "POST", + "params": { + "column_id": { "required": true, "type": "integer" }, + "content_id": { "type": "integer" }, + "content_type": { "type": "string" }, + "note": { "type": "string" } + }, + "url": "/projects/columns/:column_id/cards" + }, + "createColumn": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "POST", + "params": { + "name": { "required": true, "type": "string" }, + "project_id": { "required": true, "type": "integer" } + }, + "url": "/projects/:project_id/columns" + }, + "createForAuthenticatedUser": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "POST", + "params": { + "body": { "type": "string" }, + "name": { "required": true, "type": "string" } + }, + "url": "/user/projects" + }, + "createForOrg": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "POST", + "params": { + "body": { "type": "string" }, + "name": { "required": true, "type": "string" }, + "org": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/projects" + }, + "createForRepo": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "POST", + "params": { + "body": { "type": "string" }, + "name": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/projects" + }, + "delete": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "DELETE", + "params": { "project_id": { "required": true, "type": "integer" } }, + "url": "/projects/:project_id" + }, + "deleteCard": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "DELETE", + "params": { "card_id": { "required": true, "type": "integer" } }, + "url": "/projects/columns/cards/:card_id" + }, + "deleteColumn": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "DELETE", + "params": { "column_id": { "required": true, "type": "integer" } }, + "url": "/projects/columns/:column_id" + }, + "get": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "project_id": { "required": true, "type": "integer" } + }, + "url": "/projects/:project_id" + }, + "getCard": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "GET", + "params": { "card_id": { "required": true, "type": "integer" } }, + "url": "/projects/columns/cards/:card_id" + }, + "getColumn": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "GET", + "params": { "column_id": { "required": true, "type": "integer" } }, + "url": "/projects/columns/:column_id" + }, + "listCards": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "GET", + "params": { + "archived_state": { + "enum": ["all", "archived", "not_archived"], + "type": "string" + }, + "column_id": { "required": true, "type": "integer" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/projects/columns/:column_id/cards" + }, + "listCollaborators": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "GET", + "params": { + "affiliation": { + "enum": ["outside", "direct", "all"], + "type": "string" + }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "project_id": { "required": true, "type": "integer" } + }, + "url": "/projects/:project_id/collaborators" + }, + "listColumns": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "project_id": { "required": true, "type": "integer" } + }, + "url": "/projects/:project_id/columns" + }, + "listForOrg": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "state": { "enum": ["open", "closed", "all"], "type": "string" } + }, + "url": "/orgs/:org/projects" + }, + "listForRepo": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "state": { "enum": ["open", "closed", "all"], "type": "string" } + }, + "url": "/repos/:owner/:repo/projects" + }, + "listForUser": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "state": { "enum": ["open", "closed", "all"], "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/projects" + }, + "moveCard": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "POST", + "params": { + "card_id": { "required": true, "type": "integer" }, + "column_id": { "type": "integer" }, + "position": { + "required": true, + "type": "string", + "validation": "^(top|bottom|after:\\d+)$" + } + }, + "url": "/projects/columns/cards/:card_id/moves" + }, + "moveColumn": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "POST", + "params": { + "column_id": { "required": true, "type": "integer" }, + "position": { + "required": true, + "type": "string", + "validation": "^(first|last|after:\\d+)$" + } + }, + "url": "/projects/columns/:column_id/moves" + }, + "removeCollaborator": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "DELETE", + "params": { + "project_id": { "required": true, "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/projects/:project_id/collaborators/:username" + }, + "reviewUserPermissionLevel": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "GET", + "params": { + "project_id": { "required": true, "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/projects/:project_id/collaborators/:username/permission" + }, + "update": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "PATCH", + "params": { + "body": { "type": "string" }, + "name": { "type": "string" }, + "organization_permission": { "type": "string" }, + "private": { "type": "boolean" }, + "project_id": { "required": true, "type": "integer" }, + "state": { "enum": ["open", "closed"], "type": "string" } + }, + "url": "/projects/:project_id" + }, + "updateCard": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "PATCH", + "params": { + "archived": { "type": "boolean" }, + "card_id": { "required": true, "type": "integer" }, + "note": { "type": "string" } + }, + "url": "/projects/columns/cards/:card_id" + }, + "updateColumn": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "PATCH", + "params": { + "column_id": { "required": true, "type": "integer" }, + "name": { "required": true, "type": "string" } + }, + "url": "/projects/columns/:column_id" + } + }, + "pulls": { + "checkIfMerged": { + "method": "GET", + "params": { + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/merge" + }, + "create": { + "method": "POST", + "params": { + "base": { "required": true, "type": "string" }, + "body": { "type": "string" }, + "draft": { "type": "boolean" }, + "head": { "required": true, "type": "string" }, + "maintainer_can_modify": { "type": "boolean" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "title": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls" + }, + "createComment": { + "method": "POST", + "params": { + "body": { "required": true, "type": "string" }, + "commit_id": { "required": true, "type": "string" }, + "in_reply_to": { + "deprecated": true, + "description": "The comment ID to reply to. **Note**: This must be the ID of a top-level comment, not a reply to that comment. Replies to replies are not supported.", + "type": "integer" + }, + "line": { "type": "integer" }, + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "path": { "required": true, "type": "string" }, + "position": { "type": "integer" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "side": { "enum": ["LEFT", "RIGHT"], "type": "string" }, + "start_line": { "type": "integer" }, + "start_side": { "enum": ["LEFT", "RIGHT", "side"], "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/comments" + }, + "createCommentReply": { + "deprecated": "octokit.pulls.createCommentReply() has been renamed to octokit.pulls.createComment() (2019-09-09)", + "method": "POST", + "params": { + "body": { "required": true, "type": "string" }, + "commit_id": { "required": true, "type": "string" }, + "in_reply_to": { + "deprecated": true, + "description": "The comment ID to reply to. **Note**: This must be the ID of a top-level comment, not a reply to that comment. Replies to replies are not supported.", + "type": "integer" + }, + "line": { "type": "integer" }, + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "path": { "required": true, "type": "string" }, + "position": { "type": "integer" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "side": { "enum": ["LEFT", "RIGHT"], "type": "string" }, + "start_line": { "type": "integer" }, + "start_side": { "enum": ["LEFT", "RIGHT", "side"], "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/comments" + }, + "createFromIssue": { + "deprecated": "octokit.pulls.createFromIssue() is deprecated, see https://developer.github.com/v3/pulls/#create-a-pull-request", + "method": "POST", + "params": { + "base": { "required": true, "type": "string" }, + "draft": { "type": "boolean" }, + "head": { "required": true, "type": "string" }, + "issue": { "required": true, "type": "integer" }, + "maintainer_can_modify": { "type": "boolean" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls" + }, + "createReview": { + "method": "POST", + "params": { + "body": { "type": "string" }, + "comments": { "type": "object[]" }, + "comments[].body": { "required": true, "type": "string" }, + "comments[].path": { "required": true, "type": "string" }, + "comments[].position": { "required": true, "type": "integer" }, + "commit_id": { "type": "string" }, + "event": { + "enum": ["APPROVE", "REQUEST_CHANGES", "COMMENT"], + "type": "string" + }, + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/reviews" + }, + "createReviewCommentReply": { + "method": "POST", + "params": { + "body": { "required": true, "type": "string" }, + "comment_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/comments/:comment_id/replies" + }, + "createReviewRequest": { + "method": "POST", + "params": { + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "reviewers": { "type": "string[]" }, + "team_reviewers": { "type": "string[]" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/requested_reviewers" + }, + "deleteComment": { + "method": "DELETE", + "params": { + "comment_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/comments/:comment_id" + }, + "deletePendingReview": { + "method": "DELETE", + "params": { + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "review_id": { "required": true, "type": "integer" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id" + }, + "deleteReviewRequest": { + "method": "DELETE", + "params": { + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "reviewers": { "type": "string[]" }, + "team_reviewers": { "type": "string[]" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/requested_reviewers" + }, + "dismissReview": { + "method": "PUT", + "params": { + "message": { "required": true, "type": "string" }, + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "review_id": { "required": true, "type": "integer" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/dismissals" + }, + "get": { + "method": "GET", + "params": { + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number" + }, + "getComment": { + "method": "GET", + "params": { + "comment_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/comments/:comment_id" + }, + "getCommentsForReview": { + "method": "GET", + "params": { + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "review_id": { "required": true, "type": "integer" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/comments" + }, + "getReview": { + "method": "GET", + "params": { + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "review_id": { "required": true, "type": "integer" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id" + }, + "list": { + "method": "GET", + "params": { + "base": { "type": "string" }, + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "head": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "sort": { + "enum": ["created", "updated", "popularity", "long-running"], + "type": "string" + }, + "state": { "enum": ["open", "closed", "all"], "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls" + }, + "listComments": { + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "since": { "type": "string" }, + "sort": { "enum": ["created", "updated"], "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/comments" + }, + "listCommentsForRepo": { + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "since": { "type": "string" }, + "sort": { "enum": ["created", "updated"], "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/comments" + }, + "listCommits": { + "method": "GET", + "params": { + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/commits" + }, + "listFiles": { + "method": "GET", + "params": { + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/files" + }, + "listReviewRequests": { + "method": "GET", + "params": { + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/requested_reviewers" + }, + "listReviews": { + "method": "GET", + "params": { + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/reviews" + }, + "merge": { + "method": "PUT", + "params": { + "commit_message": { "type": "string" }, + "commit_title": { "type": "string" }, + "merge_method": { + "enum": ["merge", "squash", "rebase"], + "type": "string" + }, + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "sha": { "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/merge" + }, + "submitReview": { + "method": "POST", + "params": { + "body": { "type": "string" }, + "event": { + "enum": ["APPROVE", "REQUEST_CHANGES", "COMMENT"], + "required": true, + "type": "string" + }, + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "review_id": { "required": true, "type": "integer" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/events" + }, + "update": { + "method": "PATCH", + "params": { + "base": { "type": "string" }, + "body": { "type": "string" }, + "maintainer_can_modify": { "type": "boolean" }, + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "state": { "enum": ["open", "closed"], "type": "string" }, + "title": { "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number" + }, + "updateBranch": { + "headers": { "accept": "application/vnd.github.lydian-preview+json" }, + "method": "PUT", + "params": { + "expected_head_sha": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/update-branch" + }, + "updateComment": { + "method": "PATCH", + "params": { + "body": { "required": true, "type": "string" }, + "comment_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/comments/:comment_id" + }, + "updateReview": { + "method": "PUT", + "params": { + "body": { "required": true, "type": "string" }, + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "pull_number": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "review_id": { "required": true, "type": "integer" } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id" + } + }, + "rateLimit": { + "get": { "method": "GET", "params": {}, "url": "/rate_limit" } + }, + "reactions": { + "createForCommitComment": { + "headers": { + "accept": "application/vnd.github.squirrel-girl-preview+json" + }, + "method": "POST", + "params": { + "comment_id": { "required": true, "type": "integer" }, + "content": { + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "required": true, + "type": "string" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/comments/:comment_id/reactions" + }, + "createForIssue": { + "headers": { + "accept": "application/vnd.github.squirrel-girl-preview+json" + }, + "method": "POST", + "params": { + "content": { + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "required": true, + "type": "string" + }, + "issue_number": { "required": true, "type": "integer" }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number/reactions" + }, + "createForIssueComment": { + "headers": { + "accept": "application/vnd.github.squirrel-girl-preview+json" + }, + "method": "POST", + "params": { + "comment_id": { "required": true, "type": "integer" }, + "content": { + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "required": true, + "type": "string" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/comments/:comment_id/reactions" + }, + "createForPullRequestReviewComment": { + "headers": { + "accept": "application/vnd.github.squirrel-girl-preview+json" + }, + "method": "POST", + "params": { + "comment_id": { "required": true, "type": "integer" }, + "content": { + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "required": true, + "type": "string" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/comments/:comment_id/reactions" + }, + "createForTeamDiscussion": { + "headers": { + "accept": "application/vnd.github.echo-preview+json,application/vnd.github.squirrel-girl-preview+json" + }, + "method": "POST", + "params": { + "content": { + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "required": true, + "type": "string" + }, + "discussion_number": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions/:discussion_number/reactions" + }, + "createForTeamDiscussionComment": { + "headers": { + "accept": "application/vnd.github.echo-preview+json,application/vnd.github.squirrel-girl-preview+json" + }, + "method": "POST", + "params": { + "comment_number": { "required": true, "type": "integer" }, + "content": { + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "required": true, + "type": "string" + }, + "discussion_number": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions" + }, + "delete": { + "headers": { + "accept": "application/vnd.github.echo-preview+json,application/vnd.github.squirrel-girl-preview+json" + }, + "method": "DELETE", + "params": { "reaction_id": { "required": true, "type": "integer" } }, + "url": "/reactions/:reaction_id" + }, + "listForCommitComment": { + "headers": { + "accept": "application/vnd.github.squirrel-girl-preview+json" + }, + "method": "GET", + "params": { + "comment_id": { "required": true, "type": "integer" }, + "content": { + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "type": "string" + }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/comments/:comment_id/reactions" + }, + "listForIssue": { + "headers": { + "accept": "application/vnd.github.squirrel-girl-preview+json" + }, + "method": "GET", + "params": { + "content": { + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "type": "string" + }, + "issue_number": { "required": true, "type": "integer" }, + "number": { + "alias": "issue_number", + "deprecated": true, + "type": "integer" + }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/:issue_number/reactions" + }, + "listForIssueComment": { + "headers": { + "accept": "application/vnd.github.squirrel-girl-preview+json" + }, + "method": "GET", + "params": { + "comment_id": { "required": true, "type": "integer" }, + "content": { + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "type": "string" + }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/issues/comments/:comment_id/reactions" + }, + "listForPullRequestReviewComment": { + "headers": { + "accept": "application/vnd.github.squirrel-girl-preview+json" + }, + "method": "GET", + "params": { + "comment_id": { "required": true, "type": "integer" }, + "content": { + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "type": "string" + }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pulls/comments/:comment_id/reactions" + }, + "listForTeamDiscussion": { + "headers": { + "accept": "application/vnd.github.echo-preview+json,application/vnd.github.squirrel-girl-preview+json" + }, + "method": "GET", + "params": { + "content": { + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "type": "string" + }, + "discussion_number": { "required": true, "type": "integer" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions/:discussion_number/reactions" + }, + "listForTeamDiscussionComment": { + "headers": { + "accept": "application/vnd.github.echo-preview+json,application/vnd.github.squirrel-girl-preview+json" + }, + "method": "GET", + "params": { + "comment_number": { "required": true, "type": "integer" }, + "content": { + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "type": "string" + }, + "discussion_number": { "required": true, "type": "integer" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions" + } + }, + "repos": { + "acceptInvitation": { + "method": "PATCH", + "params": { "invitation_id": { "required": true, "type": "integer" } }, + "url": "/user/repository_invitations/:invitation_id" + }, + "addCollaborator": { + "method": "PUT", + "params": { + "owner": { "required": true, "type": "string" }, + "permission": { "enum": ["pull", "push", "admin"], "type": "string" }, + "repo": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/collaborators/:username" + }, + "addDeployKey": { + "method": "POST", + "params": { + "key": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "read_only": { "type": "boolean" }, + "repo": { "required": true, "type": "string" }, + "title": { "type": "string" } + }, + "url": "/repos/:owner/:repo/keys" + }, + "addProtectedBranchAdminEnforcement": { + "method": "POST", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/enforce_admins" + }, + "addProtectedBranchAppRestrictions": { + "method": "POST", + "params": { + "apps": { "mapTo": "data", "required": true, "type": "string[]" }, + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps" + }, + "addProtectedBranchRequiredSignatures": { + "headers": { "accept": "application/vnd.github.zzzax-preview+json" }, + "method": "POST", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/required_signatures" + }, + "addProtectedBranchRequiredStatusChecksContexts": { + "method": "POST", + "params": { + "branch": { "required": true, "type": "string" }, + "contexts": { "mapTo": "data", "required": true, "type": "string[]" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts" + }, + "addProtectedBranchTeamRestrictions": { + "method": "POST", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "teams": { "mapTo": "data", "required": true, "type": "string[]" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams" + }, + "addProtectedBranchUserRestrictions": { + "method": "POST", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "users": { "mapTo": "data", "required": true, "type": "string[]" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/users" + }, + "checkCollaborator": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/collaborators/:username" + }, + "checkVulnerabilityAlerts": { + "headers": { "accept": "application/vnd.github.dorian-preview+json" }, + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/vulnerability-alerts" + }, + "compareCommits": { + "method": "GET", + "params": { + "base": { "required": true, "type": "string" }, + "head": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/compare/:base...:head" + }, + "createCommitComment": { + "method": "POST", + "params": { + "body": { "required": true, "type": "string" }, + "commit_sha": { "required": true, "type": "string" }, + "line": { "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "path": { "type": "string" }, + "position": { "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "sha": { "alias": "commit_sha", "deprecated": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/commits/:commit_sha/comments" + }, + "createDeployment": { + "method": "POST", + "params": { + "auto_merge": { "type": "boolean" }, + "description": { "type": "string" }, + "environment": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "payload": { "type": "string" }, + "production_environment": { "type": "boolean" }, + "ref": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "required_contexts": { "type": "string[]" }, + "task": { "type": "string" }, + "transient_environment": { "type": "boolean" } + }, + "url": "/repos/:owner/:repo/deployments" + }, + "createDeploymentStatus": { + "method": "POST", + "params": { + "auto_inactive": { "type": "boolean" }, + "deployment_id": { "required": true, "type": "integer" }, + "description": { "type": "string" }, + "environment": { + "enum": ["production", "staging", "qa"], + "type": "string" + }, + "environment_url": { "type": "string" }, + "log_url": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "state": { + "enum": [ + "error", + "failure", + "inactive", + "in_progress", + "queued", + "pending", + "success" + ], + "required": true, + "type": "string" + }, + "target_url": { "type": "string" } + }, + "url": "/repos/:owner/:repo/deployments/:deployment_id/statuses" + }, + "createDispatchEvent": { + "headers": { "accept": "application/vnd.github.everest-preview+json" }, + "method": "POST", + "params": { + "client_payload": { "type": "object" }, + "event_type": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/dispatches" + }, + "createFile": { + "deprecated": "octokit.repos.createFile() has been renamed to octokit.repos.createOrUpdateFile() (2019-06-07)", + "method": "PUT", + "params": { + "author": { "type": "object" }, + "author.email": { "required": true, "type": "string" }, + "author.name": { "required": true, "type": "string" }, + "branch": { "type": "string" }, + "committer": { "type": "object" }, + "committer.email": { "required": true, "type": "string" }, + "committer.name": { "required": true, "type": "string" }, + "content": { "required": true, "type": "string" }, + "message": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "path": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "sha": { "type": "string" } + }, + "url": "/repos/:owner/:repo/contents/:path" + }, + "createForAuthenticatedUser": { + "method": "POST", + "params": { + "allow_merge_commit": { "type": "boolean" }, + "allow_rebase_merge": { "type": "boolean" }, + "allow_squash_merge": { "type": "boolean" }, + "auto_init": { "type": "boolean" }, + "description": { "type": "string" }, + "gitignore_template": { "type": "string" }, + "has_issues": { "type": "boolean" }, + "has_projects": { "type": "boolean" }, + "has_wiki": { "type": "boolean" }, + "homepage": { "type": "string" }, + "is_template": { "type": "boolean" }, + "license_template": { "type": "string" }, + "name": { "required": true, "type": "string" }, + "private": { "type": "boolean" }, + "team_id": { "type": "integer" } + }, + "url": "/user/repos" + }, + "createFork": { + "method": "POST", + "params": { + "organization": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/forks" + }, + "createHook": { + "method": "POST", + "params": { + "active": { "type": "boolean" }, + "config": { "required": true, "type": "object" }, + "config.content_type": { "type": "string" }, + "config.insecure_ssl": { "type": "string" }, + "config.secret": { "type": "string" }, + "config.url": { "required": true, "type": "string" }, + "events": { "type": "string[]" }, + "name": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/hooks" + }, + "createInOrg": { + "method": "POST", + "params": { + "allow_merge_commit": { "type": "boolean" }, + "allow_rebase_merge": { "type": "boolean" }, + "allow_squash_merge": { "type": "boolean" }, + "auto_init": { "type": "boolean" }, + "description": { "type": "string" }, + "gitignore_template": { "type": "string" }, + "has_issues": { "type": "boolean" }, + "has_projects": { "type": "boolean" }, + "has_wiki": { "type": "boolean" }, + "homepage": { "type": "string" }, + "is_template": { "type": "boolean" }, + "license_template": { "type": "string" }, + "name": { "required": true, "type": "string" }, + "org": { "required": true, "type": "string" }, + "private": { "type": "boolean" }, + "team_id": { "type": "integer" } + }, + "url": "/orgs/:org/repos" + }, + "createOrUpdateFile": { + "method": "PUT", + "params": { + "author": { "type": "object" }, + "author.email": { "required": true, "type": "string" }, + "author.name": { "required": true, "type": "string" }, + "branch": { "type": "string" }, + "committer": { "type": "object" }, + "committer.email": { "required": true, "type": "string" }, + "committer.name": { "required": true, "type": "string" }, + "content": { "required": true, "type": "string" }, + "message": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "path": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "sha": { "type": "string" } + }, + "url": "/repos/:owner/:repo/contents/:path" + }, + "createRelease": { + "method": "POST", + "params": { + "body": { "type": "string" }, + "draft": { "type": "boolean" }, + "name": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "prerelease": { "type": "boolean" }, + "repo": { "required": true, "type": "string" }, + "tag_name": { "required": true, "type": "string" }, + "target_commitish": { "type": "string" } + }, + "url": "/repos/:owner/:repo/releases" + }, + "createStatus": { + "method": "POST", + "params": { + "context": { "type": "string" }, + "description": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "sha": { "required": true, "type": "string" }, + "state": { + "enum": ["error", "failure", "pending", "success"], + "required": true, + "type": "string" + }, + "target_url": { "type": "string" } + }, + "url": "/repos/:owner/:repo/statuses/:sha" + }, + "createUsingTemplate": { + "headers": { "accept": "application/vnd.github.baptiste-preview+json" }, + "method": "POST", + "params": { + "description": { "type": "string" }, + "name": { "required": true, "type": "string" }, + "owner": { "type": "string" }, + "private": { "type": "boolean" }, + "template_owner": { "required": true, "type": "string" }, + "template_repo": { "required": true, "type": "string" } + }, + "url": "/repos/:template_owner/:template_repo/generate" + }, + "declineInvitation": { + "method": "DELETE", + "params": { "invitation_id": { "required": true, "type": "integer" } }, + "url": "/user/repository_invitations/:invitation_id" + }, + "delete": { + "method": "DELETE", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo" + }, + "deleteCommitComment": { + "method": "DELETE", + "params": { + "comment_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/comments/:comment_id" + }, + "deleteDownload": { + "method": "DELETE", + "params": { + "download_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/downloads/:download_id" + }, + "deleteFile": { + "method": "DELETE", + "params": { + "author": { "type": "object" }, + "author.email": { "type": "string" }, + "author.name": { "type": "string" }, + "branch": { "type": "string" }, + "committer": { "type": "object" }, + "committer.email": { "type": "string" }, + "committer.name": { "type": "string" }, + "message": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "path": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "sha": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/contents/:path" + }, + "deleteHook": { + "method": "DELETE", + "params": { + "hook_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/hooks/:hook_id" + }, + "deleteInvitation": { + "method": "DELETE", + "params": { + "invitation_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/invitations/:invitation_id" + }, + "deleteRelease": { + "method": "DELETE", + "params": { + "owner": { "required": true, "type": "string" }, + "release_id": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/releases/:release_id" + }, + "deleteReleaseAsset": { + "method": "DELETE", + "params": { + "asset_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/releases/assets/:asset_id" + }, + "disableAutomatedSecurityFixes": { + "headers": { "accept": "application/vnd.github.london-preview+json" }, + "method": "DELETE", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/automated-security-fixes" + }, + "disablePagesSite": { + "headers": { "accept": "application/vnd.github.switcheroo-preview+json" }, + "method": "DELETE", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pages" + }, + "disableVulnerabilityAlerts": { + "headers": { "accept": "application/vnd.github.dorian-preview+json" }, + "method": "DELETE", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/vulnerability-alerts" + }, + "enableAutomatedSecurityFixes": { + "headers": { "accept": "application/vnd.github.london-preview+json" }, + "method": "PUT", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/automated-security-fixes" + }, + "enablePagesSite": { + "headers": { "accept": "application/vnd.github.switcheroo-preview+json" }, + "method": "POST", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "source": { "type": "object" }, + "source.branch": { "enum": ["master", "gh-pages"], "type": "string" }, + "source.path": { "type": "string" } + }, + "url": "/repos/:owner/:repo/pages" + }, + "enableVulnerabilityAlerts": { + "headers": { "accept": "application/vnd.github.dorian-preview+json" }, + "method": "PUT", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/vulnerability-alerts" + }, + "get": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo" + }, + "getAppsWithAccessToProtectedBranch": { + "method": "GET", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps" + }, + "getArchiveLink": { + "method": "GET", + "params": { + "archive_format": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "ref": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/:archive_format/:ref" + }, + "getBranch": { + "method": "GET", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch" + }, + "getBranchProtection": { + "method": "GET", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection" + }, + "getClones": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "per": { "enum": ["day", "week"], "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/traffic/clones" + }, + "getCodeFrequencyStats": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/stats/code_frequency" + }, + "getCollaboratorPermissionLevel": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/collaborators/:username/permission" + }, + "getCombinedStatusForRef": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "ref": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/commits/:ref/status" + }, + "getCommit": { + "method": "GET", + "params": { + "commit_sha": { "alias": "ref", "deprecated": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "ref": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "sha": { "alias": "ref", "deprecated": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/commits/:ref" + }, + "getCommitActivityStats": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/stats/commit_activity" + }, + "getCommitComment": { + "method": "GET", + "params": { + "comment_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/comments/:comment_id" + }, + "getCommitRefSha": { + "deprecated": "octokit.repos.getCommitRefSha() is deprecated, see https://developer.github.com/v3/repos/commits/#get-a-single-commit", + "headers": { "accept": "application/vnd.github.v3.sha" }, + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "ref": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/commits/:ref" + }, + "getContents": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "path": { "required": true, "type": "string" }, + "ref": { "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/contents/:path" + }, + "getContributorsStats": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/stats/contributors" + }, + "getDeployKey": { + "method": "GET", + "params": { + "key_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/keys/:key_id" + }, + "getDeployment": { + "method": "GET", + "params": { + "deployment_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/deployments/:deployment_id" + }, + "getDeploymentStatus": { + "method": "GET", + "params": { + "deployment_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "status_id": { "required": true, "type": "integer" } + }, + "url": "/repos/:owner/:repo/deployments/:deployment_id/statuses/:status_id" + }, + "getDownload": { + "method": "GET", + "params": { + "download_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/downloads/:download_id" + }, + "getHook": { + "method": "GET", + "params": { + "hook_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/hooks/:hook_id" + }, + "getLatestPagesBuild": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pages/builds/latest" + }, + "getLatestRelease": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/releases/latest" + }, + "getPages": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pages" + }, + "getPagesBuild": { + "method": "GET", + "params": { + "build_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pages/builds/:build_id" + }, + "getParticipationStats": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/stats/participation" + }, + "getProtectedBranchAdminEnforcement": { + "method": "GET", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/enforce_admins" + }, + "getProtectedBranchPullRequestReviewEnforcement": { + "method": "GET", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews" + }, + "getProtectedBranchRequiredSignatures": { + "headers": { "accept": "application/vnd.github.zzzax-preview+json" }, + "method": "GET", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/required_signatures" + }, + "getProtectedBranchRequiredStatusChecks": { + "method": "GET", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/required_status_checks" + }, + "getProtectedBranchRestrictions": { + "method": "GET", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions" + }, + "getPunchCardStats": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/stats/punch_card" + }, + "getReadme": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "ref": { "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/readme" + }, + "getRelease": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "release_id": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/releases/:release_id" + }, + "getReleaseAsset": { + "method": "GET", + "params": { + "asset_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/releases/assets/:asset_id" + }, + "getReleaseByTag": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "tag": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/releases/tags/:tag" + }, + "getTeamsWithAccessToProtectedBranch": { + "method": "GET", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams" + }, + "getTopPaths": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/traffic/popular/paths" + }, + "getTopReferrers": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/traffic/popular/referrers" + }, + "getUsersWithAccessToProtectedBranch": { + "method": "GET", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/users" + }, + "getViews": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "per": { "enum": ["day", "week"], "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/traffic/views" + }, + "list": { + "method": "GET", + "params": { + "affiliation": { "type": "string" }, + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "sort": { + "enum": ["created", "updated", "pushed", "full_name"], + "type": "string" + }, + "type": { + "enum": ["all", "owner", "public", "private", "member"], + "type": "string" + }, + "visibility": { "enum": ["all", "public", "private"], "type": "string" } + }, + "url": "/user/repos" + }, + "listAppsWithAccessToProtectedBranch": { + "deprecated": "octokit.repos.listAppsWithAccessToProtectedBranch() has been renamed to octokit.repos.getAppsWithAccessToProtectedBranch() (2019-09-13)", + "method": "GET", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps" + }, + "listAssetsForRelease": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "release_id": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/releases/:release_id/assets" + }, + "listBranches": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "protected": { "type": "boolean" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches" + }, + "listBranchesForHeadCommit": { + "headers": { "accept": "application/vnd.github.groot-preview+json" }, + "method": "GET", + "params": { + "commit_sha": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/commits/:commit_sha/branches-where-head" + }, + "listCollaborators": { + "method": "GET", + "params": { + "affiliation": { + "enum": ["outside", "direct", "all"], + "type": "string" + }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/collaborators" + }, + "listCommentsForCommit": { + "method": "GET", + "params": { + "commit_sha": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "ref": { "alias": "commit_sha", "deprecated": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/commits/:commit_sha/comments" + }, + "listCommitComments": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/comments" + }, + "listCommits": { + "method": "GET", + "params": { + "author": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "path": { "type": "string" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "sha": { "type": "string" }, + "since": { "type": "string" }, + "until": { "type": "string" } + }, + "url": "/repos/:owner/:repo/commits" + }, + "listContributors": { + "method": "GET", + "params": { + "anon": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/contributors" + }, + "listDeployKeys": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/keys" + }, + "listDeploymentStatuses": { + "method": "GET", + "params": { + "deployment_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/deployments/:deployment_id/statuses" + }, + "listDeployments": { + "method": "GET", + "params": { + "environment": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "ref": { "type": "string" }, + "repo": { "required": true, "type": "string" }, + "sha": { "type": "string" }, + "task": { "type": "string" } + }, + "url": "/repos/:owner/:repo/deployments" + }, + "listDownloads": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/downloads" + }, + "listForOrg": { + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "sort": { + "enum": ["created", "updated", "pushed", "full_name"], + "type": "string" + }, + "type": { + "enum": ["all", "public", "private", "forks", "sources", "member"], + "type": "string" + } + }, + "url": "/orgs/:org/repos" + }, + "listForUser": { + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "sort": { + "enum": ["created", "updated", "pushed", "full_name"], + "type": "string" + }, + "type": { "enum": ["all", "owner", "member"], "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/repos" + }, + "listForks": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "sort": { "enum": ["newest", "oldest", "stargazers"], "type": "string" } + }, + "url": "/repos/:owner/:repo/forks" + }, + "listHooks": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/hooks" + }, + "listInvitations": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/invitations" + }, + "listInvitationsForAuthenticatedUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/user/repository_invitations" + }, + "listLanguages": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/languages" + }, + "listPagesBuilds": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pages/builds" + }, + "listProtectedBranchRequiredStatusChecksContexts": { + "method": "GET", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts" + }, + "listProtectedBranchTeamRestrictions": { + "deprecated": "octokit.repos.listProtectedBranchTeamRestrictions() has been renamed to octokit.repos.getTeamsWithAccessToProtectedBranch() (2019-09-09)", + "method": "GET", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams" + }, + "listProtectedBranchUserRestrictions": { + "deprecated": "octokit.repos.listProtectedBranchUserRestrictions() has been renamed to octokit.repos.getUsersWithAccessToProtectedBranch() (2019-09-09)", + "method": "GET", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/users" + }, + "listPublic": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "since": { "type": "string" } + }, + "url": "/repositories" + }, + "listPullRequestsAssociatedWithCommit": { + "headers": { "accept": "application/vnd.github.groot-preview+json" }, + "method": "GET", + "params": { + "commit_sha": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/commits/:commit_sha/pulls" + }, + "listReleases": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/releases" + }, + "listStatusesForRef": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "ref": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/commits/:ref/statuses" + }, + "listTags": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/tags" + }, + "listTeams": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/teams" + }, + "listTeamsWithAccessToProtectedBranch": { + "deprecated": "octokit.repos.listTeamsWithAccessToProtectedBranch() has been renamed to octokit.repos.getTeamsWithAccessToProtectedBranch() (2019-09-13)", + "method": "GET", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams" + }, + "listTopics": { + "headers": { "accept": "application/vnd.github.mercy-preview+json" }, + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/topics" + }, + "listUsersWithAccessToProtectedBranch": { + "deprecated": "octokit.repos.listUsersWithAccessToProtectedBranch() has been renamed to octokit.repos.getUsersWithAccessToProtectedBranch() (2019-09-13)", + "method": "GET", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/users" + }, + "merge": { + "method": "POST", + "params": { + "base": { "required": true, "type": "string" }, + "commit_message": { "type": "string" }, + "head": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/merges" + }, + "pingHook": { + "method": "POST", + "params": { + "hook_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/hooks/:hook_id/pings" + }, + "removeBranchProtection": { + "method": "DELETE", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection" + }, + "removeCollaborator": { + "method": "DELETE", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/collaborators/:username" + }, + "removeDeployKey": { + "method": "DELETE", + "params": { + "key_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/keys/:key_id" + }, + "removeProtectedBranchAdminEnforcement": { + "method": "DELETE", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/enforce_admins" + }, + "removeProtectedBranchAppRestrictions": { + "method": "DELETE", + "params": { + "apps": { "mapTo": "data", "required": true, "type": "string[]" }, + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps" + }, + "removeProtectedBranchPullRequestReviewEnforcement": { + "method": "DELETE", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews" + }, + "removeProtectedBranchRequiredSignatures": { + "headers": { "accept": "application/vnd.github.zzzax-preview+json" }, + "method": "DELETE", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/required_signatures" + }, + "removeProtectedBranchRequiredStatusChecks": { + "method": "DELETE", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/required_status_checks" + }, + "removeProtectedBranchRequiredStatusChecksContexts": { + "method": "DELETE", + "params": { + "branch": { "required": true, "type": "string" }, + "contexts": { "mapTo": "data", "required": true, "type": "string[]" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts" + }, + "removeProtectedBranchRestrictions": { + "method": "DELETE", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions" + }, + "removeProtectedBranchTeamRestrictions": { + "method": "DELETE", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "teams": { "mapTo": "data", "required": true, "type": "string[]" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams" + }, + "removeProtectedBranchUserRestrictions": { + "method": "DELETE", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "users": { "mapTo": "data", "required": true, "type": "string[]" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/users" + }, + "replaceProtectedBranchAppRestrictions": { + "method": "PUT", + "params": { + "apps": { "mapTo": "data", "required": true, "type": "string[]" }, + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps" + }, + "replaceProtectedBranchRequiredStatusChecksContexts": { + "method": "PUT", + "params": { + "branch": { "required": true, "type": "string" }, + "contexts": { "mapTo": "data", "required": true, "type": "string[]" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts" + }, + "replaceProtectedBranchTeamRestrictions": { + "method": "PUT", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "teams": { "mapTo": "data", "required": true, "type": "string[]" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams" + }, + "replaceProtectedBranchUserRestrictions": { + "method": "PUT", + "params": { + "branch": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "users": { "mapTo": "data", "required": true, "type": "string[]" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/users" + }, + "replaceTopics": { + "headers": { "accept": "application/vnd.github.mercy-preview+json" }, + "method": "PUT", + "params": { + "names": { "required": true, "type": "string[]" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/topics" + }, + "requestPageBuild": { + "method": "POST", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/pages/builds" + }, + "retrieveCommunityProfileMetrics": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/community/profile" + }, + "testPushHook": { + "method": "POST", + "params": { + "hook_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/hooks/:hook_id/tests" + }, + "transfer": { + "headers": { "accept": "application/vnd.github.nightshade-preview+json" }, + "method": "POST", + "params": { + "new_owner": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "team_ids": { "type": "integer[]" } + }, + "url": "/repos/:owner/:repo/transfer" + }, + "update": { + "method": "PATCH", + "params": { + "allow_merge_commit": { "type": "boolean" }, + "allow_rebase_merge": { "type": "boolean" }, + "allow_squash_merge": { "type": "boolean" }, + "archived": { "type": "boolean" }, + "default_branch": { "type": "string" }, + "description": { "type": "string" }, + "has_issues": { "type": "boolean" }, + "has_projects": { "type": "boolean" }, + "has_wiki": { "type": "boolean" }, + "homepage": { "type": "string" }, + "is_template": { "type": "boolean" }, + "name": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "private": { "type": "boolean" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo" + }, + "updateBranchProtection": { + "method": "PUT", + "params": { + "branch": { "required": true, "type": "string" }, + "enforce_admins": { + "allowNull": true, + "required": true, + "type": "boolean" + }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "required_pull_request_reviews": { + "allowNull": true, + "required": true, + "type": "object" + }, + "required_pull_request_reviews.dismiss_stale_reviews": { + "type": "boolean" + }, + "required_pull_request_reviews.dismissal_restrictions": { + "type": "object" + }, + "required_pull_request_reviews.dismissal_restrictions.teams": { + "type": "string[]" + }, + "required_pull_request_reviews.dismissal_restrictions.users": { + "type": "string[]" + }, + "required_pull_request_reviews.require_code_owner_reviews": { + "type": "boolean" + }, + "required_pull_request_reviews.required_approving_review_count": { + "type": "integer" + }, + "required_status_checks": { + "allowNull": true, + "required": true, + "type": "object" + }, + "required_status_checks.contexts": { + "required": true, + "type": "string[]" + }, + "required_status_checks.strict": { + "required": true, + "type": "boolean" + }, + "restrictions": { + "allowNull": true, + "required": true, + "type": "object" + }, + "restrictions.apps": { "type": "string[]" }, + "restrictions.teams": { "required": true, "type": "string[]" }, + "restrictions.users": { "required": true, "type": "string[]" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection" + }, + "updateCommitComment": { + "method": "PATCH", + "params": { + "body": { "required": true, "type": "string" }, + "comment_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/comments/:comment_id" + }, + "updateFile": { + "deprecated": "octokit.repos.updateFile() has been renamed to octokit.repos.createOrUpdateFile() (2019-06-07)", + "method": "PUT", + "params": { + "author": { "type": "object" }, + "author.email": { "required": true, "type": "string" }, + "author.name": { "required": true, "type": "string" }, + "branch": { "type": "string" }, + "committer": { "type": "object" }, + "committer.email": { "required": true, "type": "string" }, + "committer.name": { "required": true, "type": "string" }, + "content": { "required": true, "type": "string" }, + "message": { "required": true, "type": "string" }, + "owner": { "required": true, "type": "string" }, + "path": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "sha": { "type": "string" } + }, + "url": "/repos/:owner/:repo/contents/:path" + }, + "updateHook": { + "method": "PATCH", + "params": { + "active": { "type": "boolean" }, + "add_events": { "type": "string[]" }, + "config": { "type": "object" }, + "config.content_type": { "type": "string" }, + "config.insecure_ssl": { "type": "string" }, + "config.secret": { "type": "string" }, + "config.url": { "required": true, "type": "string" }, + "events": { "type": "string[]" }, + "hook_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "remove_events": { "type": "string[]" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/hooks/:hook_id" + }, + "updateInformationAboutPagesSite": { + "method": "PUT", + "params": { + "cname": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "source": { + "enum": ["\"gh-pages\"", "\"master\"", "\"master /docs\""], + "type": "string" + } + }, + "url": "/repos/:owner/:repo/pages" + }, + "updateInvitation": { + "method": "PATCH", + "params": { + "invitation_id": { "required": true, "type": "integer" }, + "owner": { "required": true, "type": "string" }, + "permissions": { "enum": ["read", "write", "admin"], "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/invitations/:invitation_id" + }, + "updateProtectedBranchPullRequestReviewEnforcement": { + "method": "PATCH", + "params": { + "branch": { "required": true, "type": "string" }, + "dismiss_stale_reviews": { "type": "boolean" }, + "dismissal_restrictions": { "type": "object" }, + "dismissal_restrictions.teams": { "type": "string[]" }, + "dismissal_restrictions.users": { "type": "string[]" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "require_code_owner_reviews": { "type": "boolean" }, + "required_approving_review_count": { "type": "integer" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews" + }, + "updateProtectedBranchRequiredStatusChecks": { + "method": "PATCH", + "params": { + "branch": { "required": true, "type": "string" }, + "contexts": { "type": "string[]" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "strict": { "type": "boolean" } + }, + "url": "/repos/:owner/:repo/branches/:branch/protection/required_status_checks" + }, + "updateRelease": { + "method": "PATCH", + "params": { + "body": { "type": "string" }, + "draft": { "type": "boolean" }, + "name": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "prerelease": { "type": "boolean" }, + "release_id": { "required": true, "type": "integer" }, + "repo": { "required": true, "type": "string" }, + "tag_name": { "type": "string" }, + "target_commitish": { "type": "string" } + }, + "url": "/repos/:owner/:repo/releases/:release_id" + }, + "updateReleaseAsset": { + "method": "PATCH", + "params": { + "asset_id": { "required": true, "type": "integer" }, + "label": { "type": "string" }, + "name": { "type": "string" }, + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" } + }, + "url": "/repos/:owner/:repo/releases/assets/:asset_id" + }, + "uploadReleaseAsset": { + "method": "POST", + "params": { + "file": { + "mapTo": "data", + "required": true, + "type": "string | object" + }, + "headers": { "required": true, "type": "object" }, + "headers.content-length": { "required": true, "type": "integer" }, + "headers.content-type": { "required": true, "type": "string" }, + "label": { "type": "string" }, + "name": { "required": true, "type": "string" }, + "url": { "required": true, "type": "string" } + }, + "url": ":url" + } + }, + "search": { + "code": { + "method": "GET", + "params": { + "order": { "enum": ["desc", "asc"], "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "q": { "required": true, "type": "string" }, + "sort": { "enum": ["indexed"], "type": "string" } + }, + "url": "/search/code" + }, + "commits": { + "headers": { "accept": "application/vnd.github.cloak-preview+json" }, + "method": "GET", + "params": { + "order": { "enum": ["desc", "asc"], "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "q": { "required": true, "type": "string" }, + "sort": { "enum": ["author-date", "committer-date"], "type": "string" } + }, + "url": "/search/commits" + }, + "issues": { + "deprecated": "octokit.search.issues() has been renamed to octokit.search.issuesAndPullRequests() (2018-12-27)", + "method": "GET", + "params": { + "order": { "enum": ["desc", "asc"], "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "q": { "required": true, "type": "string" }, + "sort": { + "enum": [ + "comments", + "reactions", + "reactions-+1", + "reactions--1", + "reactions-smile", + "reactions-thinking_face", + "reactions-heart", + "reactions-tada", + "interactions", + "created", + "updated" + ], + "type": "string" + } + }, + "url": "/search/issues" + }, + "issuesAndPullRequests": { + "method": "GET", + "params": { + "order": { "enum": ["desc", "asc"], "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "q": { "required": true, "type": "string" }, + "sort": { + "enum": [ + "comments", + "reactions", + "reactions-+1", + "reactions--1", + "reactions-smile", + "reactions-thinking_face", + "reactions-heart", + "reactions-tada", + "interactions", + "created", + "updated" + ], + "type": "string" + } + }, + "url": "/search/issues" + }, + "labels": { + "method": "GET", + "params": { + "order": { "enum": ["desc", "asc"], "type": "string" }, + "q": { "required": true, "type": "string" }, + "repository_id": { "required": true, "type": "integer" }, + "sort": { "enum": ["created", "updated"], "type": "string" } + }, + "url": "/search/labels" + }, + "repos": { + "method": "GET", + "params": { + "order": { "enum": ["desc", "asc"], "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "q": { "required": true, "type": "string" }, + "sort": { + "enum": ["stars", "forks", "help-wanted-issues", "updated"], + "type": "string" + } + }, + "url": "/search/repositories" + }, + "topics": { + "method": "GET", + "params": { "q": { "required": true, "type": "string" } }, + "url": "/search/topics" + }, + "users": { + "method": "GET", + "params": { + "order": { "enum": ["desc", "asc"], "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "q": { "required": true, "type": "string" }, + "sort": { + "enum": ["followers", "repositories", "joined"], + "type": "string" + } + }, + "url": "/search/users" + } + }, + "teams": { + "addMember": { + "deprecated": "octokit.teams.addMember() is deprecated, see https://developer.github.com/v3/teams/members/#add-team-member", + "method": "PUT", + "params": { + "team_id": { "required": true, "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/teams/:team_id/members/:username" + }, + "addOrUpdateMembership": { + "method": "PUT", + "params": { + "role": { "enum": ["member", "maintainer"], "type": "string" }, + "team_id": { "required": true, "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/teams/:team_id/memberships/:username" + }, + "addOrUpdateProject": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "PUT", + "params": { + "permission": { "enum": ["read", "write", "admin"], "type": "string" }, + "project_id": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/projects/:project_id" + }, + "addOrUpdateRepo": { + "method": "PUT", + "params": { + "owner": { "required": true, "type": "string" }, + "permission": { "enum": ["pull", "push", "admin"], "type": "string" }, + "repo": { "required": true, "type": "string" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/repos/:owner/:repo" + }, + "checkManagesRepo": { + "method": "GET", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/repos/:owner/:repo" + }, + "create": { + "method": "POST", + "params": { + "description": { "type": "string" }, + "maintainers": { "type": "string[]" }, + "name": { "required": true, "type": "string" }, + "org": { "required": true, "type": "string" }, + "parent_team_id": { "type": "integer" }, + "permission": { "enum": ["pull", "push", "admin"], "type": "string" }, + "privacy": { "enum": ["secret", "closed"], "type": "string" }, + "repo_names": { "type": "string[]" } + }, + "url": "/orgs/:org/teams" + }, + "createDiscussion": { + "headers": { "accept": "application/vnd.github.echo-preview+json" }, + "method": "POST", + "params": { + "body": { "required": true, "type": "string" }, + "private": { "type": "boolean" }, + "team_id": { "required": true, "type": "integer" }, + "title": { "required": true, "type": "string" } + }, + "url": "/teams/:team_id/discussions" + }, + "createDiscussionComment": { + "headers": { "accept": "application/vnd.github.echo-preview+json" }, + "method": "POST", + "params": { + "body": { "required": true, "type": "string" }, + "discussion_number": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions/:discussion_number/comments" + }, + "delete": { + "method": "DELETE", + "params": { "team_id": { "required": true, "type": "integer" } }, + "url": "/teams/:team_id" + }, + "deleteDiscussion": { + "headers": { "accept": "application/vnd.github.echo-preview+json" }, + "method": "DELETE", + "params": { + "discussion_number": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions/:discussion_number" + }, + "deleteDiscussionComment": { + "headers": { "accept": "application/vnd.github.echo-preview+json" }, + "method": "DELETE", + "params": { + "comment_number": { "required": true, "type": "integer" }, + "discussion_number": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions/:discussion_number/comments/:comment_number" + }, + "get": { + "method": "GET", + "params": { "team_id": { "required": true, "type": "integer" } }, + "url": "/teams/:team_id" + }, + "getByName": { + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "team_slug": { "required": true, "type": "string" } + }, + "url": "/orgs/:org/teams/:team_slug" + }, + "getDiscussion": { + "headers": { "accept": "application/vnd.github.echo-preview+json" }, + "method": "GET", + "params": { + "discussion_number": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions/:discussion_number" + }, + "getDiscussionComment": { + "headers": { "accept": "application/vnd.github.echo-preview+json" }, + "method": "GET", + "params": { + "comment_number": { "required": true, "type": "integer" }, + "discussion_number": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions/:discussion_number/comments/:comment_number" + }, + "getMember": { + "deprecated": "octokit.teams.getMember() is deprecated, see https://developer.github.com/v3/teams/members/#get-team-member", + "method": "GET", + "params": { + "team_id": { "required": true, "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/teams/:team_id/members/:username" + }, + "getMembership": { + "method": "GET", + "params": { + "team_id": { "required": true, "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/teams/:team_id/memberships/:username" + }, + "list": { + "method": "GET", + "params": { + "org": { "required": true, "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/orgs/:org/teams" + }, + "listChild": { + "headers": { "accept": "application/vnd.github.hellcat-preview+json" }, + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/teams" + }, + "listDiscussionComments": { + "headers": { "accept": "application/vnd.github.echo-preview+json" }, + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "discussion_number": { "required": true, "type": "integer" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions/:discussion_number/comments" + }, + "listDiscussions": { + "headers": { "accept": "application/vnd.github.echo-preview+json" }, + "method": "GET", + "params": { + "direction": { "enum": ["asc", "desc"], "type": "string" }, + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions" + }, + "listForAuthenticatedUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/user/teams" + }, + "listMembers": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "role": { "enum": ["member", "maintainer", "all"], "type": "string" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/members" + }, + "listPendingInvitations": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/invitations" + }, + "listProjects": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/projects" + }, + "listRepos": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/repos" + }, + "removeMember": { + "deprecated": "octokit.teams.removeMember() is deprecated, see https://developer.github.com/v3/teams/members/#remove-team-member", + "method": "DELETE", + "params": { + "team_id": { "required": true, "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/teams/:team_id/members/:username" + }, + "removeMembership": { + "method": "DELETE", + "params": { + "team_id": { "required": true, "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/teams/:team_id/memberships/:username" + }, + "removeProject": { + "method": "DELETE", + "params": { + "project_id": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/projects/:project_id" + }, + "removeRepo": { + "method": "DELETE", + "params": { + "owner": { "required": true, "type": "string" }, + "repo": { "required": true, "type": "string" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/repos/:owner/:repo" + }, + "reviewProject": { + "headers": { "accept": "application/vnd.github.inertia-preview+json" }, + "method": "GET", + "params": { + "project_id": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/projects/:project_id" + }, + "update": { + "method": "PATCH", + "params": { + "description": { "type": "string" }, + "name": { "required": true, "type": "string" }, + "parent_team_id": { "type": "integer" }, + "permission": { "enum": ["pull", "push", "admin"], "type": "string" }, + "privacy": { "enum": ["secret", "closed"], "type": "string" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id" + }, + "updateDiscussion": { + "headers": { "accept": "application/vnd.github.echo-preview+json" }, + "method": "PATCH", + "params": { + "body": { "type": "string" }, + "discussion_number": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" }, + "title": { "type": "string" } + }, + "url": "/teams/:team_id/discussions/:discussion_number" + }, + "updateDiscussionComment": { + "headers": { "accept": "application/vnd.github.echo-preview+json" }, + "method": "PATCH", + "params": { + "body": { "required": true, "type": "string" }, + "comment_number": { "required": true, "type": "integer" }, + "discussion_number": { "required": true, "type": "integer" }, + "team_id": { "required": true, "type": "integer" } + }, + "url": "/teams/:team_id/discussions/:discussion_number/comments/:comment_number" + } + }, + "users": { + "addEmails": { + "method": "POST", + "params": { "emails": { "required": true, "type": "string[]" } }, + "url": "/user/emails" + }, + "block": { + "method": "PUT", + "params": { "username": { "required": true, "type": "string" } }, + "url": "/user/blocks/:username" + }, + "checkBlocked": { + "method": "GET", + "params": { "username": { "required": true, "type": "string" } }, + "url": "/user/blocks/:username" + }, + "checkFollowing": { + "method": "GET", + "params": { "username": { "required": true, "type": "string" } }, + "url": "/user/following/:username" + }, + "checkFollowingForUser": { + "method": "GET", + "params": { + "target_user": { "required": true, "type": "string" }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/following/:target_user" + }, + "createGpgKey": { + "method": "POST", + "params": { "armored_public_key": { "type": "string" } }, + "url": "/user/gpg_keys" + }, + "createPublicKey": { + "method": "POST", + "params": { "key": { "type": "string" }, "title": { "type": "string" } }, + "url": "/user/keys" + }, + "deleteEmails": { + "method": "DELETE", + "params": { "emails": { "required": true, "type": "string[]" } }, + "url": "/user/emails" + }, + "deleteGpgKey": { + "method": "DELETE", + "params": { "gpg_key_id": { "required": true, "type": "integer" } }, + "url": "/user/gpg_keys/:gpg_key_id" + }, + "deletePublicKey": { + "method": "DELETE", + "params": { "key_id": { "required": true, "type": "integer" } }, + "url": "/user/keys/:key_id" + }, + "follow": { + "method": "PUT", + "params": { "username": { "required": true, "type": "string" } }, + "url": "/user/following/:username" + }, + "getAuthenticated": { "method": "GET", "params": {}, "url": "/user" }, + "getByUsername": { + "method": "GET", + "params": { "username": { "required": true, "type": "string" } }, + "url": "/users/:username" + }, + "getContextForUser": { + "headers": { "accept": "application/vnd.github.hagar-preview+json" }, + "method": "GET", + "params": { + "subject_id": { "type": "string" }, + "subject_type": { + "enum": ["organization", "repository", "issue", "pull_request"], + "type": "string" + }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/hovercard" + }, + "getGpgKey": { + "method": "GET", + "params": { "gpg_key_id": { "required": true, "type": "integer" } }, + "url": "/user/gpg_keys/:gpg_key_id" + }, + "getPublicKey": { + "method": "GET", + "params": { "key_id": { "required": true, "type": "integer" } }, + "url": "/user/keys/:key_id" + }, + "list": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "since": { "type": "string" } + }, + "url": "/users" + }, + "listBlocked": { "method": "GET", "params": {}, "url": "/user/blocks" }, + "listEmails": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/user/emails" + }, + "listFollowersForAuthenticatedUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/user/followers" + }, + "listFollowersForUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/followers" + }, + "listFollowingForAuthenticatedUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/user/following" + }, + "listFollowingForUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/following" + }, + "listGpgKeys": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/user/gpg_keys" + }, + "listGpgKeysForUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/gpg_keys" + }, + "listPublicEmails": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/user/public_emails" + }, + "listPublicKeys": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" } + }, + "url": "/user/keys" + }, + "listPublicKeysForUser": { + "method": "GET", + "params": { + "page": { "type": "integer" }, + "per_page": { "type": "integer" }, + "username": { "required": true, "type": "string" } + }, + "url": "/users/:username/keys" + }, + "togglePrimaryEmailVisibility": { + "method": "PATCH", + "params": { + "email": { "required": true, "type": "string" }, + "visibility": { "required": true, "type": "string" } + }, + "url": "/user/email/visibility" + }, + "unblock": { + "method": "DELETE", + "params": { "username": { "required": true, "type": "string" } }, + "url": "/user/blocks/:username" + }, + "unfollow": { + "method": "DELETE", + "params": { "username": { "required": true, "type": "string" } }, + "url": "/user/following/:username" + }, + "updateAuthenticated": { + "method": "PATCH", + "params": { + "bio": { "type": "string" }, + "blog": { "type": "string" }, + "company": { "type": "string" }, + "email": { "type": "string" }, + "hireable": { "type": "boolean" }, + "location": { "type": "string" }, + "name": { "type": "string" } + }, + "url": "/user" + } + } +} diff --git a/node_modules/@octokit/rest/plugins/validate/index.js b/node_modules/@octokit/rest/plugins/validate/index.js new file mode 100644 index 00000000..99547510 --- /dev/null +++ b/node_modules/@octokit/rest/plugins/validate/index.js @@ -0,0 +1,7 @@ +module.exports = octokitValidate; + +const validate = require("./validate"); + +function octokitValidate(octokit) { + octokit.hook.before("request", validate.bind(null, octokit)); +} diff --git a/node_modules/@octokit/rest/plugins/validate/validate.js b/node_modules/@octokit/rest/plugins/validate/validate.js new file mode 100644 index 00000000..00b30082 --- /dev/null +++ b/node_modules/@octokit/rest/plugins/validate/validate.js @@ -0,0 +1,151 @@ +"use strict"; + +module.exports = validate; + +const { RequestError } = require("@octokit/request-error"); +const get = require("lodash.get"); +const set = require("lodash.set"); + +function validate(octokit, options) { + if (!options.request.validate) { + return; + } + const { validate: params } = options.request; + + Object.keys(params).forEach(parameterName => { + const parameter = get(params, parameterName); + + const expectedType = parameter.type; + let parentParameterName; + let parentValue; + let parentParamIsPresent = true; + let parentParameterIsArray = false; + + if (/\./.test(parameterName)) { + parentParameterName = parameterName.replace(/\.[^.]+$/, ""); + parentParameterIsArray = parentParameterName.slice(-2) === "[]"; + if (parentParameterIsArray) { + parentParameterName = parentParameterName.slice(0, -2); + } + parentValue = get(options, parentParameterName); + parentParamIsPresent = + parentParameterName === "headers" || + (typeof parentValue === "object" && parentValue !== null); + } + + const values = parentParameterIsArray + ? (get(options, parentParameterName) || []).map( + value => value[parameterName.split(/\./).pop()] + ) + : [get(options, parameterName)]; + + values.forEach((value, i) => { + const valueIsPresent = typeof value !== "undefined"; + const valueIsNull = value === null; + const currentParameterName = parentParameterIsArray + ? parameterName.replace(/\[\]/, `[${i}]`) + : parameterName; + + if (!parameter.required && !valueIsPresent) { + return; + } + + // if the parent parameter is of type object but allows null + // then the child parameters can be ignored + if (!parentParamIsPresent) { + return; + } + + if (parameter.allowNull && valueIsNull) { + return; + } + + if (!parameter.allowNull && valueIsNull) { + throw new RequestError( + `'${currentParameterName}' cannot be null`, + 400, + { + request: options + } + ); + } + + if (parameter.required && !valueIsPresent) { + throw new RequestError( + `Empty value for parameter '${currentParameterName}': ${JSON.stringify( + value + )}`, + 400, + { + request: options + } + ); + } + + // parse to integer before checking for enum + // so that string "1" will match enum with number 1 + if (expectedType === "integer") { + const unparsedValue = value; + value = parseInt(value, 10); + if (isNaN(value)) { + throw new RequestError( + `Invalid value for parameter '${currentParameterName}': ${JSON.stringify( + unparsedValue + )} is NaN`, + 400, + { + request: options + } + ); + } + } + + if (parameter.enum && parameter.enum.indexOf(String(value)) === -1) { + throw new RequestError( + `Invalid value for parameter '${currentParameterName}': ${JSON.stringify( + value + )}`, + 400, + { + request: options + } + ); + } + + if (parameter.validation) { + const regex = new RegExp(parameter.validation); + if (!regex.test(value)) { + throw new RequestError( + `Invalid value for parameter '${currentParameterName}': ${JSON.stringify( + value + )}`, + 400, + { + request: options + } + ); + } + } + + if (expectedType === "object" && typeof value === "string") { + try { + value = JSON.parse(value); + } catch (exception) { + throw new RequestError( + `JSON parse error of value for parameter '${currentParameterName}': ${JSON.stringify( + value + )}`, + 400, + { + request: options + } + ); + } + } + + set(options, parameter.mapTo || currentParameterName, value); + }); + }); + + return options; +} diff --git a/node_modules/@octokit/types/.github/ISSUE_TEMPLATE/01_help.md b/node_modules/@octokit/types/.github/ISSUE_TEMPLATE/01_help.md new file mode 100644 index 00000000..b5185152 --- /dev/null +++ b/node_modules/@octokit/types/.github/ISSUE_TEMPLATE/01_help.md @@ -0,0 +1,5 @@ +--- +name: "🆘 Help" +about: "How does this even work 🤷‍♂️" +labels: support +--- diff --git a/node_modules/@octokit/types/.github/ISSUE_TEMPLATE/02_bug.md b/node_modules/@octokit/types/.github/ISSUE_TEMPLATE/02_bug.md new file mode 100644 index 00000000..d7e83250 --- /dev/null +++ b/node_modules/@octokit/types/.github/ISSUE_TEMPLATE/02_bug.md @@ -0,0 +1,19 @@ +--- +name: "🐛 Bug Report" +about: "If something isn't working as expected 🤔" +labels: bug +--- + + + +**What happened?** + + + +**What did you expect to happen?** + + + +**What the problem might be** + + diff --git a/node_modules/@octokit/types/.github/ISSUE_TEMPLATE/03_feature_request.md b/node_modules/@octokit/types/.github/ISSUE_TEMPLATE/03_feature_request.md new file mode 100644 index 00000000..89a54819 --- /dev/null +++ b/node_modules/@octokit/types/.github/ISSUE_TEMPLATE/03_feature_request.md @@ -0,0 +1,19 @@ +--- +name: "🧚‍♂️ Feature Request" +about: "Wouldn’t it be nice if 💭" +labels: feature +--- + + + +**What’s missing?** + + + +**Why?** + + + +**Alternatives you tried** + + diff --git a/node_modules/@octokit/types/.github/ISSUE_TEMPLATE/04_thanks.md b/node_modules/@octokit/types/.github/ISSUE_TEMPLATE/04_thanks.md new file mode 100644 index 00000000..c67ce83b --- /dev/null +++ b/node_modules/@octokit/types/.github/ISSUE_TEMPLATE/04_thanks.md @@ -0,0 +1,19 @@ +--- +name: "💝 Thank you" +about: "@octokit/types is awesome 🙌" +labels: thanks +--- + + + +**How do you use @octokit/types?** + + + +**What do you love about it?** + + + +**How did you learn about it?** + + diff --git a/node_modules/@octokit/types/.github/workflows/release.yml b/node_modules/@octokit/types/.github/workflows/release.yml new file mode 100644 index 00000000..e47f42cb --- /dev/null +++ b/node_modules/@octokit/types/.github/workflows/release.yml @@ -0,0 +1,25 @@ +name: Release +on: + push: + branches: + - master + +jobs: + release: + name: release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - uses: actions/setup-node@v1 + with: + node-version: "12.x" + - run: npm ci + - run: npx semantic-release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + - run: npm run docs + - uses: maxheld83/ghpages@master + env: + BUILD_DIR: docs/ + GH_PAT: ${{ secrets.OCTOKIT_PAT }} diff --git a/node_modules/@octokit/types/.github/workflows/routes-update.yml b/node_modules/@octokit/types/.github/workflows/routes-update.yml new file mode 100644 index 00000000..f1639d90 --- /dev/null +++ b/node_modules/@octokit/types/.github/workflows/routes-update.yml @@ -0,0 +1,37 @@ +name: octokit/routes update +on: + repository_dispatch: + types: [octokit-routes-release] + +jobs: + update_routes: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - uses: actions/setup-node@v1 + with: + node-version: "12.x" + # try checking out routes-update branch. Ignore error if it does not exist + - run: git checkout routes-update || true + - run: npm ci + - run: npm run update-endpoints + - name: Create Pull Request + uses: gr2m/create-or-update-pull-request-action@v1.x + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + title: "🚧 GitHub REST Endpoints changed" + body: | + See what changed at https://github.com/octokit/routes/releases/latest. + + Make sure to update the commits so that the merge results in helpful release notes, see [Merging the Pull Request & releasing a new version](https://github.com/octokit/rest.js/blob/master/CONTRIBUTING.md#merging-the-pull-request--releasing-a-new-version). + + In general + + - Avoid breaking changes at all costs + - If there are no typescript or code changes, use a `docs` prefix + - If there are typescript changes but no code changes, use `fix(typescript)` prefix + - If there are code changes, use `fix` if a problem was resolved, `feat` if new endpoints / parameters were added, and `feat(deprecation)` if a method was deprecated. + branch: "routes-update" + commit-message: "WIP octokit/routes updated" + author: "Octokit Bot <33075676+octokitbot@users.noreply.github.com>" diff --git a/node_modules/@octokit/types/.github/workflows/test.yml b/node_modules/@octokit/types/.github/workflows/test.yml new file mode 100644 index 00000000..702220fd --- /dev/null +++ b/node_modules/@octokit/types/.github/workflows/test.yml @@ -0,0 +1,19 @@ +name: Test +on: + push: + branches: + - master + - "greenkeeper/*" + pull_request: + types: [opened, synchronize] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - uses: actions/setup-node@v1 + with: + node-version: 12 + - run: npm ci + - run: npm test diff --git a/node_modules/@octokit/types/CODE_OF_CONDUCT.md b/node_modules/@octokit/types/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..8392e63e --- /dev/null +++ b/node_modules/@octokit/types/CODE_OF_CONDUCT.md @@ -0,0 +1,75 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +- The use of sexualized language or imagery and unwelcome sexual attention or + advances +- Trolling, insulting/derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or electronic + address, without explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at opensource+octokit@github.com. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at [https://contributor-covenant.org/version/1/4][version] + +[homepage]: https://contributor-covenant.org +[version]: https://contributor-covenant.org/version/1/4/ + diff --git a/node_modules/@octokit/types/CONTRIBUTING.md b/node_modules/@octokit/types/CONTRIBUTING.md new file mode 100644 index 00000000..6b275990 --- /dev/null +++ b/node_modules/@octokit/types/CONTRIBUTING.md @@ -0,0 +1,59 @@ +# How to contribute + +Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). +By participating in this project you agree to abide by its terms. + +## Creating an Issue + +Before you create a new Issue: + +1. Please make sure there is no [open issue](https://github.com/octokit/plugin-paginate-rest/issues?utf8=%E2%9C%93&q=is%3Aissue) yet. +2. If it is a bug report, include the steps to reproduce the issue and please create a reproducible test case on [runkit.com](https://runkit.com/). Example: https://runkit.com/gr2m/5aa034f1440b420012a6eebf +3. If it is a feature request, please share the motivation for the new feature, what alternatives you tried, and how you would implement it. +4. Please include links to the corresponding github documentation. + +## Setup the repository locally + +First, fork the repository. + +Setup the repository locally. Replace `` with the name of the account you forked to. + +```shell +git clone https://github.com//plugin-paginate-rest.js.git +cd plugin-paginate-rest.js +npm install +``` + +Run the tests before making changes to make sure the local setup is working as expected + +```shell +npm test +``` + +## Submitting the Pull Request + +- Create a new branch locally. +- Make your changes in that branch to your fork repository +- Submit a pull request from your topic branch to the master branch on the `octokit/plugin-paginate-rest.js` repository. +- Be sure to tag any issues your pull request is taking care of / contributing to. Adding "Closes #123" to a pull request description will automatically close the issue once the pull request is merged in. + +## Testing a pull request from github repo locally: + +You can install `@octokit/plugin-paginate-rest` from each pull request. Replace `[PULL REQUEST NUMBER]` + +Once you are done testing, you can revert back to the default module `@octokit/plugin-paginate-rest` from npm with `npm install @octokit/plugin-paginate-rest` + +## Merging the Pull Request & releasing a new version + +Releases are automated using [semantic-release](https://github.com/semantic-release/semantic-release). +The following commit message conventions determine which version is released: + +1. `fix: ...` or `fix(scope name): ...` prefix in subject: bumps fix version, e.g. `1.2.3` → `1.2.4` +2. `feat: ...` or `feat(scope name): ...` prefix in subject: bumps feature version, e.g. `1.2.3` → `1.3.0` +3. `BREAKING CHANGE:` in body: bumps breaking version, e.g. `1.2.3` → `2.0.0` + +Only one version number is bumped at a time, the highest version change trumps the others. +Besides publishing a new version to npm, semantic-release also creates a git tag and release +on GitHub, generates changelogs from the commit messages and puts them into the release notes. +s +If the pull request looks good but does not follow the commit conventions, use the Squash & merge button. diff --git a/node_modules/@octokit/types/LICENSE b/node_modules/@octokit/types/LICENSE new file mode 100644 index 00000000..57bee5f1 --- /dev/null +++ b/node_modules/@octokit/types/LICENSE @@ -0,0 +1,7 @@ +MIT License Copyright (c) 2019 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@octokit/types/README.md b/node_modules/@octokit/types/README.md new file mode 100644 index 00000000..482dae00 --- /dev/null +++ b/node_modules/@octokit/types/README.md @@ -0,0 +1,19 @@ +# types.ts + +> Shared TypeScript definitions for Octokit projects + +[![@latest](https://img.shields.io/npm/v/@octokit/types.svg)](https://www.npmjs.com/package/@octokit/types) +[![Build Status](https://github.com/octokit/types.ts/workflows/Test/badge.svg)](https://github.com/octokit/types.ts/actions?workflow=Test) +[![Greenkeeper](https://badges.greenkeeper.io/octokit/types.ts.svg)](https://greenkeeper.io/) + +## Usage + +See https://octokit.github.io/types.ts for all exported types + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/types/package.json b/node_modules/@octokit/types/package.json new file mode 100644 index 00000000..4caf6fbc --- /dev/null +++ b/node_modules/@octokit/types/package.json @@ -0,0 +1,103 @@ +{ + "_args": [ + [ + "@octokit/types@2.0.1", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "@octokit/types@2.0.1", + "_id": "@octokit/types@2.0.1", + "_inBundle": false, + "_integrity": "sha512-YDYgV6nCzdGdOm7wy43Ce8SQ3M5DMKegB8E5sTB/1xrxOdo2yS/KgUgML2N2ZGD621mkbdrAglwTyA4NDOlFFA==", + "_location": "/@octokit/types", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@octokit/types@2.0.1", + "name": "@octokit/types", + "escapedName": "@octokit%2ftypes", + "scope": "@octokit", + "rawSpec": "2.0.1", + "saveSpec": null, + "fetchSpec": "2.0.1" + }, + "_requiredBy": [ + "/@octokit/endpoint", + "/@octokit/request", + "/@octokit/request-error" + ], + "_resolved": "https://registry.npmjs.org/@octokit/types/-/types-2.0.1.tgz", + "_spec": "2.0.1", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "Gregor Martynus", + "url": "https://twitter.com/gr2m" + }, + "bugs": { + "url": "https://github.com/octokit/types.ts/issues" + }, + "dependencies": { + "@types/node": ">= 8" + }, + "description": "Shared TypeScript definitions for Octokit projects", + "devDependencies": { + "@octokit/graphql": "^4.2.2", + "handlebars": "^4.4.5", + "lodash.set": "^4.3.2", + "npm-run-all": "^4.1.5", + "pascal-case": "^2.0.1", + "prettier": "^1.18.2", + "semantic-release": "^15.13.24", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "sort-keys": "^4.0.0", + "string-to-jsdoc-comment": "^1.0.0", + "typedoc": "^0.15.0", + "typescript": "^3.6.4" + }, + "homepage": "https://github.com/octokit/types.ts#readme", + "keywords": [ + "github", + "api", + "sdk", + "toolkit", + "typescript" + ], + "license": "MIT", + "main": "src/index.ts", + "name": "@octokit/types", + "publishConfig": { + "access": "public" + }, + "release": { + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + "@semantic-release/github", + "@semantic-release/npm", + [ + "semantic-release-plugin-update-version-in-files", + { + "files": [ + "src/VERSION.ts" + ] + } + ] + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/octokit/types.ts.git" + }, + "scripts": { + "docs": "typedoc --module commonjs --readme none --out docs src/", + "lint": "prettier --check '{src,test}/**/*' README.md package.json !src/generated/*", + "lint:fix": "prettier --write '{src,test}/**/*' README.md package.json !src/generated/*", + "pretest": "npm run -s lint", + "test": "tsc --noEmit --declaration src/index.ts", + "update-endpoints": "npm-run-all update-endpoints:*", + "update-endpoints:fetch-json": "node scripts/update-endpoints/fetch-json", + "update-endpoints:typescript": "node scripts/update-endpoints/typescript" + }, + "version": "2.0.1" +} diff --git a/node_modules/@octokit/types/scripts/update-endpoints/fetch-json.js b/node_modules/@octokit/types/scripts/update-endpoints/fetch-json.js new file mode 100644 index 00000000..6bca9300 --- /dev/null +++ b/node_modules/@octokit/types/scripts/update-endpoints/fetch-json.js @@ -0,0 +1,41 @@ +const { writeFileSync } = require("fs"); +const path = require("path"); + +const { graphql } = require("@octokit/graphql"); +const prettier = require("prettier"); + +const QUERY = ` + { + endpoints { + name + scope(format: CAMELCASE) + id(format: CAMELCASE) + method + url + parameters { + alias + allowNull + deprecated + description + enum + name + type + required + } + } + }`; + +main(); + +async function main() { + const { endpoints } = await graphql(QUERY, { + url: "https://octokit-routes-graphql-server.now.sh/" + }); + + writeFileSync( + path.resolve(__dirname, "generated", "endpoints.json"), + prettier.format(JSON.stringify(endpoints), { + parser: "json" + }) + ); +} diff --git a/node_modules/@octokit/types/scripts/update-endpoints/generated/README.md b/node_modules/@octokit/types/scripts/update-endpoints/generated/README.md new file mode 100644 index 00000000..6beaf58e --- /dev/null +++ b/node_modules/@octokit/types/scripts/update-endpoints/generated/README.md @@ -0,0 +1,3 @@ +# DO NOT EDIT FILES IN THIS DIRECTORY + +All files are generated automatically and will be overwritten next time [octokit/routes](https://github.com/octokit/routes/) has a new release. If you find a problem, please file an issue. diff --git a/node_modules/@octokit/types/scripts/update-endpoints/generated/endpoints.json b/node_modules/@octokit/types/scripts/update-endpoints/generated/endpoints.json new file mode 100644 index 00000000..6c3d62a3 --- /dev/null +++ b/node_modules/@octokit/types/scripts/update-endpoints/generated/endpoints.json @@ -0,0 +1,25258 @@ +[ + { + "name": "Get the authenticated GitHub App", + "scope": "apps", + "id": "getAuthenticated", + "method": "GET", + "url": "/app", + "parameters": [] + }, + { + "name": "Create a GitHub App from a manifest", + "scope": "apps", + "id": "createFromManifest", + "method": "POST", + "url": "/app-manifests/{code}/conversions", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "code parameter", + "enum": null, + "name": "code", + "type": "string", + "required": true + } + ] + }, + { + "name": "List installations", + "scope": "apps", + "id": "listInstallations", + "method": "GET", + "url": "/app/installations", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Get an installation", + "scope": "apps", + "id": "getInstallation", + "method": "GET", + "url": "/app/installations/{installation_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "installation_id parameter", + "enum": null, + "name": "installation_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Delete an installation", + "scope": "apps", + "id": "deleteInstallation", + "method": "DELETE", + "url": "/app/installations/{installation_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "installation_id parameter", + "enum": null, + "name": "installation_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Create a new installation token", + "scope": "apps", + "id": "createInstallationToken", + "method": "POST", + "url": "/app/installations/{installation_id}/access_tokens", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "installation_id parameter", + "enum": null, + "name": "installation_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The `id`s of the repositories that the installation token can access. Providing repository `id`s restricts the access of an installation token to specific repositories. You can use the \"[List repositories](https://developer.github.com/v3/apps/installations/#list-repositories)\" endpoint to get the `id` of all repositories that an installation can access. For example, you can select specific repositories when creating an installation token to restrict the number of repositories that can be cloned using the token.", + "enum": null, + "name": "repository_ids", + "type": "integer[]", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The permissions granted to the access token. The permissions object includes the permission names and their access type. For a complete list of permissions and allowable values, see \"[GitHub App permissions](https://developer.github.com/apps/building-github-apps/creating-github-apps-using-url-parameters/#github-app-permissions).\"", + "enum": null, + "name": "permissions", + "type": "object", + "required": false + } + ] + }, + { + "name": "List your grants", + "scope": "oauthAuthorizations", + "id": "listGrants", + "method": "GET", + "url": "/applications/grants", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Get a single grant", + "scope": "oauthAuthorizations", + "id": "getGrant", + "method": "GET", + "url": "/applications/grants/{grant_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "grant_id parameter", + "enum": null, + "name": "grant_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Delete a grant", + "scope": "oauthAuthorizations", + "id": "deleteGrant", + "method": "DELETE", + "url": "/applications/grants/{grant_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "grant_id parameter", + "enum": null, + "name": "grant_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Revoke a grant for an application", + "scope": "oauthAuthorizations", + "id": "revokeGrantForApplication", + "method": "DELETE", + "url": "/applications/{client_id}/grants/{access_token}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "client_id parameter", + "enum": null, + "name": "client_id", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "access_token parameter", + "enum": null, + "name": "access_token", + "type": "string", + "required": true + } + ] + }, + { + "name": "Check an authorization", + "scope": "oauthAuthorizations", + "id": "checkAuthorization", + "method": "GET", + "url": "/applications/{client_id}/tokens/{access_token}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "client_id parameter", + "enum": null, + "name": "client_id", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "access_token parameter", + "enum": null, + "name": "access_token", + "type": "string", + "required": true + } + ] + }, + { + "name": "Reset an authorization", + "scope": "oauthAuthorizations", + "id": "resetAuthorization", + "method": "POST", + "url": "/applications/{client_id}/tokens/{access_token}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "client_id parameter", + "enum": null, + "name": "client_id", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "access_token parameter", + "enum": null, + "name": "access_token", + "type": "string", + "required": true + } + ] + }, + { + "name": "Revoke an authorization for an application", + "scope": "oauthAuthorizations", + "id": "revokeAuthorizationForApplication", + "method": "DELETE", + "url": "/applications/{client_id}/tokens/{access_token}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "client_id parameter", + "enum": null, + "name": "client_id", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "access_token parameter", + "enum": null, + "name": "access_token", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get a single GitHub App", + "scope": "apps", + "id": "getBySlug", + "method": "GET", + "url": "/apps/{app_slug}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "app_slug parameter", + "enum": null, + "name": "app_slug", + "type": "string", + "required": true + } + ] + }, + { + "name": "List your authorizations", + "scope": "oauthAuthorizations", + "id": "listAuthorizations", + "method": "GET", + "url": "/authorizations", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Create a new authorization", + "scope": "oauthAuthorizations", + "id": "createAuthorization", + "method": "POST", + "url": "/authorizations", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A list of scopes that this authorization is in.", + "enum": null, + "name": "scopes", + "type": "string[]", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A note to remind you what the OAuth token is for. Tokens not associated with a specific OAuth application (i.e. personal access tokens) must have a unique note.", + "enum": null, + "name": "note", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A URL to remind you what app the OAuth token is for.", + "enum": null, + "name": "note_url", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The 20 character OAuth app client key for which to create the token.", + "enum": null, + "name": "client_id", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The 40 character OAuth app client secret for which to create the token.", + "enum": null, + "name": "client_secret", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A unique string to distinguish an authorization from others created for the same client ID and user.", + "enum": null, + "name": "fingerprint", + "type": "string", + "required": false + } + ] + }, + { + "name": "Get-or-create an authorization for a specific app", + "scope": "oauthAuthorizations", + "id": "getOrCreateAuthorizationForApp", + "method": "PUT", + "url": "/authorizations/clients/{client_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "client_id parameter", + "enum": null, + "name": "client_id", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The 40 character OAuth app client secret associated with the client ID specified in the URL.", + "enum": null, + "name": "client_secret", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A list of scopes that this authorization is in.", + "enum": null, + "name": "scopes", + "type": "string[]", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A note to remind you what the OAuth token is for.", + "enum": null, + "name": "note", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A URL to remind you what app the OAuth token is for.", + "enum": null, + "name": "note_url", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A unique string to distinguish an authorization from others created for the same client and user. If provided, this API is functionally equivalent to [Get-or-create an authorization for a specific app and fingerprint](https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app-and-fingerprint).", + "enum": null, + "name": "fingerprint", + "type": "string", + "required": false + } + ] + }, + { + "name": "Get-or-create an authorization for a specific app and fingerprint", + "scope": "oauthAuthorizations", + "id": "getOrCreateAuthorizationForAppAndFingerprint", + "method": "PUT", + "url": "/authorizations/clients/{client_id}/{fingerprint}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "client_id parameter", + "enum": null, + "name": "client_id", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "fingerprint parameter", + "enum": null, + "name": "fingerprint", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The 40 character OAuth app client secret associated with the client ID specified in the URL.", + "enum": null, + "name": "client_secret", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A list of scopes that this authorization is in.", + "enum": null, + "name": "scopes", + "type": "string[]", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A note to remind you what the OAuth token is for.", + "enum": null, + "name": "note", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A URL to remind you what app the OAuth token is for.", + "enum": null, + "name": "note_url", + "type": "string", + "required": false + } + ] + }, + { + "name": "Get-or-create an authorization for a specific app and fingerprint", + "scope": "oauthAuthorizations", + "id": "getOrCreateAuthorizationForAppFingerprint", + "method": "PUT", + "url": "/authorizations/clients/{client_id}/{fingerprint}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "client_id parameter", + "enum": null, + "name": "client_id", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "fingerprint parameter", + "enum": null, + "name": "fingerprint", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The 40 character OAuth app client secret associated with the client ID specified in the URL.", + "enum": null, + "name": "client_secret", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A list of scopes that this authorization is in.", + "enum": null, + "name": "scopes", + "type": "string[]", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A note to remind you what the OAuth token is for.", + "enum": null, + "name": "note", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A URL to remind you what app the OAuth token is for.", + "enum": null, + "name": "note_url", + "type": "string", + "required": false + } + ] + }, + { + "name": "Get a single authorization", + "scope": "oauthAuthorizations", + "id": "getAuthorization", + "method": "GET", + "url": "/authorizations/{authorization_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "authorization_id parameter", + "enum": null, + "name": "authorization_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Update an existing authorization", + "scope": "oauthAuthorizations", + "id": "updateAuthorization", + "method": "PATCH", + "url": "/authorizations/{authorization_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "authorization_id parameter", + "enum": null, + "name": "authorization_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Replaces the authorization scopes with these.", + "enum": null, + "name": "scopes", + "type": "string[]", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A list of scopes to add to this authorization.", + "enum": null, + "name": "add_scopes", + "type": "string[]", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A list of scopes to remove from this authorization.", + "enum": null, + "name": "remove_scopes", + "type": "string[]", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A note to remind you what the OAuth token is for. Tokens not associated with a specific OAuth application (i.e. personal access tokens) must have a unique note.", + "enum": null, + "name": "note", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A URL to remind you what app the OAuth token is for.", + "enum": null, + "name": "note_url", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A unique string to distinguish an authorization from others created for the same client ID and user.", + "enum": null, + "name": "fingerprint", + "type": "string", + "required": false + } + ] + }, + { + "name": "Delete an authorization", + "scope": "oauthAuthorizations", + "id": "deleteAuthorization", + "method": "DELETE", + "url": "/authorizations/{authorization_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "authorization_id parameter", + "enum": null, + "name": "authorization_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "List all codes of conduct", + "scope": "codesOfConduct", + "id": "listConductCodes", + "method": "GET", + "url": "/codes_of_conduct", + "parameters": [] + }, + { + "name": "Get an individual code of conduct", + "scope": "codesOfConduct", + "id": "getConductCode", + "method": "GET", + "url": "/codes_of_conduct/{key}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "key parameter", + "enum": null, + "name": "key", + "type": "string", + "required": true + } + ] + }, + { + "name": "Create a content attachment", + "scope": "apps", + "id": "createContentAttachment", + "method": "POST", + "url": "/content_references/{content_reference_id}/attachments", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "content_reference_id parameter", + "enum": null, + "name": "content_reference_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The title of the content attachment displayed in the body or comment of an issue or pull request.", + "enum": null, + "name": "title", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The body text of the content attachment displayed in the body or comment of an issue or pull request. This parameter supports markdown.", + "enum": null, + "name": "body", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get", + "scope": "emojis", + "id": "get", + "method": "GET", + "url": "/emojis", + "parameters": [] + }, + { + "name": "List public events", + "scope": "activity", + "id": "listPublicEvents", + "method": "GET", + "url": "/events", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List feeds", + "scope": "activity", + "id": "listFeeds", + "method": "GET", + "url": "/feeds", + "parameters": [] + }, + { + "name": "List the authenticated user's gists or if called anonymously, this will return all public gists", + "scope": "gists", + "id": "list", + "method": "GET", + "url": "/gists", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned.", + "enum": null, + "name": "since", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Create a gist", + "scope": "gists", + "id": "create", + "method": "POST", + "url": "/gists", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The filenames and content of each file in the gist. The keys in the `files` object represent the filename and have the type `string`.", + "enum": null, + "name": "files", + "type": "object", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The content of the file.", + "enum": null, + "name": "files.content", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A descriptive name for this gist.", + "enum": null, + "name": "description", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "When `true`, the gist will be public and available for anyone to see.", + "enum": null, + "name": "public", + "type": "boolean", + "required": false + } + ] + }, + { + "name": "List all public gists", + "scope": "gists", + "id": "listPublic", + "method": "GET", + "url": "/gists/public", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned.", + "enum": null, + "name": "since", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List starred gists", + "scope": "gists", + "id": "listStarred", + "method": "GET", + "url": "/gists/starred", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned.", + "enum": null, + "name": "since", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Get a single gist", + "scope": "gists", + "id": "get", + "method": "GET", + "url": "/gists/{gist_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "gist_id parameter", + "enum": null, + "name": "gist_id", + "type": "string", + "required": true + } + ] + }, + { + "name": "Edit a gist", + "scope": "gists", + "id": "update", + "method": "PATCH", + "url": "/gists/{gist_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "gist_id parameter", + "enum": null, + "name": "gist_id", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A descriptive name for this gist.", + "enum": null, + "name": "description", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The filenames and content that make up this gist.", + "enum": null, + "name": "files", + "type": "object", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The updated content of the file.", + "enum": null, + "name": "files.content", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The new name for this file. To delete a file, set the value of the filename to `null`.", + "enum": null, + "name": "files.filename", + "type": "string", + "required": false + } + ] + }, + { + "name": "Delete a gist", + "scope": "gists", + "id": "delete", + "method": "DELETE", + "url": "/gists/{gist_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "gist_id parameter", + "enum": null, + "name": "gist_id", + "type": "string", + "required": true + } + ] + }, + { + "name": "List comments on a gist", + "scope": "gists", + "id": "listComments", + "method": "GET", + "url": "/gists/{gist_id}/comments", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "gist_id parameter", + "enum": null, + "name": "gist_id", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Create a comment", + "scope": "gists", + "id": "createComment", + "method": "POST", + "url": "/gists/{gist_id}/comments", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "gist_id parameter", + "enum": null, + "name": "gist_id", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The comment text.", + "enum": null, + "name": "body", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get a single comment", + "scope": "gists", + "id": "getComment", + "method": "GET", + "url": "/gists/{gist_id}/comments/{comment_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "gist_id parameter", + "enum": null, + "name": "gist_id", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "comment_id parameter", + "enum": null, + "name": "comment_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Edit a comment", + "scope": "gists", + "id": "updateComment", + "method": "PATCH", + "url": "/gists/{gist_id}/comments/{comment_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "gist_id parameter", + "enum": null, + "name": "gist_id", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "comment_id parameter", + "enum": null, + "name": "comment_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The comment text.", + "enum": null, + "name": "body", + "type": "string", + "required": true + } + ] + }, + { + "name": "Delete a comment", + "scope": "gists", + "id": "deleteComment", + "method": "DELETE", + "url": "/gists/{gist_id}/comments/{comment_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "gist_id parameter", + "enum": null, + "name": "gist_id", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "comment_id parameter", + "enum": null, + "name": "comment_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "List gist commits", + "scope": "gists", + "id": "listCommits", + "method": "GET", + "url": "/gists/{gist_id}/commits", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "gist_id parameter", + "enum": null, + "name": "gist_id", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Fork a gist", + "scope": "gists", + "id": "fork", + "method": "POST", + "url": "/gists/{gist_id}/forks", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "gist_id parameter", + "enum": null, + "name": "gist_id", + "type": "string", + "required": true + } + ] + }, + { + "name": "List gist forks", + "scope": "gists", + "id": "listForks", + "method": "GET", + "url": "/gists/{gist_id}/forks", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "gist_id parameter", + "enum": null, + "name": "gist_id", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Star a gist", + "scope": "gists", + "id": "star", + "method": "PUT", + "url": "/gists/{gist_id}/star", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "gist_id parameter", + "enum": null, + "name": "gist_id", + "type": "string", + "required": true + } + ] + }, + { + "name": "Unstar a gist", + "scope": "gists", + "id": "unstar", + "method": "DELETE", + "url": "/gists/{gist_id}/star", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "gist_id parameter", + "enum": null, + "name": "gist_id", + "type": "string", + "required": true + } + ] + }, + { + "name": "Check if a gist is starred", + "scope": "gists", + "id": "checkIsStarred", + "method": "GET", + "url": "/gists/{gist_id}/star", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "gist_id parameter", + "enum": null, + "name": "gist_id", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get a specific revision of a gist", + "scope": "gists", + "id": "getRevision", + "method": "GET", + "url": "/gists/{gist_id}/{sha}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "gist_id parameter", + "enum": null, + "name": "gist_id", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "sha parameter", + "enum": null, + "name": "sha", + "type": "string", + "required": true + } + ] + }, + { + "name": "Listing available templates", + "scope": "gitignore", + "id": "listTemplates", + "method": "GET", + "url": "/gitignore/templates", + "parameters": [] + }, + { + "name": "Get a single template", + "scope": "gitignore", + "id": "getTemplate", + "method": "GET", + "url": "/gitignore/templates/{name}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "name parameter", + "enum": null, + "name": "name", + "type": "string", + "required": true + } + ] + }, + { + "name": "List repositories", + "scope": "apps", + "id": "listRepos", + "method": "GET", + "url": "/installation/repositories", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List all issues assigned to the authenticated user across all visible repositories including owned repositories, member repositories, and organization repositories", + "scope": "issues", + "id": "list", + "method": "GET", + "url": "/issues", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Indicates which sorts of issues to return. Can be one of: \n\\* `assigned`: Issues assigned to you \n\\* `created`: Issues created by you \n\\* `mentioned`: Issues mentioning you \n\\* `subscribed`: Issues you're subscribed to updates for \n\\* `all`: All issues the authenticated user can see, regardless of participation or creation", + "enum": ["assigned", "created", "mentioned", "subscribed", "all"], + "name": "filter", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`.", + "enum": ["open", "closed", "all"], + "name": "state", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A list of comma separated label names. Example: `bug,ui,@high`", + "enum": null, + "name": "labels", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "What to sort results by. Can be either `created`, `updated`, `comments`.", + "enum": ["created", "updated", "comments"], + "name": "sort", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The direction of the sort. Can be either `asc` or `desc`.", + "enum": ["asc", "desc"], + "name": "direction", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", + "enum": null, + "name": "since", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Search issues", + "scope": "search", + "id": "issuesLegacy", + "method": "GET", + "url": "/legacy/issues/search/{owner}/{repository}/{state}/{keyword}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repository parameter", + "enum": null, + "name": "repository", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Indicates the state of the issues to return. Can be either `open` or `closed`.", + "enum": ["open", "closed"], + "name": "state", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The search term.", + "enum": null, + "name": "keyword", + "type": "string", + "required": true + } + ] + }, + { + "name": "Search repositories", + "scope": "search", + "id": "reposLegacy", + "method": "GET", + "url": "/legacy/repos/search/{keyword}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The search term.", + "enum": null, + "name": "keyword", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Filter results by language.", + "enum": null, + "name": "language", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The page number to fetch.", + "enum": null, + "name": "start_page", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The sort field. One of `stars`, `forks`, or `updated`. Default: results are sorted by best match.", + "enum": ["stars", "forks", "updated"], + "name": "sort", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The sort field. if `sort` param is provided. Can be either `asc` or `desc`.", + "enum": ["asc", "desc"], + "name": "order", + "type": "string", + "required": false + } + ] + }, + { + "name": "Email search", + "scope": "search", + "id": "emailLegacy", + "method": "GET", + "url": "/legacy/user/email/{email}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The email address.", + "enum": null, + "name": "email", + "type": "string", + "required": true + } + ] + }, + { + "name": "Search users", + "scope": "search", + "id": "usersLegacy", + "method": "GET", + "url": "/legacy/user/search/{keyword}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The search term.", + "enum": null, + "name": "keyword", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The page number to fetch.", + "enum": null, + "name": "start_page", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The sort field. One of `stars`, `forks`, or `updated`. Default: results are sorted by best match.", + "enum": ["stars", "forks", "updated"], + "name": "sort", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The sort field. if `sort` param is provided. Can be either `asc` or `desc`.", + "enum": ["asc", "desc"], + "name": "order", + "type": "string", + "required": false + } + ] + }, + { + "name": "List commonly used licenses", + "scope": "licenses", + "id": "listCommonlyUsed", + "method": "GET", + "url": "/licenses", + "parameters": [] + }, + { + "name": "List commonly used licenses", + "scope": "licenses", + "id": "list", + "method": "GET", + "url": "/licenses", + "parameters": [] + }, + { + "name": "Get an individual license", + "scope": "licenses", + "id": "get", + "method": "GET", + "url": "/licenses/{license}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "license parameter", + "enum": null, + "name": "license", + "type": "string", + "required": true + } + ] + }, + { + "name": "Render an arbitrary Markdown document", + "scope": "markdown", + "id": "render", + "method": "POST", + "url": "/markdown", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The Markdown text to render in HTML. Markdown content must be 400 KB or less.", + "enum": null, + "name": "text", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The rendering mode. Can be either: \n\\* `markdown` to render a document in plain Markdown, just like README.md files are rendered. \n\\* `gfm` to render a document in [GitHub Flavored Markdown](https://github.github.com/gfm/), which creates links for user mentions as well as references to SHA-1 hashes, issues, and pull requests.", + "enum": ["markdown", "gfm"], + "name": "mode", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The repository context to use when creating references in `gfm` mode. Omit this parameter when using `markdown` mode.", + "enum": null, + "name": "context", + "type": "string", + "required": false + } + ] + }, + { + "name": "Render a Markdown document in raw mode", + "scope": "markdown", + "id": "renderRaw", + "method": "POST", + "url": "/markdown/raw", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "data parameter", + "enum": null, + "name": "data", + "type": "string", + "required": true + } + ] + }, + { + "name": "Check if a GitHub account is associated with any Marketplace listing", + "scope": "apps", + "id": "checkAccountIsAssociatedWithAny", + "method": "GET", + "url": "/marketplace_listing/accounts/{account_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "account_id parameter", + "enum": null, + "name": "account_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List all plans for your Marketplace listing", + "scope": "apps", + "id": "listPlans", + "method": "GET", + "url": "/marketplace_listing/plans", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List all GitHub accounts (user or organization) on a specific plan", + "scope": "apps", + "id": "listAccountsUserOrOrgOnPlan", + "method": "GET", + "url": "/marketplace_listing/plans/{plan_id}/accounts", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "plan_id parameter", + "enum": null, + "name": "plan_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Sorts the GitHub accounts by the date they were created or last updated. Can be one of `created` or `updated`.", + "enum": ["created", "updated"], + "name": "sort", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "To return the oldest accounts first, set to `asc`. Can be one of `asc` or `desc`. Ignored without the `sort` parameter.", + "enum": ["asc", "desc"], + "name": "direction", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Check if a GitHub account is associated with any Marketplace listing (stubbed)", + "scope": "apps", + "id": "checkAccountIsAssociatedWithAnyStubbed", + "method": "GET", + "url": "/marketplace_listing/stubbed/accounts/{account_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "account_id parameter", + "enum": null, + "name": "account_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List all plans for your Marketplace listing (stubbed)", + "scope": "apps", + "id": "listPlansStubbed", + "method": "GET", + "url": "/marketplace_listing/stubbed/plans", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List all GitHub accounts (user or organization) on a specific plan (stubbed)", + "scope": "apps", + "id": "listAccountsUserOrOrgOnPlanStubbed", + "method": "GET", + "url": "/marketplace_listing/stubbed/plans/{plan_id}/accounts", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "plan_id parameter", + "enum": null, + "name": "plan_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Sorts the GitHub accounts by the date they were created or last updated. Can be one of `created` or `updated`.", + "enum": ["created", "updated"], + "name": "sort", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "To return the oldest accounts first, set to `asc`. Can be one of `asc` or `desc`. Ignored without the `sort` parameter.", + "enum": ["asc", "desc"], + "name": "direction", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Get", + "scope": "meta", + "id": "get", + "method": "GET", + "url": "/meta", + "parameters": [] + }, + { + "name": "List public events for a network of repositories", + "scope": "activity", + "id": "listPublicEventsForRepoNetwork", + "method": "GET", + "url": "/networks/{owner}/{repo}/events", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List your notifications", + "scope": "activity", + "id": "listNotifications", + "method": "GET", + "url": "/notifications", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "If `true`, show notifications marked as read.", + "enum": null, + "name": "all", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "If `true`, only shows notifications in which the user is directly participating or mentioned.", + "enum": null, + "name": "participating", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", + "enum": null, + "name": "since", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", + "enum": null, + "name": "before", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Mark as read", + "scope": "activity", + "id": "markAsRead", + "method": "PUT", + "url": "/notifications", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp.", + "enum": null, + "name": "last_read_at", + "type": "string", + "required": false + } + ] + }, + { + "name": "View a single thread", + "scope": "activity", + "id": "getThread", + "method": "GET", + "url": "/notifications/threads/{thread_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "thread_id parameter", + "enum": null, + "name": "thread_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Mark a thread as read", + "scope": "activity", + "id": "markThreadAsRead", + "method": "PATCH", + "url": "/notifications/threads/{thread_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "thread_id parameter", + "enum": null, + "name": "thread_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Get a thread subscription", + "scope": "activity", + "id": "getThreadSubscription", + "method": "GET", + "url": "/notifications/threads/{thread_id}/subscription", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "thread_id parameter", + "enum": null, + "name": "thread_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Set a thread subscription", + "scope": "activity", + "id": "setThreadSubscription", + "method": "PUT", + "url": "/notifications/threads/{thread_id}/subscription", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "thread_id parameter", + "enum": null, + "name": "thread_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Unsubscribes and subscribes you to a conversation. Set `ignored` to `true` to block all notifications from this thread.", + "enum": null, + "name": "ignored", + "type": "boolean", + "required": false + } + ] + }, + { + "name": "Delete a thread subscription", + "scope": "activity", + "id": "deleteThreadSubscription", + "method": "DELETE", + "url": "/notifications/threads/{thread_id}/subscription", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "thread_id parameter", + "enum": null, + "name": "thread_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "List all organizations", + "scope": "orgs", + "id": "list", + "method": "GET", + "url": "/organizations", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The integer ID of the last Organization that you've seen.", + "enum": null, + "name": "since", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Get an organization", + "scope": "orgs", + "id": "get", + "method": "GET", + "url": "/orgs/{org}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + } + ] + }, + { + "name": "Edit an organization", + "scope": "orgs", + "id": "update", + "method": "PATCH", + "url": "/orgs/{org}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Billing email address. This address is not publicized.", + "enum": null, + "name": "billing_email", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The company name.", + "enum": null, + "name": "company", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The publicly visible email address.", + "enum": null, + "name": "email", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The location.", + "enum": null, + "name": "location", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The shorthand name of the company.", + "enum": null, + "name": "name", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The description of the company.", + "enum": null, + "name": "description", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Toggles whether organization projects are enabled for the organization.", + "enum": null, + "name": "has_organization_projects", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Toggles whether repository projects are enabled for repositories that belong to the organization.", + "enum": null, + "name": "has_repository_projects", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Default permission level members have for organization repositories: \n\\* `read` - can pull, but not push to or administer this repository. \n\\* `write` - can pull and push, but not administer this repository. \n\\* `admin` - can pull, push, and administer this repository. \n\\* `none` - no permissions granted by default.", + "enum": ["read", "write", "admin", "none"], + "name": "default_repository_permission", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Toggles the ability of non-admin organization members to create repositories. Can be one of: \n\\* `true` - all organization members can create repositories. \n\\* `false` - only admin members can create repositories. \nDefault: `true` \n**Note:** Another parameter can override the this parameter. See [this note](https://developer.github.com/v3/orgs/#members_can_create_repositories) for details. **Note:** Another parameter can override the this parameter. See [this note](https://developer.github.com/v3/orgs/#members_can_create_repositories) for details.", + "enum": null, + "name": "members_can_create_repositories", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Specifies which types of repositories non-admin organization members can create. Can be one of: \n\\* `all` - all organization members can create public and private repositories. \n\\* `private` - members can create private repositories. This option is only available to repositories that are part of an organization on [GitHub Business Cloud](https://github.com/pricing/business-cloud). \n\\* `none` - only admin members can create repositories. \n**Note:** Using this parameter will override values set in `members_can_create_repositories`. See [this note](https://developer.github.com/v3/orgs/#members_can_create_repositories) for details.", + "enum": ["all", "private", "none"], + "name": "members_allowed_repository_creation_type", + "type": "string", + "required": false + } + ] + }, + { + "name": "List blocked users", + "scope": "orgs", + "id": "listBlockedUsers", + "method": "GET", + "url": "/orgs/{org}/blocks", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + } + ] + }, + { + "name": "Check whether a user is blocked from an organization", + "scope": "orgs", + "id": "checkBlockedUser", + "method": "GET", + "url": "/orgs/{org}/blocks/{username}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + } + ] + }, + { + "name": "Block a user", + "scope": "orgs", + "id": "blockUser", + "method": "PUT", + "url": "/orgs/{org}/blocks/{username}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + } + ] + }, + { + "name": "Unblock a user", + "scope": "orgs", + "id": "unblockUser", + "method": "DELETE", + "url": "/orgs/{org}/blocks/{username}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + } + ] + }, + { + "name": "List credential authorizations for an organization", + "scope": "orgs", + "id": "listCredentialAuthorizations", + "method": "GET", + "url": "/orgs/{org}/credential-authorizations", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + } + ] + }, + { + "name": "Remove a credential authorization for an organization", + "scope": "orgs", + "id": "removeCredentialAuthorization", + "method": "DELETE", + "url": "/orgs/{org}/credential-authorizations/{credential_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "credential_id parameter", + "enum": null, + "name": "credential_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "List public events for an organization", + "scope": "activity", + "id": "listPublicEventsForOrg", + "method": "GET", + "url": "/orgs/{org}/events", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List hooks", + "scope": "orgs", + "id": "listHooks", + "method": "GET", + "url": "/orgs/{org}/hooks", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Create a hook", + "scope": "orgs", + "id": "createHook", + "method": "POST", + "url": "/orgs/{org}/hooks", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Must be passed as \"web\".", + "enum": null, + "name": "name", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/orgs/hooks/#create-hook-config-params).", + "enum": null, + "name": "config", + "type": "object", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The URL to which the payloads will be delivered.", + "enum": null, + "name": "config.url", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`.", + "enum": null, + "name": "config.content_type", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value in the [`X-Hub-Signature`](https://developer.github.com/webhooks/#delivery-headers) header.", + "enum": null, + "name": "config.secret", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Determines whether the SSL certificate of the host for `url` will be verified when delivering payloads. Supported values include `0` (verification is performed) and `1` (verification is not performed). The default is `0`. **We strongly recommend not setting this to `1` as you are subject to man-in-the-middle and other attacks.**", + "enum": null, + "name": "config.insecure_ssl", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for.", + "enum": null, + "name": "events", + "type": "string[]", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.", + "enum": null, + "name": "active", + "type": "boolean", + "required": false + } + ] + }, + { + "name": "Get single hook", + "scope": "orgs", + "id": "getHook", + "method": "GET", + "url": "/orgs/{org}/hooks/{hook_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "hook_id parameter", + "enum": null, + "name": "hook_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Edit a hook", + "scope": "orgs", + "id": "updateHook", + "method": "PATCH", + "url": "/orgs/{org}/hooks/{hook_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "hook_id parameter", + "enum": null, + "name": "hook_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/orgs/hooks/#update-hook-config-params).", + "enum": null, + "name": "config", + "type": "object", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The URL to which the payloads will be delivered.", + "enum": null, + "name": "config.url", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`.", + "enum": null, + "name": "config.content_type", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value in the [`X-Hub-Signature`](https://developer.github.com/webhooks/#delivery-headers) header.", + "enum": null, + "name": "config.secret", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Determines whether the SSL certificate of the host for `url` will be verified when delivering payloads. Supported values include `0` (verification is performed) and `1` (verification is not performed). The default is `0`. **We strongly recommend not setting this to `1` as you are subject to man-in-the-middle and other attacks.**", + "enum": null, + "name": "config.insecure_ssl", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for.", + "enum": null, + "name": "events", + "type": "string[]", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.", + "enum": null, + "name": "active", + "type": "boolean", + "required": false + } + ] + }, + { + "name": "Delete a hook", + "scope": "orgs", + "id": "deleteHook", + "method": "DELETE", + "url": "/orgs/{org}/hooks/{hook_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "hook_id parameter", + "enum": null, + "name": "hook_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Ping a hook", + "scope": "orgs", + "id": "pingHook", + "method": "POST", + "url": "/orgs/{org}/hooks/{hook_id}/pings", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "hook_id parameter", + "enum": null, + "name": "hook_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Get an organization installation", + "scope": "apps", + "id": "getOrgInstallation", + "method": "GET", + "url": "/orgs/{org}/installation", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get an organization installation", + "scope": "apps", + "id": "findOrgInstallation", + "method": "GET", + "url": "/orgs/{org}/installation", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get interaction restrictions for an organization", + "scope": "interactions", + "id": "getRestrictionsForOrg", + "method": "GET", + "url": "/orgs/{org}/interaction-limits", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + } + ] + }, + { + "name": "Add or update interaction restrictions for an organization", + "scope": "interactions", + "id": "addOrUpdateRestrictionsForOrg", + "method": "PUT", + "url": "/orgs/{org}/interaction-limits", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Specifies the group of GitHub users who can comment, open issues, or create pull requests in public repositories for the given organization. Must be one of: `existing_users`, `contributors_only`, or `collaborators_only`.", + "enum": ["existing_users", "contributors_only", "collaborators_only"], + "name": "limit", + "type": "string", + "required": true + } + ] + }, + { + "name": "Remove interaction restrictions for an organization", + "scope": "interactions", + "id": "removeRestrictionsForOrg", + "method": "DELETE", + "url": "/orgs/{org}/interaction-limits", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + } + ] + }, + { + "name": "List pending organization invitations", + "scope": "orgs", + "id": "listPendingInvitations", + "method": "GET", + "url": "/orgs/{org}/invitations", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Create organization invitation", + "scope": "orgs", + "id": "createInvitation", + "method": "POST", + "url": "/orgs/{org}/invitations", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "**Required unless you provide `email`**. GitHub user ID for the person you are inviting.", + "enum": null, + "name": "invitee_id", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "**Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user.", + "enum": null, + "name": "email", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Specify role for new member. Can be one of: \n\\* `admin` - Organization owners with full administrative rights to the organization and complete access to all repositories and teams. \n\\* `direct_member` - Non-owner organization members with ability to see other members and join teams by invitation. \n\\* `billing_manager` - Non-owner organization members with ability to manage the billing settings of your organization.", + "enum": ["admin", "direct_member", "billing_manager"], + "name": "role", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Specify IDs for the teams you want to invite new members to.", + "enum": null, + "name": "team_ids", + "type": "integer[]", + "required": false + } + ] + }, + { + "name": "List organization invitation teams", + "scope": "orgs", + "id": "listInvitationTeams", + "method": "GET", + "url": "/orgs/{org}/invitations/{invitation_id}/teams", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "invitation_id parameter", + "enum": null, + "name": "invitation_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List all issues for a given organization assigned to the authenticated user", + "scope": "issues", + "id": "listForOrg", + "method": "GET", + "url": "/orgs/{org}/issues", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Indicates which sorts of issues to return. Can be one of: \n\\* `assigned`: Issues assigned to you \n\\* `created`: Issues created by you \n\\* `mentioned`: Issues mentioning you \n\\* `subscribed`: Issues you're subscribed to updates for \n\\* `all`: All issues the authenticated user can see, regardless of participation or creation", + "enum": ["assigned", "created", "mentioned", "subscribed", "all"], + "name": "filter", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`.", + "enum": ["open", "closed", "all"], + "name": "state", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A list of comma separated label names. Example: `bug,ui,@high`", + "enum": null, + "name": "labels", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "What to sort results by. Can be either `created`, `updated`, `comments`.", + "enum": ["created", "updated", "comments"], + "name": "sort", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The direction of the sort. Can be either `asc` or `desc`.", + "enum": ["asc", "desc"], + "name": "direction", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", + "enum": null, + "name": "since", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Members list", + "scope": "orgs", + "id": "listMembers", + "method": "GET", + "url": "/orgs/{org}/members", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Filter members returned in the list. Can be one of: \n\\* `2fa_disabled` - Members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled. Available for organization owners. \n\\* `all` - All members the authenticated user can see.", + "enum": ["2fa_disabled", "all"], + "name": "filter", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Filter members returned by their role. Can be one of: \n\\* `all` - All members of the organization, regardless of role. \n\\* `admin` - Organization owners. \n\\* `member` - Non-owner organization members.", + "enum": ["all", "admin", "member"], + "name": "role", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Check membership", + "scope": "orgs", + "id": "checkMembership", + "method": "GET", + "url": "/orgs/{org}/members/{username}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + } + ] + }, + { + "name": "Remove a member", + "scope": "orgs", + "id": "removeMember", + "method": "DELETE", + "url": "/orgs/{org}/members/{username}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get organization membership", + "scope": "orgs", + "id": "getMembership", + "method": "GET", + "url": "/orgs/{org}/memberships/{username}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + } + ] + }, + { + "name": "Add or update organization membership", + "scope": "orgs", + "id": "addOrUpdateMembership", + "method": "PUT", + "url": "/orgs/{org}/memberships/{username}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The role to give the user in the organization. Can be one of: \n\\* `admin` - The user will become an owner of the organization. \n\\* `member` - The user will become a non-owner member of the organization.", + "enum": ["admin", "member"], + "name": "role", + "type": "string", + "required": false + } + ] + }, + { + "name": "Remove organization membership", + "scope": "orgs", + "id": "removeMembership", + "method": "DELETE", + "url": "/orgs/{org}/memberships/{username}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + } + ] + }, + { + "name": "Start an organization migration", + "scope": "migrations", + "id": "startForOrg", + "method": "POST", + "url": "/orgs/{org}/migrations", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A list of arrays indicating which repositories should be migrated.", + "enum": null, + "name": "repositories", + "type": "string[]", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Indicates whether repositories should be locked (to prevent manipulation) while migrating data.", + "enum": null, + "name": "lock_repositories", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Indicates whether attachments should be excluded from the migration (to reduce migration archive file size).", + "enum": null, + "name": "exclude_attachments", + "type": "boolean", + "required": false + } + ] + }, + { + "name": "Get a list of organization migrations", + "scope": "migrations", + "id": "listForOrg", + "method": "GET", + "url": "/orgs/{org}/migrations", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Get the status of an organization migration", + "scope": "migrations", + "id": "getStatusForOrg", + "method": "GET", + "url": "/orgs/{org}/migrations/{migration_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "migration_id parameter", + "enum": null, + "name": "migration_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Download an organization migration archive", + "scope": "migrations", + "id": "getArchiveForOrg", + "method": "GET", + "url": "/orgs/{org}/migrations/{migration_id}/archive", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "migration_id parameter", + "enum": null, + "name": "migration_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Delete an organization migration archive", + "scope": "migrations", + "id": "deleteArchiveForOrg", + "method": "DELETE", + "url": "/orgs/{org}/migrations/{migration_id}/archive", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "migration_id parameter", + "enum": null, + "name": "migration_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Unlock an organization repository", + "scope": "migrations", + "id": "unlockRepoForOrg", + "method": "DELETE", + "url": "/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "migration_id parameter", + "enum": null, + "name": "migration_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo_name parameter", + "enum": null, + "name": "repo_name", + "type": "string", + "required": true + } + ] + }, + { + "name": "List outside collaborators", + "scope": "orgs", + "id": "listOutsideCollaborators", + "method": "GET", + "url": "/orgs/{org}/outside_collaborators", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Filter the list of outside collaborators. Can be one of: \n\\* `2fa_disabled`: Outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled. \n\\* `all`: All outside collaborators.", + "enum": ["2fa_disabled", "all"], + "name": "filter", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Remove outside collaborator", + "scope": "orgs", + "id": "removeOutsideCollaborator", + "method": "DELETE", + "url": "/orgs/{org}/outside_collaborators/{username}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + } + ] + }, + { + "name": "Convert member to outside collaborator", + "scope": "orgs", + "id": "convertMemberToOutsideCollaborator", + "method": "PUT", + "url": "/orgs/{org}/outside_collaborators/{username}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + } + ] + }, + { + "name": "List organization projects", + "scope": "projects", + "id": "listForOrg", + "method": "GET", + "url": "/orgs/{org}/projects", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`.", + "enum": ["open", "closed", "all"], + "name": "state", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Create an organization project", + "scope": "projects", + "id": "createForOrg", + "method": "POST", + "url": "/orgs/{org}/projects", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the project.", + "enum": null, + "name": "name", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The description of the project.", + "enum": null, + "name": "body", + "type": "string", + "required": false + } + ] + }, + { + "name": "Public members list", + "scope": "orgs", + "id": "listPublicMembers", + "method": "GET", + "url": "/orgs/{org}/public_members", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Check public membership", + "scope": "orgs", + "id": "checkPublicMembership", + "method": "GET", + "url": "/orgs/{org}/public_members/{username}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + } + ] + }, + { + "name": "Publicize a user's membership", + "scope": "orgs", + "id": "publicizeMembership", + "method": "PUT", + "url": "/orgs/{org}/public_members/{username}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + } + ] + }, + { + "name": "Conceal a user's membership", + "scope": "orgs", + "id": "concealMembership", + "method": "DELETE", + "url": "/orgs/{org}/public_members/{username}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + } + ] + }, + { + "name": "List organization repositories", + "scope": "repos", + "id": "listForOrg", + "method": "GET", + "url": "/orgs/{org}/repos", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Can be one of `all`, `public`, `private`, `forks`, `sources`, `member`.", + "enum": ["all", "public", "private", "forks", "sources", "member"], + "name": "type", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Can be one of `created`, `updated`, `pushed`, `full_name`.", + "enum": ["created", "updated", "pushed", "full_name"], + "name": "sort", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Can be one of `asc` or `desc`. Default: when using `full_name`: `asc`, otherwise `desc`", + "enum": ["asc", "desc"], + "name": "direction", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Creates a new repository in the specified organization", + "scope": "repos", + "id": "createInOrg", + "method": "POST", + "url": "/orgs/{org}/repos", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the repository.", + "enum": null, + "name": "name", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A short description of the repository.", + "enum": null, + "name": "description", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A URL with more information about the repository.", + "enum": null, + "name": "homepage", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Either `true` to create a private repository or `false` to create a public one. Creating private repositories requires a paid GitHub account.", + "enum": null, + "name": "private", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Either `true` to enable issues for this repository or `false` to disable them.", + "enum": null, + "name": "has_issues", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error.", + "enum": null, + "name": "has_projects", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Either `true` to enable the wiki for this repository or `false` to disable it.", + "enum": null, + "name": "has_wiki", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Either `true` to make this repo available as a template repository or `false` to prevent it.", + "enum": null, + "name": "is_template", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.", + "enum": null, + "name": "team_id", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Pass `true` to create an initial commit with empty README.", + "enum": null, + "name": "auto_init", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, \"Haskell\".", + "enum": null, + "name": "gitignore_template", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://help.github.com/articles/licensing-a-repository/#searching-github-by-license-type) as the `license_template` string. For example, \"mit\" or \"mpl-2.0\".", + "enum": null, + "name": "license_template", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging.", + "enum": null, + "name": "allow_squash_merge", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits.", + "enum": null, + "name": "allow_merge_commit", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging.", + "enum": null, + "name": "allow_rebase_merge", + "type": "boolean", + "required": false + } + ] + }, + { + "name": "List IdP groups in an organization", + "scope": "teams", + "id": "listIdPGroupsForOrg", + "method": "GET", + "url": "/orgs/{org}/team-sync/groups", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List teams", + "scope": "teams", + "id": "list", + "method": "GET", + "url": "/orgs/{org}/teams", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Create team", + "scope": "teams", + "id": "create", + "method": "POST", + "url": "/orgs/{org}/teams", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the team.", + "enum": null, + "name": "name", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The description of the team.", + "enum": null, + "name": "description", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The logins of organization members to add as maintainers of the team.", + "enum": null, + "name": "maintainers", + "type": "string[]", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The full name (e.g., \"organization-name/repository-name\") of repositories to add the team to.", + "enum": null, + "name": "repo_names", + "type": "string[]", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The level of privacy this team should have. The options are: \n**For a non-nested team:** \n\\* `secret` - only visible to organization owners and members of this team. \n\\* `closed` - visible to all members of this organization. \nDefault: `secret` \n**For a parent or child team:** \n\\* `closed` - visible to all members of this organization. \nDefault for child team: `closed` \n**Note**: You must pass the `hellcat-preview` media type to set privacy default to `closed` for child teams.", + "enum": ["secret", "closed"], + "name": "privacy", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \n\\* `pull` - team members can pull, but not push to or administer newly-added repositories. \n\\* `push` - team members can pull and push, but not administer newly-added repositories. \n\\* `admin` - team members can pull, push and administer newly-added repositories.", + "enum": ["pull", "push", "admin"], + "name": "permission", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The ID of a team to set as the parent team. **Note**: You must pass the `hellcat-preview` media type to use this parameter.", + "enum": null, + "name": "parent_team_id", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Get team by name", + "scope": "teams", + "id": "getByName", + "method": "GET", + "url": "/orgs/{org}/teams/{team_slug}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_slug parameter", + "enum": null, + "name": "team_slug", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get a project card", + "scope": "projects", + "id": "getCard", + "method": "GET", + "url": "/projects/columns/cards/{card_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "card_id parameter", + "enum": null, + "name": "card_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Update a project card", + "scope": "projects", + "id": "updateCard", + "method": "PATCH", + "url": "/projects/columns/cards/{card_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "card_id parameter", + "enum": null, + "name": "card_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The card's note content. Only valid for cards without another type of content, so this cannot be specified if the card already has a `content_id` and `content_type`.", + "enum": null, + "name": "note", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Use `true` to archive a project card. Specify `false` if you need to restore a previously archived project card.", + "enum": null, + "name": "archived", + "type": "boolean", + "required": false + } + ] + }, + { + "name": "Delete a project card", + "scope": "projects", + "id": "deleteCard", + "method": "DELETE", + "url": "/projects/columns/cards/{card_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "card_id parameter", + "enum": null, + "name": "card_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Move a project card", + "scope": "projects", + "id": "moveCard", + "method": "POST", + "url": "/projects/columns/cards/{card_id}/moves", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "card_id parameter", + "enum": null, + "name": "card_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Can be one of `top`, `bottom`, or `after:`, where `` is the `id` value of a card in the same column, or in the new column specified by `column_id`.", + "enum": null, + "name": "position", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The `id` value of a column in the same project.", + "enum": null, + "name": "column_id", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Get a project column", + "scope": "projects", + "id": "getColumn", + "method": "GET", + "url": "/projects/columns/{column_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "column_id parameter", + "enum": null, + "name": "column_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Update a project column", + "scope": "projects", + "id": "updateColumn", + "method": "PATCH", + "url": "/projects/columns/{column_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "column_id parameter", + "enum": null, + "name": "column_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The new name of the column.", + "enum": null, + "name": "name", + "type": "string", + "required": true + } + ] + }, + { + "name": "Delete a project column", + "scope": "projects", + "id": "deleteColumn", + "method": "DELETE", + "url": "/projects/columns/{column_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "column_id parameter", + "enum": null, + "name": "column_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "List project cards", + "scope": "projects", + "id": "listCards", + "method": "GET", + "url": "/projects/columns/{column_id}/cards", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "column_id parameter", + "enum": null, + "name": "column_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Filters the project cards that are returned by the card's state. Can be one of `all`,`archived`, or `not_archived`.", + "enum": ["all", "archived", "not_archived"], + "name": "archived_state", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Create a project card", + "scope": "projects", + "id": "createCard", + "method": "POST", + "url": "/projects/columns/{column_id}/cards", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "column_id parameter", + "enum": null, + "name": "column_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The card's note content. Only valid for cards without another type of content, so you must omit when specifying `content_id` and `content_type`.", + "enum": null, + "name": "note", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The issue or pull request id you want to associate with this card. You can use the [List issues for a repository](https://developer.github.com/v3/issues/#list-issues-for-a-repository) and [List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests) endpoints to find this id. \n**Note:** Depending on whether you use the issue id or pull request id, you will need to specify `Issue` or `PullRequest` as the `content_type`.", + "enum": null, + "name": "content_id", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "**Required if you provide `content_id`**. The type of content you want to associate with this card. Use `Issue` when `content_id` is an issue id and use `PullRequest` when `content_id` is a pull request id.", + "enum": null, + "name": "content_type", + "type": "string", + "required": false + } + ] + }, + { + "name": "Move a project column", + "scope": "projects", + "id": "moveColumn", + "method": "POST", + "url": "/projects/columns/{column_id}/moves", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "column_id parameter", + "enum": null, + "name": "column_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Can be one of `first`, `last`, or `after:`, where `` is the `id` value of a column in the same project.", + "enum": null, + "name": "position", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get a project", + "scope": "projects", + "id": "get", + "method": "GET", + "url": "/projects/{project_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "project_id parameter", + "enum": null, + "name": "project_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Update a project", + "scope": "projects", + "id": "update", + "method": "PATCH", + "url": "/projects/{project_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "project_id parameter", + "enum": null, + "name": "project_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the project.", + "enum": null, + "name": "name", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The description of the project.", + "enum": null, + "name": "body", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "State of the project. Either `open` or `closed`.", + "enum": ["open", "closed"], + "name": "state", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The permission level that determines whether all members of the project's organization can see and/or make changes to the project. Setting `organization_permission` is only available for organization projects. If an organization member belongs to a team with a higher level of access or is a collaborator with a higher level of access, their permission level is not lowered by `organization_permission`. For information on changing access for a team or collaborator, see [Add or update team project](https://developer.github.com/v3/teams/#add-or-update-team-project) or [Add user as a collaborator](https://developer.github.com/v3/projects/collaborators/#add-user-as-a-collaborator). \n \n**Note:** Updating a project's `organization_permission` requires `admin` access to the project. \n \nCan be one of: \n\\* `read` - Organization members can read, but not write to or administer this project. \n\\* `write` - Organization members can read and write, but not administer this project. \n\\* `admin` - Organization members can read, write and administer this project. \n\\* `none` - Organization members can only see this project if it is public.", + "enum": null, + "name": "organization_permission", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Sets the visibility of a project board. Setting `private` is only available for organization and user projects. **Note:** Updating a project's visibility requires `admin` access to the project. \n \nCan be one of: \n\\* `false` - Anyone can see the project. \n\\* `true` - Only the user can view a project board created on a user account. Organization members with the appropriate `organization_permission` can see project boards in an organization account.", + "enum": null, + "name": "private", + "type": "boolean", + "required": false + } + ] + }, + { + "name": "Delete a project", + "scope": "projects", + "id": "delete", + "method": "DELETE", + "url": "/projects/{project_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "project_id parameter", + "enum": null, + "name": "project_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "List collaborators", + "scope": "projects", + "id": "listCollaborators", + "method": "GET", + "url": "/projects/{project_id}/collaborators", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "project_id parameter", + "enum": null, + "name": "project_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Filters the collaborators by their affiliation. Can be one of: \n\\* `outside`: Outside collaborators of a project that are not a member of the project's organization. \n\\* `direct`: Collaborators with permissions to a project, regardless of organization membership status. \n\\* `all`: All collaborators the authenticated user can see.", + "enum": ["outside", "direct", "all"], + "name": "affiliation", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Add user as a collaborator", + "scope": "projects", + "id": "addCollaborator", + "method": "PUT", + "url": "/projects/{project_id}/collaborators/{username}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "project_id parameter", + "enum": null, + "name": "project_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The permission to grant the collaborator. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://developer.github.com/v3/#http-verbs).\" Can be one of: \n\\* `read` - can read, but not write to or administer this project. \n\\* `write` - can read and write, but not administer this project. \n\\* `admin` - can read, write and administer this project.", + "enum": ["read", "write", "admin"], + "name": "permission", + "type": "string", + "required": false + } + ] + }, + { + "name": "Remove user as a collaborator", + "scope": "projects", + "id": "removeCollaborator", + "method": "DELETE", + "url": "/projects/{project_id}/collaborators/{username}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "project_id parameter", + "enum": null, + "name": "project_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + } + ] + }, + { + "name": "Review a user's permission level", + "scope": "projects", + "id": "reviewUserPermissionLevel", + "method": "GET", + "url": "/projects/{project_id}/collaborators/{username}/permission", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "project_id parameter", + "enum": null, + "name": "project_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + } + ] + }, + { + "name": "List project columns", + "scope": "projects", + "id": "listColumns", + "method": "GET", + "url": "/projects/{project_id}/columns", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "project_id parameter", + "enum": null, + "name": "project_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Create a project column", + "scope": "projects", + "id": "createColumn", + "method": "POST", + "url": "/projects/{project_id}/columns", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "project_id parameter", + "enum": null, + "name": "project_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the column.", + "enum": null, + "name": "name", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get your current rate limit status", + "scope": "rateLimit", + "id": "get", + "method": "GET", + "url": "/rate_limit", + "parameters": [] + }, + { + "name": "Delete a reaction", + "scope": "reactions", + "id": "delete", + "method": "DELETE", + "url": "/reactions/{reaction_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "reaction_id parameter", + "enum": null, + "name": "reaction_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Get", + "scope": "repos", + "id": "get", + "method": "GET", + "url": "/repos/{owner}/{repo}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "Edit", + "scope": "repos", + "id": "update", + "method": "PATCH", + "url": "/repos/{owner}/{repo}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the repository.", + "enum": null, + "name": "name", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A short description of the repository.", + "enum": null, + "name": "description", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A URL with more information about the repository.", + "enum": null, + "name": "homepage", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Either `true` to make the repository private or `false` to make it public. Creating private repositories requires a paid GitHub account. Default: `false`. \n**Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://help.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://help.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private.", + "enum": null, + "name": "private", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Either `true` to enable issues for this repository or `false` to disable them.", + "enum": null, + "name": "has_issues", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error.", + "enum": null, + "name": "has_projects", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Either `true` to enable the wiki for this repository or `false` to disable it.", + "enum": null, + "name": "has_wiki", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Either `true` to make this repo available as a template repository or `false` to prevent it.", + "enum": null, + "name": "is_template", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Updates the default branch for this repository.", + "enum": null, + "name": "default_branch", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging.", + "enum": null, + "name": "allow_squash_merge", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits.", + "enum": null, + "name": "allow_merge_commit", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging.", + "enum": null, + "name": "allow_rebase_merge", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "`true` to archive this repository. **Note**: You cannot unarchive repositories through the API.", + "enum": null, + "name": "archived", + "type": "boolean", + "required": false + } + ] + }, + { + "name": "Delete a repository", + "scope": "repos", + "id": "delete", + "method": "DELETE", + "url": "/repos/{owner}/{repo}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "List assignees", + "scope": "issues", + "id": "listAssignees", + "method": "GET", + "url": "/repos/{owner}/{repo}/assignees", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Check assignee", + "scope": "issues", + "id": "checkAssignee", + "method": "GET", + "url": "/repos/{owner}/{repo}/assignees/{assignee}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "assignee parameter", + "enum": null, + "name": "assignee", + "type": "string", + "required": true + } + ] + }, + { + "name": "Enable automated security fixes", + "scope": "repos", + "id": "enableAutomatedSecurityFixes", + "method": "PUT", + "url": "/repos/{owner}/{repo}/automated-security-fixes", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "Disable automated security fixes", + "scope": "repos", + "id": "disableAutomatedSecurityFixes", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/automated-security-fixes", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "List branches", + "scope": "repos", + "id": "listBranches", + "method": "GET", + "url": "/repos/{owner}/{repo}/branches", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Setting to `true` returns only protected branches. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches.", + "enum": null, + "name": "protected", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Get branch", + "scope": "repos", + "id": "getBranch", + "method": "GET", + "url": "/repos/{owner}/{repo}/branches/{branch}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get branch protection", + "scope": "repos", + "id": "getBranchProtection", + "method": "GET", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + } + ] + }, + { + "name": "Update branch protection", + "scope": "repos", + "id": "updateBranchProtection", + "method": "PUT", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": true, + "deprecated": null, + "description": "Require status checks to pass before merging. Set to `null` to disable.", + "enum": null, + "name": "required_status_checks", + "type": "object", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Require branches to be up to date before merging.", + "enum": null, + "name": "required_status_checks.strict", + "type": "boolean", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The list of status checks to require in order to merge into this branch", + "enum": null, + "name": "required_status_checks.contexts", + "type": "string[]", + "required": true + }, + { + "alias": null, + "allowNull": true, + "deprecated": null, + "description": "Enforce all configured restrictions for administrators. Set to `true` to enforce required status checks for repository administrators. Set to `null` to disable.", + "enum": null, + "name": "enforce_admins", + "type": "boolean", + "required": true + }, + { + "alias": null, + "allowNull": true, + "deprecated": null, + "description": "Require at least one approving review on a pull request, before merging. Set to `null` to disable.", + "enum": null, + "name": "required_pull_request_reviews", + "type": "object", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories.", + "enum": null, + "name": "required_pull_request_reviews.dismissal_restrictions", + "type": "object", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The list of user `login`s with dismissal access", + "enum": null, + "name": "required_pull_request_reviews.dismissal_restrictions.users", + "type": "string[]", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The list of team `slug`s with dismissal access", + "enum": null, + "name": "required_pull_request_reviews.dismissal_restrictions.teams", + "type": "string[]", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit.", + "enum": null, + "name": "required_pull_request_reviews.dismiss_stale_reviews", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) review them.", + "enum": null, + "name": "required_pull_request_reviews.require_code_owner_reviews", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.", + "enum": null, + "name": "required_pull_request_reviews.required_approving_review_count", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": true, + "deprecated": null, + "description": "Restrict who can push to this branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable.", + "enum": null, + "name": "restrictions", + "type": "object", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The list of user `login`s with push access", + "enum": null, + "name": "restrictions.users", + "type": "string[]", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The list of team `slug`s with push access", + "enum": null, + "name": "restrictions.teams", + "type": "string[]", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The list of app `slug`s with push access", + "enum": null, + "name": "restrictions.apps", + "type": "string[]", + "required": false + } + ] + }, + { + "name": "Remove branch protection", + "scope": "repos", + "id": "removeBranchProtection", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get admin enforcement of protected branch", + "scope": "repos", + "id": "getProtectedBranchAdminEnforcement", + "method": "GET", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + } + ] + }, + { + "name": "Add admin enforcement of protected branch", + "scope": "repos", + "id": "addProtectedBranchAdminEnforcement", + "method": "POST", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + } + ] + }, + { + "name": "Remove admin enforcement of protected branch", + "scope": "repos", + "id": "removeProtectedBranchAdminEnforcement", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get pull request review enforcement of protected branch", + "scope": "repos", + "id": "getProtectedBranchPullRequestReviewEnforcement", + "method": "GET", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + } + ] + }, + { + "name": "Update pull request review enforcement of protected branch", + "scope": "repos", + "id": "updateProtectedBranchPullRequestReviewEnforcement", + "method": "PATCH", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories.", + "enum": null, + "name": "dismissal_restrictions", + "type": "object", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The list of user `login`s with dismissal access", + "enum": null, + "name": "dismissal_restrictions.users", + "type": "string[]", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The list of team `slug`s with dismissal access", + "enum": null, + "name": "dismissal_restrictions.teams", + "type": "string[]", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit.", + "enum": null, + "name": "dismiss_stale_reviews", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) have reviewed.", + "enum": null, + "name": "require_code_owner_reviews", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6.", + "enum": null, + "name": "required_approving_review_count", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Remove pull request review enforcement of protected branch", + "scope": "repos", + "id": "removeProtectedBranchPullRequestReviewEnforcement", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get required signatures of protected branch", + "scope": "repos", + "id": "getProtectedBranchRequiredSignatures", + "method": "GET", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + } + ] + }, + { + "name": "Add required signatures of protected branch", + "scope": "repos", + "id": "addProtectedBranchRequiredSignatures", + "method": "POST", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + } + ] + }, + { + "name": "Remove required signatures of protected branch", + "scope": "repos", + "id": "removeProtectedBranchRequiredSignatures", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get required status checks of protected branch", + "scope": "repos", + "id": "getProtectedBranchRequiredStatusChecks", + "method": "GET", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + } + ] + }, + { + "name": "Update required status checks of protected branch", + "scope": "repos", + "id": "updateProtectedBranchRequiredStatusChecks", + "method": "PATCH", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Require branches to be up to date before merging.", + "enum": null, + "name": "strict", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The list of status checks to require in order to merge into this branch", + "enum": null, + "name": "contexts", + "type": "string[]", + "required": false + } + ] + }, + { + "name": "Remove required status checks of protected branch", + "scope": "repos", + "id": "removeProtectedBranchRequiredStatusChecks", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + } + ] + }, + { + "name": "List required status checks contexts of protected branch", + "scope": "repos", + "id": "listProtectedBranchRequiredStatusChecksContexts", + "method": "GET", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + } + ] + }, + { + "name": "Replace required status checks contexts of protected branch", + "scope": "repos", + "id": "replaceProtectedBranchRequiredStatusChecksContexts", + "method": "PUT", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "contexts parameter", + "enum": null, + "name": "contexts", + "type": "string[]", + "required": true + } + ] + }, + { + "name": "Add required status checks contexts of protected branch", + "scope": "repos", + "id": "addProtectedBranchRequiredStatusChecksContexts", + "method": "POST", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "contexts parameter", + "enum": null, + "name": "contexts", + "type": "string[]", + "required": true + } + ] + }, + { + "name": "Remove required status checks contexts of protected branch", + "scope": "repos", + "id": "removeProtectedBranchRequiredStatusChecksContexts", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "contexts parameter", + "enum": null, + "name": "contexts", + "type": "string[]", + "required": true + } + ] + }, + { + "name": "Get restrictions of protected branch", + "scope": "repos", + "id": "getProtectedBranchRestrictions", + "method": "GET", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + } + ] + }, + { + "name": "Remove restrictions of protected branch", + "scope": "repos", + "id": "removeProtectedBranchRestrictions", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get apps with access to protected branch", + "scope": "repos", + "id": "getAppsWithAccessToProtectedBranch", + "method": "GET", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get apps with access to protected branch", + "scope": "repos", + "id": "listAppsWithAccessToProtectedBranch", + "method": "GET", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + } + ] + }, + { + "name": "Replace app restrictions of protected branch", + "scope": "repos", + "id": "replaceProtectedBranchAppRestrictions", + "method": "PUT", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "apps parameter", + "enum": null, + "name": "apps", + "type": "string[]", + "required": true + } + ] + }, + { + "name": "Add app restrictions of protected branch", + "scope": "repos", + "id": "addProtectedBranchAppRestrictions", + "method": "POST", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "apps parameter", + "enum": null, + "name": "apps", + "type": "string[]", + "required": true + } + ] + }, + { + "name": "Remove app restrictions of protected branch", + "scope": "repos", + "id": "removeProtectedBranchAppRestrictions", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "apps parameter", + "enum": null, + "name": "apps", + "type": "string[]", + "required": true + } + ] + }, + { + "name": "Get teams with access to protected branch", + "scope": "repos", + "id": "getTeamsWithAccessToProtectedBranch", + "method": "GET", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get teams with access to protected branch", + "scope": "repos", + "id": "listProtectedBranchTeamRestrictions", + "method": "GET", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get teams with access to protected branch", + "scope": "repos", + "id": "listTeamsWithAccessToProtectedBranch", + "method": "GET", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + } + ] + }, + { + "name": "Replace team restrictions of protected branch", + "scope": "repos", + "id": "replaceProtectedBranchTeamRestrictions", + "method": "PUT", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "teams parameter", + "enum": null, + "name": "teams", + "type": "string[]", + "required": true + } + ] + }, + { + "name": "Add team restrictions of protected branch", + "scope": "repos", + "id": "addProtectedBranchTeamRestrictions", + "method": "POST", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "teams parameter", + "enum": null, + "name": "teams", + "type": "string[]", + "required": true + } + ] + }, + { + "name": "Remove team restrictions of protected branch", + "scope": "repos", + "id": "removeProtectedBranchTeamRestrictions", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "teams parameter", + "enum": null, + "name": "teams", + "type": "string[]", + "required": true + } + ] + }, + { + "name": "Get users with access to protected branch", + "scope": "repos", + "id": "getUsersWithAccessToProtectedBranch", + "method": "GET", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get users with access to protected branch", + "scope": "repos", + "id": "listProtectedBranchUserRestrictions", + "method": "GET", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get users with access to protected branch", + "scope": "repos", + "id": "listUsersWithAccessToProtectedBranch", + "method": "GET", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + } + ] + }, + { + "name": "Replace user restrictions of protected branch", + "scope": "repos", + "id": "replaceProtectedBranchUserRestrictions", + "method": "PUT", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "users parameter", + "enum": null, + "name": "users", + "type": "string[]", + "required": true + } + ] + }, + { + "name": "Add user restrictions of protected branch", + "scope": "repos", + "id": "addProtectedBranchUserRestrictions", + "method": "POST", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "users parameter", + "enum": null, + "name": "users", + "type": "string[]", + "required": true + } + ] + }, + { + "name": "Remove user restrictions of protected branch", + "scope": "repos", + "id": "removeProtectedBranchUserRestrictions", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "branch parameter", + "enum": null, + "name": "branch", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "users parameter", + "enum": null, + "name": "users", + "type": "string[]", + "required": true + } + ] + }, + { + "name": "Create a check run", + "scope": "checks", + "id": "create", + "method": "POST", + "url": "/repos/{owner}/{repo}/check-runs", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the check. For example, \"code-coverage\".", + "enum": null, + "name": "name", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The SHA of the commit.", + "enum": null, + "name": "head_sha", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The URL of the integrator's site that has the full details of the check.", + "enum": null, + "name": "details_url", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A reference for the run on the integrator's system.", + "enum": null, + "name": "external_id", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The current status. Can be one of `queued`, `in_progress`, or `completed`.", + "enum": ["queued", "in_progress", "completed"], + "name": "status", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The time that the check run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", + "enum": null, + "name": "started_at", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "**Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, or `action_required`. When the conclusion is `action_required`, additional details should be provided on the site specified by `details_url`. \n**Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`.", + "enum": [ + "success", + "failure", + "neutral", + "cancelled", + "timed_out", + "action_required" + ], + "name": "conclusion", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", + "enum": null, + "name": "completed_at", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://developer.github.com/v3/checks/runs/#output-object) description.", + "enum": null, + "name": "output", + "type": "object", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The title of the check run.", + "enum": null, + "name": "output.title", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The summary of the check run. This parameter supports Markdown.", + "enum": null, + "name": "output.summary", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The details of the check run. This parameter supports Markdown.", + "enum": null, + "name": "output.text", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://developer.github.com/v3/checks/runs/#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see \"[About status checks](https://help.github.com/articles/about-status-checks#checks)\". See the [`annotations` object](https://developer.github.com/v3/checks/runs/#annotations-object) description for details about how to use this parameter.", + "enum": null, + "name": "output.annotations", + "type": "object[]", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The path of the file to add an annotation to. For example, `assets/css/main.css`.", + "enum": null, + "name": "output.annotations[].path", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The start line of the annotation.", + "enum": null, + "name": "output.annotations[].start_line", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The end line of the annotation.", + "enum": null, + "name": "output.annotations[].end_line", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values.", + "enum": null, + "name": "output.annotations[].start_column", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values.", + "enum": null, + "name": "output.annotations[].end_column", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The level of the annotation. Can be one of `notice`, `warning`, or `failure`.", + "enum": ["notice", "warning", "failure"], + "name": "output.annotations[].annotation_level", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "enum": null, + "name": "output.annotations[].message", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The title that represents the annotation. The maximum size is 255 characters.", + "enum": null, + "name": "output.annotations[].title", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Details about this annotation. The maximum size is 64 KB.", + "enum": null, + "name": "output.annotations[].raw_details", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://developer.github.com/v3/checks/runs/#images-object) description for details.", + "enum": null, + "name": "output.images", + "type": "object[]", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The alternative text for the image.", + "enum": null, + "name": "output.images[].alt", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The full URL of the image.", + "enum": null, + "name": "output.images[].image_url", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A short image description.", + "enum": null, + "name": "output.images[].caption", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the [`check_run.requested_action` webhook](https://developer.github.com/v3/activity/events/types/#checkrunevent) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://developer.github.com/v3/checks/runs/#actions-object) description. To learn more about check runs and requested actions, see \"[Check runs and requested actions](https://developer.github.com/v3/checks/runs/#check-runs-and-requested-actions).\" To learn more about check runs and requested actions, see \"[Check runs and requested actions](https://developer.github.com/v3/checks/runs/#check-runs-and-requested-actions).\"", + "enum": null, + "name": "actions", + "type": "object[]", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The text to be displayed on a button in the web UI. The maximum size is 20 characters.", + "enum": null, + "name": "actions[].label", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A short explanation of what this action would do. The maximum size is 40 characters.", + "enum": null, + "name": "actions[].description", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A reference for the action on the integrator's system. The maximum size is 20 characters.", + "enum": null, + "name": "actions[].identifier", + "type": "string", + "required": true + } + ] + }, + { + "name": "Update a check run", + "scope": "checks", + "id": "update", + "method": "PATCH", + "url": "/repos/{owner}/{repo}/check-runs/{check_run_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "check_run_id parameter", + "enum": null, + "name": "check_run_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the check. For example, \"code-coverage\".", + "enum": null, + "name": "name", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The URL of the integrator's site that has the full details of the check.", + "enum": null, + "name": "details_url", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A reference for the run on the integrator's system.", + "enum": null, + "name": "external_id", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", + "enum": null, + "name": "started_at", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The current status. Can be one of `queued`, `in_progress`, or `completed`.", + "enum": ["queued", "in_progress", "completed"], + "name": "status", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "**Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, or `action_required`. \n**Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`.", + "enum": [ + "success", + "failure", + "neutral", + "cancelled", + "timed_out", + "action_required" + ], + "name": "conclusion", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", + "enum": null, + "name": "completed_at", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://developer.github.com/v3/checks/runs/#output-object-1) description.", + "enum": null, + "name": "output", + "type": "object", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "**Required**.", + "enum": null, + "name": "output.title", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Can contain Markdown.", + "enum": null, + "name": "output.summary", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Can contain Markdown.", + "enum": null, + "name": "output.text", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://developer.github.com/v3/checks/runs/#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see \"[About status checks](https://help.github.com/articles/about-status-checks#checks)\". See the [`annotations` object](https://developer.github.com/v3/checks/runs/#annotations-object-1) description for details.", + "enum": null, + "name": "output.annotations", + "type": "object[]", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The path of the file to add an annotation to. For example, `assets/css/main.css`.", + "enum": null, + "name": "output.annotations[].path", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The start line of the annotation.", + "enum": null, + "name": "output.annotations[].start_line", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The end line of the annotation.", + "enum": null, + "name": "output.annotations[].end_line", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values.", + "enum": null, + "name": "output.annotations[].start_column", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values.", + "enum": null, + "name": "output.annotations[].end_column", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The level of the annotation. Can be one of `notice`, `warning`, or `failure`.", + "enum": ["notice", "warning", "failure"], + "name": "output.annotations[].annotation_level", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "enum": null, + "name": "output.annotations[].message", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The title that represents the annotation. The maximum size is 255 characters.", + "enum": null, + "name": "output.annotations[].title", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Details about this annotation. The maximum size is 64 KB.", + "enum": null, + "name": "output.annotations[].raw_details", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://developer.github.com/v3/checks/runs/#annotations-object-1) description for details.", + "enum": null, + "name": "output.images", + "type": "object[]", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The alternative text for the image.", + "enum": null, + "name": "output.images[].alt", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The full URL of the image.", + "enum": null, + "name": "output.images[].image_url", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A short image description.", + "enum": null, + "name": "output.images[].caption", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Possible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://developer.github.com/v3/checks/runs/#actions-object) description. To learn more about check runs and requested actions, see \"[Check runs and requested actions](https://developer.github.com/v3/checks/runs/#check-runs-and-requested-actions).\"", + "enum": null, + "name": "actions", + "type": "object[]", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The text to be displayed on a button in the web UI. The maximum size is 20 characters.", + "enum": null, + "name": "actions[].label", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A short explanation of what this action would do. The maximum size is 40 characters.", + "enum": null, + "name": "actions[].description", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A reference for the action on the integrator's system. The maximum size is 20 characters.", + "enum": null, + "name": "actions[].identifier", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get a single check run", + "scope": "checks", + "id": "get", + "method": "GET", + "url": "/repos/{owner}/{repo}/check-runs/{check_run_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "check_run_id parameter", + "enum": null, + "name": "check_run_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "List annotations for a check run", + "scope": "checks", + "id": "listAnnotations", + "method": "GET", + "url": "/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "check_run_id parameter", + "enum": null, + "name": "check_run_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Create a check suite", + "scope": "checks", + "id": "createSuite", + "method": "POST", + "url": "/repos/{owner}/{repo}/check-suites", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The sha of the head commit.", + "enum": null, + "name": "head_sha", + "type": "string", + "required": true + } + ] + }, + { + "name": "Set preferences for check suites on a repository", + "scope": "checks", + "id": "setSuitesPreferences", + "method": "PATCH", + "url": "/repos/{owner}/{repo}/check-suites/preferences", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the [`auto_trigger_checks` object](https://developer.github.com/v3/checks/suites/#auto_trigger_checks-object) description for details.", + "enum": null, + "name": "auto_trigger_checks", + "type": "object[]", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The `id` of the GitHub App.", + "enum": null, + "name": "auto_trigger_checks[].app_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository, or `false` to disable them.", + "enum": null, + "name": "auto_trigger_checks[].setting", + "type": "boolean", + "required": true + } + ] + }, + { + "name": "Get a single check suite", + "scope": "checks", + "id": "getSuite", + "method": "GET", + "url": "/repos/{owner}/{repo}/check-suites/{check_suite_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "check_suite_id parameter", + "enum": null, + "name": "check_suite_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "List check runs in a check suite", + "scope": "checks", + "id": "listForSuite", + "method": "GET", + "url": "/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "check_suite_id parameter", + "enum": null, + "name": "check_suite_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Returns check runs with the specified `name`.", + "enum": null, + "name": "check_name", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`.", + "enum": ["queued", "in_progress", "completed"], + "name": "status", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Filters check runs by their `completed_at` timestamp. Can be one of `latest` (returning the most recent check runs) or `all`.", + "enum": ["latest", "all"], + "name": "filter", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Rerequest check suite", + "scope": "checks", + "id": "rerequestSuite", + "method": "POST", + "url": "/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "check_suite_id parameter", + "enum": null, + "name": "check_suite_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "List collaborators", + "scope": "repos", + "id": "listCollaborators", + "method": "GET", + "url": "/repos/{owner}/{repo}/collaborators", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Filter collaborators returned by their affiliation. Can be one of: \n\\* `outside`: All outside collaborators of an organization-owned repository. \n\\* `direct`: All collaborators with permissions to an organization-owned repository, regardless of organization membership status. \n\\* `all`: All collaborators the authenticated user can see.", + "enum": ["outside", "direct", "all"], + "name": "affiliation", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Check if a user is a collaborator", + "scope": "repos", + "id": "checkCollaborator", + "method": "GET", + "url": "/repos/{owner}/{repo}/collaborators/{username}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + } + ] + }, + { + "name": "Add user as a collaborator", + "scope": "repos", + "id": "addCollaborator", + "method": "PUT", + "url": "/repos/{owner}/{repo}/collaborators/{username}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The permission to grant the collaborator. **Only valid on organization-owned repositories.** Can be one of: \n\\* `pull` - can pull, but not push to or administer this repository. \n\\* `push` - can pull and push, but not administer this repository. \n\\* `admin` - can pull, push and administer this repository.", + "enum": ["pull", "push", "admin"], + "name": "permission", + "type": "string", + "required": false + } + ] + }, + { + "name": "Remove user as a collaborator", + "scope": "repos", + "id": "removeCollaborator", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/collaborators/{username}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + } + ] + }, + { + "name": "Review a user's permission level", + "scope": "repos", + "id": "getCollaboratorPermissionLevel", + "method": "GET", + "url": "/repos/{owner}/{repo}/collaborators/{username}/permission", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + } + ] + }, + { + "name": "List commit comments for a repository", + "scope": "repos", + "id": "listCommitComments", + "method": "GET", + "url": "/repos/{owner}/{repo}/comments", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Get a single commit comment", + "scope": "repos", + "id": "getCommitComment", + "method": "GET", + "url": "/repos/{owner}/{repo}/comments/{comment_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "comment_id parameter", + "enum": null, + "name": "comment_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Update a commit comment", + "scope": "repos", + "id": "updateCommitComment", + "method": "PATCH", + "url": "/repos/{owner}/{repo}/comments/{comment_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "comment_id parameter", + "enum": null, + "name": "comment_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The contents of the comment", + "enum": null, + "name": "body", + "type": "string", + "required": true + } + ] + }, + { + "name": "Delete a commit comment", + "scope": "repos", + "id": "deleteCommitComment", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/comments/{comment_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "comment_id parameter", + "enum": null, + "name": "comment_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "List reactions for a commit comment", + "scope": "reactions", + "id": "listForCommitComment", + "method": "GET", + "url": "/repos/{owner}/{repo}/comments/{comment_id}/reactions", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "comment_id parameter", + "enum": null, + "name": "comment_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a commit comment.", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Create reaction for a commit comment", + "scope": "reactions", + "id": "createForCommitComment", + "method": "POST", + "url": "/repos/{owner}/{repo}/comments/{comment_id}/reactions", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "comment_id parameter", + "enum": null, + "name": "comment_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the commit comment.", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "type": "string", + "required": true + } + ] + }, + { + "name": "List commits on a repository", + "scope": "repos", + "id": "listCommits", + "method": "GET", + "url": "/repos/{owner}/{repo}/commits", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "SHA or branch to start listing commits from. Default: the repository’s default branch (usually `master`).", + "enum": null, + "name": "sha", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Only commits containing this file path will be returned.", + "enum": null, + "name": "path", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "GitHub login or email address by which to filter by commit author.", + "enum": null, + "name": "author", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Only commits after this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", + "enum": null, + "name": "since", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Only commits before this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", + "enum": null, + "name": "until", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List branches for HEAD commit", + "scope": "repos", + "id": "listBranchesForHeadCommit", + "method": "GET", + "url": "/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "commit_sha parameter", + "enum": null, + "name": "commit_sha", + "type": "string", + "required": true + } + ] + }, + { + "name": "List comments for a single commit", + "scope": "repos", + "id": "listCommentsForCommit", + "method": "GET", + "url": "/repos/{owner}/{repo}/commits/{commit_sha}/comments", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "commit_sha parameter", + "enum": null, + "name": "commit_sha", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + }, + { + "alias": "commit_sha", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "ref", + "type": null, + "required": null + } + ] + }, + { + "name": "Create a commit comment", + "scope": "repos", + "id": "createCommitComment", + "method": "POST", + "url": "/repos/{owner}/{repo}/commits/{commit_sha}/comments", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "commit_sha parameter", + "enum": null, + "name": "commit_sha", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The contents of the comment.", + "enum": null, + "name": "body", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Relative path of the file to comment on.", + "enum": null, + "name": "path", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Line index in the diff to comment on.", + "enum": null, + "name": "position", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "**Deprecated**. Use **position** parameter instead. Line number in the file to comment on.", + "enum": null, + "name": "line", + "type": "integer", + "required": false + }, + { + "alias": "commit_sha", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "sha", + "type": null, + "required": null + } + ] + }, + { + "name": "List pull requests associated with commit", + "scope": "repos", + "id": "listPullRequestsAssociatedWithCommit", + "method": "GET", + "url": "/repos/{owner}/{repo}/commits/{commit_sha}/pulls", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "commit_sha parameter", + "enum": null, + "name": "commit_sha", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Get a single commit", + "scope": "repos", + "id": "getCommit", + "method": "GET", + "url": "/repos/{owner}/{repo}/commits/{ref}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "ref parameter", + "enum": null, + "name": "ref", + "type": "string", + "required": true + }, + { + "alias": "ref", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "sha", + "type": null, + "required": null + }, + { + "alias": "ref", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "commit_sha", + "type": null, + "required": null + } + ] + }, + { + "name": "List check runs for a specific ref", + "scope": "checks", + "id": "listForRef", + "method": "GET", + "url": "/repos/{owner}/{repo}/commits/{ref}/check-runs", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "ref parameter", + "enum": null, + "name": "ref", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Returns check runs with the specified `name`.", + "enum": null, + "name": "check_name", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`.", + "enum": ["queued", "in_progress", "completed"], + "name": "status", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Filters check runs by their `completed_at` timestamp. Can be one of `latest` (returning the most recent check runs) or `all`.", + "enum": ["latest", "all"], + "name": "filter", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List check suites for a specific ref", + "scope": "checks", + "id": "listSuitesForRef", + "method": "GET", + "url": "/repos/{owner}/{repo}/commits/{ref}/check-suites", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "ref parameter", + "enum": null, + "name": "ref", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Filters check suites by GitHub App `id`.", + "enum": null, + "name": "app_id", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Filters checks suites by the name of the [check run](https://developer.github.com/v3/checks/runs/).", + "enum": null, + "name": "check_name", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Get the combined status for a specific ref", + "scope": "repos", + "id": "getCombinedStatusForRef", + "method": "GET", + "url": "/repos/{owner}/{repo}/commits/{ref}/status", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "ref parameter", + "enum": null, + "name": "ref", + "type": "string", + "required": true + } + ] + }, + { + "name": "List statuses for a specific ref", + "scope": "repos", + "id": "listStatusesForRef", + "method": "GET", + "url": "/repos/{owner}/{repo}/commits/{ref}/statuses", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "ref parameter", + "enum": null, + "name": "ref", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Get the contents of a repository's code of conduct", + "scope": "codesOfConduct", + "id": "getForRepo", + "method": "GET", + "url": "/repos/{owner}/{repo}/community/code_of_conduct", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "Retrieve community profile metrics", + "scope": "repos", + "id": "retrieveCommunityProfileMetrics", + "method": "GET", + "url": "/repos/{owner}/{repo}/community/profile", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "Compare two commits", + "scope": "repos", + "id": "compareCommits", + "method": "GET", + "url": "/repos/{owner}/{repo}/compare/{base}...{head}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "base parameter", + "enum": null, + "name": "base", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "head parameter", + "enum": null, + "name": "head", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get contents", + "scope": "repos", + "id": "getContents", + "method": "GET", + "url": "/repos/{owner}/{repo}/contents/{path}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "path parameter", + "enum": null, + "name": "path", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`)", + "enum": null, + "name": "ref", + "type": "string", + "required": false + } + ] + }, + { + "name": "Create or update a file", + "scope": "repos", + "id": "createOrUpdateFile", + "method": "PUT", + "url": "/repos/{owner}/{repo}/contents/{path}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "path parameter", + "enum": null, + "name": "path", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The commit message.", + "enum": null, + "name": "message", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The new file content, using Base64 encoding.", + "enum": null, + "name": "content", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "**Required if you are updating a file**. The blob SHA of the file being replaced.", + "enum": null, + "name": "sha", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The branch name. Default: the repository’s default branch (usually `master`)", + "enum": null, + "name": "branch", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The person that committed the file. Default: the authenticated user.", + "enum": null, + "name": "committer", + "type": "object", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted.", + "enum": null, + "name": "committer.name", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The email of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted.", + "enum": null, + "name": "committer.email", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The author of the file. Default: The `committer` or the authenticated user if you omit `committer`.", + "enum": null, + "name": "author", + "type": "object", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted.", + "enum": null, + "name": "author.name", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The email of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted.", + "enum": null, + "name": "author.email", + "type": "string", + "required": true + } + ] + }, + { + "name": "Create or update a file", + "scope": "repos", + "id": "createFile", + "method": "PUT", + "url": "/repos/{owner}/{repo}/contents/{path}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "path parameter", + "enum": null, + "name": "path", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The commit message.", + "enum": null, + "name": "message", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The new file content, using Base64 encoding.", + "enum": null, + "name": "content", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "**Required if you are updating a file**. The blob SHA of the file being replaced.", + "enum": null, + "name": "sha", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The branch name. Default: the repository’s default branch (usually `master`)", + "enum": null, + "name": "branch", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The person that committed the file. Default: the authenticated user.", + "enum": null, + "name": "committer", + "type": "object", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted.", + "enum": null, + "name": "committer.name", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The email of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted.", + "enum": null, + "name": "committer.email", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The author of the file. Default: The `committer` or the authenticated user if you omit `committer`.", + "enum": null, + "name": "author", + "type": "object", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted.", + "enum": null, + "name": "author.name", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The email of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted.", + "enum": null, + "name": "author.email", + "type": "string", + "required": true + } + ] + }, + { + "name": "Create or update a file", + "scope": "repos", + "id": "updateFile", + "method": "PUT", + "url": "/repos/{owner}/{repo}/contents/{path}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "path parameter", + "enum": null, + "name": "path", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The commit message.", + "enum": null, + "name": "message", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The new file content, using Base64 encoding.", + "enum": null, + "name": "content", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "**Required if you are updating a file**. The blob SHA of the file being replaced.", + "enum": null, + "name": "sha", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The branch name. Default: the repository’s default branch (usually `master`)", + "enum": null, + "name": "branch", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The person that committed the file. Default: the authenticated user.", + "enum": null, + "name": "committer", + "type": "object", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted.", + "enum": null, + "name": "committer.name", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The email of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted.", + "enum": null, + "name": "committer.email", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The author of the file. Default: The `committer` or the authenticated user if you omit `committer`.", + "enum": null, + "name": "author", + "type": "object", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted.", + "enum": null, + "name": "author.name", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The email of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted.", + "enum": null, + "name": "author.email", + "type": "string", + "required": true + } + ] + }, + { + "name": "Delete a file", + "scope": "repos", + "id": "deleteFile", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/contents/{path}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "path parameter", + "enum": null, + "name": "path", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The commit message.", + "enum": null, + "name": "message", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The blob SHA of the file being replaced.", + "enum": null, + "name": "sha", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The branch name. Default: the repository’s default branch (usually `master`)", + "enum": null, + "name": "branch", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "object containing information about the committer.", + "enum": null, + "name": "committer", + "type": "object", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the author (or committer) of the commit", + "enum": null, + "name": "committer.name", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The email of the author (or committer) of the commit", + "enum": null, + "name": "committer.email", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "object containing information about the author.", + "enum": null, + "name": "author", + "type": "object", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the author (or committer) of the commit", + "enum": null, + "name": "author.name", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The email of the author (or committer) of the commit", + "enum": null, + "name": "author.email", + "type": "string", + "required": false + } + ] + }, + { + "name": "List contributors", + "scope": "repos", + "id": "listContributors", + "method": "GET", + "url": "/repos/{owner}/{repo}/contributors", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Set to `1` or `true` to include anonymous contributors in results.", + "enum": null, + "name": "anon", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List deployments", + "scope": "repos", + "id": "listDeployments", + "method": "GET", + "url": "/repos/{owner}/{repo}/deployments", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The SHA recorded at creation time.", + "enum": null, + "name": "sha", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the ref. This can be a branch, tag, or SHA.", + "enum": null, + "name": "ref", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`).", + "enum": null, + "name": "task", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the environment that was deployed to (e.g., `staging` or `production`).", + "enum": null, + "name": "environment", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Create a deployment", + "scope": "repos", + "id": "createDeployment", + "method": "POST", + "url": "/repos/{owner}/{repo}/deployments", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The ref to deploy. This can be a branch, tag, or SHA.", + "enum": null, + "name": "ref", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Specifies a task to execute (e.g., `deploy` or `deploy:migrations`).", + "enum": null, + "name": "task", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch.", + "enum": null, + "name": "auto_merge", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The [status](https://developer.github.com/v3/repos/statuses/) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", + "enum": null, + "name": "required_contexts", + "type": "string[]", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "JSON payload with extra information about the deployment.", + "enum": null, + "name": "payload", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Name for the target deployment environment (e.g., `production`, `staging`, `qa`).", + "enum": null, + "name": "environment", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Short description of the deployment.", + "enum": null, + "name": "description", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` \n**Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type.", + "enum": null, + "name": "transient_environment", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. \n**Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type.", + "enum": null, + "name": "production_environment", + "type": "boolean", + "required": false + } + ] + }, + { + "name": "Get a single deployment", + "scope": "repos", + "id": "getDeployment", + "method": "GET", + "url": "/repos/{owner}/{repo}/deployments/{deployment_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "deployment_id parameter", + "enum": null, + "name": "deployment_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "List deployment statuses", + "scope": "repos", + "id": "listDeploymentStatuses", + "method": "GET", + "url": "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "deployment_id parameter", + "enum": null, + "name": "deployment_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Create a deployment status", + "scope": "repos", + "id": "createDeploymentStatus", + "method": "POST", + "url": "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "deployment_id parameter", + "enum": null, + "name": "deployment_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The state of the status. Can be one of `error`, `failure`, `inactive`, `in_progress`, `queued` `pending`, or `success`. **Note:** To use the `inactive` state, you must provide the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. To use the `in_progress` and `queued` states, you must provide the [`application/vnd.github.flash-preview+json`](https://developer.github.com/v3/previews/#deployment-statuses) custom media type.", + "enum": [ + "error", + "failure", + "inactive", + "in_progress", + "queued", + "pending", + "success" + ], + "name": "state", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. **Note:** It's recommended to use the `log_url` parameter, which replaces `target_url`.", + "enum": null, + "name": "target_url", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The full URL of the deployment's output. This parameter replaces `target_url`. We will continue to accept `target_url` to support legacy uses, but we recommend replacing `target_url` with `log_url`. Setting `log_url` will automatically set `target_url` to the same value. Default: `\"\"` \n**Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type.", + "enum": null, + "name": "log_url", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A short description of the status. The maximum description length is 140 characters.", + "enum": null, + "name": "description", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. **Note:** This parameter requires you to use the [`application/vnd.github.flash-preview+json`](https://developer.github.com/v3/previews/#deployment-statuses) custom media type.", + "enum": ["production", "staging", "qa"], + "name": "environment", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Sets the URL for accessing your environment. Default: `\"\"` \n**Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type.", + "enum": null, + "name": "environment_url", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Adds a new `inactive` status to all prior non-transient, non-production environment deployments with the same repository and `environment` name as the created status's deployment. An `inactive` status is only added to deployments that had a `success` state. Default: `true` \n**Note:** To add an `inactive` status to `production` environments, you must use the [`application/vnd.github.flash-preview+json`](https://developer.github.com/v3/previews/#deployment-statuses) custom media type. \n**Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type.", + "enum": null, + "name": "auto_inactive", + "type": "boolean", + "required": false + } + ] + }, + { + "name": "Get a single deployment status", + "scope": "repos", + "id": "getDeploymentStatus", + "method": "GET", + "url": "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "deployment_id parameter", + "enum": null, + "name": "deployment_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "status_id parameter", + "enum": null, + "name": "status_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Create a repository dispatch event", + "scope": "repos", + "id": "createDispatchEvent", + "method": "POST", + "url": "/repos/{owner}/{repo}/dispatches", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "**Required:** A custom webhook event name.", + "enum": null, + "name": "event_type", + "type": "string", + "required": false + } + ] + }, + { + "name": "List downloads for a repository", + "scope": "repos", + "id": "listDownloads", + "method": "GET", + "url": "/repos/{owner}/{repo}/downloads", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Get a single download", + "scope": "repos", + "id": "getDownload", + "method": "GET", + "url": "/repos/{owner}/{repo}/downloads/{download_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "download_id parameter", + "enum": null, + "name": "download_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Delete a download", + "scope": "repos", + "id": "deleteDownload", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/downloads/{download_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "download_id parameter", + "enum": null, + "name": "download_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "List repository events", + "scope": "activity", + "id": "listRepoEvents", + "method": "GET", + "url": "/repos/{owner}/{repo}/events", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List forks", + "scope": "repos", + "id": "listForks", + "method": "GET", + "url": "/repos/{owner}/{repo}/forks", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The sort order. Can be either `newest`, `oldest`, or `stargazers`.", + "enum": ["newest", "oldest", "stargazers"], + "name": "sort", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Create a fork", + "scope": "repos", + "id": "createFork", + "method": "POST", + "url": "/repos/{owner}/{repo}/forks", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Optional parameter to specify the organization name if forking into an organization.", + "enum": null, + "name": "organization", + "type": "string", + "required": false + } + ] + }, + { + "name": "Create a blob", + "scope": "git", + "id": "createBlob", + "method": "POST", + "url": "/repos/{owner}/{repo}/git/blobs", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The new blob's content.", + "enum": null, + "name": "content", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The encoding used for `content`. Currently, `\"utf-8\"` and `\"base64\"` are supported.", + "enum": null, + "name": "encoding", + "type": "string", + "required": false + } + ] + }, + { + "name": "Get a blob", + "scope": "git", + "id": "getBlob", + "method": "GET", + "url": "/repos/{owner}/{repo}/git/blobs/{file_sha}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "file_sha parameter", + "enum": null, + "name": "file_sha", + "type": "string", + "required": true + } + ] + }, + { + "name": "Create a commit", + "scope": "git", + "id": "createCommit", + "method": "POST", + "url": "/repos/{owner}/{repo}/git/commits", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The commit message", + "enum": null, + "name": "message", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The SHA of the tree object this commit points to", + "enum": null, + "name": "tree", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided.", + "enum": null, + "name": "parents", + "type": "string[]", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Information about the author of the commit. By default, the `author` will be the authenticated user and the current date. See the `author` and `committer` object below for details.", + "enum": null, + "name": "author", + "type": "object", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the author (or committer) of the commit", + "enum": null, + "name": "author.name", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The email of the author (or committer) of the commit", + "enum": null, + "name": "author.email", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", + "enum": null, + "name": "author.date", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Information about the person who is making the commit. By default, `committer` will use the information set in `author`. See the `author` and `committer` object below for details.", + "enum": null, + "name": "committer", + "type": "object", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the author (or committer) of the commit", + "enum": null, + "name": "committer.name", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The email of the author (or committer) of the commit", + "enum": null, + "name": "committer.email", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", + "enum": null, + "name": "committer.date", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The [PGP signature](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) of the commit. GitHub adds the signature to the `gpgsig` header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a `signature` parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to [use the command line](https://git-scm.com/book/id/v2/Git-Tools-Signing-Your-Work) to create signed commits.", + "enum": null, + "name": "signature", + "type": "string", + "required": false + } + ] + }, + { + "name": "Get a commit", + "scope": "git", + "id": "getCommit", + "method": "GET", + "url": "/repos/{owner}/{repo}/git/commits/{commit_sha}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "commit_sha parameter", + "enum": null, + "name": "commit_sha", + "type": "string", + "required": true + } + ] + }, + { + "name": "List matching references", + "scope": "git", + "id": "listMatchingRefs", + "method": "GET", + "url": "/repos/{owner}/{repo}/git/matching-refs/{ref}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "ref parameter", + "enum": null, + "name": "ref", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Get a single reference", + "scope": "git", + "id": "getRef", + "method": "GET", + "url": "/repos/{owner}/{repo}/git/ref/{ref}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "ref parameter", + "enum": null, + "name": "ref", + "type": "string", + "required": true + } + ] + }, + { + "name": "Create a reference", + "scope": "git", + "id": "createRef", + "method": "POST", + "url": "/repos/{owner}/{repo}/git/refs", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn't start with 'refs' and have at least two slashes, it will be rejected.", + "enum": null, + "name": "ref", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The SHA1 value for this reference.", + "enum": null, + "name": "sha", + "type": "string", + "required": true + } + ] + }, + { + "name": "Update a reference", + "scope": "git", + "id": "updateRef", + "method": "PATCH", + "url": "/repos/{owner}/{repo}/git/refs/{ref}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "ref parameter", + "enum": null, + "name": "ref", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The SHA1 value to set this reference to", + "enum": null, + "name": "sha", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to `false` will make sure you're not overwriting work.", + "enum": null, + "name": "force", + "type": "boolean", + "required": false + } + ] + }, + { + "name": "Delete a reference", + "scope": "git", + "id": "deleteRef", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/git/refs/{ref}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "ref parameter", + "enum": null, + "name": "ref", + "type": "string", + "required": true + } + ] + }, + { + "name": "Create a tag object", + "scope": "git", + "id": "createTag", + "method": "POST", + "url": "/repos/{owner}/{repo}/git/tags", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The tag's name. This is typically a version (e.g., \"v0.0.1\").", + "enum": null, + "name": "tag", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The tag message.", + "enum": null, + "name": "message", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The SHA of the git object this is tagging.", + "enum": null, + "name": "object", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`.", + "enum": ["commit", "tree", "blob"], + "name": "type", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "An object with information about the individual creating the tag.", + "enum": null, + "name": "tagger", + "type": "object", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the author of the tag", + "enum": null, + "name": "tagger.name", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The email of the author of the tag", + "enum": null, + "name": "tagger.email", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "When this object was tagged. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", + "enum": null, + "name": "tagger.date", + "type": "string", + "required": false + } + ] + }, + { + "name": "Get a tag", + "scope": "git", + "id": "getTag", + "method": "GET", + "url": "/repos/{owner}/{repo}/git/tags/{tag_sha}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "tag_sha parameter", + "enum": null, + "name": "tag_sha", + "type": "string", + "required": true + } + ] + }, + { + "name": "Create a tree", + "scope": "git", + "id": "createTree", + "method": "POST", + "url": "/repos/{owner}/{repo}/git/trees", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure.", + "enum": null, + "name": "tree", + "type": "object[]", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The file referenced in the tree.", + "enum": null, + "name": "tree[].path", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The file mode; one of `100644` for file (blob), `100755` for executable (blob), `040000` for subdirectory (tree), `160000` for submodule (commit), or `120000` for a blob that specifies the path of a symlink.", + "enum": ["100644", "100755", "040000", "160000", "120000"], + "name": "tree[].mode", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Either `blob`, `tree`, or `commit`.", + "enum": ["blob", "tree", "commit"], + "name": "tree[].type", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The SHA1 checksum ID of the object in the tree. Also called `tree.sha`. \n \n**Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error.", + "enum": null, + "name": "tree[].sha", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or `tree.sha`. \n \n**Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error.", + "enum": null, + "name": "tree[].content", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The SHA1 of the tree you want to update with new data. If you don't set this, the commit will be created on top of everything; however, it will only contain your change, the rest of your files will show up as deleted.", + "enum": null, + "name": "base_tree", + "type": "string", + "required": false + } + ] + }, + { + "name": "Get a tree", + "scope": "git", + "id": "getTree", + "method": "GET", + "url": "/repos/{owner}/{repo}/git/trees/{tree_sha}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "tree_sha parameter", + "enum": null, + "name": "tree_sha", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "recursive parameter", + "enum": ["1"], + "name": "recursive", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List hooks", + "scope": "repos", + "id": "listHooks", + "method": "GET", + "url": "/repos/{owner}/{repo}/hooks", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Create a hook", + "scope": "repos", + "id": "createHook", + "method": "POST", + "url": "/repos/{owner}/{repo}/hooks", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`.", + "enum": null, + "name": "name", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/repos/hooks/#create-hook-config-params).", + "enum": null, + "name": "config", + "type": "object", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The URL to which the payloads will be delivered.", + "enum": null, + "name": "config.url", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`.", + "enum": null, + "name": "config.content_type", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value in the [`X-Hub-Signature`](https://developer.github.com/webhooks/#delivery-headers) header.", + "enum": null, + "name": "config.secret", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Determines whether the SSL certificate of the host for `url` will be verified when delivering payloads. Supported values include `0` (verification is performed) and `1` (verification is not performed). The default is `0`. **We strongly recommend not setting this to `1` as you are subject to man-in-the-middle and other attacks.**", + "enum": null, + "name": "config.insecure_ssl", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for.", + "enum": null, + "name": "events", + "type": "string[]", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.", + "enum": null, + "name": "active", + "type": "boolean", + "required": false + } + ] + }, + { + "name": "Get single hook", + "scope": "repos", + "id": "getHook", + "method": "GET", + "url": "/repos/{owner}/{repo}/hooks/{hook_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "hook_id parameter", + "enum": null, + "name": "hook_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Edit a hook", + "scope": "repos", + "id": "updateHook", + "method": "PATCH", + "url": "/repos/{owner}/{repo}/hooks/{hook_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "hook_id parameter", + "enum": null, + "name": "hook_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/repos/hooks/#create-hook-config-params).", + "enum": null, + "name": "config", + "type": "object", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The URL to which the payloads will be delivered.", + "enum": null, + "name": "config.url", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`.", + "enum": null, + "name": "config.content_type", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value in the [`X-Hub-Signature`](https://developer.github.com/webhooks/#delivery-headers) header.", + "enum": null, + "name": "config.secret", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Determines whether the SSL certificate of the host for `url` will be verified when delivering payloads. Supported values include `0` (verification is performed) and `1` (verification is not performed). The default is `0`. **We strongly recommend not setting this to `1` as you are subject to man-in-the-middle and other attacks.**", + "enum": null, + "name": "config.insecure_ssl", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. This replaces the entire array of events.", + "enum": null, + "name": "events", + "type": "string[]", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Determines a list of events to be added to the list of events that the Hook triggers for.", + "enum": null, + "name": "add_events", + "type": "string[]", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Determines a list of events to be removed from the list of events that the Hook triggers for.", + "enum": null, + "name": "remove_events", + "type": "string[]", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.", + "enum": null, + "name": "active", + "type": "boolean", + "required": false + } + ] + }, + { + "name": "Delete a hook", + "scope": "repos", + "id": "deleteHook", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/hooks/{hook_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "hook_id parameter", + "enum": null, + "name": "hook_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Ping a hook", + "scope": "repos", + "id": "pingHook", + "method": "POST", + "url": "/repos/{owner}/{repo}/hooks/{hook_id}/pings", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "hook_id parameter", + "enum": null, + "name": "hook_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Test a push hook", + "scope": "repos", + "id": "testPushHook", + "method": "POST", + "url": "/repos/{owner}/{repo}/hooks/{hook_id}/tests", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "hook_id parameter", + "enum": null, + "name": "hook_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Start an import", + "scope": "migrations", + "id": "startImport", + "method": "PUT", + "url": "/repos/{owner}/{repo}/import", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The URL of the originating repository.", + "enum": null, + "name": "vcs_url", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The originating VCS type. Can be one of `subversion`, `git`, `mercurial`, or `tfvc`. Please be aware that without this parameter, the import job will take additional time to detect the VCS type before beginning the import. This detection step will be reflected in the response.", + "enum": ["subversion", "git", "mercurial", "tfvc"], + "name": "vcs", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "If authentication is required, the username to provide to `vcs_url`.", + "enum": null, + "name": "vcs_username", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "If authentication is required, the password to provide to `vcs_url`.", + "enum": null, + "name": "vcs_password", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "For a tfvc import, the name of the project that is being imported.", + "enum": null, + "name": "tfvc_project", + "type": "string", + "required": false + } + ] + }, + { + "name": "Get import progress", + "scope": "migrations", + "id": "getImportProgress", + "method": "GET", + "url": "/repos/{owner}/{repo}/import", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "Update existing import", + "scope": "migrations", + "id": "updateImport", + "method": "PATCH", + "url": "/repos/{owner}/{repo}/import", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The username to provide to the originating repository.", + "enum": null, + "name": "vcs_username", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The password to provide to the originating repository.", + "enum": null, + "name": "vcs_password", + "type": "string", + "required": false + } + ] + }, + { + "name": "Cancel an import", + "scope": "migrations", + "id": "cancelImport", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/import", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get commit authors", + "scope": "migrations", + "id": "getCommitAuthors", + "method": "GET", + "url": "/repos/{owner}/{repo}/import/authors", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Only authors found after this id are returned. Provide the highest author ID you've seen so far. New authors may be added to the list at any point while the importer is performing the `raw` step.", + "enum": null, + "name": "since", + "type": "string", + "required": false + } + ] + }, + { + "name": "Map a commit author", + "scope": "migrations", + "id": "mapCommitAuthor", + "method": "PATCH", + "url": "/repos/{owner}/{repo}/import/authors/{author_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "author_id parameter", + "enum": null, + "name": "author_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The new Git author email.", + "enum": null, + "name": "email", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The new Git author name.", + "enum": null, + "name": "name", + "type": "string", + "required": false + } + ] + }, + { + "name": "Get large files", + "scope": "migrations", + "id": "getLargeFiles", + "method": "GET", + "url": "/repos/{owner}/{repo}/import/large_files", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "Set Git LFS preference", + "scope": "migrations", + "id": "setLfsPreference", + "method": "PATCH", + "url": "/repos/{owner}/{repo}/import/lfs", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Can be one of `opt_in` (large files will be stored using Git LFS) or `opt_out` (large files will be removed during the import).", + "enum": ["opt_in", "opt_out"], + "name": "use_lfs", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get a repository installation", + "scope": "apps", + "id": "getRepoInstallation", + "method": "GET", + "url": "/repos/{owner}/{repo}/installation", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get a repository installation", + "scope": "apps", + "id": "findRepoInstallation", + "method": "GET", + "url": "/repos/{owner}/{repo}/installation", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get interaction restrictions for a repository", + "scope": "interactions", + "id": "getRestrictionsForRepo", + "method": "GET", + "url": "/repos/{owner}/{repo}/interaction-limits", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "Add or update interaction restrictions for a repository", + "scope": "interactions", + "id": "addOrUpdateRestrictionsForRepo", + "method": "PUT", + "url": "/repos/{owner}/{repo}/interaction-limits", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Specifies the group of GitHub users who can comment, open issues, or create pull requests for the given repository. Must be one of: `existing_users`, `contributors_only`, or `collaborators_only`.", + "enum": ["existing_users", "contributors_only", "collaborators_only"], + "name": "limit", + "type": "string", + "required": true + } + ] + }, + { + "name": "Remove interaction restrictions for a repository", + "scope": "interactions", + "id": "removeRestrictionsForRepo", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/interaction-limits", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "List invitations for a repository", + "scope": "repos", + "id": "listInvitations", + "method": "GET", + "url": "/repos/{owner}/{repo}/invitations", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Delete a repository invitation", + "scope": "repos", + "id": "deleteInvitation", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/invitations/{invitation_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "invitation_id parameter", + "enum": null, + "name": "invitation_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Update a repository invitation", + "scope": "repos", + "id": "updateInvitation", + "method": "PATCH", + "url": "/repos/{owner}/{repo}/invitations/{invitation_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "invitation_id parameter", + "enum": null, + "name": "invitation_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The permissions that the associated user will have on the repository. Valid values are `read`, `write`, and `admin`.", + "enum": ["read", "write", "admin"], + "name": "permissions", + "type": "string", + "required": false + } + ] + }, + { + "name": "List issues for a repository", + "scope": "issues", + "id": "listForRepo", + "method": "GET", + "url": "/repos/{owner}/{repo}/issues", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "If an `integer` is passed, it should refer to a milestone by its `number` field. If the string `*` is passed, issues with any milestone are accepted. If the string `none` is passed, issues without milestones are returned.", + "enum": null, + "name": "milestone", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`.", + "enum": ["open", "closed", "all"], + "name": "state", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Can be the name of a user. Pass in `none` for issues with no assigned user, and `*` for issues assigned to any user.", + "enum": null, + "name": "assignee", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The user that created the issue.", + "enum": null, + "name": "creator", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A user that's mentioned in the issue.", + "enum": null, + "name": "mentioned", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A list of comma separated label names. Example: `bug,ui,@high`", + "enum": null, + "name": "labels", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "What to sort results by. Can be either `created`, `updated`, `comments`.", + "enum": ["created", "updated", "comments"], + "name": "sort", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The direction of the sort. Can be either `asc` or `desc`.", + "enum": ["asc", "desc"], + "name": "direction", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", + "enum": null, + "name": "since", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Create an issue", + "scope": "issues", + "id": "create", + "method": "POST", + "url": "/repos/{owner}/{repo}/issues", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The title of the issue.", + "enum": null, + "name": "title", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The contents of the issue.", + "enum": null, + "name": "body", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is deprecated.**_", + "enum": null, + "name": "assignee", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The `number` of the milestone to associate this issue with. _NOTE: Only users with push access can set the milestone for new issues. The milestone is silently dropped otherwise._", + "enum": null, + "name": "milestone", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._", + "enum": null, + "name": "labels", + "type": "string[]", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._", + "enum": null, + "name": "assignees", + "type": "string[]", + "required": false + } + ] + }, + { + "name": "List comments in a repository", + "scope": "issues", + "id": "listCommentsForRepo", + "method": "GET", + "url": "/repos/{owner}/{repo}/issues/comments", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Either `created` or `updated`.", + "enum": ["created", "updated"], + "name": "sort", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Either `asc` or `desc`. Ignored without the `sort` parameter.", + "enum": ["asc", "desc"], + "name": "direction", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Only comments updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", + "enum": null, + "name": "since", + "type": "string", + "required": false + } + ] + }, + { + "name": "Get a single comment", + "scope": "issues", + "id": "getComment", + "method": "GET", + "url": "/repos/{owner}/{repo}/issues/comments/{comment_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "comment_id parameter", + "enum": null, + "name": "comment_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Edit a comment", + "scope": "issues", + "id": "updateComment", + "method": "PATCH", + "url": "/repos/{owner}/{repo}/issues/comments/{comment_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "comment_id parameter", + "enum": null, + "name": "comment_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The contents of the comment.", + "enum": null, + "name": "body", + "type": "string", + "required": true + } + ] + }, + { + "name": "Delete a comment", + "scope": "issues", + "id": "deleteComment", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/issues/comments/{comment_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "comment_id parameter", + "enum": null, + "name": "comment_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "List reactions for an issue comment", + "scope": "reactions", + "id": "listForIssueComment", + "method": "GET", + "url": "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "comment_id parameter", + "enum": null, + "name": "comment_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to an issue comment.", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Create reaction for an issue comment", + "scope": "reactions", + "id": "createForIssueComment", + "method": "POST", + "url": "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "comment_id parameter", + "enum": null, + "name": "comment_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the issue comment.", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "type": "string", + "required": true + } + ] + }, + { + "name": "List events for a repository", + "scope": "issues", + "id": "listEventsForRepo", + "method": "GET", + "url": "/repos/{owner}/{repo}/issues/events", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Get a single event", + "scope": "issues", + "id": "getEvent", + "method": "GET", + "url": "/repos/{owner}/{repo}/issues/events/{event_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "event_id parameter", + "enum": null, + "name": "event_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Get a single issue", + "scope": "issues", + "id": "get", + "method": "GET", + "url": "/repos/{owner}/{repo}/issues/{issue_number}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "issue_number parameter", + "enum": null, + "name": "issue_number", + "type": "integer", + "required": true + }, + { + "alias": "issue_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "Edit an issue", + "scope": "issues", + "id": "update", + "method": "PATCH", + "url": "/repos/{owner}/{repo}/issues/{issue_number}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "issue_number parameter", + "enum": null, + "name": "issue_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The title of the issue.", + "enum": null, + "name": "title", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The contents of the issue.", + "enum": null, + "name": "body", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Login for the user that this issue should be assigned to. **This field is deprecated.**", + "enum": null, + "name": "assignee", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "State of the issue. Either `open` or `closed`.", + "enum": ["open", "closed"], + "name": "state", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": true, + "deprecated": null, + "description": "The `number` of the milestone to associate this issue with or `null` to remove current. _NOTE: Only users with push access can set the milestone for issues. The milestone is silently dropped otherwise._", + "enum": null, + "name": "milestone", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Labels to associate with this issue. Pass one or more Labels to _replace_ the set of Labels on this Issue. Send an empty array (`[]`) to clear all Labels from the Issue. _NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise._", + "enum": null, + "name": "labels", + "type": "string[]", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Logins for Users to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this Issue. Send an empty array (`[]`) to clear all assignees from the Issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._", + "enum": null, + "name": "assignees", + "type": "string[]", + "required": false + }, + { + "alias": "issue_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "Add assignees to an issue", + "scope": "issues", + "id": "addAssignees", + "method": "POST", + "url": "/repos/{owner}/{repo}/issues/{issue_number}/assignees", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "issue_number parameter", + "enum": null, + "name": "issue_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._", + "enum": null, + "name": "assignees", + "type": "string[]", + "required": false + }, + { + "alias": "issue_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "Remove assignees from an issue", + "scope": "issues", + "id": "removeAssignees", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/issues/{issue_number}/assignees", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "issue_number parameter", + "enum": null, + "name": "issue_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._", + "enum": null, + "name": "assignees", + "type": "string[]", + "required": false + }, + { + "alias": "issue_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "List comments on an issue", + "scope": "issues", + "id": "listComments", + "method": "GET", + "url": "/repos/{owner}/{repo}/issues/{issue_number}/comments", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "issue_number parameter", + "enum": null, + "name": "issue_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Only comments updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", + "enum": null, + "name": "since", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + }, + { + "alias": "issue_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "Create a comment", + "scope": "issues", + "id": "createComment", + "method": "POST", + "url": "/repos/{owner}/{repo}/issues/{issue_number}/comments", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "issue_number parameter", + "enum": null, + "name": "issue_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The contents of the comment.", + "enum": null, + "name": "body", + "type": "string", + "required": true + }, + { + "alias": "issue_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "List events for an issue", + "scope": "issues", + "id": "listEvents", + "method": "GET", + "url": "/repos/{owner}/{repo}/issues/{issue_number}/events", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "issue_number parameter", + "enum": null, + "name": "issue_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + }, + { + "alias": "issue_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "List labels on an issue", + "scope": "issues", + "id": "listLabelsOnIssue", + "method": "GET", + "url": "/repos/{owner}/{repo}/issues/{issue_number}/labels", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "issue_number parameter", + "enum": null, + "name": "issue_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + }, + { + "alias": "issue_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "Add labels to an issue", + "scope": "issues", + "id": "addLabels", + "method": "POST", + "url": "/repos/{owner}/{repo}/issues/{issue_number}/labels", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "issue_number parameter", + "enum": null, + "name": "issue_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the label to add to the issue. Must contain at least one label. **Note:** Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key.", + "enum": null, + "name": "labels", + "type": "string[]", + "required": true + }, + { + "alias": "issue_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "Replace all labels for an issue", + "scope": "issues", + "id": "replaceLabels", + "method": "PUT", + "url": "/repos/{owner}/{repo}/issues/{issue_number}/labels", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "issue_number parameter", + "enum": null, + "name": "issue_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The names of the labels to add to the issue. You can pass an empty array to remove all labels. **Note:** Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key.", + "enum": null, + "name": "labels", + "type": "string[]", + "required": false + }, + { + "alias": "issue_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "Remove all labels from an issue", + "scope": "issues", + "id": "removeLabels", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/issues/{issue_number}/labels", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "issue_number parameter", + "enum": null, + "name": "issue_number", + "type": "integer", + "required": true + }, + { + "alias": "issue_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "Remove a label from an issue", + "scope": "issues", + "id": "removeLabel", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "issue_number parameter", + "enum": null, + "name": "issue_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "name parameter", + "enum": null, + "name": "name", + "type": "string", + "required": true + }, + { + "alias": "issue_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "Lock an issue", + "scope": "issues", + "id": "lock", + "method": "PUT", + "url": "/repos/{owner}/{repo}/issues/{issue_number}/lock", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "issue_number parameter", + "enum": null, + "name": "issue_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons: \n\\* `off-topic` \n\\* `too heated` \n\\* `resolved` \n\\* `spam`", + "enum": ["off-topic", "too heated", "resolved", "spam"], + "name": "lock_reason", + "type": "string", + "required": false + }, + { + "alias": "issue_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "Unlock an issue", + "scope": "issues", + "id": "unlock", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/issues/{issue_number}/lock", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "issue_number parameter", + "enum": null, + "name": "issue_number", + "type": "integer", + "required": true + }, + { + "alias": "issue_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "List reactions for an issue", + "scope": "reactions", + "id": "listForIssue", + "method": "GET", + "url": "/repos/{owner}/{repo}/issues/{issue_number}/reactions", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "issue_number parameter", + "enum": null, + "name": "issue_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to an issue.", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + }, + { + "alias": "issue_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "Create reaction for an issue", + "scope": "reactions", + "id": "createForIssue", + "method": "POST", + "url": "/repos/{owner}/{repo}/issues/{issue_number}/reactions", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "issue_number parameter", + "enum": null, + "name": "issue_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the issue.", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "type": "string", + "required": true + }, + { + "alias": "issue_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "List events for an issue", + "scope": "issues", + "id": "listEventsForTimeline", + "method": "GET", + "url": "/repos/{owner}/{repo}/issues/{issue_number}/timeline", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "issue_number parameter", + "enum": null, + "name": "issue_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + }, + { + "alias": "issue_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "List deploy keys", + "scope": "repos", + "id": "listDeployKeys", + "method": "GET", + "url": "/repos/{owner}/{repo}/keys", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Add a new deploy key", + "scope": "repos", + "id": "addDeployKey", + "method": "POST", + "url": "/repos/{owner}/{repo}/keys", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A name for the key.", + "enum": null, + "name": "title", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The contents of the key.", + "enum": null, + "name": "key", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write. \n \nDeploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see \"[Repository permission levels for an organization](https://help.github.com/articles/repository-permission-levels-for-an-organization/)\" and \"[Permission levels for a user account repository](https://help.github.com/articles/permission-levels-for-a-user-account-repository/).\"", + "enum": null, + "name": "read_only", + "type": "boolean", + "required": false + } + ] + }, + { + "name": "Get a deploy key", + "scope": "repos", + "id": "getDeployKey", + "method": "GET", + "url": "/repos/{owner}/{repo}/keys/{key_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "key_id parameter", + "enum": null, + "name": "key_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Remove a deploy key", + "scope": "repos", + "id": "removeDeployKey", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/keys/{key_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "key_id parameter", + "enum": null, + "name": "key_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "List all labels for this repository", + "scope": "issues", + "id": "listLabelsForRepo", + "method": "GET", + "url": "/repos/{owner}/{repo}/labels", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Create a label", + "scope": "issues", + "id": "createLabel", + "method": "POST", + "url": "/repos/{owner}/{repo}/labels", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png \":strawberry:\"). For a full list of available emoji and codes, see [emoji-cheat-sheet.com](http://emoji-cheat-sheet.com/).", + "enum": null, + "name": "name", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`.", + "enum": null, + "name": "color", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A short description of the label.", + "enum": null, + "name": "description", + "type": "string", + "required": false + } + ] + }, + { + "name": "Get a single label", + "scope": "issues", + "id": "getLabel", + "method": "GET", + "url": "/repos/{owner}/{repo}/labels/{name}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "name parameter", + "enum": null, + "name": "name", + "type": "string", + "required": true + } + ] + }, + { + "name": "Update a label", + "scope": "issues", + "id": "updateLabel", + "method": "PATCH", + "url": "/repos/{owner}/{repo}/labels/{name}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "name parameter", + "enum": null, + "name": "name", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png \":strawberry:\"). For a full list of available emoji and codes, see [emoji-cheat-sheet.com](http://emoji-cheat-sheet.com/).", + "enum": null, + "name": "new_name", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`.", + "enum": null, + "name": "color", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A short description of the label.", + "enum": null, + "name": "description", + "type": "string", + "required": false + } + ] + }, + { + "name": "Delete a label", + "scope": "issues", + "id": "deleteLabel", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/labels/{name}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "name parameter", + "enum": null, + "name": "name", + "type": "string", + "required": true + } + ] + }, + { + "name": "List languages", + "scope": "repos", + "id": "listLanguages", + "method": "GET", + "url": "/repos/{owner}/{repo}/languages", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get the contents of a repository's license", + "scope": "licenses", + "id": "getForRepo", + "method": "GET", + "url": "/repos/{owner}/{repo}/license", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "Perform a merge", + "scope": "repos", + "id": "merge", + "method": "POST", + "url": "/repos/{owner}/{repo}/merges", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the base branch that the head will be merged into.", + "enum": null, + "name": "base", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The head to merge. This can be a branch name or a commit SHA1.", + "enum": null, + "name": "head", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Commit message to use for the merge commit. If omitted, a default message will be used.", + "enum": null, + "name": "commit_message", + "type": "string", + "required": false + } + ] + }, + { + "name": "List milestones for a repository", + "scope": "issues", + "id": "listMilestonesForRepo", + "method": "GET", + "url": "/repos/{owner}/{repo}/milestones", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The state of the milestone. Either `open`, `closed`, or `all`.", + "enum": ["open", "closed", "all"], + "name": "state", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "What to sort results by. Either `due_on` or `completeness`.", + "enum": ["due_on", "completeness"], + "name": "sort", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The direction of the sort. Either `asc` or `desc`.", + "enum": ["asc", "desc"], + "name": "direction", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Create a milestone", + "scope": "issues", + "id": "createMilestone", + "method": "POST", + "url": "/repos/{owner}/{repo}/milestones", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The title of the milestone.", + "enum": null, + "name": "title", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The state of the milestone. Either `open` or `closed`.", + "enum": ["open", "closed"], + "name": "state", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A description of the milestone.", + "enum": null, + "name": "description", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", + "enum": null, + "name": "due_on", + "type": "string", + "required": false + } + ] + }, + { + "name": "Get a single milestone", + "scope": "issues", + "id": "getMilestone", + "method": "GET", + "url": "/repos/{owner}/{repo}/milestones/{milestone_number}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "milestone_number parameter", + "enum": null, + "name": "milestone_number", + "type": "integer", + "required": true + }, + { + "alias": "milestone_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "Update a milestone", + "scope": "issues", + "id": "updateMilestone", + "method": "PATCH", + "url": "/repos/{owner}/{repo}/milestones/{milestone_number}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "milestone_number parameter", + "enum": null, + "name": "milestone_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The title of the milestone.", + "enum": null, + "name": "title", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The state of the milestone. Either `open` or `closed`.", + "enum": ["open", "closed"], + "name": "state", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A description of the milestone.", + "enum": null, + "name": "description", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", + "enum": null, + "name": "due_on", + "type": "string", + "required": false + }, + { + "alias": "milestone_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "Delete a milestone", + "scope": "issues", + "id": "deleteMilestone", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/milestones/{milestone_number}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "milestone_number parameter", + "enum": null, + "name": "milestone_number", + "type": "integer", + "required": true + }, + { + "alias": "milestone_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "Get labels for every issue in a milestone", + "scope": "issues", + "id": "listLabelsForMilestone", + "method": "GET", + "url": "/repos/{owner}/{repo}/milestones/{milestone_number}/labels", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "milestone_number parameter", + "enum": null, + "name": "milestone_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + }, + { + "alias": "milestone_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "List your notifications in a repository", + "scope": "activity", + "id": "listNotificationsForRepo", + "method": "GET", + "url": "/repos/{owner}/{repo}/notifications", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "If `true`, show notifications marked as read.", + "enum": null, + "name": "all", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "If `true`, only shows notifications in which the user is directly participating or mentioned.", + "enum": null, + "name": "participating", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", + "enum": null, + "name": "since", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", + "enum": null, + "name": "before", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Mark notifications as read in a repository", + "scope": "activity", + "id": "markNotificationsAsReadForRepo", + "method": "PUT", + "url": "/repos/{owner}/{repo}/notifications", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp.", + "enum": null, + "name": "last_read_at", + "type": "string", + "required": false + } + ] + }, + { + "name": "Get information about a Pages site", + "scope": "repos", + "id": "getPages", + "method": "GET", + "url": "/repos/{owner}/{repo}/pages", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "Enable a Pages site", + "scope": "repos", + "id": "enablePagesSite", + "method": "POST", + "url": "/repos/{owner}/{repo}/pages", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "source parameter", + "enum": null, + "name": "source", + "type": "object", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The repository branch used to publish your [site's source files](https://help.github.com/articles/configuring-a-publishing-source-for-github-pages/). Can be either `master` or `gh-pages`.", + "enum": ["master", "gh-pages"], + "name": "source.branch", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The repository directory that includes the source files for the Pages site. When `branch` is `master`, you can change `path` to `/docs`. When `branch` is `gh-pages`, you are unable to specify a `path` other than `/`.", + "enum": null, + "name": "source.path", + "type": "string", + "required": false + } + ] + }, + { + "name": "Disable a Pages site", + "scope": "repos", + "id": "disablePagesSite", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/pages", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "Update information about a Pages site", + "scope": "repos", + "id": "updateInformationAboutPagesSite", + "method": "PUT", + "url": "/repos/{owner}/{repo}/pages", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see \"[Using a custom domain with GitHub Pages](https://help.github.com/articles/using-a-custom-domain-with-github-pages/).\"", + "enum": null, + "name": "cname", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Update the source for the repository. Must include the branch name, and may optionally specify the subdirectory `/docs`. Possible values are `\"gh-pages\"`, `\"master\"`, and `\"master /docs\"`.", + "enum": ["\"gh-pages\"", "\"master\"", "\"master /docs\""], + "name": "source", + "type": "string", + "required": false + } + ] + }, + { + "name": "Request a page build", + "scope": "repos", + "id": "requestPageBuild", + "method": "POST", + "url": "/repos/{owner}/{repo}/pages/builds", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "List Pages builds", + "scope": "repos", + "id": "listPagesBuilds", + "method": "GET", + "url": "/repos/{owner}/{repo}/pages/builds", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Get latest Pages build", + "scope": "repos", + "id": "getLatestPagesBuild", + "method": "GET", + "url": "/repos/{owner}/{repo}/pages/builds/latest", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get a specific Pages build", + "scope": "repos", + "id": "getPagesBuild", + "method": "GET", + "url": "/repos/{owner}/{repo}/pages/builds/{build_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "build_id parameter", + "enum": null, + "name": "build_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "List repository projects", + "scope": "projects", + "id": "listForRepo", + "method": "GET", + "url": "/repos/{owner}/{repo}/projects", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`.", + "enum": ["open", "closed", "all"], + "name": "state", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Create a repository project", + "scope": "projects", + "id": "createForRepo", + "method": "POST", + "url": "/repos/{owner}/{repo}/projects", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the project.", + "enum": null, + "name": "name", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The description of the project.", + "enum": null, + "name": "body", + "type": "string", + "required": false + } + ] + }, + { + "name": "List pull requests", + "scope": "pulls", + "id": "list", + "method": "GET", + "url": "/repos/{owner}/{repo}/pulls", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Either `open`, `closed`, or `all` to filter by state.", + "enum": ["open", "closed", "all"], + "name": "state", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Filter pulls by head user or head organization and branch name in the format of `user:ref-name` or `organization:ref-name`. For example: `github:new-script-format` or `octocat:test-branch`.", + "enum": null, + "name": "head", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Filter pulls by base branch name. Example: `gh-pages`.", + "enum": null, + "name": "base", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "What to sort results by. Can be either `created`, `updated`, `popularity` (comment count) or `long-running` (age, filtering by pulls updated in the last month).", + "enum": ["created", "updated", "popularity", "long-running"], + "name": "sort", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The direction of the sort. Can be either `asc` or `desc`. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`.", + "enum": ["asc", "desc"], + "name": "direction", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Create a pull request", + "scope": "pulls", + "id": "create", + "method": "POST", + "url": "/repos/{owner}/{repo}/pulls", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The title of the new pull request.", + "enum": null, + "name": "title", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`.", + "enum": null, + "name": "head", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository.", + "enum": null, + "name": "base", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The contents of the pull request.", + "enum": null, + "name": "body", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request.", + "enum": null, + "name": "maintainer_can_modify", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Indicates whether the pull request is a draft. See \"[Draft Pull Requests](https://help.github.com/en/articles/about-pull-requests#draft-pull-requests)\" in the GitHub Help documentation to learn more.", + "enum": null, + "name": "draft", + "type": "boolean", + "required": false + } + ] + }, + { + "name": "List comments in a repository", + "scope": "pulls", + "id": "listCommentsForRepo", + "method": "GET", + "url": "/repos/{owner}/{repo}/pulls/comments", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Can be either `created` or `updated` comments.", + "enum": ["created", "updated"], + "name": "sort", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Can be either `asc` or `desc`. Ignored without `sort` parameter.", + "enum": ["asc", "desc"], + "name": "direction", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only returns comments `updated` at or after this time.", + "enum": null, + "name": "since", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Get a single comment", + "scope": "pulls", + "id": "getComment", + "method": "GET", + "url": "/repos/{owner}/{repo}/pulls/comments/{comment_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "comment_id parameter", + "enum": null, + "name": "comment_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Edit a comment", + "scope": "pulls", + "id": "updateComment", + "method": "PATCH", + "url": "/repos/{owner}/{repo}/pulls/comments/{comment_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "comment_id parameter", + "enum": null, + "name": "comment_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The text of the reply to the review comment.", + "enum": null, + "name": "body", + "type": "string", + "required": true + } + ] + }, + { + "name": "Delete a comment", + "scope": "pulls", + "id": "deleteComment", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/pulls/comments/{comment_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "comment_id parameter", + "enum": null, + "name": "comment_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "List reactions for a pull request review comment", + "scope": "reactions", + "id": "listForPullRequestReviewComment", + "method": "GET", + "url": "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "comment_id parameter", + "enum": null, + "name": "comment_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a pull request review comment.", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Create reaction for a pull request review comment", + "scope": "reactions", + "id": "createForPullRequestReviewComment", + "method": "POST", + "url": "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "comment_id parameter", + "enum": null, + "name": "comment_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the pull request review comment.", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get a single pull request", + "scope": "pulls", + "id": "get", + "method": "GET", + "url": "/repos/{owner}/{repo}/pulls/{pull_number}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "pull_number parameter", + "enum": null, + "name": "pull_number", + "type": "integer", + "required": true + }, + { + "alias": "pull_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "Update a pull request", + "scope": "pulls", + "id": "update", + "method": "PATCH", + "url": "/repos/{owner}/{repo}/pulls/{pull_number}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "pull_number parameter", + "enum": null, + "name": "pull_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The title of the pull request.", + "enum": null, + "name": "title", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The contents of the pull request.", + "enum": null, + "name": "body", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "State of this Pull Request. Either `open` or `closed`.", + "enum": ["open", "closed"], + "name": "state", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository.", + "enum": null, + "name": "base", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request.", + "enum": null, + "name": "maintainer_can_modify", + "type": "boolean", + "required": false + }, + { + "alias": "pull_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "List comments on a pull request", + "scope": "pulls", + "id": "listComments", + "method": "GET", + "url": "/repos/{owner}/{repo}/pulls/{pull_number}/comments", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "pull_number parameter", + "enum": null, + "name": "pull_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Can be either `created` or `updated` comments.", + "enum": ["created", "updated"], + "name": "sort", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Can be either `asc` or `desc`. Ignored without `sort` parameter.", + "enum": ["asc", "desc"], + "name": "direction", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only returns comments `updated` at or after this time.", + "enum": null, + "name": "since", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + }, + { + "alias": "pull_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "Create a comment", + "scope": "pulls", + "id": "createComment", + "method": "POST", + "url": "/repos/{owner}/{repo}/pulls/{pull_number}/comments", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "pull_number parameter", + "enum": null, + "name": "pull_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The text of the review comment.", + "enum": null, + "name": "body", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`.", + "enum": null, + "name": "commit_id", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The relative path to the file that necessitates a comment.", + "enum": null, + "name": "path", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "**Required without `comfort-fade` preview**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above.", + "enum": null, + "name": "position", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "**Required with `comfort-fade` preview**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see \"[Diff view options](https://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)\" in the GitHub Help documentation.", + "enum": ["LEFT", "RIGHT"], + "name": "side", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "**Required with `comfort-fade` preview**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to.", + "enum": null, + "name": "line", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "**Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see \"[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)\" in the GitHub Help documentation.", + "enum": null, + "name": "start_line", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "**Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see \"[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)\" in the GitHub Help documentation. See `side` in this table for additional context.", + "enum": ["LEFT", "RIGHT", "side"], + "name": "start_side", + "type": "string", + "required": false + }, + { + "alias": "pull_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + }, + { + "alias": null, + "allowNull": null, + "deprecated": true, + "description": "The comment ID to reply to. **Note**: This must be the ID of a top-level comment, not a reply to that comment. Replies to replies are not supported.", + "enum": null, + "name": "in_reply_to", + "type": "integer", + "required": null + } + ] + }, + { + "name": "Create a comment", + "scope": "pulls", + "id": "createCommentReply", + "method": "POST", + "url": "/repos/{owner}/{repo}/pulls/{pull_number}/comments", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "pull_number parameter", + "enum": null, + "name": "pull_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The text of the review comment.", + "enum": null, + "name": "body", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`.", + "enum": null, + "name": "commit_id", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The relative path to the file that necessitates a comment.", + "enum": null, + "name": "path", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "**Required without `comfort-fade` preview**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above.", + "enum": null, + "name": "position", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "**Required with `comfort-fade` preview**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see \"[Diff view options](https://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)\" in the GitHub Help documentation.", + "enum": ["LEFT", "RIGHT"], + "name": "side", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "**Required with `comfort-fade` preview**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to.", + "enum": null, + "name": "line", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "**Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see \"[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)\" in the GitHub Help documentation.", + "enum": null, + "name": "start_line", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "**Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see \"[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)\" in the GitHub Help documentation. See `side` in this table for additional context.", + "enum": ["LEFT", "RIGHT", "side"], + "name": "start_side", + "type": "string", + "required": false + }, + { + "alias": "pull_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + }, + { + "alias": null, + "allowNull": null, + "deprecated": true, + "description": "The comment ID to reply to. **Note**: This must be the ID of a top-level comment, not a reply to that comment. Replies to replies are not supported.", + "enum": null, + "name": "in_reply_to", + "type": "integer", + "required": null + } + ] + }, + { + "name": "Create a review comment reply", + "scope": "pulls", + "id": "createReviewCommentReply", + "method": "POST", + "url": "/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "pull_number parameter", + "enum": null, + "name": "pull_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "comment_id parameter", + "enum": null, + "name": "comment_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The text of the review comment.", + "enum": null, + "name": "body", + "type": "string", + "required": true + } + ] + }, + { + "name": "List commits on a pull request", + "scope": "pulls", + "id": "listCommits", + "method": "GET", + "url": "/repos/{owner}/{repo}/pulls/{pull_number}/commits", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "pull_number parameter", + "enum": null, + "name": "pull_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + }, + { + "alias": "pull_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "List pull requests files", + "scope": "pulls", + "id": "listFiles", + "method": "GET", + "url": "/repos/{owner}/{repo}/pulls/{pull_number}/files", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "pull_number parameter", + "enum": null, + "name": "pull_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + }, + { + "alias": "pull_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "Get if a pull request has been merged", + "scope": "pulls", + "id": "checkIfMerged", + "method": "GET", + "url": "/repos/{owner}/{repo}/pulls/{pull_number}/merge", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "pull_number parameter", + "enum": null, + "name": "pull_number", + "type": "integer", + "required": true + }, + { + "alias": "pull_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "Merge a pull request (Merge Button)", + "scope": "pulls", + "id": "merge", + "method": "PUT", + "url": "/repos/{owner}/{repo}/pulls/{pull_number}/merge", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "pull_number parameter", + "enum": null, + "name": "pull_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Title for the automatic commit message.", + "enum": null, + "name": "commit_title", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Extra detail to append to automatic commit message.", + "enum": null, + "name": "commit_message", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "SHA that pull request head must match to allow merge.", + "enum": null, + "name": "sha", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`.", + "enum": ["merge", "squash", "rebase"], + "name": "merge_method", + "type": "string", + "required": false + }, + { + "alias": "pull_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "List review requests", + "scope": "pulls", + "id": "listReviewRequests", + "method": "GET", + "url": "/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "pull_number parameter", + "enum": null, + "name": "pull_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + }, + { + "alias": "pull_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "Create a review request", + "scope": "pulls", + "id": "createReviewRequest", + "method": "POST", + "url": "/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "pull_number parameter", + "enum": null, + "name": "pull_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "An array of user `login`s that will be requested.", + "enum": null, + "name": "reviewers", + "type": "string[]", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "An array of team `slug`s that will be requested.", + "enum": null, + "name": "team_reviewers", + "type": "string[]", + "required": false + }, + { + "alias": "pull_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "Delete a review request", + "scope": "pulls", + "id": "deleteReviewRequest", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "pull_number parameter", + "enum": null, + "name": "pull_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "An array of user `login`s that will be removed.", + "enum": null, + "name": "reviewers", + "type": "string[]", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "An array of team `slug`s that will be removed.", + "enum": null, + "name": "team_reviewers", + "type": "string[]", + "required": false + }, + { + "alias": "pull_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "List reviews on a pull request", + "scope": "pulls", + "id": "listReviews", + "method": "GET", + "url": "/repos/{owner}/{repo}/pulls/{pull_number}/reviews", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "pull_number parameter", + "enum": null, + "name": "pull_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + }, + { + "alias": "pull_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "Create a pull request review", + "scope": "pulls", + "id": "createReview", + "method": "POST", + "url": "/repos/{owner}/{repo}/pulls/{pull_number}/reviews", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "pull_number parameter", + "enum": null, + "name": "pull_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value.", + "enum": null, + "name": "commit_id", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "**Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review.", + "enum": null, + "name": "body", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https://developer.github.com/v3/pulls/reviews/#submit-a-pull-request-review) when you are ready.", + "enum": ["APPROVE", "REQUEST_CHANGES", "COMMENT"], + "name": "event", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Use the following table to specify the location, destination, and contents of the draft review comment.", + "enum": null, + "name": "comments", + "type": "object[]", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The relative path to the file that necessitates a review comment.", + "enum": null, + "name": "comments[].path", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below.", + "enum": null, + "name": "comments[].position", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Text of the review comment.", + "enum": null, + "name": "comments[].body", + "type": "string", + "required": true + }, + { + "alias": "pull_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "Get a single review", + "scope": "pulls", + "id": "getReview", + "method": "GET", + "url": "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "pull_number parameter", + "enum": null, + "name": "pull_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "review_id parameter", + "enum": null, + "name": "review_id", + "type": "integer", + "required": true + }, + { + "alias": "pull_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "Delete a pending review", + "scope": "pulls", + "id": "deletePendingReview", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "pull_number parameter", + "enum": null, + "name": "pull_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "review_id parameter", + "enum": null, + "name": "review_id", + "type": "integer", + "required": true + }, + { + "alias": "pull_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "Update a pull request review", + "scope": "pulls", + "id": "updateReview", + "method": "PUT", + "url": "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "pull_number parameter", + "enum": null, + "name": "pull_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "review_id parameter", + "enum": null, + "name": "review_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The body text of the pull request review.", + "enum": null, + "name": "body", + "type": "string", + "required": true + }, + { + "alias": "pull_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "Get comments for a single review", + "scope": "pulls", + "id": "getCommentsForReview", + "method": "GET", + "url": "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "pull_number parameter", + "enum": null, + "name": "pull_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "review_id parameter", + "enum": null, + "name": "review_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + }, + { + "alias": "pull_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "Dismiss a pull request review", + "scope": "pulls", + "id": "dismissReview", + "method": "PUT", + "url": "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "pull_number parameter", + "enum": null, + "name": "pull_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "review_id parameter", + "enum": null, + "name": "review_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The message for the pull request review dismissal", + "enum": null, + "name": "message", + "type": "string", + "required": true + }, + { + "alias": "pull_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "Submit a pull request review", + "scope": "pulls", + "id": "submitReview", + "method": "POST", + "url": "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "pull_number parameter", + "enum": null, + "name": "pull_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "review_id parameter", + "enum": null, + "name": "review_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The body text of the pull request review", + "enum": null, + "name": "body", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When you leave this blank, the API returns _HTTP 422 (Unrecognizable entity)_ and sets the review action state to `PENDING`, which means you will need to re-submit the pull request review using a review action.", + "enum": ["APPROVE", "REQUEST_CHANGES", "COMMENT"], + "name": "event", + "type": "string", + "required": true + }, + { + "alias": "pull_number", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "number", + "type": null, + "required": null + } + ] + }, + { + "name": "Update a pull request branch", + "scope": "pulls", + "id": "updateBranch", + "method": "PUT", + "url": "/repos/{owner}/{repo}/pulls/{pull_number}/update-branch", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "pull_number parameter", + "enum": null, + "name": "pull_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a `422 Unprocessable Entity` status. You can use the \"[List commits on a repository](https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository)\" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref.", + "enum": null, + "name": "expected_head_sha", + "type": "string", + "required": false + } + ] + }, + { + "name": "Get the README", + "scope": "repos", + "id": "getReadme", + "method": "GET", + "url": "/repos/{owner}/{repo}/readme", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`)", + "enum": null, + "name": "ref", + "type": "string", + "required": false + } + ] + }, + { + "name": "List releases for a repository", + "scope": "repos", + "id": "listReleases", + "method": "GET", + "url": "/repos/{owner}/{repo}/releases", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Create a release", + "scope": "repos", + "id": "createRelease", + "method": "POST", + "url": "/repos/{owner}/{repo}/releases", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the tag.", + "enum": null, + "name": "tag_name", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`).", + "enum": null, + "name": "target_commitish", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the release.", + "enum": null, + "name": "name", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Text describing the contents of the tag.", + "enum": null, + "name": "body", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "`true` to create a draft (unpublished) release, `false` to create a published one.", + "enum": null, + "name": "draft", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "`true` to identify the release as a prerelease. `false` to identify the release as a full release.", + "enum": null, + "name": "prerelease", + "type": "boolean", + "required": false + } + ] + }, + { + "name": "Get a single release asset", + "scope": "repos", + "id": "getReleaseAsset", + "method": "GET", + "url": "/repos/{owner}/{repo}/releases/assets/{asset_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "asset_id parameter", + "enum": null, + "name": "asset_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Edit a release asset", + "scope": "repos", + "id": "updateReleaseAsset", + "method": "PATCH", + "url": "/repos/{owner}/{repo}/releases/assets/{asset_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "asset_id parameter", + "enum": null, + "name": "asset_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The file name of the asset.", + "enum": null, + "name": "name", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "An alternate short description of the asset. Used in place of the filename.", + "enum": null, + "name": "label", + "type": "string", + "required": false + } + ] + }, + { + "name": "Delete a release asset", + "scope": "repos", + "id": "deleteReleaseAsset", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/releases/assets/{asset_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "asset_id parameter", + "enum": null, + "name": "asset_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Get the latest release", + "scope": "repos", + "id": "getLatestRelease", + "method": "GET", + "url": "/repos/{owner}/{repo}/releases/latest", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get a release by tag name", + "scope": "repos", + "id": "getReleaseByTag", + "method": "GET", + "url": "/repos/{owner}/{repo}/releases/tags/{tag}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "tag parameter", + "enum": null, + "name": "tag", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get a single release", + "scope": "repos", + "id": "getRelease", + "method": "GET", + "url": "/repos/{owner}/{repo}/releases/{release_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "release_id parameter", + "enum": null, + "name": "release_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Edit a release", + "scope": "repos", + "id": "updateRelease", + "method": "PATCH", + "url": "/repos/{owner}/{repo}/releases/{release_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "release_id parameter", + "enum": null, + "name": "release_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the tag.", + "enum": null, + "name": "tag_name", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`).", + "enum": null, + "name": "target_commitish", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the release.", + "enum": null, + "name": "name", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Text describing the contents of the tag.", + "enum": null, + "name": "body", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "`true` makes the release a draft, and `false` publishes the release.", + "enum": null, + "name": "draft", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "`true` to identify the release as a prerelease, `false` to identify the release as a full release.", + "enum": null, + "name": "prerelease", + "type": "boolean", + "required": false + } + ] + }, + { + "name": "Delete a release", + "scope": "repos", + "id": "deleteRelease", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/releases/{release_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "release_id parameter", + "enum": null, + "name": "release_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "List assets for a release", + "scope": "repos", + "id": "listAssetsForRelease", + "method": "GET", + "url": "/repos/{owner}/{repo}/releases/{release_id}/assets", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "release_id parameter", + "enum": null, + "name": "release_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List Stargazers", + "scope": "activity", + "id": "listStargazersForRepo", + "method": "GET", + "url": "/repos/{owner}/{repo}/stargazers", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Get the number of additions and deletions per week", + "scope": "repos", + "id": "getCodeFrequencyStats", + "method": "GET", + "url": "/repos/{owner}/{repo}/stats/code_frequency", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get the last year of commit activity data", + "scope": "repos", + "id": "getCommitActivityStats", + "method": "GET", + "url": "/repos/{owner}/{repo}/stats/commit_activity", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get contributors list with additions, deletions, and commit counts", + "scope": "repos", + "id": "getContributorsStats", + "method": "GET", + "url": "/repos/{owner}/{repo}/stats/contributors", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get the weekly commit count for the repository owner and everyone else", + "scope": "repos", + "id": "getParticipationStats", + "method": "GET", + "url": "/repos/{owner}/{repo}/stats/participation", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get the number of commits per hour in each day", + "scope": "repos", + "id": "getPunchCardStats", + "method": "GET", + "url": "/repos/{owner}/{repo}/stats/punch_card", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "Create a status", + "scope": "repos", + "id": "createStatus", + "method": "POST", + "url": "/repos/{owner}/{repo}/statuses/{sha}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "sha parameter", + "enum": null, + "name": "sha", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The state of the status. Can be one of `error`, `failure`, `pending`, or `success`.", + "enum": ["error", "failure", "pending", "success"], + "name": "state", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status. \nFor example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA: \n`http://ci.example.com/user/repo/build/sha`", + "enum": null, + "name": "target_url", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A short description of the status.", + "enum": null, + "name": "description", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A string label to differentiate this status from the status of other systems.", + "enum": null, + "name": "context", + "type": "string", + "required": false + } + ] + }, + { + "name": "List watchers", + "scope": "activity", + "id": "listWatchersForRepo", + "method": "GET", + "url": "/repos/{owner}/{repo}/subscribers", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Get a Repository Subscription", + "scope": "activity", + "id": "getRepoSubscription", + "method": "GET", + "url": "/repos/{owner}/{repo}/subscription", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "Set a Repository Subscription", + "scope": "activity", + "id": "setRepoSubscription", + "method": "PUT", + "url": "/repos/{owner}/{repo}/subscription", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Determines if notifications should be received from this repository.", + "enum": null, + "name": "subscribed", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Determines if all notifications should be blocked from this repository.", + "enum": null, + "name": "ignored", + "type": "boolean", + "required": false + } + ] + }, + { + "name": "Delete a Repository Subscription", + "scope": "activity", + "id": "deleteRepoSubscription", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/subscription", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "List tags", + "scope": "repos", + "id": "listTags", + "method": "GET", + "url": "/repos/{owner}/{repo}/tags", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List teams", + "scope": "repos", + "id": "listTeams", + "method": "GET", + "url": "/repos/{owner}/{repo}/teams", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List all topics for a repository", + "scope": "repos", + "id": "listTopics", + "method": "GET", + "url": "/repos/{owner}/{repo}/topics", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "Replace all topics for a repository", + "scope": "repos", + "id": "replaceTopics", + "method": "PUT", + "url": "/repos/{owner}/{repo}/topics", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "An array of topics to add to the repository. Pass one or more topics to _replace_ the set of existing topics. Send an empty array (`[]`) to clear all topics from the repository. **Note:** Topic `names` cannot contain uppercase letters.", + "enum": null, + "name": "names", + "type": "string[]", + "required": true + } + ] + }, + { + "name": "Clones", + "scope": "repos", + "id": "getClones", + "method": "GET", + "url": "/repos/{owner}/{repo}/traffic/clones", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Must be one of: `day`, `week`.", + "enum": ["day", "week"], + "name": "per", + "type": "string", + "required": false + } + ] + }, + { + "name": "List paths", + "scope": "repos", + "id": "getTopPaths", + "method": "GET", + "url": "/repos/{owner}/{repo}/traffic/popular/paths", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "List referrers", + "scope": "repos", + "id": "getTopReferrers", + "method": "GET", + "url": "/repos/{owner}/{repo}/traffic/popular/referrers", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "Views", + "scope": "repos", + "id": "getViews", + "method": "GET", + "url": "/repos/{owner}/{repo}/traffic/views", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Must be one of: `day`, `week`.", + "enum": ["day", "week"], + "name": "per", + "type": "string", + "required": false + } + ] + }, + { + "name": "Transfer a repository", + "scope": "repos", + "id": "transfer", + "method": "POST", + "url": "/repos/{owner}/{repo}/transfer", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "**Required:** The username or organization name the repository will be transferred to.", + "enum": null, + "name": "new_owner", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.", + "enum": null, + "name": "team_ids", + "type": "integer[]", + "required": false + } + ] + }, + { + "name": "Check if vulnerability alerts are enabled for a repository", + "scope": "repos", + "id": "checkVulnerabilityAlerts", + "method": "GET", + "url": "/repos/{owner}/{repo}/vulnerability-alerts", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "Enable vulnerability alerts", + "scope": "repos", + "id": "enableVulnerabilityAlerts", + "method": "PUT", + "url": "/repos/{owner}/{repo}/vulnerability-alerts", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "Disable vulnerability alerts", + "scope": "repos", + "id": "disableVulnerabilityAlerts", + "method": "DELETE", + "url": "/repos/{owner}/{repo}/vulnerability-alerts", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get archive link", + "scope": "repos", + "id": "getArchiveLink", + "method": "GET", + "url": "/repos/{owner}/{repo}/{archive_format}/{ref}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "archive_format parameter", + "enum": null, + "name": "archive_format", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "ref parameter", + "enum": null, + "name": "ref", + "type": "string", + "required": true + } + ] + }, + { + "name": "Create repository using a repository template", + "scope": "repos", + "id": "createUsingTemplate", + "method": "POST", + "url": "/repos/{template_owner}/{template_repo}/generate", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "template_owner parameter", + "enum": null, + "name": "template_owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "template_repo parameter", + "enum": null, + "name": "template_repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization.", + "enum": null, + "name": "owner", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the new repository.", + "enum": null, + "name": "name", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A short description of the new repository.", + "enum": null, + "name": "description", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Either `true` to create a new private repository or `false` to create a new public one.", + "enum": null, + "name": "private", + "type": "boolean", + "required": false + } + ] + }, + { + "name": "List all public repositories", + "scope": "repos", + "id": "listPublic", + "method": "GET", + "url": "/repositories", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The integer ID of the last Repository that you've seen.", + "enum": null, + "name": "since", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Get a list of provisioned identities", + "scope": "scim", + "id": "listProvisionedIdentities", + "method": "GET", + "url": "/scim/v2/organizations/{org}/Users", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Used for pagination: the index of the first result to return.", + "enum": null, + "name": "startIndex", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Used for pagination: the number of results to return.", + "enum": null, + "name": "count", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Filters results using the equals query parameter operator (`eq`). You can filter results that are equal to `id`, `userName`, `emails`, and `external_id`. For example, to search for an identity with the `userName` Octocat, you would use this query: `?filter=userName%20eq%20\\\"Octocat\\\"`.", + "enum": null, + "name": "filter", + "type": "string", + "required": false + } + ] + }, + { + "name": "Provision and invite users", + "scope": "scim", + "id": "provisionAndInviteUsers", + "method": "POST", + "url": "/scim/v2/organizations/{org}/Users", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + } + ] + }, + { + "name": "Provision and invite users", + "scope": "scim", + "id": "provisionInviteUsers", + "method": "POST", + "url": "/scim/v2/organizations/{org}/Users", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get provisioning details for a single user", + "scope": "scim", + "id": "getProvisioningDetailsForUser", + "method": "GET", + "url": "/scim/v2/organizations/{org}/Users/{scim_user_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "scim_user_id parameter", + "enum": null, + "name": "scim_user_id", + "type": "integer", + "required": true + }, + { + "alias": "scim_user_id", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "external_identity_guid", + "type": null, + "required": null + } + ] + }, + { + "name": "Replace a provisioned user's information", + "scope": "scim", + "id": "replaceProvisionedUserInformation", + "method": "PUT", + "url": "/scim/v2/organizations/{org}/Users/{scim_user_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "scim_user_id parameter", + "enum": null, + "name": "scim_user_id", + "type": "integer", + "required": true + }, + { + "alias": "scim_user_id", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "external_identity_guid", + "type": null, + "required": null + } + ] + }, + { + "name": "Replace a provisioned user's information", + "scope": "scim", + "id": "updateProvisionedOrgMembership", + "method": "PUT", + "url": "/scim/v2/organizations/{org}/Users/{scim_user_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "scim_user_id parameter", + "enum": null, + "name": "scim_user_id", + "type": "integer", + "required": true + }, + { + "alias": "scim_user_id", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "external_identity_guid", + "type": null, + "required": null + } + ] + }, + { + "name": "Update a user attribute", + "scope": "scim", + "id": "updateUserAttribute", + "method": "PATCH", + "url": "/scim/v2/organizations/{org}/Users/{scim_user_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "scim_user_id parameter", + "enum": null, + "name": "scim_user_id", + "type": "integer", + "required": true + }, + { + "alias": "scim_user_id", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "external_identity_guid", + "type": null, + "required": null + } + ] + }, + { + "name": "Remove a user from the organization", + "scope": "scim", + "id": "removeUserFromOrg", + "method": "DELETE", + "url": "/scim/v2/organizations/{org}/Users/{scim_user_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "scim_user_id parameter", + "enum": null, + "name": "scim_user_id", + "type": "integer", + "required": true + }, + { + "alias": "scim_user_id", + "allowNull": null, + "deprecated": true, + "description": null, + "enum": null, + "name": "external_identity_guid", + "type": null, + "required": null + } + ] + }, + { + "name": "Search code", + "scope": "search", + "id": "code", + "method": "GET", + "url": "/search/code", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See \"[Searching code](https://help.github.com/articles/searching-code/)\" for a detailed list of qualifiers.", + "enum": null, + "name": "q", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub search infrastructure. Default: [best match](https://developer.github.com/v3/search/#ranking-search-results)", + "enum": ["indexed"], + "name": "sort", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`.", + "enum": ["desc", "asc"], + "name": "order", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Search commits", + "scope": "search", + "id": "commits", + "method": "GET", + "url": "/search/commits", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See \"[Searching commits](https://help.github.com/articles/searching-commits/)\" for a detailed list of qualifiers.", + "enum": null, + "name": "q", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://developer.github.com/v3/search/#ranking-search-results)", + "enum": ["author-date", "committer-date"], + "name": "sort", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`.", + "enum": ["desc", "asc"], + "name": "order", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Search issues and pull requests", + "scope": "search", + "id": "issuesAndPullRequests", + "method": "GET", + "url": "/search/issues", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See \"[Searching issues and pull requests](https://help.github.com/articles/searching-issues-and-pull-requests/)\" for a detailed list of qualifiers.", + "enum": null, + "name": "q", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, Default: [best match](https://developer.github.com/v3/search/#ranking-search-results)", + "enum": [ + "comments", + "reactions", + "reactions-+1", + "reactions--1", + "reactions-smile", + "reactions-thinking_face", + "reactions-heart", + "reactions-tada", + "interactions", + "created", + "updated" + ], + "name": "sort", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`.", + "enum": ["desc", "asc"], + "name": "order", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Search issues and pull requests", + "scope": "search", + "id": "issues", + "method": "GET", + "url": "/search/issues", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See \"[Searching issues and pull requests](https://help.github.com/articles/searching-issues-and-pull-requests/)\" for a detailed list of qualifiers.", + "enum": null, + "name": "q", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, Default: [best match](https://developer.github.com/v3/search/#ranking-search-results)", + "enum": [ + "comments", + "reactions", + "reactions-+1", + "reactions--1", + "reactions-smile", + "reactions-thinking_face", + "reactions-heart", + "reactions-tada", + "interactions", + "created", + "updated" + ], + "name": "sort", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`.", + "enum": ["desc", "asc"], + "name": "order", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Search labels", + "scope": "search", + "id": "labels", + "method": "GET", + "url": "/search/labels", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The id of the repository.", + "enum": null, + "name": "repository_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The search keywords. This endpoint does not accept qualifiers in the query. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query).", + "enum": null, + "name": "q", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://developer.github.com/v3/search/#ranking-search-results)", + "enum": ["created", "updated"], + "name": "sort", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`.", + "enum": ["desc", "asc"], + "name": "order", + "type": "string", + "required": false + } + ] + }, + { + "name": "Search repositories", + "scope": "search", + "id": "repos", + "method": "GET", + "url": "/search/repositories", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See \"[Searching for repositories](https://help.github.com/articles/searching-for-repositories/)\" for a detailed list of qualifiers.", + "enum": null, + "name": "q", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Sorts the results of your query by number of `stars`, `forks`, or `help-wanted-issues` or how recently the items were `updated`. Default: [best match](https://developer.github.com/v3/search/#ranking-search-results)", + "enum": ["stars", "forks", "help-wanted-issues", "updated"], + "name": "sort", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`.", + "enum": ["desc", "asc"], + "name": "order", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Search topics", + "scope": "search", + "id": "topics", + "method": "GET", + "url": "/search/topics", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query).", + "enum": null, + "name": "q", + "type": "string", + "required": true + } + ] + }, + { + "name": "Search users", + "scope": "search", + "id": "users", + "method": "GET", + "url": "/search/users", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See \"[Searching users](https://help.github.com/articles/searching-users/)\" for a detailed list of qualifiers.", + "enum": null, + "name": "q", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Sorts the results of your query by number of `followers` or `repositories`, or when the person `joined` GitHub. Default: [best match](https://developer.github.com/v3/search/#ranking-search-results)", + "enum": ["followers", "repositories", "joined"], + "name": "sort", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`.", + "enum": ["desc", "asc"], + "name": "order", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Get team", + "scope": "teams", + "id": "get", + "method": "GET", + "url": "/teams/{team_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Edit team", + "scope": "teams", + "id": "update", + "method": "PATCH", + "url": "/teams/{team_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the team.", + "enum": null, + "name": "name", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The description of the team.", + "enum": null, + "name": "description", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. The options are: \n**For a non-nested team:** \n\\* `secret` - only visible to organization owners and members of this team. \n\\* `closed` - visible to all members of this organization. \n**For a parent or child team:** \n\\* `closed` - visible to all members of this organization.", + "enum": ["secret", "closed"], + "name": "privacy", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \n\\* `pull` - team members can pull, but not push to or administer newly-added repositories. \n\\* `push` - team members can pull and push, but not administer newly-added repositories. \n\\* `admin` - team members can pull, push and administer newly-added repositories.", + "enum": ["pull", "push", "admin"], + "name": "permission", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The ID of a team to set as the parent team. **Note**: You must pass the `hellcat-preview` media type to use this parameter.", + "enum": null, + "name": "parent_team_id", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Delete team", + "scope": "teams", + "id": "delete", + "method": "DELETE", + "url": "/teams/{team_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "List discussions", + "scope": "teams", + "id": "listDiscussions", + "method": "GET", + "url": "/teams/{team_id}/discussions", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Sorts the discussion comments by the date they were created. To return the oldest comments first, set to `asc`. Can be one of `asc` or `desc`.", + "enum": ["asc", "desc"], + "name": "direction", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Create a discussion", + "scope": "teams", + "id": "createDiscussion", + "method": "POST", + "url": "/teams/{team_id}/discussions", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The discussion post's title.", + "enum": null, + "name": "title", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The discussion post's body text.", + "enum": null, + "name": "body", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post.", + "enum": null, + "name": "private", + "type": "boolean", + "required": false + } + ] + }, + { + "name": "Get a single discussion", + "scope": "teams", + "id": "getDiscussion", + "method": "GET", + "url": "/teams/{team_id}/discussions/{discussion_number}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "discussion_number parameter", + "enum": null, + "name": "discussion_number", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Edit a discussion", + "scope": "teams", + "id": "updateDiscussion", + "method": "PATCH", + "url": "/teams/{team_id}/discussions/{discussion_number}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "discussion_number parameter", + "enum": null, + "name": "discussion_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The discussion post's title.", + "enum": null, + "name": "title", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The discussion post's body text.", + "enum": null, + "name": "body", + "type": "string", + "required": false + } + ] + }, + { + "name": "Delete a discussion", + "scope": "teams", + "id": "deleteDiscussion", + "method": "DELETE", + "url": "/teams/{team_id}/discussions/{discussion_number}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "discussion_number parameter", + "enum": null, + "name": "discussion_number", + "type": "integer", + "required": true + } + ] + }, + { + "name": "List comments", + "scope": "teams", + "id": "listDiscussionComments", + "method": "GET", + "url": "/teams/{team_id}/discussions/{discussion_number}/comments", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "discussion_number parameter", + "enum": null, + "name": "discussion_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Sorts the discussion comments by the date they were created. To return the oldest comments first, set to `asc`. Can be one of `asc` or `desc`.", + "enum": ["asc", "desc"], + "name": "direction", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Create a comment", + "scope": "teams", + "id": "createDiscussionComment", + "method": "POST", + "url": "/teams/{team_id}/discussions/{discussion_number}/comments", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "discussion_number parameter", + "enum": null, + "name": "discussion_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The discussion comment's body text.", + "enum": null, + "name": "body", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get a single comment", + "scope": "teams", + "id": "getDiscussionComment", + "method": "GET", + "url": "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "discussion_number parameter", + "enum": null, + "name": "discussion_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "comment_number parameter", + "enum": null, + "name": "comment_number", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Edit a comment", + "scope": "teams", + "id": "updateDiscussionComment", + "method": "PATCH", + "url": "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "discussion_number parameter", + "enum": null, + "name": "discussion_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "comment_number parameter", + "enum": null, + "name": "comment_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The discussion comment's body text.", + "enum": null, + "name": "body", + "type": "string", + "required": true + } + ] + }, + { + "name": "Delete a comment", + "scope": "teams", + "id": "deleteDiscussionComment", + "method": "DELETE", + "url": "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "discussion_number parameter", + "enum": null, + "name": "discussion_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "comment_number parameter", + "enum": null, + "name": "comment_number", + "type": "integer", + "required": true + } + ] + }, + { + "name": "List reactions for a team discussion comment", + "scope": "reactions", + "id": "listForTeamDiscussionComment", + "method": "GET", + "url": "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "discussion_number parameter", + "enum": null, + "name": "discussion_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "comment_number parameter", + "enum": null, + "name": "comment_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a team discussion comment.", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Create reaction for a team discussion comment", + "scope": "reactions", + "id": "createForTeamDiscussionComment", + "method": "POST", + "url": "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "discussion_number parameter", + "enum": null, + "name": "discussion_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "comment_number parameter", + "enum": null, + "name": "comment_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion comment.", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "type": "string", + "required": true + } + ] + }, + { + "name": "List reactions for a team discussion", + "scope": "reactions", + "id": "listForTeamDiscussion", + "method": "GET", + "url": "/teams/{team_id}/discussions/{discussion_number}/reactions", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "discussion_number parameter", + "enum": null, + "name": "discussion_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a team discussion.", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Create reaction for a team discussion", + "scope": "reactions", + "id": "createForTeamDiscussion", + "method": "POST", + "url": "/teams/{team_id}/discussions/{discussion_number}/reactions", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "discussion_number parameter", + "enum": null, + "name": "discussion_number", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion.", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "type": "string", + "required": true + } + ] + }, + { + "name": "List pending team invitations", + "scope": "teams", + "id": "listPendingInvitations", + "method": "GET", + "url": "/teams/{team_id}/invitations", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List team members", + "scope": "teams", + "id": "listMembers", + "method": "GET", + "url": "/teams/{team_id}/members", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Filters members returned by their role in the team. Can be one of: \n\\* `member` - normal members of the team. \n\\* `maintainer` - team maintainers. \n\\* `all` - all members of the team.", + "enum": ["member", "maintainer", "all"], + "name": "role", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Get team member", + "scope": "teams", + "id": "getMember", + "method": "GET", + "url": "/teams/{team_id}/members/{username}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + } + ] + }, + { + "name": "Add team member", + "scope": "teams", + "id": "addMember", + "method": "PUT", + "url": "/teams/{team_id}/members/{username}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + } + ] + }, + { + "name": "Remove team member", + "scope": "teams", + "id": "removeMember", + "method": "DELETE", + "url": "/teams/{team_id}/members/{username}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get team membership", + "scope": "teams", + "id": "getMembership", + "method": "GET", + "url": "/teams/{team_id}/memberships/{username}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + } + ] + }, + { + "name": "Add or update team membership", + "scope": "teams", + "id": "addOrUpdateMembership", + "method": "PUT", + "url": "/teams/{team_id}/memberships/{username}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The role that this user should have in the team. Can be one of: \n\\* `member` - a normal member of the team. \n\\* `maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description.", + "enum": ["member", "maintainer"], + "name": "role", + "type": "string", + "required": false + } + ] + }, + { + "name": "Remove team membership", + "scope": "teams", + "id": "removeMembership", + "method": "DELETE", + "url": "/teams/{team_id}/memberships/{username}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + } + ] + }, + { + "name": "List team projects", + "scope": "teams", + "id": "listProjects", + "method": "GET", + "url": "/teams/{team_id}/projects", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Review a team project", + "scope": "teams", + "id": "reviewProject", + "method": "GET", + "url": "/teams/{team_id}/projects/{project_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "project_id parameter", + "enum": null, + "name": "project_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Add or update team project", + "scope": "teams", + "id": "addOrUpdateProject", + "method": "PUT", + "url": "/teams/{team_id}/projects/{project_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "project_id parameter", + "enum": null, + "name": "project_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The permission to grant to the team for this project. Can be one of: \n\\* `read` - team members can read, but not write to or administer this project. \n\\* `write` - team members can read and write, but not administer this project. \n\\* `admin` - team members can read, write and administer this project. \nDefault: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://developer.github.com/v3/#http-verbs).\" \n**Note**: If you pass the `hellcat-preview` media type, you can promote—but not demote—a `permission` attribute inherited from a parent team.", + "enum": ["read", "write", "admin"], + "name": "permission", + "type": "string", + "required": false + } + ] + }, + { + "name": "Remove team project", + "scope": "teams", + "id": "removeProject", + "method": "DELETE", + "url": "/teams/{team_id}/projects/{project_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "project_id parameter", + "enum": null, + "name": "project_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "List team repos", + "scope": "teams", + "id": "listRepos", + "method": "GET", + "url": "/teams/{team_id}/repos", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Check if a team manages a repository", + "scope": "teams", + "id": "checkManagesRepo", + "method": "GET", + "url": "/teams/{team_id}/repos/{owner}/{repo}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "Add or update team repository", + "scope": "teams", + "id": "addOrUpdateRepo", + "method": "PUT", + "url": "/teams/{team_id}/repos/{owner}/{repo}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The permission to grant the team on this repository. Can be one of: \n\\* `pull` - team members can pull, but not push to or administer this repository. \n\\* `push` - team members can pull and push, but not administer this repository. \n\\* `admin` - team members can pull, push and administer this repository. \n \nIf no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. \n**Note**: If you pass the `hellcat-preview` media type, you can promote—but not demote—a `permission` attribute inherited through a parent team.", + "enum": ["pull", "push", "admin"], + "name": "permission", + "type": "string", + "required": false + } + ] + }, + { + "name": "Remove team repository", + "scope": "teams", + "id": "removeRepo", + "method": "DELETE", + "url": "/teams/{team_id}/repos/{owner}/{repo}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "List IdP groups for a team", + "scope": "teams", + "id": "listIdPGroups", + "method": "GET", + "url": "/teams/{team_id}/team-sync/group-mappings", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Create or update IdP group connections", + "scope": "teams", + "id": "createOrUpdateIdPGroupConnections", + "method": "PATCH", + "url": "/teams/{team_id}/team-sync/group-mappings", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove.", + "enum": null, + "name": "groups", + "type": "object[]", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "ID of the IdP group.", + "enum": null, + "name": "groups[].group_id", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Name of the IdP group.", + "enum": null, + "name": "groups[].group_name", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Description of the IdP group.", + "enum": null, + "name": "groups[].group_description", + "type": "string", + "required": true + } + ] + }, + { + "name": "List child teams", + "scope": "teams", + "id": "listChild", + "method": "GET", + "url": "/teams/{team_id}/teams", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "team_id parameter", + "enum": null, + "name": "team_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Get the authenticated user", + "scope": "users", + "id": "getAuthenticated", + "method": "GET", + "url": "/user", + "parameters": [] + }, + { + "name": "Update the authenticated user", + "scope": "users", + "id": "updateAuthenticated", + "method": "PATCH", + "url": "/user", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The new name of the user.", + "enum": null, + "name": "name", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The publicly visible email address of the user.", + "enum": null, + "name": "email", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The new blog URL of the user.", + "enum": null, + "name": "blog", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The new company of the user.", + "enum": null, + "name": "company", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The new location of the user.", + "enum": null, + "name": "location", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The new hiring availability of the user.", + "enum": null, + "name": "hireable", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The new short biography of the user.", + "enum": null, + "name": "bio", + "type": "string", + "required": false + } + ] + }, + { + "name": "List blocked users", + "scope": "users", + "id": "listBlocked", + "method": "GET", + "url": "/user/blocks", + "parameters": [] + }, + { + "name": "Check whether you've blocked a user", + "scope": "users", + "id": "checkBlocked", + "method": "GET", + "url": "/user/blocks/{username}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + } + ] + }, + { + "name": "Block a user", + "scope": "users", + "id": "block", + "method": "PUT", + "url": "/user/blocks/{username}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + } + ] + }, + { + "name": "Unblock a user", + "scope": "users", + "id": "unblock", + "method": "DELETE", + "url": "/user/blocks/{username}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + } + ] + }, + { + "name": "Toggle primary email visibility", + "scope": "users", + "id": "togglePrimaryEmailVisibility", + "method": "PATCH", + "url": "/user/email/visibility", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Specify the _primary_ email address that needs a visibility change.", + "enum": null, + "name": "email", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Use `public` to enable an authenticated user to view the specified email address, or use `private` so this primary email address cannot be seen publicly.", + "enum": null, + "name": "visibility", + "type": "string", + "required": true + } + ] + }, + { + "name": "List email addresses for a user", + "scope": "users", + "id": "listEmails", + "method": "GET", + "url": "/user/emails", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Add email address(es)", + "scope": "users", + "id": "addEmails", + "method": "POST", + "url": "/user/emails", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Adds one or more email addresses to your GitHub account. Must contain at least one email address. **Note:** Alternatively, you can pass a single email address or an `array` of emails addresses directly, but we recommend that you pass an object using the `emails` key.", + "enum": null, + "name": "emails", + "type": "string[]", + "required": true + } + ] + }, + { + "name": "Delete email address(es)", + "scope": "users", + "id": "deleteEmails", + "method": "DELETE", + "url": "/user/emails", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Deletes one or more email addresses from your GitHub account. Must contain at least one email address. **Note:** Alternatively, you can pass a single email address or an `array` of emails addresses directly, but we recommend that you pass an object using the `emails` key.", + "enum": null, + "name": "emails", + "type": "string[]", + "required": true + } + ] + }, + { + "name": "List the authenticated user's followers", + "scope": "users", + "id": "listFollowersForAuthenticatedUser", + "method": "GET", + "url": "/user/followers", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List who the authenticated user is following", + "scope": "users", + "id": "listFollowingForAuthenticatedUser", + "method": "GET", + "url": "/user/following", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Check if you are following a user", + "scope": "users", + "id": "checkFollowing", + "method": "GET", + "url": "/user/following/{username}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + } + ] + }, + { + "name": "Follow a user", + "scope": "users", + "id": "follow", + "method": "PUT", + "url": "/user/following/{username}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + } + ] + }, + { + "name": "Unfollow a user", + "scope": "users", + "id": "unfollow", + "method": "DELETE", + "url": "/user/following/{username}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + } + ] + }, + { + "name": "List your GPG keys", + "scope": "users", + "id": "listGpgKeys", + "method": "GET", + "url": "/user/gpg_keys", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Create a GPG key", + "scope": "users", + "id": "createGpgKey", + "method": "POST", + "url": "/user/gpg_keys", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Your GPG key, generated in ASCII-armored format. See \"[Generating a new GPG key](https://help.github.com/articles/generating-a-new-gpg-key/)\" for help creating a GPG key.", + "enum": null, + "name": "armored_public_key", + "type": "string", + "required": false + } + ] + }, + { + "name": "Get a single GPG key", + "scope": "users", + "id": "getGpgKey", + "method": "GET", + "url": "/user/gpg_keys/{gpg_key_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "gpg_key_id parameter", + "enum": null, + "name": "gpg_key_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Delete a GPG key", + "scope": "users", + "id": "deleteGpgKey", + "method": "DELETE", + "url": "/user/gpg_keys/{gpg_key_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "gpg_key_id parameter", + "enum": null, + "name": "gpg_key_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "List installations for a user", + "scope": "apps", + "id": "listInstallationsForAuthenticatedUser", + "method": "GET", + "url": "/user/installations", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List repositories accessible to the user for an installation", + "scope": "apps", + "id": "listInstallationReposForAuthenticatedUser", + "method": "GET", + "url": "/user/installations/{installation_id}/repositories", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "installation_id parameter", + "enum": null, + "name": "installation_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Add repository to installation", + "scope": "apps", + "id": "addRepoToInstallation", + "method": "PUT", + "url": "/user/installations/{installation_id}/repositories/{repository_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "installation_id parameter", + "enum": null, + "name": "installation_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repository_id parameter", + "enum": null, + "name": "repository_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Remove repository from installation", + "scope": "apps", + "id": "removeRepoFromInstallation", + "method": "DELETE", + "url": "/user/installations/{installation_id}/repositories/{repository_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "installation_id parameter", + "enum": null, + "name": "installation_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repository_id parameter", + "enum": null, + "name": "repository_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "List all issues across owned and member repositories assigned to the authenticated user", + "scope": "issues", + "id": "listForAuthenticatedUser", + "method": "GET", + "url": "/user/issues", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Indicates which sorts of issues to return. Can be one of: \n\\* `assigned`: Issues assigned to you \n\\* `created`: Issues created by you \n\\* `mentioned`: Issues mentioning you \n\\* `subscribed`: Issues you're subscribed to updates for \n\\* `all`: All issues the authenticated user can see, regardless of participation or creation", + "enum": ["assigned", "created", "mentioned", "subscribed", "all"], + "name": "filter", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`.", + "enum": ["open", "closed", "all"], + "name": "state", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A list of comma separated label names. Example: `bug,ui,@high`", + "enum": null, + "name": "labels", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "What to sort results by. Can be either `created`, `updated`, `comments`.", + "enum": ["created", "updated", "comments"], + "name": "sort", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The direction of the sort. Can be either `asc` or `desc`.", + "enum": ["asc", "desc"], + "name": "direction", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", + "enum": null, + "name": "since", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List your public keys", + "scope": "users", + "id": "listPublicKeys", + "method": "GET", + "url": "/user/keys", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Create a public key", + "scope": "users", + "id": "createPublicKey", + "method": "POST", + "url": "/user/keys", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A descriptive name for the new key. Use a name that will help you recognize this key in your GitHub account. For example, if you're using a personal Mac, you might call this key \"Personal MacBook Air\".", + "enum": null, + "name": "title", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The public SSH key to add to your GitHub account. See \"[Generating a new SSH key](https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/)\" for guidance on how to create a public SSH key.", + "enum": null, + "name": "key", + "type": "string", + "required": false + } + ] + }, + { + "name": "Get a single public key", + "scope": "users", + "id": "getPublicKey", + "method": "GET", + "url": "/user/keys/{key_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "key_id parameter", + "enum": null, + "name": "key_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Delete a public key", + "scope": "users", + "id": "deletePublicKey", + "method": "DELETE", + "url": "/user/keys/{key_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "key_id parameter", + "enum": null, + "name": "key_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Get a user's Marketplace purchases", + "scope": "apps", + "id": "listMarketplacePurchasesForAuthenticatedUser", + "method": "GET", + "url": "/user/marketplace_purchases", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Get a user's Marketplace purchases (stubbed)", + "scope": "apps", + "id": "listMarketplacePurchasesForAuthenticatedUserStubbed", + "method": "GET", + "url": "/user/marketplace_purchases/stubbed", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List your organization memberships", + "scope": "orgs", + "id": "listMemberships", + "method": "GET", + "url": "/user/memberships/orgs", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Indicates the state of the memberships to return. Can be either `active` or `pending`. If not specified, the API returns both active and pending memberships.", + "enum": ["active", "pending"], + "name": "state", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Get your organization membership", + "scope": "orgs", + "id": "getMembershipForAuthenticatedUser", + "method": "GET", + "url": "/user/memberships/orgs/{org}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + } + ] + }, + { + "name": "Edit your organization membership", + "scope": "orgs", + "id": "updateMembership", + "method": "PATCH", + "url": "/user/memberships/orgs/{org}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The state that the membership should be in. Only `\"active\"` will be accepted.", + "enum": ["active"], + "name": "state", + "type": "string", + "required": true + } + ] + }, + { + "name": "Start a user migration", + "scope": "migrations", + "id": "startForAuthenticatedUser", + "method": "POST", + "url": "/user/migrations", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "An array of repositories to include in the migration.", + "enum": null, + "name": "repositories", + "type": "string[]", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Locks the `repositories` to prevent changes during the migration when set to `true`.", + "enum": null, + "name": "lock_repositories", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Does not include attachments uploaded to GitHub.com in the migration data when set to `true`. Excluding attachments will reduce the migration archive file size.", + "enum": null, + "name": "exclude_attachments", + "type": "boolean", + "required": false + } + ] + }, + { + "name": "Get a list of user migrations", + "scope": "migrations", + "id": "listForAuthenticatedUser", + "method": "GET", + "url": "/user/migrations", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Get the status of a user migration", + "scope": "migrations", + "id": "getStatusForAuthenticatedUser", + "method": "GET", + "url": "/user/migrations/{migration_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "migration_id parameter", + "enum": null, + "name": "migration_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Download a user migration archive", + "scope": "migrations", + "id": "getArchiveForAuthenticatedUser", + "method": "GET", + "url": "/user/migrations/{migration_id}/archive", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "migration_id parameter", + "enum": null, + "name": "migration_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Delete a user migration archive", + "scope": "migrations", + "id": "deleteArchiveForAuthenticatedUser", + "method": "DELETE", + "url": "/user/migrations/{migration_id}/archive", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "migration_id parameter", + "enum": null, + "name": "migration_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Unlock a user repository", + "scope": "migrations", + "id": "unlockRepoForAuthenticatedUser", + "method": "DELETE", + "url": "/user/migrations/{migration_id}/repos/{repo_name}/lock", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "migration_id parameter", + "enum": null, + "name": "migration_id", + "type": "integer", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo_name parameter", + "enum": null, + "name": "repo_name", + "type": "string", + "required": true + } + ] + }, + { + "name": "List your organizations", + "scope": "orgs", + "id": "listForAuthenticatedUser", + "method": "GET", + "url": "/user/orgs", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Create a user project", + "scope": "projects", + "id": "createForAuthenticatedUser", + "method": "POST", + "url": "/user/projects", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the project.", + "enum": null, + "name": "name", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The description of the project.", + "enum": null, + "name": "body", + "type": "string", + "required": false + } + ] + }, + { + "name": "List public email addresses for a user", + "scope": "users", + "id": "listPublicEmails", + "method": "GET", + "url": "/user/public_emails", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List your repositories", + "scope": "repos", + "id": "list", + "method": "GET", + "url": "/user/repos", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Can be one of `all`, `public`, or `private`.", + "enum": ["all", "public", "private"], + "name": "visibility", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Comma-separated list of values. Can include: \n\\* `owner`: Repositories that are owned by the authenticated user. \n\\* `collaborator`: Repositories that the user has been added to as a collaborator. \n\\* `organization_member`: Repositories that the user has access to through being a member of an organization. This includes every repository on every team that the user is on.", + "enum": null, + "name": "affiliation", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Can be one of `all`, `owner`, `public`, `private`, `member`. Default: `all` \n \nWill cause a `422` error if used in the same request as **visibility** or **affiliation**. Will cause a `422` error if used in the same request as **visibility** or **affiliation**.", + "enum": ["all", "owner", "public", "private", "member"], + "name": "type", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Can be one of `created`, `updated`, `pushed`, `full_name`.", + "enum": ["created", "updated", "pushed", "full_name"], + "name": "sort", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc`", + "enum": ["asc", "desc"], + "name": "direction", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Creates a new repository for the authenticated user", + "scope": "repos", + "id": "createForAuthenticatedUser", + "method": "POST", + "url": "/user/repos", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The name of the repository.", + "enum": null, + "name": "name", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A short description of the repository.", + "enum": null, + "name": "description", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "A URL with more information about the repository.", + "enum": null, + "name": "homepage", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Either `true` to create a private repository or `false` to create a public one. Creating private repositories requires a paid GitHub account.", + "enum": null, + "name": "private", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Either `true` to enable issues for this repository or `false` to disable them.", + "enum": null, + "name": "has_issues", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error.", + "enum": null, + "name": "has_projects", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Either `true` to enable the wiki for this repository or `false` to disable it.", + "enum": null, + "name": "has_wiki", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Either `true` to make this repo available as a template repository or `false` to prevent it.", + "enum": null, + "name": "is_template", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.", + "enum": null, + "name": "team_id", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Pass `true` to create an initial commit with empty README.", + "enum": null, + "name": "auto_init", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, \"Haskell\".", + "enum": null, + "name": "gitignore_template", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://help.github.com/articles/licensing-a-repository/#searching-github-by-license-type) as the `license_template` string. For example, \"mit\" or \"mpl-2.0\".", + "enum": null, + "name": "license_template", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging.", + "enum": null, + "name": "allow_squash_merge", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits.", + "enum": null, + "name": "allow_merge_commit", + "type": "boolean", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging.", + "enum": null, + "name": "allow_rebase_merge", + "type": "boolean", + "required": false + } + ] + }, + { + "name": "List a user's repository invitations", + "scope": "repos", + "id": "listInvitationsForAuthenticatedUser", + "method": "GET", + "url": "/user/repository_invitations", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Accept a repository invitation", + "scope": "repos", + "id": "acceptInvitation", + "method": "PATCH", + "url": "/user/repository_invitations/{invitation_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "invitation_id parameter", + "enum": null, + "name": "invitation_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "Decline a repository invitation", + "scope": "repos", + "id": "declineInvitation", + "method": "DELETE", + "url": "/user/repository_invitations/{invitation_id}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "invitation_id parameter", + "enum": null, + "name": "invitation_id", + "type": "integer", + "required": true + } + ] + }, + { + "name": "List repositories being starred by the authenticated user", + "scope": "activity", + "id": "listReposStarredByAuthenticatedUser", + "method": "GET", + "url": "/user/starred", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "One of `created` (when the repository was starred) or `updated` (when it was last pushed to).", + "enum": ["created", "updated"], + "name": "sort", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "One of `asc` (ascending) or `desc` (descending).", + "enum": ["asc", "desc"], + "name": "direction", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Check if you are starring a repository", + "scope": "activity", + "id": "checkStarringRepo", + "method": "GET", + "url": "/user/starred/{owner}/{repo}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "Star a repository", + "scope": "activity", + "id": "starRepo", + "method": "PUT", + "url": "/user/starred/{owner}/{repo}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "Unstar a repository", + "scope": "activity", + "id": "unstarRepo", + "method": "DELETE", + "url": "/user/starred/{owner}/{repo}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "List repositories being watched by the authenticated user", + "scope": "activity", + "id": "listWatchedReposForAuthenticatedUser", + "method": "GET", + "url": "/user/subscriptions", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Check if you are watching a repository (LEGACY)", + "scope": "activity", + "id": "checkWatchingRepoLegacy", + "method": "GET", + "url": "/user/subscriptions/{owner}/{repo}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "Watch a repository (LEGACY)", + "scope": "activity", + "id": "watchRepoLegacy", + "method": "PUT", + "url": "/user/subscriptions/{owner}/{repo}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "Stop watching a repository (LEGACY)", + "scope": "activity", + "id": "stopWatchingRepoLegacy", + "method": "DELETE", + "url": "/user/subscriptions/{owner}/{repo}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "owner parameter", + "enum": null, + "name": "owner", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "repo parameter", + "enum": null, + "name": "repo", + "type": "string", + "required": true + } + ] + }, + { + "name": "List user teams", + "scope": "teams", + "id": "listForAuthenticatedUser", + "method": "GET", + "url": "/user/teams", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Get all users", + "scope": "users", + "id": "list", + "method": "GET", + "url": "/users", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "The integer ID of the last User that you've seen.", + "enum": null, + "name": "since", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Get a single user", + "scope": "users", + "id": "getByUsername", + "method": "GET", + "url": "/users/{username}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + } + ] + }, + { + "name": "List events performed by a user", + "scope": "activity", + "id": "listEventsForUser", + "method": "GET", + "url": "/users/{username}/events", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List events for an organization", + "scope": "activity", + "id": "listEventsForOrg", + "method": "GET", + "url": "/users/{username}/events/orgs/{org}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "org parameter", + "enum": null, + "name": "org", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List public events performed by a user", + "scope": "activity", + "id": "listPublicEventsForUser", + "method": "GET", + "url": "/users/{username}/events/public", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List a user's followers", + "scope": "users", + "id": "listFollowersForUser", + "method": "GET", + "url": "/users/{username}/followers", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List who a user is following", + "scope": "users", + "id": "listFollowingForUser", + "method": "GET", + "url": "/users/{username}/following", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Check if one user follows another", + "scope": "users", + "id": "checkFollowingForUser", + "method": "GET", + "url": "/users/{username}/following/{target_user}", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "target_user parameter", + "enum": null, + "name": "target_user", + "type": "string", + "required": true + } + ] + }, + { + "name": "List public gists for the specified user", + "scope": "gists", + "id": "listPublicForUser", + "method": "GET", + "url": "/users/{username}/gists", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned.", + "enum": null, + "name": "since", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List GPG keys for a user", + "scope": "users", + "id": "listGpgKeysForUser", + "method": "GET", + "url": "/users/{username}/gpg_keys", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "Get contextual information about a user", + "scope": "users", + "id": "getContextForUser", + "method": "GET", + "url": "/users/{username}/hovercard", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Identifies which additional information you'd like to receive about the person's hovercard. Can be `organization`, `repository`, `issue`, `pull_request`. **Required** when using `subject_id`.", + "enum": ["organization", "repository", "issue", "pull_request"], + "name": "subject_type", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Uses the ID for the `subject_type` you specified. **Required** when using `subject_type`.", + "enum": null, + "name": "subject_id", + "type": "string", + "required": false + } + ] + }, + { + "name": "Get a user installation", + "scope": "apps", + "id": "getUserInstallation", + "method": "GET", + "url": "/users/{username}/installation", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + } + ] + }, + { + "name": "Get a user installation", + "scope": "apps", + "id": "findUserInstallation", + "method": "GET", + "url": "/users/{username}/installation", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + } + ] + }, + { + "name": "List public keys for a user", + "scope": "users", + "id": "listPublicKeysForUser", + "method": "GET", + "url": "/users/{username}/keys", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List user organizations", + "scope": "orgs", + "id": "listForUser", + "method": "GET", + "url": "/users/{username}/orgs", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List user projects", + "scope": "projects", + "id": "listForUser", + "method": "GET", + "url": "/users/{username}/projects", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`.", + "enum": ["open", "closed", "all"], + "name": "state", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List events that a user has received", + "scope": "activity", + "id": "listReceivedEventsForUser", + "method": "GET", + "url": "/users/{username}/received_events", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List public events that a user has received", + "scope": "activity", + "id": "listReceivedPublicEventsForUser", + "method": "GET", + "url": "/users/{username}/received_events/public", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List user repositories", + "scope": "repos", + "id": "listForUser", + "method": "GET", + "url": "/users/{username}/repos", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Can be one of `all`, `owner`, `member`.", + "enum": ["all", "owner", "member"], + "name": "type", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Can be one of `created`, `updated`, `pushed`, `full_name`.", + "enum": ["created", "updated", "pushed", "full_name"], + "name": "sort", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc`", + "enum": ["asc", "desc"], + "name": "direction", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List repositories being starred by a user", + "scope": "activity", + "id": "listReposStarredByUser", + "method": "GET", + "url": "/users/{username}/starred", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "One of `created` (when the repository was starred) or `updated` (when it was last pushed to).", + "enum": ["created", "updated"], + "name": "sort", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "One of `asc` (ascending) or `desc` (descending).", + "enum": ["asc", "desc"], + "name": "direction", + "type": "string", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + }, + { + "name": "List repositories being watched by a user", + "scope": "activity", + "id": "listReposWatchedByUser", + "method": "GET", + "url": "/users/{username}/subscriptions", + "parameters": [ + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "username parameter", + "enum": null, + "name": "username", + "type": "string", + "required": true + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Results per page (max 100)", + "enum": null, + "name": "per_page", + "type": "integer", + "required": false + }, + { + "alias": null, + "allowNull": false, + "deprecated": null, + "description": "Page number of the results to fetch.", + "enum": null, + "name": "page", + "type": "integer", + "required": false + } + ] + } +] diff --git a/node_modules/@octokit/types/scripts/update-endpoints/templates/endpoints.ts.template b/node_modules/@octokit/types/scripts/update-endpoints/templates/endpoints.ts.template new file mode 100644 index 00000000..2eceb2f9 --- /dev/null +++ b/node_modules/@octokit/types/scripts/update-endpoints/templates/endpoints.ts.template @@ -0,0 +1,33 @@ +// DO NOT EDIT THIS FILE +import { RequestHeaders } from "../RequestHeaders"; +import { RequestRequestOptions } from "../RequestRequestOptions"; +import { Url } from "../Url"; + +export interface Endpoints { + {{#each endpointsByRoute}} + "{{@key}}": [{{union this "optionsTypeName"}}, {{union this "requestOptionsTypeName"}}] + {{/each}} +} + +{{#each options}} +type {{in.name}} = { +{{#each in.parameters}} + {{&jsdoc}} + {{{name this}}}: {{{type this}}} +{{/each}} +} +type {{out.name}} = { + method: "{{out.method}}", + url: Url, + headers: RequestHeaders, + request: RequestRequestOptions +} +{{/each}} + +{{#childParams}} +export type {{paramTypeName}} = { +{{#params}} + {{{name this}}}: {{{type this}}} +{{/params}} +}; +{{/childParams}} \ No newline at end of file diff --git a/node_modules/@octokit/types/scripts/update-endpoints/typescript.js b/node_modules/@octokit/types/scripts/update-endpoints/typescript.js new file mode 100644 index 00000000..2095c6c2 --- /dev/null +++ b/node_modules/@octokit/types/scripts/update-endpoints/typescript.js @@ -0,0 +1,179 @@ +const { readFileSync, writeFileSync } = require("fs"); +const { resolve } = require("path"); + +const Handlebars = require("handlebars"); +const set = require("lodash.set"); +const pascalCase = require("pascal-case"); +const prettier = require("prettier"); +const { stringToJsdocComment } = require("string-to-jsdoc-comment"); +const sortKeys = require("sort-keys"); + +const ENDPOINTS = require("./generated/Endpoints.json"); +const ENDPOINTS_PATH = resolve( + process.cwd(), + "src", + "generated", + "Endpoints.ts" +); +const ENDPOINTS_TEMPLATE_PATH = resolve( + process.cwd(), + "scripts", + "update-endpoints", + "templates", + "endpoints.ts.template" +); + +Handlebars.registerHelper("union", function(endpoints, key) { + return endpoints.map(endpoint => endpoint[key]).join(" | "); +}); +Handlebars.registerHelper("name", function(parameter) { + let name = parameter.key; + + if (/[.\[]/.test(name)) { + name = `"${name}"`; + } + + if (parameter.required) { + return name; + } + + return `${name}?`; +}); + +Handlebars.registerHelper("type", function(parameter) { + const type = typeMap[parameter.type] || parameter.type; + + if (parameter.allowNull) { + return `${type} | null`; + } + + return type; +}); +const template = Handlebars.compile( + readFileSync(ENDPOINTS_TEMPLATE_PATH, "utf8") +); + +const endpointsByRoute = {}; + +const typeMap = { + integer: "number", + "integer[]": "number[]" +}; + +for (const endpoint of ENDPOINTS) { + const route = `${endpoint.method} ${endpoint.url.replace( + /\{([^}]+)}/g, + ":$1" + )}`; + + if (!endpointsByRoute[route]) { + endpointsByRoute[route] = []; + } + + endpointsByRoute[route].push({ + optionsTypeName: + pascalCase(`${endpoint.scope} ${endpoint.id}`) + "Endpoint", + requestOptionsTypeName: + pascalCase(`${endpoint.scope} ${endpoint.id}`) + "RequestOptions" + }); +} + +const options = []; +const childParams = {}; + +for (const endpoint of ENDPOINTS) { + const { method, parameters } = endpoint; + + const optionsTypeName = + pascalCase(`${endpoint.scope} ${endpoint.id}`) + "Endpoint"; + const requestOptionsTypeName = + pascalCase(`${endpoint.scope} ${endpoint.id}`) + "RequestOptions"; + + options.push({ + in: { + name: optionsTypeName, + parameters: parameters + .map(parameterize) + // handle "object" & "object[]" types + .map(parameter => { + if (parameter.deprecated) { + return; + } + + const namespacedParamsName = pascalCase( + `${endpoint.scope}.${endpoint.id}.Params` + ); + + if (parameter.type === "object" || parameter.type === "object[]") { + const childParamsName = pascalCase( + `${namespacedParamsName}.${parameter.key}` + ); + + parameter.type = parameter.type.replace("object", childParamsName); + + if (!childParams[childParamsName]) { + childParams[childParamsName] = {}; + } + } + + if (!/\./.test(parameter.key)) { + return parameter; + } + + const childKey = parameter.key.split(".").pop(); + const parentKey = parameter.key.replace(/\.[^.]+$/, ""); + + parameter.key = childKey; + + const childParamsName = pascalCase( + `${namespacedParamsName}.${parentKey}` + ); + set(childParams, `${childParamsName}.${childKey}`, parameter); + }) + .filter(Boolean) + }, + out: { + name: requestOptionsTypeName, + method + } + }); +} + +const result = template({ + endpointsByRoute: sortKeys(endpointsByRoute, { deep: true }), + options, + childParams: Object.keys(childParams).map(key => { + if (key === "GistsCreateParamsFiles") { + debugger; + } + return { + paramTypeName: key, + params: Object.values(childParams[key]) + }; + }) +}); + +writeFileSync( + ENDPOINTS_PATH, + prettier.format(result, { parser: "typescript" }) +); +console.log(`${ENDPOINTS_PATH} updated.`); + +function parameterize(parameter) { + const key = parameter.name; + const type = typeMap[parameter.type] || parameter.type; + const enums = parameter.enum + ? parameter.enum.map(JSON.stringify).join("|") + : null; + + return { + name: pascalCase(key), + key: key, + required: parameter.required, + type: enums || type, + alias: parameter.alias, + deprecated: parameter.deprecated, + allowNull: parameter.allowNull, + jsdoc: stringToJsdocComment(parameter.description) + }; +} diff --git a/node_modules/@octokit/types/src/AuthInterface.ts b/node_modules/@octokit/types/src/AuthInterface.ts new file mode 100644 index 00000000..8f587436 --- /dev/null +++ b/node_modules/@octokit/types/src/AuthInterface.ts @@ -0,0 +1,43 @@ +import { EndpointOptions } from "./EndpointOptions"; +import { OctokitResponse } from "./OctokitResponse"; +import { RequestInterface } from "./RequestInterface"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; + +/** + * Interface to implement complex authentication strategies for Octokit. + * An object Implementing the AuthInterface can directly be passed as the + * `auth` option in the Octokit constructor. + * + * For the official implementations of the most common authentication + * strategies, see https://github.com/octokit/auth.js + */ +export interface AuthInterface< + AuthOptions extends any[], + Authentication extends any +> { + (...args: AuthOptions): Promise; + + hook: { + /** + * Sends a request using the passed `request` instance + * + * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (request: RequestInterface, options: EndpointOptions): Promise< + OctokitResponse + >; + + /** + * Sends a request using the passed `request` instance + * + * @param {string} route Request method + URL. Example: `'GET /orgs/:org'` + * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + ( + request: RequestInterface, + route: Route, + parameters?: RequestParameters + ): Promise>; + }; +} diff --git a/node_modules/@octokit/types/src/EndpointDefaults.ts b/node_modules/@octokit/types/src/EndpointDefaults.ts new file mode 100644 index 00000000..024f6ebb --- /dev/null +++ b/node_modules/@octokit/types/src/EndpointDefaults.ts @@ -0,0 +1,22 @@ +import { RequestHeaders } from "./RequestHeaders"; +import { RequestMethod } from "./RequestMethod"; +import { RequestParameters } from "./RequestParameters"; +import { Url } from "./Url"; + +/** + * The `.endpoint()` method is guaranteed to set all keys defined by RequestParameters + * as well as the method property. + */ +export type EndpointDefaults = RequestParameters & { + baseUrl: Url; + method: RequestMethod; + url?: Url; + headers: RequestHeaders & { + accept: string; + "user-agent": string; + }; + mediaType: { + format: string; + previews: string[]; + }; +}; diff --git a/node_modules/@octokit/types/src/EndpointInterface.ts b/node_modules/@octokit/types/src/EndpointInterface.ts new file mode 100644 index 00000000..fee78d61 --- /dev/null +++ b/node_modules/@octokit/types/src/EndpointInterface.ts @@ -0,0 +1,74 @@ +import { EndpointDefaults } from "./EndpointDefaults"; +import { EndpointOptions } from "./EndpointOptions"; +import { RequestOptions } from "./RequestOptions"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; + +import { Endpoints } from "./generated/Endpoints"; + +export interface EndpointInterface { + /** + * Transforms a GitHub REST API endpoint into generic request options + * + * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (options: EndpointOptions): RequestOptions; + + /** + * Transforms a GitHub REST API endpoint into generic request options + * + * @param {string} route Request method + URL. Example: `'GET /orgs/:org'` + * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + ( + route: keyof Endpoints | R, + options?: R extends keyof Endpoints + ? Endpoints[R][0] & RequestParameters + : RequestParameters + ): R extends keyof Endpoints ? Endpoints[R][1] : RequestOptions; + + /** + * Object with current default route and parameters + */ + DEFAULTS: EndpointDefaults; + + /** + * Returns a new `endpoint` with updated route and parameters + */ + defaults: (newDefaults: RequestParameters) => EndpointInterface; + + merge: { + /** + * Merges current endpoint defaults with passed route and parameters, + * without transforming them into request options. + * + * @param {string} route Request method + URL. Example: `'GET /orgs/:org'` + * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + * + */ + (route: Route, parameters?: RequestParameters): EndpointDefaults; + + /** + * Merges current endpoint defaults with passed route and parameters, + * without transforming them into request options. + * + * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (options: RequestParameters): EndpointDefaults; + + /** + * Returns current default options. + * + * @deprecated use endpoint.DEFAULTS instead + */ + (): EndpointDefaults; + }; + + /** + * Stateless method to turn endpoint options into request options. + * Calling `endpoint(options)` is the same as calling `endpoint.parse(endpoint.merge(options))`. + * + * @param {object} options `method`, `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + parse: (options: EndpointDefaults) => RequestOptions; +} diff --git a/node_modules/@octokit/types/src/EndpointOptions.ts b/node_modules/@octokit/types/src/EndpointOptions.ts new file mode 100644 index 00000000..01706049 --- /dev/null +++ b/node_modules/@octokit/types/src/EndpointOptions.ts @@ -0,0 +1,8 @@ +import { RequestMethod } from "./RequestMethod"; +import { Url } from "./Url"; +import { RequestParameters } from "./RequestParameters"; + +export type EndpointOptions = RequestParameters & { + method: RequestMethod; + url: Url; +}; diff --git a/node_modules/@octokit/types/src/Fetch.ts b/node_modules/@octokit/types/src/Fetch.ts new file mode 100644 index 00000000..983c79be --- /dev/null +++ b/node_modules/@octokit/types/src/Fetch.ts @@ -0,0 +1,4 @@ +/** + * Browser's fetch method (or compatible such as fetch-mock) + */ +export type Fetch = any; diff --git a/node_modules/@octokit/types/src/OctokitResponse.ts b/node_modules/@octokit/types/src/OctokitResponse.ts new file mode 100644 index 00000000..4cec20d9 --- /dev/null +++ b/node_modules/@octokit/types/src/OctokitResponse.ts @@ -0,0 +1,18 @@ +import { ResponseHeaders } from "./ResponseHeaders"; +import { Url } from "./Url"; + +export type OctokitResponse = { + headers: ResponseHeaders; + /** + * http response code + */ + status: number; + /** + * URL of response after all redirects + */ + url: Url; + /** + * This is the data you would see in https://developer.Octokit.com/v3/ + */ + data: T; +}; diff --git a/node_modules/@octokit/types/src/RequestHeaders.ts b/node_modules/@octokit/types/src/RequestHeaders.ts new file mode 100644 index 00000000..0df66361 --- /dev/null +++ b/node_modules/@octokit/types/src/RequestHeaders.ts @@ -0,0 +1,15 @@ +export type RequestHeaders = { + /** + * Avoid setting `headers.accept`, use `mediaType.{format|previews}` option instead. + */ + accept?: string; + /** + * Use `authorization` to send authenticated request, remember `token ` / `bearer ` prefixes. Example: `token 1234567890abcdef1234567890abcdef12345678` + */ + authorization?: string; + /** + * `user-agent` is set do a default and can be overwritten as needed. + */ + "user-agent"?: string; + [header: string]: string | number | undefined; +}; diff --git a/node_modules/@octokit/types/src/RequestInterface.ts b/node_modules/@octokit/types/src/RequestInterface.ts new file mode 100644 index 00000000..21bd0876 --- /dev/null +++ b/node_modules/@octokit/types/src/RequestInterface.ts @@ -0,0 +1,51 @@ +import { EndpointInterface } from "./EndpointInterface"; +import { EndpointOptions } from "./EndpointOptions"; +import { RequestParameters } from "./RequestParameters"; +import { ResponseHeaders } from "./ResponseHeaders"; +import { Route } from "./Route"; +import { Url } from "./Url"; + +export interface RequestInterface { + /** + * Sends a request based on endpoint options + * + * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (options: EndpointOptions): Promise>; + + /** + * Sends a request based on endpoint options + * + * @param {string} route Request method + URL. Example: `'GET /orgs/:org'` + * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (route: Route, parameters?: RequestParameters): Promise< + OctokitResponse + >; + + /** + * Returns a new `endpoint` with updated route and parameters + */ + defaults: (newDefaults: RequestParameters) => RequestInterface; + + /** + * Octokit endpoint API, see {@link https://github.com/octokit/endpoint.js|@octokit/endpoint} + */ + endpoint: EndpointInterface; +} + +export type OctokitResponse = { + headers: ResponseHeaders; + /** + * http response code + */ + status: number; + /** + * URL of response after all redirects + */ + url: Url; + /** + * This is the data you would see in https://developer.Octokit.com/v3/ + */ + data: T; +}; diff --git a/node_modules/@octokit/types/src/RequestMethod.ts b/node_modules/@octokit/types/src/RequestMethod.ts new file mode 100644 index 00000000..2910435a --- /dev/null +++ b/node_modules/@octokit/types/src/RequestMethod.ts @@ -0,0 +1,10 @@ +/** + * HTTP Verb supported by GitHub's REST API + */ +export type RequestMethod = + | "DELETE" + | "GET" + | "HEAD" + | "PATCH" + | "POST" + | "PUT"; diff --git a/node_modules/@octokit/types/src/RequestOptions.ts b/node_modules/@octokit/types/src/RequestOptions.ts new file mode 100644 index 00000000..4d765c09 --- /dev/null +++ b/node_modules/@octokit/types/src/RequestOptions.ts @@ -0,0 +1,15 @@ +import { RequestHeaders } from "./RequestHeaders"; +import { RequestMethod } from "./RequestMethod"; +import { RequestRequestOptions } from "./RequestRequestOptions"; +import { Url } from "./Url"; + +/** + * Generic request options as they are returned by the `endpoint()` method + */ +export type RequestOptions = { + method: RequestMethod; + url: Url; + headers: RequestHeaders; + body?: any; + request?: RequestRequestOptions; +}; diff --git a/node_modules/@octokit/types/src/RequestParameters.ts b/node_modules/@octokit/types/src/RequestParameters.ts new file mode 100644 index 00000000..9766be00 --- /dev/null +++ b/node_modules/@octokit/types/src/RequestParameters.ts @@ -0,0 +1,46 @@ +import { RequestRequestOptions } from "./RequestRequestOptions"; +import { RequestHeaders } from "./RequestHeaders"; +import { Url } from "./Url"; + +/** + * Parameters that can be passed into `request(route, parameters)` or `endpoint(route, parameters)` methods + */ +export type RequestParameters = { + /** + * Base URL to be used when a relative URL is passed, such as `/orgs/:org`. + * If `baseUrl` is `https://enterprise.acme-inc.com/api/v3`, then the request + * will be sent to `https://enterprise.acme-inc.com/api/v3/orgs/:org`. + */ + baseUrl?: Url; + /** + * HTTP headers. Use lowercase keys. + */ + headers?: RequestHeaders; + /** + * Media type options, see {@link https://developer.github.com/v3/media/|GitHub Developer Guide} + */ + mediaType?: { + /** + * `json` by default. Can be `raw`, `text`, `html`, `full`, `diff`, `patch`, `sha`, `base64`. Depending on endpoint + */ + format?: string; + /** + * Custom media type names of {@link https://developer.github.com/v3/media/|API Previews} without the `-preview` suffix. + * Example for single preview: `['squirrel-girl']`. + * Example for multiple previews: `['squirrel-girl', 'mister-fantastic']`. + */ + previews?: string[]; + }; + /** + * Pass custom meta information for the request. The `request` object will be returned as is. + */ + request?: RequestRequestOptions; + /** + * Any additional parameter will be passed as follows + * 1. URL parameter if `':parameter'` or `{parameter}` is part of `url` + * 2. Query parameter if `method` is `'GET'` or `'HEAD'` + * 3. Request body if `parameter` is `'data'` + * 4. JSON in the request body in the form of `body[parameter]` unless `parameter` key is `'data'` + */ + [parameter: string]: any; +}; diff --git a/node_modules/@octokit/types/src/RequestRequestOptions.ts b/node_modules/@octokit/types/src/RequestRequestOptions.ts new file mode 100644 index 00000000..028d6f72 --- /dev/null +++ b/node_modules/@octokit/types/src/RequestRequestOptions.ts @@ -0,0 +1,27 @@ +import { Agent } from "http"; +import { Fetch } from "./Fetch"; +import { Signal } from "./Signal"; + +/** + * Octokit-specific request options which are ignored for the actual request, but can be used by Octokit or plugins to manipulate how the request is sent or how a response is handled + */ +export type RequestRequestOptions = { + /** + * Node only. Useful for custom proxy, certificate, or dns lookup. + */ + agent?: Agent; + /** + * Custom replacement for built-in fetch method. Useful for testing or request hooks. + */ + fetch?: Fetch; + /** + * Use an `AbortController` instance to cancel a request. In node you can only cancel streamed requests. + */ + signal?: Signal; + /** + * Node only. Request/response timeout in ms, it resets on redirect. 0 to disable (OS limit applies). `options.request.signal` is recommended instead. + */ + timeout?: number; + + [option: string]: any; +}; diff --git a/node_modules/@octokit/types/src/ResponseHeaders.ts b/node_modules/@octokit/types/src/ResponseHeaders.ts new file mode 100644 index 00000000..17267b60 --- /dev/null +++ b/node_modules/@octokit/types/src/ResponseHeaders.ts @@ -0,0 +1,21 @@ +export type ResponseHeaders = { + "cache-control"?: string; + "content-length"?: number; + "content-type"?: string; + date?: string; + etag?: string; + "last-modified"?: string; + link?: string; + location?: string; + server?: string; + status?: string; + vary?: string; + "x-github-mediatype"?: string; + "x-github-request-id"?: string; + "x-oauth-scopes"?: string; + "x-ratelimit-limit"?: string; + "x-ratelimit-remaining"?: string; + "x-ratelimit-reset"?: string; + + [header: string]: string | number | undefined; +}; diff --git a/node_modules/@octokit/types/src/Route.ts b/node_modules/@octokit/types/src/Route.ts new file mode 100644 index 00000000..c5229a8b --- /dev/null +++ b/node_modules/@octokit/types/src/Route.ts @@ -0,0 +1,4 @@ +/** + * String consisting of an optional HTTP method and relative path or absolute URL. Examples: `'/orgs/:org'`, `'PUT /orgs/:org'`, `GET https://example.com/foo/bar` + */ +export type Route = string; diff --git a/node_modules/@octokit/types/src/Signal.ts b/node_modules/@octokit/types/src/Signal.ts new file mode 100644 index 00000000..bdf97001 --- /dev/null +++ b/node_modules/@octokit/types/src/Signal.ts @@ -0,0 +1,6 @@ +/** + * Abort signal + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal + */ +export type Signal = any; diff --git a/node_modules/@octokit/types/src/StrategyInterface.ts b/node_modules/@octokit/types/src/StrategyInterface.ts new file mode 100644 index 00000000..60a55add --- /dev/null +++ b/node_modules/@octokit/types/src/StrategyInterface.ts @@ -0,0 +1,9 @@ +import { AuthInterface } from "./AuthInterface"; + +export interface StrategyInterface< + StrategyOptions extends any[], + AuthOptions extends any[], + Authentication extends object +> { + (...args: StrategyOptions): AuthInterface; +} diff --git a/node_modules/@octokit/types/src/Url.ts b/node_modules/@octokit/types/src/Url.ts new file mode 100644 index 00000000..9d228cbf --- /dev/null +++ b/node_modules/@octokit/types/src/Url.ts @@ -0,0 +1,4 @@ +/** + * Relative or absolute URL. Examples: `'/orgs/:org'`, `https://example.com/foo/bar` + */ +export type Url = string; diff --git a/node_modules/@octokit/types/src/VERSION.ts b/node_modules/@octokit/types/src/VERSION.ts new file mode 100644 index 00000000..4652f248 --- /dev/null +++ b/node_modules/@octokit/types/src/VERSION.ts @@ -0,0 +1 @@ +export const VERSION = "2.0.1"; diff --git a/node_modules/@octokit/types/src/generated/Endpoints.ts b/node_modules/@octokit/types/src/generated/Endpoints.ts new file mode 100644 index 00000000..3aec9145 --- /dev/null +++ b/node_modules/@octokit/types/src/generated/Endpoints.ts @@ -0,0 +1,14190 @@ +// DO NOT EDIT THIS FILE +import { RequestHeaders } from "../RequestHeaders"; +import { RequestRequestOptions } from "../RequestRequestOptions"; +import { Url } from "../Url"; + +export interface Endpoints { + "DELETE /app/installations/:installation_id": [ + AppsDeleteInstallationEndpoint, + AppsDeleteInstallationRequestOptions + ]; + "DELETE /applications/:client_id/grants/:access_token": [ + OauthAuthorizationsRevokeGrantForApplicationEndpoint, + OauthAuthorizationsRevokeGrantForApplicationRequestOptions + ]; + "DELETE /applications/:client_id/tokens/:access_token": [ + OauthAuthorizationsRevokeAuthorizationForApplicationEndpoint, + OauthAuthorizationsRevokeAuthorizationForApplicationRequestOptions + ]; + "DELETE /applications/grants/:grant_id": [ + OauthAuthorizationsDeleteGrantEndpoint, + OauthAuthorizationsDeleteGrantRequestOptions + ]; + "DELETE /authorizations/:authorization_id": [ + OauthAuthorizationsDeleteAuthorizationEndpoint, + OauthAuthorizationsDeleteAuthorizationRequestOptions + ]; + "DELETE /gists/:gist_id": [GistsDeleteEndpoint, GistsDeleteRequestOptions]; + "DELETE /gists/:gist_id/comments/:comment_id": [ + GistsDeleteCommentEndpoint, + GistsDeleteCommentRequestOptions + ]; + "DELETE /gists/:gist_id/star": [ + GistsUnstarEndpoint, + GistsUnstarRequestOptions + ]; + "DELETE /notifications/threads/:thread_id/subscription": [ + ActivityDeleteThreadSubscriptionEndpoint, + ActivityDeleteThreadSubscriptionRequestOptions + ]; + "DELETE /orgs/:org/blocks/:username": [ + OrgsUnblockUserEndpoint, + OrgsUnblockUserRequestOptions + ]; + "DELETE /orgs/:org/credential-authorizations/:credential_id": [ + OrgsRemoveCredentialAuthorizationEndpoint, + OrgsRemoveCredentialAuthorizationRequestOptions + ]; + "DELETE /orgs/:org/hooks/:hook_id": [ + OrgsDeleteHookEndpoint, + OrgsDeleteHookRequestOptions + ]; + "DELETE /orgs/:org/interaction-limits": [ + InteractionsRemoveRestrictionsForOrgEndpoint, + InteractionsRemoveRestrictionsForOrgRequestOptions + ]; + "DELETE /orgs/:org/members/:username": [ + OrgsRemoveMemberEndpoint, + OrgsRemoveMemberRequestOptions + ]; + "DELETE /orgs/:org/memberships/:username": [ + OrgsRemoveMembershipEndpoint, + OrgsRemoveMembershipRequestOptions + ]; + "DELETE /orgs/:org/migrations/:migration_id/archive": [ + MigrationsDeleteArchiveForOrgEndpoint, + MigrationsDeleteArchiveForOrgRequestOptions + ]; + "DELETE /orgs/:org/migrations/:migration_id/repos/:repo_name/lock": [ + MigrationsUnlockRepoForOrgEndpoint, + MigrationsUnlockRepoForOrgRequestOptions + ]; + "DELETE /orgs/:org/outside_collaborators/:username": [ + OrgsRemoveOutsideCollaboratorEndpoint, + OrgsRemoveOutsideCollaboratorRequestOptions + ]; + "DELETE /orgs/:org/public_members/:username": [ + OrgsConcealMembershipEndpoint, + OrgsConcealMembershipRequestOptions + ]; + "DELETE /projects/:project_id": [ + ProjectsDeleteEndpoint, + ProjectsDeleteRequestOptions + ]; + "DELETE /projects/:project_id/collaborators/:username": [ + ProjectsRemoveCollaboratorEndpoint, + ProjectsRemoveCollaboratorRequestOptions + ]; + "DELETE /projects/columns/:column_id": [ + ProjectsDeleteColumnEndpoint, + ProjectsDeleteColumnRequestOptions + ]; + "DELETE /projects/columns/cards/:card_id": [ + ProjectsDeleteCardEndpoint, + ProjectsDeleteCardRequestOptions + ]; + "DELETE /reactions/:reaction_id": [ + ReactionsDeleteEndpoint, + ReactionsDeleteRequestOptions + ]; + "DELETE /repos/:owner/:repo": [ + ReposDeleteEndpoint, + ReposDeleteRequestOptions + ]; + "DELETE /repos/:owner/:repo/automated-security-fixes": [ + ReposDisableAutomatedSecurityFixesEndpoint, + ReposDisableAutomatedSecurityFixesRequestOptions + ]; + "DELETE /repos/:owner/:repo/branches/:branch/protection": [ + ReposRemoveBranchProtectionEndpoint, + ReposRemoveBranchProtectionRequestOptions + ]; + "DELETE /repos/:owner/:repo/branches/:branch/protection/enforce_admins": [ + ReposRemoveProtectedBranchAdminEnforcementEndpoint, + ReposRemoveProtectedBranchAdminEnforcementRequestOptions + ]; + "DELETE /repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews": [ + ReposRemoveProtectedBranchPullRequestReviewEnforcementEndpoint, + ReposRemoveProtectedBranchPullRequestReviewEnforcementRequestOptions + ]; + "DELETE /repos/:owner/:repo/branches/:branch/protection/required_signatures": [ + ReposRemoveProtectedBranchRequiredSignaturesEndpoint, + ReposRemoveProtectedBranchRequiredSignaturesRequestOptions + ]; + "DELETE /repos/:owner/:repo/branches/:branch/protection/required_status_checks": [ + ReposRemoveProtectedBranchRequiredStatusChecksEndpoint, + ReposRemoveProtectedBranchRequiredStatusChecksRequestOptions + ]; + "DELETE /repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts": [ + ReposRemoveProtectedBranchRequiredStatusChecksContextsEndpoint, + ReposRemoveProtectedBranchRequiredStatusChecksContextsRequestOptions + ]; + "DELETE /repos/:owner/:repo/branches/:branch/protection/restrictions": [ + ReposRemoveProtectedBranchRestrictionsEndpoint, + ReposRemoveProtectedBranchRestrictionsRequestOptions + ]; + "DELETE /repos/:owner/:repo/branches/:branch/protection/restrictions/apps": [ + ReposRemoveProtectedBranchAppRestrictionsEndpoint, + ReposRemoveProtectedBranchAppRestrictionsRequestOptions + ]; + "DELETE /repos/:owner/:repo/branches/:branch/protection/restrictions/teams": [ + ReposRemoveProtectedBranchTeamRestrictionsEndpoint, + ReposRemoveProtectedBranchTeamRestrictionsRequestOptions + ]; + "DELETE /repos/:owner/:repo/branches/:branch/protection/restrictions/users": [ + ReposRemoveProtectedBranchUserRestrictionsEndpoint, + ReposRemoveProtectedBranchUserRestrictionsRequestOptions + ]; + "DELETE /repos/:owner/:repo/collaborators/:username": [ + ReposRemoveCollaboratorEndpoint, + ReposRemoveCollaboratorRequestOptions + ]; + "DELETE /repos/:owner/:repo/comments/:comment_id": [ + ReposDeleteCommitCommentEndpoint, + ReposDeleteCommitCommentRequestOptions + ]; + "DELETE /repos/:owner/:repo/contents/:path": [ + ReposDeleteFileEndpoint, + ReposDeleteFileRequestOptions + ]; + "DELETE /repos/:owner/:repo/downloads/:download_id": [ + ReposDeleteDownloadEndpoint, + ReposDeleteDownloadRequestOptions + ]; + "DELETE /repos/:owner/:repo/git/refs/:ref": [ + GitDeleteRefEndpoint, + GitDeleteRefRequestOptions + ]; + "DELETE /repos/:owner/:repo/hooks/:hook_id": [ + ReposDeleteHookEndpoint, + ReposDeleteHookRequestOptions + ]; + "DELETE /repos/:owner/:repo/import": [ + MigrationsCancelImportEndpoint, + MigrationsCancelImportRequestOptions + ]; + "DELETE /repos/:owner/:repo/interaction-limits": [ + InteractionsRemoveRestrictionsForRepoEndpoint, + InteractionsRemoveRestrictionsForRepoRequestOptions + ]; + "DELETE /repos/:owner/:repo/invitations/:invitation_id": [ + ReposDeleteInvitationEndpoint, + ReposDeleteInvitationRequestOptions + ]; + "DELETE /repos/:owner/:repo/issues/:issue_number/assignees": [ + IssuesRemoveAssigneesEndpoint, + IssuesRemoveAssigneesRequestOptions + ]; + "DELETE /repos/:owner/:repo/issues/:issue_number/labels": [ + IssuesRemoveLabelsEndpoint, + IssuesRemoveLabelsRequestOptions + ]; + "DELETE /repos/:owner/:repo/issues/:issue_number/labels/:name": [ + IssuesRemoveLabelEndpoint, + IssuesRemoveLabelRequestOptions + ]; + "DELETE /repos/:owner/:repo/issues/:issue_number/lock": [ + IssuesUnlockEndpoint, + IssuesUnlockRequestOptions + ]; + "DELETE /repos/:owner/:repo/issues/comments/:comment_id": [ + IssuesDeleteCommentEndpoint, + IssuesDeleteCommentRequestOptions + ]; + "DELETE /repos/:owner/:repo/keys/:key_id": [ + ReposRemoveDeployKeyEndpoint, + ReposRemoveDeployKeyRequestOptions + ]; + "DELETE /repos/:owner/:repo/labels/:name": [ + IssuesDeleteLabelEndpoint, + IssuesDeleteLabelRequestOptions + ]; + "DELETE /repos/:owner/:repo/milestones/:milestone_number": [ + IssuesDeleteMilestoneEndpoint, + IssuesDeleteMilestoneRequestOptions + ]; + "DELETE /repos/:owner/:repo/pages": [ + ReposDisablePagesSiteEndpoint, + ReposDisablePagesSiteRequestOptions + ]; + "DELETE /repos/:owner/:repo/pulls/:pull_number/requested_reviewers": [ + PullsDeleteReviewRequestEndpoint, + PullsDeleteReviewRequestRequestOptions + ]; + "DELETE /repos/:owner/:repo/pulls/:pull_number/reviews/:review_id": [ + PullsDeletePendingReviewEndpoint, + PullsDeletePendingReviewRequestOptions + ]; + "DELETE /repos/:owner/:repo/pulls/comments/:comment_id": [ + PullsDeleteCommentEndpoint, + PullsDeleteCommentRequestOptions + ]; + "DELETE /repos/:owner/:repo/releases/:release_id": [ + ReposDeleteReleaseEndpoint, + ReposDeleteReleaseRequestOptions + ]; + "DELETE /repos/:owner/:repo/releases/assets/:asset_id": [ + ReposDeleteReleaseAssetEndpoint, + ReposDeleteReleaseAssetRequestOptions + ]; + "DELETE /repos/:owner/:repo/subscription": [ + ActivityDeleteRepoSubscriptionEndpoint, + ActivityDeleteRepoSubscriptionRequestOptions + ]; + "DELETE /repos/:owner/:repo/vulnerability-alerts": [ + ReposDisableVulnerabilityAlertsEndpoint, + ReposDisableVulnerabilityAlertsRequestOptions + ]; + "DELETE /scim/v2/organizations/:org/Users/:scim_user_id": [ + ScimRemoveUserFromOrgEndpoint, + ScimRemoveUserFromOrgRequestOptions + ]; + "DELETE /teams/:team_id": [TeamsDeleteEndpoint, TeamsDeleteRequestOptions]; + "DELETE /teams/:team_id/discussions/:discussion_number": [ + TeamsDeleteDiscussionEndpoint, + TeamsDeleteDiscussionRequestOptions + ]; + "DELETE /teams/:team_id/discussions/:discussion_number/comments/:comment_number": [ + TeamsDeleteDiscussionCommentEndpoint, + TeamsDeleteDiscussionCommentRequestOptions + ]; + "DELETE /teams/:team_id/members/:username": [ + TeamsRemoveMemberEndpoint, + TeamsRemoveMemberRequestOptions + ]; + "DELETE /teams/:team_id/memberships/:username": [ + TeamsRemoveMembershipEndpoint, + TeamsRemoveMembershipRequestOptions + ]; + "DELETE /teams/:team_id/projects/:project_id": [ + TeamsRemoveProjectEndpoint, + TeamsRemoveProjectRequestOptions + ]; + "DELETE /teams/:team_id/repos/:owner/:repo": [ + TeamsRemoveRepoEndpoint, + TeamsRemoveRepoRequestOptions + ]; + "DELETE /user/blocks/:username": [ + UsersUnblockEndpoint, + UsersUnblockRequestOptions + ]; + "DELETE /user/emails": [ + UsersDeleteEmailsEndpoint, + UsersDeleteEmailsRequestOptions + ]; + "DELETE /user/following/:username": [ + UsersUnfollowEndpoint, + UsersUnfollowRequestOptions + ]; + "DELETE /user/gpg_keys/:gpg_key_id": [ + UsersDeleteGpgKeyEndpoint, + UsersDeleteGpgKeyRequestOptions + ]; + "DELETE /user/installations/:installation_id/repositories/:repository_id": [ + AppsRemoveRepoFromInstallationEndpoint, + AppsRemoveRepoFromInstallationRequestOptions + ]; + "DELETE /user/keys/:key_id": [ + UsersDeletePublicKeyEndpoint, + UsersDeletePublicKeyRequestOptions + ]; + "DELETE /user/migrations/:migration_id/archive": [ + MigrationsDeleteArchiveForAuthenticatedUserEndpoint, + MigrationsDeleteArchiveForAuthenticatedUserRequestOptions + ]; + "DELETE /user/migrations/:migration_id/repos/:repo_name/lock": [ + MigrationsUnlockRepoForAuthenticatedUserEndpoint, + MigrationsUnlockRepoForAuthenticatedUserRequestOptions + ]; + "DELETE /user/repository_invitations/:invitation_id": [ + ReposDeclineInvitationEndpoint, + ReposDeclineInvitationRequestOptions + ]; + "DELETE /user/starred/:owner/:repo": [ + ActivityUnstarRepoEndpoint, + ActivityUnstarRepoRequestOptions + ]; + "DELETE /user/subscriptions/:owner/:repo": [ + ActivityStopWatchingRepoLegacyEndpoint, + ActivityStopWatchingRepoLegacyRequestOptions + ]; + "GET /app": [ + AppsGetAuthenticatedEndpoint, + AppsGetAuthenticatedRequestOptions + ]; + "GET /app/installations": [ + AppsListInstallationsEndpoint, + AppsListInstallationsRequestOptions + ]; + "GET /app/installations/:installation_id": [ + AppsGetInstallationEndpoint, + AppsGetInstallationRequestOptions + ]; + "GET /applications/:client_id/tokens/:access_token": [ + OauthAuthorizationsCheckAuthorizationEndpoint, + OauthAuthorizationsCheckAuthorizationRequestOptions + ]; + "GET /applications/grants": [ + OauthAuthorizationsListGrantsEndpoint, + OauthAuthorizationsListGrantsRequestOptions + ]; + "GET /applications/grants/:grant_id": [ + OauthAuthorizationsGetGrantEndpoint, + OauthAuthorizationsGetGrantRequestOptions + ]; + "GET /apps/:app_slug": [AppsGetBySlugEndpoint, AppsGetBySlugRequestOptions]; + "GET /authorizations": [ + OauthAuthorizationsListAuthorizationsEndpoint, + OauthAuthorizationsListAuthorizationsRequestOptions + ]; + "GET /authorizations/:authorization_id": [ + OauthAuthorizationsGetAuthorizationEndpoint, + OauthAuthorizationsGetAuthorizationRequestOptions + ]; + "GET /codes_of_conduct": [ + CodesOfConductListConductCodesEndpoint, + CodesOfConductListConductCodesRequestOptions + ]; + "GET /codes_of_conduct/:key": [ + CodesOfConductGetConductCodeEndpoint, + CodesOfConductGetConductCodeRequestOptions + ]; + "GET /emojis": [EmojisGetEndpoint, EmojisGetRequestOptions]; + "GET /events": [ + ActivityListPublicEventsEndpoint, + ActivityListPublicEventsRequestOptions + ]; + "GET /feeds": [ActivityListFeedsEndpoint, ActivityListFeedsRequestOptions]; + "GET /gists": [GistsListEndpoint, GistsListRequestOptions]; + "GET /gists/:gist_id": [GistsGetEndpoint, GistsGetRequestOptions]; + "GET /gists/:gist_id/:sha": [ + GistsGetRevisionEndpoint, + GistsGetRevisionRequestOptions + ]; + "GET /gists/:gist_id/comments": [ + GistsListCommentsEndpoint, + GistsListCommentsRequestOptions + ]; + "GET /gists/:gist_id/comments/:comment_id": [ + GistsGetCommentEndpoint, + GistsGetCommentRequestOptions + ]; + "GET /gists/:gist_id/commits": [ + GistsListCommitsEndpoint, + GistsListCommitsRequestOptions + ]; + "GET /gists/:gist_id/forks": [ + GistsListForksEndpoint, + GistsListForksRequestOptions + ]; + "GET /gists/:gist_id/star": [ + GistsCheckIsStarredEndpoint, + GistsCheckIsStarredRequestOptions + ]; + "GET /gists/public": [GistsListPublicEndpoint, GistsListPublicRequestOptions]; + "GET /gists/starred": [ + GistsListStarredEndpoint, + GistsListStarredRequestOptions + ]; + "GET /gitignore/templates": [ + GitignoreListTemplatesEndpoint, + GitignoreListTemplatesRequestOptions + ]; + "GET /gitignore/templates/:name": [ + GitignoreGetTemplateEndpoint, + GitignoreGetTemplateRequestOptions + ]; + "GET /installation/repositories": [ + AppsListReposEndpoint, + AppsListReposRequestOptions + ]; + "GET /issues": [IssuesListEndpoint, IssuesListRequestOptions]; + "GET /legacy/issues/search/:owner/:repository/:state/:keyword": [ + SearchIssuesLegacyEndpoint, + SearchIssuesLegacyRequestOptions + ]; + "GET /legacy/repos/search/:keyword": [ + SearchReposLegacyEndpoint, + SearchReposLegacyRequestOptions + ]; + "GET /legacy/user/email/:email": [ + SearchEmailLegacyEndpoint, + SearchEmailLegacyRequestOptions + ]; + "GET /legacy/user/search/:keyword": [ + SearchUsersLegacyEndpoint, + SearchUsersLegacyRequestOptions + ]; + "GET /licenses": [ + LicensesListCommonlyUsedEndpoint | LicensesListEndpoint, + LicensesListCommonlyUsedRequestOptions | LicensesListRequestOptions + ]; + "GET /licenses/:license": [LicensesGetEndpoint, LicensesGetRequestOptions]; + "GET /marketplace_listing/accounts/:account_id": [ + AppsCheckAccountIsAssociatedWithAnyEndpoint, + AppsCheckAccountIsAssociatedWithAnyRequestOptions + ]; + "GET /marketplace_listing/plans": [ + AppsListPlansEndpoint, + AppsListPlansRequestOptions + ]; + "GET /marketplace_listing/plans/:plan_id/accounts": [ + AppsListAccountsUserOrOrgOnPlanEndpoint, + AppsListAccountsUserOrOrgOnPlanRequestOptions + ]; + "GET /marketplace_listing/stubbed/accounts/:account_id": [ + AppsCheckAccountIsAssociatedWithAnyStubbedEndpoint, + AppsCheckAccountIsAssociatedWithAnyStubbedRequestOptions + ]; + "GET /marketplace_listing/stubbed/plans": [ + AppsListPlansStubbedEndpoint, + AppsListPlansStubbedRequestOptions + ]; + "GET /marketplace_listing/stubbed/plans/:plan_id/accounts": [ + AppsListAccountsUserOrOrgOnPlanStubbedEndpoint, + AppsListAccountsUserOrOrgOnPlanStubbedRequestOptions + ]; + "GET /meta": [MetaGetEndpoint, MetaGetRequestOptions]; + "GET /networks/:owner/:repo/events": [ + ActivityListPublicEventsForRepoNetworkEndpoint, + ActivityListPublicEventsForRepoNetworkRequestOptions + ]; + "GET /notifications": [ + ActivityListNotificationsEndpoint, + ActivityListNotificationsRequestOptions + ]; + "GET /notifications/threads/:thread_id": [ + ActivityGetThreadEndpoint, + ActivityGetThreadRequestOptions + ]; + "GET /notifications/threads/:thread_id/subscription": [ + ActivityGetThreadSubscriptionEndpoint, + ActivityGetThreadSubscriptionRequestOptions + ]; + "GET /organizations": [OrgsListEndpoint, OrgsListRequestOptions]; + "GET /orgs/:org": [OrgsGetEndpoint, OrgsGetRequestOptions]; + "GET /orgs/:org/blocks": [ + OrgsListBlockedUsersEndpoint, + OrgsListBlockedUsersRequestOptions + ]; + "GET /orgs/:org/blocks/:username": [ + OrgsCheckBlockedUserEndpoint, + OrgsCheckBlockedUserRequestOptions + ]; + "GET /orgs/:org/credential-authorizations": [ + OrgsListCredentialAuthorizationsEndpoint, + OrgsListCredentialAuthorizationsRequestOptions + ]; + "GET /orgs/:org/events": [ + ActivityListPublicEventsForOrgEndpoint, + ActivityListPublicEventsForOrgRequestOptions + ]; + "GET /orgs/:org/hooks": [OrgsListHooksEndpoint, OrgsListHooksRequestOptions]; + "GET /orgs/:org/hooks/:hook_id": [ + OrgsGetHookEndpoint, + OrgsGetHookRequestOptions + ]; + "GET /orgs/:org/installation": [ + AppsGetOrgInstallationEndpoint | AppsFindOrgInstallationEndpoint, + AppsGetOrgInstallationRequestOptions | AppsFindOrgInstallationRequestOptions + ]; + "GET /orgs/:org/interaction-limits": [ + InteractionsGetRestrictionsForOrgEndpoint, + InteractionsGetRestrictionsForOrgRequestOptions + ]; + "GET /orgs/:org/invitations": [ + OrgsListPendingInvitationsEndpoint, + OrgsListPendingInvitationsRequestOptions + ]; + "GET /orgs/:org/invitations/:invitation_id/teams": [ + OrgsListInvitationTeamsEndpoint, + OrgsListInvitationTeamsRequestOptions + ]; + "GET /orgs/:org/issues": [ + IssuesListForOrgEndpoint, + IssuesListForOrgRequestOptions + ]; + "GET /orgs/:org/members": [ + OrgsListMembersEndpoint, + OrgsListMembersRequestOptions + ]; + "GET /orgs/:org/members/:username": [ + OrgsCheckMembershipEndpoint, + OrgsCheckMembershipRequestOptions + ]; + "GET /orgs/:org/memberships/:username": [ + OrgsGetMembershipEndpoint, + OrgsGetMembershipRequestOptions + ]; + "GET /orgs/:org/migrations": [ + MigrationsListForOrgEndpoint, + MigrationsListForOrgRequestOptions + ]; + "GET /orgs/:org/migrations/:migration_id": [ + MigrationsGetStatusForOrgEndpoint, + MigrationsGetStatusForOrgRequestOptions + ]; + "GET /orgs/:org/migrations/:migration_id/archive": [ + MigrationsGetArchiveForOrgEndpoint, + MigrationsGetArchiveForOrgRequestOptions + ]; + "GET /orgs/:org/outside_collaborators": [ + OrgsListOutsideCollaboratorsEndpoint, + OrgsListOutsideCollaboratorsRequestOptions + ]; + "GET /orgs/:org/projects": [ + ProjectsListForOrgEndpoint, + ProjectsListForOrgRequestOptions + ]; + "GET /orgs/:org/public_members": [ + OrgsListPublicMembersEndpoint, + OrgsListPublicMembersRequestOptions + ]; + "GET /orgs/:org/public_members/:username": [ + OrgsCheckPublicMembershipEndpoint, + OrgsCheckPublicMembershipRequestOptions + ]; + "GET /orgs/:org/repos": [ + ReposListForOrgEndpoint, + ReposListForOrgRequestOptions + ]; + "GET /orgs/:org/team-sync/groups": [ + TeamsListIdPGroupsForOrgEndpoint, + TeamsListIdPGroupsForOrgRequestOptions + ]; + "GET /orgs/:org/teams": [TeamsListEndpoint, TeamsListRequestOptions]; + "GET /orgs/:org/teams/:team_slug": [ + TeamsGetByNameEndpoint, + TeamsGetByNameRequestOptions + ]; + "GET /projects/:project_id": [ProjectsGetEndpoint, ProjectsGetRequestOptions]; + "GET /projects/:project_id/collaborators": [ + ProjectsListCollaboratorsEndpoint, + ProjectsListCollaboratorsRequestOptions + ]; + "GET /projects/:project_id/collaborators/:username/permission": [ + ProjectsReviewUserPermissionLevelEndpoint, + ProjectsReviewUserPermissionLevelRequestOptions + ]; + "GET /projects/:project_id/columns": [ + ProjectsListColumnsEndpoint, + ProjectsListColumnsRequestOptions + ]; + "GET /projects/columns/:column_id": [ + ProjectsGetColumnEndpoint, + ProjectsGetColumnRequestOptions + ]; + "GET /projects/columns/:column_id/cards": [ + ProjectsListCardsEndpoint, + ProjectsListCardsRequestOptions + ]; + "GET /projects/columns/cards/:card_id": [ + ProjectsGetCardEndpoint, + ProjectsGetCardRequestOptions + ]; + "GET /rate_limit": [RateLimitGetEndpoint, RateLimitGetRequestOptions]; + "GET /repos/:owner/:repo": [ReposGetEndpoint, ReposGetRequestOptions]; + "GET /repos/:owner/:repo/:archive_format/:ref": [ + ReposGetArchiveLinkEndpoint, + ReposGetArchiveLinkRequestOptions + ]; + "GET /repos/:owner/:repo/assignees": [ + IssuesListAssigneesEndpoint, + IssuesListAssigneesRequestOptions + ]; + "GET /repos/:owner/:repo/assignees/:assignee": [ + IssuesCheckAssigneeEndpoint, + IssuesCheckAssigneeRequestOptions + ]; + "GET /repos/:owner/:repo/branches": [ + ReposListBranchesEndpoint, + ReposListBranchesRequestOptions + ]; + "GET /repos/:owner/:repo/branches/:branch": [ + ReposGetBranchEndpoint, + ReposGetBranchRequestOptions + ]; + "GET /repos/:owner/:repo/branches/:branch/protection": [ + ReposGetBranchProtectionEndpoint, + ReposGetBranchProtectionRequestOptions + ]; + "GET /repos/:owner/:repo/branches/:branch/protection/enforce_admins": [ + ReposGetProtectedBranchAdminEnforcementEndpoint, + ReposGetProtectedBranchAdminEnforcementRequestOptions + ]; + "GET /repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews": [ + ReposGetProtectedBranchPullRequestReviewEnforcementEndpoint, + ReposGetProtectedBranchPullRequestReviewEnforcementRequestOptions + ]; + "GET /repos/:owner/:repo/branches/:branch/protection/required_signatures": [ + ReposGetProtectedBranchRequiredSignaturesEndpoint, + ReposGetProtectedBranchRequiredSignaturesRequestOptions + ]; + "GET /repos/:owner/:repo/branches/:branch/protection/required_status_checks": [ + ReposGetProtectedBranchRequiredStatusChecksEndpoint, + ReposGetProtectedBranchRequiredStatusChecksRequestOptions + ]; + "GET /repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts": [ + ReposListProtectedBranchRequiredStatusChecksContextsEndpoint, + ReposListProtectedBranchRequiredStatusChecksContextsRequestOptions + ]; + "GET /repos/:owner/:repo/branches/:branch/protection/restrictions": [ + ReposGetProtectedBranchRestrictionsEndpoint, + ReposGetProtectedBranchRestrictionsRequestOptions + ]; + "GET /repos/:owner/:repo/branches/:branch/protection/restrictions/apps": [ + + | ReposGetAppsWithAccessToProtectedBranchEndpoint + | ReposListAppsWithAccessToProtectedBranchEndpoint, + + | ReposGetAppsWithAccessToProtectedBranchRequestOptions + | ReposListAppsWithAccessToProtectedBranchRequestOptions + ]; + "GET /repos/:owner/:repo/branches/:branch/protection/restrictions/teams": [ + + | ReposGetTeamsWithAccessToProtectedBranchEndpoint + | ReposListProtectedBranchTeamRestrictionsEndpoint + | ReposListTeamsWithAccessToProtectedBranchEndpoint, + + | ReposGetTeamsWithAccessToProtectedBranchRequestOptions + | ReposListProtectedBranchTeamRestrictionsRequestOptions + | ReposListTeamsWithAccessToProtectedBranchRequestOptions + ]; + "GET /repos/:owner/:repo/branches/:branch/protection/restrictions/users": [ + + | ReposGetUsersWithAccessToProtectedBranchEndpoint + | ReposListProtectedBranchUserRestrictionsEndpoint + | ReposListUsersWithAccessToProtectedBranchEndpoint, + + | ReposGetUsersWithAccessToProtectedBranchRequestOptions + | ReposListProtectedBranchUserRestrictionsRequestOptions + | ReposListUsersWithAccessToProtectedBranchRequestOptions + ]; + "GET /repos/:owner/:repo/check-runs/:check_run_id": [ + ChecksGetEndpoint, + ChecksGetRequestOptions + ]; + "GET /repos/:owner/:repo/check-runs/:check_run_id/annotations": [ + ChecksListAnnotationsEndpoint, + ChecksListAnnotationsRequestOptions + ]; + "GET /repos/:owner/:repo/check-suites/:check_suite_id": [ + ChecksGetSuiteEndpoint, + ChecksGetSuiteRequestOptions + ]; + "GET /repos/:owner/:repo/check-suites/:check_suite_id/check-runs": [ + ChecksListForSuiteEndpoint, + ChecksListForSuiteRequestOptions + ]; + "GET /repos/:owner/:repo/collaborators": [ + ReposListCollaboratorsEndpoint, + ReposListCollaboratorsRequestOptions + ]; + "GET /repos/:owner/:repo/collaborators/:username": [ + ReposCheckCollaboratorEndpoint, + ReposCheckCollaboratorRequestOptions + ]; + "GET /repos/:owner/:repo/collaborators/:username/permission": [ + ReposGetCollaboratorPermissionLevelEndpoint, + ReposGetCollaboratorPermissionLevelRequestOptions + ]; + "GET /repos/:owner/:repo/comments": [ + ReposListCommitCommentsEndpoint, + ReposListCommitCommentsRequestOptions + ]; + "GET /repos/:owner/:repo/comments/:comment_id": [ + ReposGetCommitCommentEndpoint, + ReposGetCommitCommentRequestOptions + ]; + "GET /repos/:owner/:repo/comments/:comment_id/reactions": [ + ReactionsListForCommitCommentEndpoint, + ReactionsListForCommitCommentRequestOptions + ]; + "GET /repos/:owner/:repo/commits": [ + ReposListCommitsEndpoint, + ReposListCommitsRequestOptions + ]; + "GET /repos/:owner/:repo/commits/:commit_sha/branches-where-head": [ + ReposListBranchesForHeadCommitEndpoint, + ReposListBranchesForHeadCommitRequestOptions + ]; + "GET /repos/:owner/:repo/commits/:commit_sha/comments": [ + ReposListCommentsForCommitEndpoint, + ReposListCommentsForCommitRequestOptions + ]; + "GET /repos/:owner/:repo/commits/:commit_sha/pulls": [ + ReposListPullRequestsAssociatedWithCommitEndpoint, + ReposListPullRequestsAssociatedWithCommitRequestOptions + ]; + "GET /repos/:owner/:repo/commits/:ref": [ + ReposGetCommitEndpoint, + ReposGetCommitRequestOptions + ]; + "GET /repos/:owner/:repo/commits/:ref/check-runs": [ + ChecksListForRefEndpoint, + ChecksListForRefRequestOptions + ]; + "GET /repos/:owner/:repo/commits/:ref/check-suites": [ + ChecksListSuitesForRefEndpoint, + ChecksListSuitesForRefRequestOptions + ]; + "GET /repos/:owner/:repo/commits/:ref/status": [ + ReposGetCombinedStatusForRefEndpoint, + ReposGetCombinedStatusForRefRequestOptions + ]; + "GET /repos/:owner/:repo/commits/:ref/statuses": [ + ReposListStatusesForRefEndpoint, + ReposListStatusesForRefRequestOptions + ]; + "GET /repos/:owner/:repo/community/code_of_conduct": [ + CodesOfConductGetForRepoEndpoint, + CodesOfConductGetForRepoRequestOptions + ]; + "GET /repos/:owner/:repo/community/profile": [ + ReposRetrieveCommunityProfileMetricsEndpoint, + ReposRetrieveCommunityProfileMetricsRequestOptions + ]; + "GET /repos/:owner/:repo/compare/:base...:head": [ + ReposCompareCommitsEndpoint, + ReposCompareCommitsRequestOptions + ]; + "GET /repos/:owner/:repo/contents/:path": [ + ReposGetContentsEndpoint, + ReposGetContentsRequestOptions + ]; + "GET /repos/:owner/:repo/contributors": [ + ReposListContributorsEndpoint, + ReposListContributorsRequestOptions + ]; + "GET /repos/:owner/:repo/deployments": [ + ReposListDeploymentsEndpoint, + ReposListDeploymentsRequestOptions + ]; + "GET /repos/:owner/:repo/deployments/:deployment_id": [ + ReposGetDeploymentEndpoint, + ReposGetDeploymentRequestOptions + ]; + "GET /repos/:owner/:repo/deployments/:deployment_id/statuses": [ + ReposListDeploymentStatusesEndpoint, + ReposListDeploymentStatusesRequestOptions + ]; + "GET /repos/:owner/:repo/deployments/:deployment_id/statuses/:status_id": [ + ReposGetDeploymentStatusEndpoint, + ReposGetDeploymentStatusRequestOptions + ]; + "GET /repos/:owner/:repo/downloads": [ + ReposListDownloadsEndpoint, + ReposListDownloadsRequestOptions + ]; + "GET /repos/:owner/:repo/downloads/:download_id": [ + ReposGetDownloadEndpoint, + ReposGetDownloadRequestOptions + ]; + "GET /repos/:owner/:repo/events": [ + ActivityListRepoEventsEndpoint, + ActivityListRepoEventsRequestOptions + ]; + "GET /repos/:owner/:repo/forks": [ + ReposListForksEndpoint, + ReposListForksRequestOptions + ]; + "GET /repos/:owner/:repo/git/blobs/:file_sha": [ + GitGetBlobEndpoint, + GitGetBlobRequestOptions + ]; + "GET /repos/:owner/:repo/git/commits/:commit_sha": [ + GitGetCommitEndpoint, + GitGetCommitRequestOptions + ]; + "GET /repos/:owner/:repo/git/matching-refs/:ref": [ + GitListMatchingRefsEndpoint, + GitListMatchingRefsRequestOptions + ]; + "GET /repos/:owner/:repo/git/ref/:ref": [ + GitGetRefEndpoint, + GitGetRefRequestOptions + ]; + "GET /repos/:owner/:repo/git/tags/:tag_sha": [ + GitGetTagEndpoint, + GitGetTagRequestOptions + ]; + "GET /repos/:owner/:repo/git/trees/:tree_sha": [ + GitGetTreeEndpoint, + GitGetTreeRequestOptions + ]; + "GET /repos/:owner/:repo/hooks": [ + ReposListHooksEndpoint, + ReposListHooksRequestOptions + ]; + "GET /repos/:owner/:repo/hooks/:hook_id": [ + ReposGetHookEndpoint, + ReposGetHookRequestOptions + ]; + "GET /repos/:owner/:repo/import": [ + MigrationsGetImportProgressEndpoint, + MigrationsGetImportProgressRequestOptions + ]; + "GET /repos/:owner/:repo/import/authors": [ + MigrationsGetCommitAuthorsEndpoint, + MigrationsGetCommitAuthorsRequestOptions + ]; + "GET /repos/:owner/:repo/import/large_files": [ + MigrationsGetLargeFilesEndpoint, + MigrationsGetLargeFilesRequestOptions + ]; + "GET /repos/:owner/:repo/installation": [ + AppsGetRepoInstallationEndpoint | AppsFindRepoInstallationEndpoint, + + | AppsGetRepoInstallationRequestOptions + | AppsFindRepoInstallationRequestOptions + ]; + "GET /repos/:owner/:repo/interaction-limits": [ + InteractionsGetRestrictionsForRepoEndpoint, + InteractionsGetRestrictionsForRepoRequestOptions + ]; + "GET /repos/:owner/:repo/invitations": [ + ReposListInvitationsEndpoint, + ReposListInvitationsRequestOptions + ]; + "GET /repos/:owner/:repo/issues": [ + IssuesListForRepoEndpoint, + IssuesListForRepoRequestOptions + ]; + "GET /repos/:owner/:repo/issues/:issue_number": [ + IssuesGetEndpoint, + IssuesGetRequestOptions + ]; + "GET /repos/:owner/:repo/issues/:issue_number/comments": [ + IssuesListCommentsEndpoint, + IssuesListCommentsRequestOptions + ]; + "GET /repos/:owner/:repo/issues/:issue_number/events": [ + IssuesListEventsEndpoint, + IssuesListEventsRequestOptions + ]; + "GET /repos/:owner/:repo/issues/:issue_number/labels": [ + IssuesListLabelsOnIssueEndpoint, + IssuesListLabelsOnIssueRequestOptions + ]; + "GET /repos/:owner/:repo/issues/:issue_number/reactions": [ + ReactionsListForIssueEndpoint, + ReactionsListForIssueRequestOptions + ]; + "GET /repos/:owner/:repo/issues/:issue_number/timeline": [ + IssuesListEventsForTimelineEndpoint, + IssuesListEventsForTimelineRequestOptions + ]; + "GET /repos/:owner/:repo/issues/comments": [ + IssuesListCommentsForRepoEndpoint, + IssuesListCommentsForRepoRequestOptions + ]; + "GET /repos/:owner/:repo/issues/comments/:comment_id": [ + IssuesGetCommentEndpoint, + IssuesGetCommentRequestOptions + ]; + "GET /repos/:owner/:repo/issues/comments/:comment_id/reactions": [ + ReactionsListForIssueCommentEndpoint, + ReactionsListForIssueCommentRequestOptions + ]; + "GET /repos/:owner/:repo/issues/events": [ + IssuesListEventsForRepoEndpoint, + IssuesListEventsForRepoRequestOptions + ]; + "GET /repos/:owner/:repo/issues/events/:event_id": [ + IssuesGetEventEndpoint, + IssuesGetEventRequestOptions + ]; + "GET /repos/:owner/:repo/keys": [ + ReposListDeployKeysEndpoint, + ReposListDeployKeysRequestOptions + ]; + "GET /repos/:owner/:repo/keys/:key_id": [ + ReposGetDeployKeyEndpoint, + ReposGetDeployKeyRequestOptions + ]; + "GET /repos/:owner/:repo/labels": [ + IssuesListLabelsForRepoEndpoint, + IssuesListLabelsForRepoRequestOptions + ]; + "GET /repos/:owner/:repo/labels/:name": [ + IssuesGetLabelEndpoint, + IssuesGetLabelRequestOptions + ]; + "GET /repos/:owner/:repo/languages": [ + ReposListLanguagesEndpoint, + ReposListLanguagesRequestOptions + ]; + "GET /repos/:owner/:repo/license": [ + LicensesGetForRepoEndpoint, + LicensesGetForRepoRequestOptions + ]; + "GET /repos/:owner/:repo/milestones": [ + IssuesListMilestonesForRepoEndpoint, + IssuesListMilestonesForRepoRequestOptions + ]; + "GET /repos/:owner/:repo/milestones/:milestone_number": [ + IssuesGetMilestoneEndpoint, + IssuesGetMilestoneRequestOptions + ]; + "GET /repos/:owner/:repo/milestones/:milestone_number/labels": [ + IssuesListLabelsForMilestoneEndpoint, + IssuesListLabelsForMilestoneRequestOptions + ]; + "GET /repos/:owner/:repo/notifications": [ + ActivityListNotificationsForRepoEndpoint, + ActivityListNotificationsForRepoRequestOptions + ]; + "GET /repos/:owner/:repo/pages": [ + ReposGetPagesEndpoint, + ReposGetPagesRequestOptions + ]; + "GET /repos/:owner/:repo/pages/builds": [ + ReposListPagesBuildsEndpoint, + ReposListPagesBuildsRequestOptions + ]; + "GET /repos/:owner/:repo/pages/builds/:build_id": [ + ReposGetPagesBuildEndpoint, + ReposGetPagesBuildRequestOptions + ]; + "GET /repos/:owner/:repo/pages/builds/latest": [ + ReposGetLatestPagesBuildEndpoint, + ReposGetLatestPagesBuildRequestOptions + ]; + "GET /repos/:owner/:repo/projects": [ + ProjectsListForRepoEndpoint, + ProjectsListForRepoRequestOptions + ]; + "GET /repos/:owner/:repo/pulls": [PullsListEndpoint, PullsListRequestOptions]; + "GET /repos/:owner/:repo/pulls/:pull_number": [ + PullsGetEndpoint, + PullsGetRequestOptions + ]; + "GET /repos/:owner/:repo/pulls/:pull_number/comments": [ + PullsListCommentsEndpoint, + PullsListCommentsRequestOptions + ]; + "GET /repos/:owner/:repo/pulls/:pull_number/commits": [ + PullsListCommitsEndpoint, + PullsListCommitsRequestOptions + ]; + "GET /repos/:owner/:repo/pulls/:pull_number/files": [ + PullsListFilesEndpoint, + PullsListFilesRequestOptions + ]; + "GET /repos/:owner/:repo/pulls/:pull_number/merge": [ + PullsCheckIfMergedEndpoint, + PullsCheckIfMergedRequestOptions + ]; + "GET /repos/:owner/:repo/pulls/:pull_number/requested_reviewers": [ + PullsListReviewRequestsEndpoint, + PullsListReviewRequestsRequestOptions + ]; + "GET /repos/:owner/:repo/pulls/:pull_number/reviews": [ + PullsListReviewsEndpoint, + PullsListReviewsRequestOptions + ]; + "GET /repos/:owner/:repo/pulls/:pull_number/reviews/:review_id": [ + PullsGetReviewEndpoint, + PullsGetReviewRequestOptions + ]; + "GET /repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/comments": [ + PullsGetCommentsForReviewEndpoint, + PullsGetCommentsForReviewRequestOptions + ]; + "GET /repos/:owner/:repo/pulls/comments": [ + PullsListCommentsForRepoEndpoint, + PullsListCommentsForRepoRequestOptions + ]; + "GET /repos/:owner/:repo/pulls/comments/:comment_id": [ + PullsGetCommentEndpoint, + PullsGetCommentRequestOptions + ]; + "GET /repos/:owner/:repo/pulls/comments/:comment_id/reactions": [ + ReactionsListForPullRequestReviewCommentEndpoint, + ReactionsListForPullRequestReviewCommentRequestOptions + ]; + "GET /repos/:owner/:repo/readme": [ + ReposGetReadmeEndpoint, + ReposGetReadmeRequestOptions + ]; + "GET /repos/:owner/:repo/releases": [ + ReposListReleasesEndpoint, + ReposListReleasesRequestOptions + ]; + "GET /repos/:owner/:repo/releases/:release_id": [ + ReposGetReleaseEndpoint, + ReposGetReleaseRequestOptions + ]; + "GET /repos/:owner/:repo/releases/:release_id/assets": [ + ReposListAssetsForReleaseEndpoint, + ReposListAssetsForReleaseRequestOptions + ]; + "GET /repos/:owner/:repo/releases/assets/:asset_id": [ + ReposGetReleaseAssetEndpoint, + ReposGetReleaseAssetRequestOptions + ]; + "GET /repos/:owner/:repo/releases/latest": [ + ReposGetLatestReleaseEndpoint, + ReposGetLatestReleaseRequestOptions + ]; + "GET /repos/:owner/:repo/releases/tags/:tag": [ + ReposGetReleaseByTagEndpoint, + ReposGetReleaseByTagRequestOptions + ]; + "GET /repos/:owner/:repo/stargazers": [ + ActivityListStargazersForRepoEndpoint, + ActivityListStargazersForRepoRequestOptions + ]; + "GET /repos/:owner/:repo/stats/code_frequency": [ + ReposGetCodeFrequencyStatsEndpoint, + ReposGetCodeFrequencyStatsRequestOptions + ]; + "GET /repos/:owner/:repo/stats/commit_activity": [ + ReposGetCommitActivityStatsEndpoint, + ReposGetCommitActivityStatsRequestOptions + ]; + "GET /repos/:owner/:repo/stats/contributors": [ + ReposGetContributorsStatsEndpoint, + ReposGetContributorsStatsRequestOptions + ]; + "GET /repos/:owner/:repo/stats/participation": [ + ReposGetParticipationStatsEndpoint, + ReposGetParticipationStatsRequestOptions + ]; + "GET /repos/:owner/:repo/stats/punch_card": [ + ReposGetPunchCardStatsEndpoint, + ReposGetPunchCardStatsRequestOptions + ]; + "GET /repos/:owner/:repo/subscribers": [ + ActivityListWatchersForRepoEndpoint, + ActivityListWatchersForRepoRequestOptions + ]; + "GET /repos/:owner/:repo/subscription": [ + ActivityGetRepoSubscriptionEndpoint, + ActivityGetRepoSubscriptionRequestOptions + ]; + "GET /repos/:owner/:repo/tags": [ + ReposListTagsEndpoint, + ReposListTagsRequestOptions + ]; + "GET /repos/:owner/:repo/teams": [ + ReposListTeamsEndpoint, + ReposListTeamsRequestOptions + ]; + "GET /repos/:owner/:repo/topics": [ + ReposListTopicsEndpoint, + ReposListTopicsRequestOptions + ]; + "GET /repos/:owner/:repo/traffic/clones": [ + ReposGetClonesEndpoint, + ReposGetClonesRequestOptions + ]; + "GET /repos/:owner/:repo/traffic/popular/paths": [ + ReposGetTopPathsEndpoint, + ReposGetTopPathsRequestOptions + ]; + "GET /repos/:owner/:repo/traffic/popular/referrers": [ + ReposGetTopReferrersEndpoint, + ReposGetTopReferrersRequestOptions + ]; + "GET /repos/:owner/:repo/traffic/views": [ + ReposGetViewsEndpoint, + ReposGetViewsRequestOptions + ]; + "GET /repos/:owner/:repo/vulnerability-alerts": [ + ReposCheckVulnerabilityAlertsEndpoint, + ReposCheckVulnerabilityAlertsRequestOptions + ]; + "GET /repositories": [ReposListPublicEndpoint, ReposListPublicRequestOptions]; + "GET /scim/v2/organizations/:org/Users": [ + ScimListProvisionedIdentitiesEndpoint, + ScimListProvisionedIdentitiesRequestOptions + ]; + "GET /scim/v2/organizations/:org/Users/:scim_user_id": [ + ScimGetProvisioningDetailsForUserEndpoint, + ScimGetProvisioningDetailsForUserRequestOptions + ]; + "GET /search/code": [SearchCodeEndpoint, SearchCodeRequestOptions]; + "GET /search/commits": [SearchCommitsEndpoint, SearchCommitsRequestOptions]; + "GET /search/issues": [ + SearchIssuesAndPullRequestsEndpoint | SearchIssuesEndpoint, + SearchIssuesAndPullRequestsRequestOptions | SearchIssuesRequestOptions + ]; + "GET /search/labels": [SearchLabelsEndpoint, SearchLabelsRequestOptions]; + "GET /search/repositories": [SearchReposEndpoint, SearchReposRequestOptions]; + "GET /search/topics": [SearchTopicsEndpoint, SearchTopicsRequestOptions]; + "GET /search/users": [SearchUsersEndpoint, SearchUsersRequestOptions]; + "GET /teams/:team_id": [TeamsGetEndpoint, TeamsGetRequestOptions]; + "GET /teams/:team_id/discussions": [ + TeamsListDiscussionsEndpoint, + TeamsListDiscussionsRequestOptions + ]; + "GET /teams/:team_id/discussions/:discussion_number": [ + TeamsGetDiscussionEndpoint, + TeamsGetDiscussionRequestOptions + ]; + "GET /teams/:team_id/discussions/:discussion_number/comments": [ + TeamsListDiscussionCommentsEndpoint, + TeamsListDiscussionCommentsRequestOptions + ]; + "GET /teams/:team_id/discussions/:discussion_number/comments/:comment_number": [ + TeamsGetDiscussionCommentEndpoint, + TeamsGetDiscussionCommentRequestOptions + ]; + "GET /teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions": [ + ReactionsListForTeamDiscussionCommentEndpoint, + ReactionsListForTeamDiscussionCommentRequestOptions + ]; + "GET /teams/:team_id/discussions/:discussion_number/reactions": [ + ReactionsListForTeamDiscussionEndpoint, + ReactionsListForTeamDiscussionRequestOptions + ]; + "GET /teams/:team_id/invitations": [ + TeamsListPendingInvitationsEndpoint, + TeamsListPendingInvitationsRequestOptions + ]; + "GET /teams/:team_id/members": [ + TeamsListMembersEndpoint, + TeamsListMembersRequestOptions + ]; + "GET /teams/:team_id/members/:username": [ + TeamsGetMemberEndpoint, + TeamsGetMemberRequestOptions + ]; + "GET /teams/:team_id/memberships/:username": [ + TeamsGetMembershipEndpoint, + TeamsGetMembershipRequestOptions + ]; + "GET /teams/:team_id/projects": [ + TeamsListProjectsEndpoint, + TeamsListProjectsRequestOptions + ]; + "GET /teams/:team_id/projects/:project_id": [ + TeamsReviewProjectEndpoint, + TeamsReviewProjectRequestOptions + ]; + "GET /teams/:team_id/repos": [ + TeamsListReposEndpoint, + TeamsListReposRequestOptions + ]; + "GET /teams/:team_id/repos/:owner/:repo": [ + TeamsCheckManagesRepoEndpoint, + TeamsCheckManagesRepoRequestOptions + ]; + "GET /teams/:team_id/team-sync/group-mappings": [ + TeamsListIdPGroupsEndpoint, + TeamsListIdPGroupsRequestOptions + ]; + "GET /teams/:team_id/teams": [ + TeamsListChildEndpoint, + TeamsListChildRequestOptions + ]; + "GET /user": [ + UsersGetAuthenticatedEndpoint, + UsersGetAuthenticatedRequestOptions + ]; + "GET /user/blocks": [ + UsersListBlockedEndpoint, + UsersListBlockedRequestOptions + ]; + "GET /user/blocks/:username": [ + UsersCheckBlockedEndpoint, + UsersCheckBlockedRequestOptions + ]; + "GET /user/emails": [UsersListEmailsEndpoint, UsersListEmailsRequestOptions]; + "GET /user/followers": [ + UsersListFollowersForAuthenticatedUserEndpoint, + UsersListFollowersForAuthenticatedUserRequestOptions + ]; + "GET /user/following": [ + UsersListFollowingForAuthenticatedUserEndpoint, + UsersListFollowingForAuthenticatedUserRequestOptions + ]; + "GET /user/following/:username": [ + UsersCheckFollowingEndpoint, + UsersCheckFollowingRequestOptions + ]; + "GET /user/gpg_keys": [ + UsersListGpgKeysEndpoint, + UsersListGpgKeysRequestOptions + ]; + "GET /user/gpg_keys/:gpg_key_id": [ + UsersGetGpgKeyEndpoint, + UsersGetGpgKeyRequestOptions + ]; + "GET /user/installations": [ + AppsListInstallationsForAuthenticatedUserEndpoint, + AppsListInstallationsForAuthenticatedUserRequestOptions + ]; + "GET /user/installations/:installation_id/repositories": [ + AppsListInstallationReposForAuthenticatedUserEndpoint, + AppsListInstallationReposForAuthenticatedUserRequestOptions + ]; + "GET /user/issues": [ + IssuesListForAuthenticatedUserEndpoint, + IssuesListForAuthenticatedUserRequestOptions + ]; + "GET /user/keys": [ + UsersListPublicKeysEndpoint, + UsersListPublicKeysRequestOptions + ]; + "GET /user/keys/:key_id": [ + UsersGetPublicKeyEndpoint, + UsersGetPublicKeyRequestOptions + ]; + "GET /user/marketplace_purchases": [ + AppsListMarketplacePurchasesForAuthenticatedUserEndpoint, + AppsListMarketplacePurchasesForAuthenticatedUserRequestOptions + ]; + "GET /user/marketplace_purchases/stubbed": [ + AppsListMarketplacePurchasesForAuthenticatedUserStubbedEndpoint, + AppsListMarketplacePurchasesForAuthenticatedUserStubbedRequestOptions + ]; + "GET /user/memberships/orgs": [ + OrgsListMembershipsEndpoint, + OrgsListMembershipsRequestOptions + ]; + "GET /user/memberships/orgs/:org": [ + OrgsGetMembershipForAuthenticatedUserEndpoint, + OrgsGetMembershipForAuthenticatedUserRequestOptions + ]; + "GET /user/migrations": [ + MigrationsListForAuthenticatedUserEndpoint, + MigrationsListForAuthenticatedUserRequestOptions + ]; + "GET /user/migrations/:migration_id": [ + MigrationsGetStatusForAuthenticatedUserEndpoint, + MigrationsGetStatusForAuthenticatedUserRequestOptions + ]; + "GET /user/migrations/:migration_id/archive": [ + MigrationsGetArchiveForAuthenticatedUserEndpoint, + MigrationsGetArchiveForAuthenticatedUserRequestOptions + ]; + "GET /user/orgs": [ + OrgsListForAuthenticatedUserEndpoint, + OrgsListForAuthenticatedUserRequestOptions + ]; + "GET /user/public_emails": [ + UsersListPublicEmailsEndpoint, + UsersListPublicEmailsRequestOptions + ]; + "GET /user/repos": [ReposListEndpoint, ReposListRequestOptions]; + "GET /user/repository_invitations": [ + ReposListInvitationsForAuthenticatedUserEndpoint, + ReposListInvitationsForAuthenticatedUserRequestOptions + ]; + "GET /user/starred": [ + ActivityListReposStarredByAuthenticatedUserEndpoint, + ActivityListReposStarredByAuthenticatedUserRequestOptions + ]; + "GET /user/starred/:owner/:repo": [ + ActivityCheckStarringRepoEndpoint, + ActivityCheckStarringRepoRequestOptions + ]; + "GET /user/subscriptions": [ + ActivityListWatchedReposForAuthenticatedUserEndpoint, + ActivityListWatchedReposForAuthenticatedUserRequestOptions + ]; + "GET /user/subscriptions/:owner/:repo": [ + ActivityCheckWatchingRepoLegacyEndpoint, + ActivityCheckWatchingRepoLegacyRequestOptions + ]; + "GET /user/teams": [ + TeamsListForAuthenticatedUserEndpoint, + TeamsListForAuthenticatedUserRequestOptions + ]; + "GET /users": [UsersListEndpoint, UsersListRequestOptions]; + "GET /users/:username": [ + UsersGetByUsernameEndpoint, + UsersGetByUsernameRequestOptions + ]; + "GET /users/:username/events": [ + ActivityListEventsForUserEndpoint, + ActivityListEventsForUserRequestOptions + ]; + "GET /users/:username/events/orgs/:org": [ + ActivityListEventsForOrgEndpoint, + ActivityListEventsForOrgRequestOptions + ]; + "GET /users/:username/events/public": [ + ActivityListPublicEventsForUserEndpoint, + ActivityListPublicEventsForUserRequestOptions + ]; + "GET /users/:username/followers": [ + UsersListFollowersForUserEndpoint, + UsersListFollowersForUserRequestOptions + ]; + "GET /users/:username/following": [ + UsersListFollowingForUserEndpoint, + UsersListFollowingForUserRequestOptions + ]; + "GET /users/:username/following/:target_user": [ + UsersCheckFollowingForUserEndpoint, + UsersCheckFollowingForUserRequestOptions + ]; + "GET /users/:username/gists": [ + GistsListPublicForUserEndpoint, + GistsListPublicForUserRequestOptions + ]; + "GET /users/:username/gpg_keys": [ + UsersListGpgKeysForUserEndpoint, + UsersListGpgKeysForUserRequestOptions + ]; + "GET /users/:username/hovercard": [ + UsersGetContextForUserEndpoint, + UsersGetContextForUserRequestOptions + ]; + "GET /users/:username/installation": [ + AppsGetUserInstallationEndpoint | AppsFindUserInstallationEndpoint, + + | AppsGetUserInstallationRequestOptions + | AppsFindUserInstallationRequestOptions + ]; + "GET /users/:username/keys": [ + UsersListPublicKeysForUserEndpoint, + UsersListPublicKeysForUserRequestOptions + ]; + "GET /users/:username/orgs": [ + OrgsListForUserEndpoint, + OrgsListForUserRequestOptions + ]; + "GET /users/:username/projects": [ + ProjectsListForUserEndpoint, + ProjectsListForUserRequestOptions + ]; + "GET /users/:username/received_events": [ + ActivityListReceivedEventsForUserEndpoint, + ActivityListReceivedEventsForUserRequestOptions + ]; + "GET /users/:username/received_events/public": [ + ActivityListReceivedPublicEventsForUserEndpoint, + ActivityListReceivedPublicEventsForUserRequestOptions + ]; + "GET /users/:username/repos": [ + ReposListForUserEndpoint, + ReposListForUserRequestOptions + ]; + "GET /users/:username/starred": [ + ActivityListReposStarredByUserEndpoint, + ActivityListReposStarredByUserRequestOptions + ]; + "GET /users/:username/subscriptions": [ + ActivityListReposWatchedByUserEndpoint, + ActivityListReposWatchedByUserRequestOptions + ]; + "PATCH /authorizations/:authorization_id": [ + OauthAuthorizationsUpdateAuthorizationEndpoint, + OauthAuthorizationsUpdateAuthorizationRequestOptions + ]; + "PATCH /gists/:gist_id": [GistsUpdateEndpoint, GistsUpdateRequestOptions]; + "PATCH /gists/:gist_id/comments/:comment_id": [ + GistsUpdateCommentEndpoint, + GistsUpdateCommentRequestOptions + ]; + "PATCH /notifications/threads/:thread_id": [ + ActivityMarkThreadAsReadEndpoint, + ActivityMarkThreadAsReadRequestOptions + ]; + "PATCH /orgs/:org": [OrgsUpdateEndpoint, OrgsUpdateRequestOptions]; + "PATCH /orgs/:org/hooks/:hook_id": [ + OrgsUpdateHookEndpoint, + OrgsUpdateHookRequestOptions + ]; + "PATCH /projects/:project_id": [ + ProjectsUpdateEndpoint, + ProjectsUpdateRequestOptions + ]; + "PATCH /projects/columns/:column_id": [ + ProjectsUpdateColumnEndpoint, + ProjectsUpdateColumnRequestOptions + ]; + "PATCH /projects/columns/cards/:card_id": [ + ProjectsUpdateCardEndpoint, + ProjectsUpdateCardRequestOptions + ]; + "PATCH /repos/:owner/:repo": [ReposUpdateEndpoint, ReposUpdateRequestOptions]; + "PATCH /repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews": [ + ReposUpdateProtectedBranchPullRequestReviewEnforcementEndpoint, + ReposUpdateProtectedBranchPullRequestReviewEnforcementRequestOptions + ]; + "PATCH /repos/:owner/:repo/branches/:branch/protection/required_status_checks": [ + ReposUpdateProtectedBranchRequiredStatusChecksEndpoint, + ReposUpdateProtectedBranchRequiredStatusChecksRequestOptions + ]; + "PATCH /repos/:owner/:repo/check-runs/:check_run_id": [ + ChecksUpdateEndpoint, + ChecksUpdateRequestOptions + ]; + "PATCH /repos/:owner/:repo/check-suites/preferences": [ + ChecksSetSuitesPreferencesEndpoint, + ChecksSetSuitesPreferencesRequestOptions + ]; + "PATCH /repos/:owner/:repo/comments/:comment_id": [ + ReposUpdateCommitCommentEndpoint, + ReposUpdateCommitCommentRequestOptions + ]; + "PATCH /repos/:owner/:repo/git/refs/:ref": [ + GitUpdateRefEndpoint, + GitUpdateRefRequestOptions + ]; + "PATCH /repos/:owner/:repo/hooks/:hook_id": [ + ReposUpdateHookEndpoint, + ReposUpdateHookRequestOptions + ]; + "PATCH /repos/:owner/:repo/import": [ + MigrationsUpdateImportEndpoint, + MigrationsUpdateImportRequestOptions + ]; + "PATCH /repos/:owner/:repo/import/authors/:author_id": [ + MigrationsMapCommitAuthorEndpoint, + MigrationsMapCommitAuthorRequestOptions + ]; + "PATCH /repos/:owner/:repo/import/lfs": [ + MigrationsSetLfsPreferenceEndpoint, + MigrationsSetLfsPreferenceRequestOptions + ]; + "PATCH /repos/:owner/:repo/invitations/:invitation_id": [ + ReposUpdateInvitationEndpoint, + ReposUpdateInvitationRequestOptions + ]; + "PATCH /repos/:owner/:repo/issues/:issue_number": [ + IssuesUpdateEndpoint, + IssuesUpdateRequestOptions + ]; + "PATCH /repos/:owner/:repo/issues/comments/:comment_id": [ + IssuesUpdateCommentEndpoint, + IssuesUpdateCommentRequestOptions + ]; + "PATCH /repos/:owner/:repo/labels/:name": [ + IssuesUpdateLabelEndpoint, + IssuesUpdateLabelRequestOptions + ]; + "PATCH /repos/:owner/:repo/milestones/:milestone_number": [ + IssuesUpdateMilestoneEndpoint, + IssuesUpdateMilestoneRequestOptions + ]; + "PATCH /repos/:owner/:repo/pulls/:pull_number": [ + PullsUpdateEndpoint, + PullsUpdateRequestOptions + ]; + "PATCH /repos/:owner/:repo/pulls/comments/:comment_id": [ + PullsUpdateCommentEndpoint, + PullsUpdateCommentRequestOptions + ]; + "PATCH /repos/:owner/:repo/releases/:release_id": [ + ReposUpdateReleaseEndpoint, + ReposUpdateReleaseRequestOptions + ]; + "PATCH /repos/:owner/:repo/releases/assets/:asset_id": [ + ReposUpdateReleaseAssetEndpoint, + ReposUpdateReleaseAssetRequestOptions + ]; + "PATCH /scim/v2/organizations/:org/Users/:scim_user_id": [ + ScimUpdateUserAttributeEndpoint, + ScimUpdateUserAttributeRequestOptions + ]; + "PATCH /teams/:team_id": [TeamsUpdateEndpoint, TeamsUpdateRequestOptions]; + "PATCH /teams/:team_id/discussions/:discussion_number": [ + TeamsUpdateDiscussionEndpoint, + TeamsUpdateDiscussionRequestOptions + ]; + "PATCH /teams/:team_id/discussions/:discussion_number/comments/:comment_number": [ + TeamsUpdateDiscussionCommentEndpoint, + TeamsUpdateDiscussionCommentRequestOptions + ]; + "PATCH /teams/:team_id/team-sync/group-mappings": [ + TeamsCreateOrUpdateIdPGroupConnectionsEndpoint, + TeamsCreateOrUpdateIdPGroupConnectionsRequestOptions + ]; + "PATCH /user": [ + UsersUpdateAuthenticatedEndpoint, + UsersUpdateAuthenticatedRequestOptions + ]; + "PATCH /user/email/visibility": [ + UsersTogglePrimaryEmailVisibilityEndpoint, + UsersTogglePrimaryEmailVisibilityRequestOptions + ]; + "PATCH /user/memberships/orgs/:org": [ + OrgsUpdateMembershipEndpoint, + OrgsUpdateMembershipRequestOptions + ]; + "PATCH /user/repository_invitations/:invitation_id": [ + ReposAcceptInvitationEndpoint, + ReposAcceptInvitationRequestOptions + ]; + "POST /app-manifests/:code/conversions": [ + AppsCreateFromManifestEndpoint, + AppsCreateFromManifestRequestOptions + ]; + "POST /app/installations/:installation_id/access_tokens": [ + AppsCreateInstallationTokenEndpoint, + AppsCreateInstallationTokenRequestOptions + ]; + "POST /applications/:client_id/tokens/:access_token": [ + OauthAuthorizationsResetAuthorizationEndpoint, + OauthAuthorizationsResetAuthorizationRequestOptions + ]; + "POST /authorizations": [ + OauthAuthorizationsCreateAuthorizationEndpoint, + OauthAuthorizationsCreateAuthorizationRequestOptions + ]; + "POST /content_references/:content_reference_id/attachments": [ + AppsCreateContentAttachmentEndpoint, + AppsCreateContentAttachmentRequestOptions + ]; + "POST /gists": [GistsCreateEndpoint, GistsCreateRequestOptions]; + "POST /gists/:gist_id/comments": [ + GistsCreateCommentEndpoint, + GistsCreateCommentRequestOptions + ]; + "POST /gists/:gist_id/forks": [GistsForkEndpoint, GistsForkRequestOptions]; + "POST /markdown": [MarkdownRenderEndpoint, MarkdownRenderRequestOptions]; + "POST /markdown/raw": [ + MarkdownRenderRawEndpoint, + MarkdownRenderRawRequestOptions + ]; + "POST /orgs/:org/hooks": [ + OrgsCreateHookEndpoint, + OrgsCreateHookRequestOptions + ]; + "POST /orgs/:org/hooks/:hook_id/pings": [ + OrgsPingHookEndpoint, + OrgsPingHookRequestOptions + ]; + "POST /orgs/:org/invitations": [ + OrgsCreateInvitationEndpoint, + OrgsCreateInvitationRequestOptions + ]; + "POST /orgs/:org/migrations": [ + MigrationsStartForOrgEndpoint, + MigrationsStartForOrgRequestOptions + ]; + "POST /orgs/:org/projects": [ + ProjectsCreateForOrgEndpoint, + ProjectsCreateForOrgRequestOptions + ]; + "POST /orgs/:org/repos": [ + ReposCreateInOrgEndpoint, + ReposCreateInOrgRequestOptions + ]; + "POST /orgs/:org/teams": [TeamsCreateEndpoint, TeamsCreateRequestOptions]; + "POST /projects/:project_id/columns": [ + ProjectsCreateColumnEndpoint, + ProjectsCreateColumnRequestOptions + ]; + "POST /projects/columns/:column_id/cards": [ + ProjectsCreateCardEndpoint, + ProjectsCreateCardRequestOptions + ]; + "POST /projects/columns/:column_id/moves": [ + ProjectsMoveColumnEndpoint, + ProjectsMoveColumnRequestOptions + ]; + "POST /projects/columns/cards/:card_id/moves": [ + ProjectsMoveCardEndpoint, + ProjectsMoveCardRequestOptions + ]; + "POST /repos/:owner/:repo/branches/:branch/protection/enforce_admins": [ + ReposAddProtectedBranchAdminEnforcementEndpoint, + ReposAddProtectedBranchAdminEnforcementRequestOptions + ]; + "POST /repos/:owner/:repo/branches/:branch/protection/required_signatures": [ + ReposAddProtectedBranchRequiredSignaturesEndpoint, + ReposAddProtectedBranchRequiredSignaturesRequestOptions + ]; + "POST /repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts": [ + ReposAddProtectedBranchRequiredStatusChecksContextsEndpoint, + ReposAddProtectedBranchRequiredStatusChecksContextsRequestOptions + ]; + "POST /repos/:owner/:repo/branches/:branch/protection/restrictions/apps": [ + ReposAddProtectedBranchAppRestrictionsEndpoint, + ReposAddProtectedBranchAppRestrictionsRequestOptions + ]; + "POST /repos/:owner/:repo/branches/:branch/protection/restrictions/teams": [ + ReposAddProtectedBranchTeamRestrictionsEndpoint, + ReposAddProtectedBranchTeamRestrictionsRequestOptions + ]; + "POST /repos/:owner/:repo/branches/:branch/protection/restrictions/users": [ + ReposAddProtectedBranchUserRestrictionsEndpoint, + ReposAddProtectedBranchUserRestrictionsRequestOptions + ]; + "POST /repos/:owner/:repo/check-runs": [ + ChecksCreateEndpoint, + ChecksCreateRequestOptions + ]; + "POST /repos/:owner/:repo/check-suites": [ + ChecksCreateSuiteEndpoint, + ChecksCreateSuiteRequestOptions + ]; + "POST /repos/:owner/:repo/check-suites/:check_suite_id/rerequest": [ + ChecksRerequestSuiteEndpoint, + ChecksRerequestSuiteRequestOptions + ]; + "POST /repos/:owner/:repo/comments/:comment_id/reactions": [ + ReactionsCreateForCommitCommentEndpoint, + ReactionsCreateForCommitCommentRequestOptions + ]; + "POST /repos/:owner/:repo/commits/:commit_sha/comments": [ + ReposCreateCommitCommentEndpoint, + ReposCreateCommitCommentRequestOptions + ]; + "POST /repos/:owner/:repo/deployments": [ + ReposCreateDeploymentEndpoint, + ReposCreateDeploymentRequestOptions + ]; + "POST /repos/:owner/:repo/deployments/:deployment_id/statuses": [ + ReposCreateDeploymentStatusEndpoint, + ReposCreateDeploymentStatusRequestOptions + ]; + "POST /repos/:owner/:repo/dispatches": [ + ReposCreateDispatchEventEndpoint, + ReposCreateDispatchEventRequestOptions + ]; + "POST /repos/:owner/:repo/forks": [ + ReposCreateForkEndpoint, + ReposCreateForkRequestOptions + ]; + "POST /repos/:owner/:repo/git/blobs": [ + GitCreateBlobEndpoint, + GitCreateBlobRequestOptions + ]; + "POST /repos/:owner/:repo/git/commits": [ + GitCreateCommitEndpoint, + GitCreateCommitRequestOptions + ]; + "POST /repos/:owner/:repo/git/refs": [ + GitCreateRefEndpoint, + GitCreateRefRequestOptions + ]; + "POST /repos/:owner/:repo/git/tags": [ + GitCreateTagEndpoint, + GitCreateTagRequestOptions + ]; + "POST /repos/:owner/:repo/git/trees": [ + GitCreateTreeEndpoint, + GitCreateTreeRequestOptions + ]; + "POST /repos/:owner/:repo/hooks": [ + ReposCreateHookEndpoint, + ReposCreateHookRequestOptions + ]; + "POST /repos/:owner/:repo/hooks/:hook_id/pings": [ + ReposPingHookEndpoint, + ReposPingHookRequestOptions + ]; + "POST /repos/:owner/:repo/hooks/:hook_id/tests": [ + ReposTestPushHookEndpoint, + ReposTestPushHookRequestOptions + ]; + "POST /repos/:owner/:repo/issues": [ + IssuesCreateEndpoint, + IssuesCreateRequestOptions + ]; + "POST /repos/:owner/:repo/issues/:issue_number/assignees": [ + IssuesAddAssigneesEndpoint, + IssuesAddAssigneesRequestOptions + ]; + "POST /repos/:owner/:repo/issues/:issue_number/comments": [ + IssuesCreateCommentEndpoint, + IssuesCreateCommentRequestOptions + ]; + "POST /repos/:owner/:repo/issues/:issue_number/labels": [ + IssuesAddLabelsEndpoint, + IssuesAddLabelsRequestOptions + ]; + "POST /repos/:owner/:repo/issues/:issue_number/reactions": [ + ReactionsCreateForIssueEndpoint, + ReactionsCreateForIssueRequestOptions + ]; + "POST /repos/:owner/:repo/issues/comments/:comment_id/reactions": [ + ReactionsCreateForIssueCommentEndpoint, + ReactionsCreateForIssueCommentRequestOptions + ]; + "POST /repos/:owner/:repo/keys": [ + ReposAddDeployKeyEndpoint, + ReposAddDeployKeyRequestOptions + ]; + "POST /repos/:owner/:repo/labels": [ + IssuesCreateLabelEndpoint, + IssuesCreateLabelRequestOptions + ]; + "POST /repos/:owner/:repo/merges": [ + ReposMergeEndpoint, + ReposMergeRequestOptions + ]; + "POST /repos/:owner/:repo/milestones": [ + IssuesCreateMilestoneEndpoint, + IssuesCreateMilestoneRequestOptions + ]; + "POST /repos/:owner/:repo/pages": [ + ReposEnablePagesSiteEndpoint, + ReposEnablePagesSiteRequestOptions + ]; + "POST /repos/:owner/:repo/pages/builds": [ + ReposRequestPageBuildEndpoint, + ReposRequestPageBuildRequestOptions + ]; + "POST /repos/:owner/:repo/projects": [ + ProjectsCreateForRepoEndpoint, + ProjectsCreateForRepoRequestOptions + ]; + "POST /repos/:owner/:repo/pulls": [ + PullsCreateEndpoint, + PullsCreateRequestOptions + ]; + "POST /repos/:owner/:repo/pulls/:pull_number/comments": [ + PullsCreateCommentEndpoint | PullsCreateCommentReplyEndpoint, + PullsCreateCommentRequestOptions | PullsCreateCommentReplyRequestOptions + ]; + "POST /repos/:owner/:repo/pulls/:pull_number/comments/:comment_id/replies": [ + PullsCreateReviewCommentReplyEndpoint, + PullsCreateReviewCommentReplyRequestOptions + ]; + "POST /repos/:owner/:repo/pulls/:pull_number/requested_reviewers": [ + PullsCreateReviewRequestEndpoint, + PullsCreateReviewRequestRequestOptions + ]; + "POST /repos/:owner/:repo/pulls/:pull_number/reviews": [ + PullsCreateReviewEndpoint, + PullsCreateReviewRequestOptions + ]; + "POST /repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/events": [ + PullsSubmitReviewEndpoint, + PullsSubmitReviewRequestOptions + ]; + "POST /repos/:owner/:repo/pulls/comments/:comment_id/reactions": [ + ReactionsCreateForPullRequestReviewCommentEndpoint, + ReactionsCreateForPullRequestReviewCommentRequestOptions + ]; + "POST /repos/:owner/:repo/releases": [ + ReposCreateReleaseEndpoint, + ReposCreateReleaseRequestOptions + ]; + "POST /repos/:owner/:repo/statuses/:sha": [ + ReposCreateStatusEndpoint, + ReposCreateStatusRequestOptions + ]; + "POST /repos/:owner/:repo/transfer": [ + ReposTransferEndpoint, + ReposTransferRequestOptions + ]; + "POST /repos/:template_owner/:template_repo/generate": [ + ReposCreateUsingTemplateEndpoint, + ReposCreateUsingTemplateRequestOptions + ]; + "POST /scim/v2/organizations/:org/Users": [ + ScimProvisionAndInviteUsersEndpoint | ScimProvisionInviteUsersEndpoint, + + | ScimProvisionAndInviteUsersRequestOptions + | ScimProvisionInviteUsersRequestOptions + ]; + "POST /teams/:team_id/discussions": [ + TeamsCreateDiscussionEndpoint, + TeamsCreateDiscussionRequestOptions + ]; + "POST /teams/:team_id/discussions/:discussion_number/comments": [ + TeamsCreateDiscussionCommentEndpoint, + TeamsCreateDiscussionCommentRequestOptions + ]; + "POST /teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions": [ + ReactionsCreateForTeamDiscussionCommentEndpoint, + ReactionsCreateForTeamDiscussionCommentRequestOptions + ]; + "POST /teams/:team_id/discussions/:discussion_number/reactions": [ + ReactionsCreateForTeamDiscussionEndpoint, + ReactionsCreateForTeamDiscussionRequestOptions + ]; + "POST /user/emails": [UsersAddEmailsEndpoint, UsersAddEmailsRequestOptions]; + "POST /user/gpg_keys": [ + UsersCreateGpgKeyEndpoint, + UsersCreateGpgKeyRequestOptions + ]; + "POST /user/keys": [ + UsersCreatePublicKeyEndpoint, + UsersCreatePublicKeyRequestOptions + ]; + "POST /user/migrations": [ + MigrationsStartForAuthenticatedUserEndpoint, + MigrationsStartForAuthenticatedUserRequestOptions + ]; + "POST /user/projects": [ + ProjectsCreateForAuthenticatedUserEndpoint, + ProjectsCreateForAuthenticatedUserRequestOptions + ]; + "POST /user/repos": [ + ReposCreateForAuthenticatedUserEndpoint, + ReposCreateForAuthenticatedUserRequestOptions + ]; + "PUT /authorizations/clients/:client_id": [ + OauthAuthorizationsGetOrCreateAuthorizationForAppEndpoint, + OauthAuthorizationsGetOrCreateAuthorizationForAppRequestOptions + ]; + "PUT /authorizations/clients/:client_id/:fingerprint": [ + + | OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintEndpoint + | OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintEndpoint, + + | OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintRequestOptions + | OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintRequestOptions + ]; + "PUT /gists/:gist_id/star": [GistsStarEndpoint, GistsStarRequestOptions]; + "PUT /notifications": [ + ActivityMarkAsReadEndpoint, + ActivityMarkAsReadRequestOptions + ]; + "PUT /notifications/threads/:thread_id/subscription": [ + ActivitySetThreadSubscriptionEndpoint, + ActivitySetThreadSubscriptionRequestOptions + ]; + "PUT /orgs/:org/blocks/:username": [ + OrgsBlockUserEndpoint, + OrgsBlockUserRequestOptions + ]; + "PUT /orgs/:org/interaction-limits": [ + InteractionsAddOrUpdateRestrictionsForOrgEndpoint, + InteractionsAddOrUpdateRestrictionsForOrgRequestOptions + ]; + "PUT /orgs/:org/memberships/:username": [ + OrgsAddOrUpdateMembershipEndpoint, + OrgsAddOrUpdateMembershipRequestOptions + ]; + "PUT /orgs/:org/outside_collaborators/:username": [ + OrgsConvertMemberToOutsideCollaboratorEndpoint, + OrgsConvertMemberToOutsideCollaboratorRequestOptions + ]; + "PUT /orgs/:org/public_members/:username": [ + OrgsPublicizeMembershipEndpoint, + OrgsPublicizeMembershipRequestOptions + ]; + "PUT /projects/:project_id/collaborators/:username": [ + ProjectsAddCollaboratorEndpoint, + ProjectsAddCollaboratorRequestOptions + ]; + "PUT /repos/:owner/:repo/automated-security-fixes": [ + ReposEnableAutomatedSecurityFixesEndpoint, + ReposEnableAutomatedSecurityFixesRequestOptions + ]; + "PUT /repos/:owner/:repo/branches/:branch/protection": [ + ReposUpdateBranchProtectionEndpoint, + ReposUpdateBranchProtectionRequestOptions + ]; + "PUT /repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts": [ + ReposReplaceProtectedBranchRequiredStatusChecksContextsEndpoint, + ReposReplaceProtectedBranchRequiredStatusChecksContextsRequestOptions + ]; + "PUT /repos/:owner/:repo/branches/:branch/protection/restrictions/apps": [ + ReposReplaceProtectedBranchAppRestrictionsEndpoint, + ReposReplaceProtectedBranchAppRestrictionsRequestOptions + ]; + "PUT /repos/:owner/:repo/branches/:branch/protection/restrictions/teams": [ + ReposReplaceProtectedBranchTeamRestrictionsEndpoint, + ReposReplaceProtectedBranchTeamRestrictionsRequestOptions + ]; + "PUT /repos/:owner/:repo/branches/:branch/protection/restrictions/users": [ + ReposReplaceProtectedBranchUserRestrictionsEndpoint, + ReposReplaceProtectedBranchUserRestrictionsRequestOptions + ]; + "PUT /repos/:owner/:repo/collaborators/:username": [ + ReposAddCollaboratorEndpoint, + ReposAddCollaboratorRequestOptions + ]; + "PUT /repos/:owner/:repo/contents/:path": [ + + | ReposCreateOrUpdateFileEndpoint + | ReposCreateFileEndpoint + | ReposUpdateFileEndpoint, + + | ReposCreateOrUpdateFileRequestOptions + | ReposCreateFileRequestOptions + | ReposUpdateFileRequestOptions + ]; + "PUT /repos/:owner/:repo/import": [ + MigrationsStartImportEndpoint, + MigrationsStartImportRequestOptions + ]; + "PUT /repos/:owner/:repo/interaction-limits": [ + InteractionsAddOrUpdateRestrictionsForRepoEndpoint, + InteractionsAddOrUpdateRestrictionsForRepoRequestOptions + ]; + "PUT /repos/:owner/:repo/issues/:issue_number/labels": [ + IssuesReplaceLabelsEndpoint, + IssuesReplaceLabelsRequestOptions + ]; + "PUT /repos/:owner/:repo/issues/:issue_number/lock": [ + IssuesLockEndpoint, + IssuesLockRequestOptions + ]; + "PUT /repos/:owner/:repo/notifications": [ + ActivityMarkNotificationsAsReadForRepoEndpoint, + ActivityMarkNotificationsAsReadForRepoRequestOptions + ]; + "PUT /repos/:owner/:repo/pages": [ + ReposUpdateInformationAboutPagesSiteEndpoint, + ReposUpdateInformationAboutPagesSiteRequestOptions + ]; + "PUT /repos/:owner/:repo/pulls/:pull_number/merge": [ + PullsMergeEndpoint, + PullsMergeRequestOptions + ]; + "PUT /repos/:owner/:repo/pulls/:pull_number/reviews/:review_id": [ + PullsUpdateReviewEndpoint, + PullsUpdateReviewRequestOptions + ]; + "PUT /repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/dismissals": [ + PullsDismissReviewEndpoint, + PullsDismissReviewRequestOptions + ]; + "PUT /repos/:owner/:repo/pulls/:pull_number/update-branch": [ + PullsUpdateBranchEndpoint, + PullsUpdateBranchRequestOptions + ]; + "PUT /repos/:owner/:repo/subscription": [ + ActivitySetRepoSubscriptionEndpoint, + ActivitySetRepoSubscriptionRequestOptions + ]; + "PUT /repos/:owner/:repo/topics": [ + ReposReplaceTopicsEndpoint, + ReposReplaceTopicsRequestOptions + ]; + "PUT /repos/:owner/:repo/vulnerability-alerts": [ + ReposEnableVulnerabilityAlertsEndpoint, + ReposEnableVulnerabilityAlertsRequestOptions + ]; + "PUT /scim/v2/organizations/:org/Users/:scim_user_id": [ + + | ScimReplaceProvisionedUserInformationEndpoint + | ScimUpdateProvisionedOrgMembershipEndpoint, + + | ScimReplaceProvisionedUserInformationRequestOptions + | ScimUpdateProvisionedOrgMembershipRequestOptions + ]; + "PUT /teams/:team_id/members/:username": [ + TeamsAddMemberEndpoint, + TeamsAddMemberRequestOptions + ]; + "PUT /teams/:team_id/memberships/:username": [ + TeamsAddOrUpdateMembershipEndpoint, + TeamsAddOrUpdateMembershipRequestOptions + ]; + "PUT /teams/:team_id/projects/:project_id": [ + TeamsAddOrUpdateProjectEndpoint, + TeamsAddOrUpdateProjectRequestOptions + ]; + "PUT /teams/:team_id/repos/:owner/:repo": [ + TeamsAddOrUpdateRepoEndpoint, + TeamsAddOrUpdateRepoRequestOptions + ]; + "PUT /user/blocks/:username": [UsersBlockEndpoint, UsersBlockRequestOptions]; + "PUT /user/following/:username": [ + UsersFollowEndpoint, + UsersFollowRequestOptions + ]; + "PUT /user/installations/:installation_id/repositories/:repository_id": [ + AppsAddRepoToInstallationEndpoint, + AppsAddRepoToInstallationRequestOptions + ]; + "PUT /user/starred/:owner/:repo": [ + ActivityStarRepoEndpoint, + ActivityStarRepoRequestOptions + ]; + "PUT /user/subscriptions/:owner/:repo": [ + ActivityWatchRepoLegacyEndpoint, + ActivityWatchRepoLegacyRequestOptions + ]; +} + +type AppsGetAuthenticatedEndpoint = {}; +type AppsGetAuthenticatedRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsCreateFromManifestEndpoint = { + /** + * code parameter + */ + code: string; +}; +type AppsCreateFromManifestRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsListInstallationsEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type AppsListInstallationsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsGetInstallationEndpoint = { + /** + * installation_id parameter + */ + installation_id: number; +}; +type AppsGetInstallationRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsDeleteInstallationEndpoint = { + /** + * installation_id parameter + */ + installation_id: number; +}; +type AppsDeleteInstallationRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsCreateInstallationTokenEndpoint = { + /** + * installation_id parameter + */ + installation_id: number; + /** + * The `id`s of the repositories that the installation token can access. Providing repository `id`s restricts the access of an installation token to specific repositories. You can use the "[List repositories](https://developer.github.com/v3/apps/installations/#list-repositories)" endpoint to get the `id` of all repositories that an installation can access. For example, you can select specific repositories when creating an installation token to restrict the number of repositories that can be cloned using the token. + */ + repository_ids?: number[]; + /** + * The permissions granted to the access token. The permissions object includes the permission names and their access type. For a complete list of permissions and allowable values, see "[GitHub App permissions](https://developer.github.com/apps/building-github-apps/creating-github-apps-using-url-parameters/#github-app-permissions)." + */ + permissions?: AppsCreateInstallationTokenParamsPermissions; +}; +type AppsCreateInstallationTokenRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OauthAuthorizationsListGrantsEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type OauthAuthorizationsListGrantsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OauthAuthorizationsGetGrantEndpoint = { + /** + * grant_id parameter + */ + grant_id: number; +}; +type OauthAuthorizationsGetGrantRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OauthAuthorizationsDeleteGrantEndpoint = { + /** + * grant_id parameter + */ + grant_id: number; +}; +type OauthAuthorizationsDeleteGrantRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OauthAuthorizationsRevokeGrantForApplicationEndpoint = { + /** + * client_id parameter + */ + client_id: string; + /** + * access_token parameter + */ + access_token: string; +}; +type OauthAuthorizationsRevokeGrantForApplicationRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OauthAuthorizationsCheckAuthorizationEndpoint = { + /** + * client_id parameter + */ + client_id: string; + /** + * access_token parameter + */ + access_token: string; +}; +type OauthAuthorizationsCheckAuthorizationRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OauthAuthorizationsResetAuthorizationEndpoint = { + /** + * client_id parameter + */ + client_id: string; + /** + * access_token parameter + */ + access_token: string; +}; +type OauthAuthorizationsResetAuthorizationRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OauthAuthorizationsRevokeAuthorizationForApplicationEndpoint = { + /** + * client_id parameter + */ + client_id: string; + /** + * access_token parameter + */ + access_token: string; +}; +type OauthAuthorizationsRevokeAuthorizationForApplicationRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsGetBySlugEndpoint = { + /** + * app_slug parameter + */ + app_slug: string; +}; +type AppsGetBySlugRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OauthAuthorizationsListAuthorizationsEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type OauthAuthorizationsListAuthorizationsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OauthAuthorizationsCreateAuthorizationEndpoint = { + /** + * A list of scopes that this authorization is in. + */ + scopes?: string[]; + /** + * A note to remind you what the OAuth token is for. Tokens not associated with a specific OAuth application (i.e. personal access tokens) must have a unique note. + */ + note: string; + /** + * A URL to remind you what app the OAuth token is for. + */ + note_url?: string; + /** + * The 20 character OAuth app client key for which to create the token. + */ + client_id?: string; + /** + * The 40 character OAuth app client secret for which to create the token. + */ + client_secret?: string; + /** + * A unique string to distinguish an authorization from others created for the same client ID and user. + */ + fingerprint?: string; +}; +type OauthAuthorizationsCreateAuthorizationRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OauthAuthorizationsGetOrCreateAuthorizationForAppEndpoint = { + /** + * client_id parameter + */ + client_id: string; + /** + * The 40 character OAuth app client secret associated with the client ID specified in the URL. + */ + client_secret: string; + /** + * A list of scopes that this authorization is in. + */ + scopes?: string[]; + /** + * A note to remind you what the OAuth token is for. + */ + note?: string; + /** + * A URL to remind you what app the OAuth token is for. + */ + note_url?: string; + /** + * A unique string to distinguish an authorization from others created for the same client and user. If provided, this API is functionally equivalent to [Get-or-create an authorization for a specific app and fingerprint](https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app-and-fingerprint). + */ + fingerprint?: string; +}; +type OauthAuthorizationsGetOrCreateAuthorizationForAppRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintEndpoint = { + /** + * client_id parameter + */ + client_id: string; + /** + * fingerprint parameter + */ + fingerprint: string; + /** + * The 40 character OAuth app client secret associated with the client ID specified in the URL. + */ + client_secret: string; + /** + * A list of scopes that this authorization is in. + */ + scopes?: string[]; + /** + * A note to remind you what the OAuth token is for. + */ + note?: string; + /** + * A URL to remind you what app the OAuth token is for. + */ + note_url?: string; +}; +type OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintEndpoint = { + /** + * client_id parameter + */ + client_id: string; + /** + * fingerprint parameter + */ + fingerprint: string; + /** + * The 40 character OAuth app client secret associated with the client ID specified in the URL. + */ + client_secret: string; + /** + * A list of scopes that this authorization is in. + */ + scopes?: string[]; + /** + * A note to remind you what the OAuth token is for. + */ + note?: string; + /** + * A URL to remind you what app the OAuth token is for. + */ + note_url?: string; +}; +type OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OauthAuthorizationsGetAuthorizationEndpoint = { + /** + * authorization_id parameter + */ + authorization_id: number; +}; +type OauthAuthorizationsGetAuthorizationRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OauthAuthorizationsUpdateAuthorizationEndpoint = { + /** + * authorization_id parameter + */ + authorization_id: number; + /** + * Replaces the authorization scopes with these. + */ + scopes?: string[]; + /** + * A list of scopes to add to this authorization. + */ + add_scopes?: string[]; + /** + * A list of scopes to remove from this authorization. + */ + remove_scopes?: string[]; + /** + * A note to remind you what the OAuth token is for. Tokens not associated with a specific OAuth application (i.e. personal access tokens) must have a unique note. + */ + note?: string; + /** + * A URL to remind you what app the OAuth token is for. + */ + note_url?: string; + /** + * A unique string to distinguish an authorization from others created for the same client ID and user. + */ + fingerprint?: string; +}; +type OauthAuthorizationsUpdateAuthorizationRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OauthAuthorizationsDeleteAuthorizationEndpoint = { + /** + * authorization_id parameter + */ + authorization_id: number; +}; +type OauthAuthorizationsDeleteAuthorizationRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type CodesOfConductListConductCodesEndpoint = {}; +type CodesOfConductListConductCodesRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type CodesOfConductGetConductCodeEndpoint = { + /** + * key parameter + */ + key: string; +}; +type CodesOfConductGetConductCodeRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsCreateContentAttachmentEndpoint = { + /** + * content_reference_id parameter + */ + content_reference_id: number; + /** + * The title of the content attachment displayed in the body or comment of an issue or pull request. + */ + title: string; + /** + * The body text of the content attachment displayed in the body or comment of an issue or pull request. This parameter supports markdown. + */ + body: string; +}; +type AppsCreateContentAttachmentRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type EmojisGetEndpoint = {}; +type EmojisGetRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListPublicEventsEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListPublicEventsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListFeedsEndpoint = {}; +type ActivityListFeedsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsListEndpoint = { + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type GistsListRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsCreateEndpoint = { + /** + * The filenames and content of each file in the gist. The keys in the `files` object represent the filename and have the type `string`. + */ + files: GistsCreateParamsFiles; + /** + * A descriptive name for this gist. + */ + description?: string; + /** + * When `true`, the gist will be public and available for anyone to see. + */ + public?: boolean; +}; +type GistsCreateRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsListPublicEndpoint = { + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type GistsListPublicRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsListStarredEndpoint = { + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type GistsListStarredRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsGetEndpoint = { + /** + * gist_id parameter + */ + gist_id: string; +}; +type GistsGetRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsUpdateEndpoint = { + /** + * gist_id parameter + */ + gist_id: string; + /** + * A descriptive name for this gist. + */ + description?: string; + /** + * The filenames and content that make up this gist. + */ + files?: GistsUpdateParamsFiles; +}; +type GistsUpdateRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsDeleteEndpoint = { + /** + * gist_id parameter + */ + gist_id: string; +}; +type GistsDeleteRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsListCommentsEndpoint = { + /** + * gist_id parameter + */ + gist_id: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type GistsListCommentsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsCreateCommentEndpoint = { + /** + * gist_id parameter + */ + gist_id: string; + /** + * The comment text. + */ + body: string; +}; +type GistsCreateCommentRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsGetCommentEndpoint = { + /** + * gist_id parameter + */ + gist_id: string; + /** + * comment_id parameter + */ + comment_id: number; +}; +type GistsGetCommentRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsUpdateCommentEndpoint = { + /** + * gist_id parameter + */ + gist_id: string; + /** + * comment_id parameter + */ + comment_id: number; + /** + * The comment text. + */ + body: string; +}; +type GistsUpdateCommentRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsDeleteCommentEndpoint = { + /** + * gist_id parameter + */ + gist_id: string; + /** + * comment_id parameter + */ + comment_id: number; +}; +type GistsDeleteCommentRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsListCommitsEndpoint = { + /** + * gist_id parameter + */ + gist_id: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type GistsListCommitsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsForkEndpoint = { + /** + * gist_id parameter + */ + gist_id: string; +}; +type GistsForkRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsListForksEndpoint = { + /** + * gist_id parameter + */ + gist_id: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type GistsListForksRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsStarEndpoint = { + /** + * gist_id parameter + */ + gist_id: string; +}; +type GistsStarRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsUnstarEndpoint = { + /** + * gist_id parameter + */ + gist_id: string; +}; +type GistsUnstarRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsCheckIsStarredEndpoint = { + /** + * gist_id parameter + */ + gist_id: string; +}; +type GistsCheckIsStarredRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsGetRevisionEndpoint = { + /** + * gist_id parameter + */ + gist_id: string; + /** + * sha parameter + */ + sha: string; +}; +type GistsGetRevisionRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GitignoreListTemplatesEndpoint = {}; +type GitignoreListTemplatesRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GitignoreGetTemplateEndpoint = { + /** + * name parameter + */ + name: string; +}; +type GitignoreGetTemplateRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsListReposEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type AppsListReposRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesListEndpoint = { + /** + * Indicates which sorts of issues to return. Can be one of: + * \* `assigned`: Issues assigned to you + * \* `created`: Issues created by you + * \* `mentioned`: Issues mentioning you + * \* `subscribed`: Issues you're subscribed to updates for + * \* `all`: All issues the authenticated user can see, regardless of participation or creation + */ + filter?: "assigned" | "created" | "mentioned" | "subscribed" | "all"; + /** + * Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + /** + * A list of comma separated label names. Example: `bug,ui,@high` + */ + labels?: string; + /** + * What to sort results by. Can be either `created`, `updated`, `comments`. + */ + sort?: "created" | "updated" | "comments"; + /** + * The direction of the sort. Can be either `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type IssuesListRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type SearchIssuesLegacyEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repository parameter + */ + repository: string; + /** + * Indicates the state of the issues to return. Can be either `open` or `closed`. + */ + state: "open" | "closed"; + /** + * The search term. + */ + keyword: string; +}; +type SearchIssuesLegacyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type SearchReposLegacyEndpoint = { + /** + * The search term. + */ + keyword: string; + /** + * Filter results by language. + */ + language?: string; + /** + * The page number to fetch. + */ + start_page?: string; + /** + * The sort field. One of `stars`, `forks`, or `updated`. Default: results are sorted by best match. + */ + sort?: "stars" | "forks" | "updated"; + /** + * The sort field. if `sort` param is provided. Can be either `asc` or `desc`. + */ + order?: "asc" | "desc"; +}; +type SearchReposLegacyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type SearchEmailLegacyEndpoint = { + /** + * The email address. + */ + email: string; +}; +type SearchEmailLegacyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type SearchUsersLegacyEndpoint = { + /** + * The search term. + */ + keyword: string; + /** + * The page number to fetch. + */ + start_page?: string; + /** + * The sort field. One of `stars`, `forks`, or `updated`. Default: results are sorted by best match. + */ + sort?: "stars" | "forks" | "updated"; + /** + * The sort field. if `sort` param is provided. Can be either `asc` or `desc`. + */ + order?: "asc" | "desc"; +}; +type SearchUsersLegacyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type LicensesListCommonlyUsedEndpoint = {}; +type LicensesListCommonlyUsedRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type LicensesListEndpoint = {}; +type LicensesListRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type LicensesGetEndpoint = { + /** + * license parameter + */ + license: string; +}; +type LicensesGetRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MarkdownRenderEndpoint = { + /** + * The Markdown text to render in HTML. Markdown content must be 400 KB or less. + */ + text: string; + /** + * The rendering mode. Can be either: + * \* `markdown` to render a document in plain Markdown, just like README.md files are rendered. + * \* `gfm` to render a document in [GitHub Flavored Markdown](https://github.github.com/gfm/), which creates links for user mentions as well as references to SHA-1 hashes, issues, and pull requests. + */ + mode?: "markdown" | "gfm"; + /** + * The repository context to use when creating references in `gfm` mode. Omit this parameter when using `markdown` mode. + */ + context?: string; +}; +type MarkdownRenderRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MarkdownRenderRawEndpoint = { + /** + * data parameter + */ + data: string; +}; +type MarkdownRenderRawRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsCheckAccountIsAssociatedWithAnyEndpoint = { + /** + * account_id parameter + */ + account_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type AppsCheckAccountIsAssociatedWithAnyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsListPlansEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type AppsListPlansRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsListAccountsUserOrOrgOnPlanEndpoint = { + /** + * plan_id parameter + */ + plan_id: number; + /** + * Sorts the GitHub accounts by the date they were created or last updated. Can be one of `created` or `updated`. + */ + sort?: "created" | "updated"; + /** + * To return the oldest accounts first, set to `asc`. Can be one of `asc` or `desc`. Ignored without the `sort` parameter. + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type AppsListAccountsUserOrOrgOnPlanRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsCheckAccountIsAssociatedWithAnyStubbedEndpoint = { + /** + * account_id parameter + */ + account_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type AppsCheckAccountIsAssociatedWithAnyStubbedRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsListPlansStubbedEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type AppsListPlansStubbedRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsListAccountsUserOrOrgOnPlanStubbedEndpoint = { + /** + * plan_id parameter + */ + plan_id: number; + /** + * Sorts the GitHub accounts by the date they were created or last updated. Can be one of `created` or `updated`. + */ + sort?: "created" | "updated"; + /** + * To return the oldest accounts first, set to `asc`. Can be one of `asc` or `desc`. Ignored without the `sort` parameter. + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type AppsListAccountsUserOrOrgOnPlanStubbedRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MetaGetEndpoint = {}; +type MetaGetRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListPublicEventsForRepoNetworkEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListPublicEventsForRepoNetworkRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListNotificationsEndpoint = { + /** + * If `true`, show notifications marked as read. + */ + all?: boolean; + /** + * If `true`, only shows notifications in which the user is directly participating or mentioned. + */ + participating?: boolean; + /** + * Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + before?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListNotificationsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityMarkAsReadEndpoint = { + /** + * Describes the last point that notifications were checked. Anything updated since this time will not be updated. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + */ + last_read_at?: string; +}; +type ActivityMarkAsReadRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityGetThreadEndpoint = { + /** + * thread_id parameter + */ + thread_id: number; +}; +type ActivityGetThreadRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityMarkThreadAsReadEndpoint = { + /** + * thread_id parameter + */ + thread_id: number; +}; +type ActivityMarkThreadAsReadRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityGetThreadSubscriptionEndpoint = { + /** + * thread_id parameter + */ + thread_id: number; +}; +type ActivityGetThreadSubscriptionRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivitySetThreadSubscriptionEndpoint = { + /** + * thread_id parameter + */ + thread_id: number; + /** + * Unsubscribes and subscribes you to a conversation. Set `ignored` to `true` to block all notifications from this thread. + */ + ignored?: boolean; +}; +type ActivitySetThreadSubscriptionRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityDeleteThreadSubscriptionEndpoint = { + /** + * thread_id parameter + */ + thread_id: number; +}; +type ActivityDeleteThreadSubscriptionRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsListEndpoint = { + /** + * The integer ID of the last Organization that you've seen. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type OrgsListRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsGetEndpoint = { + /** + * org parameter + */ + org: string; +}; +type OrgsGetRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsUpdateEndpoint = { + /** + * org parameter + */ + org: string; + /** + * Billing email address. This address is not publicized. + */ + billing_email?: string; + /** + * The company name. + */ + company?: string; + /** + * The publicly visible email address. + */ + email?: string; + /** + * The location. + */ + location?: string; + /** + * The shorthand name of the company. + */ + name?: string; + /** + * The description of the company. + */ + description?: string; + /** + * Toggles whether organization projects are enabled for the organization. + */ + has_organization_projects?: boolean; + /** + * Toggles whether repository projects are enabled for repositories that belong to the organization. + */ + has_repository_projects?: boolean; + /** + * Default permission level members have for organization repositories: + * \* `read` - can pull, but not push to or administer this repository. + * \* `write` - can pull and push, but not administer this repository. + * \* `admin` - can pull, push, and administer this repository. + * \* `none` - no permissions granted by default. + */ + default_repository_permission?: "read" | "write" | "admin" | "none"; + /** + * Toggles the ability of non-admin organization members to create repositories. Can be one of: + * \* `true` - all organization members can create repositories. + * \* `false` - only admin members can create repositories. + * Default: `true` + * **Note:** Another parameter can override the this parameter. See [this note](https://developer.github.com/v3/orgs/#members_can_create_repositories) for details. **Note:** Another parameter can override the this parameter. See [this note](https://developer.github.com/v3/orgs/#members_can_create_repositories) for details. + */ + members_can_create_repositories?: boolean; + /** + * Specifies which types of repositories non-admin organization members can create. Can be one of: + * \* `all` - all organization members can create public and private repositories. + * \* `private` - members can create private repositories. This option is only available to repositories that are part of an organization on [GitHub Business Cloud](https://github.com/pricing/business-cloud). + * \* `none` - only admin members can create repositories. + * **Note:** Using this parameter will override values set in `members_can_create_repositories`. See [this note](https://developer.github.com/v3/orgs/#members_can_create_repositories) for details. + */ + members_allowed_repository_creation_type?: "all" | "private" | "none"; +}; +type OrgsUpdateRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsListBlockedUsersEndpoint = { + /** + * org parameter + */ + org: string; +}; +type OrgsListBlockedUsersRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsCheckBlockedUserEndpoint = { + /** + * org parameter + */ + org: string; + /** + * username parameter + */ + username: string; +}; +type OrgsCheckBlockedUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsBlockUserEndpoint = { + /** + * org parameter + */ + org: string; + /** + * username parameter + */ + username: string; +}; +type OrgsBlockUserRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsUnblockUserEndpoint = { + /** + * org parameter + */ + org: string; + /** + * username parameter + */ + username: string; +}; +type OrgsUnblockUserRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsListCredentialAuthorizationsEndpoint = { + /** + * org parameter + */ + org: string; +}; +type OrgsListCredentialAuthorizationsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsRemoveCredentialAuthorizationEndpoint = { + /** + * org parameter + */ + org: string; + /** + * credential_id parameter + */ + credential_id: number; +}; +type OrgsRemoveCredentialAuthorizationRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListPublicEventsForOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListPublicEventsForOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsListHooksEndpoint = { + /** + * org parameter + */ + org: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type OrgsListHooksRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsCreateHookEndpoint = { + /** + * org parameter + */ + org: string; + /** + * Must be passed as "web". + */ + name: string; + /** + * Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/orgs/hooks/#create-hook-config-params). + */ + config: OrgsCreateHookParamsConfig; + /** + * Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. + */ + events?: string[]; + /** + * Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + */ + active?: boolean; +}; +type OrgsCreateHookRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsGetHookEndpoint = { + /** + * org parameter + */ + org: string; + /** + * hook_id parameter + */ + hook_id: number; +}; +type OrgsGetHookRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsUpdateHookEndpoint = { + /** + * org parameter + */ + org: string; + /** + * hook_id parameter + */ + hook_id: number; + /** + * Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/orgs/hooks/#update-hook-config-params). + */ + config?: OrgsUpdateHookParamsConfig; + /** + * Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. + */ + events?: string[]; + /** + * Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + */ + active?: boolean; +}; +type OrgsUpdateHookRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsDeleteHookEndpoint = { + /** + * org parameter + */ + org: string; + /** + * hook_id parameter + */ + hook_id: number; +}; +type OrgsDeleteHookRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsPingHookEndpoint = { + /** + * org parameter + */ + org: string; + /** + * hook_id parameter + */ + hook_id: number; +}; +type OrgsPingHookRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsGetOrgInstallationEndpoint = { + /** + * org parameter + */ + org: string; +}; +type AppsGetOrgInstallationRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsFindOrgInstallationEndpoint = { + /** + * org parameter + */ + org: string; +}; +type AppsFindOrgInstallationRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type InteractionsGetRestrictionsForOrgEndpoint = { + /** + * org parameter + */ + org: string; +}; +type InteractionsGetRestrictionsForOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type InteractionsAddOrUpdateRestrictionsForOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * Specifies the group of GitHub users who can comment, open issues, or create pull requests in public repositories for the given organization. Must be one of: `existing_users`, `contributors_only`, or `collaborators_only`. + */ + limit: "existing_users" | "contributors_only" | "collaborators_only"; +}; +type InteractionsAddOrUpdateRestrictionsForOrgRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type InteractionsRemoveRestrictionsForOrgEndpoint = { + /** + * org parameter + */ + org: string; +}; +type InteractionsRemoveRestrictionsForOrgRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsListPendingInvitationsEndpoint = { + /** + * org parameter + */ + org: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type OrgsListPendingInvitationsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsCreateInvitationEndpoint = { + /** + * org parameter + */ + org: string; + /** + * **Required unless you provide `email`**. GitHub user ID for the person you are inviting. + */ + invitee_id?: number; + /** + * **Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user. + */ + email?: string; + /** + * Specify role for new member. Can be one of: + * \* `admin` - Organization owners with full administrative rights to the organization and complete access to all repositories and teams. + * \* `direct_member` - Non-owner organization members with ability to see other members and join teams by invitation. + * \* `billing_manager` - Non-owner organization members with ability to manage the billing settings of your organization. + */ + role?: "admin" | "direct_member" | "billing_manager"; + /** + * Specify IDs for the teams you want to invite new members to. + */ + team_ids?: number[]; +}; +type OrgsCreateInvitationRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsListInvitationTeamsEndpoint = { + /** + * org parameter + */ + org: string; + /** + * invitation_id parameter + */ + invitation_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type OrgsListInvitationTeamsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesListForOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * Indicates which sorts of issues to return. Can be one of: + * \* `assigned`: Issues assigned to you + * \* `created`: Issues created by you + * \* `mentioned`: Issues mentioning you + * \* `subscribed`: Issues you're subscribed to updates for + * \* `all`: All issues the authenticated user can see, regardless of participation or creation + */ + filter?: "assigned" | "created" | "mentioned" | "subscribed" | "all"; + /** + * Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + /** + * A list of comma separated label names. Example: `bug,ui,@high` + */ + labels?: string; + /** + * What to sort results by. Can be either `created`, `updated`, `comments`. + */ + sort?: "created" | "updated" | "comments"; + /** + * The direction of the sort. Can be either `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type IssuesListForOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsListMembersEndpoint = { + /** + * org parameter + */ + org: string; + /** + * Filter members returned in the list. Can be one of: + * \* `2fa_disabled` - Members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled. Available for organization owners. + * \* `all` - All members the authenticated user can see. + */ + filter?: "2fa_disabled" | "all"; + /** + * Filter members returned by their role. Can be one of: + * \* `all` - All members of the organization, regardless of role. + * \* `admin` - Organization owners. + * \* `member` - Non-owner organization members. + */ + role?: "all" | "admin" | "member"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type OrgsListMembersRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsCheckMembershipEndpoint = { + /** + * org parameter + */ + org: string; + /** + * username parameter + */ + username: string; +}; +type OrgsCheckMembershipRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsRemoveMemberEndpoint = { + /** + * org parameter + */ + org: string; + /** + * username parameter + */ + username: string; +}; +type OrgsRemoveMemberRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsGetMembershipEndpoint = { + /** + * org parameter + */ + org: string; + /** + * username parameter + */ + username: string; +}; +type OrgsGetMembershipRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsAddOrUpdateMembershipEndpoint = { + /** + * org parameter + */ + org: string; + /** + * username parameter + */ + username: string; + /** + * The role to give the user in the organization. Can be one of: + * \* `admin` - The user will become an owner of the organization. + * \* `member` - The user will become a non-owner member of the organization. + */ + role?: "admin" | "member"; +}; +type OrgsAddOrUpdateMembershipRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsRemoveMembershipEndpoint = { + /** + * org parameter + */ + org: string; + /** + * username parameter + */ + username: string; +}; +type OrgsRemoveMembershipRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsStartForOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * A list of arrays indicating which repositories should be migrated. + */ + repositories: string[]; + /** + * Indicates whether repositories should be locked (to prevent manipulation) while migrating data. + */ + lock_repositories?: boolean; + /** + * Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). + */ + exclude_attachments?: boolean; +}; +type MigrationsStartForOrgRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsListForOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type MigrationsListForOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsGetStatusForOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * migration_id parameter + */ + migration_id: number; +}; +type MigrationsGetStatusForOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsGetArchiveForOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * migration_id parameter + */ + migration_id: number; +}; +type MigrationsGetArchiveForOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsDeleteArchiveForOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * migration_id parameter + */ + migration_id: number; +}; +type MigrationsDeleteArchiveForOrgRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsUnlockRepoForOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * migration_id parameter + */ + migration_id: number; + /** + * repo_name parameter + */ + repo_name: string; +}; +type MigrationsUnlockRepoForOrgRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsListOutsideCollaboratorsEndpoint = { + /** + * org parameter + */ + org: string; + /** + * Filter the list of outside collaborators. Can be one of: + * \* `2fa_disabled`: Outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled. + * \* `all`: All outside collaborators. + */ + filter?: "2fa_disabled" | "all"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type OrgsListOutsideCollaboratorsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsRemoveOutsideCollaboratorEndpoint = { + /** + * org parameter + */ + org: string; + /** + * username parameter + */ + username: string; +}; +type OrgsRemoveOutsideCollaboratorRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsConvertMemberToOutsideCollaboratorEndpoint = { + /** + * org parameter + */ + org: string; + /** + * username parameter + */ + username: string; +}; +type OrgsConvertMemberToOutsideCollaboratorRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsListForOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ProjectsListForOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsCreateForOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * The name of the project. + */ + name: string; + /** + * The description of the project. + */ + body?: string; +}; +type ProjectsCreateForOrgRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsListPublicMembersEndpoint = { + /** + * org parameter + */ + org: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type OrgsListPublicMembersRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsCheckPublicMembershipEndpoint = { + /** + * org parameter + */ + org: string; + /** + * username parameter + */ + username: string; +}; +type OrgsCheckPublicMembershipRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsPublicizeMembershipEndpoint = { + /** + * org parameter + */ + org: string; + /** + * username parameter + */ + username: string; +}; +type OrgsPublicizeMembershipRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsConcealMembershipEndpoint = { + /** + * org parameter + */ + org: string; + /** + * username parameter + */ + username: string; +}; +type OrgsConcealMembershipRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListForOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * Can be one of `all`, `public`, `private`, `forks`, `sources`, `member`. + */ + type?: "all" | "public" | "private" | "forks" | "sources" | "member"; + /** + * Can be one of `created`, `updated`, `pushed`, `full_name`. + */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** + * Can be one of `asc` or `desc`. Default: when using `full_name`: `asc`, otherwise `desc` + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListForOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposCreateInOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * The name of the repository. + */ + name: string; + /** + * A short description of the repository. + */ + description?: string; + /** + * A URL with more information about the repository. + */ + homepage?: string; + /** + * Either `true` to create a private repository or `false` to create a public one. Creating private repositories requires a paid GitHub account. + */ + private?: boolean; + /** + * Either `true` to enable issues for this repository or `false` to disable them. + */ + has_issues?: boolean; + /** + * Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. + */ + has_projects?: boolean; + /** + * Either `true` to enable the wiki for this repository or `false` to disable it. + */ + has_wiki?: boolean; + /** + * Either `true` to make this repo available as a template repository or `false` to prevent it. + */ + is_template?: boolean; + /** + * The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. + */ + team_id?: number; + /** + * Pass `true` to create an initial commit with empty README. + */ + auto_init?: boolean; + /** + * Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, "Haskell". + */ + gitignore_template?: string; + /** + * Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://help.github.com/articles/licensing-a-repository/#searching-github-by-license-type) as the `license_template` string. For example, "mit" or "mpl-2.0". + */ + license_template?: string; + /** + * Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + */ + allow_squash_merge?: boolean; + /** + * Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + */ + allow_merge_commit?: boolean; + /** + * Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + */ + allow_rebase_merge?: boolean; +}; +type ReposCreateInOrgRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListIdPGroupsForOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListIdPGroupsForOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListEndpoint = { + /** + * org parameter + */ + org: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsCreateEndpoint = { + /** + * org parameter + */ + org: string; + /** + * The name of the team. + */ + name: string; + /** + * The description of the team. + */ + description?: string; + /** + * The logins of organization members to add as maintainers of the team. + */ + maintainers?: string[]; + /** + * The full name (e.g., "organization-name/repository-name") of repositories to add the team to. + */ + repo_names?: string[]; + /** + * The level of privacy this team should have. The options are: + * **For a non-nested team:** + * \* `secret` - only visible to organization owners and members of this team. + * \* `closed` - visible to all members of this organization. + * Default: `secret` + * **For a parent or child team:** + * \* `closed` - visible to all members of this organization. + * Default for child team: `closed` + * **Note**: You must pass the `hellcat-preview` media type to set privacy default to `closed` for child teams. + */ + privacy?: "secret" | "closed"; + /** + * **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: + * \* `pull` - team members can pull, but not push to or administer newly-added repositories. + * \* `push` - team members can pull and push, but not administer newly-added repositories. + * \* `admin` - team members can pull, push and administer newly-added repositories. + */ + permission?: "pull" | "push" | "admin"; + /** + * The ID of a team to set as the parent team. **Note**: You must pass the `hellcat-preview` media type to use this parameter. + */ + parent_team_id?: number; +}; +type TeamsCreateRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsGetByNameEndpoint = { + /** + * org parameter + */ + org: string; + /** + * team_slug parameter + */ + team_slug: string; +}; +type TeamsGetByNameRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsGetCardEndpoint = { + /** + * card_id parameter + */ + card_id: number; +}; +type ProjectsGetCardRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsUpdateCardEndpoint = { + /** + * card_id parameter + */ + card_id: number; + /** + * The card's note content. Only valid for cards without another type of content, so this cannot be specified if the card already has a `content_id` and `content_type`. + */ + note?: string; + /** + * Use `true` to archive a project card. Specify `false` if you need to restore a previously archived project card. + */ + archived?: boolean; +}; +type ProjectsUpdateCardRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsDeleteCardEndpoint = { + /** + * card_id parameter + */ + card_id: number; +}; +type ProjectsDeleteCardRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsMoveCardEndpoint = { + /** + * card_id parameter + */ + card_id: number; + /** + * Can be one of `top`, `bottom`, or `after:`, where `` is the `id` value of a card in the same column, or in the new column specified by `column_id`. + */ + position: string; + /** + * The `id` value of a column in the same project. + */ + column_id?: number; +}; +type ProjectsMoveCardRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsGetColumnEndpoint = { + /** + * column_id parameter + */ + column_id: number; +}; +type ProjectsGetColumnRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsUpdateColumnEndpoint = { + /** + * column_id parameter + */ + column_id: number; + /** + * The new name of the column. + */ + name: string; +}; +type ProjectsUpdateColumnRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsDeleteColumnEndpoint = { + /** + * column_id parameter + */ + column_id: number; +}; +type ProjectsDeleteColumnRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsListCardsEndpoint = { + /** + * column_id parameter + */ + column_id: number; + /** + * Filters the project cards that are returned by the card's state. Can be one of `all`,`archived`, or `not_archived`. + */ + archived_state?: "all" | "archived" | "not_archived"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ProjectsListCardsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsCreateCardEndpoint = { + /** + * column_id parameter + */ + column_id: number; + /** + * The card's note content. Only valid for cards without another type of content, so you must omit when specifying `content_id` and `content_type`. + */ + note?: string; + /** + * The issue or pull request id you want to associate with this card. You can use the [List issues for a repository](https://developer.github.com/v3/issues/#list-issues-for-a-repository) and [List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests) endpoints to find this id. + * **Note:** Depending on whether you use the issue id or pull request id, you will need to specify `Issue` or `PullRequest` as the `content_type`. + */ + content_id?: number; + /** + * **Required if you provide `content_id`**. The type of content you want to associate with this card. Use `Issue` when `content_id` is an issue id and use `PullRequest` when `content_id` is a pull request id. + */ + content_type?: string; +}; +type ProjectsCreateCardRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsMoveColumnEndpoint = { + /** + * column_id parameter + */ + column_id: number; + /** + * Can be one of `first`, `last`, or `after:`, where `` is the `id` value of a column in the same project. + */ + position: string; +}; +type ProjectsMoveColumnRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsGetEndpoint = { + /** + * project_id parameter + */ + project_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ProjectsGetRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsUpdateEndpoint = { + /** + * project_id parameter + */ + project_id: number; + /** + * The name of the project. + */ + name?: string; + /** + * The description of the project. + */ + body?: string; + /** + * State of the project. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * The permission level that determines whether all members of the project's organization can see and/or make changes to the project. Setting `organization_permission` is only available for organization projects. If an organization member belongs to a team with a higher level of access or is a collaborator with a higher level of access, their permission level is not lowered by `organization_permission`. For information on changing access for a team or collaborator, see [Add or update team project](https://developer.github.com/v3/teams/#add-or-update-team-project) or [Add user as a collaborator](https://developer.github.com/v3/projects/collaborators/#add-user-as-a-collaborator). + * + * **Note:** Updating a project's `organization_permission` requires `admin` access to the project. + * + * Can be one of: + * \* `read` - Organization members can read, but not write to or administer this project. + * \* `write` - Organization members can read and write, but not administer this project. + * \* `admin` - Organization members can read, write and administer this project. + * \* `none` - Organization members can only see this project if it is public. + */ + organization_permission?: string; + /** + * Sets the visibility of a project board. Setting `private` is only available for organization and user projects. **Note:** Updating a project's visibility requires `admin` access to the project. + * + * Can be one of: + * \* `false` - Anyone can see the project. + * \* `true` - Only the user can view a project board created on a user account. Organization members with the appropriate `organization_permission` can see project boards in an organization account. + */ + private?: boolean; +}; +type ProjectsUpdateRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsDeleteEndpoint = { + /** + * project_id parameter + */ + project_id: number; +}; +type ProjectsDeleteRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsListCollaboratorsEndpoint = { + /** + * project_id parameter + */ + project_id: number; + /** + * Filters the collaborators by their affiliation. Can be one of: + * \* `outside`: Outside collaborators of a project that are not a member of the project's organization. + * \* `direct`: Collaborators with permissions to a project, regardless of organization membership status. + * \* `all`: All collaborators the authenticated user can see. + */ + affiliation?: "outside" | "direct" | "all"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ProjectsListCollaboratorsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsAddCollaboratorEndpoint = { + /** + * project_id parameter + */ + project_id: number; + /** + * username parameter + */ + username: string; + /** + * The permission to grant the collaborator. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." Can be one of: + * \* `read` - can read, but not write to or administer this project. + * \* `write` - can read and write, but not administer this project. + * \* `admin` - can read, write and administer this project. + */ + permission?: "read" | "write" | "admin"; +}; +type ProjectsAddCollaboratorRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsRemoveCollaboratorEndpoint = { + /** + * project_id parameter + */ + project_id: number; + /** + * username parameter + */ + username: string; +}; +type ProjectsRemoveCollaboratorRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsReviewUserPermissionLevelEndpoint = { + /** + * project_id parameter + */ + project_id: number; + /** + * username parameter + */ + username: string; +}; +type ProjectsReviewUserPermissionLevelRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsListColumnsEndpoint = { + /** + * project_id parameter + */ + project_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ProjectsListColumnsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsCreateColumnEndpoint = { + /** + * project_id parameter + */ + project_id: number; + /** + * The name of the column. + */ + name: string; +}; +type ProjectsCreateColumnRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type RateLimitGetEndpoint = {}; +type RateLimitGetRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsDeleteEndpoint = { + /** + * reaction_id parameter + */ + reaction_id: number; +}; +type ReactionsDeleteRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposGetRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposUpdateEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The name of the repository. + */ + name?: string; + /** + * A short description of the repository. + */ + description?: string; + /** + * A URL with more information about the repository. + */ + homepage?: string; + /** + * Either `true` to make the repository private or `false` to make it public. Creating private repositories requires a paid GitHub account. Default: `false`. + * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://help.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://help.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. + */ + private?: boolean; + /** + * Either `true` to enable issues for this repository or `false` to disable them. + */ + has_issues?: boolean; + /** + * Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. + */ + has_projects?: boolean; + /** + * Either `true` to enable the wiki for this repository or `false` to disable it. + */ + has_wiki?: boolean; + /** + * Either `true` to make this repo available as a template repository or `false` to prevent it. + */ + is_template?: boolean; + /** + * Updates the default branch for this repository. + */ + default_branch?: string; + /** + * Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + */ + allow_squash_merge?: boolean; + /** + * Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + */ + allow_merge_commit?: boolean; + /** + * Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + */ + allow_rebase_merge?: boolean; + /** + * `true` to archive this repository. **Note**: You cannot unarchive repositories through the API. + */ + archived?: boolean; +}; +type ReposUpdateRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposDeleteEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposDeleteRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesListAssigneesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type IssuesListAssigneesRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesCheckAssigneeEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * assignee parameter + */ + assignee: string; +}; +type IssuesCheckAssigneeRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposEnableAutomatedSecurityFixesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposEnableAutomatedSecurityFixesRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposDisableAutomatedSecurityFixesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposDisableAutomatedSecurityFixesRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListBranchesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Setting to `true` returns only protected branches. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches. + */ + protected?: boolean; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListBranchesRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetBranchEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposGetBranchRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetBranchProtectionEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposGetBranchProtectionRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposUpdateBranchProtectionEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; + /** + * Require status checks to pass before merging. Set to `null` to disable. + */ + required_status_checks: ReposUpdateBranchProtectionParamsRequiredStatusChecks | null; + /** + * Enforce all configured restrictions for administrators. Set to `true` to enforce required status checks for repository administrators. Set to `null` to disable. + */ + enforce_admins: boolean | null; + /** + * Require at least one approving review on a pull request, before merging. Set to `null` to disable. + */ + required_pull_request_reviews: ReposUpdateBranchProtectionParamsRequiredPullRequestReviews | null; + /** + * Restrict who can push to this branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable. + */ + restrictions: ReposUpdateBranchProtectionParamsRestrictions | null; +}; +type ReposUpdateBranchProtectionRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposRemoveBranchProtectionEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposRemoveBranchProtectionRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetProtectedBranchAdminEnforcementEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposGetProtectedBranchAdminEnforcementRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposAddProtectedBranchAdminEnforcementEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposAddProtectedBranchAdminEnforcementRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposRemoveProtectedBranchAdminEnforcementEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposRemoveProtectedBranchAdminEnforcementRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetProtectedBranchPullRequestReviewEnforcementEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposGetProtectedBranchPullRequestReviewEnforcementRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposUpdateProtectedBranchPullRequestReviewEnforcementEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; + /** + * Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. + */ + dismissal_restrictions?: ReposUpdateProtectedBranchPullRequestReviewEnforcementParamsDismissalRestrictions; + /** + * Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. + */ + dismiss_stale_reviews?: boolean; + /** + * Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) have reviewed. + */ + require_code_owner_reviews?: boolean; + /** + * Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6. + */ + required_approving_review_count?: number; +}; +type ReposUpdateProtectedBranchPullRequestReviewEnforcementRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposRemoveProtectedBranchPullRequestReviewEnforcementEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposRemoveProtectedBranchPullRequestReviewEnforcementRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetProtectedBranchRequiredSignaturesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposGetProtectedBranchRequiredSignaturesRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposAddProtectedBranchRequiredSignaturesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposAddProtectedBranchRequiredSignaturesRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposRemoveProtectedBranchRequiredSignaturesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposRemoveProtectedBranchRequiredSignaturesRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetProtectedBranchRequiredStatusChecksEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposGetProtectedBranchRequiredStatusChecksRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposUpdateProtectedBranchRequiredStatusChecksEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; + /** + * Require branches to be up to date before merging. + */ + strict?: boolean; + /** + * The list of status checks to require in order to merge into this branch + */ + contexts?: string[]; +}; +type ReposUpdateProtectedBranchRequiredStatusChecksRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposRemoveProtectedBranchRequiredStatusChecksEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposRemoveProtectedBranchRequiredStatusChecksRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListProtectedBranchRequiredStatusChecksContextsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposListProtectedBranchRequiredStatusChecksContextsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposReplaceProtectedBranchRequiredStatusChecksContextsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; + /** + * contexts parameter + */ + contexts: string[]; +}; +type ReposReplaceProtectedBranchRequiredStatusChecksContextsRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposAddProtectedBranchRequiredStatusChecksContextsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; + /** + * contexts parameter + */ + contexts: string[]; +}; +type ReposAddProtectedBranchRequiredStatusChecksContextsRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposRemoveProtectedBranchRequiredStatusChecksContextsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; + /** + * contexts parameter + */ + contexts: string[]; +}; +type ReposRemoveProtectedBranchRequiredStatusChecksContextsRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetProtectedBranchRestrictionsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposGetProtectedBranchRestrictionsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposRemoveProtectedBranchRestrictionsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposRemoveProtectedBranchRestrictionsRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetAppsWithAccessToProtectedBranchEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposGetAppsWithAccessToProtectedBranchRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListAppsWithAccessToProtectedBranchEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposListAppsWithAccessToProtectedBranchRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposReplaceProtectedBranchAppRestrictionsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; + /** + * apps parameter + */ + apps: string[]; +}; +type ReposReplaceProtectedBranchAppRestrictionsRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposAddProtectedBranchAppRestrictionsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; + /** + * apps parameter + */ + apps: string[]; +}; +type ReposAddProtectedBranchAppRestrictionsRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposRemoveProtectedBranchAppRestrictionsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; + /** + * apps parameter + */ + apps: string[]; +}; +type ReposRemoveProtectedBranchAppRestrictionsRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetTeamsWithAccessToProtectedBranchEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposGetTeamsWithAccessToProtectedBranchRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListProtectedBranchTeamRestrictionsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposListProtectedBranchTeamRestrictionsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListTeamsWithAccessToProtectedBranchEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposListTeamsWithAccessToProtectedBranchRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposReplaceProtectedBranchTeamRestrictionsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; + /** + * teams parameter + */ + teams: string[]; +}; +type ReposReplaceProtectedBranchTeamRestrictionsRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposAddProtectedBranchTeamRestrictionsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; + /** + * teams parameter + */ + teams: string[]; +}; +type ReposAddProtectedBranchTeamRestrictionsRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposRemoveProtectedBranchTeamRestrictionsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; + /** + * teams parameter + */ + teams: string[]; +}; +type ReposRemoveProtectedBranchTeamRestrictionsRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetUsersWithAccessToProtectedBranchEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposGetUsersWithAccessToProtectedBranchRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListProtectedBranchUserRestrictionsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposListProtectedBranchUserRestrictionsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListUsersWithAccessToProtectedBranchEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; +}; +type ReposListUsersWithAccessToProtectedBranchRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposReplaceProtectedBranchUserRestrictionsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; + /** + * users parameter + */ + users: string[]; +}; +type ReposReplaceProtectedBranchUserRestrictionsRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposAddProtectedBranchUserRestrictionsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; + /** + * users parameter + */ + users: string[]; +}; +type ReposAddProtectedBranchUserRestrictionsRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposRemoveProtectedBranchUserRestrictionsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * branch parameter + */ + branch: string; + /** + * users parameter + */ + users: string[]; +}; +type ReposRemoveProtectedBranchUserRestrictionsRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ChecksCreateEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The name of the check. For example, "code-coverage". + */ + name: string; + /** + * The SHA of the commit. + */ + head_sha: string; + /** + * The URL of the integrator's site that has the full details of the check. + */ + details_url?: string; + /** + * A reference for the run on the integrator's system. + */ + external_id?: string; + /** + * The current status. Can be one of `queued`, `in_progress`, or `completed`. + */ + status?: "queued" | "in_progress" | "completed"; + /** + * The time that the check run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + started_at?: string; + /** + * **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, or `action_required`. When the conclusion is `action_required`, additional details should be provided on the site specified by `details_url`. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. + */ + conclusion?: + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required"; + /** + * The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + completed_at?: string; + /** + * Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://developer.github.com/v3/checks/runs/#output-object) description. + */ + output?: ChecksCreateParamsOutput; + /** + * Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the [`check_run.requested_action` webhook](https://developer.github.com/v3/activity/events/types/#checkrunevent) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://developer.github.com/v3/checks/runs/#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://developer.github.com/v3/checks/runs/#check-runs-and-requested-actions)." To learn more about check runs and requested actions, see "[Check runs and requested actions](https://developer.github.com/v3/checks/runs/#check-runs-and-requested-actions)." + */ + actions?: ChecksCreateParamsActions[]; +}; +type ChecksCreateRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ChecksUpdateEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * check_run_id parameter + */ + check_run_id: number; + /** + * The name of the check. For example, "code-coverage". + */ + name?: string; + /** + * The URL of the integrator's site that has the full details of the check. + */ + details_url?: string; + /** + * A reference for the run on the integrator's system. + */ + external_id?: string; + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + started_at?: string; + /** + * The current status. Can be one of `queued`, `in_progress`, or `completed`. + */ + status?: "queued" | "in_progress" | "completed"; + /** + * **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, or `action_required`. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. + */ + conclusion?: + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required"; + /** + * The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + completed_at?: string; + /** + * Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://developer.github.com/v3/checks/runs/#output-object-1) description. + */ + output?: ChecksUpdateParamsOutput; + /** + * Possible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://developer.github.com/v3/checks/runs/#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://developer.github.com/v3/checks/runs/#check-runs-and-requested-actions)." + */ + actions?: ChecksUpdateParamsActions[]; +}; +type ChecksUpdateRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ChecksGetEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * check_run_id parameter + */ + check_run_id: number; +}; +type ChecksGetRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ChecksListAnnotationsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * check_run_id parameter + */ + check_run_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ChecksListAnnotationsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ChecksCreateSuiteEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The sha of the head commit. + */ + head_sha: string; +}; +type ChecksCreateSuiteRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ChecksSetSuitesPreferencesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the [`auto_trigger_checks` object](https://developer.github.com/v3/checks/suites/#auto_trigger_checks-object) description for details. + */ + auto_trigger_checks?: ChecksSetSuitesPreferencesParamsAutoTriggerChecks[]; +}; +type ChecksSetSuitesPreferencesRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ChecksGetSuiteEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * check_suite_id parameter + */ + check_suite_id: number; +}; +type ChecksGetSuiteRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ChecksListForSuiteEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * check_suite_id parameter + */ + check_suite_id: number; + /** + * Returns check runs with the specified `name`. + */ + check_name?: string; + /** + * Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. + */ + status?: "queued" | "in_progress" | "completed"; + /** + * Filters check runs by their `completed_at` timestamp. Can be one of `latest` (returning the most recent check runs) or `all`. + */ + filter?: "latest" | "all"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ChecksListForSuiteRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ChecksRerequestSuiteEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * check_suite_id parameter + */ + check_suite_id: number; +}; +type ChecksRerequestSuiteRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListCollaboratorsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Filter collaborators returned by their affiliation. Can be one of: + * \* `outside`: All outside collaborators of an organization-owned repository. + * \* `direct`: All collaborators with permissions to an organization-owned repository, regardless of organization membership status. + * \* `all`: All collaborators the authenticated user can see. + */ + affiliation?: "outside" | "direct" | "all"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListCollaboratorsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposCheckCollaboratorEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * username parameter + */ + username: string; +}; +type ReposCheckCollaboratorRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposAddCollaboratorEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * username parameter + */ + username: string; + /** + * The permission to grant the collaborator. **Only valid on organization-owned repositories.** Can be one of: + * \* `pull` - can pull, but not push to or administer this repository. + * \* `push` - can pull and push, but not administer this repository. + * \* `admin` - can pull, push and administer this repository. + */ + permission?: "pull" | "push" | "admin"; +}; +type ReposAddCollaboratorRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposRemoveCollaboratorEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * username parameter + */ + username: string; +}; +type ReposRemoveCollaboratorRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetCollaboratorPermissionLevelEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * username parameter + */ + username: string; +}; +type ReposGetCollaboratorPermissionLevelRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListCommitCommentsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListCommitCommentsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetCommitCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * comment_id parameter + */ + comment_id: number; +}; +type ReposGetCommitCommentRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposUpdateCommitCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * comment_id parameter + */ + comment_id: number; + /** + * The contents of the comment + */ + body: string; +}; +type ReposUpdateCommitCommentRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposDeleteCommitCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * comment_id parameter + */ + comment_id: number; +}; +type ReposDeleteCommitCommentRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsListForCommitCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * comment_id parameter + */ + comment_id: number; + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a commit comment. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReactionsListForCommitCommentRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsCreateForCommitCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * comment_id parameter + */ + comment_id: number; + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the commit comment. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; +}; +type ReactionsCreateForCommitCommentRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListCommitsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * SHA or branch to start listing commits from. Default: the repository’s default branch (usually `master`). + */ + sha?: string; + /** + * Only commits containing this file path will be returned. + */ + path?: string; + /** + * GitHub login or email address by which to filter by commit author. + */ + author?: string; + /** + * Only commits after this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * Only commits before this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + until?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListCommitsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListBranchesForHeadCommitEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * commit_sha parameter + */ + commit_sha: string; +}; +type ReposListBranchesForHeadCommitRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListCommentsForCommitEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * commit_sha parameter + */ + commit_sha: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListCommentsForCommitRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposCreateCommitCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * commit_sha parameter + */ + commit_sha: string; + /** + * The contents of the comment. + */ + body: string; + /** + * Relative path of the file to comment on. + */ + path?: string; + /** + * Line index in the diff to comment on. + */ + position?: number; + /** + * **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. + */ + line?: number; +}; +type ReposCreateCommitCommentRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListPullRequestsAssociatedWithCommitEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * commit_sha parameter + */ + commit_sha: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListPullRequestsAssociatedWithCommitRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetCommitEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * ref parameter + */ + ref: string; +}; +type ReposGetCommitRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ChecksListForRefEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * ref parameter + */ + ref: string; + /** + * Returns check runs with the specified `name`. + */ + check_name?: string; + /** + * Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. + */ + status?: "queued" | "in_progress" | "completed"; + /** + * Filters check runs by their `completed_at` timestamp. Can be one of `latest` (returning the most recent check runs) or `all`. + */ + filter?: "latest" | "all"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ChecksListForRefRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ChecksListSuitesForRefEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * ref parameter + */ + ref: string; + /** + * Filters check suites by GitHub App `id`. + */ + app_id?: number; + /** + * Filters checks suites by the name of the [check run](https://developer.github.com/v3/checks/runs/). + */ + check_name?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ChecksListSuitesForRefRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetCombinedStatusForRefEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * ref parameter + */ + ref: string; +}; +type ReposGetCombinedStatusForRefRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListStatusesForRefEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * ref parameter + */ + ref: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListStatusesForRefRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type CodesOfConductGetForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type CodesOfConductGetForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposRetrieveCommunityProfileMetricsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposRetrieveCommunityProfileMetricsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposCompareCommitsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * base parameter + */ + base: string; + /** + * head parameter + */ + head: string; +}; +type ReposCompareCommitsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetContentsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * path parameter + */ + path: string; + /** + * The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) + */ + ref?: string; +}; +type ReposGetContentsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposCreateOrUpdateFileEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * path parameter + */ + path: string; + /** + * The commit message. + */ + message: string; + /** + * The new file content, using Base64 encoding. + */ + content: string; + /** + * **Required if you are updating a file**. The blob SHA of the file being replaced. + */ + sha?: string; + /** + * The branch name. Default: the repository’s default branch (usually `master`) + */ + branch?: string; + /** + * The person that committed the file. Default: the authenticated user. + */ + committer?: ReposCreateOrUpdateFileParamsCommitter; + /** + * The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. + */ + author?: ReposCreateOrUpdateFileParamsAuthor; +}; +type ReposCreateOrUpdateFileRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposCreateFileEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * path parameter + */ + path: string; + /** + * The commit message. + */ + message: string; + /** + * The new file content, using Base64 encoding. + */ + content: string; + /** + * **Required if you are updating a file**. The blob SHA of the file being replaced. + */ + sha?: string; + /** + * The branch name. Default: the repository’s default branch (usually `master`) + */ + branch?: string; + /** + * The person that committed the file. Default: the authenticated user. + */ + committer?: ReposCreateFileParamsCommitter; + /** + * The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. + */ + author?: ReposCreateFileParamsAuthor; +}; +type ReposCreateFileRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposUpdateFileEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * path parameter + */ + path: string; + /** + * The commit message. + */ + message: string; + /** + * The new file content, using Base64 encoding. + */ + content: string; + /** + * **Required if you are updating a file**. The blob SHA of the file being replaced. + */ + sha?: string; + /** + * The branch name. Default: the repository’s default branch (usually `master`) + */ + branch?: string; + /** + * The person that committed the file. Default: the authenticated user. + */ + committer?: ReposUpdateFileParamsCommitter; + /** + * The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. + */ + author?: ReposUpdateFileParamsAuthor; +}; +type ReposUpdateFileRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposDeleteFileEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * path parameter + */ + path: string; + /** + * The commit message. + */ + message: string; + /** + * The blob SHA of the file being replaced. + */ + sha: string; + /** + * The branch name. Default: the repository’s default branch (usually `master`) + */ + branch?: string; + /** + * object containing information about the committer. + */ + committer?: ReposDeleteFileParamsCommitter; + /** + * object containing information about the author. + */ + author?: ReposDeleteFileParamsAuthor; +}; +type ReposDeleteFileRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListContributorsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Set to `1` or `true` to include anonymous contributors in results. + */ + anon?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListContributorsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListDeploymentsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The SHA recorded at creation time. + */ + sha?: string; + /** + * The name of the ref. This can be a branch, tag, or SHA. + */ + ref?: string; + /** + * The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`). + */ + task?: string; + /** + * The name of the environment that was deployed to (e.g., `staging` or `production`). + */ + environment?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListDeploymentsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposCreateDeploymentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The ref to deploy. This can be a branch, tag, or SHA. + */ + ref: string; + /** + * Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). + */ + task?: string; + /** + * Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. + */ + auto_merge?: boolean; + /** + * The [status](https://developer.github.com/v3/repos/statuses/) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts. + */ + required_contexts?: string[]; + /** + * JSON payload with extra information about the deployment. + */ + payload?: string; + /** + * Name for the target deployment environment (e.g., `production`, `staging`, `qa`). + */ + environment?: string; + /** + * Short description of the deployment. + */ + description?: string; + /** + * Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. + */ + transient_environment?: boolean; + /** + * Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. + */ + production_environment?: boolean; +}; +type ReposCreateDeploymentRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetDeploymentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * deployment_id parameter + */ + deployment_id: number; +}; +type ReposGetDeploymentRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListDeploymentStatusesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * deployment_id parameter + */ + deployment_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListDeploymentStatusesRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposCreateDeploymentStatusEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * deployment_id parameter + */ + deployment_id: number; + /** + * The state of the status. Can be one of `error`, `failure`, `inactive`, `in_progress`, `queued` `pending`, or `success`. **Note:** To use the `inactive` state, you must provide the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. To use the `in_progress` and `queued` states, you must provide the [`application/vnd.github.flash-preview+json`](https://developer.github.com/v3/previews/#deployment-statuses) custom media type. + */ + state: + | "error" + | "failure" + | "inactive" + | "in_progress" + | "queued" + | "pending" + | "success"; + /** + * The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. **Note:** It's recommended to use the `log_url` parameter, which replaces `target_url`. + */ + target_url?: string; + /** + * The full URL of the deployment's output. This parameter replaces `target_url`. We will continue to accept `target_url` to support legacy uses, but we recommend replacing `target_url` with `log_url`. Setting `log_url` will automatically set `target_url` to the same value. Default: `""` + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. + */ + log_url?: string; + /** + * A short description of the status. The maximum description length is 140 characters. + */ + description?: string; + /** + * Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. **Note:** This parameter requires you to use the [`application/vnd.github.flash-preview+json`](https://developer.github.com/v3/previews/#deployment-statuses) custom media type. + */ + environment?: "production" | "staging" | "qa"; + /** + * Sets the URL for accessing your environment. Default: `""` + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. + */ + environment_url?: string; + /** + * Adds a new `inactive` status to all prior non-transient, non-production environment deployments with the same repository and `environment` name as the created status's deployment. An `inactive` status is only added to deployments that had a `success` state. Default: `true` + * **Note:** To add an `inactive` status to `production` environments, you must use the [`application/vnd.github.flash-preview+json`](https://developer.github.com/v3/previews/#deployment-statuses) custom media type. + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. + */ + auto_inactive?: boolean; +}; +type ReposCreateDeploymentStatusRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetDeploymentStatusEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * deployment_id parameter + */ + deployment_id: number; + /** + * status_id parameter + */ + status_id: number; +}; +type ReposGetDeploymentStatusRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposCreateDispatchEventEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * **Required:** A custom webhook event name. + */ + event_type?: string; +}; +type ReposCreateDispatchEventRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListDownloadsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListDownloadsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetDownloadEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * download_id parameter + */ + download_id: number; +}; +type ReposGetDownloadRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposDeleteDownloadEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * download_id parameter + */ + download_id: number; +}; +type ReposDeleteDownloadRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListRepoEventsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListRepoEventsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListForksEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The sort order. Can be either `newest`, `oldest`, or `stargazers`. + */ + sort?: "newest" | "oldest" | "stargazers"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListForksRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposCreateForkEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Optional parameter to specify the organization name if forking into an organization. + */ + organization?: string; +}; +type ReposCreateForkRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GitCreateBlobEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The new blob's content. + */ + content: string; + /** + * The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. + */ + encoding?: string; +}; +type GitCreateBlobRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GitGetBlobEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * file_sha parameter + */ + file_sha: string; +}; +type GitGetBlobRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GitCreateCommitEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The commit message + */ + message: string; + /** + * The SHA of the tree object this commit points to + */ + tree: string; + /** + * The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. + */ + parents: string[]; + /** + * Information about the author of the commit. By default, the `author` will be the authenticated user and the current date. See the `author` and `committer` object below for details. + */ + author?: GitCreateCommitParamsAuthor; + /** + * Information about the person who is making the commit. By default, `committer` will use the information set in `author`. See the `author` and `committer` object below for details. + */ + committer?: GitCreateCommitParamsCommitter; + /** + * The [PGP signature](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) of the commit. GitHub adds the signature to the `gpgsig` header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a `signature` parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to [use the command line](https://git-scm.com/book/id/v2/Git-Tools-Signing-Your-Work) to create signed commits. + */ + signature?: string; +}; +type GitCreateCommitRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GitGetCommitEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * commit_sha parameter + */ + commit_sha: string; +}; +type GitGetCommitRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GitListMatchingRefsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * ref parameter + */ + ref: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type GitListMatchingRefsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GitGetRefEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * ref parameter + */ + ref: string; +}; +type GitGetRefRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GitCreateRefEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn't start with 'refs' and have at least two slashes, it will be rejected. + */ + ref: string; + /** + * The SHA1 value for this reference. + */ + sha: string; +}; +type GitCreateRefRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GitUpdateRefEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * ref parameter + */ + ref: string; + /** + * The SHA1 value to set this reference to + */ + sha: string; + /** + * Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to `false` will make sure you're not overwriting work. + */ + force?: boolean; +}; +type GitUpdateRefRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GitDeleteRefEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * ref parameter + */ + ref: string; +}; +type GitDeleteRefRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GitCreateTagEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The tag's name. This is typically a version (e.g., "v0.0.1"). + */ + tag: string; + /** + * The tag message. + */ + message: string; + /** + * The SHA of the git object this is tagging. + */ + object: string; + /** + * The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. + */ + type: "commit" | "tree" | "blob"; + /** + * An object with information about the individual creating the tag. + */ + tagger?: GitCreateTagParamsTagger; +}; +type GitCreateTagRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GitGetTagEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * tag_sha parameter + */ + tag_sha: string; +}; +type GitGetTagRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GitCreateTreeEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. + */ + tree: GitCreateTreeParamsTree[]; + /** + * The SHA1 of the tree you want to update with new data. If you don't set this, the commit will be created on top of everything; however, it will only contain your change, the rest of your files will show up as deleted. + */ + base_tree?: string; +}; +type GitCreateTreeRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GitGetTreeEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * tree_sha parameter + */ + tree_sha: string; + /** + * recursive parameter + */ + recursive?: "1"; +}; +type GitGetTreeRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListHooksEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListHooksRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposCreateHookEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. + */ + name?: string; + /** + * Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/repos/hooks/#create-hook-config-params). + */ + config: ReposCreateHookParamsConfig; + /** + * Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. + */ + events?: string[]; + /** + * Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + */ + active?: boolean; +}; +type ReposCreateHookRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetHookEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * hook_id parameter + */ + hook_id: number; +}; +type ReposGetHookRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposUpdateHookEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * hook_id parameter + */ + hook_id: number; + /** + * Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/repos/hooks/#create-hook-config-params). + */ + config?: ReposUpdateHookParamsConfig; + /** + * Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. This replaces the entire array of events. + */ + events?: string[]; + /** + * Determines a list of events to be added to the list of events that the Hook triggers for. + */ + add_events?: string[]; + /** + * Determines a list of events to be removed from the list of events that the Hook triggers for. + */ + remove_events?: string[]; + /** + * Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + */ + active?: boolean; +}; +type ReposUpdateHookRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposDeleteHookEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * hook_id parameter + */ + hook_id: number; +}; +type ReposDeleteHookRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposPingHookEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * hook_id parameter + */ + hook_id: number; +}; +type ReposPingHookRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposTestPushHookEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * hook_id parameter + */ + hook_id: number; +}; +type ReposTestPushHookRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsStartImportEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The URL of the originating repository. + */ + vcs_url: string; + /** + * The originating VCS type. Can be one of `subversion`, `git`, `mercurial`, or `tfvc`. Please be aware that without this parameter, the import job will take additional time to detect the VCS type before beginning the import. This detection step will be reflected in the response. + */ + vcs?: "subversion" | "git" | "mercurial" | "tfvc"; + /** + * If authentication is required, the username to provide to `vcs_url`. + */ + vcs_username?: string; + /** + * If authentication is required, the password to provide to `vcs_url`. + */ + vcs_password?: string; + /** + * For a tfvc import, the name of the project that is being imported. + */ + tfvc_project?: string; +}; +type MigrationsStartImportRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsGetImportProgressEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type MigrationsGetImportProgressRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsUpdateImportEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The username to provide to the originating repository. + */ + vcs_username?: string; + /** + * The password to provide to the originating repository. + */ + vcs_password?: string; +}; +type MigrationsUpdateImportRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsCancelImportEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type MigrationsCancelImportRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsGetCommitAuthorsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Only authors found after this id are returned. Provide the highest author ID you've seen so far. New authors may be added to the list at any point while the importer is performing the `raw` step. + */ + since?: string; +}; +type MigrationsGetCommitAuthorsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsMapCommitAuthorEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * author_id parameter + */ + author_id: number; + /** + * The new Git author email. + */ + email?: string; + /** + * The new Git author name. + */ + name?: string; +}; +type MigrationsMapCommitAuthorRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsGetLargeFilesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type MigrationsGetLargeFilesRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsSetLfsPreferenceEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Can be one of `opt_in` (large files will be stored using Git LFS) or `opt_out` (large files will be removed during the import). + */ + use_lfs: "opt_in" | "opt_out"; +}; +type MigrationsSetLfsPreferenceRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsGetRepoInstallationEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type AppsGetRepoInstallationRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsFindRepoInstallationEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type AppsFindRepoInstallationRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type InteractionsGetRestrictionsForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type InteractionsGetRestrictionsForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type InteractionsAddOrUpdateRestrictionsForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Specifies the group of GitHub users who can comment, open issues, or create pull requests for the given repository. Must be one of: `existing_users`, `contributors_only`, or `collaborators_only`. + */ + limit: "existing_users" | "contributors_only" | "collaborators_only"; +}; +type InteractionsAddOrUpdateRestrictionsForRepoRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type InteractionsRemoveRestrictionsForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type InteractionsRemoveRestrictionsForRepoRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListInvitationsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListInvitationsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposDeleteInvitationEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * invitation_id parameter + */ + invitation_id: number; +}; +type ReposDeleteInvitationRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposUpdateInvitationEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * invitation_id parameter + */ + invitation_id: number; + /** + * The permissions that the associated user will have on the repository. Valid values are `read`, `write`, and `admin`. + */ + permissions?: "read" | "write" | "admin"; +}; +type ReposUpdateInvitationRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesListForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * If an `integer` is passed, it should refer to a milestone by its `number` field. If the string `*` is passed, issues with any milestone are accepted. If the string `none` is passed, issues without milestones are returned. + */ + milestone?: string; + /** + * Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + /** + * Can be the name of a user. Pass in `none` for issues with no assigned user, and `*` for issues assigned to any user. + */ + assignee?: string; + /** + * The user that created the issue. + */ + creator?: string; + /** + * A user that's mentioned in the issue. + */ + mentioned?: string; + /** + * A list of comma separated label names. Example: `bug,ui,@high` + */ + labels?: string; + /** + * What to sort results by. Can be either `created`, `updated`, `comments`. + */ + sort?: "created" | "updated" | "comments"; + /** + * The direction of the sort. Can be either `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type IssuesListForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesCreateEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The title of the issue. + */ + title: string; + /** + * The contents of the issue. + */ + body?: string; + /** + * Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is deprecated.**_ + */ + assignee?: string; + /** + * The `number` of the milestone to associate this issue with. _NOTE: Only users with push access can set the milestone for new issues. The milestone is silently dropped otherwise._ + */ + milestone?: number; + /** + * Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._ + */ + labels?: string[]; + /** + * Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ + */ + assignees?: string[]; +}; +type IssuesCreateRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesListCommentsForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Either `created` or `updated`. + */ + sort?: "created" | "updated"; + /** + * Either `asc` or `desc`. Ignored without the `sort` parameter. + */ + direction?: "asc" | "desc"; + /** + * Only comments updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; +}; +type IssuesListCommentsForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesGetCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * comment_id parameter + */ + comment_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type IssuesGetCommentRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesUpdateCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * comment_id parameter + */ + comment_id: number; + /** + * The contents of the comment. + */ + body: string; +}; +type IssuesUpdateCommentRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesDeleteCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * comment_id parameter + */ + comment_id: number; +}; +type IssuesDeleteCommentRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsListForIssueCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * comment_id parameter + */ + comment_id: number; + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to an issue comment. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReactionsListForIssueCommentRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsCreateForIssueCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * comment_id parameter + */ + comment_id: number; + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the issue comment. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; +}; +type ReactionsCreateForIssueCommentRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesListEventsForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type IssuesListEventsForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesGetEventEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * event_id parameter + */ + event_id: number; +}; +type IssuesGetEventRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesGetEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; +}; +type IssuesGetRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesUpdateEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; + /** + * The title of the issue. + */ + title?: string; + /** + * The contents of the issue. + */ + body?: string; + /** + * Login for the user that this issue should be assigned to. **This field is deprecated.** + */ + assignee?: string; + /** + * State of the issue. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * The `number` of the milestone to associate this issue with or `null` to remove current. _NOTE: Only users with push access can set the milestone for issues. The milestone is silently dropped otherwise._ + */ + milestone?: number | null; + /** + * Labels to associate with this issue. Pass one or more Labels to _replace_ the set of Labels on this Issue. Send an empty array (`[]`) to clear all Labels from the Issue. _NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise._ + */ + labels?: string[]; + /** + * Logins for Users to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this Issue. Send an empty array (`[]`) to clear all assignees from the Issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ + */ + assignees?: string[]; +}; +type IssuesUpdateRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesAddAssigneesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; + /** + * Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._ + */ + assignees?: string[]; +}; +type IssuesAddAssigneesRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesRemoveAssigneesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; + /** + * Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._ + */ + assignees?: string[]; +}; +type IssuesRemoveAssigneesRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesListCommentsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; + /** + * Only comments updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type IssuesListCommentsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesCreateCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; + /** + * The contents of the comment. + */ + body: string; +}; +type IssuesCreateCommentRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesListEventsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type IssuesListEventsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesListLabelsOnIssueEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type IssuesListLabelsOnIssueRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesAddLabelsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; + /** + * The name of the label to add to the issue. Must contain at least one label. **Note:** Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. + */ + labels: string[]; +}; +type IssuesAddLabelsRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesReplaceLabelsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; + /** + * The names of the labels to add to the issue. You can pass an empty array to remove all labels. **Note:** Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. + */ + labels?: string[]; +}; +type IssuesReplaceLabelsRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesRemoveLabelsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; +}; +type IssuesRemoveLabelsRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesRemoveLabelEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; + /** + * name parameter + */ + name: string; +}; +type IssuesRemoveLabelRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesLockEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; + /** + * The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons: + * \* `off-topic` + * \* `too heated` + * \* `resolved` + * \* `spam` + */ + lock_reason?: "off-topic" | "too heated" | "resolved" | "spam"; +}; +type IssuesLockRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesUnlockEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; +}; +type IssuesUnlockRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsListForIssueEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to an issue. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReactionsListForIssueRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsCreateForIssueEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the issue. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; +}; +type ReactionsCreateForIssueRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesListEventsForTimelineEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * issue_number parameter + */ + issue_number: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type IssuesListEventsForTimelineRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListDeployKeysEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListDeployKeysRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposAddDeployKeyEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * A name for the key. + */ + title?: string; + /** + * The contents of the key. + */ + key: string; + /** + * If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write. + * + * Deploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see "[Repository permission levels for an organization](https://help.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://help.github.com/articles/permission-levels-for-a-user-account-repository/)." + */ + read_only?: boolean; +}; +type ReposAddDeployKeyRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetDeployKeyEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * key_id parameter + */ + key_id: number; +}; +type ReposGetDeployKeyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposRemoveDeployKeyEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * key_id parameter + */ + key_id: number; +}; +type ReposRemoveDeployKeyRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesListLabelsForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type IssuesListLabelsForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesCreateLabelEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see [emoji-cheat-sheet.com](http://emoji-cheat-sheet.com/). + */ + name: string; + /** + * The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. + */ + color: string; + /** + * A short description of the label. + */ + description?: string; +}; +type IssuesCreateLabelRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesGetLabelEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * name parameter + */ + name: string; +}; +type IssuesGetLabelRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesUpdateLabelEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * name parameter + */ + name: string; + /** + * The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see [emoji-cheat-sheet.com](http://emoji-cheat-sheet.com/). + */ + new_name?: string; + /** + * The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. + */ + color?: string; + /** + * A short description of the label. + */ + description?: string; +}; +type IssuesUpdateLabelRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesDeleteLabelEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * name parameter + */ + name: string; +}; +type IssuesDeleteLabelRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListLanguagesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposListLanguagesRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type LicensesGetForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type LicensesGetForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposMergeEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The name of the base branch that the head will be merged into. + */ + base: string; + /** + * The head to merge. This can be a branch name or a commit SHA1. + */ + head: string; + /** + * Commit message to use for the merge commit. If omitted, a default message will be used. + */ + commit_message?: string; +}; +type ReposMergeRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesListMilestonesForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The state of the milestone. Either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + /** + * What to sort results by. Either `due_on` or `completeness`. + */ + sort?: "due_on" | "completeness"; + /** + * The direction of the sort. Either `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type IssuesListMilestonesForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesCreateMilestoneEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The title of the milestone. + */ + title: string; + /** + * The state of the milestone. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * A description of the milestone. + */ + description?: string; + /** + * The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + due_on?: string; +}; +type IssuesCreateMilestoneRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesGetMilestoneEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * milestone_number parameter + */ + milestone_number: number; +}; +type IssuesGetMilestoneRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesUpdateMilestoneEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * milestone_number parameter + */ + milestone_number: number; + /** + * The title of the milestone. + */ + title?: string; + /** + * The state of the milestone. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * A description of the milestone. + */ + description?: string; + /** + * The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + due_on?: string; +}; +type IssuesUpdateMilestoneRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesDeleteMilestoneEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * milestone_number parameter + */ + milestone_number: number; +}; +type IssuesDeleteMilestoneRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesListLabelsForMilestoneEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * milestone_number parameter + */ + milestone_number: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type IssuesListLabelsForMilestoneRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListNotificationsForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * If `true`, show notifications marked as read. + */ + all?: boolean; + /** + * If `true`, only shows notifications in which the user is directly participating or mentioned. + */ + participating?: boolean; + /** + * Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + before?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListNotificationsForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityMarkNotificationsAsReadForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Describes the last point that notifications were checked. Anything updated since this time will not be updated. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + */ + last_read_at?: string; +}; +type ActivityMarkNotificationsAsReadForRepoRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetPagesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposGetPagesRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposEnablePagesSiteEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * source parameter + */ + source?: ReposEnablePagesSiteParamsSource; +}; +type ReposEnablePagesSiteRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposDisablePagesSiteEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposDisablePagesSiteRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposUpdateInformationAboutPagesSiteEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see "[Using a custom domain with GitHub Pages](https://help.github.com/articles/using-a-custom-domain-with-github-pages/)." + */ + cname?: string; + /** + * Update the source for the repository. Must include the branch name, and may optionally specify the subdirectory `/docs`. Possible values are `"gh-pages"`, `"master"`, and `"master /docs"`. + */ + source?: '"gh-pages"' | '"master"' | '"master /docs"'; +}; +type ReposUpdateInformationAboutPagesSiteRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposRequestPageBuildEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposRequestPageBuildRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListPagesBuildsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListPagesBuildsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetLatestPagesBuildEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposGetLatestPagesBuildRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetPagesBuildEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * build_id parameter + */ + build_id: number; +}; +type ReposGetPagesBuildRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsListForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ProjectsListForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsCreateForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The name of the project. + */ + name: string; + /** + * The description of the project. + */ + body?: string; +}; +type ProjectsCreateForRepoRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsListEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Either `open`, `closed`, or `all` to filter by state. + */ + state?: "open" | "closed" | "all"; + /** + * Filter pulls by head user or head organization and branch name in the format of `user:ref-name` or `organization:ref-name`. For example: `github:new-script-format` or `octocat:test-branch`. + */ + head?: string; + /** + * Filter pulls by base branch name. Example: `gh-pages`. + */ + base?: string; + /** + * What to sort results by. Can be either `created`, `updated`, `popularity` (comment count) or `long-running` (age, filtering by pulls updated in the last month). + */ + sort?: "created" | "updated" | "popularity" | "long-running"; + /** + * The direction of the sort. Can be either `asc` or `desc`. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`. + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type PullsListRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsCreateEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The title of the new pull request. + */ + title: string; + /** + * The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`. + */ + head: string; + /** + * The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository. + */ + base: string; + /** + * The contents of the pull request. + */ + body?: string; + /** + * Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. + */ + maintainer_can_modify?: boolean; + /** + * Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://help.github.com/en/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. + */ + draft?: boolean; +}; +type PullsCreateRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsListCommentsForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Can be either `created` or `updated` comments. + */ + sort?: "created" | "updated"; + /** + * Can be either `asc` or `desc`. Ignored without `sort` parameter. + */ + direction?: "asc" | "desc"; + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only returns comments `updated` at or after this time. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type PullsListCommentsForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsGetCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * comment_id parameter + */ + comment_id: number; +}; +type PullsGetCommentRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsUpdateCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * comment_id parameter + */ + comment_id: number; + /** + * The text of the reply to the review comment. + */ + body: string; +}; +type PullsUpdateCommentRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsDeleteCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * comment_id parameter + */ + comment_id: number; +}; +type PullsDeleteCommentRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsListForPullRequestReviewCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * comment_id parameter + */ + comment_id: number; + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a pull request review comment. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReactionsListForPullRequestReviewCommentRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsCreateForPullRequestReviewCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * comment_id parameter + */ + comment_id: number; + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the pull request review comment. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; +}; +type ReactionsCreateForPullRequestReviewCommentRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsGetEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; +}; +type PullsGetRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsUpdateEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * The title of the pull request. + */ + title?: string; + /** + * The contents of the pull request. + */ + body?: string; + /** + * State of this Pull Request. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository. + */ + base?: string; + /** + * Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. + */ + maintainer_can_modify?: boolean; +}; +type PullsUpdateRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsListCommentsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * Can be either `created` or `updated` comments. + */ + sort?: "created" | "updated"; + /** + * Can be either `asc` or `desc`. Ignored without `sort` parameter. + */ + direction?: "asc" | "desc"; + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only returns comments `updated` at or after this time. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type PullsListCommentsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsCreateCommentEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * The text of the review comment. + */ + body: string; + /** + * The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. + */ + commit_id: string; + /** + * The relative path to the file that necessitates a comment. + */ + path: string; + /** + * **Required without `comfort-fade` preview**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. + */ + position?: number; + /** + * **Required with `comfort-fade` preview**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + */ + side?: "LEFT" | "RIGHT"; + /** + * **Required with `comfort-fade` preview**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. + */ + line?: number; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. + */ + start_line?: number; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + */ + start_side?: "LEFT" | "RIGHT" | "side"; +}; +type PullsCreateCommentRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsCreateCommentReplyEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * The text of the review comment. + */ + body: string; + /** + * The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. + */ + commit_id: string; + /** + * The relative path to the file that necessitates a comment. + */ + path: string; + /** + * **Required without `comfort-fade` preview**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. + */ + position?: number; + /** + * **Required with `comfort-fade` preview**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + */ + side?: "LEFT" | "RIGHT"; + /** + * **Required with `comfort-fade` preview**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. + */ + line?: number; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. + */ + start_line?: number; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + */ + start_side?: "LEFT" | "RIGHT" | "side"; +}; +type PullsCreateCommentReplyRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsCreateReviewCommentReplyEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * comment_id parameter + */ + comment_id: number; + /** + * The text of the review comment. + */ + body: string; +}; +type PullsCreateReviewCommentReplyRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsListCommitsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type PullsListCommitsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsListFilesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type PullsListFilesRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsCheckIfMergedEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; +}; +type PullsCheckIfMergedRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsMergeEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * Title for the automatic commit message. + */ + commit_title?: string; + /** + * Extra detail to append to automatic commit message. + */ + commit_message?: string; + /** + * SHA that pull request head must match to allow merge. + */ + sha?: string; + /** + * Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. + */ + merge_method?: "merge" | "squash" | "rebase"; +}; +type PullsMergeRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsListReviewRequestsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type PullsListReviewRequestsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsCreateReviewRequestEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * An array of user `login`s that will be requested. + */ + reviewers?: string[]; + /** + * An array of team `slug`s that will be requested. + */ + team_reviewers?: string[]; +}; +type PullsCreateReviewRequestRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsDeleteReviewRequestEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * An array of user `login`s that will be removed. + */ + reviewers?: string[]; + /** + * An array of team `slug`s that will be removed. + */ + team_reviewers?: string[]; +}; +type PullsDeleteReviewRequestRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsListReviewsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type PullsListReviewsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsCreateReviewEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value. + */ + commit_id?: string; + /** + * **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. + */ + body?: string; + /** + * The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https://developer.github.com/v3/pulls/reviews/#submit-a-pull-request-review) when you are ready. + */ + event?: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + /** + * Use the following table to specify the location, destination, and contents of the draft review comment. + */ + comments?: PullsCreateReviewParamsComments[]; +}; +type PullsCreateReviewRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsGetReviewEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * review_id parameter + */ + review_id: number; +}; +type PullsGetReviewRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsDeletePendingReviewEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * review_id parameter + */ + review_id: number; +}; +type PullsDeletePendingReviewRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsUpdateReviewEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * review_id parameter + */ + review_id: number; + /** + * The body text of the pull request review. + */ + body: string; +}; +type PullsUpdateReviewRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsGetCommentsForReviewEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * review_id parameter + */ + review_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type PullsGetCommentsForReviewRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsDismissReviewEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * review_id parameter + */ + review_id: number; + /** + * The message for the pull request review dismissal + */ + message: string; +}; +type PullsDismissReviewRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsSubmitReviewEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * review_id parameter + */ + review_id: number; + /** + * The body text of the pull request review + */ + body?: string; + /** + * The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When you leave this blank, the API returns _HTTP 422 (Unrecognizable entity)_ and sets the review action state to `PENDING`, which means you will need to re-submit the pull request review using a review action. + */ + event: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; +}; +type PullsSubmitReviewRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type PullsUpdateBranchEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * pull_number parameter + */ + pull_number: number; + /** + * The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a `422 Unprocessable Entity` status. You can use the "[List commits on a repository](https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. + */ + expected_head_sha?: string; +}; +type PullsUpdateBranchRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetReadmeEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) + */ + ref?: string; +}; +type ReposGetReadmeRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListReleasesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListReleasesRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposCreateReleaseEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The name of the tag. + */ + tag_name: string; + /** + * Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). + */ + target_commitish?: string; + /** + * The name of the release. + */ + name?: string; + /** + * Text describing the contents of the tag. + */ + body?: string; + /** + * `true` to create a draft (unpublished) release, `false` to create a published one. + */ + draft?: boolean; + /** + * `true` to identify the release as a prerelease. `false` to identify the release as a full release. + */ + prerelease?: boolean; +}; +type ReposCreateReleaseRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetReleaseAssetEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * asset_id parameter + */ + asset_id: number; +}; +type ReposGetReleaseAssetRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposUpdateReleaseAssetEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * asset_id parameter + */ + asset_id: number; + /** + * The file name of the asset. + */ + name?: string; + /** + * An alternate short description of the asset. Used in place of the filename. + */ + label?: string; +}; +type ReposUpdateReleaseAssetRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposDeleteReleaseAssetEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * asset_id parameter + */ + asset_id: number; +}; +type ReposDeleteReleaseAssetRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetLatestReleaseEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposGetLatestReleaseRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetReleaseByTagEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * tag parameter + */ + tag: string; +}; +type ReposGetReleaseByTagRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetReleaseEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * release_id parameter + */ + release_id: number; +}; +type ReposGetReleaseRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposUpdateReleaseEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * release_id parameter + */ + release_id: number; + /** + * The name of the tag. + */ + tag_name?: string; + /** + * Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). + */ + target_commitish?: string; + /** + * The name of the release. + */ + name?: string; + /** + * Text describing the contents of the tag. + */ + body?: string; + /** + * `true` makes the release a draft, and `false` publishes the release. + */ + draft?: boolean; + /** + * `true` to identify the release as a prerelease, `false` to identify the release as a full release. + */ + prerelease?: boolean; +}; +type ReposUpdateReleaseRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposDeleteReleaseEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * release_id parameter + */ + release_id: number; +}; +type ReposDeleteReleaseRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListAssetsForReleaseEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * release_id parameter + */ + release_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListAssetsForReleaseRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListStargazersForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListStargazersForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetCodeFrequencyStatsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposGetCodeFrequencyStatsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetCommitActivityStatsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposGetCommitActivityStatsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetContributorsStatsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposGetContributorsStatsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetParticipationStatsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposGetParticipationStatsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetPunchCardStatsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposGetPunchCardStatsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposCreateStatusEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * sha parameter + */ + sha: string; + /** + * The state of the status. Can be one of `error`, `failure`, `pending`, or `success`. + */ + state: "error" | "failure" | "pending" | "success"; + /** + * The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status. + * For example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA: + * `http://ci.example.com/user/repo/build/sha` + */ + target_url?: string; + /** + * A short description of the status. + */ + description?: string; + /** + * A string label to differentiate this status from the status of other systems. + */ + context?: string; +}; +type ReposCreateStatusRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListWatchersForRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListWatchersForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityGetRepoSubscriptionEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ActivityGetRepoSubscriptionRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivitySetRepoSubscriptionEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Determines if notifications should be received from this repository. + */ + subscribed?: boolean; + /** + * Determines if all notifications should be blocked from this repository. + */ + ignored?: boolean; +}; +type ActivitySetRepoSubscriptionRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityDeleteRepoSubscriptionEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ActivityDeleteRepoSubscriptionRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListTagsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListTagsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListTeamsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListTeamsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListTopicsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposListTopicsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposReplaceTopicsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * An array of topics to add to the repository. Pass one or more topics to _replace_ the set of existing topics. Send an empty array (`[]`) to clear all topics from the repository. **Note:** Topic `names` cannot contain uppercase letters. + */ + names: string[]; +}; +type ReposReplaceTopicsRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetClonesEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Must be one of: `day`, `week`. + */ + per?: "day" | "week"; +}; +type ReposGetClonesRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetTopPathsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposGetTopPathsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetTopReferrersEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposGetTopReferrersRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetViewsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * Must be one of: `day`, `week`. + */ + per?: "day" | "week"; +}; +type ReposGetViewsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposTransferEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * **Required:** The username or organization name the repository will be transferred to. + */ + new_owner?: string; + /** + * ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. + */ + team_ids?: number[]; +}; +type ReposTransferRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposCheckVulnerabilityAlertsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposCheckVulnerabilityAlertsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposEnableVulnerabilityAlertsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposEnableVulnerabilityAlertsRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposDisableVulnerabilityAlertsEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ReposDisableVulnerabilityAlertsRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposGetArchiveLinkEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * archive_format parameter + */ + archive_format: string; + /** + * ref parameter + */ + ref: string; +}; +type ReposGetArchiveLinkRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposCreateUsingTemplateEndpoint = { + /** + * template_owner parameter + */ + template_owner: string; + /** + * template_repo parameter + */ + template_repo: string; + /** + * The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization. + */ + owner?: string; + /** + * The name of the new repository. + */ + name: string; + /** + * A short description of the new repository. + */ + description?: string; + /** + * Either `true` to create a new private repository or `false` to create a new public one. + */ + private?: boolean; +}; +type ReposCreateUsingTemplateRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListPublicEndpoint = { + /** + * The integer ID of the last Repository that you've seen. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListPublicRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ScimListProvisionedIdentitiesEndpoint = { + /** + * org parameter + */ + org: string; + /** + * Used for pagination: the index of the first result to return. + */ + startIndex?: number; + /** + * Used for pagination: the number of results to return. + */ + count?: number; + /** + * Filters results using the equals query parameter operator (`eq`). You can filter results that are equal to `id`, `userName`, `emails`, and `external_id`. For example, to search for an identity with the `userName` Octocat, you would use this query: `?filter=userName%20eq%20\"Octocat\"`. + */ + filter?: string; +}; +type ScimListProvisionedIdentitiesRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ScimProvisionAndInviteUsersEndpoint = { + /** + * org parameter + */ + org: string; +}; +type ScimProvisionAndInviteUsersRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ScimProvisionInviteUsersEndpoint = { + /** + * org parameter + */ + org: string; +}; +type ScimProvisionInviteUsersRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ScimGetProvisioningDetailsForUserEndpoint = { + /** + * org parameter + */ + org: string; + /** + * scim_user_id parameter + */ + scim_user_id: number; +}; +type ScimGetProvisioningDetailsForUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ScimReplaceProvisionedUserInformationEndpoint = { + /** + * org parameter + */ + org: string; + /** + * scim_user_id parameter + */ + scim_user_id: number; +}; +type ScimReplaceProvisionedUserInformationRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ScimUpdateProvisionedOrgMembershipEndpoint = { + /** + * org parameter + */ + org: string; + /** + * scim_user_id parameter + */ + scim_user_id: number; +}; +type ScimUpdateProvisionedOrgMembershipRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ScimUpdateUserAttributeEndpoint = { + /** + * org parameter + */ + org: string; + /** + * scim_user_id parameter + */ + scim_user_id: number; +}; +type ScimUpdateUserAttributeRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ScimRemoveUserFromOrgEndpoint = { + /** + * org parameter + */ + org: string; + /** + * scim_user_id parameter + */ + scim_user_id: number; +}; +type ScimRemoveUserFromOrgRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type SearchCodeEndpoint = { + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching code](https://help.github.com/articles/searching-code/)" for a detailed list of qualifiers. + */ + q: string; + /** + * Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub search infrastructure. Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) + */ + sort?: "indexed"; + /** + * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + */ + order?: "desc" | "asc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type SearchCodeRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type SearchCommitsEndpoint = { + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching commits](https://help.github.com/articles/searching-commits/)" for a detailed list of qualifiers. + */ + q: string; + /** + * Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) + */ + sort?: "author-date" | "committer-date"; + /** + * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + */ + order?: "desc" | "asc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type SearchCommitsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type SearchIssuesAndPullRequestsEndpoint = { + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching issues and pull requests](https://help.github.com/articles/searching-issues-and-pull-requests/)" for a detailed list of qualifiers. + */ + q: string; + /** + * Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) + */ + sort?: + | "comments" + | "reactions" + | "reactions-+1" + | "reactions--1" + | "reactions-smile" + | "reactions-thinking_face" + | "reactions-heart" + | "reactions-tada" + | "interactions" + | "created" + | "updated"; + /** + * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + */ + order?: "desc" | "asc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type SearchIssuesAndPullRequestsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type SearchIssuesEndpoint = { + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching issues and pull requests](https://help.github.com/articles/searching-issues-and-pull-requests/)" for a detailed list of qualifiers. + */ + q: string; + /** + * Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) + */ + sort?: + | "comments" + | "reactions" + | "reactions-+1" + | "reactions--1" + | "reactions-smile" + | "reactions-thinking_face" + | "reactions-heart" + | "reactions-tada" + | "interactions" + | "created" + | "updated"; + /** + * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + */ + order?: "desc" | "asc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type SearchIssuesRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type SearchLabelsEndpoint = { + /** + * The id of the repository. + */ + repository_id: number; + /** + * The search keywords. This endpoint does not accept qualifiers in the query. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). + */ + q: string; + /** + * Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) + */ + sort?: "created" | "updated"; + /** + * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + */ + order?: "desc" | "asc"; +}; +type SearchLabelsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type SearchReposEndpoint = { + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching for repositories](https://help.github.com/articles/searching-for-repositories/)" for a detailed list of qualifiers. + */ + q: string; + /** + * Sorts the results of your query by number of `stars`, `forks`, or `help-wanted-issues` or how recently the items were `updated`. Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) + */ + sort?: "stars" | "forks" | "help-wanted-issues" | "updated"; + /** + * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + */ + order?: "desc" | "asc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type SearchReposRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type SearchTopicsEndpoint = { + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). + */ + q: string; +}; +type SearchTopicsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type SearchUsersEndpoint = { + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching users](https://help.github.com/articles/searching-users/)" for a detailed list of qualifiers. + */ + q: string; + /** + * Sorts the results of your query by number of `followers` or `repositories`, or when the person `joined` GitHub. Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) + */ + sort?: "followers" | "repositories" | "joined"; + /** + * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + */ + order?: "desc" | "asc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type SearchUsersRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsGetEndpoint = { + /** + * team_id parameter + */ + team_id: number; +}; +type TeamsGetRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsUpdateEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * The name of the team. + */ + name: string; + /** + * The description of the team. + */ + description?: string; + /** + * The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. The options are: + * **For a non-nested team:** + * \* `secret` - only visible to organization owners and members of this team. + * \* `closed` - visible to all members of this organization. + * **For a parent or child team:** + * \* `closed` - visible to all members of this organization. + */ + privacy?: "secret" | "closed"; + /** + * **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: + * \* `pull` - team members can pull, but not push to or administer newly-added repositories. + * \* `push` - team members can pull and push, but not administer newly-added repositories. + * \* `admin` - team members can pull, push and administer newly-added repositories. + */ + permission?: "pull" | "push" | "admin"; + /** + * The ID of a team to set as the parent team. **Note**: You must pass the `hellcat-preview` media type to use this parameter. + */ + parent_team_id?: number; +}; +type TeamsUpdateRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsDeleteEndpoint = { + /** + * team_id parameter + */ + team_id: number; +}; +type TeamsDeleteRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListDiscussionsEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * Sorts the discussion comments by the date they were created. To return the oldest comments first, set to `asc`. Can be one of `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListDiscussionsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsCreateDiscussionEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * The discussion post's title. + */ + title: string; + /** + * The discussion post's body text. + */ + body: string; + /** + * Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. + */ + private?: boolean; +}; +type TeamsCreateDiscussionRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsGetDiscussionEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; +}; +type TeamsGetDiscussionRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsUpdateDiscussionEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * The discussion post's title. + */ + title?: string; + /** + * The discussion post's body text. + */ + body?: string; +}; +type TeamsUpdateDiscussionRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsDeleteDiscussionEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; +}; +type TeamsDeleteDiscussionRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListDiscussionCommentsEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * Sorts the discussion comments by the date they were created. To return the oldest comments first, set to `asc`. Can be one of `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListDiscussionCommentsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsCreateDiscussionCommentEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * The discussion comment's body text. + */ + body: string; +}; +type TeamsCreateDiscussionCommentRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsGetDiscussionCommentEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * comment_number parameter + */ + comment_number: number; +}; +type TeamsGetDiscussionCommentRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsUpdateDiscussionCommentEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * comment_number parameter + */ + comment_number: number; + /** + * The discussion comment's body text. + */ + body: string; +}; +type TeamsUpdateDiscussionCommentRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsDeleteDiscussionCommentEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * comment_number parameter + */ + comment_number: number; +}; +type TeamsDeleteDiscussionCommentRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsListForTeamDiscussionCommentEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * comment_number parameter + */ + comment_number: number; + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a team discussion comment. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReactionsListForTeamDiscussionCommentRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsCreateForTeamDiscussionCommentEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * comment_number parameter + */ + comment_number: number; + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion comment. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; +}; +type ReactionsCreateForTeamDiscussionCommentRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsListForTeamDiscussionEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a team discussion. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReactionsListForTeamDiscussionRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReactionsCreateForTeamDiscussionEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * discussion_number parameter + */ + discussion_number: number; + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; +}; +type ReactionsCreateForTeamDiscussionRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListPendingInvitationsEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListPendingInvitationsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListMembersEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * Filters members returned by their role in the team. Can be one of: + * \* `member` - normal members of the team. + * \* `maintainer` - team maintainers. + * \* `all` - all members of the team. + */ + role?: "member" | "maintainer" | "all"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListMembersRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsGetMemberEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * username parameter + */ + username: string; +}; +type TeamsGetMemberRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsAddMemberEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * username parameter + */ + username: string; +}; +type TeamsAddMemberRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsRemoveMemberEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * username parameter + */ + username: string; +}; +type TeamsRemoveMemberRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsGetMembershipEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * username parameter + */ + username: string; +}; +type TeamsGetMembershipRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsAddOrUpdateMembershipEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * username parameter + */ + username: string; + /** + * The role that this user should have in the team. Can be one of: + * \* `member` - a normal member of the team. + * \* `maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description. + */ + role?: "member" | "maintainer"; +}; +type TeamsAddOrUpdateMembershipRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsRemoveMembershipEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * username parameter + */ + username: string; +}; +type TeamsRemoveMembershipRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListProjectsEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListProjectsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsReviewProjectEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * project_id parameter + */ + project_id: number; +}; +type TeamsReviewProjectRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsAddOrUpdateProjectEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * project_id parameter + */ + project_id: number; + /** + * The permission to grant to the team for this project. Can be one of: + * \* `read` - team members can read, but not write to or administer this project. + * \* `write` - team members can read and write, but not administer this project. + * \* `admin` - team members can read, write and administer this project. + * Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + * **Note**: If you pass the `hellcat-preview` media type, you can promote—but not demote—a `permission` attribute inherited from a parent team. + */ + permission?: "read" | "write" | "admin"; +}; +type TeamsAddOrUpdateProjectRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsRemoveProjectEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * project_id parameter + */ + project_id: number; +}; +type TeamsRemoveProjectRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListReposEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListReposRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsCheckManagesRepoEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type TeamsCheckManagesRepoRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsAddOrUpdateRepoEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; + /** + * The permission to grant the team on this repository. Can be one of: + * \* `pull` - team members can pull, but not push to or administer this repository. + * \* `push` - team members can pull and push, but not administer this repository. + * \* `admin` - team members can pull, push and administer this repository. + * + * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + * **Note**: If you pass the `hellcat-preview` media type, you can promote—but not demote—a `permission` attribute inherited through a parent team. + */ + permission?: "pull" | "push" | "admin"; +}; +type TeamsAddOrUpdateRepoRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsRemoveRepoEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type TeamsRemoveRepoRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListIdPGroupsEndpoint = { + /** + * team_id parameter + */ + team_id: number; +}; +type TeamsListIdPGroupsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsCreateOrUpdateIdPGroupConnectionsEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove. + */ + groups: TeamsCreateOrUpdateIdPGroupConnectionsParamsGroups[]; +}; +type TeamsCreateOrUpdateIdPGroupConnectionsRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListChildEndpoint = { + /** + * team_id parameter + */ + team_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListChildRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersGetAuthenticatedEndpoint = {}; +type UsersGetAuthenticatedRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersUpdateAuthenticatedEndpoint = { + /** + * The new name of the user. + */ + name?: string; + /** + * The publicly visible email address of the user. + */ + email?: string; + /** + * The new blog URL of the user. + */ + blog?: string; + /** + * The new company of the user. + */ + company?: string; + /** + * The new location of the user. + */ + location?: string; + /** + * The new hiring availability of the user. + */ + hireable?: boolean; + /** + * The new short biography of the user. + */ + bio?: string; +}; +type UsersUpdateAuthenticatedRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersListBlockedEndpoint = {}; +type UsersListBlockedRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersCheckBlockedEndpoint = { + /** + * username parameter + */ + username: string; +}; +type UsersCheckBlockedRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersBlockEndpoint = { + /** + * username parameter + */ + username: string; +}; +type UsersBlockRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersUnblockEndpoint = { + /** + * username parameter + */ + username: string; +}; +type UsersUnblockRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersTogglePrimaryEmailVisibilityEndpoint = { + /** + * Specify the _primary_ email address that needs a visibility change. + */ + email: string; + /** + * Use `public` to enable an authenticated user to view the specified email address, or use `private` so this primary email address cannot be seen publicly. + */ + visibility: string; +}; +type UsersTogglePrimaryEmailVisibilityRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersListEmailsEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type UsersListEmailsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersAddEmailsEndpoint = { + /** + * Adds one or more email addresses to your GitHub account. Must contain at least one email address. **Note:** Alternatively, you can pass a single email address or an `array` of emails addresses directly, but we recommend that you pass an object using the `emails` key. + */ + emails: string[]; +}; +type UsersAddEmailsRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersDeleteEmailsEndpoint = { + /** + * Deletes one or more email addresses from your GitHub account. Must contain at least one email address. **Note:** Alternatively, you can pass a single email address or an `array` of emails addresses directly, but we recommend that you pass an object using the `emails` key. + */ + emails: string[]; +}; +type UsersDeleteEmailsRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersListFollowersForAuthenticatedUserEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type UsersListFollowersForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersListFollowingForAuthenticatedUserEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type UsersListFollowingForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersCheckFollowingEndpoint = { + /** + * username parameter + */ + username: string; +}; +type UsersCheckFollowingRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersFollowEndpoint = { + /** + * username parameter + */ + username: string; +}; +type UsersFollowRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersUnfollowEndpoint = { + /** + * username parameter + */ + username: string; +}; +type UsersUnfollowRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersListGpgKeysEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type UsersListGpgKeysRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersCreateGpgKeyEndpoint = { + /** + * Your GPG key, generated in ASCII-armored format. See "[Generating a new GPG key](https://help.github.com/articles/generating-a-new-gpg-key/)" for help creating a GPG key. + */ + armored_public_key?: string; +}; +type UsersCreateGpgKeyRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersGetGpgKeyEndpoint = { + /** + * gpg_key_id parameter + */ + gpg_key_id: number; +}; +type UsersGetGpgKeyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersDeleteGpgKeyEndpoint = { + /** + * gpg_key_id parameter + */ + gpg_key_id: number; +}; +type UsersDeleteGpgKeyRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsListInstallationsForAuthenticatedUserEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type AppsListInstallationsForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsListInstallationReposForAuthenticatedUserEndpoint = { + /** + * installation_id parameter + */ + installation_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type AppsListInstallationReposForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsAddRepoToInstallationEndpoint = { + /** + * installation_id parameter + */ + installation_id: number; + /** + * repository_id parameter + */ + repository_id: number; +}; +type AppsAddRepoToInstallationRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsRemoveRepoFromInstallationEndpoint = { + /** + * installation_id parameter + */ + installation_id: number; + /** + * repository_id parameter + */ + repository_id: number; +}; +type AppsRemoveRepoFromInstallationRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type IssuesListForAuthenticatedUserEndpoint = { + /** + * Indicates which sorts of issues to return. Can be one of: + * \* `assigned`: Issues assigned to you + * \* `created`: Issues created by you + * \* `mentioned`: Issues mentioning you + * \* `subscribed`: Issues you're subscribed to updates for + * \* `all`: All issues the authenticated user can see, regardless of participation or creation + */ + filter?: "assigned" | "created" | "mentioned" | "subscribed" | "all"; + /** + * Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + /** + * A list of comma separated label names. Example: `bug,ui,@high` + */ + labels?: string; + /** + * What to sort results by. Can be either `created`, `updated`, `comments`. + */ + sort?: "created" | "updated" | "comments"; + /** + * The direction of the sort. Can be either `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type IssuesListForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersListPublicKeysEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type UsersListPublicKeysRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersCreatePublicKeyEndpoint = { + /** + * A descriptive name for the new key. Use a name that will help you recognize this key in your GitHub account. For example, if you're using a personal Mac, you might call this key "Personal MacBook Air". + */ + title?: string; + /** + * The public SSH key to add to your GitHub account. See "[Generating a new SSH key](https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/)" for guidance on how to create a public SSH key. + */ + key?: string; +}; +type UsersCreatePublicKeyRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersGetPublicKeyEndpoint = { + /** + * key_id parameter + */ + key_id: number; +}; +type UsersGetPublicKeyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersDeletePublicKeyEndpoint = { + /** + * key_id parameter + */ + key_id: number; +}; +type UsersDeletePublicKeyRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsListMarketplacePurchasesForAuthenticatedUserEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type AppsListMarketplacePurchasesForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsListMarketplacePurchasesForAuthenticatedUserStubbedEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type AppsListMarketplacePurchasesForAuthenticatedUserStubbedRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsListMembershipsEndpoint = { + /** + * Indicates the state of the memberships to return. Can be either `active` or `pending`. If not specified, the API returns both active and pending memberships. + */ + state?: "active" | "pending"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type OrgsListMembershipsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsGetMembershipForAuthenticatedUserEndpoint = { + /** + * org parameter + */ + org: string; +}; +type OrgsGetMembershipForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsUpdateMembershipEndpoint = { + /** + * org parameter + */ + org: string; + /** + * The state that the membership should be in. Only `"active"` will be accepted. + */ + state: "active"; +}; +type OrgsUpdateMembershipRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsStartForAuthenticatedUserEndpoint = { + /** + * An array of repositories to include in the migration. + */ + repositories: string[]; + /** + * Locks the `repositories` to prevent changes during the migration when set to `true`. + */ + lock_repositories?: boolean; + /** + * Does not include attachments uploaded to GitHub.com in the migration data when set to `true`. Excluding attachments will reduce the migration archive file size. + */ + exclude_attachments?: boolean; +}; +type MigrationsStartForAuthenticatedUserRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsListForAuthenticatedUserEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type MigrationsListForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsGetStatusForAuthenticatedUserEndpoint = { + /** + * migration_id parameter + */ + migration_id: number; +}; +type MigrationsGetStatusForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsGetArchiveForAuthenticatedUserEndpoint = { + /** + * migration_id parameter + */ + migration_id: number; +}; +type MigrationsGetArchiveForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsDeleteArchiveForAuthenticatedUserEndpoint = { + /** + * migration_id parameter + */ + migration_id: number; +}; +type MigrationsDeleteArchiveForAuthenticatedUserRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type MigrationsUnlockRepoForAuthenticatedUserEndpoint = { + /** + * migration_id parameter + */ + migration_id: number; + /** + * repo_name parameter + */ + repo_name: string; +}; +type MigrationsUnlockRepoForAuthenticatedUserRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsListForAuthenticatedUserEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type OrgsListForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsCreateForAuthenticatedUserEndpoint = { + /** + * The name of the project. + */ + name: string; + /** + * The description of the project. + */ + body?: string; +}; +type ProjectsCreateForAuthenticatedUserRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersListPublicEmailsEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type UsersListPublicEmailsRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListEndpoint = { + /** + * Can be one of `all`, `public`, or `private`. + */ + visibility?: "all" | "public" | "private"; + /** + * Comma-separated list of values. Can include: + * \* `owner`: Repositories that are owned by the authenticated user. + * \* `collaborator`: Repositories that the user has been added to as a collaborator. + * \* `organization_member`: Repositories that the user has access to through being a member of an organization. This includes every repository on every team that the user is on. + */ + affiliation?: string; + /** + * Can be one of `all`, `owner`, `public`, `private`, `member`. Default: `all` + * + * Will cause a `422` error if used in the same request as **visibility** or **affiliation**. Will cause a `422` error if used in the same request as **visibility** or **affiliation**. + */ + type?: "all" | "owner" | "public" | "private" | "member"; + /** + * Can be one of `created`, `updated`, `pushed`, `full_name`. + */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** + * Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc` + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposCreateForAuthenticatedUserEndpoint = { + /** + * The name of the repository. + */ + name: string; + /** + * A short description of the repository. + */ + description?: string; + /** + * A URL with more information about the repository. + */ + homepage?: string; + /** + * Either `true` to create a private repository or `false` to create a public one. Creating private repositories requires a paid GitHub account. + */ + private?: boolean; + /** + * Either `true` to enable issues for this repository or `false` to disable them. + */ + has_issues?: boolean; + /** + * Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. + */ + has_projects?: boolean; + /** + * Either `true` to enable the wiki for this repository or `false` to disable it. + */ + has_wiki?: boolean; + /** + * Either `true` to make this repo available as a template repository or `false` to prevent it. + */ + is_template?: boolean; + /** + * The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. + */ + team_id?: number; + /** + * Pass `true` to create an initial commit with empty README. + */ + auto_init?: boolean; + /** + * Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, "Haskell". + */ + gitignore_template?: string; + /** + * Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://help.github.com/articles/licensing-a-repository/#searching-github-by-license-type) as the `license_template` string. For example, "mit" or "mpl-2.0". + */ + license_template?: string; + /** + * Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + */ + allow_squash_merge?: boolean; + /** + * Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + */ + allow_merge_commit?: boolean; + /** + * Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + */ + allow_rebase_merge?: boolean; +}; +type ReposCreateForAuthenticatedUserRequestOptions = { + method: "POST"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListInvitationsForAuthenticatedUserEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListInvitationsForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposAcceptInvitationEndpoint = { + /** + * invitation_id parameter + */ + invitation_id: number; +}; +type ReposAcceptInvitationRequestOptions = { + method: "PATCH"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposDeclineInvitationEndpoint = { + /** + * invitation_id parameter + */ + invitation_id: number; +}; +type ReposDeclineInvitationRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListReposStarredByAuthenticatedUserEndpoint = { + /** + * One of `created` (when the repository was starred) or `updated` (when it was last pushed to). + */ + sort?: "created" | "updated"; + /** + * One of `asc` (ascending) or `desc` (descending). + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListReposStarredByAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityCheckStarringRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ActivityCheckStarringRepoRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityStarRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ActivityStarRepoRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityUnstarRepoEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ActivityUnstarRepoRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListWatchedReposForAuthenticatedUserEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListWatchedReposForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityCheckWatchingRepoLegacyEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ActivityCheckWatchingRepoLegacyRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityWatchRepoLegacyEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ActivityWatchRepoLegacyRequestOptions = { + method: "PUT"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityStopWatchingRepoLegacyEndpoint = { + /** + * owner parameter + */ + owner: string; + /** + * repo parameter + */ + repo: string; +}; +type ActivityStopWatchingRepoLegacyRequestOptions = { + method: "DELETE"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type TeamsListForAuthenticatedUserEndpoint = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type TeamsListForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersListEndpoint = { + /** + * The integer ID of the last User that you've seen. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type UsersListRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersGetByUsernameEndpoint = { + /** + * username parameter + */ + username: string; +}; +type UsersGetByUsernameRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListEventsForUserEndpoint = { + /** + * username parameter + */ + username: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListEventsForUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListEventsForOrgEndpoint = { + /** + * username parameter + */ + username: string; + /** + * org parameter + */ + org: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListEventsForOrgRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListPublicEventsForUserEndpoint = { + /** + * username parameter + */ + username: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListPublicEventsForUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersListFollowersForUserEndpoint = { + /** + * username parameter + */ + username: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type UsersListFollowersForUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersListFollowingForUserEndpoint = { + /** + * username parameter + */ + username: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type UsersListFollowingForUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersCheckFollowingForUserEndpoint = { + /** + * username parameter + */ + username: string; + /** + * target_user parameter + */ + target_user: string; +}; +type UsersCheckFollowingForUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type GistsListPublicForUserEndpoint = { + /** + * username parameter + */ + username: string; + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type GistsListPublicForUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersListGpgKeysForUserEndpoint = { + /** + * username parameter + */ + username: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type UsersListGpgKeysForUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersGetContextForUserEndpoint = { + /** + * username parameter + */ + username: string; + /** + * Identifies which additional information you'd like to receive about the person's hovercard. Can be `organization`, `repository`, `issue`, `pull_request`. **Required** when using `subject_id`. + */ + subject_type?: "organization" | "repository" | "issue" | "pull_request"; + /** + * Uses the ID for the `subject_type` you specified. **Required** when using `subject_type`. + */ + subject_id?: string; +}; +type UsersGetContextForUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsGetUserInstallationEndpoint = { + /** + * username parameter + */ + username: string; +}; +type AppsGetUserInstallationRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type AppsFindUserInstallationEndpoint = { + /** + * username parameter + */ + username: string; +}; +type AppsFindUserInstallationRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type UsersListPublicKeysForUserEndpoint = { + /** + * username parameter + */ + username: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type UsersListPublicKeysForUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type OrgsListForUserEndpoint = { + /** + * username parameter + */ + username: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type OrgsListForUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ProjectsListForUserEndpoint = { + /** + * username parameter + */ + username: string; + /** + * Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ProjectsListForUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListReceivedEventsForUserEndpoint = { + /** + * username parameter + */ + username: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListReceivedEventsForUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListReceivedPublicEventsForUserEndpoint = { + /** + * username parameter + */ + username: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListReceivedPublicEventsForUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ReposListForUserEndpoint = { + /** + * username parameter + */ + username: string; + /** + * Can be one of `all`, `owner`, `member`. + */ + type?: "all" | "owner" | "member"; + /** + * Can be one of `created`, `updated`, `pushed`, `full_name`. + */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** + * Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc` + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ReposListForUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListReposStarredByUserEndpoint = { + /** + * username parameter + */ + username: string; + /** + * One of `created` (when the repository was starred) or `updated` (when it was last pushed to). + */ + sort?: "created" | "updated"; + /** + * One of `asc` (ascending) or `desc` (descending). + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListReposStarredByUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; +type ActivityListReposWatchedByUserEndpoint = { + /** + * username parameter + */ + username: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; +}; +type ActivityListReposWatchedByUserRequestOptions = { + method: "GET"; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; +}; + +export type AppsCreateInstallationTokenParamsPermissions = {}; +export type GistsCreateParamsFiles = { + content?: string; +}; +export type GistsUpdateParamsFiles = { + content?: string; + filename?: string; +}; +export type OrgsCreateHookParamsConfig = { + url: string; + content_type?: string; + secret?: string; + insecure_ssl?: string; +}; +export type OrgsUpdateHookParamsConfig = { + url: string; + content_type?: string; + secret?: string; + insecure_ssl?: string; +}; +export type ReposUpdateBranchProtectionParamsRequiredStatusChecks = { + strict: boolean; + contexts: string[]; +}; +export type ReposUpdateBranchProtectionParamsRequiredPullRequestReviews = { + dismissal_restrictions?: ReposUpdateBranchProtectionParamsRequiredPullRequestReviewsDismissalRestrictions; + dismiss_stale_reviews?: boolean; + require_code_owner_reviews?: boolean; + required_approving_review_count?: number; +}; +export type ReposUpdateBranchProtectionParamsRequiredPullRequestReviewsDismissalRestrictions = { + users?: string[]; + teams?: string[]; +}; +export type ReposUpdateBranchProtectionParamsRestrictions = { + users: string[]; + teams: string[]; + apps?: string[]; +}; +export type ReposUpdateProtectedBranchPullRequestReviewEnforcementParamsDismissalRestrictions = { + users?: string[]; + teams?: string[]; +}; +export type ChecksCreateParamsOutput = { + title: string; + summary: string; + text?: string; + annotations?: ChecksCreateParamsOutputAnnotations[]; + images?: ChecksCreateParamsOutputImages[]; +}; +export type ChecksCreateParamsOutputAnnotations = { + path: string; + start_line: number; + end_line: number; + start_column?: number; + end_column?: number; + annotation_level: "notice" | "warning" | "failure"; + message: string; + title?: string; + raw_details?: string; +}; +export type ChecksCreateParamsOutputImages = { + alt: string; + image_url: string; + caption?: string; +}; +export type ChecksCreateParamsActions = { + label: string; + description: string; + identifier: string; +}; +export type ChecksUpdateParamsOutput = { + title?: string; + summary: string; + text?: string; + annotations?: ChecksUpdateParamsOutputAnnotations[]; + images?: ChecksUpdateParamsOutputImages[]; +}; +export type ChecksUpdateParamsOutputAnnotations = { + path: string; + start_line: number; + end_line: number; + start_column?: number; + end_column?: number; + annotation_level: "notice" | "warning" | "failure"; + message: string; + title?: string; + raw_details?: string; +}; +export type ChecksUpdateParamsOutputImages = { + alt: string; + image_url: string; + caption?: string; +}; +export type ChecksUpdateParamsActions = { + label: string; + description: string; + identifier: string; +}; +export type ChecksSetSuitesPreferencesParamsAutoTriggerChecks = { + app_id: number; + setting: boolean; +}; +export type ReposCreateOrUpdateFileParamsCommitter = { + name: string; + email: string; +}; +export type ReposCreateOrUpdateFileParamsAuthor = { + name: string; + email: string; +}; +export type ReposCreateFileParamsCommitter = { + name: string; + email: string; +}; +export type ReposCreateFileParamsAuthor = { + name: string; + email: string; +}; +export type ReposUpdateFileParamsCommitter = { + name: string; + email: string; +}; +export type ReposUpdateFileParamsAuthor = { + name: string; + email: string; +}; +export type ReposDeleteFileParamsCommitter = { + name?: string; + email?: string; +}; +export type ReposDeleteFileParamsAuthor = { + name?: string; + email?: string; +}; +export type GitCreateCommitParamsAuthor = { + name?: string; + email?: string; + date?: string; +}; +export type GitCreateCommitParamsCommitter = { + name?: string; + email?: string; + date?: string; +}; +export type GitCreateTagParamsTagger = { + name?: string; + email?: string; + date?: string; +}; +export type GitCreateTreeParamsTree = { + path?: string; + mode?: "100644" | "100755" | "040000" | "160000" | "120000"; + type?: "blob" | "tree" | "commit"; + sha?: string; + content?: string; +}; +export type ReposCreateHookParamsConfig = { + url: string; + content_type?: string; + secret?: string; + insecure_ssl?: string; +}; +export type ReposUpdateHookParamsConfig = { + url: string; + content_type?: string; + secret?: string; + insecure_ssl?: string; +}; +export type ReposEnablePagesSiteParamsSource = { + branch?: "master" | "gh-pages"; + path?: string; +}; +export type PullsCreateReviewParamsComments = { + path: string; + position: number; + body: string; +}; +export type TeamsCreateOrUpdateIdPGroupConnectionsParamsGroups = { + group_id: string; + group_name: string; + group_description: string; +}; diff --git a/node_modules/@octokit/types/src/generated/README.md b/node_modules/@octokit/types/src/generated/README.md new file mode 100644 index 00000000..2bc90d20 --- /dev/null +++ b/node_modules/@octokit/types/src/generated/README.md @@ -0,0 +1,3 @@ +# ⚠️ Do not edit files in this folder + +All files are generated. Manual changes will be overwritten. If you find a problem, please look into how they are generated. When in doubt, please open a new issue. diff --git a/node_modules/@octokit/types/src/index.ts b/node_modules/@octokit/types/src/index.ts new file mode 100644 index 00000000..a0f51b31 --- /dev/null +++ b/node_modules/@octokit/types/src/index.ts @@ -0,0 +1,18 @@ +export { AuthInterface } from "./AuthInterface"; +export { EndpointDefaults } from "./EndpointDefaults"; +export { EndpointInterface } from "./EndpointInterface"; +export { EndpointOptions } from "./EndpointOptions"; +export { Fetch } from "./Fetch"; +export { OctokitResponse } from "./OctokitResponse"; +export { RequestHeaders } from "./RequestHeaders"; +export { RequestInterface } from "./RequestInterface"; +export { RequestMethod } from "./RequestMethod"; +export { RequestOptions } from "./RequestOptions"; +export { RequestParameters } from "./RequestParameters"; +export { RequestRequestOptions } from "./RequestRequestOptions"; +export { ResponseHeaders } from "./ResponseHeaders"; +export { Route } from "./Route"; +export { Signal } from "./Signal"; +export { StrategyInterface } from "./StrategyInterface"; +export { Url } from "./Url"; +export { VERSION } from "./VERSION"; diff --git a/node_modules/@types/node/LICENSE b/node_modules/@types/node/LICENSE new file mode 100644 index 00000000..21071075 --- /dev/null +++ b/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/node_modules/@types/node/README.md b/node_modules/@types/node/README.md new file mode 100644 index 00000000..e0ce3da6 --- /dev/null +++ b/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/tree/master/types/node + +Additional Details + * Last updated: Thu, 01 Aug 2019 19:43:21 GMT + * Dependencies: none + * Global values: Buffer, NodeJS, Symbol, __dirname, __filename, clearImmediate, clearInterval, clearTimeout, console, exports, global, module, process, queueMicrotask, require, setImmediate, setInterval, setTimeout + +# Credits +These definitions were written by Microsoft TypeScript , DefinitelyTyped , Alberto Schiabel , Alexander T. , Alvis HT Tang , Andrew Makarov , Benjamin Toueg , Bruno Scheufler , Chigozirim C. , Christian Vaagland Tellnes , David Junger , Deividas Bakanas , Eugene Y. Q. Shen , Flarna , Hannes Magnusson , Hoàng Văn Khải , Huw , Kelvin Jin , Klaus Meinhardt , Lishude , Mariusz Wiktorczyk , Matthieu Sieben , Mohsen Azimi , Nicolas Even , Nicolas Voigt , Parambir Singh , Sebastian Silbermann , Simon Schick , Thomas den Hollander , Wilco Bakker , wwwy3y3 , Zane Hannan AU , Samuel Ainsworth , Kyle Uehlein , Jordi Oliveras Rovira , Thanik Bhongbhibhat , and Marcin Kopacz . diff --git a/node_modules/@types/node/assert.d.ts b/node_modules/@types/node/assert.d.ts new file mode 100644 index 00000000..319e5b4d --- /dev/null +++ b/node_modules/@types/node/assert.d.ts @@ -0,0 +1,52 @@ +declare module "assert" { + function internal(value: any, message?: string | Error): void; + namespace internal { + class AssertionError implements Error { + name: string; + message: string; + actual: any; + expected: any; + operator: string; + generatedMessage: boolean; + code: 'ERR_ASSERTION'; + + constructor(options?: { + message?: string; actual?: any; expected?: any; + operator?: string; stackStartFn?: Function + }); + } + + function fail(message?: string | Error): never; + /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */ + function fail(actual: any, expected: any, message?: string | Error, operator?: string, stackStartFn?: Function): never; + function ok(value: any, message?: string | Error): void; + /** @deprecated since v9.9.0 - use strictEqual() instead. */ + function equal(actual: any, expected: any, message?: string | Error): void; + /** @deprecated since v9.9.0 - use notStrictEqual() instead. */ + function notEqual(actual: any, expected: any, message?: string | Error): void; + /** @deprecated since v9.9.0 - use deepStrictEqual() instead. */ + function deepEqual(actual: any, expected: any, message?: string | Error): void; + /** @deprecated since v9.9.0 - use notDeepStrictEqual() instead. */ + function notDeepEqual(actual: any, expected: any, message?: string | Error): void; + function strictEqual(actual: any, expected: any, message?: string | Error): void; + function notStrictEqual(actual: any, expected: any, message?: string | Error): void; + function deepStrictEqual(actual: any, expected: any, message?: string | Error): void; + function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void; + + function throws(block: () => any, message?: string | Error): void; + function throws(block: () => any, error: RegExp | Function | Object | Error, message?: string | Error): void; + function doesNotThrow(block: () => any, message?: string | Error): void; + function doesNotThrow(block: () => any, error: RegExp | Function, message?: string | Error): void; + + function ifError(value: any): void; + + function rejects(block: (() => Promise) | Promise, message?: string | Error): Promise; + function rejects(block: (() => Promise) | Promise, error: RegExp | Function | Object | Error, message?: string | Error): Promise; + function doesNotReject(block: (() => Promise) | Promise, message?: string | Error): Promise; + function doesNotReject(block: (() => Promise) | Promise, error: RegExp | Function, message?: string | Error): Promise; + + const strict: typeof internal; + } + + export = internal; +} diff --git a/node_modules/@types/node/async_hooks.d.ts b/node_modules/@types/node/async_hooks.d.ts new file mode 100644 index 00000000..cca992ec --- /dev/null +++ b/node_modules/@types/node/async_hooks.d.ts @@ -0,0 +1,132 @@ +/** + * Async Hooks module: https://nodejs.org/api/async_hooks.html + */ +declare module "async_hooks" { + /** + * Returns the asyncId of the current execution context. + */ + function executionAsyncId(): number; + + /** + * Returns the ID of the resource responsible for calling the callback that is currently being executed. + */ + function triggerAsyncId(): number; + + interface HookCallbacks { + /** + * Called when a class is constructed that has the possibility to emit an asynchronous event. + * @param asyncId a unique ID for the async resource + * @param type the type of the async resource + * @param triggerAsyncId the unique ID of the async resource in whose execution context this async resource was created + * @param resource reference to the resource representing the async operation, needs to be released during destroy + */ + init?(asyncId: number, type: string, triggerAsyncId: number, resource: Object): void; + + /** + * When an asynchronous operation is initiated or completes a callback is called to notify the user. + * The before callback is called just before said callback is executed. + * @param asyncId the unique identifier assigned to the resource about to execute the callback. + */ + before?(asyncId: number): void; + + /** + * Called immediately after the callback specified in before is completed. + * @param asyncId the unique identifier assigned to the resource which has executed the callback. + */ + after?(asyncId: number): void; + + /** + * Called when a promise has resolve() called. This may not be in the same execution id + * as the promise itself. + * @param asyncId the unique id for the promise that was resolve()d. + */ + promiseResolve?(asyncId: number): void; + + /** + * Called after the resource corresponding to asyncId is destroyed + * @param asyncId a unique ID for the async resource + */ + destroy?(asyncId: number): void; + } + + interface AsyncHook { + /** + * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop. + */ + enable(): this; + + /** + * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled. + */ + disable(): this; + } + + /** + * Registers functions to be called for different lifetime events of each async operation. + * @param options the callbacks to register + * @return an AsyncHooks instance used for disabling and enabling hooks + */ + function createHook(options: HookCallbacks): AsyncHook; + + interface AsyncResourceOptions { + /** + * The ID of the execution context that created this async event. + * Default: `executionAsyncId()` + */ + triggerAsyncId?: number; + + /** + * Disables automatic `emitDestroy` when the object is garbage collected. + * This usually does not need to be set (even if `emitDestroy` is called + * manually), unless the resource's `asyncId` is retrieved and the + * sensitive API's `emitDestroy` is called with it. + * Default: `false` + */ + requireManualDestroy?: boolean; + } + + /** + * The class AsyncResource was designed to be extended by the embedder's async resources. + * Using this users can easily trigger the lifetime events of their own resources. + */ + class AsyncResource { + /** + * AsyncResource() is meant to be extended. Instantiating a + * new AsyncResource() also triggers init. If triggerAsyncId is omitted then + * async_hook.executionAsyncId() is used. + * @param type The type of async event. + * @param triggerAsyncId The ID of the execution context that created + * this async event (default: `executionAsyncId()`), or an + * AsyncResourceOptions object (since 9.3) + */ + constructor(type: string, triggerAsyncId?: number|AsyncResourceOptions); + + /** + * Call the provided function with the provided arguments in the + * execution context of the async resource. This will establish the + * context, trigger the AsyncHooks before callbacks, call the function, + * trigger the AsyncHooks after callbacks, and then restore the original + * execution context. + * @param fn The function to call in the execution context of this + * async resource. + * @param thisArg The receiver to be used for the function call. + * @param args Optional arguments to pass to the function. + */ + runInAsyncScope(fn: (this: This, ...args: any[]) => Result, thisArg?: This, ...args: any[]): Result; + + /** + * Call AsyncHooks destroy callbacks. + */ + emitDestroy(): void; + + /** + * @return the unique ID assigned to this AsyncResource instance. + */ + asyncId(): number; + + /** + * @return the trigger ID for this AsyncResource instance. + */ + triggerAsyncId(): number; + } +} diff --git a/node_modules/@types/node/base.d.ts b/node_modules/@types/node/base.d.ts new file mode 100644 index 00000000..70983d95 --- /dev/null +++ b/node_modules/@types/node/base.d.ts @@ -0,0 +1,41 @@ +// base definnitions for all NodeJS modules that are not specific to any version of TypeScript +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// diff --git a/node_modules/@types/node/buffer.d.ts b/node_modules/@types/node/buffer.d.ts new file mode 100644 index 00000000..7eb1061b --- /dev/null +++ b/node_modules/@types/node/buffer.d.ts @@ -0,0 +1,22 @@ +declare module "buffer" { + export const INSPECT_MAX_BYTES: number; + export const kMaxLength: number; + export const kStringMaxLength: number; + export const constants: { + MAX_LENGTH: number; + MAX_STRING_LENGTH: number; + }; + const BuffType: typeof Buffer; + + export type TranscodeEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "latin1" | "binary"; + + export function transcode(source: Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer; + + export const SlowBuffer: { + /** @deprecated since v6.0.0, use Buffer.allocUnsafeSlow() */ + new(size: number): Buffer; + prototype: Buffer; + }; + + export { BuffType as Buffer }; +} diff --git a/node_modules/@types/node/child_process.d.ts b/node_modules/@types/node/child_process.d.ts new file mode 100644 index 00000000..412258d8 --- /dev/null +++ b/node_modules/@types/node/child_process.d.ts @@ -0,0 +1,370 @@ +declare module "child_process" { + import * as events from "events"; + import * as net from "net"; + import { Writable, Readable, Stream, Pipe } from "stream"; + + interface ChildProcess extends events.EventEmitter { + stdin: Writable | null; + stdout: Readable | null; + stderr: Readable | null; + readonly channel?: Pipe | null; + readonly stdio: [ + Writable | null, // stdin + Readable | null, // stdout + Readable | null, // stderr + Readable | Writable | null | undefined, // extra + Readable | Writable | null | undefined // extra + ]; + readonly killed: boolean; + readonly pid: number; + readonly connected: boolean; + kill(signal?: string): void; + send(message: any, callback?: (error: Error | null) => void): boolean; + send(message: any, sendHandle?: net.Socket | net.Server, callback?: (error: Error | null) => void): boolean; + send(message: any, sendHandle?: net.Socket | net.Server, options?: MessageOptions, callback?: (error: Error | null) => void): boolean; + disconnect(): void; + unref(): void; + ref(): void; + + /** + * events.EventEmitter + * 1. close + * 2. disconnect + * 3. error + * 4. exit + * 5. message + */ + + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: (code: number, signal: string) => void): this; + addListener(event: "disconnect", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "exit", listener: (code: number | null, signal: string | null) => void): this; + addListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close", code: number, signal: string): boolean; + emit(event: "disconnect"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "exit", code: number | null, signal: string | null): boolean; + emit(event: "message", message: any, sendHandle: net.Socket | net.Server): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: (code: number, signal: string) => void): this; + on(event: "disconnect", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "exit", listener: (code: number | null, signal: string | null) => void): this; + on(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: (code: number, signal: string) => void): this; + once(event: "disconnect", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "exit", listener: (code: number | null, signal: string | null) => void): this; + once(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: (code: number, signal: string) => void): this; + prependListener(event: "disconnect", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "exit", listener: (code: number | null, signal: string | null) => void): this; + prependListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: (code: number, signal: string) => void): this; + prependOnceListener(event: "disconnect", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "exit", listener: (code: number | null, signal: string | null) => void): this; + prependOnceListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this; + } + + // return this object when stdio option is undefined or not specified + interface ChildProcessWithoutNullStreams extends ChildProcess { + stdin: Writable; + stdout: Readable; + stderr: Readable; + readonly stdio: [ + Writable, // stdin + Readable, // stdout + Readable, // stderr + Readable | Writable | null | undefined, // extra, no modification + Readable | Writable | null | undefined // extra, no modification + ]; + } + + interface MessageOptions { + keepOpen?: boolean; + } + + type StdioOptions = "pipe" | "ignore" | "inherit" | Array<("pipe" | "ipc" | "ignore" | "inherit" | Stream | number | null | undefined)>; + + interface ProcessEnvOptions { + uid?: number; + gid?: number; + cwd?: string; + env?: NodeJS.ProcessEnv; + } + + interface CommonOptions extends ProcessEnvOptions { + /** + * @default true + */ + windowsHide?: boolean; + /** + * @default 0 + */ + timeout?: number; + } + + interface SpawnOptions extends CommonOptions { + argv0?: string; + stdio?: StdioOptions; + detached?: boolean; + shell?: boolean | string; + windowsVerbatimArguments?: boolean; + } + + interface SpawnOptionsWithoutStdio extends SpawnOptions { + stdio?: 'pipe' | Array; + } + + function spawn(command: string, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams; + function spawn(command: string, options: SpawnOptions): ChildProcess; + function spawn(command: string, args?: ReadonlyArray, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams; + function spawn(command: string, args: ReadonlyArray, options: SpawnOptions): ChildProcess; + + interface ExecOptions extends CommonOptions { + shell?: string; + maxBuffer?: number; + killSignal?: string; + } + + interface ExecOptionsWithStringEncoding extends ExecOptions { + encoding: BufferEncoding; + } + + interface ExecOptionsWithBufferEncoding extends ExecOptions { + encoding: string | null; // specify `null`. + } + + interface ExecException extends Error { + cmd?: string; + killed?: boolean; + code?: number; + signal?: string; + } + + // no `options` definitely means stdout/stderr are `string`. + function exec(command: string, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess; + + // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`. + function exec(command: string, options: { encoding: "buffer" | null } & ExecOptions, callback?: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess; + + // `options` with well known `encoding` means stdout/stderr are definitely `string`. + function exec(command: string, options: { encoding: BufferEncoding } & ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess; + + // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`. + // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`. + function exec(command: string, options: { encoding: string } & ExecOptions, callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess; + + // `options` without an `encoding` means stdout/stderr are definitely `string`. + function exec(command: string, options: ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess; + + // fallback if nothing else matches. Worst case is always `string | Buffer`. + function exec( + command: string, + options: ({ encoding?: string | null } & ExecOptions) | undefined | null, + callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void, + ): ChildProcess; + + interface PromiseWithChild extends Promise { + child: ChildProcess; + } + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace exec { + function __promisify__(command: string): PromiseWithChild<{ stdout: string, stderr: string }>; + function __promisify__(command: string, options: { encoding: "buffer" | null } & ExecOptions): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>; + function __promisify__(command: string, options: { encoding: BufferEncoding } & ExecOptions): PromiseWithChild<{ stdout: string, stderr: string }>; + function __promisify__(command: string, options: ExecOptions): PromiseWithChild<{ stdout: string, stderr: string }>; + function __promisify__(command: string, options?: ({ encoding?: string | null } & ExecOptions) | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>; + } + + interface ExecFileOptions extends CommonOptions { + maxBuffer?: number; + killSignal?: string; + windowsVerbatimArguments?: boolean; + shell?: boolean | string; + } + interface ExecFileOptionsWithStringEncoding extends ExecFileOptions { + encoding: BufferEncoding; + } + interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions { + encoding: 'buffer' | null; + } + interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions { + encoding: string; + } + + function execFile(file: string): ChildProcess; + function execFile(file: string, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): ChildProcess; + function execFile(file: string, args?: ReadonlyArray | null): ChildProcess; + function execFile(file: string, args: ReadonlyArray | undefined | null, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): ChildProcess; + + // no `options` definitely means stdout/stderr are `string`. + function execFile(file: string, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; + function execFile(file: string, args: ReadonlyArray | undefined | null, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; + + // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`. + function execFile(file: string, options: ExecFileOptionsWithBufferEncoding, callback: (error: Error | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess; + function execFile( + file: string, + args: ReadonlyArray | undefined | null, + options: ExecFileOptionsWithBufferEncoding, + callback: (error: Error | null, stdout: Buffer, stderr: Buffer) => void, + ): ChildProcess; + + // `options` with well known `encoding` means stdout/stderr are definitely `string`. + function execFile(file: string, options: ExecFileOptionsWithStringEncoding, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; + function execFile( + file: string, + args: ReadonlyArray | undefined | null, + options: ExecFileOptionsWithStringEncoding, + callback: (error: Error | null, stdout: string, stderr: string) => void, + ): ChildProcess; + + // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`. + // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`. + function execFile( + file: string, + options: ExecFileOptionsWithOtherEncoding, + callback: (error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void, + ): ChildProcess; + function execFile( + file: string, + args: ReadonlyArray | undefined | null, + options: ExecFileOptionsWithOtherEncoding, + callback: (error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void, + ): ChildProcess; + + // `options` without an `encoding` means stdout/stderr are definitely `string`. + function execFile(file: string, options: ExecFileOptions, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; + function execFile(file: string, args: ReadonlyArray | undefined | null, options: ExecFileOptions, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; + + // fallback if nothing else matches. Worst case is always `string | Buffer`. + function execFile( + file: string, + options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null, + callback: ((error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null, + ): ChildProcess; + function execFile( + file: string, + args: ReadonlyArray | undefined | null, + options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null, + callback: ((error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null, + ): ChildProcess; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace execFile { + function __promisify__(file: string): PromiseWithChild<{ stdout: string, stderr: string }>; + function __promisify__(file: string, args: string[] | undefined | null): PromiseWithChild<{ stdout: string, stderr: string }>; + function __promisify__(file: string, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>; + function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>; + function __promisify__(file: string, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>; + function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>; + function __promisify__(file: string, options: ExecFileOptionsWithOtherEncoding): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>; + function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithOtherEncoding): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>; + function __promisify__(file: string, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>; + function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>; + function __promisify__(file: string, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>; + function __promisify__( + file: string, + args: string[] | undefined | null, + options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null, + ): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>; + } + + interface ForkOptions extends ProcessEnvOptions { + execPath?: string; + execArgv?: string[]; + silent?: boolean; + stdio?: StdioOptions; + detached?: boolean; + windowsVerbatimArguments?: boolean; + } + function fork(modulePath: string, args?: ReadonlyArray, options?: ForkOptions): ChildProcess; + + interface SpawnSyncOptions extends CommonOptions { + argv0?: string; // Not specified in the docs + input?: string | NodeJS.TypedArray | DataView; + stdio?: StdioOptions; + killSignal?: string | number; + maxBuffer?: number; + encoding?: string; + shell?: boolean | string; + windowsVerbatimArguments?: boolean; + } + interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions { + encoding: BufferEncoding; + } + interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions { + encoding: string; // specify `null`. + } + interface SpawnSyncReturns { + pid: number; + output: string[]; + stdout: T; + stderr: T; + status: number | null; + signal: string | null; + error?: Error; + } + function spawnSync(command: string): SpawnSyncReturns; + function spawnSync(command: string, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; + function spawnSync(command: string, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; + function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns; + function spawnSync(command: string, args?: ReadonlyArray, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; + function spawnSync(command: string, args?: ReadonlyArray, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; + function spawnSync(command: string, args?: ReadonlyArray, options?: SpawnSyncOptions): SpawnSyncReturns; + + interface ExecSyncOptions extends CommonOptions { + input?: string | Uint8Array; + stdio?: StdioOptions; + shell?: string; + killSignal?: string | number; + maxBuffer?: number; + encoding?: string; + } + interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions { + encoding: BufferEncoding; + } + interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions { + encoding: string; // specify `null`. + } + function execSync(command: string): Buffer; + function execSync(command: string, options?: ExecSyncOptionsWithStringEncoding): string; + function execSync(command: string, options?: ExecSyncOptionsWithBufferEncoding): Buffer; + function execSync(command: string, options?: ExecSyncOptions): Buffer; + + interface ExecFileSyncOptions extends CommonOptions { + input?: string | NodeJS.TypedArray | DataView; + stdio?: StdioOptions; + killSignal?: string | number; + maxBuffer?: number; + encoding?: string; + shell?: boolean | string; + } + interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions { + encoding: BufferEncoding; + } + interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions { + encoding: string; // specify `null`. + } + function execFileSync(command: string): Buffer; + function execFileSync(command: string, options?: ExecFileSyncOptionsWithStringEncoding): string; + function execFileSync(command: string, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer; + function execFileSync(command: string, options?: ExecFileSyncOptions): Buffer; + function execFileSync(command: string, args?: ReadonlyArray, options?: ExecFileSyncOptionsWithStringEncoding): string; + function execFileSync(command: string, args?: ReadonlyArray, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer; + function execFileSync(command: string, args?: ReadonlyArray, options?: ExecFileSyncOptions): Buffer; +} diff --git a/node_modules/@types/node/cluster.d.ts b/node_modules/@types/node/cluster.d.ts new file mode 100644 index 00000000..43340ff8 --- /dev/null +++ b/node_modules/@types/node/cluster.d.ts @@ -0,0 +1,260 @@ +declare module "cluster" { + import * as child from "child_process"; + import * as events from "events"; + import * as net from "net"; + + // interfaces + interface ClusterSettings { + execArgv?: string[]; // default: process.execArgv + exec?: string; + args?: string[]; + silent?: boolean; + stdio?: any[]; + uid?: number; + gid?: number; + inspectPort?: number | (() => number); + } + + interface Address { + address: string; + port: number; + addressType: number | "udp4" | "udp6"; // 4, 6, -1, "udp4", "udp6" + } + + class Worker extends events.EventEmitter { + id: number; + process: child.ChildProcess; + send(message: any, sendHandle?: any, callback?: (error: Error | null) => void): boolean; + kill(signal?: string): void; + destroy(signal?: string): void; + disconnect(): void; + isConnected(): boolean; + isDead(): boolean; + exitedAfterDisconnect: boolean; + + /** + * events.EventEmitter + * 1. disconnect + * 2. error + * 3. exit + * 4. listening + * 5. message + * 6. online + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "disconnect", listener: () => void): this; + addListener(event: "error", listener: (error: Error) => void): this; + addListener(event: "exit", listener: (code: number, signal: string) => void): this; + addListener(event: "listening", listener: (address: Address) => void): this; + addListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + addListener(event: "online", listener: () => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "disconnect"): boolean; + emit(event: "error", error: Error): boolean; + emit(event: "exit", code: number, signal: string): boolean; + emit(event: "listening", address: Address): boolean; + emit(event: "message", message: any, handle: net.Socket | net.Server): boolean; + emit(event: "online"): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "disconnect", listener: () => void): this; + on(event: "error", listener: (error: Error) => void): this; + on(event: "exit", listener: (code: number, signal: string) => void): this; + on(event: "listening", listener: (address: Address) => void): this; + on(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + on(event: "online", listener: () => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "disconnect", listener: () => void): this; + once(event: "error", listener: (error: Error) => void): this; + once(event: "exit", listener: (code: number, signal: string) => void): this; + once(event: "listening", listener: (address: Address) => void): this; + once(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + once(event: "online", listener: () => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "disconnect", listener: () => void): this; + prependListener(event: "error", listener: (error: Error) => void): this; + prependListener(event: "exit", listener: (code: number, signal: string) => void): this; + prependListener(event: "listening", listener: (address: Address) => void): this; + prependListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + prependListener(event: "online", listener: () => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "disconnect", listener: () => void): this; + prependOnceListener(event: "error", listener: (error: Error) => void): this; + prependOnceListener(event: "exit", listener: (code: number, signal: string) => void): this; + prependOnceListener(event: "listening", listener: (address: Address) => void): this; + prependOnceListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + prependOnceListener(event: "online", listener: () => void): this; + } + + interface Cluster extends events.EventEmitter { + Worker: Worker; + disconnect(callback?: () => void): void; + fork(env?: any): Worker; + isMaster: boolean; + isWorker: boolean; + // TODO: cluster.schedulingPolicy + settings: ClusterSettings; + setupMaster(settings?: ClusterSettings): void; + worker?: Worker; + workers?: { + [index: string]: Worker | undefined + }; + + /** + * events.EventEmitter + * 1. disconnect + * 2. exit + * 3. fork + * 4. listening + * 5. message + * 6. online + * 7. setup + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "disconnect", listener: (worker: Worker) => void): this; + addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + addListener(event: "fork", listener: (worker: Worker) => void): this; + addListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; + addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + addListener(event: "online", listener: (worker: Worker) => void): this; + addListener(event: "setup", listener: (settings: ClusterSettings) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "disconnect", worker: Worker): boolean; + emit(event: "exit", worker: Worker, code: number, signal: string): boolean; + emit(event: "fork", worker: Worker): boolean; + emit(event: "listening", worker: Worker, address: Address): boolean; + emit(event: "message", worker: Worker, message: any, handle: net.Socket | net.Server): boolean; + emit(event: "online", worker: Worker): boolean; + emit(event: "setup", settings: ClusterSettings): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "disconnect", listener: (worker: Worker) => void): this; + on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + on(event: "fork", listener: (worker: Worker) => void): this; + on(event: "listening", listener: (worker: Worker, address: Address) => void): this; + on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + on(event: "online", listener: (worker: Worker) => void): this; + on(event: "setup", listener: (settings: ClusterSettings) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "disconnect", listener: (worker: Worker) => void): this; + once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + once(event: "fork", listener: (worker: Worker) => void): this; + once(event: "listening", listener: (worker: Worker, address: Address) => void): this; + once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + once(event: "online", listener: (worker: Worker) => void): this; + once(event: "setup", listener: (settings: ClusterSettings) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "disconnect", listener: (worker: Worker) => void): this; + prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + prependListener(event: "fork", listener: (worker: Worker) => void): this; + prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; + prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + prependListener(event: "online", listener: (worker: Worker) => void): this; + prependListener(event: "setup", listener: (settings: ClusterSettings) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): this; + prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + prependOnceListener(event: "fork", listener: (worker: Worker) => void): this; + prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; + // the handle is a net.Socket or net.Server object, or undefined. + prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; + prependOnceListener(event: "online", listener: (worker: Worker) => void): this; + prependOnceListener(event: "setup", listener: (settings: ClusterSettings) => void): this; + } + + function disconnect(callback?: () => void): void; + function fork(env?: any): Worker; + const isMaster: boolean; + const isWorker: boolean; + // TODO: cluster.schedulingPolicy + const settings: ClusterSettings; + function setupMaster(settings?: ClusterSettings): void; + const worker: Worker; + const workers: { + [index: string]: Worker | undefined + }; + + /** + * events.EventEmitter + * 1. disconnect + * 2. exit + * 3. fork + * 4. listening + * 5. message + * 6. online + * 7. setup + */ + function addListener(event: string, listener: (...args: any[]) => void): Cluster; + function addListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; + function addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + function addListener(event: "fork", listener: (worker: Worker) => void): Cluster; + function addListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + // the handle is a net.Socket or net.Server object, or undefined. + function addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; + function addListener(event: "online", listener: (worker: Worker) => void): Cluster; + function addListener(event: "setup", listener: (settings: ClusterSettings) => void): Cluster; + + function emit(event: string | symbol, ...args: any[]): boolean; + function emit(event: "disconnect", worker: Worker): boolean; + function emit(event: "exit", worker: Worker, code: number, signal: string): boolean; + function emit(event: "fork", worker: Worker): boolean; + function emit(event: "listening", worker: Worker, address: Address): boolean; + function emit(event: "message", worker: Worker, message: any, handle: net.Socket | net.Server): boolean; + function emit(event: "online", worker: Worker): boolean; + function emit(event: "setup", settings: ClusterSettings): boolean; + + function on(event: string, listener: (...args: any[]) => void): Cluster; + function on(event: "disconnect", listener: (worker: Worker) => void): Cluster; + function on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + function on(event: "fork", listener: (worker: Worker) => void): Cluster; + function on(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + function on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. + function on(event: "online", listener: (worker: Worker) => void): Cluster; + function on(event: "setup", listener: (settings: ClusterSettings) => void): Cluster; + + function once(event: string, listener: (...args: any[]) => void): Cluster; + function once(event: "disconnect", listener: (worker: Worker) => void): Cluster; + function once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + function once(event: "fork", listener: (worker: Worker) => void): Cluster; + function once(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + function once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. + function once(event: "online", listener: (worker: Worker) => void): Cluster; + function once(event: "setup", listener: (settings: ClusterSettings) => void): Cluster; + + function removeListener(event: string, listener: (...args: any[]) => void): Cluster; + function removeAllListeners(event?: string): Cluster; + function setMaxListeners(n: number): Cluster; + function getMaxListeners(): number; + function listeners(event: string): Function[]; + function listenerCount(type: string): number; + + function prependListener(event: string, listener: (...args: any[]) => void): Cluster; + function prependListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; + function prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + function prependListener(event: "fork", listener: (worker: Worker) => void): Cluster; + function prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + // the handle is a net.Socket or net.Server object, or undefined. + function prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; + function prependListener(event: "online", listener: (worker: Worker) => void): Cluster; + function prependListener(event: "setup", listener: (settings: ClusterSettings) => void): Cluster; + + function prependOnceListener(event: string, listener: (...args: any[]) => void): Cluster; + function prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; + function prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + function prependOnceListener(event: "fork", listener: (worker: Worker) => void): Cluster; + function prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + // the handle is a net.Socket or net.Server object, or undefined. + function prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; + function prependOnceListener(event: "online", listener: (worker: Worker) => void): Cluster; + function prependOnceListener(event: "setup", listener: (settings: ClusterSettings) => void): Cluster; + + function eventNames(): string[]; +} diff --git a/node_modules/@types/node/console.d.ts b/node_modules/@types/node/console.d.ts new file mode 100644 index 00000000..d30d13f8 --- /dev/null +++ b/node_modules/@types/node/console.d.ts @@ -0,0 +1,3 @@ +declare module "console" { + export = console; +} diff --git a/node_modules/@types/node/constants.d.ts b/node_modules/@types/node/constants.d.ts new file mode 100644 index 00000000..577860f3 --- /dev/null +++ b/node_modules/@types/node/constants.d.ts @@ -0,0 +1,278 @@ +declare module "constants" { + const E2BIG: number; + const EACCES: number; + const EADDRINUSE: number; + const EADDRNOTAVAIL: number; + const EAFNOSUPPORT: number; + const EAGAIN: number; + const EALREADY: number; + const EBADF: number; + const EBADMSG: number; + const EBUSY: number; + const ECANCELED: number; + const ECHILD: number; + const ECONNABORTED: number; + const ECONNREFUSED: number; + const ECONNRESET: number; + const EDEADLK: number; + const EDESTADDRREQ: number; + const EDOM: number; + const EEXIST: number; + const EFAULT: number; + const EFBIG: number; + const EHOSTUNREACH: number; + const EIDRM: number; + const EILSEQ: number; + const EINPROGRESS: number; + const EINTR: number; + const EINVAL: number; + const EIO: number; + const EISCONN: number; + const EISDIR: number; + const ELOOP: number; + const EMFILE: number; + const EMLINK: number; + const EMSGSIZE: number; + const ENAMETOOLONG: number; + const ENETDOWN: number; + const ENETRESET: number; + const ENETUNREACH: number; + const ENFILE: number; + const ENOBUFS: number; + const ENODATA: number; + const ENODEV: number; + const ENOENT: number; + const ENOEXEC: number; + const ENOLCK: number; + const ENOLINK: number; + const ENOMEM: number; + const ENOMSG: number; + const ENOPROTOOPT: number; + const ENOSPC: number; + const ENOSR: number; + const ENOSTR: number; + const ENOSYS: number; + const ENOTCONN: number; + const ENOTDIR: number; + const ENOTEMPTY: number; + const ENOTSOCK: number; + const ENOTSUP: number; + const ENOTTY: number; + const ENXIO: number; + const EOPNOTSUPP: number; + const EOVERFLOW: number; + const EPERM: number; + const EPIPE: number; + const EPROTO: number; + const EPROTONOSUPPORT: number; + const EPROTOTYPE: number; + const ERANGE: number; + const EROFS: number; + const ESPIPE: number; + const ESRCH: number; + const ETIME: number; + const ETIMEDOUT: number; + const ETXTBSY: number; + const EWOULDBLOCK: number; + const EXDEV: number; + const WSAEINTR: number; + const WSAEBADF: number; + const WSAEACCES: number; + const WSAEFAULT: number; + const WSAEINVAL: number; + const WSAEMFILE: number; + const WSAEWOULDBLOCK: number; + const WSAEINPROGRESS: number; + const WSAEALREADY: number; + const WSAENOTSOCK: number; + const WSAEDESTADDRREQ: number; + const WSAEMSGSIZE: number; + const WSAEPROTOTYPE: number; + const WSAENOPROTOOPT: number; + const WSAEPROTONOSUPPORT: number; + const WSAESOCKTNOSUPPORT: number; + const WSAEOPNOTSUPP: number; + const WSAEPFNOSUPPORT: number; + const WSAEAFNOSUPPORT: number; + const WSAEADDRINUSE: number; + const WSAEADDRNOTAVAIL: number; + const WSAENETDOWN: number; + const WSAENETUNREACH: number; + const WSAENETRESET: number; + const WSAECONNABORTED: number; + const WSAECONNRESET: number; + const WSAENOBUFS: number; + const WSAEISCONN: number; + const WSAENOTCONN: number; + const WSAESHUTDOWN: number; + const WSAETOOMANYREFS: number; + const WSAETIMEDOUT: number; + const WSAECONNREFUSED: number; + const WSAELOOP: number; + const WSAENAMETOOLONG: number; + const WSAEHOSTDOWN: number; + const WSAEHOSTUNREACH: number; + const WSAENOTEMPTY: number; + const WSAEPROCLIM: number; + const WSAEUSERS: number; + const WSAEDQUOT: number; + const WSAESTALE: number; + const WSAEREMOTE: number; + const WSASYSNOTREADY: number; + const WSAVERNOTSUPPORTED: number; + const WSANOTINITIALISED: number; + const WSAEDISCON: number; + const WSAENOMORE: number; + const WSAECANCELLED: number; + const WSAEINVALIDPROCTABLE: number; + const WSAEINVALIDPROVIDER: number; + const WSAEPROVIDERFAILEDINIT: number; + const WSASYSCALLFAILURE: number; + const WSASERVICE_NOT_FOUND: number; + const WSATYPE_NOT_FOUND: number; + const WSA_E_NO_MORE: number; + const WSA_E_CANCELLED: number; + const WSAEREFUSED: number; + const SIGHUP: number; + const SIGINT: number; + const SIGILL: number; + const SIGABRT: number; + const SIGFPE: number; + const SIGKILL: number; + const SIGSEGV: number; + const SIGTERM: number; + const SIGBREAK: number; + const SIGWINCH: number; + const SSL_OP_ALL: number; + const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number; + const SSL_OP_CIPHER_SERVER_PREFERENCE: number; + const SSL_OP_CISCO_ANYCONNECT: number; + const SSL_OP_COOKIE_EXCHANGE: number; + const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number; + const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number; + const SSL_OP_EPHEMERAL_RSA: number; + const SSL_OP_LEGACY_SERVER_CONNECT: number; + const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: number; + const SSL_OP_MICROSOFT_SESS_ID_BUG: number; + const SSL_OP_MSIE_SSLV2_RSA_PADDING: number; + const SSL_OP_NETSCAPE_CA_DN_BUG: number; + const SSL_OP_NETSCAPE_CHALLENGE_BUG: number; + const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: number; + const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: number; + const SSL_OP_NO_COMPRESSION: number; + const SSL_OP_NO_QUERY_MTU: number; + const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number; + const SSL_OP_NO_SSLv2: number; + const SSL_OP_NO_SSLv3: number; + const SSL_OP_NO_TICKET: number; + const SSL_OP_NO_TLSv1: number; + const SSL_OP_NO_TLSv1_1: number; + const SSL_OP_NO_TLSv1_2: number; + const SSL_OP_PKCS1_CHECK_1: number; + const SSL_OP_PKCS1_CHECK_2: number; + const SSL_OP_SINGLE_DH_USE: number; + const SSL_OP_SINGLE_ECDH_USE: number; + const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: number; + const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: number; + const SSL_OP_TLS_BLOCK_PADDING_BUG: number; + const SSL_OP_TLS_D5_BUG: number; + const SSL_OP_TLS_ROLLBACK_BUG: number; + const ENGINE_METHOD_DSA: number; + const ENGINE_METHOD_DH: number; + const ENGINE_METHOD_RAND: number; + const ENGINE_METHOD_ECDH: number; + const ENGINE_METHOD_ECDSA: number; + const ENGINE_METHOD_CIPHERS: number; + const ENGINE_METHOD_DIGESTS: number; + const ENGINE_METHOD_STORE: number; + const ENGINE_METHOD_PKEY_METHS: number; + const ENGINE_METHOD_PKEY_ASN1_METHS: number; + const ENGINE_METHOD_ALL: number; + const ENGINE_METHOD_NONE: number; + const DH_CHECK_P_NOT_SAFE_PRIME: number; + const DH_CHECK_P_NOT_PRIME: number; + const DH_UNABLE_TO_CHECK_GENERATOR: number; + const DH_NOT_SUITABLE_GENERATOR: number; + const RSA_PKCS1_PADDING: number; + const RSA_SSLV23_PADDING: number; + const RSA_NO_PADDING: number; + const RSA_PKCS1_OAEP_PADDING: number; + const RSA_X931_PADDING: number; + const RSA_PKCS1_PSS_PADDING: number; + const POINT_CONVERSION_COMPRESSED: number; + const POINT_CONVERSION_UNCOMPRESSED: number; + const POINT_CONVERSION_HYBRID: number; + const O_RDONLY: number; + const O_WRONLY: number; + const O_RDWR: number; + const S_IFMT: number; + const S_IFREG: number; + const S_IFDIR: number; + const S_IFCHR: number; + const S_IFBLK: number; + const S_IFIFO: number; + const S_IFSOCK: number; + const S_IRWXU: number; + const S_IRUSR: number; + const S_IWUSR: number; + const S_IXUSR: number; + const S_IRWXG: number; + const S_IRGRP: number; + const S_IWGRP: number; + const S_IXGRP: number; + const S_IRWXO: number; + const S_IROTH: number; + const S_IWOTH: number; + const S_IXOTH: number; + const S_IFLNK: number; + const O_CREAT: number; + const O_EXCL: number; + const O_NOCTTY: number; + const O_DIRECTORY: number; + const O_NOATIME: number; + const O_NOFOLLOW: number; + const O_SYNC: number; + const O_DSYNC: number; + const O_SYMLINK: number; + const O_DIRECT: number; + const O_NONBLOCK: number; + const O_TRUNC: number; + const O_APPEND: number; + const F_OK: number; + const R_OK: number; + const W_OK: number; + const X_OK: number; + const COPYFILE_EXCL: number; + const COPYFILE_FICLONE: number; + const COPYFILE_FICLONE_FORCE: number; + const UV_UDP_REUSEADDR: number; + const SIGQUIT: number; + const SIGTRAP: number; + const SIGIOT: number; + const SIGBUS: number; + const SIGUSR1: number; + const SIGUSR2: number; + const SIGPIPE: number; + const SIGALRM: number; + const SIGCHLD: number; + const SIGSTKFLT: number; + const SIGCONT: number; + const SIGSTOP: number; + const SIGTSTP: number; + const SIGTTIN: number; + const SIGTTOU: number; + const SIGURG: number; + const SIGXCPU: number; + const SIGXFSZ: number; + const SIGVTALRM: number; + const SIGPROF: number; + const SIGIO: number; + const SIGPOLL: number; + const SIGPWR: number; + const SIGSYS: number; + const SIGUNUSED: number; + const defaultCoreCipherList: string; + const defaultCipherList: string; + const ENGINE_METHOD_RSA: number; + const ALPN_ENABLED: number; +} diff --git a/node_modules/@types/node/crypto.d.ts b/node_modules/@types/node/crypto.d.ts new file mode 100644 index 00000000..3394d43a --- /dev/null +++ b/node_modules/@types/node/crypto.d.ts @@ -0,0 +1,602 @@ +declare module "crypto" { + import * as stream from "stream"; + + interface Certificate { + exportChallenge(spkac: BinaryLike): Buffer; + exportPublicKey(spkac: BinaryLike): Buffer; + verifySpkac(spkac: Binary): boolean; + } + const Certificate: { + new(): Certificate; + (): Certificate; + }; + + namespace constants { // https://nodejs.org/dist/latest-v10.x/docs/api/crypto.html#crypto_crypto_constants + const OPENSSL_VERSION_NUMBER: number; + + /** Applies multiple bug workarounds within OpenSSL. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html for detail. */ + const SSL_OP_ALL: number; + /** Allows legacy insecure renegotiation between OpenSSL and unpatched clients or servers. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */ + const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number; + /** Attempts to use the server's preferences instead of the client's when selecting a cipher. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */ + const SSL_OP_CIPHER_SERVER_PREFERENCE: number; + /** Instructs OpenSSL to use Cisco's "speshul" version of DTLS_BAD_VER. */ + const SSL_OP_CISCO_ANYCONNECT: number; + /** Instructs OpenSSL to turn on cookie exchange. */ + const SSL_OP_COOKIE_EXCHANGE: number; + /** Instructs OpenSSL to add server-hello extension from an early version of the cryptopro draft. */ + const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number; + /** Instructs OpenSSL to disable a SSL 3.0/TLS 1.0 vulnerability workaround added in OpenSSL 0.9.6d. */ + const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number; + /** Instructs OpenSSL to always use the tmp_rsa key when performing RSA operations. */ + const SSL_OP_EPHEMERAL_RSA: number; + /** Allows initial connection to servers that do not support RI. */ + const SSL_OP_LEGACY_SERVER_CONNECT: number; + const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: number; + const SSL_OP_MICROSOFT_SESS_ID_BUG: number; + /** Instructs OpenSSL to disable the workaround for a man-in-the-middle protocol-version vulnerability in the SSL 2.0 server implementation. */ + const SSL_OP_MSIE_SSLV2_RSA_PADDING: number; + const SSL_OP_NETSCAPE_CA_DN_BUG: number; + const SSL_OP_NETSCAPE_CHALLENGE_BUG: number; + const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: number; + const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: number; + /** Instructs OpenSSL to disable support for SSL/TLS compression. */ + const SSL_OP_NO_COMPRESSION: number; + const SSL_OP_NO_QUERY_MTU: number; + /** Instructs OpenSSL to always start a new session when performing renegotiation. */ + const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number; + const SSL_OP_NO_SSLv2: number; + const SSL_OP_NO_SSLv3: number; + const SSL_OP_NO_TICKET: number; + const SSL_OP_NO_TLSv1: number; + const SSL_OP_NO_TLSv1_1: number; + const SSL_OP_NO_TLSv1_2: number; + const SSL_OP_PKCS1_CHECK_1: number; + const SSL_OP_PKCS1_CHECK_2: number; + /** Instructs OpenSSL to always create a new key when using temporary/ephemeral DH parameters. */ + const SSL_OP_SINGLE_DH_USE: number; + /** Instructs OpenSSL to always create a new key when using temporary/ephemeral ECDH parameters. */ + const SSL_OP_SINGLE_ECDH_USE: number; + const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: number; + const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: number; + const SSL_OP_TLS_BLOCK_PADDING_BUG: number; + const SSL_OP_TLS_D5_BUG: number; + /** Instructs OpenSSL to disable version rollback attack detection. */ + const SSL_OP_TLS_ROLLBACK_BUG: number; + + const ENGINE_METHOD_RSA: number; + const ENGINE_METHOD_DSA: number; + const ENGINE_METHOD_DH: number; + const ENGINE_METHOD_RAND: number; + const ENGINE_METHOD_EC: number; + const ENGINE_METHOD_CIPHERS: number; + const ENGINE_METHOD_DIGESTS: number; + const ENGINE_METHOD_PKEY_METHS: number; + const ENGINE_METHOD_PKEY_ASN1_METHS: number; + const ENGINE_METHOD_ALL: number; + const ENGINE_METHOD_NONE: number; + + const DH_CHECK_P_NOT_SAFE_PRIME: number; + const DH_CHECK_P_NOT_PRIME: number; + const DH_UNABLE_TO_CHECK_GENERATOR: number; + const DH_NOT_SUITABLE_GENERATOR: number; + + const ALPN_ENABLED: number; + + const RSA_PKCS1_PADDING: number; + const RSA_SSLV23_PADDING: number; + const RSA_NO_PADDING: number; + const RSA_PKCS1_OAEP_PADDING: number; + const RSA_X931_PADDING: number; + const RSA_PKCS1_PSS_PADDING: number; + /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the digest size when signing or verifying. */ + const RSA_PSS_SALTLEN_DIGEST: number; + /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the maximum permissible value when signing data. */ + const RSA_PSS_SALTLEN_MAX_SIGN: number; + /** Causes the salt length for RSA_PKCS1_PSS_PADDING to be determined automatically when verifying a signature. */ + const RSA_PSS_SALTLEN_AUTO: number; + + const POINT_CONVERSION_COMPRESSED: number; + const POINT_CONVERSION_UNCOMPRESSED: number; + const POINT_CONVERSION_HYBRID: number; + + /** Specifies the built-in default cipher list used by Node.js (colon-separated values). */ + const defaultCoreCipherList: string; + /** Specifies the active default cipher list used by the current Node.js process (colon-separated values). */ + const defaultCipherList: string; + } + + /** @deprecated since v10.0.0 */ + const fips: boolean; + + function createHash(algorithm: string, options?: stream.TransformOptions): Hash; + function createHmac(algorithm: string, key: BinaryLike, options?: stream.TransformOptions): Hmac; + + type Utf8AsciiLatin1Encoding = "utf8" | "ascii" | "latin1"; + type HexBase64Latin1Encoding = "latin1" | "hex" | "base64"; + type Utf8AsciiBinaryEncoding = "utf8" | "ascii" | "binary"; + type HexBase64BinaryEncoding = "binary" | "base64" | "hex"; + type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid"; + + class Hash extends stream.Duplex { + private constructor(); + update(data: BinaryLike): Hash; + update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Hash; + digest(): Buffer; + digest(encoding: HexBase64Latin1Encoding): string; + } + class Hmac extends stream.Duplex { + private constructor(); + update(data: BinaryLike): Hmac; + update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Hmac; + digest(): Buffer; + digest(encoding: HexBase64Latin1Encoding): string; + } + + export type KeyObjectType = 'secret' | 'public' | 'private'; + + interface KeyExportOptions { + type: 'pkcs1' | 'spki' | 'pkcs8' | 'sec1'; + format: T; + cipher?: string; + passphrase?: string | Buffer; + } + + class KeyObject { + private constructor(); + asymmetricKeyType?: KeyType; + /** + * For asymmetric keys, this property represents the size of the embedded key in + * bytes. This property is `undefined` for symmetric keys. + */ + asymmetricKeySize?: number; + export(options: KeyExportOptions<'pem'>): string | Buffer; + export(options?: KeyExportOptions<'der'>): Buffer; + symmetricSize?: number; + type: KeyObjectType; + } + + type CipherCCMTypes = 'aes-128-ccm' | 'aes-192-ccm' | 'aes-256-ccm'; + type CipherGCMTypes = 'aes-128-gcm' | 'aes-192-gcm' | 'aes-256-gcm'; + + type Binary = NodeJS.TypedArray | DataView; + type BinaryLike = string | Binary; + + type CipherKey = BinaryLike | KeyObject; + + interface CipherCCMOptions extends stream.TransformOptions { + authTagLength: number; + } + interface CipherGCMOptions extends stream.TransformOptions { + authTagLength?: number; + } + /** @deprecated since v10.0.0 use createCipheriv() */ + function createCipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): CipherCCM; + /** @deprecated since v10.0.0 use createCipheriv() */ + function createCipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): CipherGCM; + /** @deprecated since v10.0.0 use createCipheriv() */ + function createCipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Cipher; + + function createCipheriv( + algorithm: CipherCCMTypes, + key: CipherKey, + iv: BinaryLike | null, + options: CipherCCMOptions + ): CipherCCM; + function createCipheriv( + algorithm: CipherGCMTypes, + key: CipherKey, + iv: BinaryLike | null, + options?: CipherGCMOptions + ): CipherGCM; + function createCipheriv( + algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions + ): Cipher; + + class Cipher extends stream.Duplex { + private constructor(); + update(data: BinaryLike): Buffer; + update(data: string, input_encoding: Utf8AsciiBinaryEncoding): Buffer; + update(data: Binary, input_encoding: undefined, output_encoding: HexBase64BinaryEncoding): string; + update(data: string, input_encoding: Utf8AsciiBinaryEncoding | undefined, output_encoding: HexBase64BinaryEncoding): string; + final(): Buffer; + final(output_encoding: string): string; + setAutoPadding(auto_padding?: boolean): this; + // getAuthTag(): Buffer; + // setAAD(buffer: Buffer): this; // docs only say buffer + } + interface CipherCCM extends Cipher { + setAAD(buffer: Buffer, options: { plaintextLength: number }): this; + getAuthTag(): Buffer; + } + interface CipherGCM extends Cipher { + setAAD(buffer: Buffer, options?: { plaintextLength: number }): this; + getAuthTag(): Buffer; + } + /** @deprecated since v10.0.0 use createCipheriv() */ + function createDecipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): DecipherCCM; + /** @deprecated since v10.0.0 use createCipheriv() */ + function createDecipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): DecipherGCM; + /** @deprecated since v10.0.0 use createCipheriv() */ + function createDecipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Decipher; + + function createDecipheriv( + algorithm: CipherCCMTypes, + key: BinaryLike, + iv: BinaryLike | null, + options: CipherCCMOptions, + ): DecipherCCM; + function createDecipheriv( + algorithm: CipherGCMTypes, + key: BinaryLike, + iv: BinaryLike | null, + options?: CipherGCMOptions, + ): DecipherGCM; + function createDecipheriv(algorithm: string, key: BinaryLike, iv: BinaryLike | null, options?: stream.TransformOptions): Decipher; + + class Decipher extends stream.Duplex { + private constructor(); + update(data: Binary): Buffer; + update(data: string, input_encoding: HexBase64BinaryEncoding): Buffer; + update(data: Binary, input_encoding: undefined, output_encoding: Utf8AsciiBinaryEncoding): string; + update(data: string, input_encoding: HexBase64BinaryEncoding | undefined, output_encoding: Utf8AsciiBinaryEncoding): string; + final(): Buffer; + final(output_encoding: string): string; + setAutoPadding(auto_padding?: boolean): this; + // setAuthTag(tag: Binary): this; + // setAAD(buffer: Binary): this; + } + interface DecipherCCM extends Decipher { + setAuthTag(buffer: Binary): this; + setAAD(buffer: Binary, options: { plaintextLength: number }): this; + } + interface DecipherGCM extends Decipher { + setAuthTag(buffer: Binary): this; + setAAD(buffer: Binary, options?: { plaintextLength: number }): this; + } + + interface PrivateKeyInput { + key: string | Buffer; + format?: KeyFormat; + type?: 'pkcs1' | 'pkcs8' | 'sec1'; + passphrase?: string | Buffer; + } + + interface PublicKeyInput { + key: string | Buffer; + format?: KeyFormat; + type?: 'pkcs1' | 'spki'; + } + + function createPrivateKey(key: PrivateKeyInput | string | Buffer): KeyObject; + function createPublicKey(key: PublicKeyInput | string | Buffer | KeyObject): KeyObject; + function createSecretKey(key: Buffer): KeyObject; + + function createSign(algorithm: string, options?: stream.WritableOptions): Signer; + + interface SigningOptions { + /** + * @See crypto.constants.RSA_PKCS1_PADDING + */ + padding?: number; + saltLength?: number; + } + + interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions { + } + + type KeyLike = string | Buffer | KeyObject; + + class Signer extends stream.Writable { + private constructor(); + + update(data: BinaryLike): Signer; + update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Signer; + sign(private_key: SignPrivateKeyInput | KeyLike): Buffer; + sign(private_key: SignPrivateKeyInput | KeyLike, output_format: HexBase64Latin1Encoding): string; + } + + function createVerify(algorithm: string, options?: stream.WritableOptions): Verify; + class Verify extends stream.Writable { + private constructor(); + + update(data: BinaryLike): Verify; + update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Verify; + verify(object: Object | KeyLike, signature: Binary): boolean; + verify(object: Object | KeyLike, signature: string, signature_format?: HexBase64Latin1Encoding): boolean; + // https://nodejs.org/api/crypto.html#crypto_verifier_verify_object_signature_signature_format + // The signature field accepts a TypedArray type, but it is only available starting ES2017 + } + function createDiffieHellman(prime_length: number, generator?: number | Binary): DiffieHellman; + function createDiffieHellman(prime: Binary): DiffieHellman; + function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding): DiffieHellman; + function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: number | Binary): DiffieHellman; + function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: string, generator_encoding: HexBase64Latin1Encoding): DiffieHellman; + class DiffieHellman { + private constructor(); + generateKeys(): Buffer; + generateKeys(encoding: HexBase64Latin1Encoding): string; + computeSecret(other_public_key: Binary): Buffer; + computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer; + computeSecret(other_public_key: Binary, output_encoding: HexBase64Latin1Encoding): string; + computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding, output_encoding: HexBase64Latin1Encoding): string; + getPrime(): Buffer; + getPrime(encoding: HexBase64Latin1Encoding): string; + getGenerator(): Buffer; + getGenerator(encoding: HexBase64Latin1Encoding): string; + getPublicKey(): Buffer; + getPublicKey(encoding: HexBase64Latin1Encoding): string; + getPrivateKey(): Buffer; + getPrivateKey(encoding: HexBase64Latin1Encoding): string; + setPublicKey(public_key: Binary): void; + setPublicKey(public_key: string, encoding: string): void; + setPrivateKey(private_key: Binary): void; + setPrivateKey(private_key: string, encoding: string): void; + verifyError: number; + } + function getDiffieHellman(group_name: string): DiffieHellman; + function pbkdf2( + password: BinaryLike, + salt: BinaryLike, + iterations: number, + keylen: number, + digest: string, + callback: (err: Error | null, derivedKey: Buffer) => any, + ): void; + function pbkdf2Sync(password: BinaryLike, salt: BinaryLike, iterations: number, keylen: number, digest: string): Buffer; + + function randomBytes(size: number): Buffer; + function randomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void; + function pseudoRandomBytes(size: number): Buffer; + function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void; + + function randomFillSync(buffer: T, offset?: number, size?: number): T; + function randomFill(buffer: T, callback: (err: Error | null, buf: T) => void): void; + function randomFill(buffer: T, offset: number, callback: (err: Error | null, buf: T) => void): void; + function randomFill(buffer: T, offset: number, size: number, callback: (err: Error | null, buf: T) => void): void; + + interface ScryptOptions { + N?: number; + r?: number; + p?: number; + maxmem?: number; + } + function scrypt( + password: BinaryLike, + salt: BinaryLike, + keylen: number, callback: (err: Error | null, derivedKey: Buffer) => void, + ): void; + function scrypt( + password: BinaryLike, + salt: BinaryLike, + keylen: number, + options: ScryptOptions, + callback: (err: Error | null, derivedKey: Buffer) => void, + ): void; + function scryptSync(password: BinaryLike, salt: BinaryLike, keylen: number, options?: ScryptOptions): Buffer; + + interface RsaPublicKey { + key: KeyLike; + padding?: number; + } + interface RsaPrivateKey { + key: KeyLike; + passphrase?: string; + padding?: number; + } + function publicEncrypt(public_key: RsaPublicKey | KeyLike, buffer: Binary): Buffer; + function privateDecrypt(private_key: RsaPrivateKey | KeyLike, buffer: Binary): Buffer; + function privateEncrypt(private_key: RsaPrivateKey | KeyLike, buffer: Binary): Buffer; + function publicDecrypt(public_key: RsaPublicKey | KeyLike, buffer: Binary): Buffer; + function getCiphers(): string[]; + function getCurves(): string[]; + function getHashes(): string[]; + class ECDH { + private constructor(); + static convertKey( + key: BinaryLike, + curve: string, + inputEncoding?: HexBase64Latin1Encoding, + outputEncoding?: "latin1" | "hex" | "base64", + format?: "uncompressed" | "compressed" | "hybrid", + ): Buffer | string; + generateKeys(): Buffer; + generateKeys(encoding: HexBase64Latin1Encoding, format?: ECDHKeyFormat): string; + computeSecret(other_public_key: Binary): Buffer; + computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer; + computeSecret(other_public_key: Binary, output_encoding: HexBase64Latin1Encoding): string; + computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding, output_encoding: HexBase64Latin1Encoding): string; + getPrivateKey(): Buffer; + getPrivateKey(encoding: HexBase64Latin1Encoding): string; + getPublicKey(): Buffer; + getPublicKey(encoding: HexBase64Latin1Encoding, format?: ECDHKeyFormat): string; + setPrivateKey(private_key: Binary): void; + setPrivateKey(private_key: string, encoding: HexBase64Latin1Encoding): void; + } + function createECDH(curve_name: string): ECDH; + function timingSafeEqual(a: Binary, b: Binary): boolean; + /** @deprecated since v10.0.0 */ + const DEFAULT_ENCODING: string; + + export type KeyType = 'rsa' | 'dsa' | 'ec'; + export type KeyFormat = 'pem' | 'der'; + + interface BasePrivateKeyEncodingOptions { + format: T; + cipher?: string; + passphrase?: string; + } + + interface KeyPairKeyObjectResult { + publicKey: KeyObject; + privateKey: KeyObject; + } + + interface ECKeyPairKeyObjectOptions { + /** + * Name of the curve to use. + */ + namedCurve: string; + } + + interface RSAKeyPairKeyObjectOptions { + /** + * Key size in bits + */ + modulusLength: number; + + /** + * @default 0x10001 + */ + publicExponent?: number; + } + + interface DSAKeyPairKeyObjectOptions { + /** + * Key size in bits + */ + modulusLength: number; + + /** + * Size of q in bits + */ + divisorLength: number; + } + + interface RSAKeyPairOptions { + /** + * Key size in bits + */ + modulusLength: number; + /** + * @default 0x10001 + */ + publicExponent?: number; + + publicKeyEncoding: { + type: 'pkcs1' | 'spki'; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: 'pkcs1' | 'pkcs8'; + }; + } + + interface DSAKeyPairOptions { + /** + * Key size in bits + */ + modulusLength: number; + /** + * Size of q in bits + */ + divisorLength: number; + + publicKeyEncoding: { + type: 'spki'; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: 'pkcs8'; + }; + } + + interface ECKeyPairOptions { + /** + * Name of the curve to use. + */ + namedCurve: string; + + publicKeyEncoding: { + type: 'pkcs1' | 'spki'; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: 'sec1' | 'pkcs8'; + }; + } + + interface KeyPairSyncResult { + publicKey: T1; + privateKey: T2; + } + + function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa', options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult; + + function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'dsa', options: DSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult; + + function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ec', options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult; + + function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; + function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; + function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'rsa', options: RSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; + + function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; + function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; + function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'dsa', options: DSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; + + function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; + function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; + function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'ec', options: ECKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; + + namespace generateKeyPair { + function __promisify__(type: "rsa", options: RSAKeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>; + function __promisify__(type: "rsa", options: RSAKeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>; + function __promisify__(type: "rsa", options: RSAKeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>; + function __promisify__(type: "rsa", options: RSAKeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>; + function __promisify__(type: "rsa", options: RSAKeyPairKeyObjectOptions): Promise; + + function __promisify__(type: "dsa", options: DSAKeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>; + function __promisify__(type: "dsa", options: DSAKeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>; + function __promisify__(type: "dsa", options: DSAKeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>; + function __promisify__(type: "dsa", options: DSAKeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>; + function __promisify__(type: "dsa", options: DSAKeyPairKeyObjectOptions): Promise; + + function __promisify__(type: "ec", options: ECKeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>; + function __promisify__(type: "ec", options: ECKeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>; + function __promisify__(type: "ec", options: ECKeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>; + function __promisify__(type: "ec", options: ECKeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>; + function __promisify__(type: "ec", options: ECKeyPairKeyObjectOptions): Promise; + } + + /** + * Calculates and returns the signature for `data` using the given private key and + * algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is + * dependent upon the key type (especially Ed25519 and Ed448). + * + * If `key` is not a [`KeyObject`][], this function behaves as if `key` had been + * passed to [`crypto.createPrivateKey()`][]. + */ + function sign(algorithm: string | null | undefined, data: Binary, key: KeyLike | SignPrivateKeyInput): Buffer; + + interface VerifyKeyWithOptions extends KeyObject, SigningOptions { + } + + /** + * Calculates and returns the signature for `data` using the given private key and + * algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is + * dependent upon the key type (especially Ed25519 and Ed448). + * + * If `key` is not a [`KeyObject`][], this function behaves as if `key` had been + * passed to [`crypto.createPublicKey()`][]. + */ + function verify(algorithm: string | null | undefined, data: Binary, key: KeyLike | VerifyKeyWithOptions, signature: Binary): Buffer; +} diff --git a/node_modules/@types/node/dgram.d.ts b/node_modules/@types/node/dgram.d.ts new file mode 100644 index 00000000..c42acdfa --- /dev/null +++ b/node_modules/@types/node/dgram.d.ts @@ -0,0 +1,102 @@ +declare module "dgram" { + import { AddressInfo } from "net"; + import * as dns from "dns"; + import * as events from "events"; + + interface RemoteInfo { + address: string; + family: 'IPv4' | 'IPv6'; + port: number; + size: number; + } + + interface BindOptions { + port: number; + address?: string; + exclusive?: boolean; + } + + type SocketType = "udp4" | "udp6"; + + interface SocketOptions { + type: SocketType; + reuseAddr?: boolean; + /** + * @default false + */ + ipv6Only?: boolean; + recvBufferSize?: number; + sendBufferSize?: number; + lookup?: (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void; + } + + function createSocket(type: SocketType, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; + function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; + + class Socket extends events.EventEmitter { + send(msg: string | Uint8Array | any[], port: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void; + send(msg: string | Uint8Array, offset: number, length: number, port: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void; + bind(port?: number, address?: string, callback?: () => void): void; + bind(port?: number, callback?: () => void): void; + bind(callback?: () => void): void; + bind(options: BindOptions, callback?: () => void): void; + close(callback?: () => void): void; + address(): AddressInfo | string; + setBroadcast(flag: boolean): void; + setTTL(ttl: number): void; + setMulticastTTL(ttl: number): void; + setMulticastInterface(multicastInterface: string): void; + setMulticastLoopback(flag: boolean): void; + addMembership(multicastAddress: string, multicastInterface?: string): void; + dropMembership(multicastAddress: string, multicastInterface?: string): void; + ref(): this; + unref(): this; + setRecvBufferSize(size: number): void; + setSendBufferSize(size: number): void; + getRecvBufferSize(): number; + getSendBufferSize(): number; + + /** + * events.EventEmitter + * 1. close + * 2. error + * 3. listening + * 4. message + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "listening", listener: () => void): this; + addListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "listening"): boolean; + emit(event: "message", msg: Buffer, rinfo: RemoteInfo): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "listening", listener: () => void): this; + on(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "listening", listener: () => void): this; + once(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "listening", listener: () => void): this; + prependListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "listening", listener: () => void): this; + prependOnceListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; + } +} diff --git a/node_modules/@types/node/dns.d.ts b/node_modules/@types/node/dns.d.ts new file mode 100644 index 00000000..879d6905 --- /dev/null +++ b/node_modules/@types/node/dns.d.ts @@ -0,0 +1,366 @@ +declare module "dns" { + // Supported getaddrinfo flags. + const ADDRCONFIG: number; + const V4MAPPED: number; + + interface LookupOptions { + family?: number; + hints?: number; + all?: boolean; + verbatim?: boolean; + } + + interface LookupOneOptions extends LookupOptions { + all?: false; + } + + interface LookupAllOptions extends LookupOptions { + all: true; + } + + interface LookupAddress { + address: string; + family: number; + } + + function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void; + function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void; + function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void): void; + function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void): void; + function lookup(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace lookup { + function __promisify__(hostname: string, options: LookupAllOptions): Promise<{ address: LookupAddress[] }>; + function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<{ address: string, family: number }>; + function __promisify__(hostname: string, options?: LookupOptions | number): Promise<{ address: string | LookupAddress[], family?: number }>; + } + + function lookupService(address: string, port: number, callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void): void; + + namespace lookupService { + function __promisify__(address: string, port: number): Promise<{ hostname: string, service: string }>; + } + + interface ResolveOptions { + ttl: boolean; + } + + interface ResolveWithTtlOptions extends ResolveOptions { + ttl: true; + } + + interface RecordWithTtl { + address: string; + ttl: number; + } + + /** @deprecated Use AnyARecord or AnyAaaaRecord instead. */ + type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord; + + interface AnyARecord extends RecordWithTtl { + type: "A"; + } + + interface AnyAaaaRecord extends RecordWithTtl { + type: "AAAA"; + } + + interface MxRecord { + priority: number; + exchange: string; + } + + interface AnyMxRecord extends MxRecord { + type: "MX"; + } + + interface NaptrRecord { + flags: string; + service: string; + regexp: string; + replacement: string; + order: number; + preference: number; + } + + interface AnyNaptrRecord extends NaptrRecord { + type: "NAPTR"; + } + + interface SoaRecord { + nsname: string; + hostmaster: string; + serial: number; + refresh: number; + retry: number; + expire: number; + minttl: number; + } + + interface AnySoaRecord extends SoaRecord { + type: "SOA"; + } + + interface SrvRecord { + priority: number; + weight: number; + port: number; + name: string; + } + + interface AnySrvRecord extends SrvRecord { + type: "SRV"; + } + + interface AnyTxtRecord { + type: "TXT"; + entries: string[]; + } + + interface AnyNsRecord { + type: "NS"; + value: string; + } + + interface AnyPtrRecord { + type: "PTR"; + value: string; + } + + interface AnyCnameRecord { + type: "CNAME"; + value: string; + } + + type AnyRecord = AnyARecord | + AnyAaaaRecord | + AnyCnameRecord | + AnyMxRecord | + AnyNaptrRecord | + AnyNsRecord | + AnyPtrRecord | + AnySoaRecord | + AnySrvRecord | + AnyTxtRecord; + + function resolve(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + function resolve(hostname: string, rrtype: "A", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + function resolve(hostname: string, rrtype: "AAAA", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + function resolve(hostname: string, rrtype: "ANY", callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void; + function resolve(hostname: string, rrtype: "CNAME", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + function resolve(hostname: string, rrtype: "MX", callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void; + function resolve(hostname: string, rrtype: "NAPTR", callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void; + function resolve(hostname: string, rrtype: "NS", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + function resolve(hostname: string, rrtype: "PTR", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + function resolve(hostname: string, rrtype: "SOA", callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void): void; + function resolve(hostname: string, rrtype: "SRV", callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void; + function resolve(hostname: string, rrtype: "TXT", callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void; + function resolve( + hostname: string, + rrtype: string, + callback: (err: NodeJS.ErrnoException | null, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]) => void, + ): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace resolve { + function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise; + function __promisify__(hostname: string, rrtype: "ANY"): Promise; + function __promisify__(hostname: string, rrtype: "MX"): Promise; + function __promisify__(hostname: string, rrtype: "NAPTR"): Promise; + function __promisify__(hostname: string, rrtype: "SOA"): Promise; + function __promisify__(hostname: string, rrtype: "SRV"): Promise; + function __promisify__(hostname: string, rrtype: "TXT"): Promise; + function __promisify__(hostname: string, rrtype: string): Promise; + } + + function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + function resolve4(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void; + function resolve4(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace resolve4 { + function __promisify__(hostname: string): Promise; + function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; + function __promisify__(hostname: string, options?: ResolveOptions): Promise; + } + + function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + function resolve6(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void; + function resolve6(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace resolve6 { + function __promisify__(hostname: string): Promise; + function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; + function __promisify__(hostname: string, options?: ResolveOptions): Promise; + } + + function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + namespace resolveCname { + function __promisify__(hostname: string): Promise; + } + + function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void; + namespace resolveMx { + function __promisify__(hostname: string): Promise; + } + + function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void; + namespace resolveNaptr { + function __promisify__(hostname: string): Promise; + } + + function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + namespace resolveNs { + function __promisify__(hostname: string): Promise; + } + + function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + namespace resolvePtr { + function __promisify__(hostname: string): Promise; + } + + function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void): void; + namespace resolveSoa { + function __promisify__(hostname: string): Promise; + } + + function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void; + namespace resolveSrv { + function __promisify__(hostname: string): Promise; + } + + function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void; + namespace resolveTxt { + function __promisify__(hostname: string): Promise; + } + + function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void; + namespace resolveAny { + function __promisify__(hostname: string): Promise; + } + + function reverse(ip: string, callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void): void; + function setServers(servers: ReadonlyArray): void; + function getServers(): string[]; + + // Error codes + const NODATA: string; + const FORMERR: string; + const SERVFAIL: string; + const NOTFOUND: string; + const NOTIMP: string; + const REFUSED: string; + const BADQUERY: string; + const BADNAME: string; + const BADFAMILY: string; + const BADRESP: string; + const CONNREFUSED: string; + const TIMEOUT: string; + const EOF: string; + const FILE: string; + const NOMEM: string; + const DESTRUCTION: string; + const BADSTR: string; + const BADFLAGS: string; + const NONAME: string; + const BADHINTS: string; + const NOTINITIALIZED: string; + const LOADIPHLPAPI: string; + const ADDRGETNETWORKPARAMS: string; + const CANCELLED: string; + + class Resolver { + getServers: typeof getServers; + setServers: typeof setServers; + resolve: typeof resolve; + resolve4: typeof resolve4; + resolve6: typeof resolve6; + resolveAny: typeof resolveAny; + resolveCname: typeof resolveCname; + resolveMx: typeof resolveMx; + resolveNaptr: typeof resolveNaptr; + resolveNs: typeof resolveNs; + resolvePtr: typeof resolvePtr; + resolveSoa: typeof resolveSoa; + resolveSrv: typeof resolveSrv; + resolveTxt: typeof resolveTxt; + reverse: typeof reverse; + cancel(): void; + } + + namespace promises { + function getServers(): string[]; + + function lookup(hostname: string, family: number): Promise; + function lookup(hostname: string, options: LookupOneOptions): Promise; + function lookup(hostname: string, options: LookupAllOptions): Promise; + function lookup(hostname: string, options: LookupOptions): Promise; + function lookup(hostname: string): Promise; + + function lookupService(address: string, port: number): Promise<{ hostname: string, service: string }>; + + function resolve(hostname: string): Promise; + function resolve(hostname: string, rrtype: "A"): Promise; + function resolve(hostname: string, rrtype: "AAAA"): Promise; + function resolve(hostname: string, rrtype: "ANY"): Promise; + function resolve(hostname: string, rrtype: "CNAME"): Promise; + function resolve(hostname: string, rrtype: "MX"): Promise; + function resolve(hostname: string, rrtype: "NAPTR"): Promise; + function resolve(hostname: string, rrtype: "NS"): Promise; + function resolve(hostname: string, rrtype: "PTR"): Promise; + function resolve(hostname: string, rrtype: "SOA"): Promise; + function resolve(hostname: string, rrtype: "SRV"): Promise; + function resolve(hostname: string, rrtype: "TXT"): Promise; + function resolve(hostname: string, rrtype: string): Promise; + + function resolve4(hostname: string): Promise; + function resolve4(hostname: string, options: ResolveWithTtlOptions): Promise; + function resolve4(hostname: string, options: ResolveOptions): Promise; + + function resolve6(hostname: string): Promise; + function resolve6(hostname: string, options: ResolveWithTtlOptions): Promise; + function resolve6(hostname: string, options: ResolveOptions): Promise; + + function resolveAny(hostname: string): Promise; + + function resolveCname(hostname: string): Promise; + + function resolveMx(hostname: string): Promise; + + function resolveNaptr(hostname: string): Promise; + + function resolveNs(hostname: string): Promise; + + function resolvePtr(hostname: string): Promise; + + function resolveSoa(hostname: string): Promise; + + function resolveSrv(hostname: string): Promise; + + function resolveTxt(hostname: string): Promise; + + function reverse(ip: string): Promise; + + function setServers(servers: ReadonlyArray): void; + + class Resolver { + getServers: typeof getServers; + resolve: typeof resolve; + resolve4: typeof resolve4; + resolve6: typeof resolve6; + resolveAny: typeof resolveAny; + resolveCname: typeof resolveCname; + resolveMx: typeof resolveMx; + resolveNaptr: typeof resolveNaptr; + resolveNs: typeof resolveNs; + resolvePtr: typeof resolvePtr; + resolveSoa: typeof resolveSoa; + resolveSrv: typeof resolveSrv; + resolveTxt: typeof resolveTxt; + reverse: typeof reverse; + setServers: typeof setServers; + } + } +} diff --git a/node_modules/@types/node/domain.d.ts b/node_modules/@types/node/domain.d.ts new file mode 100644 index 00000000..45e388c4 --- /dev/null +++ b/node_modules/@types/node/domain.d.ts @@ -0,0 +1,16 @@ +declare module "domain" { + import * as events from "events"; + + class Domain extends events.EventEmitter implements NodeJS.Domain { + run(fn: (...args: any[]) => T, ...args: any[]): T; + add(emitter: events.EventEmitter | NodeJS.Timer): void; + remove(emitter: events.EventEmitter | NodeJS.Timer): void; + bind(cb: T): T; + intercept(cb: T): T; + members: Array; + enter(): void; + exit(): void; + } + + function create(): Domain; +} diff --git a/node_modules/@types/node/events.d.ts b/node_modules/@types/node/events.d.ts new file mode 100644 index 00000000..f8610210 --- /dev/null +++ b/node_modules/@types/node/events.d.ts @@ -0,0 +1,30 @@ +declare module "events" { + class internal extends NodeJS.EventEmitter { } + + namespace internal { + function once(emitter: EventEmitter, event: string | symbol): Promise; + class EventEmitter extends internal { + /** @deprecated since v4.0.0 */ + static listenerCount(emitter: EventEmitter, event: string | symbol): number; + static defaultMaxListeners: number; + + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + off(event: string | symbol, listener: (...args: any[]) => void): this; + removeAllListeners(event?: string | symbol): this; + setMaxListeners(n: number): this; + getMaxListeners(): number; + listeners(event: string | symbol): Function[]; + rawListeners(event: string | symbol): Function[]; + emit(event: string | symbol, ...args: any[]): boolean; + eventNames(): Array; + listenerCount(type: string | symbol): number; + } + } + + export = internal; +} diff --git a/node_modules/@types/node/fs.d.ts b/node_modules/@types/node/fs.d.ts new file mode 100644 index 00000000..bc015cec --- /dev/null +++ b/node_modules/@types/node/fs.d.ts @@ -0,0 +1,2297 @@ +declare module "fs" { + import * as stream from "stream"; + import * as events from "events"; + import { URL } from "url"; + + /** + * Valid types for path values in "fs". + */ + type PathLike = string | Buffer | URL; + + type BinaryData = DataView | NodeJS.TypedArray; + class Stats { + isFile(): boolean; + isDirectory(): boolean; + isBlockDevice(): boolean; + isCharacterDevice(): boolean; + isSymbolicLink(): boolean; + isFIFO(): boolean; + isSocket(): boolean; + dev: number; + ino: number; + mode: number; + nlink: number; + uid: number; + gid: number; + rdev: number; + size: number; + blksize: number; + blocks: number; + atimeMs: number; + mtimeMs: number; + ctimeMs: number; + birthtimeMs: number; + atime: Date; + mtime: Date; + ctime: Date; + birthtime: Date; + } + + class Dirent { + isFile(): boolean; + isDirectory(): boolean; + isBlockDevice(): boolean; + isCharacterDevice(): boolean; + isSymbolicLink(): boolean; + isFIFO(): boolean; + isSocket(): boolean; + name: string; + } + + interface FSWatcher extends events.EventEmitter { + close(): void; + + /** + * events.EventEmitter + * 1. change + * 2. error + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + addListener(event: "error", listener: (error: Error) => void): this; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + on(event: "error", listener: (error: Error) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + once(event: "error", listener: (error: Error) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + prependListener(event: "error", listener: (error: Error) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + prependOnceListener(event: "error", listener: (error: Error) => void): this; + } + + class ReadStream extends stream.Readable { + close(): void; + bytesRead: number; + path: string | Buffer; + + /** + * events.EventEmitter + * 1. open + * 2. close + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "open", listener: (fd: number) => void): this; + addListener(event: "close", listener: () => void): this; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "open", listener: (fd: number) => void): this; + on(event: "close", listener: () => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "open", listener: (fd: number) => void): this; + once(event: "close", listener: () => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "open", listener: (fd: number) => void): this; + prependListener(event: "close", listener: () => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "open", listener: (fd: number) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + } + + class WriteStream extends stream.Writable { + close(): void; + bytesWritten: number; + path: string | Buffer; + + /** + * events.EventEmitter + * 1. open + * 2. close + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "open", listener: (fd: number) => void): this; + addListener(event: "close", listener: () => void): this; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "open", listener: (fd: number) => void): this; + on(event: "close", listener: () => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "open", listener: (fd: number) => void): this; + once(event: "close", listener: () => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "open", listener: (fd: number) => void): this; + prependListener(event: "close", listener: () => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "open", listener: (fd: number) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + } + + /** + * Asynchronous rename(2) - Change the name or location of a file or directory. + * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function rename(oldPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace rename { + /** + * Asynchronous rename(2) - Change the name or location of a file or directory. + * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function __promisify__(oldPath: PathLike, newPath: PathLike): Promise; + } + + /** + * Synchronous rename(2) - Change the name or location of a file or directory. + * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function renameSync(oldPath: PathLike, newPath: PathLike): void; + + /** + * Asynchronous truncate(2) - Truncate a file to a specified length. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param len If not specified, defaults to `0`. + */ + function truncate(path: PathLike, len: number | undefined | null, callback: (err: NodeJS.ErrnoException | null) => void): void; + + /** + * Asynchronous truncate(2) - Truncate a file to a specified length. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function truncate(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace truncate { + /** + * Asynchronous truncate(2) - Truncate a file to a specified length. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param len If not specified, defaults to `0`. + */ + function __promisify__(path: PathLike, len?: number | null): Promise; + } + + /** + * Synchronous truncate(2) - Truncate a file to a specified length. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param len If not specified, defaults to `0`. + */ + function truncateSync(path: PathLike, len?: number | null): void; + + /** + * Asynchronous ftruncate(2) - Truncate a file to a specified length. + * @param fd A file descriptor. + * @param len If not specified, defaults to `0`. + */ + function ftruncate(fd: number, len: number | undefined | null, callback: (err: NodeJS.ErrnoException | null) => void): void; + + /** + * Asynchronous ftruncate(2) - Truncate a file to a specified length. + * @param fd A file descriptor. + */ + function ftruncate(fd: number, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace ftruncate { + /** + * Asynchronous ftruncate(2) - Truncate a file to a specified length. + * @param fd A file descriptor. + * @param len If not specified, defaults to `0`. + */ + function __promisify__(fd: number, len?: number | null): Promise; + } + + /** + * Synchronous ftruncate(2) - Truncate a file to a specified length. + * @param fd A file descriptor. + * @param len If not specified, defaults to `0`. + */ + function ftruncateSync(fd: number, len?: number | null): void; + + /** + * Asynchronous chown(2) - Change ownership of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function chown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace chown { + /** + * Asynchronous chown(2) - Change ownership of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike, uid: number, gid: number): Promise; + } + + /** + * Synchronous chown(2) - Change ownership of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function chownSync(path: PathLike, uid: number, gid: number): void; + + /** + * Asynchronous fchown(2) - Change ownership of a file. + * @param fd A file descriptor. + */ + function fchown(fd: number, uid: number, gid: number, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace fchown { + /** + * Asynchronous fchown(2) - Change ownership of a file. + * @param fd A file descriptor. + */ + function __promisify__(fd: number, uid: number, gid: number): Promise; + } + + /** + * Synchronous fchown(2) - Change ownership of a file. + * @param fd A file descriptor. + */ + function fchownSync(fd: number, uid: number, gid: number): void; + + /** + * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function lchown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace lchown { + /** + * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike, uid: number, gid: number): Promise; + } + + /** + * Synchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function lchownSync(path: PathLike, uid: number, gid: number): void; + + /** + * Asynchronous chmod(2) - Change permissions of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function chmod(path: PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace chmod { + /** + * Asynchronous chmod(2) - Change permissions of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function __promisify__(path: PathLike, mode: string | number): Promise; + } + + /** + * Synchronous chmod(2) - Change permissions of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function chmodSync(path: PathLike, mode: string | number): void; + + /** + * Asynchronous fchmod(2) - Change permissions of a file. + * @param fd A file descriptor. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function fchmod(fd: number, mode: string | number, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace fchmod { + /** + * Asynchronous fchmod(2) - Change permissions of a file. + * @param fd A file descriptor. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function __promisify__(fd: number, mode: string | number): Promise; + } + + /** + * Synchronous fchmod(2) - Change permissions of a file. + * @param fd A file descriptor. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function fchmodSync(fd: number, mode: string | number): void; + + /** + * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function lchmod(path: PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace lchmod { + /** + * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function __promisify__(path: PathLike, mode: string | number): Promise; + } + + /** + * Synchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function lchmodSync(path: PathLike, mode: string | number): void; + + /** + * Asynchronous stat(2) - Get file status. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function stat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace stat { + /** + * Asynchronous stat(2) - Get file status. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike): Promise; + } + + /** + * Synchronous stat(2) - Get file status. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function statSync(path: PathLike): Stats; + + /** + * Asynchronous fstat(2) - Get file status. + * @param fd A file descriptor. + */ + function fstat(fd: number, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace fstat { + /** + * Asynchronous fstat(2) - Get file status. + * @param fd A file descriptor. + */ + function __promisify__(fd: number): Promise; + } + + /** + * Synchronous fstat(2) - Get file status. + * @param fd A file descriptor. + */ + function fstatSync(fd: number): Stats; + + /** + * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace lstat { + /** + * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike): Promise; + } + + /** + * Synchronous lstat(2) - Get file status. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function lstatSync(path: PathLike): Stats; + + /** + * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file. + * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function link(existingPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace link { + /** + * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file. + * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function link(existingPath: PathLike, newPath: PathLike): Promise; + } + + /** + * Synchronous link(2) - Create a new link (also known as a hard link) to an existing file. + * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function linkSync(existingPath: PathLike, newPath: PathLike): void; + + /** + * Asynchronous symlink(2) - Create a new symbolic link to an existing file. + * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. + * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. + * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). + * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. + */ + function symlink(target: PathLike, path: PathLike, type: symlink.Type | undefined | null, callback: (err: NodeJS.ErrnoException | null) => void): void; + + /** + * Asynchronous symlink(2) - Create a new symbolic link to an existing file. + * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. + * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. + */ + function symlink(target: PathLike, path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace symlink { + /** + * Asynchronous symlink(2) - Create a new symbolic link to an existing file. + * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. + * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. + * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). + * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. + */ + function __promisify__(target: PathLike, path: PathLike, type?: string | null): Promise; + + type Type = "dir" | "file" | "junction"; + } + + /** + * Synchronous symlink(2) - Create a new symbolic link to an existing file. + * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. + * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. + * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). + * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. + */ + function symlinkSync(target: PathLike, path: PathLike, type?: symlink.Type | null): void; + + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink( + path: PathLike, + options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, + callback: (err: NodeJS.ErrnoException | null, linkString: string) => void + ): void; + + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException | null, linkString: Buffer) => void): void; + + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, linkString: string | Buffer) => void): void; + + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function readlink(path: PathLike, callback: (err: NodeJS.ErrnoException | null, linkString: string) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace readlink { + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise; + + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options: { encoding: "buffer" } | "buffer"): Promise; + + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: { encoding?: string | null } | string | null): Promise; + } + + /** + * Synchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlinkSync(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): string; + + /** + * Synchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlinkSync(path: PathLike, options: { encoding: "buffer" } | "buffer"): Buffer; + + /** + * Synchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlinkSync(path: PathLike, options?: { encoding?: string | null } | string | null): string | Buffer; + + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath( + path: PathLike, + options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void + ): void; + + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void): void; + + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void; + + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function realpath(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace realpath { + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise; + + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options: { encoding: "buffer" } | "buffer"): Promise; + + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: { encoding?: string | null } | string | null): Promise; + + function native( + path: PathLike, + options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void + ): void; + function native(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void): void; + function native(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void; + function native(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void; + } + + /** + * Synchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpathSync(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): string; + + /** + * Synchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpathSync(path: PathLike, options: { encoding: "buffer" } | "buffer"): Buffer; + + /** + * Synchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpathSync(path: PathLike, options?: { encoding?: string | null } | string | null): string | Buffer; + + namespace realpathSync { + function native(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): string; + function native(path: PathLike, options: { encoding: "buffer" } | "buffer"): Buffer; + function native(path: PathLike, options?: { encoding?: string | null } | string | null): string | Buffer; + } + + /** + * Asynchronous unlink(2) - delete a name and possibly the file it refers to. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function unlink(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace unlink { + /** + * Asynchronous unlink(2) - delete a name and possibly the file it refers to. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike): Promise; + } + + /** + * Synchronous unlink(2) - delete a name and possibly the file it refers to. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function unlinkSync(path: PathLike): void; + + /** + * Asynchronous rmdir(2) - delete a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function rmdir(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace rmdir { + /** + * Asynchronous rmdir(2) - delete a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike): Promise; + } + + /** + * Synchronous rmdir(2) - delete a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function rmdirSync(path: PathLike): void; + + export interface MakeDirectoryOptions { + /** + * Indicates whether parent folders should be created. + * @default false + */ + recursive?: boolean; + /** + * A file mode. If a string is passed, it is parsed as an octal integer. If not specified + * @default 0o777. + */ + mode?: number; + } + + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function mkdir(path: PathLike, options: number | string | MakeDirectoryOptions | undefined | null, callback: (err: NodeJS.ErrnoException | null) => void): void; + + /** + * Asynchronous mkdir(2) - create a directory with a mode of `0o777`. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function mkdir(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace mkdir { + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function __promisify__(path: PathLike, options?: number | string | MakeDirectoryOptions | null): Promise; + } + + /** + * Synchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function mkdirSync(path: PathLike, options?: number | string | MakeDirectoryOptions | null): void; + + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp(prefix: string, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void; + + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp(prefix: string, options: "buffer" | { encoding: "buffer" }, callback: (err: NodeJS.ErrnoException | null, folder: Buffer) => void): void; + + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp(prefix: string, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, folder: string | Buffer) => void): void; + + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + */ + function mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace mkdtemp { + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(prefix: string, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise; + + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(prefix: string, options: { encoding: "buffer" } | "buffer"): Promise; + + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(prefix: string, options?: { encoding?: string | null } | string | null): Promise; + } + + /** + * Synchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtempSync(prefix: string, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): string; + + /** + * Synchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtempSync(prefix: string, options: { encoding: "buffer" } | "buffer"): Buffer; + + /** + * Synchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtempSync(prefix: string, options?: { encoding?: string | null } | string | null): string | Buffer; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir( + path: PathLike, + options: { encoding: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | undefined | null, + callback: (err: NodeJS.ErrnoException | null, files: string[]) => void, + ): void; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir(path: PathLike, options: { encoding: "buffer"; withFileTypes?: false } | "buffer", callback: (err: NodeJS.ErrnoException | null, files: Buffer[]) => void): void; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir( + path: PathLike, + options: { encoding?: string | null; withFileTypes?: false } | string | undefined | null, + callback: (err: NodeJS.ErrnoException | null, files: string[] | Buffer[]) => void, + ): void; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function readdir(path: PathLike, callback: (err: NodeJS.ErrnoException | null, files: string[]) => void): void; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. + */ + function readdir(path: PathLike, options: { encoding?: string | null; withFileTypes: true }, callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace readdir { + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: { encoding: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | null): Promise; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options: "buffer" | { encoding: "buffer"; withFileTypes?: false }): Promise; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: { encoding?: string | null; withFileTypes?: false } | string | null): Promise; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent + */ + function __promisify__(path: PathLike, options: { encoding?: string | null; withFileTypes: true }): Promise; + } + + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdirSync(path: PathLike, options?: { encoding: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | null): string[]; + + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdirSync(path: PathLike, options: { encoding: "buffer"; withFileTypes?: false } | "buffer"): Buffer[]; + + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdirSync(path: PathLike, options?: { encoding?: string | null; withFileTypes?: false } | string | null): string[] | Buffer[]; + + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. + */ + function readdirSync(path: PathLike, options: { encoding?: string | null; withFileTypes: true }): Dirent[]; + + /** + * Asynchronous close(2) - close a file descriptor. + * @param fd A file descriptor. + */ + function close(fd: number, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace close { + /** + * Asynchronous close(2) - close a file descriptor. + * @param fd A file descriptor. + */ + function __promisify__(fd: number): Promise; + } + + /** + * Synchronous close(2) - close a file descriptor. + * @param fd A file descriptor. + */ + function closeSync(fd: number): void; + + /** + * Asynchronous open(2) - open and possibly create a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`. + */ + function open(path: PathLike, flags: string | number, mode: string | number | undefined | null, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void; + + /** + * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function open(path: PathLike, flags: string | number, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace open { + /** + * Asynchronous open(2) - open and possibly create a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`. + */ + function __promisify__(path: PathLike, flags: string | number, mode?: string | number | null): Promise; + } + + /** + * Synchronous open(2) - open and possibly create a file, returning a file descriptor.. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`. + */ + function openSync(path: PathLike, flags: string | number, mode?: string | number | null): number; + + /** + * Asynchronously change file timestamps of the file referenced by the supplied path. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace utimes { + /** + * Asynchronously change file timestamps of the file referenced by the supplied path. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function __promisify__(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise; + } + + /** + * Synchronously change file timestamps of the file referenced by the supplied path. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function utimesSync(path: PathLike, atime: string | number | Date, mtime: string | number | Date): void; + + /** + * Asynchronously change file timestamps of the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function futimes(fd: number, atime: string | number | Date, mtime: string | number | Date, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace futimes { + /** + * Asynchronously change file timestamps of the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function __promisify__(fd: number, atime: string | number | Date, mtime: string | number | Date): Promise; + } + + /** + * Synchronously change file timestamps of the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function futimesSync(fd: number, atime: string | number | Date, mtime: string | number | Date): void; + + /** + * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. + * @param fd A file descriptor. + */ + function fsync(fd: number, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace fsync { + /** + * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. + * @param fd A file descriptor. + */ + function __promisify__(fd: number): Promise; + } + + /** + * Synchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. + * @param fd A file descriptor. + */ + function fsyncSync(fd: number): void; + + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + function write( + fd: number, + buffer: TBuffer, + offset: number | undefined | null, + length: number | undefined | null, + position: number | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, + ): void; + + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + */ + function write( + fd: number, + buffer: TBuffer, + offset: number | undefined | null, + length: number | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, + ): void; + + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + */ + function write( + fd: number, + buffer: TBuffer, + offset: number | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void + ): void; + + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + */ + function write(fd: number, buffer: TBuffer, callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void): void; + + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. If something other than a string is supplied it will be coerced to a string. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + function write( + fd: number, + string: any, + position: number | undefined | null, + encoding: string | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void, + ): void; + + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. If something other than a string is supplied it will be coerced to a string. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + function write(fd: number, string: any, position: number | undefined | null, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void; + + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. If something other than a string is supplied it will be coerced to a string. + */ + function write(fd: number, string: any, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace write { + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + function __promisify__( + fd: number, + buffer?: TBuffer, + offset?: number, + length?: number, + position?: number | null, + ): Promise<{ bytesWritten: number, buffer: TBuffer }>; + + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. If something other than a string is supplied it will be coerced to a string. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + function __promisify__(fd: number, string: any, position?: number | null, encoding?: string | null): Promise<{ bytesWritten: number, buffer: string }>; + } + + /** + * Synchronously writes `buffer` to the file referenced by the supplied file descriptor, returning the number of bytes written. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + function writeSync(fd: number, buffer: BinaryData, offset?: number | null, length?: number | null, position?: number | null): number; + + /** + * Synchronously writes `string` to the file referenced by the supplied file descriptor, returning the number of bytes written. + * @param fd A file descriptor. + * @param string A string to write. If something other than a string is supplied it will be coerced to a string. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + function writeSync(fd: number, string: any, position?: number | null, encoding?: string | null): number; + + /** + * Asynchronously reads data from the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param buffer The buffer that the data will be written to. + * @param offset The offset in the buffer at which to start writing. + * @param length The number of bytes to read. + * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position. + */ + function read( + fd: number, + buffer: TBuffer, + offset: number, + length: number, + position: number | null, + callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void, + ): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace read { + /** + * @param fd A file descriptor. + * @param buffer The buffer that the data will be written to. + * @param offset The offset in the buffer at which to start writing. + * @param length The number of bytes to read. + * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position. + */ + function __promisify__(fd: number, buffer: TBuffer, offset: number, length: number, position: number | null): Promise<{ bytesRead: number, buffer: TBuffer }>; + } + + /** + * Synchronously reads data from the file referenced by the supplied file descriptor, returning the number of bytes read. + * @param fd A file descriptor. + * @param buffer The buffer that the data will be written to. + * @param offset The offset in the buffer at which to start writing. + * @param length The number of bytes to read. + * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position. + */ + function readSync(fd: number, buffer: BinaryData, offset: number, length: number, position: number | null): number; + + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function readFile(path: PathLike | number, options: { encoding?: null; flag?: string; } | undefined | null, callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void): void; + + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function readFile(path: PathLike | number, options: { encoding: string; flag?: string; } | string, callback: (err: NodeJS.ErrnoException | null, data: string) => void): void; + + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function readFile( + path: PathLike | number, + options: { encoding?: string | null; flag?: string; } | string | undefined | null, + callback: (err: NodeJS.ErrnoException | null, data: string | Buffer) => void, + ): void; + + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + */ + function readFile(path: PathLike | number, callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace readFile { + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function __promisify__(path: PathLike | number, options?: { encoding?: null; flag?: string; } | null): Promise; + + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function __promisify__(path: PathLike | number, options: { encoding: string; flag?: string; } | string): Promise; + + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function __promisify__(path: PathLike | number, options?: { encoding?: string | null; flag?: string; } | string | null): Promise; + } + + /** + * Synchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options An object that may contain an optional flag. If a flag is not provided, it defaults to `'r'`. + */ + function readFileSync(path: PathLike | number, options?: { encoding?: null; flag?: string; } | null): Buffer; + + /** + * Synchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function readFileSync(path: PathLike | number, options: { encoding: string; flag?: string; } | string): string; + + /** + * Synchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function readFileSync(path: PathLike | number, options?: { encoding?: string | null; flag?: string; } | string | null): string | Buffer; + + type WriteFileOptions = { encoding?: string | null; mode?: number | string; flag?: string; } | string | null; + + /** + * Asynchronously writes data to a file, replacing the file if it already exists. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'w'` is used. + */ + function writeFile(path: PathLike | number, data: any, options: WriteFileOptions, callback: (err: NodeJS.ErrnoException | null) => void): void; + + /** + * Asynchronously writes data to a file, replacing the file if it already exists. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + */ + function writeFile(path: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace writeFile { + /** + * Asynchronously writes data to a file, replacing the file if it already exists. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'w'` is used. + */ + function __promisify__(path: PathLike | number, data: any, options?: WriteFileOptions): Promise; + } + + /** + * Synchronously writes data to a file, replacing the file if it already exists. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'w'` is used. + */ + function writeFileSync(path: PathLike | number, data: any, options?: WriteFileOptions): void; + + /** + * Asynchronously append data to a file, creating the file if it does not exist. + * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'a'` is used. + */ + function appendFile(file: PathLike | number, data: any, options: WriteFileOptions, callback: (err: NodeJS.ErrnoException | null) => void): void; + + /** + * Asynchronously append data to a file, creating the file if it does not exist. + * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + */ + function appendFile(file: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace appendFile { + /** + * Asynchronously append data to a file, creating the file if it does not exist. + * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'a'` is used. + */ + function __promisify__(file: PathLike | number, data: any, options?: WriteFileOptions): Promise; + } + + /** + * Synchronously append data to a file, creating the file if it does not exist. + * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'a'` is used. + */ + function appendFileSync(file: PathLike | number, data: any, options?: WriteFileOptions): void; + + /** + * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed. + */ + function watchFile(filename: PathLike, options: { persistent?: boolean; interval?: number; } | undefined, listener: (curr: Stats, prev: Stats) => void): void; + + /** + * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function watchFile(filename: PathLike, listener: (curr: Stats, prev: Stats) => void): void; + + /** + * Stop watching for changes on `filename`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function unwatchFile(filename: PathLike, listener?: (curr: Stats, prev: Stats) => void): void; + + /** + * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `persistent` is not supplied, the default of `true` is used. + * If `recursive` is not supplied, the default of `false` is used. + */ + function watch( + filename: PathLike, + options: { encoding?: BufferEncoding | null, persistent?: boolean, recursive?: boolean } | BufferEncoding | undefined | null, + listener?: (event: string, filename: string) => void, + ): FSWatcher; + + /** + * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `persistent` is not supplied, the default of `true` is used. + * If `recursive` is not supplied, the default of `false` is used. + */ + function watch(filename: PathLike, options: { encoding: "buffer", persistent?: boolean, recursive?: boolean } | "buffer", listener?: (event: string, filename: Buffer) => void): FSWatcher; + + /** + * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `persistent` is not supplied, the default of `true` is used. + * If `recursive` is not supplied, the default of `false` is used. + */ + function watch( + filename: PathLike, + options: { encoding?: string | null, persistent?: boolean, recursive?: boolean } | string | null, + listener?: (event: string, filename: string | Buffer) => void, + ): FSWatcher; + + /** + * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function watch(filename: PathLike, listener?: (event: string, filename: string) => any): FSWatcher; + + /** + * Asynchronously tests whether or not the given path exists by checking with the file system. + * @deprecated + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function exists(path: PathLike, callback: (exists: boolean) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace exists { + /** + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function __promisify__(path: PathLike): Promise; + } + + /** + * Synchronously tests whether or not the given path exists by checking with the file system. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function existsSync(path: PathLike): boolean; + + namespace constants { + // File Access Constants + + /** Constant for fs.access(). File is visible to the calling process. */ + const F_OK: number; + + /** Constant for fs.access(). File can be read by the calling process. */ + const R_OK: number; + + /** Constant for fs.access(). File can be written by the calling process. */ + const W_OK: number; + + /** Constant for fs.access(). File can be executed by the calling process. */ + const X_OK: number; + + // File Copy Constants + + /** Constant for fs.copyFile. Flag indicating the destination file should not be overwritten if it already exists. */ + const COPYFILE_EXCL: number; + + /** + * Constant for fs.copyFile. copy operation will attempt to create a copy-on-write reflink. + * If the underlying platform does not support copy-on-write, then a fallback copy mechanism is used. + */ + const COPYFILE_FICLONE: number; + + /** + * Constant for fs.copyFile. Copy operation will attempt to create a copy-on-write reflink. + * If the underlying platform does not support copy-on-write, then the operation will fail with an error. + */ + const COPYFILE_FICLONE_FORCE: number; + + // File Open Constants + + /** Constant for fs.open(). Flag indicating to open a file for read-only access. */ + const O_RDONLY: number; + + /** Constant for fs.open(). Flag indicating to open a file for write-only access. */ + const O_WRONLY: number; + + /** Constant for fs.open(). Flag indicating to open a file for read-write access. */ + const O_RDWR: number; + + /** Constant for fs.open(). Flag indicating to create the file if it does not already exist. */ + const O_CREAT: number; + + /** Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists. */ + const O_EXCL: number; + + /** + * Constant for fs.open(). Flag indicating that if path identifies a terminal device, + * opening the path shall not cause that terminal to become the controlling terminal for the process + * (if the process does not already have one). + */ + const O_NOCTTY: number; + + /** Constant for fs.open(). Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero. */ + const O_TRUNC: number; + + /** Constant for fs.open(). Flag indicating that data will be appended to the end of the file. */ + const O_APPEND: number; + + /** Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory. */ + const O_DIRECTORY: number; + + /** + * constant for fs.open(). + * Flag indicating reading accesses to the file system will no longer result in + * an update to the atime information associated with the file. + * This flag is available on Linux operating systems only. + */ + const O_NOATIME: number; + + /** Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link. */ + const O_NOFOLLOW: number; + + /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O. */ + const O_SYNC: number; + + /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O with write operations waiting for data integrity. */ + const O_DSYNC: number; + + /** Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to. */ + const O_SYMLINK: number; + + /** Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O. */ + const O_DIRECT: number; + + /** Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible. */ + const O_NONBLOCK: number; + + // File Type Constants + + /** Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code. */ + const S_IFMT: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file. */ + const S_IFREG: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a directory. */ + const S_IFDIR: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file. */ + const S_IFCHR: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file. */ + const S_IFBLK: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe. */ + const S_IFIFO: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link. */ + const S_IFLNK: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a socket. */ + const S_IFSOCK: number; + + // File Mode Constants + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner. */ + const S_IRWXU: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner. */ + const S_IRUSR: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner. */ + const S_IWUSR: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner. */ + const S_IXUSR: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group. */ + const S_IRWXG: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group. */ + const S_IRGRP: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group. */ + const S_IWGRP: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group. */ + const S_IXGRP: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others. */ + const S_IRWXO: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others. */ + const S_IROTH: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others. */ + const S_IWOTH: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others. */ + const S_IXOTH: number; + } + + /** + * Asynchronously tests a user's permissions for the file specified by path. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function access(path: PathLike, mode: number | undefined, callback: (err: NodeJS.ErrnoException | null) => void): void; + + /** + * Asynchronously tests a user's permissions for the file specified by path. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function access(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace access { + /** + * Asynchronously tests a user's permissions for the file specified by path. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function __promisify__(path: PathLike, mode?: number): Promise; + } + + /** + * Synchronously tests a user's permissions for the file specified by path. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function accessSync(path: PathLike, mode?: number): void; + + /** + * Returns a new `ReadStream` object. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function createReadStream(path: PathLike, options?: string | { + flags?: string; + encoding?: string; + fd?: number; + mode?: number; + autoClose?: boolean; + start?: number; + end?: number; + highWaterMark?: number; + }): ReadStream; + + /** + * Returns a new `WriteStream` object. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function createWriteStream(path: PathLike, options?: string | { + flags?: string; + encoding?: string; + fd?: number; + mode?: number; + autoClose?: boolean; + start?: number; + highWaterMark?: number; + }): WriteStream; + + /** + * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device. + * @param fd A file descriptor. + */ + function fdatasync(fd: number, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace fdatasync { + /** + * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device. + * @param fd A file descriptor. + */ + function __promisify__(fd: number): Promise; + } + + /** + * Synchronous fdatasync(2) - synchronize a file's in-core state with storage device. + * @param fd A file descriptor. + */ + function fdatasyncSync(fd: number): void; + + /** + * Asynchronously copies src to dest. By default, dest is overwritten if it already exists. + * No arguments other than a possible exception are given to the callback function. + * Node.js makes no guarantees about the atomicity of the copy operation. + * If an error occurs after the destination file has been opened for writing, Node.js will attempt + * to remove the destination. + * @param src A path to the source file. + * @param dest A path to the destination file. + */ + function copyFile(src: PathLike, dest: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void; + /** + * Asynchronously copies src to dest. By default, dest is overwritten if it already exists. + * No arguments other than a possible exception are given to the callback function. + * Node.js makes no guarantees about the atomicity of the copy operation. + * If an error occurs after the destination file has been opened for writing, Node.js will attempt + * to remove the destination. + * @param src A path to the source file. + * @param dest A path to the destination file. + * @param flags An integer that specifies the behavior of the copy operation. The only supported flag is fs.constants.COPYFILE_EXCL, which causes the copy operation to fail if dest already exists. + */ + function copyFile(src: PathLike, dest: PathLike, flags: number, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace copyFile { + /** + * Asynchronously copies src to dest. By default, dest is overwritten if it already exists. + * No arguments other than a possible exception are given to the callback function. + * Node.js makes no guarantees about the atomicity of the copy operation. + * If an error occurs after the destination file has been opened for writing, Node.js will attempt + * to remove the destination. + * @param src A path to the source file. + * @param dest A path to the destination file. + * @param flags An optional integer that specifies the behavior of the copy operation. + * The only supported flag is fs.constants.COPYFILE_EXCL, + * which causes the copy operation to fail if dest already exists. + */ + function __promisify__(src: PathLike, dst: PathLike, flags?: number): Promise; + } + + /** + * Synchronously copies src to dest. By default, dest is overwritten if it already exists. + * Node.js makes no guarantees about the atomicity of the copy operation. + * If an error occurs after the destination file has been opened for writing, Node.js will attempt + * to remove the destination. + * @param src A path to the source file. + * @param dest A path to the destination file. + * @param flags An optional integer that specifies the behavior of the copy operation. + * The only supported flag is fs.constants.COPYFILE_EXCL, which causes the copy operation to fail if dest already exists. + */ + function copyFileSync(src: PathLike, dest: PathLike, flags?: number): void; + + namespace promises { + interface FileHandle { + /** + * Gets the file descriptor for this file handle. + */ + readonly fd: number; + + /** + * Asynchronously append data to a file, creating the file if it does not exist. The underlying file will _not_ be closed automatically. + * The `FileHandle` must have been opened for appending. + * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'a'` is used. + */ + appendFile(data: any, options?: { encoding?: string | null, mode?: string | number, flag?: string | number } | string | null): Promise; + + /** + * Asynchronous fchown(2) - Change ownership of a file. + */ + chown(uid: number, gid: number): Promise; + + /** + * Asynchronous fchmod(2) - Change permissions of a file. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + chmod(mode: string | number): Promise; + + /** + * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device. + */ + datasync(): Promise; + + /** + * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. + */ + sync(): Promise; + + /** + * Asynchronously reads data from the file. + * The `FileHandle` must have been opened for reading. + * @param buffer The buffer that the data will be written to. + * @param offset The offset in the buffer at which to start writing. + * @param length The number of bytes to read. + * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position. + */ + read(buffer: TBuffer, offset?: number | null, length?: number | null, position?: number | null): Promise<{ bytesRead: number, buffer: TBuffer }>; + + /** + * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically. + * The `FileHandle` must have been opened for reading. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + readFile(options?: { encoding?: null, flag?: string | number } | null): Promise; + + /** + * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically. + * The `FileHandle` must have been opened for reading. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + readFile(options: { encoding: BufferEncoding, flag?: string | number } | BufferEncoding): Promise; + + /** + * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically. + * The `FileHandle` must have been opened for reading. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + readFile(options?: { encoding?: string | null, flag?: string | number } | string | null): Promise; + + /** + * Asynchronous fstat(2) - Get file status. + */ + stat(): Promise; + + /** + * Asynchronous ftruncate(2) - Truncate a file to a specified length. + * @param len If not specified, defaults to `0`. + */ + truncate(len?: number): Promise; + + /** + * Asynchronously change file timestamps of the file. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + utimes(atime: string | number | Date, mtime: string | number | Date): Promise; + + /** + * Asynchronously writes `buffer` to the file. + * The `FileHandle` must have been opened for writing. + * @param buffer The buffer that the data will be written to. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + write(buffer: TBuffer, offset?: number | null, length?: number | null, position?: number | null): Promise<{ bytesWritten: number, buffer: TBuffer }>; + + /** + * Asynchronously writes `string` to the file. + * The `FileHandle` must have been opened for writing. + * It is unsafe to call `write()` multiple times on the same file without waiting for the `Promise` + * to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended. + * @param string A string to write. If something other than a string is supplied it will be coerced to a string. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + write(data: any, position?: number | null, encoding?: string | null): Promise<{ bytesWritten: number, buffer: string }>; + + /** + * Asynchronously writes data to a file, replacing the file if it already exists. The underlying file will _not_ be closed automatically. + * The `FileHandle` must have been opened for writing. + * It is unsafe to call `writeFile()` multiple times on the same file without waiting for the `Promise` to be resolved (or rejected). + * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'w'` is used. + */ + writeFile(data: any, options?: { encoding?: string | null, mode?: string | number, flag?: string | number } | string | null): Promise; + + /** + * Asynchronous close(2) - close a `FileHandle`. + */ + close(): Promise; + } + + /** + * Asynchronously tests a user's permissions for the file specified by path. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function access(path: PathLike, mode?: number): Promise; + + /** + * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it already exists. + * Node.js makes no guarantees about the atomicity of the copy operation. + * If an error occurs after the destination file has been opened for writing, Node.js will attempt + * to remove the destination. + * @param src A path to the source file. + * @param dest A path to the destination file. + * @param flags An optional integer that specifies the behavior of the copy operation. The only + * supported flag is `fs.constants.COPYFILE_EXCL`, which causes the copy operation to fail if + * `dest` already exists. + */ + function copyFile(src: PathLike, dest: PathLike, flags?: number): Promise; + + /** + * Asynchronous open(2) - open and possibly create a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not + * supplied, defaults to `0o666`. + */ + function open(path: PathLike, flags: string | number, mode?: string | number): Promise; + + /** + * Asynchronously reads data from the file referenced by the supplied `FileHandle`. + * @param handle A `FileHandle`. + * @param buffer The buffer that the data will be written to. + * @param offset The offset in the buffer at which to start writing. + * @param length The number of bytes to read. + * @param position The offset from the beginning of the file from which data should be read. If + * `null`, data will be read from the current position. + */ + function read( + handle: FileHandle, + buffer: TBuffer, + offset?: number | null, + length?: number | null, + position?: number | null, + ): Promise<{ bytesRead: number, buffer: TBuffer }>; + + /** + * Asynchronously writes `buffer` to the file referenced by the supplied `FileHandle`. + * It is unsafe to call `fsPromises.write()` multiple times on the same file without waiting for the `Promise` + * to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended. + * @param handle A `FileHandle`. + * @param buffer The buffer that the data will be written to. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + function write( + handle: FileHandle, + buffer: TBuffer, + offset?: number | null, + length?: number | null, position?: number | null): Promise<{ bytesWritten: number, buffer: TBuffer }>; + + /** + * Asynchronously writes `string` to the file referenced by the supplied `FileHandle`. + * It is unsafe to call `fsPromises.write()` multiple times on the same file without waiting for the `Promise` + * to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended. + * @param handle A `FileHandle`. + * @param string A string to write. If something other than a string is supplied it will be coerced to a string. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + function write(handle: FileHandle, string: any, position?: number | null, encoding?: string | null): Promise<{ bytesWritten: number, buffer: string }>; + + /** + * Asynchronous rename(2) - Change the name or location of a file or directory. + * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function rename(oldPath: PathLike, newPath: PathLike): Promise; + + /** + * Asynchronous truncate(2) - Truncate a file to a specified length. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param len If not specified, defaults to `0`. + */ + function truncate(path: PathLike, len?: number): Promise; + + /** + * Asynchronous ftruncate(2) - Truncate a file to a specified length. + * @param handle A `FileHandle`. + * @param len If not specified, defaults to `0`. + */ + function ftruncate(handle: FileHandle, len?: number): Promise; + + /** + * Asynchronous rmdir(2) - delete a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function rmdir(path: PathLike): Promise; + + /** + * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device. + * @param handle A `FileHandle`. + */ + function fdatasync(handle: FileHandle): Promise; + + /** + * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. + * @param handle A `FileHandle`. + */ + function fsync(handle: FileHandle): Promise; + + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function mkdir(path: PathLike, options?: number | string | MakeDirectoryOptions | null): Promise; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir(path: PathLike, options?: { encoding?: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | null): Promise; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir(path: PathLike, options: { encoding: "buffer"; withFileTypes?: false } | "buffer"): Promise; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir(path: PathLike, options?: { encoding?: string | null; withFileTypes?: false } | string | null): Promise; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. + */ + function readdir(path: PathLike, options: { encoding?: string | null; withFileTypes: true }): Promise; + + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise; + + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink(path: PathLike, options: { encoding: "buffer" } | "buffer"): Promise; + + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink(path: PathLike, options?: { encoding?: string | null } | string | null): Promise; + + /** + * Asynchronous symlink(2) - Create a new symbolic link to an existing file. + * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. + * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. + * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). + * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. + */ + function symlink(target: PathLike, path: PathLike, type?: string | null): Promise; + + /** + * Asynchronous fstat(2) - Get file status. + * @param handle A `FileHandle`. + */ + function fstat(handle: FileHandle): Promise; + + /** + * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function lstat(path: PathLike): Promise; + + /** + * Asynchronous stat(2) - Get file status. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function stat(path: PathLike): Promise; + + /** + * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file. + * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function link(existingPath: PathLike, newPath: PathLike): Promise; + + /** + * Asynchronous unlink(2) - delete a name and possibly the file it refers to. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function unlink(path: PathLike): Promise; + + /** + * Asynchronous fchmod(2) - Change permissions of a file. + * @param handle A `FileHandle`. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function fchmod(handle: FileHandle, mode: string | number): Promise; + + /** + * Asynchronous chmod(2) - Change permissions of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function chmod(path: PathLike, mode: string | number): Promise; + + /** + * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function lchmod(path: PathLike, mode: string | number): Promise; + + /** + * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function lchown(path: PathLike, uid: number, gid: number): Promise; + + /** + * Asynchronous fchown(2) - Change ownership of a file. + * @param handle A `FileHandle`. + */ + function fchown(handle: FileHandle, uid: number, gid: number): Promise; + + /** + * Asynchronous chown(2) - Change ownership of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function chown(path: PathLike, uid: number, gid: number): Promise; + + /** + * Asynchronously change file timestamps of the file referenced by the supplied path. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise; + + /** + * Asynchronously change file timestamps of the file referenced by the supplied `FileHandle`. + * @param handle A `FileHandle`. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function futimes(handle: FileHandle, atime: string | number | Date, mtime: string | number | Date): Promise; + + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise; + + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath(path: PathLike, options: { encoding: "buffer" } | "buffer"): Promise; + + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath(path: PathLike, options?: { encoding?: string | null } | string | null): Promise; + + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp(prefix: string, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise; + + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp(prefix: string, options: { encoding: "buffer" } | "buffer"): Promise; + + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp(prefix: string, options?: { encoding?: string | null } | string | null): Promise; + + /** + * Asynchronously writes data to a file, replacing the file if it already exists. + * It is unsafe to call `fsPromises.writeFile()` multiple times on the same file without waiting for the `Promise` to be resolved (or rejected). + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'w'` is used. + */ + function writeFile(path: PathLike | FileHandle, data: any, options?: { encoding?: string | null, mode?: string | number, flag?: string | number } | string | null): Promise; + + /** + * Asynchronously append data to a file, creating the file if it does not exist. + * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'a'` is used. + */ + function appendFile(path: PathLike | FileHandle, data: any, options?: { encoding?: string | null, mode?: string | number, flag?: string | number } | string | null): Promise; + + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function readFile(path: PathLike | FileHandle, options?: { encoding?: null, flag?: string | number } | null): Promise; + + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function readFile(path: PathLike | FileHandle, options: { encoding: BufferEncoding, flag?: string | number } | BufferEncoding): Promise; + + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function readFile(path: PathLike | FileHandle, options?: { encoding?: string | null, flag?: string | number } | string | null): Promise; + } +} diff --git a/node_modules/@types/node/globals.d.ts b/node_modules/@types/node/globals.d.ts new file mode 100644 index 00000000..5de9e98f --- /dev/null +++ b/node_modules/@types/node/globals.d.ts @@ -0,0 +1,1180 @@ +// This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build +interface Console { + Console: NodeJS.ConsoleConstructor; + /** + * A simple assertion test that verifies whether `value` is truthy. + * If it is not, an `AssertionError` is thrown. + * If provided, the error `message` is formatted using `util.format()` and used as the error message. + */ + assert(value: any, message?: string, ...optionalParams: any[]): void; + /** + * When `stdout` is a TTY, calling `console.clear()` will attempt to clear the TTY. + * When `stdout` is not a TTY, this method does nothing. + */ + clear(): void; + /** + * Maintains an internal counter specific to `label` and outputs to `stdout` the number of times `console.count()` has been called with the given `label`. + */ + count(label?: string): void; + /** + * Resets the internal counter specific to `label`. + */ + countReset(label?: string): void; + /** + * The `console.debug()` function is an alias for {@link console.log()}. + */ + debug(message?: any, ...optionalParams: any[]): void; + /** + * Uses {@link util.inspect()} on `obj` and prints the resulting string to `stdout`. + * This function bypasses any custom `inspect()` function defined on `obj`. + */ + dir(obj: any, options?: NodeJS.InspectOptions): void; + /** + * This method calls {@link console.log()} passing it the arguments received. Please note that this method does not produce any XML formatting + */ + dirxml(...data: any[]): void; + /** + * Prints to `stderr` with newline. + */ + error(message?: any, ...optionalParams: any[]): void; + /** + * Increases indentation of subsequent lines by two spaces. + * If one or more `label`s are provided, those are printed first without the additional indentation. + */ + group(...label: any[]): void; + /** + * The `console.groupCollapsed()` function is an alias for {@link console.group()}. + */ + groupCollapsed(...label: any[]): void; + /** + * Decreases indentation of subsequent lines by two spaces. + */ + groupEnd(): void; + /** + * The {@link console.info()} function is an alias for {@link console.log()}. + */ + info(message?: any, ...optionalParams: any[]): void; + /** + * Prints to `stdout` with newline. + */ + log(message?: any, ...optionalParams: any[]): void; + /** + * This method does not display anything unless used in the inspector. + * Prints to `stdout` the array `array` formatted as a table. + */ + table(tabularData: any, properties?: string[]): void; + /** + * Starts a timer that can be used to compute the duration of an operation. Timers are identified by a unique `label`. + */ + time(label?: string): void; + /** + * Stops a timer that was previously started by calling {@link console.time()} and prints the result to `stdout`. + */ + timeEnd(label?: string): void; + /** + * For a timer that was previously started by calling {@link console.time()}, prints the elapsed time and other `data` arguments to `stdout`. + */ + timeLog(label?: string, ...data: any[]): void; + /** + * Prints to `stderr` the string 'Trace :', followed by the {@link util.format()} formatted message and stack trace to the current position in the code. + */ + trace(message?: any, ...optionalParams: any[]): void; + /** + * The {@link console.warn()} function is an alias for {@link console.error()}. + */ + warn(message?: any, ...optionalParams: any[]): void; + + // --- Inspector mode only --- + /** + * This method does not display anything unless used in the inspector. + * The console.markTimeline() method is the deprecated form of console.timeStamp(). + * + * @deprecated Use console.timeStamp() instead. + */ + markTimeline(label?: string): void; + /** + * This method does not display anything unless used in the inspector. + * Starts a JavaScript CPU profile with an optional label. + */ + profile(label?: string): void; + /** + * This method does not display anything unless used in the inspector. + * Stops the current JavaScript CPU profiling session if one has been started and prints the report to the Profiles panel of the inspector. + */ + profileEnd(label?: string): void; + /** + * This method does not display anything unless used in the inspector. + * Adds an event with the label `label` to the Timeline panel of the inspector. + */ + timeStamp(label?: string): void; + /** + * This method does not display anything unless used in the inspector. + * The console.timeline() method is the deprecated form of console.time(). + * + * @deprecated Use console.time() instead. + */ + timeline(label?: string): void; + /** + * This method does not display anything unless used in the inspector. + * The console.timelineEnd() method is the deprecated form of console.timeEnd(). + * + * @deprecated Use console.timeEnd() instead. + */ + timelineEnd(label?: string): void; +} + +interface Error { + stack?: string; +} + +// Declare "static" methods in Error +interface ErrorConstructor { + /** Create .stack property on a target object */ + captureStackTrace(targetObject: Object, constructorOpt?: Function): void; + + /** + * Optional override for formatting stack traces + * + * @see https://github.com/v8/v8/wiki/Stack%20Trace%20API#customizing-stack-traces + */ + prepareStackTrace?: (err: Error, stackTraces: NodeJS.CallSite[]) => any; + + stackTraceLimit: number; +} + +interface SymbolConstructor { + readonly observable: symbol; +} + +// Node.js ESNEXT support +interface String { + /** Removes whitespace from the left end of a string. */ + trimLeft(): string; + /** Removes whitespace from the right end of a string. */ + trimRight(): string; +} + +interface ImportMeta { + url: string; +} + +/*-----------------------------------------------* + * * + * GLOBAL * + * * + ------------------------------------------------*/ +declare var process: NodeJS.Process; +declare var global: NodeJS.Global; +declare var console: Console; + +declare var __filename: string; +declare var __dirname: string; + +declare function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout; +declare namespace setTimeout { + function __promisify__(ms: number): Promise; + function __promisify__(ms: number, value: T): Promise; +} +declare function clearTimeout(timeoutId: NodeJS.Timeout): void; +declare function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout; +declare function clearInterval(intervalId: NodeJS.Timeout): void; +declare function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate; +declare namespace setImmediate { + function __promisify__(): Promise; + function __promisify__(value: T): Promise; +} +declare function clearImmediate(immediateId: NodeJS.Immediate): void; + +/** + * @experimental + */ +declare function queueMicrotask(callback: () => void): void; + +// TODO: change to `type NodeRequireFunction = (id: string) => any;` in next mayor version. +interface NodeRequireFunction { + /* tslint:disable-next-line:callable-types */ + (id: string): any; +} + +interface NodeRequire extends NodeRequireFunction { + resolve: RequireResolve; + cache: any; + /** + * @deprecated + */ + extensions: NodeExtensions; + main: NodeModule | undefined; +} + +interface RequireResolve { + (id: string, options?: { paths?: string[]; }): string; + paths(request: string): string[] | null; +} + +interface NodeExtensions { + '.js': (m: NodeModule, filename: string) => any; + '.json': (m: NodeModule, filename: string) => any; + '.node': (m: NodeModule, filename: string) => any; + [ext: string]: (m: NodeModule, filename: string) => any; +} + +declare var require: NodeRequire; + +interface NodeModule { + exports: any; + require: NodeRequireFunction; + id: string; + filename: string; + loaded: boolean; + parent: NodeModule | null; + children: NodeModule[]; + paths: string[]; +} + +declare var module: NodeModule; + +// Same as module.exports +declare var exports: any; + +// Buffer class +type BufferEncoding = "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex"; + +interface Buffer { + constructor: typeof Buffer; +} + +/** + * Raw data is stored in instances of the Buffer class. + * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized. + * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' + */ +declare class Buffer extends Uint8Array { + /** + * Allocates a new buffer containing the given {str}. + * + * @param str String to store in buffer. + * @param encoding encoding to use, optional. Default is 'utf8' + * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead. + */ + constructor(str: string, encoding?: BufferEncoding); + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`). + */ + constructor(size: number); + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. + */ + constructor(array: Uint8Array); + /** + * Produces a Buffer backed by the same allocated memory as + * the given {ArrayBuffer}/{SharedArrayBuffer}. + * + * + * @param arrayBuffer The ArrayBuffer with which to share memory. + * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead. + */ + constructor(arrayBuffer: ArrayBuffer | SharedArrayBuffer); + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. + */ + constructor(array: any[]); + /** + * Copies the passed {buffer} data onto a new {Buffer} instance. + * + * @param buffer The buffer to copy. + * @deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead. + */ + constructor(buffer: Buffer); + /** + * When passed a reference to the .buffer property of a TypedArray instance, + * the newly created Buffer will share the same allocated memory as the TypedArray. + * The optional {byteOffset} and {length} arguments specify a memory range + * within the {arrayBuffer} that will be shared by the Buffer. + * + * @param arrayBuffer The .buffer property of any TypedArray or a new ArrayBuffer() + */ + static from(arrayBuffer: ArrayBuffer | SharedArrayBuffer, byteOffset?: number, length?: number): Buffer; + /** + * Creates a new Buffer using the passed {data} + * @param data data to create a new Buffer + */ + static from(data: number[]): Buffer; + static from(data: Uint8Array): Buffer; + /** + * Creates a new Buffer containing the given JavaScript string {str}. + * If provided, the {encoding} parameter identifies the character encoding. + * If not provided, {encoding} defaults to 'utf8'. + */ + static from(str: string, encoding?: BufferEncoding): Buffer; + /** + * Creates a new Buffer using the passed {data} + * @param values to create a new Buffer + */ + static of(...items: number[]): Buffer; + /** + * Returns true if {obj} is a Buffer + * + * @param obj object to test. + */ + static isBuffer(obj: any): obj is Buffer; + /** + * Returns true if {encoding} is a valid encoding argument. + * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' + * + * @param encoding string to test. + */ + static isEncoding(encoding: string): encoding is BufferEncoding; + /** + * Gives the actual byte length of a string. encoding defaults to 'utf8'. + * This is not the same as String.prototype.length since that returns the number of characters in a string. + * + * @param string string to test. + * @param encoding encoding used to evaluate (defaults to 'utf8') + */ + static byteLength( + string: string | NodeJS.TypedArray | DataView | ArrayBuffer | SharedArrayBuffer, + encoding?: BufferEncoding + ): number; + /** + * Returns a buffer which is the result of concatenating all the buffers in the list together. + * + * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. + * If the list has exactly one item, then the first item of the list is returned. + * If the list has more than one item, then a new Buffer is created. + * + * @param list An array of Buffer objects to concatenate + * @param totalLength Total length of the buffers when concatenated. + * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. + */ + static concat(list: Uint8Array[], totalLength?: number): Buffer; + /** + * The same as buf1.compare(buf2). + */ + static compare(buf1: Uint8Array, buf2: Uint8Array): number; + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + * @param fill if specified, buffer will be initialized by calling buf.fill(fill). + * If parameter is omitted, buffer will be filled with zeros. + * @param encoding encoding used for call to buf.fill while initalizing + */ + static alloc(size: number, fill?: string | Buffer | number, encoding?: BufferEncoding): Buffer; + /** + * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + static allocUnsafe(size: number): Buffer; + /** + * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + static allocUnsafeSlow(size: number): Buffer; + /** + * This is the number of bytes used to determine the size of pre-allocated, internal Buffer instances used for pooling. This value may be modified. + */ + static poolSize: number; + + write(string: string, encoding?: BufferEncoding): number; + write(string: string, offset: number, encoding?: BufferEncoding): number; + write(string: string, offset: number, length: number, encoding?: BufferEncoding): number; + toString(encoding?: string, start?: number, end?: number): string; + toJSON(): { type: 'Buffer'; data: number[] }; + equals(otherBuffer: Uint8Array): boolean; + compare( + otherBuffer: Uint8Array, + targetStart?: number, + targetEnd?: number, + sourceStart?: number, + sourceEnd?: number + ): number; + copy(targetBuffer: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; + /** + * Returns a new `Buffer` that references **the same memory as the original**, but offset and cropped by the start and end indices. + * + * This method is incompatible with `Uint8Array#slice()`, which returns a copy of the original memory. + * + * @param begin Where the new `Buffer` will start. Default: `0`. + * @param end Where the new `Buffer` will end (not inclusive). Default: `buf.length`. + */ + slice(begin?: number, end?: number): Buffer; + /** + * Returns a new `Buffer` that references **the same memory as the original**, but offset and cropped by the start and end indices. + * + * This method is compatible with `Uint8Array#subarray()`. + * + * @param begin Where the new `Buffer` will start. Default: `0`. + * @param end Where the new `Buffer` will end (not inclusive). Default: `buf.length`. + */ + subarray(begin?: number, end?: number): Buffer; + writeUIntLE(value: number, offset: number, byteLength: number): number; + writeUIntBE(value: number, offset: number, byteLength: number): number; + writeIntLE(value: number, offset: number, byteLength: number): number; + writeIntBE(value: number, offset: number, byteLength: number): number; + readUIntLE(offset: number, byteLength: number): number; + readUIntBE(offset: number, byteLength: number): number; + readIntLE(offset: number, byteLength: number): number; + readIntBE(offset: number, byteLength: number): number; + readUInt8(offset: number): number; + readUInt16LE(offset: number): number; + readUInt16BE(offset: number): number; + readUInt32LE(offset: number): number; + readUInt32BE(offset: number): number; + readInt8(offset: number): number; + readInt16LE(offset: number): number; + readInt16BE(offset: number): number; + readInt32LE(offset: number): number; + readInt32BE(offset: number): number; + readFloatLE(offset: number): number; + readFloatBE(offset: number): number; + readDoubleLE(offset: number): number; + readDoubleBE(offset: number): number; + reverse(): this; + swap16(): Buffer; + swap32(): Buffer; + swap64(): Buffer; + writeUInt8(value: number, offset: number): number; + writeUInt16LE(value: number, offset: number): number; + writeUInt16BE(value: number, offset: number): number; + writeUInt32LE(value: number, offset: number): number; + writeUInt32BE(value: number, offset: number): number; + writeInt8(value: number, offset: number): number; + writeInt16LE(value: number, offset: number): number; + writeInt16BE(value: number, offset: number): number; + writeInt32LE(value: number, offset: number): number; + writeInt32BE(value: number, offset: number): number; + writeFloatLE(value: number, offset: number): number; + writeFloatBE(value: number, offset: number): number; + writeDoubleLE(value: number, offset: number): number; + writeDoubleBE(value: number, offset: number): number; + + fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this; + + indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number; + lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number; + entries(): IterableIterator<[number, number]>; + includes(value: string | number | Buffer, byteOffset?: number, encoding?: BufferEncoding): boolean; + keys(): IterableIterator; + values(): IterableIterator; +} + +/*----------------------------------------------* +* * +* GLOBAL INTERFACES * +* * +*-----------------------------------------------*/ +declare namespace NodeJS { + interface InspectOptions { + /** + * If set to `true`, getters are going to be + * inspected as well. If set to `'get'` only getters without setter are going + * to be inspected. If set to `'set'` only getters having a corresponding + * setter are going to be inspected. This might cause side effects depending on + * the getter function. + * @default `false` + */ + getters?: 'get' | 'set' | boolean; + showHidden?: boolean; + /** + * @default 2 + */ + depth?: number | null; + colors?: boolean; + customInspect?: boolean; + showProxy?: boolean; + maxArrayLength?: number | null; + breakLength?: number; + /** + * Setting this to `false` causes each object key + * to be displayed on a new line. It will also add new lines to text that is + * longer than `breakLength`. If set to a number, the most `n` inner elements + * are united on a single line as long as all properties fit into + * `breakLength`. Short array elements are also grouped together. Note that no + * text will be reduced below 16 characters, no matter the `breakLength` size. + * For more information, see the example below. + * @default `true` + */ + compact?: boolean | number; + sorted?: boolean | ((a: string, b: string) => number); + } + + interface ConsoleConstructorOptions { + stdout: WritableStream; + stderr?: WritableStream; + ignoreErrors?: boolean; + colorMode?: boolean | 'auto'; + inspectOptions?: InspectOptions; + } + + interface ConsoleConstructor { + prototype: Console; + new(stdout: WritableStream, stderr?: WritableStream, ignoreErrors?: boolean): Console; + new(options: ConsoleConstructorOptions): Console; + } + + interface CallSite { + /** + * Value of "this" + */ + getThis(): any; + + /** + * Type of "this" as a string. + * This is the name of the function stored in the constructor field of + * "this", if available. Otherwise the object's [[Class]] internal + * property. + */ + getTypeName(): string | null; + + /** + * Current function + */ + getFunction(): Function | undefined; + + /** + * Name of the current function, typically its name property. + * If a name property is not available an attempt will be made to try + * to infer a name from the function's context. + */ + getFunctionName(): string | null; + + /** + * Name of the property [of "this" or one of its prototypes] that holds + * the current function + */ + getMethodName(): string | null; + + /** + * Name of the script [if this function was defined in a script] + */ + getFileName(): string | null; + + /** + * Current line number [if this function was defined in a script] + */ + getLineNumber(): number | null; + + /** + * Current column number [if this function was defined in a script] + */ + getColumnNumber(): number | null; + + /** + * A call site object representing the location where eval was called + * [if this function was created using a call to eval] + */ + getEvalOrigin(): string | undefined; + + /** + * Is this a toplevel invocation, that is, is "this" the global object? + */ + isToplevel(): boolean; + + /** + * Does this call take place in code defined by a call to eval? + */ + isEval(): boolean; + + /** + * Is this call in native V8 code? + */ + isNative(): boolean; + + /** + * Is this a constructor call? + */ + isConstructor(): boolean; + } + + interface ErrnoException extends Error { + errno?: number; + code?: string; + path?: string; + syscall?: string; + stack?: string; + } + + class EventEmitter { + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + off(event: string | symbol, listener: (...args: any[]) => void): this; + removeAllListeners(event?: string | symbol): this; + setMaxListeners(n: number): this; + getMaxListeners(): number; + listeners(event: string | symbol): Function[]; + rawListeners(event: string | symbol): Function[]; + emit(event: string | symbol, ...args: any[]): boolean; + listenerCount(type: string | symbol): number; + // Added in Node 6... + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + eventNames(): Array; + } + + interface ReadableStream extends EventEmitter { + readable: boolean; + read(size?: number): string | Buffer; + setEncoding(encoding: string): this; + pause(): this; + resume(): this; + isPaused(): boolean; + pipe(destination: T, options?: { end?: boolean; }): T; + unpipe(destination?: WritableStream): this; + unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void; + wrap(oldStream: ReadableStream): this; + [Symbol.asyncIterator](): AsyncIterableIterator; + } + + interface WritableStream extends EventEmitter { + writable: boolean; + write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean; + write(str: string, encoding?: string, cb?: (err?: Error | null) => void): boolean; + end(cb?: () => void): void; + end(data: string | Uint8Array, cb?: () => void): void; + end(str: string, encoding?: string, cb?: () => void): void; + } + + interface ReadWriteStream extends ReadableStream, WritableStream { } + + interface Events extends EventEmitter { } + + interface Domain extends Events { + run(fn: (...args: any[]) => T, ...args: any[]): T; + add(emitter: EventEmitter | Timer): void; + remove(emitter: EventEmitter | Timer): void; + bind(cb: T): T; + intercept(cb: T): T; + + addListener(event: string, listener: (...args: any[]) => void): this; + on(event: string, listener: (...args: any[]) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + removeListener(event: string, listener: (...args: any[]) => void): this; + removeAllListeners(event?: string): this; + } + + interface MemoryUsage { + rss: number; + heapTotal: number; + heapUsed: number; + external: number; + } + + interface CpuUsage { + user: number; + system: number; + } + + interface ProcessRelease { + name: string; + sourceUrl?: string; + headersUrl?: string; + libUrl?: string; + lts?: string; + } + + interface ProcessVersions { + http_parser: string; + node: string; + v8: string; + ares: string; + uv: string; + zlib: string; + modules: string; + openssl: string; + } + + type Platform = 'aix' + | 'android' + | 'darwin' + | 'freebsd' + | 'linux' + | 'openbsd' + | 'sunos' + | 'win32' + | 'cygwin'; + + type Signals = + "SIGABRT" | "SIGALRM" | "SIGBUS" | "SIGCHLD" | "SIGCONT" | "SIGFPE" | "SIGHUP" | "SIGILL" | "SIGINT" | "SIGIO" | + "SIGIOT" | "SIGKILL" | "SIGPIPE" | "SIGPOLL" | "SIGPROF" | "SIGPWR" | "SIGQUIT" | "SIGSEGV" | "SIGSTKFLT" | + "SIGSTOP" | "SIGSYS" | "SIGTERM" | "SIGTRAP" | "SIGTSTP" | "SIGTTIN" | "SIGTTOU" | "SIGUNUSED" | "SIGURG" | + "SIGUSR1" | "SIGUSR2" | "SIGVTALRM" | "SIGWINCH" | "SIGXCPU" | "SIGXFSZ" | "SIGBREAK" | "SIGLOST" | "SIGINFO"; + + type MultipleResolveType = 'resolve' | 'reject'; + + type BeforeExitListener = (code: number) => void; + type DisconnectListener = () => void; + type ExitListener = (code: number) => void; + type RejectionHandledListener = (promise: Promise) => void; + type UncaughtExceptionListener = (error: Error) => void; + type UnhandledRejectionListener = (reason: {} | null | undefined, promise: Promise) => void; + type WarningListener = (warning: Error) => void; + type MessageListener = (message: any, sendHandle: any) => void; + type SignalsListener = (signal: Signals) => void; + type NewListenerListener = (type: string | symbol, listener: (...args: any[]) => void) => void; + type RemoveListenerListener = (type: string | symbol, listener: (...args: any[]) => void) => void; + type MultipleResolveListener = (type: MultipleResolveType, promise: Promise, value: any) => void; + + interface Socket extends ReadWriteStream { + isTTY?: true; + } + + interface ProcessEnv { + [key: string]: string | undefined; + } + + interface WriteStream extends Socket { + readonly writableFinished: boolean; + readonly writableHighWaterMark: number; + readonly writableLength: number; + columns?: number; + rows?: number; + _write(chunk: any, encoding: string, callback: (err?: null | Error) => void): void; + _destroy(err: Error | null, callback: (err?: null | Error) => void): void; + _final(callback: (err?: null | Error) => void): void; + setDefaultEncoding(encoding: string): this; + cork(): void; + uncork(): void; + destroy(error?: Error): void; + } + interface ReadStream extends Socket { + readonly readableHighWaterMark: number; + readonly readableLength: number; + isRaw?: boolean; + setRawMode?(mode: boolean): void; + _read(size: number): void; + _destroy(err: Error | null, callback: (err?: null | Error) => void): void; + push(chunk: any, encoding?: string): boolean; + destroy(error?: Error): void; + } + + interface HRTime { + (time?: [number, number]): [number, number]; + } + + interface ProcessReport { + /** + * Directory where the report is written. + * working directory of the Node.js process. + * @default '' indicating that reports are written to the current + */ + directory: string; + + /** + * Filename where the report is written. + * The default value is the empty string. + * @default '' the output filename will be comprised of a timestamp, + * PID, and sequence number. + */ + filename: string; + + /** + * Returns a JSON-formatted diagnostic report for the running process. + * The report's JavaScript stack trace is taken from err, if present. + */ + getReport(err?: Error): string; + + /** + * If true, a diagnostic report is generated on fatal errors, + * such as out of memory errors or failed C++ assertions. + * @default false + */ + reportOnFatalError: boolean; + + /** + * If true, a diagnostic report is generated when the process + * receives the signal specified by process.report.signal. + * @defaul false + */ + reportOnSignal: boolean; + + /** + * If true, a diagnostic report is generated on uncaught exception. + * @default false + */ + reportOnUncaughtException: boolean; + + /** + * The signal used to trigger the creation of a diagnostic report. + * @default 'SIGUSR2' + */ + signal: Signals; + + /** + * Writes a diagnostic report to a file. If filename is not provided, the default filename + * includes the date, time, PID, and a sequence number. + * The report's JavaScript stack trace is taken from err, if present. + * + * @param fileName Name of the file where the report is written. + * This should be a relative path, that will be appended to the directory specified in + * `process.report.directory`, or the current working directory of the Node.js process, + * if unspecified. + * @param error A custom error used for reporting the JavaScript stack. + * @return Filename of the generated report. + */ + writeReport(fileName?: string): string; + writeReport(error?: Error): string; + writeReport(fileName?: string, err?: Error): string; + } + + interface ResourceUsage { + fsRead: number; + fsWrite: number; + involuntaryContextSwitches: number; + ipcReceived: number; + ipcSent: number; + majorPageFault: number; + maxRSS: number; + minorPageFault: number; + sharedMemorySize: number; + signalsCount: number; + swappedOut: number; + systemCPUTime: number; + unsharedDataSize: number; + unsharedStackSize: number; + userCPUTime: number; + voluntaryContextSwitches: number; + } + + interface Process extends EventEmitter { + /** + * Can also be a tty.WriteStream, not typed due to limitation.s + */ + stdout: WriteStream; + /** + * Can also be a tty.WriteStream, not typed due to limitation.s + */ + stderr: WriteStream; + stdin: ReadStream; + openStdin(): Socket; + argv: string[]; + argv0: string; + execArgv: string[]; + execPath: string; + abort(): void; + chdir(directory: string): void; + cwd(): string; + debugPort: number; + emitWarning(warning: string | Error, name?: string, ctor?: Function): void; + env: ProcessEnv; + exit(code?: number): never; + exitCode?: number; + getgid(): number; + setgid(id: number | string): void; + getuid(): number; + setuid(id: number | string): void; + geteuid(): number; + seteuid(id: number | string): void; + getegid(): number; + setegid(id: number | string): void; + getgroups(): number[]; + setgroups(groups: Array): void; + setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void; + hasUncaughtExceptionCaptureCallback(): boolean; + version: string; + versions: ProcessVersions; + config: { + target_defaults: { + cflags: any[]; + default_configuration: string; + defines: string[]; + include_dirs: string[]; + libraries: string[]; + }; + variables: { + clang: number; + host_arch: string; + node_install_npm: boolean; + node_install_waf: boolean; + node_prefix: string; + node_shared_openssl: boolean; + node_shared_v8: boolean; + node_shared_zlib: boolean; + node_use_dtrace: boolean; + node_use_etw: boolean; + node_use_openssl: boolean; + target_arch: string; + v8_no_strict_aliasing: number; + v8_use_snapshot: boolean; + visibility: string; + }; + }; + kill(pid: number, signal?: string | number): void; + pid: number; + ppid: number; + title: string; + arch: string; + platform: Platform; + mainModule?: NodeModule; + memoryUsage(): MemoryUsage; + cpuUsage(previousValue?: CpuUsage): CpuUsage; + nextTick(callback: Function, ...args: any[]): void; + release: ProcessRelease; + features: { + inspector: boolean; + debug: boolean; + uv: boolean; + ipv6: boolean; + tls_alpn: boolean; + tls_sni: boolean; + tls_ocsp: boolean; + tls: boolean; + }; + /** + * Can only be set if not in worker thread. + */ + umask(mask?: number): number; + uptime(): number; + hrtime: HRTime; + domain: Domain; + + // Worker + send?(message: any, sendHandle?: any, options?: { swallowErrors?: boolean}, callback?: (error: Error | null) => void): boolean; + disconnect(): void; + connected: boolean; + + /** + * The `process.allowedNodeEnvironmentFlags` property is a special, + * read-only `Set` of flags allowable within the [`NODE_OPTIONS`][] + * environment variable. + */ + allowedNodeEnvironmentFlags: ReadonlySet; + + /** + * Only available with `--experimental-report` + */ + report?: ProcessReport; + + resourceUsage(): ResourceUsage; + + /** + * EventEmitter + * 1. beforeExit + * 2. disconnect + * 3. exit + * 4. message + * 5. rejectionHandled + * 6. uncaughtException + * 7. unhandledRejection + * 8. warning + * 9. message + * 10. + * 11. newListener/removeListener inherited from EventEmitter + */ + addListener(event: "beforeExit", listener: BeforeExitListener): this; + addListener(event: "disconnect", listener: DisconnectListener): this; + addListener(event: "exit", listener: ExitListener): this; + addListener(event: "rejectionHandled", listener: RejectionHandledListener): this; + addListener(event: "uncaughtException", listener: UncaughtExceptionListener): this; + addListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this; + addListener(event: "warning", listener: WarningListener): this; + addListener(event: "message", listener: MessageListener): this; + addListener(event: Signals, listener: SignalsListener): this; + addListener(event: "newListener", listener: NewListenerListener): this; + addListener(event: "removeListener", listener: RemoveListenerListener): this; + addListener(event: "multipleResolves", listener: MultipleResolveListener): this; + + emit(event: "beforeExit", code: number): boolean; + emit(event: "disconnect"): boolean; + emit(event: "exit", code: number): boolean; + emit(event: "rejectionHandled", promise: Promise): boolean; + emit(event: "uncaughtException", error: Error): boolean; + emit(event: "unhandledRejection", reason: any, promise: Promise): boolean; + emit(event: "warning", warning: Error): boolean; + emit(event: "message", message: any, sendHandle: any): this; + emit(event: Signals, signal: Signals): boolean; + emit(event: "newListener", eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(event: "removeListener", eventName: string, listener: (...args: any[]) => void): this; + emit(event: "multipleResolves", listener: MultipleResolveListener): this; + + on(event: "beforeExit", listener: BeforeExitListener): this; + on(event: "disconnect", listener: DisconnectListener): this; + on(event: "exit", listener: ExitListener): this; + on(event: "rejectionHandled", listener: RejectionHandledListener): this; + on(event: "uncaughtException", listener: UncaughtExceptionListener): this; + on(event: "unhandledRejection", listener: UnhandledRejectionListener): this; + on(event: "warning", listener: WarningListener): this; + on(event: "message", listener: MessageListener): this; + on(event: Signals, listener: SignalsListener): this; + on(event: "newListener", listener: NewListenerListener): this; + on(event: "removeListener", listener: RemoveListenerListener): this; + on(event: "multipleResolves", listener: MultipleResolveListener): this; + + once(event: "beforeExit", listener: BeforeExitListener): this; + once(event: "disconnect", listener: DisconnectListener): this; + once(event: "exit", listener: ExitListener): this; + once(event: "rejectionHandled", listener: RejectionHandledListener): this; + once(event: "uncaughtException", listener: UncaughtExceptionListener): this; + once(event: "unhandledRejection", listener: UnhandledRejectionListener): this; + once(event: "warning", listener: WarningListener): this; + once(event: "message", listener: MessageListener): this; + once(event: Signals, listener: SignalsListener): this; + once(event: "newListener", listener: NewListenerListener): this; + once(event: "removeListener", listener: RemoveListenerListener): this; + once(event: "multipleResolves", listener: MultipleResolveListener): this; + + prependListener(event: "beforeExit", listener: BeforeExitListener): this; + prependListener(event: "disconnect", listener: DisconnectListener): this; + prependListener(event: "exit", listener: ExitListener): this; + prependListener(event: "rejectionHandled", listener: RejectionHandledListener): this; + prependListener(event: "uncaughtException", listener: UncaughtExceptionListener): this; + prependListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this; + prependListener(event: "warning", listener: WarningListener): this; + prependListener(event: "message", listener: MessageListener): this; + prependListener(event: Signals, listener: SignalsListener): this; + prependListener(event: "newListener", listener: NewListenerListener): this; + prependListener(event: "removeListener", listener: RemoveListenerListener): this; + prependListener(event: "multipleResolves", listener: MultipleResolveListener): this; + + prependOnceListener(event: "beforeExit", listener: BeforeExitListener): this; + prependOnceListener(event: "disconnect", listener: DisconnectListener): this; + prependOnceListener(event: "exit", listener: ExitListener): this; + prependOnceListener(event: "rejectionHandled", listener: RejectionHandledListener): this; + prependOnceListener(event: "uncaughtException", listener: UncaughtExceptionListener): this; + prependOnceListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this; + prependOnceListener(event: "warning", listener: WarningListener): this; + prependOnceListener(event: "message", listener: MessageListener): this; + prependOnceListener(event: Signals, listener: SignalsListener): this; + prependOnceListener(event: "newListener", listener: NewListenerListener): this; + prependOnceListener(event: "removeListener", listener: RemoveListenerListener): this; + prependOnceListener(event: "multipleResolves", listener: MultipleResolveListener): this; + + listeners(event: "beforeExit"): BeforeExitListener[]; + listeners(event: "disconnect"): DisconnectListener[]; + listeners(event: "exit"): ExitListener[]; + listeners(event: "rejectionHandled"): RejectionHandledListener[]; + listeners(event: "uncaughtException"): UncaughtExceptionListener[]; + listeners(event: "unhandledRejection"): UnhandledRejectionListener[]; + listeners(event: "warning"): WarningListener[]; + listeners(event: "message"): MessageListener[]; + listeners(event: Signals): SignalsListener[]; + listeners(event: "newListener"): NewListenerListener[]; + listeners(event: "removeListener"): RemoveListenerListener[]; + listeners(event: "multipleResolves"): MultipleResolveListener[]; + } + + interface Global { + Array: typeof Array; + ArrayBuffer: typeof ArrayBuffer; + Boolean: typeof Boolean; + Buffer: typeof Buffer; + DataView: typeof DataView; + Date: typeof Date; + Error: typeof Error; + EvalError: typeof EvalError; + Float32Array: typeof Float32Array; + Float64Array: typeof Float64Array; + Function: typeof Function; + GLOBAL: Global; + Infinity: typeof Infinity; + Int16Array: typeof Int16Array; + Int32Array: typeof Int32Array; + Int8Array: typeof Int8Array; + Intl: typeof Intl; + JSON: typeof JSON; + Map: MapConstructor; + Math: typeof Math; + NaN: typeof NaN; + Number: typeof Number; + Object: typeof Object; + Promise: Function; + RangeError: typeof RangeError; + ReferenceError: typeof ReferenceError; + RegExp: typeof RegExp; + Set: SetConstructor; + String: typeof String; + Symbol: Function; + SyntaxError: typeof SyntaxError; + TypeError: typeof TypeError; + URIError: typeof URIError; + Uint16Array: typeof Uint16Array; + Uint32Array: typeof Uint32Array; + Uint8Array: typeof Uint8Array; + Uint8ClampedArray: Function; + WeakMap: WeakMapConstructor; + WeakSet: WeakSetConstructor; + clearImmediate: (immediateId: Immediate) => void; + clearInterval: (intervalId: Timeout) => void; + clearTimeout: (timeoutId: Timeout) => void; + console: typeof console; + decodeURI: typeof decodeURI; + decodeURIComponent: typeof decodeURIComponent; + encodeURI: typeof encodeURI; + encodeURIComponent: typeof encodeURIComponent; + escape: (str: string) => string; + eval: typeof eval; + global: Global; + isFinite: typeof isFinite; + isNaN: typeof isNaN; + parseFloat: typeof parseFloat; + parseInt: typeof parseInt; + process: Process; + root: Global; + setImmediate: (callback: (...args: any[]) => void, ...args: any[]) => Immediate; + setInterval: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => Timeout; + setTimeout: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => Timeout; + queueMicrotask: typeof queueMicrotask; + undefined: typeof undefined; + unescape: (str: string) => string; + gc: () => void; + v8debug?: any; + } + + // compatibility with older typings + interface Timer { + hasRef(): boolean; + ref(): this; + refresh(): this; + unref(): this; + } + + class Immediate { + hasRef(): boolean; + ref(): this; + unref(): this; + _onImmediate: Function; // to distinguish it from the Timeout class + } + + class Timeout implements Timer { + hasRef(): boolean; + ref(): this; + refresh(): this; + unref(): this; + } + + class Module { + static runMain(): void; + static wrap(code: string): string; + static createRequireFromPath(path: string): (path: string) => any; + static builtinModules: string[]; + + static Module: typeof Module; + + exports: any; + require: NodeRequireFunction; + id: string; + filename: string; + loaded: boolean; + parent: Module | null; + children: Module[]; + paths: string[]; + + constructor(id: string, parent?: Module); + } + + type TypedArray = Uint8Array | Uint8ClampedArray | Uint16Array | Uint32Array | Int8Array | Int16Array | Int32Array | Float32Array | Float64Array; +} diff --git a/node_modules/@types/node/http.d.ts b/node_modules/@types/node/http.d.ts new file mode 100644 index 00000000..31175d76 --- /dev/null +++ b/node_modules/@types/node/http.d.ts @@ -0,0 +1,279 @@ +declare module "http" { + import * as events from "events"; + import * as stream from "stream"; + import { URL } from "url"; + import { Socket, Server as NetServer } from "net"; + + // incoming headers will never contain number + interface IncomingHttpHeaders { + 'accept'?: string; + 'accept-language'?: string; + 'accept-patch'?: string; + 'accept-ranges'?: string; + 'access-control-allow-credentials'?: string; + 'access-control-allow-headers'?: string; + 'access-control-allow-methods'?: string; + 'access-control-allow-origin'?: string; + 'access-control-expose-headers'?: string; + 'access-control-max-age'?: string; + 'age'?: string; + 'allow'?: string; + 'alt-svc'?: string; + 'authorization'?: string; + 'cache-control'?: string; + 'connection'?: string; + 'content-disposition'?: string; + 'content-encoding'?: string; + 'content-language'?: string; + 'content-length'?: string; + 'content-location'?: string; + 'content-range'?: string; + 'content-type'?: string; + 'cookie'?: string; + 'date'?: string; + 'expect'?: string; + 'expires'?: string; + 'forwarded'?: string; + 'from'?: string; + 'host'?: string; + 'if-match'?: string; + 'if-modified-since'?: string; + 'if-none-match'?: string; + 'if-unmodified-since'?: string; + 'last-modified'?: string; + 'location'?: string; + 'pragma'?: string; + 'proxy-authenticate'?: string; + 'proxy-authorization'?: string; + 'public-key-pins'?: string; + 'range'?: string; + 'referer'?: string; + 'retry-after'?: string; + 'set-cookie'?: string[]; + 'strict-transport-security'?: string; + 'tk'?: string; + 'trailer'?: string; + 'transfer-encoding'?: string; + 'upgrade'?: string; + 'user-agent'?: string; + 'vary'?: string; + 'via'?: string; + 'warning'?: string; + 'www-authenticate'?: string; + [header: string]: string | string[] | undefined; + } + + // outgoing headers allows numbers (as they are converted internally to strings) + interface OutgoingHttpHeaders { + [header: string]: number | string | string[] | undefined; + } + + interface ClientRequestArgs { + protocol?: string; + host?: string; + hostname?: string; + family?: number; + port?: number | string; + defaultPort?: number | string; + localAddress?: string; + socketPath?: string; + method?: string; + path?: string; + headers?: OutgoingHttpHeaders; + auth?: string; + agent?: Agent | boolean; + _defaultAgent?: Agent; + timeout?: number; + setHost?: boolean; + // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L278 + createConnection?: (options: ClientRequestArgs, oncreate: (err: Error, socket: Socket) => void) => Socket; + } + + interface ServerOptions { + IncomingMessage?: typeof IncomingMessage; + ServerResponse?: typeof ServerResponse; + } + + type RequestListener = (req: IncomingMessage, res: ServerResponse) => void; + + class Server extends NetServer { + constructor(requestListener?: RequestListener); + constructor(options: ServerOptions, requestListener?: RequestListener); + + setTimeout(msecs?: number, callback?: () => void): this; + setTimeout(callback: () => void): this; + /** + * Limits maximum incoming headers count. If set to 0, no limit will be applied. + * @default 2000 + * {@link https://nodejs.org/api/http.html#http_server_maxheaderscount} + */ + maxHeadersCount: number | null; + timeout: number; + /** + * Limit the amount of time the parser will wait to receive the complete HTTP headers. + * @default 40000 + * {@link https://nodejs.org/api/http.html#http_server_headerstimeout} + */ + headersTimeout: number; + keepAliveTimeout: number; + } + + // https://github.com/nodejs/node/blob/master/lib/_http_outgoing.js + class OutgoingMessage extends stream.Writable { + upgrading: boolean; + chunkedEncoding: boolean; + shouldKeepAlive: boolean; + useChunkedEncodingByDefault: boolean; + sendDate: boolean; + finished: boolean; + headersSent: boolean; + connection: Socket; + + constructor(); + + setTimeout(msecs: number, callback?: () => void): this; + setHeader(name: string, value: number | string | string[]): void; + getHeader(name: string): number | string | string[] | undefined; + getHeaders(): OutgoingHttpHeaders; + getHeaderNames(): string[]; + hasHeader(name: string): boolean; + removeHeader(name: string): void; + addTrailers(headers: OutgoingHttpHeaders | Array<[string, string]>): void; + flushHeaders(): void; + } + + // https://github.com/nodejs/node/blob/master/lib/_http_server.js#L108-L256 + class ServerResponse extends OutgoingMessage { + statusCode: number; + statusMessage: string; + + constructor(req: IncomingMessage); + + assignSocket(socket: Socket): void; + detachSocket(socket: Socket): void; + // https://github.com/nodejs/node/blob/master/test/parallel/test-http-write-callbacks.js#L53 + // no args in writeContinue callback + writeContinue(callback?: () => void): void; + writeHead(statusCode: number, reasonPhrase?: string, headers?: OutgoingHttpHeaders): this; + writeHead(statusCode: number, headers?: OutgoingHttpHeaders): this; + } + + // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L77 + class ClientRequest extends OutgoingMessage { + connection: Socket; + socket: Socket; + aborted: number; + + constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void); + + readonly path: string; + abort(): void; + onSocket(socket: Socket): void; + setTimeout(timeout: number, callback?: () => void): this; + setNoDelay(noDelay?: boolean): void; + setSocketKeepAlive(enable?: boolean, initialDelay?: number): void; + } + + class IncomingMessage extends stream.Readable { + constructor(socket: Socket); + + httpVersion: string; + httpVersionMajor: number; + httpVersionMinor: number; + complete: boolean; + connection: Socket; + headers: IncomingHttpHeaders; + rawHeaders: string[]; + trailers: { [key: string]: string | undefined }; + rawTrailers: string[]; + setTimeout(msecs: number, callback: () => void): this; + /** + * Only valid for request obtained from http.Server. + */ + method?: string; + /** + * Only valid for request obtained from http.Server. + */ + url?: string; + /** + * Only valid for response obtained from http.ClientRequest. + */ + statusCode?: number; + /** + * Only valid for response obtained from http.ClientRequest. + */ + statusMessage?: string; + socket: Socket; + destroy(error?: Error): void; + } + + interface AgentOptions { + /** + * Keep sockets around in a pool to be used by other requests in the future. Default = false + */ + keepAlive?: boolean; + /** + * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000. + * Only relevant if keepAlive is set to true. + */ + keepAliveMsecs?: number; + /** + * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity + */ + maxSockets?: number; + /** + * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256. + */ + maxFreeSockets?: number; + /** + * Socket timeout in milliseconds. This will set the timeout after the socket is connected. + */ + timeout?: number; + } + + class Agent { + maxFreeSockets: number; + maxSockets: number; + readonly sockets: { + readonly [key: string]: Socket[]; + }; + readonly requests: { + readonly [key: string]: IncomingMessage[]; + }; + + constructor(opts?: AgentOptions); + + /** + * Destroy any sockets that are currently in use by the agent. + * It is usually not necessary to do this. However, if you are using an agent with KeepAlive enabled, + * then it is best to explicitly shut down the agent when you know that it will no longer be used. Otherwise, + * sockets may hang open for quite a long time before the server terminates them. + */ + destroy(): void; + } + + const METHODS: string[]; + + const STATUS_CODES: { + [errorCode: number]: string | undefined; + [errorCode: string]: string | undefined; + }; + + function createServer(requestListener?: RequestListener): Server; + function createServer(options: ServerOptions, requestListener?: RequestListener): Server; + + // although RequestOptions are passed as ClientRequestArgs to ClientRequest directly, + // create interface RequestOptions would make the naming more clear to developers + interface RequestOptions extends ClientRequestArgs { } + function request(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; + function request(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest; + function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; + function get(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest; + let globalAgent: Agent; + + /** + * Read-only property specifying the maximum allowed size of HTTP headers in bytes. + * Defaults to 8KB. Configurable using the [`--max-http-header-size`][] CLI option. + */ + const maxHeaderSize: number; +} diff --git a/node_modules/@types/node/http2.d.ts b/node_modules/@types/node/http2.d.ts new file mode 100644 index 00000000..184e10f3 --- /dev/null +++ b/node_modules/@types/node/http2.d.ts @@ -0,0 +1,960 @@ +declare module "http2" { + import * as events from "events"; + import * as fs from "fs"; + import * as net from "net"; + import * as stream from "stream"; + import * as tls from "tls"; + import * as url from "url"; + + import { IncomingHttpHeaders as Http1IncomingHttpHeaders, OutgoingHttpHeaders, IncomingMessage, ServerResponse } from "http"; + export { OutgoingHttpHeaders } from "http"; + + export interface IncomingHttpStatusHeader { + ":status"?: number; + } + + export interface IncomingHttpHeaders extends Http1IncomingHttpHeaders { + ":path"?: string; + ":method"?: string; + ":authority"?: string; + ":scheme"?: string; + } + + // Http2Stream + + export interface StreamPriorityOptions { + exclusive?: boolean; + parent?: number; + weight?: number; + silent?: boolean; + } + + export interface StreamState { + localWindowSize?: number; + state?: number; + localClose?: number; + remoteClose?: number; + sumDependencyWeight?: number; + weight?: number; + } + + export interface ServerStreamResponseOptions { + endStream?: boolean; + waitForTrailers?: boolean; + } + + export interface StatOptions { + offset: number; + length: number; + } + + export interface ServerStreamFileResponseOptions { + statCheck?: (stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions) => void | boolean; + waitForTrailers?: boolean; + offset?: number; + length?: number; + } + + export interface ServerStreamFileResponseOptionsWithError extends ServerStreamFileResponseOptions { + onError?: (err: NodeJS.ErrnoException) => void; + } + + export class Http2Stream extends stream.Duplex { + protected constructor(); + + readonly aborted: boolean; + readonly bufferSize: number; + readonly closed: boolean; + readonly destroyed: boolean; + /** + * Set the true if the END_STREAM flag was set in the request or response HEADERS frame received, + * indicating that no additional data should be received and the readable side of the Http2Stream will be closed. + */ + readonly endAfterHeaders: boolean; + readonly id?: number; + readonly pending: boolean; + readonly rstCode: number; + readonly sentHeaders: OutgoingHttpHeaders; + readonly sentInfoHeaders?: OutgoingHttpHeaders[]; + readonly sentTrailers?: OutgoingHttpHeaders; + readonly session: Http2Session; + readonly state: StreamState; + + close(code?: number, callback?: () => void): void; + priority(options: StreamPriorityOptions): void; + setTimeout(msecs: number, callback?: () => void): void; + sendTrailers(headers: OutgoingHttpHeaders): void; + + addListener(event: "aborted", listener: () => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "data", listener: (chunk: Buffer | string) => void): this; + addListener(event: "drain", listener: () => void): this; + addListener(event: "end", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "finish", listener: () => void): this; + addListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; + addListener(event: "pipe", listener: (src: stream.Readable) => void): this; + addListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + addListener(event: "streamClosed", listener: (code: number) => void): this; + addListener(event: "timeout", listener: () => void): this; + addListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: "wantTrailers", listener: () => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "aborted"): boolean; + emit(event: "close"): boolean; + emit(event: "data", chunk: Buffer | string): boolean; + emit(event: "drain"): boolean; + emit(event: "end"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "finish"): boolean; + emit(event: "frameError", frameType: number, errorCode: number): boolean; + emit(event: "pipe", src: stream.Readable): boolean; + emit(event: "unpipe", src: stream.Readable): boolean; + emit(event: "streamClosed", code: number): boolean; + emit(event: "timeout"): boolean; + emit(event: "trailers", trailers: IncomingHttpHeaders, flags: number): boolean; + emit(event: "wantTrailers"): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "aborted", listener: () => void): this; + on(event: "close", listener: () => void): this; + on(event: "data", listener: (chunk: Buffer | string) => void): this; + on(event: "drain", listener: () => void): this; + on(event: "end", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "finish", listener: () => void): this; + on(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; + on(event: "pipe", listener: (src: stream.Readable) => void): this; + on(event: "unpipe", listener: (src: stream.Readable) => void): this; + on(event: "streamClosed", listener: (code: number) => void): this; + on(event: "timeout", listener: () => void): this; + on(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + on(event: "wantTrailers", listener: () => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "aborted", listener: () => void): this; + once(event: "close", listener: () => void): this; + once(event: "data", listener: (chunk: Buffer | string) => void): this; + once(event: "drain", listener: () => void): this; + once(event: "end", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "finish", listener: () => void): this; + once(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; + once(event: "pipe", listener: (src: stream.Readable) => void): this; + once(event: "unpipe", listener: (src: stream.Readable) => void): this; + once(event: "streamClosed", listener: (code: number) => void): this; + once(event: "timeout", listener: () => void): this; + once(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + once(event: "wantTrailers", listener: () => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "aborted", listener: () => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependListener(event: "drain", listener: () => void): this; + prependListener(event: "end", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "finish", listener: () => void): this; + prependListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; + prependListener(event: "pipe", listener: (src: stream.Readable) => void): this; + prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependListener(event: "streamClosed", listener: (code: number) => void): this; + prependListener(event: "timeout", listener: () => void): this; + prependListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: "wantTrailers", listener: () => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "aborted", listener: () => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependOnceListener(event: "drain", listener: () => void): this; + prependOnceListener(event: "end", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "finish", listener: () => void): this; + prependOnceListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; + prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this; + prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependOnceListener(event: "streamClosed", listener: (code: number) => void): this; + prependOnceListener(event: "timeout", listener: () => void): this; + prependOnceListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: "wantTrailers", listener: () => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + + export class ClientHttp2Stream extends Http2Stream { + private constructor(); + + addListener(event: "continue", listener: () => {}): this; + addListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + addListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "continue"): boolean; + emit(event: "headers", headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean; + emit(event: "push", headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: "response", headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "continue", listener: () => {}): this; + on(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + on(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + on(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "continue", listener: () => {}): this; + once(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + once(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + once(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "continue", listener: () => {}): this; + prependListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "continue", listener: () => {}): this; + prependOnceListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependOnceListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + + export class ServerHttp2Stream extends Http2Stream { + private constructor(); + + additionalHeaders(headers: OutgoingHttpHeaders): void; + readonly headersSent: boolean; + readonly pushAllowed: boolean; + pushStream(headers: OutgoingHttpHeaders, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void; + pushStream(headers: OutgoingHttpHeaders, options?: StreamPriorityOptions, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void; + respond(headers?: OutgoingHttpHeaders, options?: ServerStreamResponseOptions): void; + respondWithFD(fd: number, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptions): void; + respondWithFile(path: string, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptionsWithError): void; + } + + // Http2Session + + export interface Settings { + headerTableSize?: number; + enablePush?: boolean; + initialWindowSize?: number; + maxFrameSize?: number; + maxConcurrentStreams?: number; + maxHeaderListSize?: number; + enableConnectProtocol?: boolean; + } + + export interface ClientSessionRequestOptions { + endStream?: boolean; + exclusive?: boolean; + parent?: number; + weight?: number; + waitForTrailers?: boolean; + } + + export interface SessionState { + effectiveLocalWindowSize?: number; + effectiveRecvDataLength?: number; + nextStreamID?: number; + localWindowSize?: number; + lastProcStreamID?: number; + remoteWindowSize?: number; + outboundQueueSize?: number; + deflateDynamicTableSize?: number; + inflateDynamicTableSize?: number; + } + + export class Http2Session extends events.EventEmitter { + protected constructor(); + + readonly alpnProtocol?: string; + close(callback?: () => void): void; + readonly closed: boolean; + readonly connecting: boolean; + destroy(error?: Error, code?: number): void; + readonly destroyed: boolean; + readonly encrypted?: boolean; + goaway(code?: number, lastStreamID?: number, opaqueData?: Buffer | DataView | NodeJS.TypedArray): void; + readonly localSettings: Settings; + readonly originSet?: string[]; + readonly pendingSettingsAck: boolean; + ping(callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean; + ping(payload: Buffer | DataView | NodeJS.TypedArray , callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean; + ref(): void; + readonly remoteSettings: Settings; + setTimeout(msecs: number, callback?: () => void): void; + readonly socket: net.Socket | tls.TLSSocket; + readonly state: SessionState; + settings(settings: Settings): void; + readonly type: number; + unref(): void; + + addListener(event: "close", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; + addListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + addListener(event: "localSettings", listener: (settings: Settings) => void): this; + addListener(event: "ping", listener: () => void): this; + addListener(event: "remoteSettings", listener: (settings: Settings) => void): this; + addListener(event: "timeout", listener: () => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "close"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "frameError", frameType: number, errorCode: number, streamID: number): boolean; + emit(event: "goaway", errorCode: number, lastStreamID: number, opaqueData: Buffer): boolean; + emit(event: "localSettings", settings: Settings): boolean; + emit(event: "ping"): boolean; + emit(event: "remoteSettings", settings: Settings): boolean; + emit(event: "timeout"): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "close", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; + on(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + on(event: "localSettings", listener: (settings: Settings) => void): this; + on(event: "ping", listener: () => void): this; + on(event: "remoteSettings", listener: (settings: Settings) => void): this; + on(event: "timeout", listener: () => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "close", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; + once(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + once(event: "localSettings", listener: (settings: Settings) => void): this; + once(event: "ping", listener: () => void): this; + once(event: "remoteSettings", listener: (settings: Settings) => void): this; + once(event: "timeout", listener: () => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "close", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; + prependListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + prependListener(event: "localSettings", listener: (settings: Settings) => void): this; + prependListener(event: "ping", listener: () => void): this; + prependListener(event: "remoteSettings", listener: (settings: Settings) => void): this; + prependListener(event: "timeout", listener: () => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; + prependOnceListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + prependOnceListener(event: "localSettings", listener: (settings: Settings) => void): this; + prependOnceListener(event: "ping", listener: () => void): this; + prependOnceListener(event: "remoteSettings", listener: (settings: Settings) => void): this; + prependOnceListener(event: "timeout", listener: () => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + + export class ClientHttp2Session extends Http2Session { + private constructor(); + + request(headers?: OutgoingHttpHeaders, options?: ClientSessionRequestOptions): ClientHttp2Stream; + + addListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; + addListener(event: "origin", listener: (origins: string[]) => void): this; + addListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + addListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "altsvc", alt: string, origin: string, stream: number): boolean; + emit(event: "origin", origins: string[]): boolean; + emit(event: "connect", session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket): boolean; + emit(event: "stream", stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; + on(event: "origin", listener: (origins: string[]) => void): this; + on(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + on(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; + once(event: "origin", listener: (origins: string[]) => void): this; + once(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + once(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; + prependListener(event: "origin", listener: (origins: string[]) => void): this; + prependListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + prependListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; + prependOnceListener(event: "origin", listener: (origins: string[]) => void): this; + prependOnceListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + prependOnceListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + + export interface AlternativeServiceOptions { + origin: number | string | url.URL; + } + + export class ServerHttp2Session extends Http2Session { + private constructor(); + + altsvc(alt: string, originOrStream: number | string | url.URL | AlternativeServiceOptions): void; + origin(...args: Array): void; + readonly server: Http2Server | Http2SecureServer; + + addListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "connect", session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket): boolean; + emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + + // Http2Server + + export interface SessionOptions { + maxDeflateDynamicTableSize?: number; + maxSessionMemory?: number; + maxHeaderListPairs?: number; + maxOutstandingPings?: number; + maxSendHeaderBlockLength?: number; + paddingStrategy?: number; + peerMaxConcurrentStreams?: number; + selectPadding?: (frameLen: number, maxFrameLen: number) => number; + settings?: Settings; + createConnection?: (authority: url.URL, option: SessionOptions) => stream.Duplex; + } + + export interface ClientSessionOptions extends SessionOptions { + maxReservedRemoteStreams?: number; + createConnection?: (authority: url.URL, option: SessionOptions) => stream.Duplex; + } + + export interface ServerSessionOptions extends SessionOptions { + Http1IncomingMessage?: typeof IncomingMessage; + Http1ServerResponse?: typeof ServerResponse; + Http2ServerRequest?: typeof Http2ServerRequest; + Http2ServerResponse?: typeof Http2ServerResponse; + } + + export interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions { } + export interface SecureServerSessionOptions extends ServerSessionOptions, tls.TlsOptions { } + + export interface ServerOptions extends ServerSessionOptions { } + + export interface SecureServerOptions extends SecureServerSessionOptions { + allowHTTP1?: boolean; + origins?: string[]; + } + + export class Http2Server extends net.Server { + private constructor(); + + addListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + addListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + addListener(event: "session", listener: (session: ServerHttp2Session) => void): this; + addListener(event: "sessionError", listener: (err: Error) => void): this; + addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: "timeout", listener: () => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "checkContinue", request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: "request", request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: "session", session: ServerHttp2Session): boolean; + emit(event: "sessionError", err: Error): boolean; + emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: "timeout"): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + on(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + on(event: "session", listener: (session: ServerHttp2Session) => void): this; + on(event: "sessionError", listener: (err: Error) => void): this; + on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + on(event: "timeout", listener: () => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + once(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + once(event: "session", listener: (session: ServerHttp2Session) => void): this; + once(event: "sessionError", listener: (err: Error) => void): this; + once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + once(event: "timeout", listener: () => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependListener(event: "session", listener: (session: ServerHttp2Session) => void): this; + prependListener(event: "sessionError", listener: (err: Error) => void): this; + prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: "timeout", listener: () => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependOnceListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependOnceListener(event: "session", listener: (session: ServerHttp2Session) => void): this; + prependOnceListener(event: "sessionError", listener: (err: Error) => void): this; + prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: "timeout", listener: () => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + + setTimeout(msec?: number, callback?: () => void): this; + } + + export class Http2SecureServer extends tls.Server { + private constructor(); + + addListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + addListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + addListener(event: "session", listener: (session: ServerHttp2Session) => void): this; + addListener(event: "sessionError", listener: (err: Error) => void): this; + addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: "timeout", listener: () => void): this; + addListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "checkContinue", request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: "request", request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: "session", session: ServerHttp2Session): boolean; + emit(event: "sessionError", err: Error): boolean; + emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: "timeout"): boolean; + emit(event: "unknownProtocol", socket: tls.TLSSocket): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + on(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + on(event: "session", listener: (session: ServerHttp2Session) => void): this; + on(event: "sessionError", listener: (err: Error) => void): this; + on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + on(event: "timeout", listener: () => void): this; + on(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + once(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + once(event: "session", listener: (session: ServerHttp2Session) => void): this; + once(event: "sessionError", listener: (err: Error) => void): this; + once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + once(event: "timeout", listener: () => void): this; + once(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependListener(event: "session", listener: (session: ServerHttp2Session) => void): this; + prependListener(event: "sessionError", listener: (err: Error) => void): this; + prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: "timeout", listener: () => void): this; + prependListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependOnceListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependOnceListener(event: "session", listener: (session: ServerHttp2Session) => void): this; + prependOnceListener(event: "sessionError", listener: (err: Error) => void): this; + prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: "timeout", listener: () => void): this; + prependOnceListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + + setTimeout(msec?: number, callback?: () => void): this; + } + + export class Http2ServerRequest extends stream.Readable { + constructor(stream: ServerHttp2Stream, headers: IncomingHttpHeaders, options: stream.ReadableOptions, rawHeaders: string[]); + + readonly aborted: boolean; + readonly authority: string; + readonly headers: IncomingHttpHeaders; + readonly httpVersion: string; + readonly method: string; + readonly rawHeaders: string[]; + readonly rawTrailers: string[]; + readonly scheme: string; + setTimeout(msecs: number, callback?: () => void): void; + readonly socket: net.Socket | tls.TLSSocket; + readonly stream: ServerHttp2Stream; + readonly trailers: IncomingHttpHeaders; + readonly url: string; + + read(size?: number): Buffer | string | null; + + addListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "data", listener: (chunk: Buffer | string) => void): this; + addListener(event: "end", listener: () => void): this; + addListener(event: "readable", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "aborted", hadError: boolean, code: number): boolean; + emit(event: "close"): boolean; + emit(event: "data", chunk: Buffer | string): boolean; + emit(event: "end"): boolean; + emit(event: "readable"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "aborted", listener: (hadError: boolean, code: number) => void): this; + on(event: "close", listener: () => void): this; + on(event: "data", listener: (chunk: Buffer | string) => void): this; + on(event: "end", listener: () => void): this; + on(event: "readable", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "aborted", listener: (hadError: boolean, code: number) => void): this; + once(event: "close", listener: () => void): this; + once(event: "data", listener: (chunk: Buffer | string) => void): this; + once(event: "end", listener: () => void): this; + once(event: "readable", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependListener(event: "end", listener: () => void): this; + prependListener(event: "readable", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependOnceListener(event: "end", listener: () => void): this; + prependOnceListener(event: "readable", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + + export class Http2ServerResponse extends stream.Stream { + constructor(stream: ServerHttp2Stream); + + addTrailers(trailers: OutgoingHttpHeaders): void; + readonly connection: net.Socket | tls.TLSSocket; + end(callback?: () => void): void; + end(data: string | Uint8Array, callback?: () => void): void; + end(data: string | Uint8Array, encoding: string, callback?: () => void): void; + readonly finished: boolean; + getHeader(name: string): string; + getHeaderNames(): string[]; + getHeaders(): OutgoingHttpHeaders; + hasHeader(name: string): boolean; + readonly headersSent: boolean; + removeHeader(name: string): void; + sendDate: boolean; + setHeader(name: string, value: number | string | string[]): void; + setTimeout(msecs: number, callback?: () => void): void; + readonly socket: net.Socket | tls.TLSSocket; + statusCode: number; + statusMessage: ''; + readonly stream: ServerHttp2Stream; + write(chunk: string | Uint8Array, callback?: (err: Error) => void): boolean; + write(chunk: string | Uint8Array, encoding: string, callback?: (err: Error) => void): boolean; + writeContinue(): void; + writeHead(statusCode: number, headers?: OutgoingHttpHeaders): this; + writeHead(statusCode: number, statusMessage: string, headers?: OutgoingHttpHeaders): this; + createPushResponse(headers: OutgoingHttpHeaders, callback: (err: Error | null, res: Http2ServerResponse) => void): void; + + addListener(event: "close", listener: () => void): this; + addListener(event: "drain", listener: () => void): this; + addListener(event: "error", listener: (error: Error) => void): this; + addListener(event: "finish", listener: () => void): this; + addListener(event: "pipe", listener: (src: stream.Readable) => void): this; + addListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "close"): boolean; + emit(event: "drain"): boolean; + emit(event: "error", error: Error): boolean; + emit(event: "finish"): boolean; + emit(event: "pipe", src: stream.Readable): boolean; + emit(event: "unpipe", src: stream.Readable): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "close", listener: () => void): this; + on(event: "drain", listener: () => void): this; + on(event: "error", listener: (error: Error) => void): this; + on(event: "finish", listener: () => void): this; + on(event: "pipe", listener: (src: stream.Readable) => void): this; + on(event: "unpipe", listener: (src: stream.Readable) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "close", listener: () => void): this; + once(event: "drain", listener: () => void): this; + once(event: "error", listener: (error: Error) => void): this; + once(event: "finish", listener: () => void): this; + once(event: "pipe", listener: (src: stream.Readable) => void): this; + once(event: "unpipe", listener: (src: stream.Readable) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "close", listener: () => void): this; + prependListener(event: "drain", listener: () => void): this; + prependListener(event: "error", listener: (error: Error) => void): this; + prependListener(event: "finish", listener: () => void): this; + prependListener(event: "pipe", listener: (src: stream.Readable) => void): this; + prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "drain", listener: () => void): this; + prependOnceListener(event: "error", listener: (error: Error) => void): this; + prependOnceListener(event: "finish", listener: () => void): this; + prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this; + prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + + // Public API + + export namespace constants { + const NGHTTP2_SESSION_SERVER: number; + const NGHTTP2_SESSION_CLIENT: number; + const NGHTTP2_STREAM_STATE_IDLE: number; + const NGHTTP2_STREAM_STATE_OPEN: number; + const NGHTTP2_STREAM_STATE_RESERVED_LOCAL: number; + const NGHTTP2_STREAM_STATE_RESERVED_REMOTE: number; + const NGHTTP2_STREAM_STATE_HALF_CLOSED_LOCAL: number; + const NGHTTP2_STREAM_STATE_HALF_CLOSED_REMOTE: number; + const NGHTTP2_STREAM_STATE_CLOSED: number; + const NGHTTP2_NO_ERROR: number; + const NGHTTP2_PROTOCOL_ERROR: number; + const NGHTTP2_INTERNAL_ERROR: number; + const NGHTTP2_FLOW_CONTROL_ERROR: number; + const NGHTTP2_SETTINGS_TIMEOUT: number; + const NGHTTP2_STREAM_CLOSED: number; + const NGHTTP2_FRAME_SIZE_ERROR: number; + const NGHTTP2_REFUSED_STREAM: number; + const NGHTTP2_CANCEL: number; + const NGHTTP2_COMPRESSION_ERROR: number; + const NGHTTP2_CONNECT_ERROR: number; + const NGHTTP2_ENHANCE_YOUR_CALM: number; + const NGHTTP2_INADEQUATE_SECURITY: number; + const NGHTTP2_HTTP_1_1_REQUIRED: number; + const NGHTTP2_ERR_FRAME_SIZE_ERROR: number; + const NGHTTP2_FLAG_NONE: number; + const NGHTTP2_FLAG_END_STREAM: number; + const NGHTTP2_FLAG_END_HEADERS: number; + const NGHTTP2_FLAG_ACK: number; + const NGHTTP2_FLAG_PADDED: number; + const NGHTTP2_FLAG_PRIORITY: number; + const DEFAULT_SETTINGS_HEADER_TABLE_SIZE: number; + const DEFAULT_SETTINGS_ENABLE_PUSH: number; + const DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE: number; + const DEFAULT_SETTINGS_MAX_FRAME_SIZE: number; + const MAX_MAX_FRAME_SIZE: number; + const MIN_MAX_FRAME_SIZE: number; + const MAX_INITIAL_WINDOW_SIZE: number; + const NGHTTP2_DEFAULT_WEIGHT: number; + const NGHTTP2_SETTINGS_HEADER_TABLE_SIZE: number; + const NGHTTP2_SETTINGS_ENABLE_PUSH: number; + const NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS: number; + const NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE: number; + const NGHTTP2_SETTINGS_MAX_FRAME_SIZE: number; + const NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE: number; + const PADDING_STRATEGY_NONE: number; + const PADDING_STRATEGY_MAX: number; + const PADDING_STRATEGY_CALLBACK: number; + const HTTP2_HEADER_STATUS: string; + const HTTP2_HEADER_METHOD: string; + const HTTP2_HEADER_AUTHORITY: string; + const HTTP2_HEADER_SCHEME: string; + const HTTP2_HEADER_PATH: string; + const HTTP2_HEADER_ACCEPT_CHARSET: string; + const HTTP2_HEADER_ACCEPT_ENCODING: string; + const HTTP2_HEADER_ACCEPT_LANGUAGE: string; + const HTTP2_HEADER_ACCEPT_RANGES: string; + const HTTP2_HEADER_ACCEPT: string; + const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN: string; + const HTTP2_HEADER_AGE: string; + const HTTP2_HEADER_ALLOW: string; + const HTTP2_HEADER_AUTHORIZATION: string; + const HTTP2_HEADER_CACHE_CONTROL: string; + const HTTP2_HEADER_CONNECTION: string; + const HTTP2_HEADER_CONTENT_DISPOSITION: string; + const HTTP2_HEADER_CONTENT_ENCODING: string; + const HTTP2_HEADER_CONTENT_LANGUAGE: string; + const HTTP2_HEADER_CONTENT_LENGTH: string; + const HTTP2_HEADER_CONTENT_LOCATION: string; + const HTTP2_HEADER_CONTENT_MD5: string; + const HTTP2_HEADER_CONTENT_RANGE: string; + const HTTP2_HEADER_CONTENT_TYPE: string; + const HTTP2_HEADER_COOKIE: string; + const HTTP2_HEADER_DATE: string; + const HTTP2_HEADER_ETAG: string; + const HTTP2_HEADER_EXPECT: string; + const HTTP2_HEADER_EXPIRES: string; + const HTTP2_HEADER_FROM: string; + const HTTP2_HEADER_HOST: string; + const HTTP2_HEADER_IF_MATCH: string; + const HTTP2_HEADER_IF_MODIFIED_SINCE: string; + const HTTP2_HEADER_IF_NONE_MATCH: string; + const HTTP2_HEADER_IF_RANGE: string; + const HTTP2_HEADER_IF_UNMODIFIED_SINCE: string; + const HTTP2_HEADER_LAST_MODIFIED: string; + const HTTP2_HEADER_LINK: string; + const HTTP2_HEADER_LOCATION: string; + const HTTP2_HEADER_MAX_FORWARDS: string; + const HTTP2_HEADER_PREFER: string; + const HTTP2_HEADER_PROXY_AUTHENTICATE: string; + const HTTP2_HEADER_PROXY_AUTHORIZATION: string; + const HTTP2_HEADER_RANGE: string; + const HTTP2_HEADER_REFERER: string; + const HTTP2_HEADER_REFRESH: string; + const HTTP2_HEADER_RETRY_AFTER: string; + const HTTP2_HEADER_SERVER: string; + const HTTP2_HEADER_SET_COOKIE: string; + const HTTP2_HEADER_STRICT_TRANSPORT_SECURITY: string; + const HTTP2_HEADER_TRANSFER_ENCODING: string; + const HTTP2_HEADER_TE: string; + const HTTP2_HEADER_UPGRADE: string; + const HTTP2_HEADER_USER_AGENT: string; + const HTTP2_HEADER_VARY: string; + const HTTP2_HEADER_VIA: string; + const HTTP2_HEADER_WWW_AUTHENTICATE: string; + const HTTP2_HEADER_HTTP2_SETTINGS: string; + const HTTP2_HEADER_KEEP_ALIVE: string; + const HTTP2_HEADER_PROXY_CONNECTION: string; + const HTTP2_METHOD_ACL: string; + const HTTP2_METHOD_BASELINE_CONTROL: string; + const HTTP2_METHOD_BIND: string; + const HTTP2_METHOD_CHECKIN: string; + const HTTP2_METHOD_CHECKOUT: string; + const HTTP2_METHOD_CONNECT: string; + const HTTP2_METHOD_COPY: string; + const HTTP2_METHOD_DELETE: string; + const HTTP2_METHOD_GET: string; + const HTTP2_METHOD_HEAD: string; + const HTTP2_METHOD_LABEL: string; + const HTTP2_METHOD_LINK: string; + const HTTP2_METHOD_LOCK: string; + const HTTP2_METHOD_MERGE: string; + const HTTP2_METHOD_MKACTIVITY: string; + const HTTP2_METHOD_MKCALENDAR: string; + const HTTP2_METHOD_MKCOL: string; + const HTTP2_METHOD_MKREDIRECTREF: string; + const HTTP2_METHOD_MKWORKSPACE: string; + const HTTP2_METHOD_MOVE: string; + const HTTP2_METHOD_OPTIONS: string; + const HTTP2_METHOD_ORDERPATCH: string; + const HTTP2_METHOD_PATCH: string; + const HTTP2_METHOD_POST: string; + const HTTP2_METHOD_PRI: string; + const HTTP2_METHOD_PROPFIND: string; + const HTTP2_METHOD_PROPPATCH: string; + const HTTP2_METHOD_PUT: string; + const HTTP2_METHOD_REBIND: string; + const HTTP2_METHOD_REPORT: string; + const HTTP2_METHOD_SEARCH: string; + const HTTP2_METHOD_TRACE: string; + const HTTP2_METHOD_UNBIND: string; + const HTTP2_METHOD_UNCHECKOUT: string; + const HTTP2_METHOD_UNLINK: string; + const HTTP2_METHOD_UNLOCK: string; + const HTTP2_METHOD_UPDATE: string; + const HTTP2_METHOD_UPDATEREDIRECTREF: string; + const HTTP2_METHOD_VERSION_CONTROL: string; + const HTTP_STATUS_CONTINUE: number; + const HTTP_STATUS_SWITCHING_PROTOCOLS: number; + const HTTP_STATUS_PROCESSING: number; + const HTTP_STATUS_OK: number; + const HTTP_STATUS_CREATED: number; + const HTTP_STATUS_ACCEPTED: number; + const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION: number; + const HTTP_STATUS_NO_CONTENT: number; + const HTTP_STATUS_RESET_CONTENT: number; + const HTTP_STATUS_PARTIAL_CONTENT: number; + const HTTP_STATUS_MULTI_STATUS: number; + const HTTP_STATUS_ALREADY_REPORTED: number; + const HTTP_STATUS_IM_USED: number; + const HTTP_STATUS_MULTIPLE_CHOICES: number; + const HTTP_STATUS_MOVED_PERMANENTLY: number; + const HTTP_STATUS_FOUND: number; + const HTTP_STATUS_SEE_OTHER: number; + const HTTP_STATUS_NOT_MODIFIED: number; + const HTTP_STATUS_USE_PROXY: number; + const HTTP_STATUS_TEMPORARY_REDIRECT: number; + const HTTP_STATUS_PERMANENT_REDIRECT: number; + const HTTP_STATUS_BAD_REQUEST: number; + const HTTP_STATUS_UNAUTHORIZED: number; + const HTTP_STATUS_PAYMENT_REQUIRED: number; + const HTTP_STATUS_FORBIDDEN: number; + const HTTP_STATUS_NOT_FOUND: number; + const HTTP_STATUS_METHOD_NOT_ALLOWED: number; + const HTTP_STATUS_NOT_ACCEPTABLE: number; + const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED: number; + const HTTP_STATUS_REQUEST_TIMEOUT: number; + const HTTP_STATUS_CONFLICT: number; + const HTTP_STATUS_GONE: number; + const HTTP_STATUS_LENGTH_REQUIRED: number; + const HTTP_STATUS_PRECONDITION_FAILED: number; + const HTTP_STATUS_PAYLOAD_TOO_LARGE: number; + const HTTP_STATUS_URI_TOO_LONG: number; + const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE: number; + const HTTP_STATUS_RANGE_NOT_SATISFIABLE: number; + const HTTP_STATUS_EXPECTATION_FAILED: number; + const HTTP_STATUS_TEAPOT: number; + const HTTP_STATUS_MISDIRECTED_REQUEST: number; + const HTTP_STATUS_UNPROCESSABLE_ENTITY: number; + const HTTP_STATUS_LOCKED: number; + const HTTP_STATUS_FAILED_DEPENDENCY: number; + const HTTP_STATUS_UNORDERED_COLLECTION: number; + const HTTP_STATUS_UPGRADE_REQUIRED: number; + const HTTP_STATUS_PRECONDITION_REQUIRED: number; + const HTTP_STATUS_TOO_MANY_REQUESTS: number; + const HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE: number; + const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS: number; + const HTTP_STATUS_INTERNAL_SERVER_ERROR: number; + const HTTP_STATUS_NOT_IMPLEMENTED: number; + const HTTP_STATUS_BAD_GATEWAY: number; + const HTTP_STATUS_SERVICE_UNAVAILABLE: number; + const HTTP_STATUS_GATEWAY_TIMEOUT: number; + const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED: number; + const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES: number; + const HTTP_STATUS_INSUFFICIENT_STORAGE: number; + const HTTP_STATUS_LOOP_DETECTED: number; + const HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDED: number; + const HTTP_STATUS_NOT_EXTENDED: number; + const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED: number; + } + + export function getDefaultSettings(): Settings; + export function getPackedSettings(settings: Settings): Buffer; + export function getUnpackedSettings(buf: Uint8Array): Settings; + + export function createServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server; + export function createServer(options: ServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server; + + export function createSecureServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer; + export function createSecureServer(options: SecureServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer; + + export function connect(authority: string | url.URL, listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): ClientHttp2Session; + export function connect( + authority: string | url.URL, + options?: ClientSessionOptions | SecureClientSessionOptions, + listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void, + ): ClientHttp2Session; +} diff --git a/node_modules/@types/node/https.d.ts b/node_modules/@types/node/https.d.ts new file mode 100644 index 00000000..6f33dbd0 --- /dev/null +++ b/node_modules/@types/node/https.d.ts @@ -0,0 +1,53 @@ +declare module "https" { + import * as tls from "tls"; + import * as events from "events"; + import * as http from "http"; + import { URL } from "url"; + + type ServerOptions = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions; + + type RequestOptions = http.RequestOptions & tls.SecureContextOptions & { + rejectUnauthorized?: boolean; // Defaults to true + servername?: string; // SNI TLS Extension + }; + + interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions { + rejectUnauthorized?: boolean; + maxCachedSessions?: number; + } + + class Agent extends http.Agent { + constructor(options?: AgentOptions); + options: AgentOptions; + } + + class Server extends tls.Server { + constructor(requestListener?: http.RequestListener); + constructor(options: ServerOptions, requestListener?: http.RequestListener); + + setTimeout(callback: () => void): this; + setTimeout(msecs?: number, callback?: () => void): this; + /** + * Limits maximum incoming headers count. If set to 0, no limit will be applied. + * @default 2000 + * {@link https://nodejs.org/api/http.html#http_server_maxheaderscount} + */ + maxHeadersCount: number | null; + timeout: number; + /** + * Limit the amount of time the parser will wait to receive the complete HTTP headers. + * @default 40000 + * {@link https://nodejs.org/api/http.html#http_server_headerstimeout} + */ + headersTimeout: number; + keepAliveTimeout: number; + } + + function createServer(requestListener?: http.RequestListener): Server; + function createServer(options: ServerOptions, requestListener?: http.RequestListener): Server; + function request(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; + function request(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; + function get(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; + function get(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; + let globalAgent: Agent; +} diff --git a/node_modules/@types/node/index.d.ts b/node_modules/@types/node/index.d.ts new file mode 100644 index 00000000..e627195c --- /dev/null +++ b/node_modules/@types/node/index.d.ts @@ -0,0 +1,100 @@ +// Type definitions for non-npm package Node.js 12.6 +// Project: http://nodejs.org/ +// Definitions by: Microsoft TypeScript +// DefinitelyTyped +// Alberto Schiabel +// Alexander T. +// Alvis HT Tang +// Andrew Makarov +// Benjamin Toueg +// Bruno Scheufler +// Chigozirim C. +// Christian Vaagland Tellnes +// David Junger +// Deividas Bakanas +// Eugene Y. Q. Shen +// Flarna +// Hannes Magnusson +// Hoàng Văn Khải +// Huw +// Kelvin Jin +// Klaus Meinhardt +// Lishude +// Mariusz Wiktorczyk +// Matthieu Sieben +// Mohsen Azimi +// Nicolas Even +// Nicolas Voigt +// Parambir Singh +// Sebastian Silbermann +// Simon Schick +// Thomas den Hollander +// Wilco Bakker +// wwwy3y3 +// Zane Hannan AU +// Samuel Ainsworth +// Kyle Uehlein +// Jordi Oliveras Rovira +// Thanik Bhongbhibhat +// Marcin Kopacz +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +// NOTE: These definitions support NodeJS and TypeScript 3.2. + +// NOTE: TypeScript version-specific augmentations can be found in the following paths: +// - ~/base.d.ts - Shared definitions common to all TypeScript versions +// - ~/index.d.ts - Definitions specific to TypeScript 2.1 +// - ~/ts3.2/index.d.ts - Definitions specific to TypeScript 3.2 + +// NOTE: Augmentations for TypeScript 3.2 and later should use individual files for overrides +// within the respective ~/ts3.2 (or later) folder. However, this is disallowed for versions +// prior to TypeScript 3.2, so the older definitions will be found here. + +// Base definitions for all NodeJS modules that are not specific to any version of TypeScript: +/// + +// TypeScript 2.1-specific augmentations: + +// Forward-declarations for needed types from es2015 and later (in case users are using `--lib es5`) +// Empty interfaces are used here which merge fine with the real declarations in the lib XXX files +// just to ensure the names are known and node typings can be sued without importing these libs. +// if someone really needs these types the libs need to be added via --lib or in tsconfig.json +interface MapConstructor { } +interface WeakMapConstructor { } +interface SetConstructor { } +interface WeakSetConstructor { } +interface Set {} +interface Map {} +interface ReadonlySet {} +interface IteratorResult { } +interface Iterable { } +interface AsyncIterable { } +interface Iterator { + next(value?: any): IteratorResult; +} +interface IterableIterator { } +interface AsyncIterableIterator {} +interface SymbolConstructor { + readonly iterator: symbol; + readonly asyncIterator: symbol; +} +declare var Symbol: SymbolConstructor; +// even this is just a forward declaration some properties are added otherwise +// it would be allowed to pass anything to e.g. Buffer.from() +interface SharedArrayBuffer { + readonly byteLength: number; + slice(begin?: number, end?: number): SharedArrayBuffer; +} + +declare module "util" { + namespace inspect { + const custom: symbol; + } + namespace promisify { + const custom: symbol; + } + namespace types { + function isBigInt64Array(value: any): boolean; + function isBigUint64Array(value: any): boolean; + } +} diff --git a/node_modules/@types/node/inspector.d.ts b/node_modules/@types/node/inspector.d.ts new file mode 100644 index 00000000..8abee395 --- /dev/null +++ b/node_modules/@types/node/inspector.d.ts @@ -0,0 +1,3257 @@ +// tslint:disable-next-line:dt-header +// Type definitions for inspector + +// These definitions are auto-generated. +// Please see https://github.com/DefinitelyTyped/DefinitelyTyped/pull/19330 +// for more information. + +/** + * The inspector module provides an API for interacting with the V8 inspector. + */ +declare module "inspector" { + import { EventEmitter } from 'events'; + + interface InspectorNotification { + method: string; + params: T; + } + + namespace Console { + /** + * Console message. + */ + interface ConsoleMessage { + /** + * Message source. + */ + source: string; + /** + * Message severity. + */ + level: string; + /** + * Message text. + */ + text: string; + /** + * URL of the message origin. + */ + url?: string; + /** + * Line number in the resource that generated this message (1-based). + */ + line?: number; + /** + * Column number in the resource that generated this message (1-based). + */ + column?: number; + } + + interface MessageAddedEventDataType { + /** + * Console message that has been added. + */ + message: ConsoleMessage; + } + } + + namespace Debugger { + /** + * Breakpoint identifier. + */ + type BreakpointId = string; + + /** + * Call frame identifier. + */ + type CallFrameId = string; + + /** + * Location in the source code. + */ + interface Location { + /** + * Script identifier as reported in the `Debugger.scriptParsed`. + */ + scriptId: Runtime.ScriptId; + /** + * Line number in the script (0-based). + */ + lineNumber: number; + /** + * Column number in the script (0-based). + */ + columnNumber?: number; + } + + /** + * Location in the source code. + * @experimental + */ + interface ScriptPosition { + lineNumber: number; + columnNumber: number; + } + + /** + * JavaScript call frame. Array of call frames form the call stack. + */ + interface CallFrame { + /** + * Call frame identifier. This identifier is only valid while the virtual machine is paused. + */ + callFrameId: CallFrameId; + /** + * Name of the JavaScript function called on this call frame. + */ + functionName: string; + /** + * Location in the source code. + */ + functionLocation?: Location; + /** + * Location in the source code. + */ + location: Location; + /** + * JavaScript script name or url. + */ + url: string; + /** + * Scope chain for this call frame. + */ + scopeChain: Scope[]; + /** + * `this` object for this call frame. + */ + this: Runtime.RemoteObject; + /** + * The value being returned, if the function is at return point. + */ + returnValue?: Runtime.RemoteObject; + } + + /** + * Scope description. + */ + interface Scope { + /** + * Scope type. + */ + type: string; + /** + * Object representing the scope. For `global` and `with` scopes it represents the actual + * object; for the rest of the scopes, it is artificial transient object enumerating scope + * variables as its properties. + */ + object: Runtime.RemoteObject; + name?: string; + /** + * Location in the source code where scope starts + */ + startLocation?: Location; + /** + * Location in the source code where scope ends + */ + endLocation?: Location; + } + + /** + * Search match for resource. + */ + interface SearchMatch { + /** + * Line number in resource content. + */ + lineNumber: number; + /** + * Line with match content. + */ + lineContent: string; + } + + interface BreakLocation { + /** + * Script identifier as reported in the `Debugger.scriptParsed`. + */ + scriptId: Runtime.ScriptId; + /** + * Line number in the script (0-based). + */ + lineNumber: number; + /** + * Column number in the script (0-based). + */ + columnNumber?: number; + type?: string; + } + + interface ContinueToLocationParameterType { + /** + * Location to continue to. + */ + location: Location; + targetCallFrames?: string; + } + + interface EvaluateOnCallFrameParameterType { + /** + * Call frame identifier to evaluate on. + */ + callFrameId: CallFrameId; + /** + * Expression to evaluate. + */ + expression: string; + /** + * String object group name to put result into (allows rapid releasing resulting object handles + * using `releaseObjectGroup`). + */ + objectGroup?: string; + /** + * Specifies whether command line API should be available to the evaluated expression, defaults + * to false. + */ + includeCommandLineAPI?: boolean; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause + * execution. Overrides `setPauseOnException` state. + */ + silent?: boolean; + /** + * Whether the result is expected to be a JSON object that should be sent by value. + */ + returnByValue?: boolean; + /** + * Whether preview should be generated for the result. + * @experimental + */ + generatePreview?: boolean; + /** + * Whether to throw an exception if side effect cannot be ruled out during evaluation. + */ + throwOnSideEffect?: boolean; + /** + * Terminate execution after timing out (number of milliseconds). + * @experimental + */ + timeout?: Runtime.TimeDelta; + } + + interface GetPossibleBreakpointsParameterType { + /** + * Start of range to search possible breakpoint locations in. + */ + start: Location; + /** + * End of range to search possible breakpoint locations in (excluding). When not specified, end + * of scripts is used as end of range. + */ + end?: Location; + /** + * Only consider locations which are in the same (non-nested) function as start. + */ + restrictToFunction?: boolean; + } + + interface GetScriptSourceParameterType { + /** + * Id of the script to get source for. + */ + scriptId: Runtime.ScriptId; + } + + interface GetStackTraceParameterType { + stackTraceId: Runtime.StackTraceId; + } + + interface PauseOnAsyncCallParameterType { + /** + * Debugger will pause when async call with given stack trace is started. + */ + parentStackTraceId: Runtime.StackTraceId; + } + + interface RemoveBreakpointParameterType { + breakpointId: BreakpointId; + } + + interface RestartFrameParameterType { + /** + * Call frame identifier to evaluate on. + */ + callFrameId: CallFrameId; + } + + interface SearchInContentParameterType { + /** + * Id of the script to search in. + */ + scriptId: Runtime.ScriptId; + /** + * String to search for. + */ + query: string; + /** + * If true, search is case sensitive. + */ + caseSensitive?: boolean; + /** + * If true, treats string parameter as regex. + */ + isRegex?: boolean; + } + + interface SetAsyncCallStackDepthParameterType { + /** + * Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async + * call stacks (default). + */ + maxDepth: number; + } + + interface SetBlackboxPatternsParameterType { + /** + * Array of regexps that will be used to check script url for blackbox state. + */ + patterns: string[]; + } + + interface SetBlackboxedRangesParameterType { + /** + * Id of the script. + */ + scriptId: Runtime.ScriptId; + positions: ScriptPosition[]; + } + + interface SetBreakpointParameterType { + /** + * Location to set breakpoint in. + */ + location: Location; + /** + * Expression to use as a breakpoint condition. When specified, debugger will only stop on the + * breakpoint if this expression evaluates to true. + */ + condition?: string; + } + + interface SetBreakpointByUrlParameterType { + /** + * Line number to set breakpoint at. + */ + lineNumber: number; + /** + * URL of the resources to set breakpoint on. + */ + url?: string; + /** + * Regex pattern for the URLs of the resources to set breakpoints on. Either `url` or + * `urlRegex` must be specified. + */ + urlRegex?: string; + /** + * Script hash of the resources to set breakpoint on. + */ + scriptHash?: string; + /** + * Offset in the line to set breakpoint at. + */ + columnNumber?: number; + /** + * Expression to use as a breakpoint condition. When specified, debugger will only stop on the + * breakpoint if this expression evaluates to true. + */ + condition?: string; + } + + interface SetBreakpointOnFunctionCallParameterType { + /** + * Function object id. + */ + objectId: Runtime.RemoteObjectId; + /** + * Expression to use as a breakpoint condition. When specified, debugger will + * stop on the breakpoint if this expression evaluates to true. + */ + condition?: string; + } + + interface SetBreakpointsActiveParameterType { + /** + * New value for breakpoints active state. + */ + active: boolean; + } + + interface SetPauseOnExceptionsParameterType { + /** + * Pause on exceptions mode. + */ + state: string; + } + + interface SetReturnValueParameterType { + /** + * New return value. + */ + newValue: Runtime.CallArgument; + } + + interface SetScriptSourceParameterType { + /** + * Id of the script to edit. + */ + scriptId: Runtime.ScriptId; + /** + * New content of the script. + */ + scriptSource: string; + /** + * If true the change will not actually be applied. Dry run may be used to get result + * description without actually modifying the code. + */ + dryRun?: boolean; + } + + interface SetSkipAllPausesParameterType { + /** + * New value for skip pauses state. + */ + skip: boolean; + } + + interface SetVariableValueParameterType { + /** + * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' + * scope types are allowed. Other scopes could be manipulated manually. + */ + scopeNumber: number; + /** + * Variable name. + */ + variableName: string; + /** + * New variable value. + */ + newValue: Runtime.CallArgument; + /** + * Id of callframe that holds variable. + */ + callFrameId: CallFrameId; + } + + interface StepIntoParameterType { + /** + * Debugger will issue additional Debugger.paused notification if any async task is scheduled + * before next pause. + * @experimental + */ + breakOnAsyncCall?: boolean; + } + + interface EnableReturnType { + /** + * Unique identifier of the debugger. + * @experimental + */ + debuggerId: Runtime.UniqueDebuggerId; + } + + interface EvaluateOnCallFrameReturnType { + /** + * Object wrapper for the evaluation result. + */ + result: Runtime.RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: Runtime.ExceptionDetails; + } + + interface GetPossibleBreakpointsReturnType { + /** + * List of the possible breakpoint locations. + */ + locations: BreakLocation[]; + } + + interface GetScriptSourceReturnType { + /** + * Script source. + */ + scriptSource: string; + } + + interface GetStackTraceReturnType { + stackTrace: Runtime.StackTrace; + } + + interface RestartFrameReturnType { + /** + * New stack trace. + */ + callFrames: CallFrame[]; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace; + /** + * Async stack trace, if any. + * @experimental + */ + asyncStackTraceId?: Runtime.StackTraceId; + } + + interface SearchInContentReturnType { + /** + * List of search matches. + */ + result: SearchMatch[]; + } + + interface SetBreakpointReturnType { + /** + * Id of the created breakpoint for further reference. + */ + breakpointId: BreakpointId; + /** + * Location this breakpoint resolved into. + */ + actualLocation: Location; + } + + interface SetBreakpointByUrlReturnType { + /** + * Id of the created breakpoint for further reference. + */ + breakpointId: BreakpointId; + /** + * List of the locations this breakpoint resolved into upon addition. + */ + locations: Location[]; + } + + interface SetBreakpointOnFunctionCallReturnType { + /** + * Id of the created breakpoint for further reference. + */ + breakpointId: BreakpointId; + } + + interface SetScriptSourceReturnType { + /** + * New stack trace in case editing has happened while VM was stopped. + */ + callFrames?: CallFrame[]; + /** + * Whether current call stack was modified after applying the changes. + */ + stackChanged?: boolean; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace; + /** + * Async stack trace, if any. + * @experimental + */ + asyncStackTraceId?: Runtime.StackTraceId; + /** + * Exception details if any. + */ + exceptionDetails?: Runtime.ExceptionDetails; + } + + interface BreakpointResolvedEventDataType { + /** + * Breakpoint unique identifier. + */ + breakpointId: BreakpointId; + /** + * Actual breakpoint location. + */ + location: Location; + } + + interface PausedEventDataType { + /** + * Call stack the virtual machine stopped on. + */ + callFrames: CallFrame[]; + /** + * Pause reason. + */ + reason: string; + /** + * Object containing break-specific auxiliary properties. + */ + data?: {}; + /** + * Hit breakpoints IDs + */ + hitBreakpoints?: string[]; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace; + /** + * Async stack trace, if any. + * @experimental + */ + asyncStackTraceId?: Runtime.StackTraceId; + /** + * Just scheduled async call will have this stack trace as parent stack during async execution. + * This field is available only after `Debugger.stepInto` call with `breakOnAsynCall` flag. + * @experimental + */ + asyncCallStackTraceId?: Runtime.StackTraceId; + } + + interface ScriptFailedToParseEventDataType { + /** + * Identifier of the script parsed. + */ + scriptId: Runtime.ScriptId; + /** + * URL or name of the script parsed (if any). + */ + url: string; + /** + * Line offset of the script within the resource with given URL (for script tags). + */ + startLine: number; + /** + * Column offset of the script within the resource with given URL. + */ + startColumn: number; + /** + * Last line of the script. + */ + endLine: number; + /** + * Length of the last line of the script. + */ + endColumn: number; + /** + * Specifies script creation context. + */ + executionContextId: Runtime.ExecutionContextId; + /** + * Content hash of the script. + */ + hash: string; + /** + * Embedder-specific auxiliary data. + */ + executionContextAuxData?: {}; + /** + * URL of source map associated with script (if any). + */ + sourceMapURL?: string; + /** + * True, if this script has sourceURL. + */ + hasSourceURL?: boolean; + /** + * True, if this script is ES6 module. + */ + isModule?: boolean; + /** + * This script length. + */ + length?: number; + /** + * JavaScript top stack frame of where the script parsed event was triggered if available. + * @experimental + */ + stackTrace?: Runtime.StackTrace; + } + + interface ScriptParsedEventDataType { + /** + * Identifier of the script parsed. + */ + scriptId: Runtime.ScriptId; + /** + * URL or name of the script parsed (if any). + */ + url: string; + /** + * Line offset of the script within the resource with given URL (for script tags). + */ + startLine: number; + /** + * Column offset of the script within the resource with given URL. + */ + startColumn: number; + /** + * Last line of the script. + */ + endLine: number; + /** + * Length of the last line of the script. + */ + endColumn: number; + /** + * Specifies script creation context. + */ + executionContextId: Runtime.ExecutionContextId; + /** + * Content hash of the script. + */ + hash: string; + /** + * Embedder-specific auxiliary data. + */ + executionContextAuxData?: {}; + /** + * True, if this script is generated as a result of the live edit operation. + * @experimental + */ + isLiveEdit?: boolean; + /** + * URL of source map associated with script (if any). + */ + sourceMapURL?: string; + /** + * True, if this script has sourceURL. + */ + hasSourceURL?: boolean; + /** + * True, if this script is ES6 module. + */ + isModule?: boolean; + /** + * This script length. + */ + length?: number; + /** + * JavaScript top stack frame of where the script parsed event was triggered if available. + * @experimental + */ + stackTrace?: Runtime.StackTrace; + } + } + + namespace HeapProfiler { + /** + * Heap snapshot object id. + */ + type HeapSnapshotObjectId = string; + + /** + * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes. + */ + interface SamplingHeapProfileNode { + /** + * Function location. + */ + callFrame: Runtime.CallFrame; + /** + * Allocations size in bytes for the node excluding children. + */ + selfSize: number; + /** + * Child nodes. + */ + children: SamplingHeapProfileNode[]; + } + + /** + * Profile. + */ + interface SamplingHeapProfile { + head: SamplingHeapProfileNode; + } + + interface AddInspectedHeapObjectParameterType { + /** + * Heap snapshot object id to be accessible by means of $x command line API. + */ + heapObjectId: HeapSnapshotObjectId; + } + + interface GetHeapObjectIdParameterType { + /** + * Identifier of the object to get heap object id for. + */ + objectId: Runtime.RemoteObjectId; + } + + interface GetObjectByHeapObjectIdParameterType { + objectId: HeapSnapshotObjectId; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string; + } + + interface StartSamplingParameterType { + /** + * Average sample interval in bytes. Poisson distribution is used for the intervals. The + * default value is 32768 bytes. + */ + samplingInterval?: number; + } + + interface StartTrackingHeapObjectsParameterType { + trackAllocations?: boolean; + } + + interface StopTrackingHeapObjectsParameterType { + /** + * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken + * when the tracking is stopped. + */ + reportProgress?: boolean; + } + + interface TakeHeapSnapshotParameterType { + /** + * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken. + */ + reportProgress?: boolean; + } + + interface GetHeapObjectIdReturnType { + /** + * Id of the heap snapshot object corresponding to the passed remote object id. + */ + heapSnapshotObjectId: HeapSnapshotObjectId; + } + + interface GetObjectByHeapObjectIdReturnType { + /** + * Evaluation result. + */ + result: Runtime.RemoteObject; + } + + interface GetSamplingProfileReturnType { + /** + * Return the sampling profile being collected. + */ + profile: SamplingHeapProfile; + } + + interface StopSamplingReturnType { + /** + * Recorded sampling heap profile. + */ + profile: SamplingHeapProfile; + } + + interface AddHeapSnapshotChunkEventDataType { + chunk: string; + } + + interface HeapStatsUpdateEventDataType { + /** + * An array of triplets. Each triplet describes a fragment. The first integer is the fragment + * index, the second integer is a total count of objects for the fragment, the third integer is + * a total size of the objects for the fragment. + */ + statsUpdate: number[]; + } + + interface LastSeenObjectIdEventDataType { + lastSeenObjectId: number; + timestamp: number; + } + + interface ReportHeapSnapshotProgressEventDataType { + done: number; + total: number; + finished?: boolean; + } + } + + namespace Profiler { + /** + * Profile node. Holds callsite information, execution statistics and child nodes. + */ + interface ProfileNode { + /** + * Unique id of the node. + */ + id: number; + /** + * Function location. + */ + callFrame: Runtime.CallFrame; + /** + * Number of samples where this node was on top of the call stack. + */ + hitCount?: number; + /** + * Child node ids. + */ + children?: number[]; + /** + * The reason of being not optimized. The function may be deoptimized or marked as don't + * optimize. + */ + deoptReason?: string; + /** + * An array of source position ticks. + */ + positionTicks?: PositionTickInfo[]; + } + + /** + * Profile. + */ + interface Profile { + /** + * The list of profile nodes. First item is the root node. + */ + nodes: ProfileNode[]; + /** + * Profiling start timestamp in microseconds. + */ + startTime: number; + /** + * Profiling end timestamp in microseconds. + */ + endTime: number; + /** + * Ids of samples top nodes. + */ + samples?: number[]; + /** + * Time intervals between adjacent samples in microseconds. The first delta is relative to the + * profile startTime. + */ + timeDeltas?: number[]; + } + + /** + * Specifies a number of samples attributed to a certain source position. + */ + interface PositionTickInfo { + /** + * Source line number (1-based). + */ + line: number; + /** + * Number of samples attributed to the source line. + */ + ticks: number; + } + + /** + * Coverage data for a source range. + */ + interface CoverageRange { + /** + * JavaScript script source offset for the range start. + */ + startOffset: number; + /** + * JavaScript script source offset for the range end. + */ + endOffset: number; + /** + * Collected execution count of the source range. + */ + count: number; + } + + /** + * Coverage data for a JavaScript function. + */ + interface FunctionCoverage { + /** + * JavaScript function name. + */ + functionName: string; + /** + * Source ranges inside the function with coverage data. + */ + ranges: CoverageRange[]; + /** + * Whether coverage data for this function has block granularity. + */ + isBlockCoverage: boolean; + } + + /** + * Coverage data for a JavaScript script. + */ + interface ScriptCoverage { + /** + * JavaScript script id. + */ + scriptId: Runtime.ScriptId; + /** + * JavaScript script name or url. + */ + url: string; + /** + * Functions contained in the script that has coverage data. + */ + functions: FunctionCoverage[]; + } + + /** + * Describes a type collected during runtime. + * @experimental + */ + interface TypeObject { + /** + * Name of a type collected with type profiling. + */ + name: string; + } + + /** + * Source offset and types for a parameter or return value. + * @experimental + */ + interface TypeProfileEntry { + /** + * Source offset of the parameter or end of function for return values. + */ + offset: number; + /** + * The types for this parameter or return value. + */ + types: TypeObject[]; + } + + /** + * Type profile data collected during runtime for a JavaScript script. + * @experimental + */ + interface ScriptTypeProfile { + /** + * JavaScript script id. + */ + scriptId: Runtime.ScriptId; + /** + * JavaScript script name or url. + */ + url: string; + /** + * Type profile entries for parameters and return values of the functions in the script. + */ + entries: TypeProfileEntry[]; + } + + interface SetSamplingIntervalParameterType { + /** + * New sampling interval in microseconds. + */ + interval: number; + } + + interface StartPreciseCoverageParameterType { + /** + * Collect accurate call counts beyond simple 'covered' or 'not covered'. + */ + callCount?: boolean; + /** + * Collect block-based coverage. + */ + detailed?: boolean; + } + + interface GetBestEffortCoverageReturnType { + /** + * Coverage data for the current isolate. + */ + result: ScriptCoverage[]; + } + + interface StopReturnType { + /** + * Recorded profile. + */ + profile: Profile; + } + + interface TakePreciseCoverageReturnType { + /** + * Coverage data for the current isolate. + */ + result: ScriptCoverage[]; + } + + interface TakeTypeProfileReturnType { + /** + * Type profile for all scripts since startTypeProfile() was turned on. + */ + result: ScriptTypeProfile[]; + } + + interface ConsoleProfileFinishedEventDataType { + id: string; + /** + * Location of console.profileEnd(). + */ + location: Debugger.Location; + profile: Profile; + /** + * Profile title passed as an argument to console.profile(). + */ + title?: string; + } + + interface ConsoleProfileStartedEventDataType { + id: string; + /** + * Location of console.profile(). + */ + location: Debugger.Location; + /** + * Profile title passed as an argument to console.profile(). + */ + title?: string; + } + } + + namespace Runtime { + /** + * Unique script identifier. + */ + type ScriptId = string; + + /** + * Unique object identifier. + */ + type RemoteObjectId = string; + + /** + * Primitive value which cannot be JSON-stringified. Includes values `-0`, `NaN`, `Infinity`, + * `-Infinity`, and bigint literals. + */ + type UnserializableValue = string; + + /** + * Mirror object referencing original JavaScript object. + */ + interface RemoteObject { + /** + * Object type. + */ + type: string; + /** + * Object subtype hint. Specified for `object` type values only. + */ + subtype?: string; + /** + * Object class (constructor) name. Specified for `object` type values only. + */ + className?: string; + /** + * Remote object value in case of primitive values or JSON values (if it was requested). + */ + value?: any; + /** + * Primitive value which can not be JSON-stringified does not have `value`, but gets this + * property. + */ + unserializableValue?: UnserializableValue; + /** + * String representation of the object. + */ + description?: string; + /** + * Unique object identifier (for non-primitive values). + */ + objectId?: RemoteObjectId; + /** + * Preview containing abbreviated property values. Specified for `object` type values only. + * @experimental + */ + preview?: ObjectPreview; + /** + * @experimental + */ + customPreview?: CustomPreview; + } + + /** + * @experimental + */ + interface CustomPreview { + header: string; + hasBody: boolean; + formatterObjectId: RemoteObjectId; + bindRemoteObjectFunctionId: RemoteObjectId; + configObjectId?: RemoteObjectId; + } + + /** + * Object containing abbreviated remote object value. + * @experimental + */ + interface ObjectPreview { + /** + * Object type. + */ + type: string; + /** + * Object subtype hint. Specified for `object` type values only. + */ + subtype?: string; + /** + * String representation of the object. + */ + description?: string; + /** + * True iff some of the properties or entries of the original object did not fit. + */ + overflow: boolean; + /** + * List of the properties. + */ + properties: PropertyPreview[]; + /** + * List of the entries. Specified for `map` and `set` subtype values only. + */ + entries?: EntryPreview[]; + } + + /** + * @experimental + */ + interface PropertyPreview { + /** + * Property name. + */ + name: string; + /** + * Object type. Accessor means that the property itself is an accessor property. + */ + type: string; + /** + * User-friendly property value string. + */ + value?: string; + /** + * Nested value preview. + */ + valuePreview?: ObjectPreview; + /** + * Object subtype hint. Specified for `object` type values only. + */ + subtype?: string; + } + + /** + * @experimental + */ + interface EntryPreview { + /** + * Preview of the key. Specified for map-like collection entries. + */ + key?: ObjectPreview; + /** + * Preview of the value. + */ + value: ObjectPreview; + } + + /** + * Object property descriptor. + */ + interface PropertyDescriptor { + /** + * Property name or symbol description. + */ + name: string; + /** + * The value associated with the property. + */ + value?: RemoteObject; + /** + * True if the value associated with the property may be changed (data descriptors only). + */ + writable?: boolean; + /** + * A function which serves as a getter for the property, or `undefined` if there is no getter + * (accessor descriptors only). + */ + get?: RemoteObject; + /** + * A function which serves as a setter for the property, or `undefined` if there is no setter + * (accessor descriptors only). + */ + set?: RemoteObject; + /** + * True if the type of this property descriptor may be changed and if the property may be + * deleted from the corresponding object. + */ + configurable: boolean; + /** + * True if this property shows up during enumeration of the properties on the corresponding + * object. + */ + enumerable: boolean; + /** + * True if the result was thrown during the evaluation. + */ + wasThrown?: boolean; + /** + * True if the property is owned for the object. + */ + isOwn?: boolean; + /** + * Property symbol object, if the property is of the `symbol` type. + */ + symbol?: RemoteObject; + } + + /** + * Object internal property descriptor. This property isn't normally visible in JavaScript code. + */ + interface InternalPropertyDescriptor { + /** + * Conventional property name. + */ + name: string; + /** + * The value associated with the property. + */ + value?: RemoteObject; + } + + /** + * Represents function call argument. Either remote object id `objectId`, primitive `value`, + * unserializable primitive value or neither of (for undefined) them should be specified. + */ + interface CallArgument { + /** + * Primitive value or serializable javascript object. + */ + value?: any; + /** + * Primitive value which can not be JSON-stringified. + */ + unserializableValue?: UnserializableValue; + /** + * Remote object handle. + */ + objectId?: RemoteObjectId; + } + + /** + * Id of an execution context. + */ + type ExecutionContextId = number; + + /** + * Description of an isolated world. + */ + interface ExecutionContextDescription { + /** + * Unique id of the execution context. It can be used to specify in which execution context + * script evaluation should be performed. + */ + id: ExecutionContextId; + /** + * Execution context origin. + */ + origin: string; + /** + * Human readable name describing given context. + */ + name: string; + /** + * Embedder-specific auxiliary data. + */ + auxData?: {}; + } + + /** + * Detailed information about exception (or error) that was thrown during script compilation or + * execution. + */ + interface ExceptionDetails { + /** + * Exception id. + */ + exceptionId: number; + /** + * Exception text, which should be used together with exception object when available. + */ + text: string; + /** + * Line number of the exception location (0-based). + */ + lineNumber: number; + /** + * Column number of the exception location (0-based). + */ + columnNumber: number; + /** + * Script ID of the exception location. + */ + scriptId?: ScriptId; + /** + * URL of the exception location, to be used when the script was not reported. + */ + url?: string; + /** + * JavaScript stack trace if available. + */ + stackTrace?: StackTrace; + /** + * Exception object if available. + */ + exception?: RemoteObject; + /** + * Identifier of the context where exception happened. + */ + executionContextId?: ExecutionContextId; + } + + /** + * Number of milliseconds since epoch. + */ + type Timestamp = number; + + /** + * Number of milliseconds. + */ + type TimeDelta = number; + + /** + * Stack entry for runtime errors and assertions. + */ + interface CallFrame { + /** + * JavaScript function name. + */ + functionName: string; + /** + * JavaScript script id. + */ + scriptId: ScriptId; + /** + * JavaScript script name or url. + */ + url: string; + /** + * JavaScript script line number (0-based). + */ + lineNumber: number; + /** + * JavaScript script column number (0-based). + */ + columnNumber: number; + } + + /** + * Call frames for assertions or error messages. + */ + interface StackTrace { + /** + * String label of this stack trace. For async traces this may be a name of the function that + * initiated the async call. + */ + description?: string; + /** + * JavaScript function name. + */ + callFrames: CallFrame[]; + /** + * Asynchronous JavaScript stack trace that preceded this stack, if available. + */ + parent?: StackTrace; + /** + * Asynchronous JavaScript stack trace that preceded this stack, if available. + * @experimental + */ + parentId?: StackTraceId; + } + + /** + * Unique identifier of current debugger. + * @experimental + */ + type UniqueDebuggerId = string; + + /** + * If `debuggerId` is set stack trace comes from another debugger and can be resolved there. This + * allows to track cross-debugger calls. See `Runtime.StackTrace` and `Debugger.paused` for usages. + * @experimental + */ + interface StackTraceId { + id: string; + debuggerId?: UniqueDebuggerId; + } + + interface AwaitPromiseParameterType { + /** + * Identifier of the promise. + */ + promiseObjectId: RemoteObjectId; + /** + * Whether the result is expected to be a JSON object that should be sent by value. + */ + returnByValue?: boolean; + /** + * Whether preview should be generated for the result. + */ + generatePreview?: boolean; + } + + interface CallFunctionOnParameterType { + /** + * Declaration of the function to call. + */ + functionDeclaration: string; + /** + * Identifier of the object to call function on. Either objectId or executionContextId should + * be specified. + */ + objectId?: RemoteObjectId; + /** + * Call arguments. All call arguments must belong to the same JavaScript world as the target + * object. + */ + arguments?: CallArgument[]; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause + * execution. Overrides `setPauseOnException` state. + */ + silent?: boolean; + /** + * Whether the result is expected to be a JSON object which should be sent by value. + */ + returnByValue?: boolean; + /** + * Whether preview should be generated for the result. + * @experimental + */ + generatePreview?: boolean; + /** + * Whether execution should be treated as initiated by user in the UI. + */ + userGesture?: boolean; + /** + * Whether execution should `await` for resulting value and return once awaited promise is + * resolved. + */ + awaitPromise?: boolean; + /** + * Specifies execution context which global object will be used to call function on. Either + * executionContextId or objectId should be specified. + */ + executionContextId?: ExecutionContextId; + /** + * Symbolic group name that can be used to release multiple objects. If objectGroup is not + * specified and objectId is, objectGroup will be inherited from object. + */ + objectGroup?: string; + } + + interface CompileScriptParameterType { + /** + * Expression to compile. + */ + expression: string; + /** + * Source url to be set for the script. + */ + sourceURL: string; + /** + * Specifies whether the compiled script should be persisted. + */ + persistScript: boolean; + /** + * Specifies in which execution context to perform script run. If the parameter is omitted the + * evaluation will be performed in the context of the inspected page. + */ + executionContextId?: ExecutionContextId; + } + + interface EvaluateParameterType { + /** + * Expression to evaluate. + */ + expression: string; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string; + /** + * Determines whether Command Line API should be available during the evaluation. + */ + includeCommandLineAPI?: boolean; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause + * execution. Overrides `setPauseOnException` state. + */ + silent?: boolean; + /** + * Specifies in which execution context to perform evaluation. If the parameter is omitted the + * evaluation will be performed in the context of the inspected page. + */ + contextId?: ExecutionContextId; + /** + * Whether the result is expected to be a JSON object that should be sent by value. + */ + returnByValue?: boolean; + /** + * Whether preview should be generated for the result. + * @experimental + */ + generatePreview?: boolean; + /** + * Whether execution should be treated as initiated by user in the UI. + */ + userGesture?: boolean; + /** + * Whether execution should `await` for resulting value and return once awaited promise is + * resolved. + */ + awaitPromise?: boolean; + /** + * Whether to throw an exception if side effect cannot be ruled out during evaluation. + * @experimental + */ + throwOnSideEffect?: boolean; + /** + * Terminate execution after timing out (number of milliseconds). + * @experimental + */ + timeout?: TimeDelta; + } + + interface GetPropertiesParameterType { + /** + * Identifier of the object to return properties for. + */ + objectId: RemoteObjectId; + /** + * If true, returns properties belonging only to the element itself, not to its prototype + * chain. + */ + ownProperties?: boolean; + /** + * If true, returns accessor properties (with getter/setter) only; internal properties are not + * returned either. + * @experimental + */ + accessorPropertiesOnly?: boolean; + /** + * Whether preview should be generated for the results. + * @experimental + */ + generatePreview?: boolean; + } + + interface GlobalLexicalScopeNamesParameterType { + /** + * Specifies in which execution context to lookup global scope variables. + */ + executionContextId?: ExecutionContextId; + } + + interface QueryObjectsParameterType { + /** + * Identifier of the prototype to return objects for. + */ + prototypeObjectId: RemoteObjectId; + /** + * Symbolic group name that can be used to release the results. + */ + objectGroup?: string; + } + + interface ReleaseObjectParameterType { + /** + * Identifier of the object to release. + */ + objectId: RemoteObjectId; + } + + interface ReleaseObjectGroupParameterType { + /** + * Symbolic object group name. + */ + objectGroup: string; + } + + interface RunScriptParameterType { + /** + * Id of the script to run. + */ + scriptId: ScriptId; + /** + * Specifies in which execution context to perform script run. If the parameter is omitted the + * evaluation will be performed in the context of the inspected page. + */ + executionContextId?: ExecutionContextId; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause + * execution. Overrides `setPauseOnException` state. + */ + silent?: boolean; + /** + * Determines whether Command Line API should be available during the evaluation. + */ + includeCommandLineAPI?: boolean; + /** + * Whether the result is expected to be a JSON object which should be sent by value. + */ + returnByValue?: boolean; + /** + * Whether preview should be generated for the result. + */ + generatePreview?: boolean; + /** + * Whether execution should `await` for resulting value and return once awaited promise is + * resolved. + */ + awaitPromise?: boolean; + } + + interface SetAsyncCallStackDepthParameterType { + /** + * Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async + * call stacks (default). + */ + maxDepth: number; + } + + interface SetCustomObjectFormatterEnabledParameterType { + enabled: boolean; + } + + interface SetMaxCallStackSizeToCaptureParameterType { + size: number; + } + + interface AddBindingParameterType { + name: string; + executionContextId?: ExecutionContextId; + } + + interface RemoveBindingParameterType { + name: string; + } + + interface AwaitPromiseReturnType { + /** + * Promise result. Will contain rejected value if promise was rejected. + */ + result: RemoteObject; + /** + * Exception details if stack strace is available. + */ + exceptionDetails?: ExceptionDetails; + } + + interface CallFunctionOnReturnType { + /** + * Call result. + */ + result: RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails; + } + + interface CompileScriptReturnType { + /** + * Id of the script. + */ + scriptId?: ScriptId; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails; + } + + interface EvaluateReturnType { + /** + * Evaluation result. + */ + result: RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails; + } + + interface GetIsolateIdReturnType { + /** + * The isolate id. + */ + id: string; + } + + interface GetHeapUsageReturnType { + /** + * Used heap size in bytes. + */ + usedSize: number; + /** + * Allocated heap size in bytes. + */ + totalSize: number; + } + + interface GetPropertiesReturnType { + /** + * Object properties. + */ + result: PropertyDescriptor[]; + /** + * Internal object properties (only of the element itself). + */ + internalProperties?: InternalPropertyDescriptor[]; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails; + } + + interface GlobalLexicalScopeNamesReturnType { + names: string[]; + } + + interface QueryObjectsReturnType { + /** + * Array with objects. + */ + objects: RemoteObject; + } + + interface RunScriptReturnType { + /** + * Run result. + */ + result: RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails; + } + + interface BindingCalledEventDataType { + name: string; + payload: string; + /** + * Identifier of the context where the call was made. + */ + executionContextId: ExecutionContextId; + } + + interface ConsoleAPICalledEventDataType { + /** + * Type of the call. + */ + type: string; + /** + * Call arguments. + */ + args: RemoteObject[]; + /** + * Identifier of the context where the call was made. + */ + executionContextId: ExecutionContextId; + /** + * Call timestamp. + */ + timestamp: Timestamp; + /** + * Stack trace captured when the call was made. + */ + stackTrace?: StackTrace; + /** + * Console context descriptor for calls on non-default console context (not console.*): + * 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call + * on named context. + * @experimental + */ + context?: string; + } + + interface ExceptionRevokedEventDataType { + /** + * Reason describing why exception was revoked. + */ + reason: string; + /** + * The id of revoked exception, as reported in `exceptionThrown`. + */ + exceptionId: number; + } + + interface ExceptionThrownEventDataType { + /** + * Timestamp of the exception. + */ + timestamp: Timestamp; + exceptionDetails: ExceptionDetails; + } + + interface ExecutionContextCreatedEventDataType { + /** + * A newly created execution context. + */ + context: ExecutionContextDescription; + } + + interface ExecutionContextDestroyedEventDataType { + /** + * Id of the destroyed context + */ + executionContextId: ExecutionContextId; + } + + interface InspectRequestedEventDataType { + object: RemoteObject; + hints: {}; + } + } + + namespace Schema { + /** + * Description of the protocol domain. + */ + interface Domain { + /** + * Domain name. + */ + name: string; + /** + * Domain version. + */ + version: string; + } + + interface GetDomainsReturnType { + /** + * List of supported domains. + */ + domains: Domain[]; + } + } + + namespace NodeTracing { + interface TraceConfig { + /** + * Controls how the trace buffer stores data. + */ + recordMode?: string; + /** + * Included category filters. + */ + includedCategories: string[]; + } + + interface StartParameterType { + traceConfig: TraceConfig; + } + + interface GetCategoriesReturnType { + /** + * A list of supported tracing categories. + */ + categories: string[]; + } + + interface DataCollectedEventDataType { + value: Array<{}>; + } + } + + namespace NodeWorker { + type WorkerID = string; + + /** + * Unique identifier of attached debugging session. + */ + type SessionID = string; + + interface WorkerInfo { + workerId: WorkerID; + type: string; + title: string; + url: string; + } + + interface SendMessageToWorkerParameterType { + message: string; + /** + * Identifier of the session. + */ + sessionId: SessionID; + } + + interface EnableParameterType { + /** + * Whether to new workers should be paused until the frontend sends `Runtime.runIfWaitingForDebugger` + * message to run them. + */ + waitForDebuggerOnStart: boolean; + } + + interface AttachedToWorkerEventDataType { + /** + * Identifier assigned to the session used to send/receive messages. + */ + sessionId: SessionID; + workerInfo: WorkerInfo; + waitingForDebugger: boolean; + } + + interface DetachedFromWorkerEventDataType { + /** + * Detached session identifier. + */ + sessionId: SessionID; + } + + interface ReceivedMessageFromWorkerEventDataType { + /** + * Identifier of a session which sends a message. + */ + sessionId: SessionID; + message: string; + } + } + + /** + * The inspector.Session is used for dispatching messages to the V8 inspector back-end and receiving message responses and notifications. + */ + class Session extends EventEmitter { + /** + * Create a new instance of the inspector.Session class. + * The inspector session needs to be connected through session.connect() before the messages can be dispatched to the inspector backend. + */ + constructor(); + + /** + * Connects a session to the inspector back-end. + * An exception will be thrown if there is already a connected session established either + * through the API or by a front-end connected to the Inspector WebSocket port. + */ + connect(): void; + + /** + * Immediately close the session. All pending message callbacks will be called with an error. + * session.connect() will need to be called to be able to send messages again. + * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints. + */ + disconnect(): void; + + /** + * Posts a message to the inspector back-end. callback will be notified when a response is received. + * callback is a function that accepts two optional arguments - error and message-specific result. + */ + post(method: string, params?: {}, callback?: (err: Error | null, params?: {}) => void): void; + post(method: string, callback?: (err: Error | null, params?: {}) => void): void; + + /** + * Does nothing. + */ + post(method: "Console.clearMessages", callback?: (err: Error | null) => void): void; + + /** + * Disables console domain, prevents further console messages from being reported to the client. + */ + post(method: "Console.disable", callback?: (err: Error | null) => void): void; + + /** + * Enables console domain, sends the messages collected so far to the client by means of the + * `messageAdded` notification. + */ + post(method: "Console.enable", callback?: (err: Error | null) => void): void; + + /** + * Continues execution until specific location is reached. + */ + post(method: "Debugger.continueToLocation", params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.continueToLocation", callback?: (err: Error | null) => void): void; + + /** + * Disables debugger for given page. + */ + post(method: "Debugger.disable", callback?: (err: Error | null) => void): void; + + /** + * Enables debugger for the given page. Clients should not assume that the debugging has been + * enabled until the result for this command is received. + */ + post(method: "Debugger.enable", callback?: (err: Error | null, params: Debugger.EnableReturnType) => void): void; + + /** + * Evaluates expression on a given call frame. + */ + post(method: "Debugger.evaluateOnCallFrame", params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; + post(method: "Debugger.evaluateOnCallFrame", callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; + + /** + * Returns possible locations for breakpoint. scriptId in start and end range locations should be + * the same. + */ + post( + method: "Debugger.getPossibleBreakpoints", + params?: Debugger.GetPossibleBreakpointsParameterType, + callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void + ): void; + post(method: "Debugger.getPossibleBreakpoints", callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void; + + /** + * Returns source for the script with given id. + */ + post(method: "Debugger.getScriptSource", params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; + post(method: "Debugger.getScriptSource", callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; + + /** + * Returns stack trace with given `stackTraceId`. + * @experimental + */ + post(method: "Debugger.getStackTrace", params?: Debugger.GetStackTraceParameterType, callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void; + post(method: "Debugger.getStackTrace", callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void; + + /** + * Stops on the next JavaScript statement. + */ + post(method: "Debugger.pause", callback?: (err: Error | null) => void): void; + + /** + * @experimental + */ + post(method: "Debugger.pauseOnAsyncCall", params?: Debugger.PauseOnAsyncCallParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.pauseOnAsyncCall", callback?: (err: Error | null) => void): void; + + /** + * Removes JavaScript breakpoint. + */ + post(method: "Debugger.removeBreakpoint", params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.removeBreakpoint", callback?: (err: Error | null) => void): void; + + /** + * Restarts particular call frame from the beginning. + */ + post(method: "Debugger.restartFrame", params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; + post(method: "Debugger.restartFrame", callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; + + /** + * Resumes JavaScript execution. + */ + post(method: "Debugger.resume", callback?: (err: Error | null) => void): void; + + /** + * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and + * Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled + * before next pause. Returns success when async task is actually scheduled, returns error if no + * task were scheduled or another scheduleStepIntoAsync was called. + * @experimental + */ + post(method: "Debugger.scheduleStepIntoAsync", callback?: (err: Error | null) => void): void; + + /** + * Searches for given string in script content. + */ + post(method: "Debugger.searchInContent", params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; + post(method: "Debugger.searchInContent", callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; + + /** + * Enables or disables async call stacks tracking. + */ + post(method: "Debugger.setAsyncCallStackDepth", params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setAsyncCallStackDepth", callback?: (err: Error | null) => void): void; + + /** + * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in + * scripts with url matching one of the patterns. VM will try to leave blackboxed script by + * performing 'step in' several times, finally resorting to 'step out' if unsuccessful. + * @experimental + */ + post(method: "Debugger.setBlackboxPatterns", params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setBlackboxPatterns", callback?: (err: Error | null) => void): void; + + /** + * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted + * scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. + * Positions array contains positions where blackbox state is changed. First interval isn't + * blackboxed. Array should be sorted. + * @experimental + */ + post(method: "Debugger.setBlackboxedRanges", params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setBlackboxedRanges", callback?: (err: Error | null) => void): void; + + /** + * Sets JavaScript breakpoint at a given location. + */ + post(method: "Debugger.setBreakpoint", params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; + post(method: "Debugger.setBreakpoint", callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; + + /** + * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this + * command is issued, all existing parsed scripts will have breakpoints resolved and returned in + * `locations` property. Further matching script parsing will result in subsequent + * `breakpointResolved` events issued. This logical breakpoint will survive page reloads. + */ + post(method: "Debugger.setBreakpointByUrl", params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; + post(method: "Debugger.setBreakpointByUrl", callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; + + /** + * Sets JavaScript breakpoint before each call to the given function. + * If another function was created from the same source as a given one, + * calling it will also trigger the breakpoint. + * @experimental + */ + post( + method: "Debugger.setBreakpointOnFunctionCall", + params?: Debugger.SetBreakpointOnFunctionCallParameterType, + callback?: (err: Error | null, params: Debugger.SetBreakpointOnFunctionCallReturnType) => void + ): void; + post(method: "Debugger.setBreakpointOnFunctionCall", callback?: (err: Error | null, params: Debugger.SetBreakpointOnFunctionCallReturnType) => void): void; + + /** + * Activates / deactivates all breakpoints on the page. + */ + post(method: "Debugger.setBreakpointsActive", params?: Debugger.SetBreakpointsActiveParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setBreakpointsActive", callback?: (err: Error | null) => void): void; + + /** + * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or + * no exceptions. Initial pause on exceptions state is `none`. + */ + post(method: "Debugger.setPauseOnExceptions", params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setPauseOnExceptions", callback?: (err: Error | null) => void): void; + + /** + * Changes return value in top frame. Available only at return break position. + * @experimental + */ + post(method: "Debugger.setReturnValue", params?: Debugger.SetReturnValueParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setReturnValue", callback?: (err: Error | null) => void): void; + + /** + * Edits JavaScript source live. + */ + post(method: "Debugger.setScriptSource", params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; + post(method: "Debugger.setScriptSource", callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; + + /** + * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). + */ + post(method: "Debugger.setSkipAllPauses", params?: Debugger.SetSkipAllPausesParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setSkipAllPauses", callback?: (err: Error | null) => void): void; + + /** + * Changes value of variable in a callframe. Object-based scopes are not supported and must be + * mutated manually. + */ + post(method: "Debugger.setVariableValue", params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setVariableValue", callback?: (err: Error | null) => void): void; + + /** + * Steps into the function call. + */ + post(method: "Debugger.stepInto", params?: Debugger.StepIntoParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.stepInto", callback?: (err: Error | null) => void): void; + + /** + * Steps out of the function call. + */ + post(method: "Debugger.stepOut", callback?: (err: Error | null) => void): void; + + /** + * Steps over the statement. + */ + post(method: "Debugger.stepOver", callback?: (err: Error | null) => void): void; + + /** + * Enables console to refer to the node with given id via $x (see Command Line API for more details + * $x functions). + */ + post(method: "HeapProfiler.addInspectedHeapObject", params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.addInspectedHeapObject", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.collectGarbage", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.disable", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.enable", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.getHeapObjectId", params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; + post(method: "HeapProfiler.getHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; + + post( + method: "HeapProfiler.getObjectByHeapObjectId", + params?: HeapProfiler.GetObjectByHeapObjectIdParameterType, + callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void + ): void; + post(method: "HeapProfiler.getObjectByHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void; + + post(method: "HeapProfiler.getSamplingProfile", callback?: (err: Error | null, params: HeapProfiler.GetSamplingProfileReturnType) => void): void; + + post(method: "HeapProfiler.startSampling", params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.startSampling", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.startTrackingHeapObjects", params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.startTrackingHeapObjects", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.stopSampling", callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void; + + post(method: "HeapProfiler.stopTrackingHeapObjects", params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.stopTrackingHeapObjects", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.takeHeapSnapshot", params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.takeHeapSnapshot", callback?: (err: Error | null) => void): void; + + post(method: "Profiler.disable", callback?: (err: Error | null) => void): void; + + post(method: "Profiler.enable", callback?: (err: Error | null) => void): void; + + /** + * Collect coverage data for the current isolate. The coverage data may be incomplete due to + * garbage collection. + */ + post(method: "Profiler.getBestEffortCoverage", callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void; + + /** + * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started. + */ + post(method: "Profiler.setSamplingInterval", params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void; + post(method: "Profiler.setSamplingInterval", callback?: (err: Error | null) => void): void; + + post(method: "Profiler.start", callback?: (err: Error | null) => void): void; + + /** + * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code + * coverage may be incomplete. Enabling prevents running optimized code and resets execution + * counters. + */ + post(method: "Profiler.startPreciseCoverage", params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void; + post(method: "Profiler.startPreciseCoverage", callback?: (err: Error | null) => void): void; + + /** + * Enable type profile. + * @experimental + */ + post(method: "Profiler.startTypeProfile", callback?: (err: Error | null) => void): void; + + post(method: "Profiler.stop", callback?: (err: Error | null, params: Profiler.StopReturnType) => void): void; + + /** + * Disable precise code coverage. Disabling releases unnecessary execution count records and allows + * executing optimized code. + */ + post(method: "Profiler.stopPreciseCoverage", callback?: (err: Error | null) => void): void; + + /** + * Disable type profile. Disabling releases type profile data collected so far. + * @experimental + */ + post(method: "Profiler.stopTypeProfile", callback?: (err: Error | null) => void): void; + + /** + * Collect coverage data for the current isolate, and resets execution counters. Precise code + * coverage needs to have started. + */ + post(method: "Profiler.takePreciseCoverage", callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void; + + /** + * Collect type profile. + * @experimental + */ + post(method: "Profiler.takeTypeProfile", callback?: (err: Error | null, params: Profiler.TakeTypeProfileReturnType) => void): void; + + /** + * Add handler to promise with given promise object id. + */ + post(method: "Runtime.awaitPromise", params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; + post(method: "Runtime.awaitPromise", callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; + + /** + * Calls function with given declaration on the given object. Object group of the result is + * inherited from the target object. + */ + post(method: "Runtime.callFunctionOn", params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; + post(method: "Runtime.callFunctionOn", callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; + + /** + * Compiles expression. + */ + post(method: "Runtime.compileScript", params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; + post(method: "Runtime.compileScript", callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; + + /** + * Disables reporting of execution contexts creation. + */ + post(method: "Runtime.disable", callback?: (err: Error | null) => void): void; + + /** + * Discards collected exceptions and console API calls. + */ + post(method: "Runtime.discardConsoleEntries", callback?: (err: Error | null) => void): void; + + /** + * Enables reporting of execution contexts creation by means of `executionContextCreated` event. + * When the reporting gets enabled the event will be sent immediately for each existing execution + * context. + */ + post(method: "Runtime.enable", callback?: (err: Error | null) => void): void; + + /** + * Evaluates expression on global object. + */ + post(method: "Runtime.evaluate", params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; + post(method: "Runtime.evaluate", callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; + + /** + * Returns the isolate id. + * @experimental + */ + post(method: "Runtime.getIsolateId", callback?: (err: Error | null, params: Runtime.GetIsolateIdReturnType) => void): void; + + /** + * Returns the JavaScript heap usage. + * It is the total usage of the corresponding isolate not scoped to a particular Runtime. + * @experimental + */ + post(method: "Runtime.getHeapUsage", callback?: (err: Error | null, params: Runtime.GetHeapUsageReturnType) => void): void; + + /** + * Returns properties of a given object. Object group of the result is inherited from the target + * object. + */ + post(method: "Runtime.getProperties", params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; + post(method: "Runtime.getProperties", callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; + + /** + * Returns all let, const and class variables from global scope. + */ + post( + method: "Runtime.globalLexicalScopeNames", + params?: Runtime.GlobalLexicalScopeNamesParameterType, + callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void + ): void; + post(method: "Runtime.globalLexicalScopeNames", callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void): void; + + post(method: "Runtime.queryObjects", params?: Runtime.QueryObjectsParameterType, callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void; + post(method: "Runtime.queryObjects", callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void; + + /** + * Releases remote object with given id. + */ + post(method: "Runtime.releaseObject", params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.releaseObject", callback?: (err: Error | null) => void): void; + + /** + * Releases all remote objects that belong to a given group. + */ + post(method: "Runtime.releaseObjectGroup", params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.releaseObjectGroup", callback?: (err: Error | null) => void): void; + + /** + * Tells inspected instance to run if it was waiting for debugger to attach. + */ + post(method: "Runtime.runIfWaitingForDebugger", callback?: (err: Error | null) => void): void; + + /** + * Runs script with given id in a given context. + */ + post(method: "Runtime.runScript", params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; + post(method: "Runtime.runScript", callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; + + /** + * Enables or disables async call stacks tracking. + */ + post(method: "Runtime.setAsyncCallStackDepth", params?: Runtime.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.setAsyncCallStackDepth", 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; + + /** + * @experimental + */ + post(method: "Runtime.setMaxCallStackSizeToCapture", params?: Runtime.SetMaxCallStackSizeToCaptureParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.setMaxCallStackSizeToCapture", callback?: (err: Error | null) => void): void; + + /** + * Terminate current or next JavaScript execution. + * Will cancel the termination when the outer-most script execution ends. + * @experimental + */ + post(method: "Runtime.terminateExecution", callback?: (err: Error | null) => void): void; + + /** + * If executionContextId is empty, adds binding with the given name on the + * global objects of all inspected contexts, including those created later, + * bindings survive reloads. + * If executionContextId is specified, adds binding only on global object of + * given execution context. + * Binding function takes exactly one argument, this argument should be string, + * in case of any other input, function throws an exception. + * Each binding function call produces Runtime.bindingCalled notification. + * @experimental + */ + post(method: "Runtime.addBinding", params?: Runtime.AddBindingParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.addBinding", callback?: (err: Error | null) => void): void; + + /** + * This method does not remove binding function from global object but + * unsubscribes current runtime agent from Runtime.bindingCalled notifications. + * @experimental + */ + post(method: "Runtime.removeBinding", params?: Runtime.RemoveBindingParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.removeBinding", callback?: (err: Error | null) => void): void; + + /** + * Returns supported domains. + */ + post(method: "Schema.getDomains", callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void; + + /** + * Gets supported tracing categories. + */ + post(method: "NodeTracing.getCategories", callback?: (err: Error | null, params: NodeTracing.GetCategoriesReturnType) => void): void; + + /** + * Start trace events collection. + */ + post(method: "NodeTracing.start", params?: NodeTracing.StartParameterType, callback?: (err: Error | null) => void): void; + post(method: "NodeTracing.start", callback?: (err: Error | null) => void): void; + + /** + * Stop trace events collection. Remaining collected events will be sent as a sequence of + * dataCollected events followed by tracingComplete event. + */ + post(method: "NodeTracing.stop", callback?: (err: Error | null) => void): void; + + /** + * Sends protocol message over session with given id. + */ + post(method: "NodeWorker.sendMessageToWorker", params?: NodeWorker.SendMessageToWorkerParameterType, callback?: (err: Error | null) => void): void; + post(method: "NodeWorker.sendMessageToWorker", callback?: (err: Error | null) => void): void; + + /** + * Instructs the inspector to attach to running workers. Will also attach to new workers + * as they start + */ + post(method: "NodeWorker.enable", params?: NodeWorker.EnableParameterType, callback?: (err: Error | null) => void): void; + post(method: "NodeWorker.enable", callback?: (err: Error | null) => void): void; + + /** + * Detaches from all running workers and disables attaching to new workers as they are started. + */ + post(method: "NodeWorker.disable", callback?: (err: Error | null) => void): void; + + // Events + + addListener(event: string, listener: (...args: any[]) => void): this; + + /** + * Emitted when any notification from the V8 Inspector is received. + */ + addListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; + + /** + * Issued when new console message is added. + */ + addListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + addListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + addListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine resumed execution. + */ + addListener(event: "Debugger.resumed", listener: () => void): this; + + /** + * Fired when virtual machine fails to parse the script. + */ + addListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected + * scripts upon enabling debugger. + */ + addListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + + addListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + addListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend regularly sends a current value for last + * seen object id and corresponding timestamp. If the were changes in the heap since last event + * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + addListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + + addListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + addListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + addListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + + /** + * Sent when new profile recording is started using console.profile() call. + */ + addListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + + /** + * Notification is issued every time when binding is called. + * @experimental + */ + addListener(event: "Runtime.bindingCalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when console API was called. + */ + addListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when unhandled exception was revoked. + */ + addListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when exception was thrown and unhandled. + */ + addListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when new execution context is created. + */ + addListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when execution context is destroyed. + */ + addListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when all executionContexts were cleared in browser + */ + addListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API + * call). + */ + addListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + + /** + * Contains an bucket of collected trace events. + */ + addListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + addListener(event: "NodeTracing.tracingComplete", listener: () => void): this; + + /** + * Issued when attached to a worker. + */ + addListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when detached from the worker. + */ + addListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + addListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "inspectorNotification", message: InspectorNotification<{}>): boolean; + emit(event: "Console.messageAdded", message: InspectorNotification): boolean; + emit(event: "Debugger.breakpointResolved", message: InspectorNotification): boolean; + emit(event: "Debugger.paused", message: InspectorNotification): boolean; + emit(event: "Debugger.resumed"): boolean; + emit(event: "Debugger.scriptFailedToParse", message: InspectorNotification): boolean; + emit(event: "Debugger.scriptParsed", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.addHeapSnapshotChunk", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.heapStatsUpdate", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.lastSeenObjectId", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.reportHeapSnapshotProgress", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.resetProfiles"): boolean; + emit(event: "Profiler.consoleProfileFinished", message: InspectorNotification): boolean; + emit(event: "Profiler.consoleProfileStarted", message: InspectorNotification): boolean; + emit(event: "Runtime.bindingCalled", message: InspectorNotification): boolean; + emit(event: "Runtime.consoleAPICalled", message: InspectorNotification): boolean; + emit(event: "Runtime.exceptionRevoked", message: InspectorNotification): boolean; + emit(event: "Runtime.exceptionThrown", message: InspectorNotification): boolean; + emit(event: "Runtime.executionContextCreated", message: InspectorNotification): boolean; + emit(event: "Runtime.executionContextDestroyed", message: InspectorNotification): boolean; + emit(event: "Runtime.executionContextsCleared"): boolean; + emit(event: "Runtime.inspectRequested", message: InspectorNotification): boolean; + emit(event: "NodeTracing.dataCollected", message: InspectorNotification): boolean; + emit(event: "NodeTracing.tracingComplete"): boolean; + emit(event: "NodeWorker.attachedToWorker", message: InspectorNotification): boolean; + emit(event: "NodeWorker.detachedFromWorker", message: InspectorNotification): boolean; + emit(event: "NodeWorker.receivedMessageFromWorker", message: InspectorNotification): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + + /** + * Emitted when any notification from the V8 Inspector is received. + */ + on(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; + + /** + * Issued when new console message is added. + */ + on(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + on(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + on(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine resumed execution. + */ + on(event: "Debugger.resumed", listener: () => void): this; + + /** + * Fired when virtual machine fails to parse the script. + */ + on(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected + * scripts upon enabling debugger. + */ + on(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + + on(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + on(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend regularly sends a current value for last + * seen object id and corresponding timestamp. If the were changes in the heap since last event + * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + on(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + + on(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + on(event: "HeapProfiler.resetProfiles", listener: () => void): this; + on(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + + /** + * Sent when new profile recording is started using console.profile() call. + */ + on(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + + /** + * Notification is issued every time when binding is called. + * @experimental + */ + on(event: "Runtime.bindingCalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when console API was called. + */ + on(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when unhandled exception was revoked. + */ + on(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when exception was thrown and unhandled. + */ + on(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when new execution context is created. + */ + on(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when execution context is destroyed. + */ + on(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when all executionContexts were cleared in browser + */ + on(event: "Runtime.executionContextsCleared", listener: () => void): this; + + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API + * call). + */ + on(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + + /** + * Contains an bucket of collected trace events. + */ + on(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + on(event: "NodeTracing.tracingComplete", listener: () => void): this; + + /** + * Issued when attached to a worker. + */ + on(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when detached from the worker. + */ + on(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + on(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + + /** + * Emitted when any notification from the V8 Inspector is received. + */ + once(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; + + /** + * Issued when new console message is added. + */ + once(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + once(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + once(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine resumed execution. + */ + once(event: "Debugger.resumed", listener: () => void): this; + + /** + * Fired when virtual machine fails to parse the script. + */ + once(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected + * scripts upon enabling debugger. + */ + once(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + + once(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + once(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend regularly sends a current value for last + * seen object id and corresponding timestamp. If the were changes in the heap since last event + * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + once(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + + once(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + once(event: "HeapProfiler.resetProfiles", listener: () => void): this; + once(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + + /** + * Sent when new profile recording is started using console.profile() call. + */ + once(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + + /** + * Notification is issued every time when binding is called. + * @experimental + */ + once(event: "Runtime.bindingCalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when console API was called. + */ + once(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when unhandled exception was revoked. + */ + once(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when exception was thrown and unhandled. + */ + once(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when new execution context is created. + */ + once(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when execution context is destroyed. + */ + once(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when all executionContexts were cleared in browser + */ + once(event: "Runtime.executionContextsCleared", listener: () => void): this; + + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API + * call). + */ + once(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + + /** + * Contains an bucket of collected trace events. + */ + once(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + once(event: "NodeTracing.tracingComplete", listener: () => void): this; + + /** + * Issued when attached to a worker. + */ + once(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when detached from the worker. + */ + once(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + once(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + + /** + * Emitted when any notification from the V8 Inspector is received. + */ + prependListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; + + /** + * Issued when new console message is added. + */ + prependListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + prependListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + prependListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine resumed execution. + */ + prependListener(event: "Debugger.resumed", listener: () => void): this; + + /** + * Fired when virtual machine fails to parse the script. + */ + prependListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected + * scripts upon enabling debugger. + */ + prependListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + + prependListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + prependListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend regularly sends a current value for last + * seen object id and corresponding timestamp. If the were changes in the heap since last event + * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + prependListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + + prependListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + prependListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + prependListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + + /** + * Sent when new profile recording is started using console.profile() call. + */ + prependListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + + /** + * Notification is issued every time when binding is called. + * @experimental + */ + prependListener(event: "Runtime.bindingCalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when console API was called. + */ + prependListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when unhandled exception was revoked. + */ + prependListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when exception was thrown and unhandled. + */ + prependListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when new execution context is created. + */ + prependListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when execution context is destroyed. + */ + prependListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when all executionContexts were cleared in browser + */ + prependListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API + * call). + */ + prependListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + + /** + * Contains an bucket of collected trace events. + */ + prependListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + prependListener(event: "NodeTracing.tracingComplete", listener: () => void): this; + + /** + * Issued when attached to a worker. + */ + prependListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when detached from the worker. + */ + prependListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + prependListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + + /** + * Emitted when any notification from the V8 Inspector is received. + */ + prependOnceListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; + + /** + * Issued when new console message is added. + */ + prependOnceListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + prependOnceListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + prependOnceListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine resumed execution. + */ + prependOnceListener(event: "Debugger.resumed", listener: () => void): this; + + /** + * Fired when virtual machine fails to parse the script. + */ + prependOnceListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected + * scripts upon enabling debugger. + */ + prependOnceListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + + prependOnceListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + prependOnceListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend regularly sends a current value for last + * seen object id and corresponding timestamp. If the were changes in the heap since last event + * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + prependOnceListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + + prependOnceListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + prependOnceListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + + /** + * Sent when new profile recording is started using console.profile() call. + */ + prependOnceListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + + /** + * Notification is issued every time when binding is called. + * @experimental + */ + prependOnceListener(event: "Runtime.bindingCalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when console API was called. + */ + prependOnceListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when unhandled exception was revoked. + */ + prependOnceListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when exception was thrown and unhandled. + */ + prependOnceListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when new execution context is created. + */ + prependOnceListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when execution context is destroyed. + */ + prependOnceListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when all executionContexts were cleared in browser + */ + prependOnceListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API + * call). + */ + prependOnceListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + + /** + * Contains an bucket of collected trace events. + */ + prependOnceListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + prependOnceListener(event: "NodeTracing.tracingComplete", listener: () => void): this; + + /** + * Issued when attached to a worker. + */ + prependOnceListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when detached from the worker. + */ + prependOnceListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + prependOnceListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + } + + // Top Level API + + /** + * Activate inspector on host and port. Equivalent to node --inspect=[[host:]port], but can be done programatically after node has started. + * If wait is true, will block until a client has connected to the inspect port and flow control has been passed to the debugger client. + * @param port Port to listen on for inspector connections. Optional, defaults to what was specified on the CLI. + * @param host Host to listen on for inspector connections. Optional, defaults to what was specified on the CLI. + * @param wait Block until a client has connected. Optional, defaults to false. + */ + function open(port?: number, host?: string, wait?: boolean): void; + + /** + * Deactivate the inspector. Blocks until there are no active connections. + */ + function close(): void; + + /** + * Return the URL of the active inspector, or `undefined` if there is none. + */ + function url(): string | undefined; +} diff --git a/node_modules/@types/node/module.d.ts b/node_modules/@types/node/module.d.ts new file mode 100644 index 00000000..f512be7e --- /dev/null +++ b/node_modules/@types/node/module.d.ts @@ -0,0 +1,3 @@ +declare module "module" { + export = NodeJS.Module; +} diff --git a/node_modules/@types/node/net.d.ts b/node_modules/@types/node/net.d.ts new file mode 100644 index 00000000..c8bccb7b --- /dev/null +++ b/node_modules/@types/node/net.d.ts @@ -0,0 +1,249 @@ +declare module "net" { + import * as stream from "stream"; + import * as events from "events"; + import * as dns from "dns"; + + type LookupFunction = (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void; + + interface AddressInfo { + address: string; + family: string; + port: number; + } + + interface SocketConstructorOpts { + fd?: number; + allowHalfOpen?: boolean; + readable?: boolean; + writable?: boolean; + } + + interface TcpSocketConnectOpts { + port: number; + host?: string; + localAddress?: string; + localPort?: number; + hints?: number; + family?: number; + lookup?: LookupFunction; + } + + interface IpcSocketConnectOpts { + path: string; + } + + type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts; + + class Socket extends stream.Duplex { + constructor(options?: SocketConstructorOpts); + + // Extended base methods + write(buffer: Uint8Array | string, cb?: (err?: Error) => void): boolean; + write(str: Uint8Array | string, encoding?: string, cb?: (err?: Error) => void): boolean; + + connect(options: SocketConnectOpts, connectionListener?: () => void): this; + connect(port: number, host: string, connectionListener?: () => void): this; + connect(port: number, connectionListener?: () => void): this; + connect(path: string, connectionListener?: () => void): this; + + setEncoding(encoding?: string): this; + pause(): this; + resume(): this; + setTimeout(timeout: number, callback?: () => void): this; + setNoDelay(noDelay?: boolean): this; + setKeepAlive(enable?: boolean, initialDelay?: number): this; + address(): AddressInfo | string; + unref(): void; + ref(): void; + + readonly bufferSize: number; + readonly bytesRead: number; + readonly bytesWritten: number; + readonly connecting: boolean; + readonly destroyed: boolean; + readonly localAddress: string; + readonly localPort: number; + readonly remoteAddress?: string; + readonly remoteFamily?: string; + readonly remotePort?: number; + + // Extended base methods + end(cb?: () => void): void; + end(buffer: Uint8Array | string, cb?: () => void): void; + end(str: Uint8Array | string, encoding?: string, cb?: () => void): void; + + /** + * events.EventEmitter + * 1. close + * 2. connect + * 3. data + * 4. drain + * 5. end + * 6. error + * 7. lookup + * 8. timeout + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: (had_error: boolean) => void): this; + addListener(event: "connect", listener: () => void): this; + addListener(event: "data", listener: (data: Buffer) => void): this; + addListener(event: "drain", listener: () => void): this; + addListener(event: "end", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; + addListener(event: "timeout", listener: () => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close", had_error: boolean): boolean; + emit(event: "connect"): boolean; + emit(event: "data", data: Buffer): boolean; + emit(event: "drain"): boolean; + emit(event: "end"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "lookup", err: Error, address: string, family: string | number, host: string): boolean; + emit(event: "timeout"): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: (had_error: boolean) => void): this; + on(event: "connect", listener: () => void): this; + on(event: "data", listener: (data: Buffer) => void): this; + on(event: "drain", listener: () => void): this; + on(event: "end", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; + on(event: "timeout", listener: () => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: (had_error: boolean) => void): this; + once(event: "connect", listener: () => void): this; + once(event: "data", listener: (data: Buffer) => void): this; + once(event: "drain", listener: () => void): this; + once(event: "end", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; + once(event: "timeout", listener: () => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: (had_error: boolean) => void): this; + prependListener(event: "connect", listener: () => void): this; + prependListener(event: "data", listener: (data: Buffer) => void): this; + prependListener(event: "drain", listener: () => void): this; + prependListener(event: "end", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; + prependListener(event: "timeout", listener: () => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: (had_error: boolean) => void): this; + prependOnceListener(event: "connect", listener: () => void): this; + prependOnceListener(event: "data", listener: (data: Buffer) => void): this; + prependOnceListener(event: "drain", listener: () => void): this; + prependOnceListener(event: "end", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; + prependOnceListener(event: "timeout", listener: () => void): this; + } + + interface ListenOptions { + port?: number; + host?: string; + backlog?: number; + path?: string; + exclusive?: boolean; + readableAll?: boolean; + writableAll?: boolean; + /** + * @default false + */ + ipv6Only?: boolean; + } + + // https://github.com/nodejs/node/blob/master/lib/net.js + class Server extends events.EventEmitter { + constructor(connectionListener?: (socket: Socket) => void); + constructor(options?: { allowHalfOpen?: boolean, pauseOnConnect?: boolean }, connectionListener?: (socket: Socket) => void); + + listen(port?: number, hostname?: string, backlog?: number, listeningListener?: () => void): this; + listen(port?: number, hostname?: string, listeningListener?: () => void): this; + listen(port?: number, backlog?: number, listeningListener?: () => void): this; + listen(port?: number, listeningListener?: () => void): this; + listen(path: string, backlog?: number, listeningListener?: () => void): this; + listen(path: string, listeningListener?: () => void): this; + listen(options: ListenOptions, listeningListener?: () => void): this; + listen(handle: any, backlog?: number, listeningListener?: () => void): this; + listen(handle: any, listeningListener?: () => void): this; + close(callback?: (err?: Error) => void): this; + address(): AddressInfo | string | null; + getConnections(cb: (error: Error | null, count: number) => void): void; + ref(): this; + unref(): this; + maxConnections: number; + connections: number; + listening: boolean; + + /** + * events.EventEmitter + * 1. close + * 2. connection + * 3. error + * 4. listening + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "connection", listener: (socket: Socket) => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "listening", listener: () => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close"): boolean; + emit(event: "connection", socket: Socket): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "listening"): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: () => void): this; + on(event: "connection", listener: (socket: Socket) => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "listening", listener: () => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: () => void): this; + once(event: "connection", listener: (socket: Socket) => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "listening", listener: () => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "connection", listener: (socket: Socket) => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "listening", listener: () => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "connection", listener: (socket: Socket) => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "listening", listener: () => void): this; + } + + interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts { + timeout?: number; + } + + interface IpcNetConnectOpts extends IpcSocketConnectOpts, SocketConstructorOpts { + timeout?: number; + } + + type NetConnectOpts = TcpNetConnectOpts | IpcNetConnectOpts; + + function createServer(connectionListener?: (socket: Socket) => void): Server; + function createServer(options?: { allowHalfOpen?: boolean, pauseOnConnect?: boolean }, connectionListener?: (socket: Socket) => void): Server; + function connect(options: NetConnectOpts, connectionListener?: () => void): Socket; + function connect(port: number, host?: string, connectionListener?: () => void): Socket; + function connect(path: string, connectionListener?: () => void): Socket; + function createConnection(options: NetConnectOpts, connectionListener?: () => void): Socket; + function createConnection(port: number, host?: string, connectionListener?: () => void): Socket; + function createConnection(path: string, connectionListener?: () => void): Socket; + function isIP(input: string): number; + function isIPv4(input: string): boolean; + function isIPv6(input: string): boolean; +} diff --git a/node_modules/@types/node/os.d.ts b/node_modules/@types/node/os.d.ts new file mode 100644 index 00000000..4182e507 --- /dev/null +++ b/node_modules/@types/node/os.d.ts @@ -0,0 +1,201 @@ +declare module "os" { + interface CpuInfo { + model: string; + speed: number; + times: { + user: number; + nice: number; + sys: number; + idle: number; + irq: number; + }; + } + + interface NetworkInterfaceBase { + address: string; + netmask: string; + mac: string; + internal: boolean; + cidr: string | null; + } + + interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase { + family: "IPv4"; + } + + interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase { + family: "IPv6"; + scopeid: number; + } + + interface UserInfo { + username: T; + uid: number; + gid: number; + shell: T; + homedir: T; + } + + type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6; + + function hostname(): string; + function loadavg(): number[]; + function uptime(): number; + function freemem(): number; + function totalmem(): number; + function cpus(): CpuInfo[]; + function type(): string; + function release(): string; + function networkInterfaces(): { [index: string]: NetworkInterfaceInfo[] }; + function homedir(): string; + function userInfo(options: { encoding: 'buffer' }): UserInfo; + function userInfo(options?: { encoding: string }): UserInfo; + const constants: { + UV_UDP_REUSEADDR: number; + signals: { + SIGHUP: number; + SIGINT: number; + SIGQUIT: number; + SIGILL: number; + SIGTRAP: number; + SIGABRT: number; + SIGIOT: number; + SIGBUS: number; + SIGFPE: number; + SIGKILL: number; + SIGUSR1: number; + SIGSEGV: number; + SIGUSR2: number; + SIGPIPE: number; + SIGALRM: number; + SIGTERM: number; + SIGCHLD: number; + SIGSTKFLT: number; + SIGCONT: number; + SIGSTOP: number; + SIGTSTP: number; + SIGTTIN: number; + SIGTTOU: number; + SIGURG: number; + SIGXCPU: number; + SIGXFSZ: number; + SIGVTALRM: number; + SIGPROF: number; + SIGWINCH: number; + SIGIO: number; + SIGPOLL: number; + SIGPWR: number; + SIGSYS: number; + SIGUNUSED: number; + }; + errno: { + E2BIG: number; + EACCES: number; + EADDRINUSE: number; + EADDRNOTAVAIL: number; + EAFNOSUPPORT: number; + EAGAIN: number; + EALREADY: number; + EBADF: number; + EBADMSG: number; + EBUSY: number; + ECANCELED: number; + ECHILD: number; + ECONNABORTED: number; + ECONNREFUSED: number; + ECONNRESET: number; + EDEADLK: number; + EDESTADDRREQ: number; + EDOM: number; + EDQUOT: number; + EEXIST: number; + EFAULT: number; + EFBIG: number; + EHOSTUNREACH: number; + EIDRM: number; + EILSEQ: number; + EINPROGRESS: number; + EINTR: number; + EINVAL: number; + EIO: number; + EISCONN: number; + EISDIR: number; + ELOOP: number; + EMFILE: number; + EMLINK: number; + EMSGSIZE: number; + EMULTIHOP: number; + ENAMETOOLONG: number; + ENETDOWN: number; + ENETRESET: number; + ENETUNREACH: number; + ENFILE: number; + ENOBUFS: number; + ENODATA: number; + ENODEV: number; + ENOENT: number; + ENOEXEC: number; + ENOLCK: number; + ENOLINK: number; + ENOMEM: number; + ENOMSG: number; + ENOPROTOOPT: number; + ENOSPC: number; + ENOSR: number; + ENOSTR: number; + ENOSYS: number; + ENOTCONN: number; + ENOTDIR: number; + ENOTEMPTY: number; + ENOTSOCK: number; + ENOTSUP: number; + ENOTTY: number; + ENXIO: number; + EOPNOTSUPP: number; + EOVERFLOW: number; + EPERM: number; + EPIPE: number; + EPROTO: number; + EPROTONOSUPPORT: number; + EPROTOTYPE: number; + ERANGE: number; + EROFS: number; + ESPIPE: number; + ESRCH: number; + ESTALE: number; + ETIME: number; + ETIMEDOUT: number; + ETXTBSY: number; + EWOULDBLOCK: number; + EXDEV: number; + }; + priority: { + PRIORITY_LOW: number; + PRIORITY_BELOW_NORMAL: number; + PRIORITY_NORMAL: number; + PRIORITY_ABOVE_NORMAL: number; + PRIORITY_HIGH: number; + PRIORITY_HIGHEST: number; + } + }; + function arch(): string; + function platform(): NodeJS.Platform; + function tmpdir(): string; + const EOL: string; + function endianness(): "BE" | "LE"; + /** + * Gets the priority of a process. + * Defaults to current process. + */ + function getPriority(pid?: number): number; + /** + * Sets the priority of the current process. + * @param priority Must be in range of -20 to 19 + */ + function setPriority(priority: number): void; + /** + * Sets the priority of the process specified process. + * @param priority Must be in range of -20 to 19 + */ + function setPriority(pid: number, priority: number): void; +} diff --git a/node_modules/@types/node/package.json b/node_modules/@types/node/package.json new file mode 100644 index 00000000..dcbf86a7 --- /dev/null +++ b/node_modules/@types/node/package.json @@ -0,0 +1,208 @@ +{ + "_args": [ + [ + "@types/node@12.6.9", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "@types/node@12.6.9", + "_id": "@types/node@12.6.9", + "_inBundle": false, + "_integrity": "sha512-+YB9FtyxXGyD54p8rXwWaN1EWEyar5L58GlGWgtH2I9rGmLGBQcw63+0jw+ujqVavNuO47S1ByAjm9zdHMnskw==", + "_location": "/@types/node", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "@types/node@12.6.9", + "name": "@types/node", + "escapedName": "@types%2fnode", + "scope": "@types", + "rawSpec": "12.6.9", + "saveSpec": null, + "fetchSpec": "12.6.9" + }, + "_requiredBy": [ + "#DEV:/", + "/@octokit/types" + ], + "_resolved": "https://registry.npmjs.org/@types/node/-/node-12.6.9.tgz", + "_spec": "12.6.9", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "bugs": { + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" + }, + "contributors": [ + { + "name": "Microsoft TypeScript", + "url": "https://github.com/Microsoft" + }, + { + "name": "DefinitelyTyped", + "url": "https://github.com/DefinitelyTyped" + }, + { + "name": "Alberto Schiabel", + "url": "https://github.com/jkomyno" + }, + { + "name": "Alexander T.", + "url": "https://github.com/a-tarasyuk" + }, + { + "name": "Alvis HT Tang", + "url": "https://github.com/alvis" + }, + { + "name": "Andrew Makarov", + "url": "https://github.com/r3nya" + }, + { + "name": "Benjamin Toueg", + "url": "https://github.com/btoueg" + }, + { + "name": "Bruno Scheufler", + "url": "https://github.com/brunoscheufler" + }, + { + "name": "Chigozirim C.", + "url": "https://github.com/smac89" + }, + { + "name": "Christian Vaagland Tellnes", + "url": "https://github.com/tellnes" + }, + { + "name": "David Junger", + "url": "https://github.com/touffy" + }, + { + "name": "Deividas Bakanas", + "url": "https://github.com/DeividasBakanas" + }, + { + "name": "Eugene Y. Q. Shen", + "url": "https://github.com/eyqs" + }, + { + "name": "Flarna", + "url": "https://github.com/Flarna" + }, + { + "name": "Hannes Magnusson", + "url": "https://github.com/Hannes-Magnusson-CK" + }, + { + "name": "Hoàng Văn Khải", + "url": "https://github.com/KSXGitHub" + }, + { + "name": "Huw", + "url": "https://github.com/hoo29" + }, + { + "name": "Kelvin Jin", + "url": "https://github.com/kjin" + }, + { + "name": "Klaus Meinhardt", + "url": "https://github.com/ajafff" + }, + { + "name": "Lishude", + "url": "https://github.com/islishude" + }, + { + "name": "Mariusz Wiktorczyk", + "url": "https://github.com/mwiktorczyk" + }, + { + "name": "Matthieu Sieben", + "url": "https://github.com/matthieusieben" + }, + { + "name": "Mohsen Azimi", + "url": "https://github.com/mohsen1" + }, + { + "name": "Nicolas Even", + "url": "https://github.com/n-e" + }, + { + "name": "Nicolas Voigt", + "url": "https://github.com/octo-sniffle" + }, + { + "name": "Parambir Singh", + "url": "https://github.com/parambirs" + }, + { + "name": "Sebastian Silbermann", + "url": "https://github.com/eps1lon" + }, + { + "name": "Simon Schick", + "url": "https://github.com/SimonSchick" + }, + { + "name": "Thomas den Hollander", + "url": "https://github.com/ThomasdenH" + }, + { + "name": "Wilco Bakker", + "url": "https://github.com/WilcoBakker" + }, + { + "name": "wwwy3y3", + "url": "https://github.com/wwwy3y3" + }, + { + "name": "Zane Hannan AU", + "url": "https://github.com/ZaneHannanAU" + }, + { + "name": "Samuel Ainsworth", + "url": "https://github.com/samuela" + }, + { + "name": "Kyle Uehlein", + "url": "https://github.com/kuehlein" + }, + { + "name": "Jordi Oliveras Rovira", + "url": "https://github.com/j-oliveras" + }, + { + "name": "Thanik Bhongbhibhat", + "url": "https://github.com/bhongy" + }, + { + "name": "Marcin Kopacz", + "url": "https://github.com/chyzwar" + } + ], + "dependencies": {}, + "description": "TypeScript definitions for Node.js", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", + "license": "MIT", + "main": "", + "name": "@types/node", + "repository": { + "type": "git", + "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/node" + }, + "scripts": {}, + "typeScriptVersion": "2.0", + "types": "index", + "typesPublisherContentHash": "5953833094f8f12d251b73b7eeb9158bcd2af53e785ba1b8709b994c2694f76c", + "typesVersions": { + ">=3.2.0-0": { + "*": [ + "ts3.2/*" + ] + } + }, + "version": "12.6.9" +} diff --git a/node_modules/@types/node/path.d.ts b/node_modules/@types/node/path.d.ts new file mode 100644 index 00000000..2f4a5491 --- /dev/null +++ b/node_modules/@types/node/path.d.ts @@ -0,0 +1,159 @@ +declare module "path" { + /** + * A parsed path object generated by path.parse() or consumed by path.format(). + */ + interface ParsedPath { + /** + * The root of the path such as '/' or 'c:\' + */ + root: string; + /** + * The full directory path such as '/home/user/dir' or 'c:\path\dir' + */ + dir: string; + /** + * The file name including extension (if any) such as 'index.html' + */ + base: string; + /** + * The file extension (if any) such as '.html' + */ + ext: string; + /** + * The file name without extension (if any) such as 'index' + */ + name: string; + } + interface FormatInputPathObject { + /** + * The root of the path such as '/' or 'c:\' + */ + root?: string; + /** + * The full directory path such as '/home/user/dir' or 'c:\path\dir' + */ + dir?: string; + /** + * The file name including extension (if any) such as 'index.html' + */ + base?: string; + /** + * The file extension (if any) such as '.html' + */ + ext?: string; + /** + * The file name without extension (if any) such as 'index' + */ + name?: string; + } + + /** + * Normalize a string path, reducing '..' and '.' parts. + * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. + * + * @param p string path to normalize. + */ + function normalize(p: string): string; + /** + * Join all arguments together and normalize the resulting path. + * Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown. + * + * @param paths paths to join. + */ + function join(...paths: string[]): string; + /** + * The right-most parameter is considered {to}. Other parameters are considered an array of {from}. + * + * Starting from leftmost {from} parameter, resolves {to} to an absolute path. + * + * If {to} isn't already absolute, {from} arguments are prepended in right to left order, + * until an absolute path is found. If after using all {from} paths still no absolute path is found, + * the current working directory is used as well. The resulting path is normalized, + * and trailing slashes are removed unless the path gets resolved to the root directory. + * + * @param pathSegments string paths to join. Non-string arguments are ignored. + */ + function resolve(...pathSegments: string[]): string; + /** + * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory. + * + * @param path path to test. + */ + function isAbsolute(path: string): boolean; + /** + * Solve the relative path from {from} to {to}. + * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve. + */ + function relative(from: string, to: string): string; + /** + * Return the directory name of a path. Similar to the Unix dirname command. + * + * @param p the path to evaluate. + */ + function dirname(p: string): string; + /** + * Return the last portion of a path. Similar to the Unix basename command. + * Often used to extract the file name from a fully qualified path. + * + * @param p the path to evaluate. + * @param ext optionally, an extension to remove from the result. + */ + function basename(p: string, ext?: string): string; + /** + * Return the extension of the path, from the last '.' to end of string in the last portion of the path. + * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string + * + * @param p the path to evaluate. + */ + function extname(p: string): string; + /** + * The platform-specific file separator. '\\' or '/'. + */ + const sep: '\\' | '/'; + /** + * The platform-specific file delimiter. ';' or ':'. + */ + const delimiter: ';' | ':'; + /** + * Returns an object from a path string - the opposite of format(). + * + * @param pathString path to evaluate. + */ + function parse(pathString: string): ParsedPath; + /** + * Returns a path string from an object - the opposite of parse(). + * + * @param pathString path to evaluate. + */ + function format(pathObject: FormatInputPathObject): string; + + namespace posix { + function normalize(p: string): string; + function join(...paths: string[]): string; + function resolve(...pathSegments: string[]): string; + function isAbsolute(p: string): boolean; + function relative(from: string, to: string): string; + function dirname(p: string): string; + function basename(p: string, ext?: string): string; + function extname(p: string): string; + const sep: string; + const delimiter: string; + function parse(p: string): ParsedPath; + function format(pP: FormatInputPathObject): string; + } + + namespace win32 { + function normalize(p: string): string; + function join(...paths: string[]): string; + function resolve(...pathSegments: string[]): string; + function isAbsolute(p: string): boolean; + function relative(from: string, to: string): string; + function dirname(p: string): string; + function basename(p: string, ext?: string): string; + function extname(p: string): string; + const sep: string; + const delimiter: string; + function parse(p: string): ParsedPath; + function format(pP: FormatInputPathObject): string; + } +} diff --git a/node_modules/@types/node/perf_hooks.d.ts b/node_modules/@types/node/perf_hooks.d.ts new file mode 100644 index 00000000..bf44d446 --- /dev/null +++ b/node_modules/@types/node/perf_hooks.d.ts @@ -0,0 +1,304 @@ +declare module "perf_hooks" { + import { AsyncResource } from "async_hooks"; + + interface PerformanceEntry { + /** + * The total number of milliseconds elapsed for this entry. + * This value will not be meaningful for all Performance Entry types. + */ + readonly duration: number; + + /** + * The name of the performance entry. + */ + readonly name: string; + + /** + * The high resolution millisecond timestamp marking the starting time of the Performance Entry. + */ + readonly startTime: number; + + /** + * The type of the performance entry. + * Currently it may be one of: 'node', 'mark', 'measure', 'gc', or 'function'. + */ + readonly entryType: string; + + /** + * When performanceEntry.entryType is equal to 'gc', the performance.kind property identifies + * the type of garbage collection operation that occurred. + * The value may be one of perf_hooks.constants. + */ + readonly kind?: number; + } + + interface PerformanceNodeTiming extends PerformanceEntry { + /** + * The high resolution millisecond timestamp at which the Node.js process completed bootstrap. + */ + readonly bootstrapComplete: number; + + /** + * The high resolution millisecond timestamp at which cluster processing ended. + */ + readonly clusterSetupEnd: number; + + /** + * The high resolution millisecond timestamp at which cluster processing started. + */ + readonly clusterSetupStart: number; + + /** + * The high resolution millisecond timestamp at which the Node.js event loop exited. + */ + readonly loopExit: number; + + /** + * The high resolution millisecond timestamp at which the Node.js event loop started. + */ + readonly loopStart: number; + + /** + * The high resolution millisecond timestamp at which main module load ended. + */ + readonly moduleLoadEnd: number; + + /** + * The high resolution millisecond timestamp at which main module load started. + */ + readonly moduleLoadStart: number; + + /** + * The high resolution millisecond timestamp at which the Node.js process was initialized. + */ + readonly nodeStart: number; + + /** + * The high resolution millisecond timestamp at which preload module load ended. + */ + readonly preloadModuleLoadEnd: number; + + /** + * The high resolution millisecond timestamp at which preload module load started. + */ + readonly preloadModuleLoadStart: number; + + /** + * The high resolution millisecond timestamp at which third_party_main processing ended. + */ + readonly thirdPartyMainEnd: number; + + /** + * The high resolution millisecond timestamp at which third_party_main processing started. + */ + readonly thirdPartyMainStart: number; + + /** + * The high resolution millisecond timestamp at which the V8 platform was initialized. + */ + readonly v8Start: number; + } + + interface Performance { + /** + * If name is not provided, removes all PerformanceFunction objects from the Performance Timeline. + * If name is provided, removes entries with name. + * @param name + */ + clearFunctions(name?: string): void; + + /** + * If name is not provided, removes all PerformanceMark objects from the Performance Timeline. + * If name is provided, removes only the named mark. + * @param name + */ + clearMarks(name?: string): void; + + /** + * If name is not provided, removes all PerformanceMeasure objects from the Performance Timeline. + * If name is provided, removes only objects whose performanceEntry.name matches name. + */ + clearMeasures(name?: string): void; + + /** + * Returns a list of all PerformanceEntry objects in chronological order with respect to performanceEntry.startTime. + * @return list of all PerformanceEntry objects + */ + getEntries(): PerformanceEntry[]; + + /** + * Returns a list of all PerformanceEntry objects in chronological order with respect to performanceEntry.startTime + * whose performanceEntry.name is equal to name, and optionally, whose performanceEntry.entryType is equal to type. + * @param name + * @param type + * @return list of all PerformanceEntry objects + */ + getEntriesByName(name: string, type?: string): PerformanceEntry[]; + + /** + * Returns a list of all PerformanceEntry objects in chronological order with respect to performanceEntry.startTime + * whose performanceEntry.entryType is equal to type. + * @param type + * @return list of all PerformanceEntry objects + */ + getEntriesByType(type: string): PerformanceEntry[]; + + /** + * Creates a new PerformanceMark entry in the Performance Timeline. + * A PerformanceMark is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'mark', + * and whose performanceEntry.duration is always 0. + * Performance marks are used to mark specific significant moments in the Performance Timeline. + * @param name + */ + mark(name?: string): void; + + /** + * Creates a new PerformanceMeasure entry in the Performance Timeline. + * A PerformanceMeasure is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'measure', + * and whose performanceEntry.duration measures the number of milliseconds elapsed since startMark and endMark. + * + * The startMark argument may identify any existing PerformanceMark in the the Performance Timeline, or may identify + * any of the timestamp properties provided by the PerformanceNodeTiming class. If the named startMark does not exist, + * then startMark is set to timeOrigin by default. + * + * The endMark argument must identify any existing PerformanceMark in the the Performance Timeline or any of the timestamp + * properties provided by the PerformanceNodeTiming class. If the named endMark does not exist, an error will be thrown. + * @param name + * @param startMark + * @param endMark + */ + measure(name: string, startMark: string, endMark: string): void; + + /** + * An instance of the PerformanceNodeTiming class that provides performance metrics for specific Node.js operational milestones. + */ + readonly nodeTiming: PerformanceNodeTiming; + + /** + * @return the current high resolution millisecond timestamp + */ + now(): number; + + /** + * The timeOrigin specifies the high resolution millisecond timestamp from which all performance metric durations are measured. + */ + readonly timeOrigin: number; + + /** + * Wraps a function within a new function that measures the running time of the wrapped function. + * A PerformanceObserver must be subscribed to the 'function' event type in order for the timing details to be accessed. + * @param fn + */ + timerify any>(fn: T): T; + } + + interface PerformanceObserverEntryList { + /** + * @return a list of PerformanceEntry objects in chronological order with respect to performanceEntry.startTime. + */ + getEntries(): PerformanceEntry[]; + + /** + * @return a list of PerformanceEntry objects in chronological order with respect to performanceEntry.startTime + * whose performanceEntry.name is equal to name, and optionally, whose performanceEntry.entryType is equal to type. + */ + getEntriesByName(name: string, type?: string): PerformanceEntry[]; + + /** + * @return Returns a list of PerformanceEntry objects in chronological order with respect to performanceEntry.startTime + * whose performanceEntry.entryType is equal to type. + */ + getEntriesByType(type: string): PerformanceEntry[]; + } + + type PerformanceObserverCallback = (list: PerformanceObserverEntryList, observer: PerformanceObserver) => void; + + class PerformanceObserver extends AsyncResource { + constructor(callback: PerformanceObserverCallback); + + /** + * Disconnects the PerformanceObserver instance from all notifications. + */ + disconnect(): void; + + /** + * Subscribes the PerformanceObserver instance to notifications of new PerformanceEntry instances identified by options.entryTypes. + * When options.buffered is false, the callback will be invoked once for every PerformanceEntry instance. + * Property buffered defaults to false. + * @param options + */ + observe(options: { entryTypes: string[], buffered?: boolean }): void; + } + + namespace constants { + const NODE_PERFORMANCE_GC_MAJOR: number; + const NODE_PERFORMANCE_GC_MINOR: number; + const NODE_PERFORMANCE_GC_INCREMENTAL: number; + const NODE_PERFORMANCE_GC_WEAKCB: number; + } + + const performance: Performance; + + interface EventLoopMonitorOptions { + /** + * The sampling rate in milliseconds. + * Must be greater than zero. + * @default 10 + */ + resolution?: number; + } + + interface EventLoopDelayMonitor { + /** + * Enables the event loop delay sample timer. Returns `true` if the timer was started, `false` if it was already started. + */ + enable(): boolean; + /** + * Disables the event loop delay sample timer. Returns `true` if the timer was stopped, `false` if it was already stopped. + */ + disable(): boolean; + + /** + * Resets the collected histogram data. + */ + reset(): void; + + /** + * Returns the value at the given percentile. + * @param percentile A percentile value between 1 and 100. + */ + percentile(percentile: number): number; + + /** + * A `Map` object detailing the accumulated percentile distribution. + */ + readonly percentiles: Map; + + /** + * The number of times the event loop delay exceeded the maximum 1 hour eventloop delay threshold. + */ + readonly exceeds: number; + + /** + * The minimum recorded event loop delay. + */ + readonly min: number; + + /** + * The maximum recorded event loop delay. + */ + readonly max: number; + + /** + * The mean of the recorded event loop delays. + */ + readonly mean: number; + + /** + * The standard deviation of the recorded event loop delays. + */ + readonly stddev: number; + } + + function monitorEventLoopDelay(options?: EventLoopMonitorOptions): EventLoopDelayMonitor; +} diff --git a/node_modules/@types/node/process.d.ts b/node_modules/@types/node/process.d.ts new file mode 100644 index 00000000..ccd5c9c1 --- /dev/null +++ b/node_modules/@types/node/process.d.ts @@ -0,0 +1,3 @@ +declare module "process" { + export = process; +} diff --git a/node_modules/@types/node/punycode.d.ts b/node_modules/@types/node/punycode.d.ts new file mode 100644 index 00000000..75d2811d --- /dev/null +++ b/node_modules/@types/node/punycode.d.ts @@ -0,0 +1,12 @@ +declare module "punycode" { + function decode(string: string): string; + function encode(string: string): string; + function toUnicode(domain: string): string; + function toASCII(domain: string): string; + const ucs2: ucs2; + interface ucs2 { + decode(string: string): number[]; + encode(codePoints: number[]): string; + } + const version: string; +} diff --git a/node_modules/@types/node/querystring.d.ts b/node_modules/@types/node/querystring.d.ts new file mode 100644 index 00000000..23359d9d --- /dev/null +++ b/node_modules/@types/node/querystring.d.ts @@ -0,0 +1,32 @@ +declare module "querystring" { + interface StringifyOptions { + encodeURIComponent?: (str: string) => string; + } + + interface ParseOptions { + maxKeys?: number; + decodeURIComponent?: (str: string) => string; + } + + interface ParsedUrlQuery { [key: string]: string | string[]; } + + interface ParsedUrlQueryInput { + [key: string]: + // The value type here is a "poor man's `unknown`". When these types support TypeScript + // 3.0+, we can replace this with `unknown`. + {} | null | undefined; + } + + function stringify(obj?: ParsedUrlQueryInput, sep?: string, eq?: string, options?: StringifyOptions): string; + function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery; + /** + * The querystring.encode() function is an alias for querystring.stringify(). + */ + const encode: typeof stringify; + /** + * The querystring.decode() function is an alias for querystring.parse(). + */ + const decode: typeof parse; + function escape(str: string): string; + function unescape(str: string): string; +} diff --git a/node_modules/@types/node/readline.d.ts b/node_modules/@types/node/readline.d.ts new file mode 100644 index 00000000..c2518d8d --- /dev/null +++ b/node_modules/@types/node/readline.d.ts @@ -0,0 +1,136 @@ +declare module "readline" { + import * as events from "events"; + import * as stream from "stream"; + + interface Key { + sequence?: string; + name?: string; + ctrl?: boolean; + meta?: boolean; + shift?: boolean; + } + + class Interface extends events.EventEmitter { + readonly terminal: boolean; + + /** + * NOTE: According to the documentation: + * + * > Instances of the `readline.Interface` class are constructed using the + * > `readline.createInterface()` method. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/readline.html#readline_class_interface + */ + protected constructor(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean); + /** + * NOTE: According to the documentation: + * + * > Instances of the `readline.Interface` class are constructed using the + * > `readline.createInterface()` method. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/readline.html#readline_class_interface + */ + protected constructor(options: ReadLineOptions); + + setPrompt(prompt: string): void; + prompt(preserveCursor?: boolean): void; + question(query: string, callback: (answer: string) => void): void; + pause(): this; + resume(): this; + close(): void; + write(data: string | Buffer, key?: Key): void; + + /** + * events.EventEmitter + * 1. close + * 2. line + * 3. pause + * 4. resume + * 5. SIGCONT + * 6. SIGINT + * 7. SIGTSTP + */ + + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "line", listener: (input: string) => void): this; + addListener(event: "pause", listener: () => void): this; + addListener(event: "resume", listener: () => void): this; + addListener(event: "SIGCONT", listener: () => void): this; + addListener(event: "SIGINT", listener: () => void): this; + addListener(event: "SIGTSTP", listener: () => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close"): boolean; + emit(event: "line", input: string): boolean; + emit(event: "pause"): boolean; + emit(event: "resume"): boolean; + emit(event: "SIGCONT"): boolean; + emit(event: "SIGINT"): boolean; + emit(event: "SIGTSTP"): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: () => void): this; + on(event: "line", listener: (input: string) => void): this; + on(event: "pause", listener: () => void): this; + on(event: "resume", listener: () => void): this; + on(event: "SIGCONT", listener: () => void): this; + on(event: "SIGINT", listener: () => void): this; + on(event: "SIGTSTP", listener: () => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: () => void): this; + once(event: "line", listener: (input: string) => void): this; + once(event: "pause", listener: () => void): this; + once(event: "resume", listener: () => void): this; + once(event: "SIGCONT", listener: () => void): this; + once(event: "SIGINT", listener: () => void): this; + once(event: "SIGTSTP", listener: () => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "line", listener: (input: string) => void): this; + prependListener(event: "pause", listener: () => void): this; + prependListener(event: "resume", listener: () => void): this; + prependListener(event: "SIGCONT", listener: () => void): this; + prependListener(event: "SIGINT", listener: () => void): this; + prependListener(event: "SIGTSTP", listener: () => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "line", listener: (input: string) => void): this; + prependOnceListener(event: "pause", listener: () => void): this; + prependOnceListener(event: "resume", listener: () => void): this; + prependOnceListener(event: "SIGCONT", listener: () => void): this; + prependOnceListener(event: "SIGINT", listener: () => void): this; + prependOnceListener(event: "SIGTSTP", listener: () => void): this; + [Symbol.asyncIterator](): AsyncIterableIterator; + } + + type ReadLine = Interface; // type forwarded for backwards compatiblity + + type Completer = (line: string) => CompleterResult; + type AsyncCompleter = (line: string, callback: (err?: null | Error, result?: CompleterResult) => void) => any; + + type CompleterResult = [string[], string]; + + interface ReadLineOptions { + input: NodeJS.ReadableStream; + output?: NodeJS.WritableStream; + completer?: Completer | AsyncCompleter; + terminal?: boolean; + historySize?: number; + prompt?: string; + crlfDelay?: number; + removeHistoryDuplicates?: boolean; + } + + function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface; + function createInterface(options: ReadLineOptions): Interface; + + function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number): void; + function emitKeypressEvents(stream: NodeJS.ReadableStream, interface?: Interface): void; + function moveCursor(stream: NodeJS.WritableStream, dx: number | string, dy: number | string): void; + function clearLine(stream: NodeJS.WritableStream, dir: number): void; + function clearScreenDown(stream: NodeJS.WritableStream): void; +} diff --git a/node_modules/@types/node/repl.d.ts b/node_modules/@types/node/repl.d.ts new file mode 100644 index 00000000..71f49044 --- /dev/null +++ b/node_modules/@types/node/repl.d.ts @@ -0,0 +1,382 @@ +declare module "repl" { + import { Interface, Completer, AsyncCompleter } from "readline"; + import { Context } from "vm"; + import { InspectOptions } from "util"; + + interface ReplOptions { + /** + * The input prompt to display. + * Default: `"> "` + */ + prompt?: string; + /** + * The `Readable` stream from which REPL input will be read. + * Default: `process.stdin` + */ + input?: NodeJS.ReadableStream; + /** + * The `Writable` stream to which REPL output will be written. + * Default: `process.stdout` + */ + output?: NodeJS.WritableStream; + /** + * If `true`, specifies that the output should be treated as a TTY terminal, and have + * ANSI/VT100 escape codes written to it. + * Default: checking the value of the `isTTY` property on the output stream upon + * instantiation. + */ + terminal?: boolean; + /** + * The function to be used when evaluating each given line of input. + * Default: an async wrapper for the JavaScript `eval()` function. An `eval` function can + * error with `repl.Recoverable` to indicate the input was incomplete and prompt for + * additional lines. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_default_evaluation + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_custom_evaluation_functions + */ + eval?: REPLEval; + /** + * If `true`, specifies that the default `writer` function should include ANSI color + * styling to REPL output. If a custom `writer` function is provided then this has no + * effect. + * Default: the REPL instance's `terminal` value. + */ + useColors?: boolean; + /** + * If `true`, specifies that the default evaluation function will use the JavaScript + * `global` as the context as opposed to creating a new separate context for the REPL + * instance. The node CLI REPL sets this value to `true`. + * Default: `false`. + */ + useGlobal?: boolean; + /** + * If `true`, specifies that the default writer will not output the return value of a + * command if it evaluates to `undefined`. + * Default: `false`. + */ + ignoreUndefined?: boolean; + /** + * The function to invoke to format the output of each command before writing to `output`. + * Default: a wrapper for `util.inspect`. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_customizing_repl_output + */ + writer?: REPLWriter; + /** + * An optional function used for custom Tab auto completion. + * + * @see https://nodejs.org/dist/latest-v11.x/docs/api/readline.html#readline_use_of_the_completer_function + */ + completer?: Completer | AsyncCompleter; + /** + * A flag that specifies whether the default evaluator executes all JavaScript commands in + * strict mode or default (sloppy) mode. + * Accepted values are: + * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode. + * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to + * prefacing every repl statement with `'use strict'`. + */ + replMode?: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT; + /** + * Stop evaluating the current piece of code when `SIGINT` is received, i.e. `Ctrl+C` is + * pressed. This cannot be used together with a custom `eval` function. + * Default: `false`. + */ + breakEvalOnSigint?: boolean; + } + + type REPLEval = (this: REPLServer, evalCmd: string, context: Context, file: string, cb: (err: Error | null, result: any) => void) => void; + type REPLWriter = (this: REPLServer, obj: any) => string; + + /** + * This is the default "writer" value, if none is passed in the REPL options, + * and it can be overridden by custom print functions. + */ + const writer: REPLWriter & { options: InspectOptions }; + + type REPLCommandAction = (this: REPLServer, text: string) => void; + + interface REPLCommand { + /** + * Help text to be displayed when `.help` is entered. + */ + help?: string; + /** + * The function to execute, optionally accepting a single string argument. + */ + action: REPLCommandAction; + } + + /** + * Provides a customizable Read-Eval-Print-Loop (REPL). + * + * Instances of `repl.REPLServer` will accept individual lines of user input, evaluate those + * according to a user-defined evaluation function, then output the result. Input and output + * may be from `stdin` and `stdout`, respectively, or may be connected to any Node.js `stream`. + * + * Instances of `repl.REPLServer` support automatic completion of inputs, simplistic Emacs-style + * line editing, multi-line inputs, ANSI-styled output, saving and restoring current REPL session + * state, error recovery, and customizable evaluation functions. + * + * Instances of `repl.REPLServer` are created using the `repl.start()` method and _should not_ + * be created directly using the JavaScript `new` keyword. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_repl + */ + class REPLServer extends Interface { + /** + * The `vm.Context` provided to the `eval` function to be used for JavaScript + * evaluation. + */ + readonly context: Context; + /** + * The `Readable` stream from which REPL input will be read. + */ + readonly inputStream: NodeJS.ReadableStream; + /** + * The `Writable` stream to which REPL output will be written. + */ + readonly outputStream: NodeJS.WritableStream; + /** + * The commands registered via `replServer.defineCommand()`. + */ + readonly commands: { readonly [name: string]: REPLCommand | undefined }; + /** + * A value indicating whether the REPL is currently in "editor mode". + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_commands_and_special_keys + */ + readonly editorMode: boolean; + /** + * A value indicating whether the `_` variable has been assigned. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly underscoreAssigned: boolean; + /** + * The last evaluation result from the REPL (assigned to the `_` variable inside of the REPL). + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly last: any; + /** + * A value indicating whether the `_error` variable has been assigned. + * + * @since v9.8.0 + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly underscoreErrAssigned: boolean; + /** + * The last error raised inside the REPL (assigned to the `_error` variable inside of the REPL). + * + * @since v9.8.0 + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly lastError: any; + /** + * Specified in the REPL options, this is the function to be used when evaluating each + * given line of input. If not specified in the REPL options, this is an async wrapper + * for the JavaScript `eval()` function. + */ + readonly eval: REPLEval; + /** + * Specified in the REPL options, this is a value indicating whether the default + * `writer` function should include ANSI color styling to REPL output. + */ + readonly useColors: boolean; + /** + * Specified in the REPL options, this is a value indicating whether the default `eval` + * function will use the JavaScript `global` as the context as opposed to creating a new + * separate context for the REPL instance. + */ + readonly useGlobal: boolean; + /** + * Specified in the REPL options, this is a value indicating whether the default `writer` + * function should output the result of a command if it evaluates to `undefined`. + */ + readonly ignoreUndefined: boolean; + /** + * Specified in the REPL options, this is the function to invoke to format the output of + * each command before writing to `outputStream`. If not specified in the REPL options, + * this will be a wrapper for `util.inspect`. + */ + readonly writer: REPLWriter; + /** + * Specified in the REPL options, this is the function to use for custom Tab auto-completion. + */ + readonly completer: Completer | AsyncCompleter; + /** + * Specified in the REPL options, this is a flag that specifies whether the default `eval` + * function should execute all JavaScript commands in strict mode or default (sloppy) mode. + * Possible values are: + * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode. + * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to + * prefacing every repl statement with `'use strict'`. + */ + readonly replMode: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT; + + /** + * NOTE: According to the documentation: + * + * > Instances of `repl.REPLServer` are created using the `repl.start()` method and + * > _should not_ be created directly using the JavaScript `new` keyword. + * + * `REPLServer` cannot be subclassed due to implementation specifics in NodeJS. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_class_replserver + */ + private constructor(); + + /** + * Used to add new `.`-prefixed commands to the REPL instance. Such commands are invoked + * by typing a `.` followed by the `keyword`. + * + * @param keyword The command keyword (_without_ a leading `.` character). + * @param cmd The function to invoke when the command is processed. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_replserver_definecommand_keyword_cmd + */ + defineCommand(keyword: string, cmd: REPLCommandAction | REPLCommand): void; + /** + * Readies the REPL instance for input from the user, printing the configured `prompt` to a + * new line in the `output` and resuming the `input` to accept new input. + * + * When multi-line input is being entered, an ellipsis is printed rather than the 'prompt'. + * + * This method is primarily intended to be called from within the action function for + * commands registered using the `replServer.defineCommand()` method. + * + * @param preserveCursor When `true`, the cursor placement will not be reset to `0`. + */ + displayPrompt(preserveCursor?: boolean): void; + /** + * Clears any command that has been buffered but not yet executed. + * + * This method is primarily intended to be called from within the action function for + * commands registered using the `replServer.defineCommand()` method. + * + * @since v9.0.0 + */ + clearBufferedCommand(): void; + + /** + * Initializes a history log file for the REPL instance. When executing the + * Node.js binary and using the command line REPL, a history file is initialized + * by default. However, this is not the case when creating a REPL + * programmatically. Use this method to initialize a history log file when working + * with REPL instances programmatically. + * @param path The path to the history file + */ + setupHistory(path: string, cb: (err: Error | null, repl: this) => void): void; + + /** + * events.EventEmitter + * 1. close - inherited from `readline.Interface` + * 2. line - inherited from `readline.Interface` + * 3. pause - inherited from `readline.Interface` + * 4. resume - inherited from `readline.Interface` + * 5. SIGCONT - inherited from `readline.Interface` + * 6. SIGINT - inherited from `readline.Interface` + * 7. SIGTSTP - inherited from `readline.Interface` + * 8. exit + * 9. reset + */ + + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "line", listener: (input: string) => void): this; + addListener(event: "pause", listener: () => void): this; + addListener(event: "resume", listener: () => void): this; + addListener(event: "SIGCONT", listener: () => void): this; + addListener(event: "SIGINT", listener: () => void): this; + addListener(event: "SIGTSTP", listener: () => void): this; + addListener(event: "exit", listener: () => void): this; + addListener(event: "reset", listener: (context: Context) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close"): boolean; + emit(event: "line", input: string): boolean; + emit(event: "pause"): boolean; + emit(event: "resume"): boolean; + emit(event: "SIGCONT"): boolean; + emit(event: "SIGINT"): boolean; + emit(event: "SIGTSTP"): boolean; + emit(event: "exit"): boolean; + emit(event: "reset", context: Context): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: () => void): this; + on(event: "line", listener: (input: string) => void): this; + on(event: "pause", listener: () => void): this; + on(event: "resume", listener: () => void): this; + on(event: "SIGCONT", listener: () => void): this; + on(event: "SIGINT", listener: () => void): this; + on(event: "SIGTSTP", listener: () => void): this; + on(event: "exit", listener: () => void): this; + on(event: "reset", listener: (context: Context) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: () => void): this; + once(event: "line", listener: (input: string) => void): this; + once(event: "pause", listener: () => void): this; + once(event: "resume", listener: () => void): this; + once(event: "SIGCONT", listener: () => void): this; + once(event: "SIGINT", listener: () => void): this; + once(event: "SIGTSTP", listener: () => void): this; + once(event: "exit", listener: () => void): this; + once(event: "reset", listener: (context: Context) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "line", listener: (input: string) => void): this; + prependListener(event: "pause", listener: () => void): this; + prependListener(event: "resume", listener: () => void): this; + prependListener(event: "SIGCONT", listener: () => void): this; + prependListener(event: "SIGINT", listener: () => void): this; + prependListener(event: "SIGTSTP", listener: () => void): this; + prependListener(event: "exit", listener: () => void): this; + prependListener(event: "reset", listener: (context: Context) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "line", listener: (input: string) => void): this; + prependOnceListener(event: "pause", listener: () => void): this; + prependOnceListener(event: "resume", listener: () => void): this; + prependOnceListener(event: "SIGCONT", listener: () => void): this; + prependOnceListener(event: "SIGINT", listener: () => void): this; + prependOnceListener(event: "SIGTSTP", listener: () => void): this; + prependOnceListener(event: "exit", listener: () => void): this; + prependOnceListener(event: "reset", listener: (context: Context) => void): this; + } + + /** + * A flag passed in the REPL options. Evaluates expressions in sloppy mode. + */ + export const REPL_MODE_SLOPPY: symbol; // TODO: unique symbol + + /** + * A flag passed in the REPL options. Evaluates expressions in strict mode. + * This is equivalent to prefacing every repl statement with `'use strict'`. + */ + export const REPL_MODE_STRICT: symbol; // TODO: unique symbol + + /** + * Creates and starts a `repl.REPLServer` instance. + * + * @param options The options for the `REPLServer`. If `options` is a string, then it specifies + * the input prompt. + */ + function start(options?: string | ReplOptions): REPLServer; + + /** + * Indicates a recoverable error that a `REPLServer` can use to support multi-line input. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_recoverable_errors + */ + class Recoverable extends SyntaxError { + err: Error; + + constructor(err: Error); + } +} diff --git a/node_modules/@types/node/stream.d.ts b/node_modules/@types/node/stream.d.ts new file mode 100644 index 00000000..f4424f8c --- /dev/null +++ b/node_modules/@types/node/stream.d.ts @@ -0,0 +1,307 @@ +declare module "stream" { + import * as events from "events"; + + class internal extends events.EventEmitter { + pipe(destination: T, options?: { end?: boolean; }): T; + } + + namespace internal { + class Stream extends internal { } + + interface ReadableOptions { + highWaterMark?: number; + encoding?: string; + objectMode?: boolean; + read?(this: Readable, size: number): void; + destroy?(this: Readable, error: Error | null, callback: (error: Error | null) => void): void; + autoDestroy?: boolean; + } + + class Readable extends Stream implements NodeJS.ReadableStream { + /** + * A utility method for creating Readable Streams out of iterators. + */ + static from(iterable: Iterable | AsyncIterable, options?: ReadableOptions): Readable; + + readable: boolean; + readonly readableHighWaterMark: number; + readonly readableLength: number; + constructor(opts?: ReadableOptions); + _read(size: number): void; + read(size?: number): any; + setEncoding(encoding: string): this; + pause(): this; + resume(): this; + isPaused(): boolean; + unpipe(destination?: NodeJS.WritableStream): this; + unshift(chunk: any, encoding?: BufferEncoding): void; + wrap(oldStream: NodeJS.ReadableStream): this; + push(chunk: any, encoding?: string): boolean; + _destroy(error: Error | null, callback: (error?: Error | null) => void): void; + destroy(error?: Error): void; + + /** + * Event emitter + * The defined events on documents including: + * 1. close + * 2. data + * 3. end + * 4. readable + * 5. error + */ + addListener(event: "close", listener: () => void): this; + addListener(event: "data", listener: (chunk: any) => void): this; + addListener(event: "end", listener: () => void): this; + addListener(event: "readable", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "close"): boolean; + emit(event: "data", chunk: any): boolean; + emit(event: "end"): boolean; + emit(event: "readable"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "close", listener: () => void): this; + on(event: "data", listener: (chunk: any) => void): this; + on(event: "end", listener: () => void): this; + on(event: "readable", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "close", listener: () => void): this; + once(event: "data", listener: (chunk: any) => void): this; + once(event: "end", listener: () => void): this; + once(event: "readable", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "close", listener: () => void): this; + prependListener(event: "data", listener: (chunk: any) => void): this; + prependListener(event: "end", listener: () => void): this; + prependListener(event: "readable", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "data", listener: (chunk: any) => void): this; + prependOnceListener(event: "end", listener: () => void): this; + prependOnceListener(event: "readable", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + + removeListener(event: "close", listener: () => void): this; + removeListener(event: "data", listener: (chunk: any) => void): this; + removeListener(event: "end", listener: () => void): this; + removeListener(event: "readable", listener: () => void): this; + removeListener(event: "error", listener: (err: Error) => void): this; + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + + [Symbol.asyncIterator](): AsyncIterableIterator; + } + + interface WritableOptions { + highWaterMark?: number; + decodeStrings?: boolean; + defaultEncoding?: string; + objectMode?: boolean; + emitClose?: boolean; + write?(this: Writable, chunk: any, encoding: string, callback: (error?: Error | null) => void): void; + writev?(this: Writable, chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void; + destroy?(this: Writable, error: Error | null, callback: (error: Error | null) => void): void; + final?(this: Writable, callback: (error?: Error | null) => void): void; + autoDestroy?: boolean; + } + + class Writable extends Stream implements NodeJS.WritableStream { + readonly writable: boolean; + readonly writableFinished: boolean; + readonly writableHighWaterMark: number; + readonly writableLength: number; + constructor(opts?: WritableOptions); + _write(chunk: any, encoding: string, callback: (error?: Error | null) => void): void; + _writev?(chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void; + _destroy(error: Error | null, callback: (error?: Error | null) => void): void; + _final(callback: (error?: Error | null) => void): void; + write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean; + write(chunk: any, encoding: string, cb?: (error: Error | null | undefined) => void): boolean; + setDefaultEncoding(encoding: string): this; + end(cb?: () => void): void; + end(chunk: any, cb?: () => void): void; + end(chunk: any, encoding: string, cb?: () => void): void; + cork(): void; + uncork(): void; + destroy(error?: Error): void; + + /** + * Event emitter + * The defined events on documents including: + * 1. close + * 2. drain + * 3. error + * 4. finish + * 5. pipe + * 6. unpipe + */ + addListener(event: "close", listener: () => void): this; + addListener(event: "drain", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "finish", listener: () => void): this; + addListener(event: "pipe", listener: (src: Readable) => void): this; + addListener(event: "unpipe", listener: (src: Readable) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "close"): boolean; + emit(event: "drain"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "finish"): boolean; + emit(event: "pipe", src: Readable): boolean; + emit(event: "unpipe", src: Readable): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "close", listener: () => void): this; + on(event: "drain", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "finish", listener: () => void): this; + on(event: "pipe", listener: (src: Readable) => void): this; + on(event: "unpipe", listener: (src: Readable) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "close", listener: () => void): this; + once(event: "drain", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "finish", listener: () => void): this; + once(event: "pipe", listener: (src: Readable) => void): this; + once(event: "unpipe", listener: (src: Readable) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "close", listener: () => void): this; + prependListener(event: "drain", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "finish", listener: () => void): this; + prependListener(event: "pipe", listener: (src: Readable) => void): this; + prependListener(event: "unpipe", listener: (src: Readable) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "drain", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "finish", listener: () => void): this; + prependOnceListener(event: "pipe", listener: (src: Readable) => void): this; + prependOnceListener(event: "unpipe", listener: (src: Readable) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + + removeListener(event: "close", listener: () => void): this; + removeListener(event: "drain", listener: () => void): this; + removeListener(event: "error", listener: (err: Error) => void): this; + removeListener(event: "finish", listener: () => void): this; + removeListener(event: "pipe", listener: (src: Readable) => void): this; + removeListener(event: "unpipe", listener: (src: Readable) => void): this; + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + + interface DuplexOptions extends ReadableOptions, WritableOptions { + allowHalfOpen?: boolean; + readableObjectMode?: boolean; + writableObjectMode?: boolean; + read?(this: Duplex, size: number): void; + write?(this: Duplex, chunk: any, encoding: string, callback: (error?: Error | null) => void): void; + writev?(this: Duplex, chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void; + final?(this: Duplex, callback: (error?: Error | null) => void): void; + destroy?(this: Duplex, error: Error | null, callback: (error: Error | null) => void): void; + } + + // Note: Duplex extends both Readable and Writable. + class Duplex extends Readable implements Writable { + readonly writable: boolean; + readonly writableFinished: boolean; + readonly writableHighWaterMark: number; + readonly writableLength: number; + constructor(opts?: DuplexOptions); + _write(chunk: any, encoding: string, callback: (error?: Error | null) => void): void; + _writev?(chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void; + _destroy(error: Error | null, callback: (error: Error | null) => void): void; + _final(callback: (error?: Error | null) => void): void; + write(chunk: any, encoding?: string, cb?: (error: Error | null | undefined) => void): boolean; + write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean; + setDefaultEncoding(encoding: string): this; + end(cb?: () => void): void; + end(chunk: any, cb?: () => void): void; + end(chunk: any, encoding?: string, cb?: () => void): void; + cork(): void; + uncork(): void; + } + + type TransformCallback = (error?: Error | null, data?: any) => void; + + interface TransformOptions extends DuplexOptions { + read?(this: Transform, size: number): void; + write?(this: Transform, chunk: any, encoding: string, callback: (error?: Error | null) => void): void; + writev?(this: Transform, chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void; + final?(this: Transform, callback: (error?: Error | null) => void): void; + destroy?(this: Transform, error: Error | null, callback: (error: Error | null) => void): void; + transform?(this: Transform, chunk: any, encoding: string, callback: TransformCallback): void; + flush?(this: Transform, callback: TransformCallback): void; + } + + class Transform extends Duplex { + constructor(opts?: TransformOptions); + _transform(chunk: any, encoding: string, callback: TransformCallback): void; + _flush(callback: TransformCallback): void; + } + + class PassThrough extends Transform { } + + function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, callback: (err?: NodeJS.ErrnoException | null) => void): () => void; + namespace finished { + function __promisify__(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream): Promise; + } + + function pipeline(stream1: NodeJS.ReadableStream, stream2: T, callback?: (err: NodeJS.ErrnoException | null) => void): T; + function pipeline(stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream, stream3: T, callback?: (err: NodeJS.ErrnoException | null) => void): T; + function pipeline( + stream1: NodeJS.ReadableStream, + stream2: NodeJS.ReadWriteStream, + stream3: NodeJS.ReadWriteStream, + stream4: T, + callback?: (err: NodeJS.ErrnoException | null) => void, + ): T; + function pipeline( + stream1: NodeJS.ReadableStream, + stream2: NodeJS.ReadWriteStream, + stream3: NodeJS.ReadWriteStream, + stream4: NodeJS.ReadWriteStream, + stream5: T, + callback?: (err: NodeJS.ErrnoException | null) => void, + ): T; + function pipeline(streams: Array, callback?: (err: NodeJS.ErrnoException | null) => void): NodeJS.WritableStream; + function pipeline( + stream1: NodeJS.ReadableStream, + stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream, + ...streams: Array void)>, + ): NodeJS.WritableStream; + namespace pipeline { + function __promisify__(stream1: NodeJS.ReadableStream, stream2: NodeJS.WritableStream): Promise; + function __promisify__(stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream, stream3: NodeJS.WritableStream): Promise; + function __promisify__(stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream, stream3: NodeJS.ReadWriteStream, stream4: NodeJS.WritableStream): Promise; + function __promisify__( + stream1: NodeJS.ReadableStream, + stream2: NodeJS.ReadWriteStream, + stream3: NodeJS.ReadWriteStream, + stream4: NodeJS.ReadWriteStream, + stream5: NodeJS.WritableStream, + ): Promise; + function __promisify__(streams: Array): Promise; + function __promisify__( + stream1: NodeJS.ReadableStream, + stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream, + ...streams: Array, + ): Promise; + } + + interface Pipe { } + } + + export = internal; +} diff --git a/node_modules/@types/node/string_decoder.d.ts b/node_modules/@types/node/string_decoder.d.ts new file mode 100644 index 00000000..fe0e0b4d --- /dev/null +++ b/node_modules/@types/node/string_decoder.d.ts @@ -0,0 +1,7 @@ +declare module "string_decoder" { + class StringDecoder { + constructor(encoding?: string); + write(buffer: Buffer): string; + end(buffer?: Buffer): string; + } +} diff --git a/node_modules/@types/node/timers.d.ts b/node_modules/@types/node/timers.d.ts new file mode 100644 index 00000000..e64a6735 --- /dev/null +++ b/node_modules/@types/node/timers.d.ts @@ -0,0 +1,16 @@ +declare module "timers" { + function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout; + namespace setTimeout { + function __promisify__(ms: number): Promise; + function __promisify__(ms: number, value: T): Promise; + } + function clearTimeout(timeoutId: NodeJS.Timeout): void; + function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout; + function clearInterval(intervalId: NodeJS.Timeout): void; + function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate; + namespace setImmediate { + function __promisify__(): Promise; + function __promisify__(value: T): Promise; + } + function clearImmediate(immediateId: NodeJS.Immediate): void; +} diff --git a/node_modules/@types/node/tls.d.ts b/node_modules/@types/node/tls.d.ts new file mode 100644 index 00000000..3446c097 --- /dev/null +++ b/node_modules/@types/node/tls.d.ts @@ -0,0 +1,418 @@ +declare module "tls" { + import * as crypto from "crypto"; + import * as dns from "dns"; + import * as net from "net"; + import * as stream from "stream"; + + const CLIENT_RENEG_LIMIT: number; + const CLIENT_RENEG_WINDOW: number; + + interface Certificate { + /** + * Country code. + */ + C: string; + /** + * Street. + */ + ST: string; + /** + * Locality. + */ + L: string; + /** + * Organization. + */ + O: string; + /** + * Organizational unit. + */ + OU: string; + /** + * Common name. + */ + CN: string; + } + + interface PeerCertificate { + subject: Certificate; + issuer: Certificate; + subjectaltname: string; + infoAccess: { [index: string]: string[] | undefined }; + modulus: string; + exponent: string; + valid_from: string; + valid_to: string; + fingerprint: string; + ext_key_usage: string[]; + serialNumber: string; + raw: Buffer; + } + + interface DetailedPeerCertificate extends PeerCertificate { + issuerCertificate: DetailedPeerCertificate; + } + + interface CipherNameAndProtocol { + /** + * The cipher name. + */ + name: string; + /** + * SSL/TLS protocol version. + */ + version: string; + } + + export interface TLSSocketOptions extends SecureContextOptions, CommonConnectionOptions { + /** + * If true the TLS socket will be instantiated in server-mode. + * Defaults to false. + */ + isServer?: boolean; + /** + * An optional net.Server instance. + */ + server?: net.Server; + + /** + * An optional Buffer instance containing a TLS session. + */ + session?: Buffer; + /** + * If true, specifies that the OCSP status request extension will be + * added to the client hello and an 'OCSPResponse' event will be + * emitted on the socket before establishing a secure communication + */ + requestOCSP?: boolean; + } + + class TLSSocket extends net.Socket { + /** + * Construct a new tls.TLSSocket object from an existing TCP socket. + */ + constructor(socket: net.Socket, options?: TLSSocketOptions); + + /** + * A boolean that is true if the peer certificate was signed by one of the specified CAs, otherwise false. + */ + authorized: boolean; + /** + * The reason why the peer's certificate has not been verified. + * This property becomes available only when tlsSocket.authorized === false. + */ + authorizationError: Error; + /** + * Static boolean value, always true. + * May be used to distinguish TLS sockets from regular ones. + */ + encrypted: boolean; + + /** + * String containing the selected ALPN protocol. + * When ALPN has no selected protocol, tlsSocket.alpnProtocol equals false. + */ + alpnProtocol?: string; + + /** + * Returns an object representing the cipher name and the SSL/TLS protocol version of the current connection. + * @returns Returns an object representing the cipher name + * and the SSL/TLS protocol version of the current connection. + */ + getCipher(): CipherNameAndProtocol; + /** + * Returns an object representing the peer's certificate. + * The returned object has some properties corresponding to the field of the certificate. + * If detailed argument is true the full chain with issuer property will be returned, + * if false only the top certificate without issuer property. + * If the peer does not provide a certificate, it returns null or an empty object. + * @param detailed - If true; the full chain with issuer property will be returned. + * @returns An object representing the peer's certificate. + */ + getPeerCertificate(detailed: true): DetailedPeerCertificate; + getPeerCertificate(detailed?: false): PeerCertificate; + getPeerCertificate(detailed?: boolean): PeerCertificate | DetailedPeerCertificate; + /** + * Returns a string containing the negotiated SSL/TLS protocol version of the current connection. + * The value `'unknown'` will be returned for connected sockets that have not completed the handshaking process. + * The value `null` will be returned for server sockets or disconnected client sockets. + * See https://www.openssl.org/docs/man1.0.2/ssl/SSL_get_version.html for more information. + * @returns negotiated SSL/TLS protocol version of the current connection + */ + getProtocol(): string | null; + /** + * Could be used to speed up handshake establishment when reconnecting to the server. + * @returns ASN.1 encoded TLS session or undefined if none was negotiated. + */ + getSession(): Buffer | undefined; + /** + * NOTE: Works only with client TLS sockets. + * Useful only for debugging, for session reuse provide session option to tls.connect(). + * @returns TLS session ticket or undefined if none was negotiated. + */ + getTLSTicket(): Buffer | undefined; + /** + * Initiate TLS renegotiation process. + * + * NOTE: Can be used to request peer's certificate after the secure connection has been established. + * ANOTHER NOTE: When running as the server, socket will be destroyed with an error after handshakeTimeout timeout. + * @param options - The options may contain the following fields: rejectUnauthorized, + * requestCert (See tls.createServer() for details). + * @param callback - callback(err) will be executed with null as err, once the renegotiation + * is successfully completed. + * @return `undefined` when socket is destroy, `false` if negotiaion can't be initiated. + */ + renegotiate(options: { rejectUnauthorized?: boolean, requestCert?: boolean }, callback: (err: Error | null) => void): undefined | boolean; + /** + * Set maximum TLS fragment size (default and maximum value is: 16384, minimum is: 512). + * Smaller fragment size decreases buffering latency on the client: large fragments are buffered by + * the TLS layer until the entire fragment is received and its integrity is verified; + * large fragments can span multiple roundtrips, and their processing can be delayed due to packet + * loss or reordering. However, smaller fragments add extra TLS framing bytes and CPU overhead, + * which may decrease overall server throughput. + * @param size - TLS fragment size (default and maximum value is: 16384, minimum is: 512). + * @returns Returns true on success, false otherwise. + */ + setMaxSendFragment(size: number): boolean; + + /** + * When enabled, TLS packet trace information is written to `stderr`. This can be + * used to debug TLS connection problems. + * + * Note: The format of the output is identical to the output of `openssl s_client + * -trace` or `openssl s_server -trace`. While it is produced by OpenSSL's + * `SSL_trace()` function, the format is undocumented, can change without notice, + * and should not be relied on. + */ + enableTrace(): void; + + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; + addListener(event: "secureConnect", listener: () => void): this; + addListener(event: "session", listener: (session: Buffer) => void): this; + addListener(event: "keylog", listener: (line: Buffer) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "OCSPResponse", response: Buffer): boolean; + emit(event: "secureConnect"): boolean; + emit(event: "session", session: Buffer): boolean; + emit(event: "keylog", line: Buffer): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "OCSPResponse", listener: (response: Buffer) => void): this; + on(event: "secureConnect", listener: () => void): this; + on(event: "session", listener: (session: Buffer) => void): this; + on(event: "keylog", listener: (line: Buffer) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "OCSPResponse", listener: (response: Buffer) => void): this; + once(event: "secureConnect", listener: () => void): this; + once(event: "session", listener: (session: Buffer) => void): this; + once(event: "keylog", listener: (line: Buffer) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; + prependListener(event: "secureConnect", listener: () => void): this; + prependListener(event: "session", listener: (session: Buffer) => void): this; + prependListener(event: "keylog", listener: (line: Buffer) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; + prependOnceListener(event: "secureConnect", listener: () => void): this; + prependOnceListener(event: "session", listener: (session: Buffer) => void): this; + prependOnceListener(event: "keylog", listener: (line: Buffer) => void): this; + } + + interface CommonConnectionOptions { + /** + * An optional TLS context object from tls.createSecureContext() + */ + secureContext?: SecureContext; + + /** + * When enabled, TLS packet trace information is written to `stderr`. This can be + * used to debug TLS connection problems. + * @default false + */ + enableTrace?: boolean; + /** + * If true the server will request a certificate from clients that + * connect and attempt to verify that certificate. Defaults to + * false. + */ + requestCert?: boolean; + /** + * An array of strings or a Buffer naming possible ALPN protocols. + * (Protocols should be ordered by their priority.) + */ + ALPNProtocols?: string[] | Uint8Array[] | Uint8Array; + /** + * SNICallback(servername, cb) A function that will be + * called if the client supports SNI TLS extension. Two arguments + * will be passed when called: servername and cb. SNICallback should + * invoke cb(null, ctx), where ctx is a SecureContext instance. + * (tls.createSecureContext(...) can be used to get a proper + * SecureContext.) If SNICallback wasn't provided the default callback + * with high-level API will be used (see below). + */ + SNICallback?: (servername: string, cb: (err: Error | null, ctx: SecureContext) => void) => void; + /** + * If true the server will reject any connection which is not + * authorized with the list of supplied CAs. This option only has an + * effect if requestCert is true. + * @default true + */ + rejectUnauthorized?: boolean; + } + + interface TlsOptions extends SecureContextOptions, CommonConnectionOptions { + handshakeTimeout?: number; + sessionTimeout?: number; + ticketKeys?: Buffer; + } + + interface ConnectionOptions extends SecureContextOptions, CommonConnectionOptions { + host?: string; + port?: number; + path?: string; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored. + socket?: net.Socket; // Establish secure connection on a given socket rather than creating a new socket + checkServerIdentity?: typeof checkServerIdentity; + servername?: string; // SNI TLS Extension + session?: Buffer; + minDHSize?: number; + lookup?: net.LookupFunction; + timeout?: number; + } + + class Server extends net.Server { + addContext(hostName: string, credentials: SecureContextOptions): void; + + /** + * events.EventEmitter + * 1. tlsClientError + * 2. newSession + * 3. OCSPRequest + * 4. resumeSession + * 5. secureConnection + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + addListener(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; + addListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + addListener(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; + addListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + addListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "tlsClientError", err: Error, tlsSocket: TLSSocket): boolean; + emit(event: "newSession", sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void): boolean; + emit(event: "OCSPRequest", certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void): boolean; + emit(event: "resumeSession", sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void): boolean; + emit(event: "secureConnection", tlsSocket: TLSSocket): boolean; + emit(event: "keylog", line: Buffer, tlsSocket: TLSSocket): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + on(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; + on(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + on(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; + on(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + on(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + once(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; + once(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + once(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; + once(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + once(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + prependListener(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; + prependListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + prependListener(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; + prependListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + prependListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + prependOnceListener(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; + prependOnceListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + prependOnceListener(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; + prependOnceListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + prependOnceListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; + } + + interface SecurePair { + encrypted: TLSSocket; + cleartext: TLSSocket; + } + + type SecureVersion = 'TLSv1.3' | 'TLSv1.2' | 'TLSv1.1' | 'TLSv1'; + + interface SecureContextOptions { + pfx?: string | Buffer | Array; + key?: string | Buffer | Array; + passphrase?: string; + cert?: string | Buffer | Array; + ca?: string | Buffer | Array; + ciphers?: string; + honorCipherOrder?: boolean; + ecdhCurve?: string; + clientCertEngine?: string; + crl?: string | Buffer | Array; + dhparam?: string | Buffer; + secureOptions?: number; // Value is a numeric bitmask of the `SSL_OP_*` options + secureProtocol?: string; // SSL Method, e.g. SSLv23_method + sessionIdContext?: string; + /** + * Optionally set the maximum TLS version to allow. One + * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the + * `secureProtocol` option, use one or the other. + * **Default:** `'TLSv1.3'`, unless changed using CLI options. Using + * `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using `--tls-max-v1.3` sets the default to + * `'TLSv1.3'`. If multiple of the options are provided, the highest maximum is used. + */ + maxVersion?: SecureVersion; + /** + * Optionally set the minimum TLS version to allow. One + * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the + * `secureProtocol` option, use one or the other. It is not recommended to use + * less than TLSv1.2, but it may be required for interoperability. + * **Default:** `'TLSv1.2'`, unless changed using CLI options. Using + * `--tls-v1.0` sets the default to `'TLSv1'`. Using `--tls-v1.1` sets the default to + * `'TLSv1.1'`. Using `--tls-min-v1.3` sets the default to + * 'TLSv1.3'. If multiple of the options are provided, the lowest minimum is used. + */ + minVersion?: SecureVersion; + } + + interface SecureContext { + context: any; + } + + /* + * Verifies the certificate `cert` is issued to host `host`. + * @host The hostname to verify the certificate against + * @cert PeerCertificate representing the peer's certificate + * + * Returns Error object, populating it with the reason, host and cert on failure. On success, returns undefined. + */ + function checkServerIdentity(host: string, cert: PeerCertificate): Error | undefined; + function createServer(secureConnectionListener?: (socket: TLSSocket) => void): Server; + function createServer(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void): Server; + function connect(options: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; + function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; + function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; + /** + * @deprecated + */ + function createSecurePair(credentials?: SecureContext, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair; + function createSecureContext(details: SecureContextOptions): SecureContext; + function getCiphers(): string[]; + + const DEFAULT_ECDH_CURVE: string; + + const rootCertificates: ReadonlyArray; +} diff --git a/node_modules/@types/node/trace_events.d.ts b/node_modules/@types/node/trace_events.d.ts new file mode 100644 index 00000000..9d1a59bd --- /dev/null +++ b/node_modules/@types/node/trace_events.d.ts @@ -0,0 +1,61 @@ +declare module "trace_events" { + /** + * The `Tracing` object is used to enable or disable tracing for sets of + * categories. Instances are created using the + * `trace_events.createTracing()` method. + * + * When created, the `Tracing` object is disabled. Calling the + * `tracing.enable()` method adds the categories to the set of enabled trace + * event categories. Calling `tracing.disable()` will remove the categories + * from the set of enabled trace event categories. + */ + export interface Tracing { + /** + * A comma-separated list of the trace event categories covered by this + * `Tracing` object. + */ + readonly categories: string; + + /** + * Disables this `Tracing` object. + * + * Only trace event categories _not_ covered by other enabled `Tracing` + * objects and _not_ specified by the `--trace-event-categories` flag + * will be disabled. + */ + disable(): void; + + /** + * Enables this `Tracing` object for the set of categories covered by + * the `Tracing` object. + */ + enable(): void; + + /** + * `true` only if the `Tracing` object has been enabled. + */ + readonly enabled: boolean; + } + + interface CreateTracingOptions { + /** + * An array of trace category names. Values included in the array are + * coerced to a string when possible. An error will be thrown if the + * value cannot be coerced. + */ + categories: string[]; + } + + /** + * Creates and returns a Tracing object for the given set of categories. + */ + export function createTracing(options: CreateTracingOptions): Tracing; + + /** + * Returns a comma-separated list of all currently-enabled trace event + * categories. The current set of enabled trace event categories is + * determined by the union of all currently-enabled `Tracing` objects and + * any categories enabled using the `--trace-event-categories` flag. + */ + export function getEnabledCategories(): string; +} diff --git a/node_modules/@types/node/ts3.2/globals.d.ts b/node_modules/@types/node/ts3.2/globals.d.ts new file mode 100644 index 00000000..70892bca --- /dev/null +++ b/node_modules/@types/node/ts3.2/globals.d.ts @@ -0,0 +1,19 @@ +// tslint:disable-next-line:no-bad-reference +/// + +declare namespace NodeJS { + interface HRTime { + bigint(): bigint; + } +} + +interface Buffer extends Uint8Array { + readBigUInt64BE(offset?: number): bigint; + readBigUInt64LE(offset?: number): bigint; + readBigInt64BE(offset?: number): bigint; + readBigInt64LE(offset?: number): bigint; + writeBigInt64BE(value: bigint, offset?: number): number; + writeBigInt64LE(value: bigint, offset?: number): number; + writeBigUInt64BE(value: bigint, offset?: number): number; + writeBigUInt64LE(value: bigint, offset?: number): number; +} diff --git a/node_modules/@types/node/ts3.2/index.d.ts b/node_modules/@types/node/ts3.2/index.d.ts new file mode 100644 index 00000000..ce7709bc --- /dev/null +++ b/node_modules/@types/node/ts3.2/index.d.ts @@ -0,0 +1,20 @@ +// NOTE: These definitions support NodeJS and TypeScript 3.2. + +// NOTE: TypeScript version-specific augmentations can be found in the following paths: +// - ~/base.d.ts - Shared definitions common to all TypeScript versions +// - ~/index.d.ts - Definitions specific to TypeScript 2.1 +// - ~/ts3.2/index.d.ts - Definitions specific to TypeScript 3.2 + +// Reference required types from the default lib: +/// +/// +/// +/// + +// Base definitions for all NodeJS modules that are not specific to any version of TypeScript: +// tslint:disable-next-line:no-bad-reference +/// + +// TypeScript 3.2-specific augmentations: +/// +/// diff --git a/node_modules/@types/node/ts3.2/util.d.ts b/node_modules/@types/node/ts3.2/util.d.ts new file mode 100644 index 00000000..a8b2487e --- /dev/null +++ b/node_modules/@types/node/ts3.2/util.d.ts @@ -0,0 +1,15 @@ +// tslint:disable-next-line:no-bad-reference +/// + +declare module "util" { + namespace inspect { + const custom: unique symbol; + } + namespace promisify { + const custom: unique symbol; + } + namespace types { + function isBigInt64Array(value: any): value is BigInt64Array; + function isBigUint64Array(value: any): value is BigUint64Array; + } +} diff --git a/node_modules/@types/node/tty.d.ts b/node_modules/@types/node/tty.d.ts new file mode 100644 index 00000000..d7fc1864 --- /dev/null +++ b/node_modules/@types/node/tty.d.ts @@ -0,0 +1,50 @@ +declare module "tty" { + import * as net from "net"; + + function isatty(fd: number): boolean; + class ReadStream extends net.Socket { + isRaw: boolean; + setRawMode(mode: boolean): void; + isTTY: boolean; + } + /** + * -1 - to the left from cursor + * 0 - the entire line + * 1 - to the right from cursor + */ + type Direction = -1 | 0 | 1; + class WriteStream extends net.Socket { + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "resize", listener: () => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "resize"): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "resize", listener: () => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "resize", listener: () => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "resize", listener: () => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "resize", listener: () => void): this; + + clearLine(dir: Direction): void; + clearScreenDown(): void; + cursorTo(x: number, y: number): void; + /** + * @default `process.env` + */ + getColorDepth(env?: {}): number; + hasColors(depth?: number): boolean; + hasColors(env?: {}): boolean; + hasColors(depth: number, env?: {}): boolean; + getWindowSize(): [number, number]; + columns: number; + rows: number; + isTTY: boolean; + } +} diff --git a/node_modules/@types/node/url.d.ts b/node_modules/@types/node/url.d.ts new file mode 100644 index 00000000..51dcd69a --- /dev/null +++ b/node_modules/@types/node/url.d.ts @@ -0,0 +1,104 @@ +declare module "url" { + import { ParsedUrlQuery, ParsedUrlQueryInput } from 'querystring'; + + interface UrlObjectCommon { + auth?: string; + hash?: string; + host?: string; + hostname?: string; + href?: string; + path?: string; + pathname?: string; + protocol?: string; + search?: string; + slashes?: boolean; + } + + // Input to `url.format` + interface UrlObject extends UrlObjectCommon { + port?: string | number; + query?: string | null | ParsedUrlQueryInput; + } + + // Output of `url.parse` + interface Url extends UrlObjectCommon { + port?: string; + query?: string | null | ParsedUrlQuery; + } + + interface UrlWithParsedQuery extends Url { + query: ParsedUrlQuery; + } + + interface UrlWithStringQuery extends Url { + query: string | null; + } + + function parse(urlStr: string): UrlWithStringQuery; + function parse(urlStr: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery; + function parse(urlStr: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery; + function parse(urlStr: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url; + + function format(URL: URL, options?: URLFormatOptions): string; + function format(urlObject: UrlObject | string): string; + function resolve(from: string, to: string): string; + + function domainToASCII(domain: string): string; + function domainToUnicode(domain: string): string; + + /** + * This function ensures the correct decodings of percent-encoded characters as + * well as ensuring a cross-platform valid absolute path string. + * @param url The file URL string or URL object to convert to a path. + */ + function fileURLToPath(url: string | URL): string; + + /** + * This function ensures that path is resolved absolutely, and that the URL + * control characters are correctly encoded when converting into a File URL. + * @param url The path to convert to a File URL. + */ + function pathToFileURL(url: string): URL; + + interface URLFormatOptions { + auth?: boolean; + fragment?: boolean; + search?: boolean; + unicode?: boolean; + } + + class URL { + constructor(input: string, base?: string | URL); + hash: string; + host: string; + hostname: string; + href: string; + readonly origin: string; + password: string; + pathname: string; + port: string; + protocol: string; + search: string; + readonly searchParams: URLSearchParams; + username: string; + toString(): string; + toJSON(): string; + } + + class URLSearchParams implements Iterable<[string, string]> { + constructor(init?: URLSearchParams | string | { [key: string]: string | string[] | undefined } | Iterable<[string, string]> | Array<[string, string]>); + append(name: string, value: string): void; + delete(name: string): void; + entries(): IterableIterator<[string, string]>; + forEach(callback: (value: string, name: string, searchParams: this) => void): void; + get(name: string): string | null; + getAll(name: string): string[]; + has(name: string): boolean; + keys(): IterableIterator; + set(name: string, value: string): void; + sort(): void; + toString(): string; + values(): IterableIterator; + [Symbol.iterator](): IterableIterator<[string, string]>; + } +} diff --git a/node_modules/@types/node/util.d.ts b/node_modules/@types/node/util.d.ts new file mode 100644 index 00000000..0e7a1c6e --- /dev/null +++ b/node_modules/@types/node/util.d.ts @@ -0,0 +1,165 @@ +declare module "util" { + interface InspectOptions extends NodeJS.InspectOptions { } + function format(format: any, ...param: any[]): string; + function formatWithOptions(inspectOptions: InspectOptions, format: string, ...param: any[]): string; + /** @deprecated since v0.11.3 - use a third party module instead. */ + function log(string: string): void; + function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string; + function inspect(object: any, options: InspectOptions): string; + namespace inspect { + let colors: { + [color: string]: [number, number] | undefined + }; + let styles: { + [style: string]: string | undefined + }; + let defaultOptions: InspectOptions; + /** + * Allows changing inspect settings from the repl. + */ + let replDefaults: InspectOptions; + } + /** @deprecated since v4.0.0 - use `Array.isArray()` instead. */ + function isArray(object: any): object is any[]; + /** @deprecated since v4.0.0 - use `util.types.isRegExp()` instead. */ + function isRegExp(object: any): object is RegExp; + /** @deprecated since v4.0.0 - use `util.types.isDate()` instead. */ + function isDate(object: any): object is Date; + /** @deprecated since v4.0.0 - use `util.types.isNativeError()` instead. */ + function isError(object: any): object is Error; + function inherits(constructor: any, superConstructor: any): void; + function debuglog(key: string): (msg: string, ...param: any[]) => void; + /** @deprecated since v4.0.0 - use `typeof value === 'boolean'` instead. */ + function isBoolean(object: any): object is boolean; + /** @deprecated since v4.0.0 - use `Buffer.isBuffer()` instead. */ + function isBuffer(object: any): object is Buffer; + /** @deprecated since v4.0.0 - use `typeof value === 'function'` instead. */ + function isFunction(object: any): boolean; + /** @deprecated since v4.0.0 - use `value === null` instead. */ + function isNull(object: any): object is null; + /** @deprecated since v4.0.0 - use `value === null || value === undefined` instead. */ + function isNullOrUndefined(object: any): object is null | undefined; + /** @deprecated since v4.0.0 - use `typeof value === 'number'` instead. */ + function isNumber(object: any): object is number; + /** @deprecated since v4.0.0 - use `value !== null && typeof value === 'object'` instead. */ + function isObject(object: any): boolean; + /** @deprecated since v4.0.0 - use `(typeof value !== 'object' && typeof value !== 'function') || value === null` instead. */ + function isPrimitive(object: any): boolean; + /** @deprecated since v4.0.0 - use `typeof value === 'string'` instead. */ + function isString(object: any): object is string; + /** @deprecated since v4.0.0 - use `typeof value === 'symbol'` instead. */ + function isSymbol(object: any): object is symbol; + /** @deprecated since v4.0.0 - use `value === undefined` instead. */ + function isUndefined(object: any): object is undefined; + function deprecate(fn: T, message: string): T; + function isDeepStrictEqual(val1: any, val2: any): boolean; + + interface CustomPromisify extends Function { + __promisify__: TCustom; + } + + function callbackify(fn: () => Promise): (callback: (err: NodeJS.ErrnoException) => void) => void; + function callbackify(fn: () => Promise): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; + function callbackify(fn: (arg1: T1) => Promise): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void; + function callbackify(fn: (arg1: T1) => Promise): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; + function callbackify(fn: (arg1: T1, arg2: T2) => Promise): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void; + function callbackify(fn: (arg1: T1, arg2: T2) => Promise): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; + function callbackify(fn: (arg1: T1, arg2: T2, arg3: T3) => Promise): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void; + function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3) => Promise): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; + function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void; + function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; + function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void; + function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; + function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException) => void) => void; + function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; + + function promisify(fn: CustomPromisify): TCustom; + function promisify(fn: (callback: (err: Error | null, result: TResult) => void) => void): () => Promise; + function promisify(fn: (callback: (err?: Error | null) => void) => void): () => Promise; + function promisify(fn: (arg1: T1, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1) => Promise; + function promisify(fn: (arg1: T1, callback: (err?: Error | null) => void) => void): (arg1: T1) => Promise; + function promisify(fn: (arg1: T1, arg2: T2, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise; + function promisify(fn: (arg1: T1, arg2: T2, callback: (err?: Error | null) => void) => void): (arg1: T1, arg2: T2) => Promise; + function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise; + function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: Error | null) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise; + function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: Error | null, result: TResult) => void) => void, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; + function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: Error | null) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; + function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: Error | null, result: TResult) => void) => void, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; + function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: Error | null) => void) => void, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; + function promisify(fn: Function): Function; + + namespace types { + function isAnyArrayBuffer(object: any): boolean; + function isArgumentsObject(object: any): object is IArguments; + function isArrayBuffer(object: any): object is ArrayBuffer; + function isAsyncFunction(object: any): boolean; + function isBooleanObject(object: any): object is Boolean; + function isBoxedPrimitive(object: any): object is (Number | Boolean | String | Symbol /* | Object(BigInt) | Object(Symbol) */); + function isDataView(object: any): object is DataView; + function isDate(object: any): object is Date; + function isExternal(object: any): boolean; + function isFloat32Array(object: any): object is Float32Array; + function isFloat64Array(object: any): object is Float64Array; + function isGeneratorFunction(object: any): boolean; + function isGeneratorObject(object: any): boolean; + function isInt8Array(object: any): object is Int8Array; + function isInt16Array(object: any): object is Int16Array; + function isInt32Array(object: any): object is Int32Array; + function isMap(object: any): boolean; + function isMapIterator(object: any): boolean; + function isModuleNamespaceObject(value: any): boolean; + function isNativeError(object: any): object is Error; + function isNumberObject(object: any): object is Number; + function isPromise(object: any): boolean; + function isProxy(object: any): boolean; + function isRegExp(object: any): object is RegExp; + function isSet(object: any): boolean; + function isSetIterator(object: any): boolean; + function isSharedArrayBuffer(object: any): boolean; + function isStringObject(object: any): boolean; + function isSymbolObject(object: any): boolean; + function isTypedArray(object: any): object is NodeJS.TypedArray; + function isUint8Array(object: any): object is Uint8Array; + function isUint8ClampedArray(object: any): object is Uint8ClampedArray; + function isUint16Array(object: any): object is Uint16Array; + function isUint32Array(object: any): object is Uint32Array; + function isWeakMap(object: any): boolean; + function isWeakSet(object: any): boolean; + function isWebAssemblyCompiledModule(object: any): boolean; + } + + class TextDecoder { + readonly encoding: string; + readonly fatal: boolean; + readonly ignoreBOM: boolean; + constructor( + encoding?: string, + options?: { fatal?: boolean; ignoreBOM?: boolean } + ); + decode( + input?: NodeJS.TypedArray | DataView | ArrayBuffer | null, + options?: { stream?: boolean } + ): string; + } + + class TextEncoder { + readonly encoding: string; + encode(input?: string): Uint8Array; + } +} diff --git a/node_modules/@types/node/v8.d.ts b/node_modules/@types/node/v8.d.ts new file mode 100644 index 00000000..fdecdb62 --- /dev/null +++ b/node_modules/@types/node/v8.d.ts @@ -0,0 +1,52 @@ +declare module "v8" { + import { Readable } from "stream"; + + interface HeapSpaceInfo { + space_name: string; + space_size: number; + space_used_size: number; + space_available_size: number; + physical_space_size: number; + } + + // ** Signifies if the --zap_code_space option is enabled or not. 1 == enabled, 0 == disabled. */ + type DoesZapCodeSpaceFlag = 0 | 1; + + interface HeapInfo { + total_heap_size: number; + total_heap_size_executable: number; + total_physical_size: number; + total_available_size: number; + used_heap_size: number; + heap_size_limit: number; + malloced_memory: number; + peak_malloced_memory: number; + does_zap_garbage: DoesZapCodeSpaceFlag; + number_of_native_contexts: number; + number_of_detached_contexts: number; + } + + function getHeapStatistics(): HeapInfo; + function getHeapSpaceStatistics(): HeapSpaceInfo[]; + function setFlagsFromString(flags: string): void; + /** + * Generates a snapshot of the current V8 heap and returns a Readable + * Stream that may be used to read the JSON serialized representation. + * This conversation was marked as resolved by joyeecheung + * This JSON stream format is intended to be used with tools such as + * Chrome DevTools. The JSON schema is undocumented and specific to the + * V8 engine, and may change from one version of V8 to the next. + */ + function getHeapSnapshot(): Readable; + + /** + * + * @param fileName The file path where the V8 heap snapshot is to be + * saved. If not specified, a file name with the pattern + * `'Heap-${yyyymmdd}-${hhmmss}-${pid}-${thread_id}.heapsnapshot'` will be + * generated, where `{pid}` will be the PID of the Node.js process, + * `{thread_id}` will be `0` when `writeHeapSnapshot()` is called from + * the main Node.js thread or the id of a worker thread. + */ + function writeHeapSnapshot(fileName?: string): string; +} diff --git a/node_modules/@types/node/vm.d.ts b/node_modules/@types/node/vm.d.ts new file mode 100644 index 00000000..0eefafd2 --- /dev/null +++ b/node_modules/@types/node/vm.d.ts @@ -0,0 +1,95 @@ +declare module "vm" { + interface Context { + [key: string]: any; + } + interface BaseOptions { + /** + * Specifies the filename used in stack traces produced by this script. + * Default: `''`. + */ + filename?: string; + /** + * Specifies the line number offset that is displayed in stack traces produced by this script. + * Default: `0`. + */ + lineOffset?: number; + /** + * Specifies the column number offset that is displayed in stack traces produced by this script. + * Default: `0` + */ + columnOffset?: number; + } + interface ScriptOptions extends BaseOptions { + displayErrors?: boolean; + timeout?: number; + cachedData?: Buffer; + produceCachedData?: boolean; + } + interface RunningScriptOptions extends BaseOptions { + displayErrors?: boolean; + timeout?: number; + } + interface CompileFunctionOptions extends BaseOptions { + /** + * Provides an optional data with V8's code cache data for the supplied source. + */ + cachedData?: Buffer; + /** + * Specifies whether to produce new cache data. + * Default: `false`, + */ + produceCachedData?: boolean; + /** + * The sandbox/context in which the said function should be compiled in. + */ + parsingContext?: Context; + + /** + * An array containing a collection of context extensions (objects wrapping the current scope) to be applied while compiling + */ + contextExtensions?: Object[]; + } + + interface CreateContextOptions { + /** + * Human-readable name of the newly created context. + * @default 'VM Context i' Where i is an ascending numerical index of the created context. + */ + name?: string; + /** + * Corresponds to the newly created context for display purposes. + * The origin should be formatted like a `URL`, but with only the scheme, host, and port (if necessary), + * like the value of the `url.origin` property of a URL object. + * Most notably, this string should omit the trailing slash, as that denotes a path. + * @default '' + */ + origin?: string; + codeGeneration?: { + /** + * If set to false any calls to eval or function constructors (Function, GeneratorFunction, etc) + * will throw an EvalError. + * @default true + */ + strings?: boolean; + /** + * If set to false any attempt to compile a WebAssembly module will throw a WebAssembly.CompileError. + * @default true + */ + wasm?: boolean; + }; + } + + class Script { + constructor(code: string, options?: ScriptOptions); + runInContext(contextifiedSandbox: Context, options?: RunningScriptOptions): any; + runInNewContext(sandbox?: Context, options?: RunningScriptOptions): any; + runInThisContext(options?: RunningScriptOptions): any; + createCachedData(): Buffer; + } + function createContext(sandbox?: Context, options?: CreateContextOptions): Context; + function isContext(sandbox: Context): boolean; + function runInContext(code: string, contextifiedSandbox: Context, options?: RunningScriptOptions | string): any; + function runInNewContext(code: string, sandbox?: Context, options?: RunningScriptOptions | string): any; + function runInThisContext(code: string, options?: RunningScriptOptions | string): any; + function compileFunction(code: string, params: string[], options: CompileFunctionOptions): Function; +} diff --git a/node_modules/@types/node/worker_threads.d.ts b/node_modules/@types/node/worker_threads.d.ts new file mode 100644 index 00000000..45ea85e0 --- /dev/null +++ b/node_modules/@types/node/worker_threads.d.ts @@ -0,0 +1,153 @@ +declare module "worker_threads" { + import { Context } from "vm"; + import { EventEmitter } from "events"; + import { Readable, Writable } from "stream"; + + const isMainThread: boolean; + const parentPort: null | MessagePort; + const threadId: number; + const workerData: any; + + class MessageChannel { + readonly port1: MessagePort; + readonly port2: MessagePort; + } + + class MessagePort extends EventEmitter { + close(): void; + postMessage(value: any, transferList?: Array): void; + ref(): void; + unref(): void; + start(): void; + + addListener(event: "close", listener: () => void): this; + addListener(event: "message", listener: (value: any) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "close"): boolean; + emit(event: "message", value: any): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "close", listener: () => void): this; + on(event: "message", listener: (value: any) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "close", listener: () => void): this; + once(event: "message", listener: (value: any) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "close", listener: () => void): this; + prependListener(event: "message", listener: (value: any) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "message", listener: (value: any) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + + removeListener(event: "close", listener: () => void): this; + removeListener(event: "message", listener: (value: any) => void): this; + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + + off(event: "close", listener: () => void): this; + off(event: "message", listener: (value: any) => void): this; + off(event: string | symbol, listener: (...args: any[]) => void): this; + } + + interface WorkerOptions { + eval?: boolean; + workerData?: any; + stdin?: boolean; + stdout?: boolean; + stderr?: boolean; + execArgv?: string[]; + } + + class Worker extends EventEmitter { + readonly stdin: Writable | null; + readonly stdout: Readable; + readonly stderr: Readable; + readonly threadId: number; + + constructor(filename: string, options?: WorkerOptions); + + postMessage(value: any, transferList?: Array): void; + ref(): void; + unref(): void; + /** + * Stop all JavaScript execution in the worker thread as soon as possible. + * Returns a Promise for the exit code that is fulfilled when the `exit` event is emitted. + */ + terminate(): Promise; + /** + * Transfer a `MessagePort` to a different `vm` Context. The original `port` + * object will be rendered unusable, and the returned `MessagePort` instance will + * take its place. + * + * The returned `MessagePort` will be an object in the target context, and will + * inherit from its global `Object` class. Objects passed to the + * `port.onmessage()` listener will also be created in the target context + * and inherit from its global `Object` class. + * + * However, the created `MessagePort` will no longer inherit from + * `EventEmitter`, and only `port.onmessage()` can be used to receive + * events using it. + */ + moveMessagePortToContext(port: MessagePort, context: Context): MessagePort; + + /** + * Receive a single message from a given `MessagePort`. If no message is available, + * `undefined` is returned, otherwise an object with a single `message` property + * that contains the message payload, corresponding to the oldest message in the + * `MessagePort`’s queue. + */ + receiveMessageOnPort(port: MessagePort): {} | undefined; + + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "exit", listener: (exitCode: number) => void): this; + addListener(event: "message", listener: (value: any) => void): this; + addListener(event: "online", listener: () => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "error", err: Error): boolean; + emit(event: "exit", exitCode: number): boolean; + emit(event: "message", value: any): boolean; + emit(event: "online"): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "error", listener: (err: Error) => void): this; + on(event: "exit", listener: (exitCode: number) => void): this; + on(event: "message", listener: (value: any) => void): this; + on(event: "online", listener: () => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "error", listener: (err: Error) => void): this; + once(event: "exit", listener: (exitCode: number) => void): this; + once(event: "message", listener: (value: any) => void): this; + once(event: "online", listener: () => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "exit", listener: (exitCode: number) => void): this; + prependListener(event: "message", listener: (value: any) => void): this; + prependListener(event: "online", listener: () => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "exit", listener: (exitCode: number) => void): this; + prependOnceListener(event: "message", listener: (value: any) => void): this; + prependOnceListener(event: "online", listener: () => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + + removeListener(event: "error", listener: (err: Error) => void): this; + removeListener(event: "exit", listener: (exitCode: number) => void): this; + removeListener(event: "message", listener: (value: any) => void): this; + removeListener(event: "online", listener: () => void): this; + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + + off(event: "error", listener: (err: Error) => void): this; + off(event: "exit", listener: (exitCode: number) => void): this; + off(event: "message", listener: (value: any) => void): this; + off(event: "online", listener: () => void): this; + off(event: string | symbol, listener: (...args: any[]) => void): this; + } +} diff --git a/node_modules/@types/node/zlib.d.ts b/node_modules/@types/node/zlib.d.ts new file mode 100644 index 00000000..b45721a1 --- /dev/null +++ b/node_modules/@types/node/zlib.d.ts @@ -0,0 +1,352 @@ +declare module "zlib" { + import * as stream from "stream"; + + interface ZlibOptions { + /** + * @default constants.Z_NO_FLUSH + */ + flush?: number; + /** + * @default constants.Z_FINISH + */ + finishFlush?: number; + /** + * @default 16*1024 + */ + chunkSize?: number; + windowBits?: number; + level?: number; // compression only + memLevel?: number; // compression only + strategy?: number; // compression only + dictionary?: NodeJS.TypedArray | DataView | ArrayBuffer; // deflate/inflate only, empty dictionary by default + } + + interface BrotliOptions { + /** + * @default constants.BROTLI_OPERATION_PROCESS + */ + flush?: number; + /** + * @default constants.BROTLI_OPERATION_FINISH + */ + finishFlush?: number; + /** + * @default 16*1024 + */ + chunkSize?: number; + params?: { + /** + * Each key is a `constants.BROTLI_*` constant. + */ + [key: number]: boolean | number; + }; + } + + interface Zlib { + /** @deprecated Use bytesWritten instead. */ + readonly bytesRead: number; + readonly bytesWritten: number; + shell?: boolean | string; + close(callback?: () => void): void; + flush(kind?: number | (() => void), callback?: () => void): void; + } + + interface ZlibParams { + params(level: number, strategy: number, callback: () => void): void; + } + + interface ZlibReset { + reset(): void; + } + + interface BrotliCompress extends stream.Transform, Zlib { } + interface BrotliDecompress extends stream.Transform, Zlib { } + interface Gzip extends stream.Transform, Zlib { } + interface Gunzip extends stream.Transform, Zlib { } + interface Deflate extends stream.Transform, Zlib, ZlibReset, ZlibParams { } + interface Inflate extends stream.Transform, Zlib, ZlibReset { } + interface DeflateRaw extends stream.Transform, Zlib, ZlibReset, ZlibParams { } + interface InflateRaw extends stream.Transform, Zlib, ZlibReset { } + interface Unzip extends stream.Transform, Zlib { } + + function createBrotliCompress(options?: BrotliOptions): BrotliCompress; + function createBrotliDecompress(options?: BrotliOptions): BrotliDecompress; + function createGzip(options?: ZlibOptions): Gzip; + function createGunzip(options?: ZlibOptions): Gunzip; + function createDeflate(options?: ZlibOptions): Deflate; + function createInflate(options?: ZlibOptions): Inflate; + function createDeflateRaw(options?: ZlibOptions): DeflateRaw; + function createInflateRaw(options?: ZlibOptions): InflateRaw; + function createUnzip(options?: ZlibOptions): Unzip; + + type InputType = string | DataView | ArrayBuffer | NodeJS.TypedArray; + + type CompressCallback = (error: Error | null, result: Buffer) => void; + + function brotliCompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void; + function brotliCompress(buf: InputType, callback: CompressCallback): void; + function brotliCompressSync(buf: InputType, options?: BrotliOptions): Buffer; + function brotliDecompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void; + function brotliDecompress(buf: InputType, callback: CompressCallback): void; + function brotliDecompressSync(buf: InputType, options?: BrotliOptions): Buffer; + function deflate(buf: InputType, callback: CompressCallback): void; + function deflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void; + function deflateSync(buf: InputType, options?: ZlibOptions): Buffer; + function deflateRaw(buf: InputType, callback: CompressCallback): void; + function deflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void; + function deflateRawSync(buf: InputType, options?: ZlibOptions): Buffer; + function gzip(buf: InputType, callback: CompressCallback): void; + function gzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void; + function gzipSync(buf: InputType, options?: ZlibOptions): Buffer; + function gunzip(buf: InputType, callback: CompressCallback): void; + function gunzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void; + function gunzipSync(buf: InputType, options?: ZlibOptions): Buffer; + function inflate(buf: InputType, callback: CompressCallback): void; + function inflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void; + function inflateSync(buf: InputType, options?: ZlibOptions): Buffer; + function inflateRaw(buf: InputType, callback: CompressCallback): void; + function inflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void; + function inflateRawSync(buf: InputType, options?: ZlibOptions): Buffer; + function unzip(buf: InputType, callback: CompressCallback): void; + function unzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void; + function unzipSync(buf: InputType, options?: ZlibOptions): Buffer; + + namespace constants { + const BROTLI_DECODE: number; + const BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: number; + const BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: number; + const BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: number; + const BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: number; + const BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: number; + const BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: number; + const BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: number; + const BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: number; + const BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: number; + const BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: number; + const BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: number; + const BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: number; + const BROTLI_DECODER_ERROR_FORMAT_DISTANCE: number; + const BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: number; + const BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: number; + const BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: number; + const BROTLI_DECODER_ERROR_FORMAT_PADDING_1: number; + const BROTLI_DECODER_ERROR_FORMAT_PADDING_2: number; + const BROTLI_DECODER_ERROR_FORMAT_RESERVED: number; + const BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: number; + const BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: number; + const BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: number; + const BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: number; + const BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: number; + const BROTLI_DECODER_ERROR_UNREACHABLE: number; + const BROTLI_DECODER_NEEDS_MORE_INPUT: number; + const BROTLI_DECODER_NEEDS_MORE_OUTPUT: number; + const BROTLI_DECODER_NO_ERROR: number; + const BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: number; + const BROTLI_DECODER_PARAM_LARGE_WINDOW: number; + const BROTLI_DECODER_RESULT_ERROR: number; + const BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: number; + const BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: number; + const BROTLI_DECODER_RESULT_SUCCESS: number; + const BROTLI_DECODER_SUCCESS: number; + + const BROTLI_DEFAULT_MODE: number; + const BROTLI_DEFAULT_QUALITY: number; + const BROTLI_DEFAULT_WINDOW: number; + const BROTLI_ENCODE: number; + const BROTLI_LARGE_MAX_WINDOW_BITS: number; + const BROTLI_MAX_INPUT_BLOCK_BITS: number; + const BROTLI_MAX_QUALITY: number; + const BROTLI_MAX_WINDOW_BITS: number; + const BROTLI_MIN_INPUT_BLOCK_BITS: number; + const BROTLI_MIN_QUALITY: number; + const BROTLI_MIN_WINDOW_BITS: number; + + const BROTLI_MODE_FONT: number; + const BROTLI_MODE_GENERIC: number; + const BROTLI_MODE_TEXT: number; + + const BROTLI_OPERATION_EMIT_METADATA: number; + const BROTLI_OPERATION_FINISH: number; + const BROTLI_OPERATION_FLUSH: number; + const BROTLI_OPERATION_PROCESS: number; + + const BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: number; + const BROTLI_PARAM_LARGE_WINDOW: number; + const BROTLI_PARAM_LGBLOCK: number; + const BROTLI_PARAM_LGWIN: number; + const BROTLI_PARAM_MODE: number; + const BROTLI_PARAM_NDIRECT: number; + const BROTLI_PARAM_NPOSTFIX: number; + const BROTLI_PARAM_QUALITY: number; + const BROTLI_PARAM_SIZE_HINT: number; + + const DEFLATE: number; + const DEFLATERAW: number; + const GUNZIP: number; + const GZIP: number; + const INFLATE: number; + const INFLATERAW: number; + const UNZIP: number; + + const Z_BEST_COMPRESSION: number; + const Z_BEST_SPEED: number; + const Z_BLOCK: number; + const Z_BUF_ERROR: number; + const Z_DATA_ERROR: number; + + const Z_DEFAULT_CHUNK: number; + const Z_DEFAULT_COMPRESSION: number; + const Z_DEFAULT_LEVEL: number; + const Z_DEFAULT_MEMLEVEL: number; + const Z_DEFAULT_STRATEGY: number; + const Z_DEFAULT_WINDOWBITS: number; + + const Z_ERRNO: number; + const Z_FILTERED: number; + const Z_FINISH: number; + const Z_FIXED: number; + const Z_FULL_FLUSH: number; + const Z_HUFFMAN_ONLY: number; + const Z_MAX_CHUNK: number; + const Z_MAX_LEVEL: number; + const Z_MAX_MEMLEVEL: number; + const Z_MAX_WINDOWBITS: number; + const Z_MEM_ERROR: number; + const Z_MIN_CHUNK: number; + const Z_MIN_LEVEL: number; + const Z_MIN_MEMLEVEL: number; + const Z_MIN_WINDOWBITS: number; + const Z_NEED_DICT: number; + const Z_NO_COMPRESSION: number; + const Z_NO_FLUSH: number; + const Z_OK: number; + const Z_PARTIAL_FLUSH: number; + const Z_RLE: number; + const Z_STREAM_END: number; + const Z_STREAM_ERROR: number; + const Z_SYNC_FLUSH: number; + const Z_VERSION_ERROR: number; + const ZLIB_VERNUM: number; + } + + /** + * @deprecated + */ + const Z_NO_FLUSH: number; + /** + * @deprecated + */ + const Z_PARTIAL_FLUSH: number; + /** + * @deprecated + */ + const Z_SYNC_FLUSH: number; + /** + * @deprecated + */ + const Z_FULL_FLUSH: number; + /** + * @deprecated + */ + const Z_FINISH: number; + /** + * @deprecated + */ + const Z_BLOCK: number; + /** + * @deprecated + */ + const Z_TREES: number; + /** + * @deprecated + */ + const Z_OK: number; + /** + * @deprecated + */ + const Z_STREAM_END: number; + /** + * @deprecated + */ + const Z_NEED_DICT: number; + /** + * @deprecated + */ + const Z_ERRNO: number; + /** + * @deprecated + */ + const Z_STREAM_ERROR: number; + /** + * @deprecated + */ + const Z_DATA_ERROR: number; + /** + * @deprecated + */ + const Z_MEM_ERROR: number; + /** + * @deprecated + */ + const Z_BUF_ERROR: number; + /** + * @deprecated + */ + const Z_VERSION_ERROR: number; + /** + * @deprecated + */ + const Z_NO_COMPRESSION: number; + /** + * @deprecated + */ + const Z_BEST_SPEED: number; + /** + * @deprecated + */ + const Z_BEST_COMPRESSION: number; + /** + * @deprecated + */ + const Z_DEFAULT_COMPRESSION: number; + /** + * @deprecated + */ + const Z_FILTERED: number; + /** + * @deprecated + */ + const Z_HUFFMAN_ONLY: number; + /** + * @deprecated + */ + const Z_RLE: number; + /** + * @deprecated + */ + const Z_FIXED: number; + /** + * @deprecated + */ + const Z_DEFAULT_STRATEGY: number; + /** + * @deprecated + */ + const Z_BINARY: number; + /** + * @deprecated + */ + const Z_TEXT: number; + /** + * @deprecated + */ + const Z_ASCII: number; + /** + * @deprecated + */ + const Z_UNKNOWN: number; + /** + * @deprecated + */ + const Z_DEFLATED: number; +} diff --git a/node_modules/assertion-error/History.md b/node_modules/assertion-error/History.md new file mode 100644 index 00000000..b240018b --- /dev/null +++ b/node_modules/assertion-error/History.md @@ -0,0 +1,24 @@ +1.1.0 / 2018-01-02 +================== + + * Add type definitions ([#11](https://github.com/chaijs/assertion-error/pull/11)) + +1.0.1 / 2015-03-04 +================== + + * Merge pull request #2 from simonzack/master + * fixes `.stack` on firefox + +1.0.0 / 2013-06-08 +================== + + * readme: change travis and component urls + * refactor: [*] prepare for move to chaijs gh org + +0.1.0 / 2013-04-07 +================== + + * test: use vanilla test runner/assert + * pgk: remove unused deps + * lib: implement + * "Initial commit" diff --git a/node_modules/assertion-error/README.md b/node_modules/assertion-error/README.md new file mode 100644 index 00000000..6cf03c8f --- /dev/null +++ b/node_modules/assertion-error/README.md @@ -0,0 +1,41 @@ +# AssertionError [![Build Status](https://travis-ci.org/chaijs/assertion-error.png?branch=master)](https://travis-ci.org/chaijs/assertion-error) + +> Error constructor for test and validation frameworks that implements standardized AssertionError specification. + +## Installation + +### Node.js + +`assertion-error` is available on [npm](http://npmjs.org). + + $ npm install assertion-error + +### Component + +`assertion-error` is available as a [component](https://github.com/component/component). + + $ component install chaijs/assertion-error + +## License + +(The MIT License) + +Copyright (c) 2013 Jake Luer (http://qualiancy.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/assertion-error/index.d.ts b/node_modules/assertion-error/index.d.ts new file mode 100644 index 00000000..2b9becdf --- /dev/null +++ b/node_modules/assertion-error/index.d.ts @@ -0,0 +1,11 @@ +type AssertionError = Error & T & { + showDiff: boolean; +}; + +interface AssertionErrorConstructor { + new(message: string, props?: T, ssf?: Function): AssertionError; +} + +declare const AssertionError: AssertionErrorConstructor; + +export = AssertionError; diff --git a/node_modules/assertion-error/index.js b/node_modules/assertion-error/index.js new file mode 100644 index 00000000..8466da8b --- /dev/null +++ b/node_modules/assertion-error/index.js @@ -0,0 +1,116 @@ +/*! + * assertion-error + * Copyright(c) 2013 Jake Luer + * MIT Licensed + */ + +/*! + * Return a function that will copy properties from + * one object to another excluding any originally + * listed. Returned function will create a new `{}`. + * + * @param {String} excluded properties ... + * @return {Function} + */ + +function exclude () { + var excludes = [].slice.call(arguments); + + function excludeProps (res, obj) { + Object.keys(obj).forEach(function (key) { + if (!~excludes.indexOf(key)) res[key] = obj[key]; + }); + } + + return function extendExclude () { + var args = [].slice.call(arguments) + , i = 0 + , res = {}; + + for (; i < args.length; i++) { + excludeProps(res, args[i]); + } + + return res; + }; +}; + +/*! + * Primary Exports + */ + +module.exports = AssertionError; + +/** + * ### AssertionError + * + * An extension of the JavaScript `Error` constructor for + * assertion and validation scenarios. + * + * @param {String} message + * @param {Object} properties to include (optional) + * @param {callee} start stack function (optional) + */ + +function AssertionError (message, _props, ssf) { + var extend = exclude('name', 'message', 'stack', 'constructor', 'toJSON') + , props = extend(_props || {}); + + // default values + this.message = message || 'Unspecified AssertionError'; + this.showDiff = false; + + // copy from properties + for (var key in props) { + this[key] = props[key]; + } + + // capture stack trace + ssf = ssf || AssertionError; + if (Error.captureStackTrace) { + Error.captureStackTrace(this, ssf); + } else { + try { + throw new Error(); + } catch(e) { + this.stack = e.stack; + } + } +} + +/*! + * Inherit from Error.prototype + */ + +AssertionError.prototype = Object.create(Error.prototype); + +/*! + * Statically set name + */ + +AssertionError.prototype.name = 'AssertionError'; + +/*! + * Ensure correct constructor + */ + +AssertionError.prototype.constructor = AssertionError; + +/** + * Allow errors to be converted to JSON for static transfer. + * + * @param {Boolean} include stack (default: `true`) + * @return {Object} object that can be `JSON.stringify` + */ + +AssertionError.prototype.toJSON = function (stack) { + var extend = exclude('constructor', 'toJSON', 'stack') + , props = extend({ name: this.name }, this); + + // include stack if exists and not turned off + if (false !== stack && this.stack) { + props.stack = this.stack; + } + + return props; +}; diff --git a/node_modules/assertion-error/package.json b/node_modules/assertion-error/package.json new file mode 100644 index 00000000..afaffda5 --- /dev/null +++ b/node_modules/assertion-error/package.json @@ -0,0 +1,65 @@ +{ + "_args": [ + [ + "assertion-error@1.1.0", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "assertion-error@1.1.0", + "_id": "assertion-error@1.1.0", + "_inBundle": false, + "_integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "_location": "/assertion-error", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "assertion-error@1.1.0", + "name": "assertion-error", + "escapedName": "assertion-error", + "rawSpec": "1.1.0", + "saveSpec": null, + "fetchSpec": "1.1.0" + }, + "_requiredBy": [ + "/chai" + ], + "_resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "_spec": "1.1.0", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "Jake Luer", + "email": "jake@qualiancy.com", + "url": "http://qualiancy.com" + }, + "bugs": { + "url": "https://github.com/chaijs/assertion-error/issues" + }, + "dependencies": {}, + "description": "Error constructor for test and validation frameworks that implements standardized AssertionError specification.", + "devDependencies": { + "component": "*", + "typescript": "^2.6.1" + }, + "engines": { + "node": "*" + }, + "homepage": "https://github.com/chaijs/assertion-error#readme", + "keywords": [ + "test", + "assertion", + "assertion-error" + ], + "license": "MIT", + "main": "./index", + "name": "assertion-error", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/chaijs/assertion-error.git" + }, + "scripts": { + "test": "make test" + }, + "types": "./index.d.ts", + "version": "1.1.0" +} diff --git a/node_modules/atob-lite/.npmignore b/node_modules/atob-lite/.npmignore new file mode 100644 index 00000000..50c74582 --- /dev/null +++ b/node_modules/atob-lite/.npmignore @@ -0,0 +1,6 @@ +node_modules +*.log +.DS_Store +bundle.js +test +test.js diff --git a/node_modules/atob-lite/LICENSE.md b/node_modules/atob-lite/LICENSE.md new file mode 100644 index 00000000..ee27ba4b --- /dev/null +++ b/node_modules/atob-lite/LICENSE.md @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/atob-lite/README.md b/node_modules/atob-lite/README.md new file mode 100644 index 00000000..99ea05d5 --- /dev/null +++ b/node_modules/atob-lite/README.md @@ -0,0 +1,37 @@ +# atob-lite +![](http://img.shields.io/badge/stability-stable-orange.svg?style=flat) +![](http://img.shields.io/npm/v/atob-lite.svg?style=flat) +![](http://img.shields.io/npm/dm/atob-lite.svg?style=flat) +![](http://img.shields.io/npm/l/atob-lite.svg?style=flat) + +Smallest/simplest possible means of using atob with both Node and browserify. + +In the browser, decoding base64 strings is done using: + +``` javascript +var decoded = atob(encoded) +``` + +However in Node, it's done like so: + +``` javascript +var decoded = new Buffer(encoded, 'base64').toString('utf8') +``` + +You can easily check if `Buffer` exists and switch between the approaches +accordingly, but using `Buffer` anywhere in your browser source will pull +in browserify's `Buffer` shim which is pretty hefty. This package uses +the `main` and `browser` fields in its `package.json` to perform this +check at build time and avoid pulling `Buffer` in unnecessarily. + +## Usage + +[![NPM](https://nodei.co/npm/atob-lite.png)](https://nodei.co/npm/atob-lite/) + +### `decoded = atob(encoded)` + +Returns the decoded value of a base64-encoded string. + +## License + +MIT. See [LICENSE.md](http://github.com/hughsk/atob-lite/blob/master/LICENSE.md) for details. diff --git a/node_modules/atob-lite/atob-browser.js b/node_modules/atob-lite/atob-browser.js new file mode 100644 index 00000000..cee1a38c --- /dev/null +++ b/node_modules/atob-lite/atob-browser.js @@ -0,0 +1,3 @@ +module.exports = function _atob(str) { + return atob(str) +} diff --git a/node_modules/atob-lite/atob-node.js b/node_modules/atob-lite/atob-node.js new file mode 100644 index 00000000..70720756 --- /dev/null +++ b/node_modules/atob-lite/atob-node.js @@ -0,0 +1,3 @@ +module.exports = function atob(str) { + return Buffer.from(str, 'base64').toString('binary') +} diff --git a/node_modules/atob-lite/package.json b/node_modules/atob-lite/package.json new file mode 100644 index 00000000..c6f4e978 --- /dev/null +++ b/node_modules/atob-lite/package.json @@ -0,0 +1,70 @@ +{ + "_args": [ + [ + "atob-lite@2.0.0", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "atob-lite@2.0.0", + "_id": "atob-lite@2.0.0", + "_inBundle": false, + "_integrity": "sha1-D+9a1G8b16hQLGVyfwNn1e5D1pY=", + "_location": "/atob-lite", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "atob-lite@2.0.0", + "name": "atob-lite", + "escapedName": "atob-lite", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/atob-lite/-/atob-lite-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "Hugh Kennedy", + "email": "hughskennedy@gmail.com", + "url": "http://hughsk.io/" + }, + "browser": "atob-browser.js", + "bugs": { + "url": "https://github.com/hughsk/atob-lite/issues" + }, + "dependencies": {}, + "description": "Smallest/simplest possible means of using atob with both Node and browserify", + "devDependencies": { + "browserify": "^10.2.4", + "smokestack": "^3.3.0", + "tap-closer": "^1.0.0", + "tap-spec": "^4.0.0", + "tape": "^4.0.0" + }, + "homepage": "https://github.com/hughsk/atob-lite", + "keywords": [ + "atob", + "base64", + "isomorphic", + "browser", + "node", + "shared" + ], + "license": "MIT", + "main": "atob-node.js", + "name": "atob-lite", + "repository": { + "type": "git", + "url": "git://github.com/hughsk/atob-lite.git" + }, + "scripts": { + "test": "npm run test-node && npm run test-browser", + "test-browser": "browserify test | smokestack | tap-spec", + "test-node": "node test | tap-spec" + }, + "version": "2.0.0" +} diff --git a/node_modules/before-after-hook/LICENSE b/node_modules/before-after-hook/LICENSE new file mode 100644 index 00000000..225063c3 --- /dev/null +++ b/node_modules/before-after-hook/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018 Gregor Martynus and other contributors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/before-after-hook/README.md b/node_modules/before-after-hook/README.md new file mode 100644 index 00000000..68c927d9 --- /dev/null +++ b/node_modules/before-after-hook/README.md @@ -0,0 +1,574 @@ +# before-after-hook + +> asynchronous hooks for internal functionality + +[![npm downloads](https://img.shields.io/npm/dw/before-after-hook.svg)](https://www.npmjs.com/package/before-after-hook) +[![Build Status](https://travis-ci.org/gr2m/before-after-hook.svg?branch=master)](https://travis-ci.org/gr2m/before-after-hook) +[![Coverage Status](https://coveralls.io/repos/gr2m/before-after-hook/badge.svg?branch=master)](https://coveralls.io/r/gr2m/before-after-hook?branch=master) +[![Greenkeeper badge](https://badges.greenkeeper.io/gr2m/before-after-hook.svg)](https://greenkeeper.io/) + +## Usage + +### Singular hook + +Recommended for [TypeScript](#typescript) + +```js +// instantiate singular hook API +const hook = new Hook.Singular() + +// Create a hook +function getData (options) { + return hook(fetchFromDatabase, options) + .then(handleData) + .catch(handleGetError) +} + +// register before/error/after hooks. +// The methods can be async or return a promise +hook.before(beforeHook) +hook.error(errorHook) +hook.after(afterHook) + +getData({id: 123}) +``` + +### Hook collection +```js +// instantiate hook collection API +const hookCollection = new Hook.Collection() + +// Create a hook +function getData (options) { + return hookCollection('get', fetchFromDatabase, options) + .then(handleData) + .catch(handleGetError) +} + +// register before/error/after hooks. +// The methods can be async or return a promise +hookCollection.before('get', beforeHook) +hookCollection.error('get', errorHook) +hookCollection.after('get', afterHook) + +getData({id: 123}) +``` + +### Hook.Singular vs Hook.Collection + +There's no fundamental difference between the `Hook.Singular` and `Hook.Collection` hooks except for the fact that a hook from a collection requires you to pass along the name. Therefore the following explanation applies to both code snippets as described above. + +The methods are executed in the following order + +1. `beforeHook` +2. `fetchFromDatabase` +3. `afterHook` +4. `getData` + +`beforeHook` can mutate `options` before it’s passed to `fetchFromDatabase`. + +If an error is thrown in `beforeHook` or `fetchFromDatabase` then `errorHook` is +called next. + +If `afterHook` throws an error then `handleGetError` is called instead +of `getData`. + +If `errorHook` throws an error then `handleGetError` is called next, otherwise +`afterHook` and `getData`. + +You can also use `hook.wrap` to achieve the same thing as shown above (collection example): + +```js +hookCollection.wrap('get', async (getData, options) => { + await beforeHook(options) + + try { + const result = getData(options) + } catch (error) { + await errorHook(error, options) + } + + await afterHook(result, options) +}) +``` + +## Install + +``` +npm install before-after-hook +``` + +Or download [the latest `before-after-hook.min.js`](https://github.com/gr2m/before-after-hook/releases/latest). + +## API + +- [Singular Hook Constructor](#singular-hook-api) +- [Hook Collection Constructor](#hook-collection-api) + +## Singular hook API + +- [Singular constructor](#singular-constructor) +- [hook.api](#singular-api) +- [hook()](#singular-api) +- [hook.before()](#singular-api) +- [hook.error()](#singular-api) +- [hook.after()](#singular-api) +- [hook.wrap()](#singular-api) +- [hook.remove()](#singular-api) + +### Singular constructor + +The `Hook.Singular` constructor has no options and returns a `hook` instance with the +methods below: + +```js +const hook = new Hook.Singular() +``` +Using the singular hook is recommended for [TypeScript](#typescript) + +### Singular API + +The singular hook is a reference to a single hook. This means that there's no need to pass along any identifier (such as a `name` as can be seen in the [Hook.Collection API](#hookcollectionapi)). + +The API of a singular hook is exactly the same as a collection hook and we therefore suggest you read the [Hook.Collection API](#hookcollectionapi) and leave out any use of the `name` argument. Just skip it like described in this example: +```js +const hook = new Hook.Singular() + +// good +hook.before(beforeHook) +hook.after(afterHook) +hook(fetchFromDatabase, options) + +// bad +hook.before('get', beforeHook) +hook.after('get', afterHook) +hook('get', fetchFromDatabase, options) +``` + +## Hook collection API + +- [Collection constructor](#collection-constructor) +- [collection.api](#collectionapi) +- [collection()](#collection) +- [collection.before()](#collectionbefore) +- [collection.error()](#collectionerror) +- [collection.after()](#collectionafter) +- [collection.wrap()](#collectionwrap) +- [collection.remove()](#collectionremove) + +### Collection constructor + +The `Hook.Collection` constructor has no options and returns a `hookCollection` instance with the +methods below + +```js +const hookCollection = new Hook.Collection() +``` + +### hookCollection.api + +Use the `api` property to return the public API: + +- [hookCollection.before()](#hookcollectionbefore) +- [hookCollection.after()](#hookcollectionafter) +- [hookCollection.error()](#hookcollectionerror) +- [hookCollection.wrap()](#hookcollectionwrap) +- [hookCollection.remove()](#hookcollectionremove) + +That way you don’t need to expose the [hookCollection()](#hookcollection) method to consumers of your library + +### hookCollection() + +Invoke before and after hooks. Returns a promise. + +```js +hookCollection(nameOrNames, method /*, options */) +``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescriptionRequired
nameString or Array of StringsHook name, for example 'save'. Or an array of names, see example below.Yes
methodFunctionCallback to be executed after all before hooks finished execution successfully. options is passed as first argumentYes
optionsObjectWill be passed to all before hooks as reference, so they can mutate itNo, defaults to empty object ({})
+ +Resolves with whatever `method` returns or resolves with. +Rejects with error that is thrown or rejected with by + +1. Any of the before hooks, whichever rejects / throws first +2. `method` +3. Any of the after hooks, whichever rejects / throws first + +Simple Example + +```js +hookCollection('save', function (record) { + return store.save(record) +}, record) +// shorter: hookCollection('save', store.save, record) + +hookCollection.before('save', function addTimestamps (record) { + const now = new Date().toISOString() + if (record.createdAt) { + record.updatedAt = now + } else { + record.createdAt = now + } +}) +``` + +Example defining multiple hooks at once. + +```js +hookCollection(['add', 'save'], function (record) { + return store.save(record) +}, record) + +hookCollection.before('add', function addTimestamps (record) { + if (!record.type) { + throw new Error('type property is required') + } +}) + +hookCollection.before('save', function addTimestamps (record) { + if (!record.type) { + throw new Error('type property is required') + } +}) +``` + +Defining multiple hooks is helpful if you have similar methods for which you want to define separate hooks, but also an additional hook that gets called for all at once. The example above is equal to this: + +```js +hookCollection('add', function (record) { + return hookCollection('save', function (record) { + return store.save(record) + }, record) +}, record) +``` + +### hookCollection.before() + +Add before hook for given name. + +```js +hookCollection.before(name, method) +``` + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescriptionRequired
nameStringHook name, for example 'save'Yes
methodFunction + Executed before the wrapped method. Called with the hook’s + options argument. Before hooks can mutate the passed options + before they are passed to the wrapped method. + Yes
+ +Example + +```js +hookCollection.before('save', function validate (record) { + if (!record.name) { + throw new Error('name property is required') + } +}) +``` + +### hookCollection.error() + +Add error hook for given name. + +```js +hookCollection.error(name, method) +``` + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescriptionRequired
nameStringHook name, for example 'save'Yes
methodFunction + Executed when an error occurred in either the wrapped method or a + before hook. Called with the thrown error + and the hook’s options argument. The first method + which does not throw an error will set the result that the after hook + methods will receive. + Yes
+ +Example + +```js +hookCollection.error('save', function (error, options) { + if (error.ignore) return + throw error +}) +``` + +### hookCollection.after() + +Add after hook for given name. + +```js +hookCollection.after(name, method) +``` + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescriptionRequired
nameStringHook name, for example 'save'Yes
methodFunction + Executed after wrapped method. Called with what the wrapped method + resolves with the hook’s options argument. + Yes
+ +Example + +```js +hookCollection.after('save', function (result, options) { + if (result.updatedAt) { + app.emit('update', result) + } else { + app.emit('create', result) + } +}) +``` + +### hookCollection.wrap() + +Add wrap hook for given name. + +```js +hookCollection.wrap(name, method) +``` + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescriptionRequired
nameStringHook name, for example 'save'Yes
methodFunction + Receives both the wrapped method and the passed options as arguments so it can add logic before and after the wrapped method, it can handle errors and even replace the wrapped method altogether + Yes
+ +Example + +```js +hookCollection.wrap('save', async function (saveInDatabase, options) { + if (!record.name) { + throw new Error('name property is required') + } + + try { + const result = await saveInDatabase(options) + + if (result.updatedAt) { + app.emit('update', result) + } else { + app.emit('create', result) + } + + return result + } catch (error) { + if (error.ignore) return + throw error + } +}) +``` + +See also: [Test mock example](examples/test-mock-example.md) + +### hookCollection.remove() + +Removes hook for given name. + +```js +hookCollection.remove(name, hookMethod) +``` + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescriptionRequired
nameStringHook name, for example 'save'Yes
beforeHookMethodFunction + Same function that was previously passed to hookCollection.before(), hookCollection.error(), hookCollection.after() or hookCollection.wrap() + Yes
+ +Example + +```js +hookCollection.remove('save', validateRecord) +``` + +## TypeScript + +This library contains type definitions for TypeScript. When you use TypeScript we highly recommend using the `Hook.Singular` constructor for your hooks as this allows you to pass along type information for the options object. For example: + +```ts + +import {Hook} from 'before-after-hook' + +interface Foo { + bar: string + num: number; +} + +const hook = new Hook.Singular(); + +hook.before(function (foo) { + + // typescript will complain about the following mutation attempts + foo.hello = 'world' + foo.bar = 123 + + // yet this is valid + foo.bar = 'other-string' + foo.num = 123 +}) + +const foo = hook(function(foo) { + // handle `foo` + foo.bar = 'another-string' +}, {bar: 'random-string'}) + +// foo outputs +{ + bar: 'another-string', + num: 123 +} +``` + +An alternative import: + +```ts +import {Singular, Collection} from 'before-after-hook' + +const hook = new Singular<{foo: string}>(); +const hookCollection = new Collection(); +``` + +## Upgrading to 1.4 + +Since version 1.4 the `Hook` constructor has been deprecated in favor of returning `Hook.Singular` in an upcoming breaking release. + +Version 1.4 is still 100% backwards-compatible, but if you want to continue using hook collections, we recommend using the `Hook.Collection` constructor instead before the next release. + +For even more details, check out [the PR](https://github.com/gr2m/before-after-hook/pull/52). + +## See also + +If `before-after-hook` is not for you, have a look at one of these alternatives: + +- https://github.com/keystonejs/grappling-hook +- https://github.com/sebelga/promised-hooks +- https://github.com/bnoguchi/hooks-js +- https://github.com/cb1kenobi/hook-emitter + +## License + +[Apache 2.0](LICENSE) diff --git a/node_modules/before-after-hook/index.d.ts b/node_modules/before-after-hook/index.d.ts new file mode 100644 index 00000000..3c19a5c9 --- /dev/null +++ b/node_modules/before-after-hook/index.d.ts @@ -0,0 +1,96 @@ +type HookMethod = (options: O) => R | Promise + +type BeforeHook = (options: O) => void +type ErrorHook = (error: E, options: O) => void +type AfterHook = (result: R, options: O) => void +type WrapHook = ( + hookMethod: HookMethod, + options: O +) => R | Promise + +type AnyHook = + | BeforeHook + | ErrorHook + | AfterHook + | WrapHook + +export interface HookCollection { + /** + * Invoke before and after hooks + */ + ( + name: string | string[], + hookMethod: HookMethod, + options?: any + ): Promise + /** + * Add `before` hook for given `name` + */ + before(name: string, beforeHook: BeforeHook): void + /** + * Add `error` hook for given `name` + */ + error(name: string, errorHook: ErrorHook): void + /** + * Add `after` hook for given `name` + */ + after(name: string, afterHook: AfterHook): void + /** + * Add `wrap` hook for given `name` + */ + wrap(name: string, wrapHook: WrapHook): void + /** + * Remove added hook for given `name` + */ + remove(name: string, hook: AnyHook): void +} + +export interface HookSingular { + /** + * Invoke before and after hooks + */ + (hookMethod: HookMethod, options?: O): Promise + /** + * Add `before` hook + */ + before(beforeHook: BeforeHook): void + /** + * Add `error` hook + */ + error(errorHook: ErrorHook): void + /** + * Add `after` hook + */ + after(afterHook: AfterHook): void + /** + * Add `wrap` hook + */ + wrap(wrapHook: WrapHook): void + /** + * Remove added hook + */ + remove(hook: AnyHook): void +} + +type Collection = new () => HookCollection +type Singular = new () => HookSingular + +interface Hook { + new (): HookCollection + + /** + * Creates a collection of hooks + */ + Collection: Collection + + /** + * Creates a nameless hook that supports strict typings + */ + Singular: Singular +} + +export const Hook: Hook +export const Collection: Collection +export const Singular: Singular + +export default Hook diff --git a/node_modules/before-after-hook/index.js b/node_modules/before-after-hook/index.js new file mode 100644 index 00000000..a97d89b7 --- /dev/null +++ b/node_modules/before-after-hook/index.js @@ -0,0 +1,57 @@ +var register = require('./lib/register') +var addHook = require('./lib/add') +var removeHook = require('./lib/remove') + +// bind with array of arguments: https://stackoverflow.com/a/21792913 +var bind = Function.bind +var bindable = bind.bind(bind) + +function bindApi (hook, state, name) { + var removeHookRef = bindable(removeHook, null).apply(null, name ? [state, name] : [state]) + hook.api = { remove: removeHookRef } + hook.remove = removeHookRef + + ;['before', 'error', 'after', 'wrap'].forEach(function (kind) { + var args = name ? [state, kind, name] : [state, kind] + hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args) + }) +} + +function HookSingular () { + var singularHookName = 'h' + var singularHookState = { + registry: {} + } + var singularHook = register.bind(null, singularHookState, singularHookName) + bindApi(singularHook, singularHookState, singularHookName) + return singularHook +} + +function HookCollection () { + var state = { + registry: {} + } + + var hook = register.bind(null, state) + bindApi(hook, state) + + return hook +} + +var collectionHookDeprecationMessageDisplayed = false +function Hook () { + if (!collectionHookDeprecationMessageDisplayed) { + console.warn('[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4') + collectionHookDeprecationMessageDisplayed = true + } + return HookCollection() +} + +Hook.Singular = HookSingular.bind() +Hook.Collection = HookCollection.bind() + +module.exports = Hook +// expose constructors as a named property for TypeScript +module.exports.Hook = Hook +module.exports.Singular = Hook.Singular +module.exports.Collection = Hook.Collection diff --git a/node_modules/before-after-hook/lib/add.js b/node_modules/before-after-hook/lib/add.js new file mode 100644 index 00000000..a34e3f46 --- /dev/null +++ b/node_modules/before-after-hook/lib/add.js @@ -0,0 +1,46 @@ +module.exports = addHook + +function addHook (state, kind, name, hook) { + var orig = hook + if (!state.registry[name]) { + state.registry[name] = [] + } + + if (kind === 'before') { + hook = function (method, options) { + return Promise.resolve() + .then(orig.bind(null, options)) + .then(method.bind(null, options)) + } + } + + if (kind === 'after') { + hook = function (method, options) { + var result + return Promise.resolve() + .then(method.bind(null, options)) + .then(function (result_) { + result = result_ + return orig(result, options) + }) + .then(function () { + return result + }) + } + } + + if (kind === 'error') { + hook = function (method, options) { + return Promise.resolve() + .then(method.bind(null, options)) + .catch(function (error) { + return orig(error, options) + }) + } + } + + state.registry[name].push({ + hook: hook, + orig: orig + }) +} diff --git a/node_modules/before-after-hook/lib/register.js b/node_modules/before-after-hook/lib/register.js new file mode 100644 index 00000000..b3d01fdc --- /dev/null +++ b/node_modules/before-after-hook/lib/register.js @@ -0,0 +1,28 @@ +module.exports = register + +function register (state, name, method, options) { + if (typeof method !== 'function') { + throw new Error('method for before hook must be a function') + } + + if (!options) { + options = {} + } + + if (Array.isArray(name)) { + return name.reverse().reduce(function (callback, name) { + return register.bind(null, state, name, callback, options) + }, method)() + } + + return Promise.resolve() + .then(function () { + if (!state.registry[name]) { + return method(options) + } + + return (state.registry[name]).reduce(function (method, registered) { + return registered.hook.bind(null, method, options) + }, method)() + }) +} diff --git a/node_modules/before-after-hook/lib/remove.js b/node_modules/before-after-hook/lib/remove.js new file mode 100644 index 00000000..e357c514 --- /dev/null +++ b/node_modules/before-after-hook/lib/remove.js @@ -0,0 +1,17 @@ +module.exports = removeHook + +function removeHook (state, name, method) { + if (!state.registry[name]) { + return + } + + var index = state.registry[name] + .map(function (registered) { return registered.orig }) + .indexOf(method) + + if (index === -1) { + return + } + + state.registry[name].splice(index, 1) +} diff --git a/node_modules/before-after-hook/package.json b/node_modules/before-after-hook/package.json new file mode 100644 index 00000000..c8e8d247 --- /dev/null +++ b/node_modules/before-after-hook/package.json @@ -0,0 +1,100 @@ +{ + "_args": [ + [ + "before-after-hook@2.1.0", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "before-after-hook@2.1.0", + "_id": "before-after-hook@2.1.0", + "_inBundle": false, + "_integrity": "sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A==", + "_location": "/before-after-hook", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "before-after-hook@2.1.0", + "name": "before-after-hook", + "escapedName": "before-after-hook", + "rawSpec": "2.1.0", + "saveSpec": null, + "fetchSpec": "2.1.0" + }, + "_requiredBy": [ + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.1.0.tgz", + "_spec": "2.1.0", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "Gregor Martynus" + }, + "bugs": { + "url": "https://github.com/gr2m/before-after-hook/issues" + }, + "dependencies": {}, + "description": "asynchronous before/error/after hooks for internal functionality", + "devDependencies": { + "browserify": "^16.0.0", + "gaze-cli": "^0.2.0", + "istanbul": "^0.4.0", + "istanbul-coveralls": "^1.0.3", + "mkdirp": "^0.5.1", + "rimraf": "^2.4.4", + "semantic-release": "^15.0.0", + "simple-mock": "^0.8.0", + "standard": "^13.0.1", + "tap-min": "^2.0.0", + "tap-spec": "^5.0.0", + "tape": "^4.2.2", + "typescript": "^3.5.3", + "uglify-js": "^3.0.0" + }, + "files": [ + "index.js", + "index.d.ts", + "lib" + ], + "homepage": "https://github.com/gr2m/before-after-hook#readme", + "keywords": [ + "hook", + "hooks", + "api" + ], + "license": "Apache-2.0", + "name": "before-after-hook", + "release": { + "publish": [ + "@semantic-release/npm", + { + "path": "@semantic-release/github", + "assets": [ + "dist/*.js" + ] + } + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/gr2m/before-after-hook.git" + }, + "scripts": { + "build": "browserify index.js --standalone=Hook > dist/before-after-hook.js", + "postbuild": "uglifyjs dist/before-after-hook.js -mc > dist/before-after-hook.min.js", + "posttest": "npm run validate:ts", + "postvalidate:ts": "tsc --noEmit --strict --target es6 test/typescript-validate.ts", + "prebuild": "rimraf dist && mkdirp dist", + "presemantic-release": "npm run build", + "pretest": "standard", + "semantic-release": "semantic-release", + "test": "npm run -s test:node | tap-spec", + "test:coverage": "istanbul cover test", + "test:coverage:upload": "istanbul-coveralls", + "test:node": "node test", + "test:watch": "gaze 'clear && node test | tap-min' 'test/**/*.js' 'index.js' 'lib/**/*.js'", + "validate:ts": "tsc --strict --target es6 index.d.ts" + }, + "types": "./index.d.ts", + "version": "2.1.0" +} diff --git a/node_modules/btoa-lite/.npmignore b/node_modules/btoa-lite/.npmignore new file mode 100644 index 00000000..50c74582 --- /dev/null +++ b/node_modules/btoa-lite/.npmignore @@ -0,0 +1,6 @@ +node_modules +*.log +.DS_Store +bundle.js +test +test.js diff --git a/node_modules/btoa-lite/LICENSE.md b/node_modules/btoa-lite/LICENSE.md new file mode 100644 index 00000000..ee27ba4b --- /dev/null +++ b/node_modules/btoa-lite/LICENSE.md @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/btoa-lite/README.md b/node_modules/btoa-lite/README.md new file mode 100644 index 00000000..e36492e9 --- /dev/null +++ b/node_modules/btoa-lite/README.md @@ -0,0 +1,37 @@ +# btoa-lite +![](http://img.shields.io/badge/stability-stable-orange.svg?style=flat) +![](http://img.shields.io/npm/v/btoa-lite.svg?style=flat) +![](http://img.shields.io/npm/dm/btoa-lite.svg?style=flat) +![](http://img.shields.io/npm/l/btoa-lite.svg?style=flat) + +Smallest/simplest possible means of using btoa with both Node and browserify. + +In the browser, encoding base64 strings is done using: + +``` javascript +var encoded = btoa(decoded) +``` + +However in Node, it's done like so: + +``` javascript +var encoded = new Buffer(decoded).toString('base64') +``` + +You can easily check if `Buffer` exists and switch between the approaches +accordingly, but using `Buffer` anywhere in your browser source will pull +in browserify's `Buffer` shim which is pretty hefty. This package uses +the `main` and `browser` fields in its `package.json` to perform this +check at build time and avoid pulling `Buffer` in unnecessarily. + +## Usage + +[![NPM](https://nodei.co/npm/btoa-lite.png)](https://nodei.co/npm/btoa-lite/) + +### `encoded = btoa(decoded)` + +Returns the base64-encoded value of a string. + +## License + +MIT. See [LICENSE.md](http://github.com/hughsk/btoa-lite/blob/master/LICENSE.md) for details. diff --git a/node_modules/btoa-lite/btoa-browser.js b/node_modules/btoa-lite/btoa-browser.js new file mode 100644 index 00000000..1b3acdbe --- /dev/null +++ b/node_modules/btoa-lite/btoa-browser.js @@ -0,0 +1,3 @@ +module.exports = function _btoa(str) { + return btoa(str) +} diff --git a/node_modules/btoa-lite/btoa-node.js b/node_modules/btoa-lite/btoa-node.js new file mode 100644 index 00000000..0278470b --- /dev/null +++ b/node_modules/btoa-lite/btoa-node.js @@ -0,0 +1,3 @@ +module.exports = function btoa(str) { + return new Buffer(str).toString('base64') +} diff --git a/node_modules/btoa-lite/package.json b/node_modules/btoa-lite/package.json new file mode 100644 index 00000000..010a0e0c --- /dev/null +++ b/node_modules/btoa-lite/package.json @@ -0,0 +1,69 @@ +{ + "_args": [ + [ + "btoa-lite@1.0.0", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "btoa-lite@1.0.0", + "_id": "btoa-lite@1.0.0", + "_inBundle": false, + "_integrity": "sha1-M3dm2hWAEhD92VbCLpxokaudAzc=", + "_location": "/btoa-lite", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "btoa-lite@1.0.0", + "name": "btoa-lite", + "escapedName": "btoa-lite", + "rawSpec": "1.0.0", + "saveSpec": null, + "fetchSpec": "1.0.0" + }, + "_requiredBy": [ + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/btoa-lite/-/btoa-lite-1.0.0.tgz", + "_spec": "1.0.0", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "Hugh Kennedy", + "email": "hughskennedy@gmail.com", + "url": "http://hughsk.io/" + }, + "browser": "btoa-browser.js", + "bugs": { + "url": "https://github.com/hughsk/btoa-lite/issues" + }, + "dependencies": {}, + "description": "Smallest/simplest possible means of using btoa with both Node and browserify", + "devDependencies": { + "browserify": "^10.2.4", + "smokestack": "^3.3.0", + "tap-spec": "^4.0.0", + "tape": "^4.0.0" + }, + "homepage": "https://github.com/hughsk/btoa-lite", + "keywords": [ + "btoa", + "base64", + "isomorphic", + "browser", + "node", + "shared" + ], + "license": "MIT", + "main": "btoa-node.js", + "name": "btoa-lite", + "repository": { + "type": "git", + "url": "git://github.com/hughsk/btoa-lite.git" + }, + "scripts": { + "test": "npm run test-node && npm run test-browser", + "test-browser": "browserify test | smokestack | tap-spec", + "test-node": "node test | tap-spec" + }, + "version": "1.0.0" +} diff --git a/node_modules/chai/CODEOWNERS b/node_modules/chai/CODEOWNERS new file mode 100644 index 00000000..ea74b66e --- /dev/null +++ b/node_modules/chai/CODEOWNERS @@ -0,0 +1 @@ +* @chaijs/chai diff --git a/node_modules/chai/CODE_OF_CONDUCT.md b/node_modules/chai/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..074addcc --- /dev/null +++ b/node_modules/chai/CODE_OF_CONDUCT.md @@ -0,0 +1,58 @@ +# Contributor Code of Conduct + +> Read in: [Español](http://contributor-covenant.org/version/1/3/0/es/) | +[Français](http://contributor-covenant.org/version/1/3/0/fr/) | +[Italiano](http://contributor-covenant.org/version/1/3/0/it/) | +[Magyar](http://contributor-covenant.org/version/1/3/0/hu/) | +[Polskie](http://contributor-covenant.org/version/1/3/0/pl/) | +[Português](http://contributor-covenant.org/version/1/3/0/pt/) | +[Português do Brasil](http://contributor-covenant.org/version/1/3/0/pt_br/) + +As contributors and maintainers of this project, and in the interest of +fostering an open and welcoming community, we pledge to respect all people who +contribute through reporting issues, posting feature requests, updating +documentation, submitting pull requests or patches, and other activities. + +We are committed to making participation in this project a harassment-free +experience for everyone, regardless of level of experience, gender, gender +identity and expression, sexual orientation, disability, personal appearance, +body size, race, ethnicity, age, religion, or nationality. + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery +* Personal attacks +* Trolling or insulting/derogatory comments +* Public or private harassment +* Publishing other's private information, such as physical or electronic + addresses, without explicit permission +* Other unethical or unprofessional conduct + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +By adopting this Code of Conduct, project maintainers commit themselves to +fairly and consistently applying these principles to every aspect of managing +this project. Project maintainers who do not follow or enforce the Code of +Conduct may be permanently removed from the project team. + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting a project maintainer at chaijs@keithcirkel.co.uk. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. Maintainers are +obligated to maintain confidentiality with regard to the reporter of an +incident. + + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 1.3.0, available at +[http://contributor-covenant.org/version/1/3/0/][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/3/0/ diff --git a/node_modules/chai/CONTRIBUTING.md b/node_modules/chai/CONTRIBUTING.md new file mode 100644 index 00000000..88072d45 --- /dev/null +++ b/node_modules/chai/CONTRIBUTING.md @@ -0,0 +1,218 @@ +# Chai Contribution Guidelines + +We like to encourage you to contribute to the Chai.js repository. This should be as easy as possible for you but there are a few things to consider when contributing. The following guidelines for contribution should be followed if you want to submit a pull request or open an issue. + +Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open source project. In return, they should reciprocate that respect in addressing your issue or assessing patches and features. + +#### Table of Contents + +- [TLDR;](#tldr) +- [Contributing](#contributing) + - [Bug Reports](#bugs) + - [Feature Requests](#features) + - [Pull Requests](#pull-requests) +- [Releasing](#releasing) +- [Support](#support) + - [Resources](#resources) + - [Core Contributors](#contributors) + + +## TLDR; + +- Creating an Issue or Pull Request requires a [GitHub](http://github.com) account. +- Issue reports should be **clear**, **concise** and **reproducible**. Check to see if your issue has already been resolved in the [master]() branch or already reported in Chai's [GitHub Issue Tracker](https://github.com/chaijs/chai/issues). +- Pull Requests must adhere to strict [coding style guidelines](https://github.com/chaijs/chai/wiki/Chai-Coding-Style-Guide). +- In general, avoid submitting PRs for new Assertions without asking core contributors first. More than likely it would be better implemented as a plugin. +- Additional support is available via the [Google Group](http://groups.google.com/group/chaijs) or on irc.freenode.net#chaijs. +- **IMPORTANT**: By submitting a patch, you agree to allow the project owner to license your work under the same license as that used by the project. + + + + +## Contributing + +The issue tracker is the preferred channel for [bug reports](#bugs), +[feature requests](#features) and [submitting pull +requests](#pull-requests), but please respect the following restrictions: + +* Please **do not** use the issue tracker for personal support requests (use + [Google Group](https://groups.google.com/forum/#!forum/chaijs) or IRC). +* Please **do not** derail or troll issues. Keep the discussion on topic and + respect the opinions of others + + +### Bug Reports + +A bug is a **demonstrable problem** that is caused by the code in the repository. + +Guidelines for bug reports: + +1. **Use the GitHub issue search** — check if the issue has already been reported. +2. **Check if the issue has been fixed** — try to reproduce it using the latest `master` or development branch in the repository. +3. **Isolate the problem** — create a test case to demonstrate your issue. Provide either a repo, gist, or code sample to demonstrate you problem. + +A good bug report shouldn't leave others needing to chase you up for more information. Please try to be as detailed as possible in your report. What is your environment? What steps will reproduce the issue? What browser(s) and/or Node.js versions experience the problem? What would you expect to be the outcome? All these details will help people to fix any potential bugs. + +Example: + +> Short and descriptive example bug report title +> +> A summary of the issue and the browser/OS environment in which it occurs. If suitable, include the steps required to reproduce the bug. +> +> 1. This is the first step +> 2. This is the second step +> 3. Further steps, etc. +> +> `` - a link to the reduced test case OR +> ```js +> expect(a).to.equal('a'); +> // code sample +> ``` +> +> Any other information you want to share that is relevant to the issue being reported. This might include the lines of code that you have identified as causing the bug, and potential solutions (and your opinions on their merits). + + +### Feature Requests + +Feature requests are welcome. But take a moment to find out whether your idea fits with the scope and aims of the project. It's up to *you* to make a strong case to convince the project's developers of the merits of this feature. Please provide as much detail and context as possible. + +Furthermore, since Chai.js has a [robust plugin API](http://chaijs.com/guide/plugins/), we encourage you to publish **new Assertions** as plugins. If your feature is an enhancement to an **existing Assertion**, please propose your changes as an issue prior to opening a pull request. If the core Chai.js contributors feel your plugin would be better suited as a core assertion, they will invite you to open a PR in [chaijs/chai](https://github.com/chaijs/chai). + + +### Pull Requests + +- PRs for new core-assertions are advised against. +- PRs for core-assertion bug fixes are always welcome. +- PRs for enhancing the interfaces are always welcome. +- PRs that increase test coverage are always welcome. +- PRs are scrutinized for coding-style. + +Good pull requests - patches, improvements, new features - are a fantastic help. They should remain focused in scope and avoid containing unrelated commits. + +**Please ask first** before embarking on any significant pull request (e.g. implementing features, refactoring code), otherwise you risk spending a lot of time working on something that the project's developers might not want to merge into the project. + +Please adhere to the coding conventions used throughout a project (indentation, accurate comments, etc.) and any other requirements (such as test coverage). Please review the [Chai.js Coding Style Guide](https://github.com/chaijs/chai/wiki/Chai-Coding-Style-Guide). + +Follow this process if you'd like your work considered for inclusion in the project: + +1. [Fork](http://help.github.com/fork-a-repo/) the project, clone your fork, and configure the remotes: + +```bash +# Clone your fork of the repo into the current directory +git clone https://github.com// +# Navigate to the newly cloned directory +cd +# Assign the original repo to a remote called "upstream" +git remote add upstream https://github.com// +``` + +2. If you cloned a while ago, get the latest changes from upstream: + +```bash +git checkout +git pull upstream +``` + +3. Create a new topic branch (off the main project development branch) to contain your feature, change, or fix: + +```bash +git checkout -b +``` + +4. Commit your changes in logical chunks. Use Git's [interactive rebase](https://help.github.com/articles/interactive-rebase) feature to tidy up your commits before making them public. + +5. Run you code to make sure it works. If you're still having problems please try to run `make clean` and then test your code again. + +```bash +npm test +# when finished running tests... +git checkout chai.js +``` + +6. Locally merge (or rebase) the upstream development branch into your topic branch: + +```bash +git pull [--rebase] upstream +``` + +7. Push your topic branch up to your fork: + +```bash +git push origin +``` + +8. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) with a clear title and description. + +**IMPORTANT**: By submitting a patch, you agree to allow the project owner to license your work under the same license as that used by the project. + + +## Releasing + +Releases can be **prepared** by anyone with access to the code. + +Simply run `make release-major`, `make release-minor`, or `make-release-patch` +and it will automatically do the following: + + - Build chai.js + - Bump the version numbers across the project + - Make a commit within git + +All you need to do is push the commit up and make a pull request, one of the core contributors will merge it and publish a release. + +### Publishing a Release + +Anyone who is a core contributor (see the [Core Contributors Heading in the Readme](https://github.com/chaijs/chai#core-contributors)) can publish a release: + +1. Go to the [Releases page on Github](https://github.com/chaijs/chai/releases) +2. Hit "Draft a new release" (if you can't see this, you're not a core contributor!) +3. Write human-friendly Release Notes based on changelog. + - The release title is "x.x.x / YYYY-MM-DD" (where x.x.x is the version number) + - If breaking changes, write migration tutorial(s) and reasoning. + - Callouts for community contributions (PRs) with links to PR and contributing user. + - Callouts for other fixes made by core contributors with links to issue. +4. Hit "Save Draft" and get other core contributors to check your work, or alternatively hit "Publish release" +5. That's it! + + +## Support + + +### Resources + +For most of the documentation you are going to want to visit [ChaiJS.com](http://chaijs.com). + +- [Getting Started Guide](http://chaijs.com/guide/) +- [API Reference](http://chaijs.com/api/) +- [Plugins](http://chaijs.com/plugins/) + +Alternatively, the [wiki](https://github.com/chaijs/chai/wiki) might be what you are looking for. + +- [Chai Coding Style Guide](https://github.com/chaijs/chai/wiki/Chai-Coding-Style-Guide) +- [Third-party Resources](https://github.com/chaijs/chai/wiki/Third-Party-Resources) + +Or finally, you may find a core-contributor or like-minded developer in any of our support channels. + +- IRC: irc.freenode.org #chaijs +- [Mailing List / Google Group](https://groups.google.com/forum/#!forum/chaijs) + + +### Core Contributors + +Feel free to reach out to any of the core-contributors with you questions or concerns. We will do our best to respond in a timely manner. + +- Jake Luer + - GH: [@logicalparadox](https://github.com/logicalparadox) + - TW: [@jakeluer](http://twitter.com/jakeluer) + - IRC: logicalparadox +- Veselin Todorov + - GH: [@vesln](https://github.com/vesln/) + - TW: [@vesln](http://twitter.com/vesln) + - IRC: vesln +- Keith Cirkel + - GH: [@keithamus](https://github.com/keithamus) + - TW: [@keithamus](http://twitter.com/keithamus) + - IRC: keithamus +- Lucas Fernandes da Costa + - GH: [@lucasfcosta](https://github.com/lucasfcosta) + - TW: [@lfernandescosta](https://twitter.com/lfernandescosta) + - IRC: lucasfcosta diff --git a/node_modules/chai/History.md b/node_modules/chai/History.md new file mode 100644 index 00000000..ae4d323e --- /dev/null +++ b/node_modules/chai/History.md @@ -0,0 +1,1059 @@ +### Note + +As of 3.0.0, the History.md file has been deprecated. [Please refer to the full +commit logs available on GitHub](https://github.com/chaijs/chai/commits/master). + +--- + +2.3.0 / 2015-04-26 +================== + + * Merge pull request #423 from ehntoo/patch-1 + * Merge pull request #422 from ljharb/fix_descriptor_tests + * Fix a small bug in the .null assertion docs + * Use a regex to account for property ordering issues across engines. + * Add `make test-firefox` + * Merge pull request #417 from astorije/astorije/minimalist-typo + * Remove trailing whitespaces + * Fix super minor typo in an example + * Merge pull request #408 from ljharb/enumerableProperty + * Add `ownPropertyDescriptor` assertion. + +2.2.0 / 2015-03-26 +================== + + * Merge pull request #405 from chaijs/deep-escape-doc-tweaks + * Tweak documentation on `.deep` flag. + * Merge pull request #402 from umireon/escaping-dot-should-be-taken + * Documentation of escaping in `.deep` flag. + * take regular expression apart + * Feature: backslash-escaping in `.deep.property` + * Escaping dot should be taken in deep property + +2.1.2 / 2015-03-15 +================== + + * Merge pull request #396 from chaijs/add-keith-cirkel-contributing-md + * Add Keith Cirkel to CONTRIBUTING.md + * Merge pull request #395 from cjqed/386-assert-operator-no-eval + * No longer using eval on assert operator #386 + * Merge pull request #389 from chaijs/update-git-summary + * Update `git summary` in README + +2.1.1 / 2015-03-04 +================== + + * Merge pull request #385 from eldritch-fossicker/master + * updates to reflect code style preference from @keithamus + * fix indexing into array with deep propery + * Merge pull request #382 from astorije/patch-2 + * Merge pull request #383 from gurdiga/config-doc-wording-improvement + * config.truncateThreshold docs: simpler wording + * Add missing docstring for showDiff argument of assert + * Merge pull request #381 from astorije/patch-1 + * Add a minor precision that empty asserts on strings too. + * Merge pull request #379 from dcneiner/should-primitive-fix + * Primitives now use valueOf in shouldGetter + +2.1.0 / 2015-02-23 +================== + + * Merge pull request #374 from jmm/v2.0.1 + * Increment version to 2.0.1. + * Merge pull request #365 from chaijs/fix-travis + * Fix travis.yml deploy + * Merge pull request #356 from Soviut/master + * documented fail methods for expect and should interfaces + * fail method added directly to expect + +2.0.0 / 2015-02-09 +================== + + * Merge pull request #361 from gregglind/b265-keys-object + * fix #359. Add `.keys(object)` + * Merge pull request #359 from gregglind/b359-unexpected-keys-sort + * Fix #359 keys() sorts input unexpectedly + * contrib: publish release strategy and travis npm creds #337 + * Merge pull request #357 from danilovaz/master + * Update copyright date + * Merge pull request #349 from toastynerd/add-which-chain-method + * add the which chain method as per issue #347 + * Merge pull request #333 from cmpolis/change-assertions + * more `by` cleanup + * cleaned out `.by` for #333 + * Merge pull request #335 from DingoEatingFuzz/expose-util + * Expose chai util through the chai object + * cleanup (per notes on pr #333) + * updated `change` to work w/ non-number values + tests + * Merge pull request #334 from hurrymaplelad/patch-1 + * Typo, the flag is called 'contains' with an 's' + * updated assertion interface with `change` (#330) + * added `change`,`increase`,`decrease` assertions (#330) + * assert tests for `change`,`increase`,`decrease` + * expect/should tests for `change`,`increase`,`decrease` + * Merge pull request #328 from lo1tuma/issue-327 + * Add includes and contains alias (fixes #327) + * Merge pull request #325 from chasenlehara/overwriteChainableMethodDocs + * Fix docs for overwriteChainableMethod parameters + * Merge pull request #317 from jasonkarns/patch-2 + * Merge pull request #318 from jasonkarns/patch-3 + * Merge pull request #316 from jasonkarns/patch-1 + * typos in docs + * minor docs typo + * update docs: getAllFlags -> transferFlags + * Merge pull request #313 from cjqed/254-expect-any-all + * Added the all and any flags for keys assertion, with all being the default behavior + * Merge pull request #312 from cjqed/291-assert-same-deep-members + * Changed public comment of sameDeepMemebers to be more clear + * Fixes issue #291, adds assert.sameDeepMembers + * Merge pull request #311 from cjqed/305-above-below-on-assert + * Merge pull request #308 from prodatakey/hasproperty + * Issue #305 fixed, added assert.isAbove and assert.isBelow + * Fix typo + * More unit tests for new utility functions + * Refactor common functionality, document, test + * Refactor if statement out + * Small unit test fix + * Handle array indexing terminating paths + * Merge pull request #309 from ericdouglas/iterableEqual-couting-once + * couting variables just once + * Fix properties with `undefined` value pass property assertion + * Merge pull request #306 from chaijs/revert-297-noopchainfunc + * Revert "Allows writing lint-friendly tests" + +1.10.0 / 2014-11-10 +================== + + * Merge pull request #297 from prodatakey/noopchainfunc + * Merge pull request #300 from julienw/299-fix-getMessage-test + * Fix #299: the test is defining global variables + * Add a couple more unit tests + * Add unit tests for chained terminating property asserts + * Revise documentation wording + * Add docs for function style NOOP asserts + * Make the NOOP function a shared constant + * Merge pull request #298 from dasilvacontin/negativeZeroLogging + * why not more assertions + * added test for inspecting `-0` + * a more readable/simple condition statement, as pointed out by @keithamus + * added check for logging negative zero + * Change test to not trigger argument bug + * Allows writing lint-friendly tests + * readme: update contributors for 1.9.2 + +1.9.2 / 2014-09-29 +================== + + * Merge pull request #268 from charlierudolph/cr-lazyMessages + * Merge pull request #269 from charlierudolph/cr-codeCleanup + * Merge pull request #277 from charlierudolph/fix-doc + * Merge pull request #279 from mohayonao/fix-closeTo + * Merge pull request #292 from boneskull/mocha + * resolves #255: upgrade mocha + * Merge pull request #289 from charlierudolph/cr-dryUpCode + * Dry up code + * Merge pull request #275 from DrRataplan/master + * assert: .closeTo() verify value's type before assertion + * Rewrite pretty-printing HTML elements to prevent throwing internal errors Fixes errors occuring when using a non-native DOM implementation + * Fix assert documentation + * Remove unused argument + * Allow messages to be functions + * Merge pull request #267 from shinnn/master + * Use SVG badge + * Merge pull request #264 from cjthompson/keys_diff + * Show diff for keys assertion + +1.9.1 / 2014-03-19 +================== + + * deps update + * util: [getActual] select actual logic now allows undefined for actual. Closes #183 + * docs: [config] make public, express param type + * Merge pull request #251 from romario333/threshold3 + * Fix issue #166 - configurable threshold in objDisplay. + * Move configuration options to config.js. + * Merge pull request #233 from Empeeric/master + * Merge pull request #244 from leider/fix_for_contains + * Merge pull request #247 from didoarellano/typo-fixes + * Fix typos + * Merge pull request #245 from lfac-pt/patch-1 + * Update `exports.version` to 1.9.0 + * aborting loop on finding + * declaring variable only once + * additional test finds incomplete implementation + * simplified code + * fixing #239 (without changing chai.js) + * ssfi as it should be + * Merge pull request #228 from duncanbeevers/deep_members + * Deep equality check for collection membership + +1.9.0 / 2014-01-29 +================== + + * docs: add contributing.md #238 + * assert: .throws() returns thrown error. Closes #185 + * Merge pull request #232 from laconbass/assert-throws + * assert: .fail() parameter mismatch. Closes #206 + * Merge branch 'karma-fixes' + * Add karma phantomjs launcher + * Use latest karma and sauce launcher + * Karma tweaks + * Merge pull request #230 from jkroso/include + * Merge pull request #237 from chaijs/coverage + * Add coverage to npmignore + * Remove lib-cov from test-travisci dependents + * Remove the not longer needed lcov reporter + * Test coverage with istanbul + * Remove jscoverage + * Remove coveralls + * Merge pull request #226 from duncanbeevers/add_has + * Avoid error instantiation if possible on assert.throws + * Merge pull request #231 from duncanbeevers/update_copyright_year + * Update Copyright notices to 2014 + * handle negation correctly + * add failing test case + * support `{a:1,b:2}.should.include({a:1})` + * Merge pull request #224 from vbardales/master + * Add `has` to language chains + * Merge pull request #219 from demands/overwrite_chainable + * return error on throw method to chain on error properties, possibly different from message + * util: store chainable behavior in a __methods object on ctx + * util: code style fix + * util: add overwriteChainableMethod utility (for #215) + * Merge pull request #217 from demands/test_cleanup + * test: make it possible to run utilities tests with --watch + * makefile: change location of karma-runner bin script + * Merge pull request #202 from andreineculau/patch-2 + * test: add tests for throwing custom errors + * Merge pull request #201 from andreineculau/patch-1 + * test: updated for the new assertion errors + * core: improve message for assertion errors (throw assertion) + +1.8.1 / 2013-10-10 +================== + + * pkg: update deep-eql version + +1.8.0 / 2013-09-18 +================== + + * test: [sauce] add a few more browsers + * Merge branch 'refactor/deep-equal' + * util: remove embedded deep equal utility + * util: replace embedded deep equal with external module + * Merge branch 'feature/karma' + * docs: add sauce badge to readme [ci skip] + * test: [sauce] use karma@canary to prevent timeouts + * travis: only run on node 0.10 + * test: [karma] use karma phantomjs runner + * Merge pull request #181 from tricknotes/fix-highlight + * Fix highlight for example code + +1.7.2 / 2013-06-27 +================== + + * coverage: add coveralls badge + * test: [coveralls] add coveralls api integration. testing travis-ci integration + * Merge branch 'master' of github.com:chaijs/chai + * Merge branch 'feature/bower' + * Merge pull request #180 from tricknotes/modify-method-title + * Merge pull request #179 from tricknotes/highlight-code-example + * Modify method title to include argument name + * Fix to highlight code example + * bower: granular ignores + +1.7.1 / 2013-06-24 +================== + + * Merge branch 'feature/bower'. #175 + * bower: add json file + * build: browser + +1.7.0 / 2013-06-17 +================== + + * error: remove internal assertion error constructor + * core: [assertion-error] replace internal assertion error with dep + * deps: add chaijs/assertion-error@1.0.0 + * docs: fix typo in source file. #174 + * Merge pull request #174 from piecioshka/master + * typo + * Merge branch 'master' of github.com:chaijs/chai + * pkg: lock mocha/mocha-phantomjs versions (for now) + * Merge pull request #173 from chaijs/inspect-fix + * Fix `utils.inspect` with custom object-returning inspect()s. + * Merge pull request #171 from Bartvds/master + * replaced tabs with 2 spaces + * added assert.notOk() + * Merge pull request #169 from katsgeorgeek/topics/master + * Fix comparison objects. + +1.6.1 / 2013-06-05 +================== + + * Merge pull request #168 from katsgeorgeek/topics/master + * Add test for different RegExp flags. + * Add test for regexp comparison. + * Downgrade mocha version for fix running Phantom tests. + * Fix comparison equality of two regexps. + * Merge pull request #161 from brandonpayton/master + * Fix documented name for assert interfaces isDefined method + +1.6.0 / 2013-04-29 +================== + + * build: browser + * assert: [(not)include] throw on incompatible haystack. Closes #142 + * assert: [notInclude] add assert.notInclude. Closes #158 + * browser build + * makefile: force browser build on browser-test + * makefile: use component for browser build + * core: [assertions] remove extraneous comments + * Merge branch 'master' of github.com:chaijs/chai + * test: [assert] deep equal ordering + * Merge pull request #153 from NickHeiner/array-assertions + * giving members a no-flag assertion + * Code review comments - changing syntax + * Code review comments + * Adding members and memberEquals assertions for checking for subsets and set equality. Implements chaijs/chai#148. + * Merge pull request #140 from RubenVerborgh/function-prototype + * Restore the `call` and `apply` methods of Function when adding a chainable method. + * readme: 2013 + * notes: migration notes for deep equal changes + * test: for ever err() there must be a passing version + +1.5.0 / 2013-02-03 +================== + + * docs: add Release Notes for non-gitlog summary of changes. + * lib: update copyright to 2013 + * Merge branch 'refactor/travis' + * makefile: remove test-component for full test run + * pkg: script test now runs make test so travis will test browser + * browser: build + * tests: refactor some tests to support new objDisplay output + * test: [bootstrap] normalize boostrap across all test scenarios + * assertions: refactor some assertions to use objDisplay instead of inspect + * util: [objDisplay] normalize output of functions + * makefile: refactor for full build scenarios + * component: fix build bug where missing util:type file + * assertions: [throw] code cleanup + * Merge branch 'refactor/typeDetection' + * browser: build + * makefile: chai.js is .PHONY so it builds every time + * test: [expect] add arguments type detection test + * core/assertions: [type] (a/an) refactor to use type detection utility + * util: add cross-browser type detection utility + * Merge branch 'feature/component' + * browser: build + * component: add component.json file + * makefile: refactor for fine grain control of testing scenarios + * test: add mochaPhantomJS support and component test file + * deps: add component and mocha-phantomjs for browser testing + * ignore: update ignore files for component support + * travis: run for all branches + * Merge branch 'feature/showDiff' + * test: [Assertion] configruable showDiff flag. Closes #132 + * lib: [Assertion] add configurable showDiff flag. #132 + * Merge branch 'feature/saucelabs' + * Merge branch 'master' into feature/saucelabs + * browser: build + * support: add mocha cloud runner, client, and html test page + * test: [saucelabs] add auth placeholder + * deps: add mocha-cloud + * Merge pull request #136 from whatthejeff/message_fix + * Merge pull request #138 from timnew/master + * Fix issue #137, test message existence by using message!=null rather than using message + * Fixed backwards negation messages. + * Merge pull request #133 from RubenVerborgh/throw + * Functions throwing strings can reliably be tested. + * Merge pull request #131 from RubenVerborgh/proto + * Cache whether __proto__ is supported. + * Use __proto__ if available. + * Determine the property names to exclude beforehand. + * Merge pull request #126 from RubenVerborgh/eqls + * Add alias eqls for eql. + * Use inherited enumerable properties in deep equality comparison. + * Show inherited properties when inspecting an object. + * Add new getProperties and getEnumerableProperties utils. + * showDiff: force true for equal and eql + +1.4.2 / 2012-12-21 +================== + + * browser build: (object diff support when used with mocha) #106 + * test: [display] array test for mocha object diff + * browser: no longer need different AssertionError constructor + +1.4.1 / 2012-12-21 +================== + + * showDiff: force diff for equal and eql. #106 + * test: [expect] type null. #122 + * Merge pull request #115 from eshao/fix-assert-Throw + * FIX: assert.Throw checks error type/message + * TST: assert.Throw should check error type/message + +1.4.0 / 2012-11-29 +================== + + * pre-release browser build + * clean up index.js to not check for cov, revert package.json to use index.js + * convert tests to use new bootstrap + * refactor testing bootstrap + * use spaces (not tabs). Clean up #114 + * Merge pull request #114 from trantorLiu/master + * Add most() (alias: lte) and least() (alias: gte) to the API with new chainers "at" and "of". + * Change `main` to ./lib/chai. Fixes #28. + * Merge pull request #104 from connec/deep_equals_circular_references_ + * Merge pull request #109 from nnarhinen/patch-1 + * Check for 'actual' type + * Added support for circular references when checking deep (in)equality. + +1.3.0 / 2012-10-01 +================== + + * browser build w/ folio >= 0.3.4. Closes #99 + * add back buffer test for deep equal + * do not write flags to assertion.prototype + * remove buffer test from expect + * browser build + * improve documentation of custom error messages + * Merge branch 'master' of git://github.com/Liffft/chai into Liffft-master + * browser build + * improved buffer deep equal checking + * mocha is npm test command + * Cleaning up the js style… + * expect tests now include message pass-through + * packaging up browser-side changes… + * Increasing Throws error message verbosity + * Should syntax: piping message through + * Make globalShould test work in browser too. + * Add a setter for `Object.prototype.should`. Closes #86. + +1.2.0 / 2012-08-07 +================== + + * Merge branch 'feature/errmsg' + * browser build + * comment updates for utilities + * tweak objDislay to only kick in if object inspection is too long + * Merge branch 'master' into feature/errmsg + * add display sample for error message refactor + * first draft of error message refactor. #93 + * add `closeTo` assertion to `assert` interface. Closes #89. + * update folio build for better require.js handling. Closes #85 + * Merge pull request #92 from paulmillr/topics/add-dom-checks + * Add check for DOM objects. + * browser build + * Merge branch 'master' of github.com:chaijs/chai + * bug - getActual not defaulting to assertion subject + * Merge pull request #88 from pwnall/master + * Don't inspect() assertion arguments if the assertion passes. + +1.1.1 / 2012-07-09 +================== + + * improve commonjs support on browser build + * Merge pull request #83 from tkazec/equals + * Document .equals + * Add .equals as an alias of .equal + * remove unused browser prefix/suffix + * Merge branch 'feature/folio-build' + * browser build + * using folio to compile + * clean up makefile + * early folio 0.3.x support + +1.1.0 / 2012-06-26 +================== + + * browser build + * Disable "Assertion.includeStack is false" test in IE. + * Use `utils.getName` for all function inspections. + * Merge pull request #80 from kilianc/closeTo + * fixes #79 + * browser build + * expand docs to indicate change of subject for chaining. Closes #78 + * add `that` chain noop + * Merge branch 'bug/74' + * comments on how to property use `length` as chain. Closes #74 + * tests for length as chainable property. #74 + * add support for `length` as chainable prop/method. + * Merge branch 'bug/77' + * tests for getPathValue when working with nested arrays. Closes #77 + * add getPathValue support for nested arrays + * browser build + * fix bug for missing browser utils + * compile tool aware of new folder layout + * Merge branch 'refactor/1dot1' + * move core assertions to own file and refactor all using utils + * rearrange folder structure + +1.0.4 / 2012-06-03 +================== + + * Merge pull request #68 from fizker/itself + * Added itself chain. + * simplify error inspections for cross browser compatibility + * fix safari `addChainableMethod` errors. Closes #69 + +1.0.3 / 2012-05-27 +================== + + * Point Travis badge to the right place. + * Make error message for eql/deep.equal more clear. + * Fix .not.deep.equal. + * contributors list + +1.0.2 / 2012-05-26 +================== + + * Merge pull request #67 from chaijs/chaining-and-flags + * Browser build. + * Use `addChainableMethod` to get away from `__proto__` manipulation. + * New `addChainableMethod` utility. + * Replace `getAllFlags` with `transferFlags` utility. + * browser build + * test - get all flags + * utility - get all flags + * Add .mailmap to .npmignore. + * Add a .mailmap file to fix my name in shortlogs. + +1.0.1 / 2012-05-18 +================== + + * browser build + * Fixing "an" vs. "a" grammar in type assertions. + * Uniformize `assert` interface inline docs. + * Don't use `instanceof` for `assert.isArray`. + * Add `deep` flag for equality and property value. + * Merge pull request #64 from chaijs/assertion-docs + * Uniformize assertion inline docs. + * Add npm-debug.log to .gitignore. + * no reserved words as actuals. #62 + +1.0.0 / 2012-05-15 +================== + + * readme cleanup + * browser build + * utility comments + * removed docs + * update to package.json + * docs build + * comments / docs updates + * plugins app cleanup + * Merge pull request #61 from joliss/doc + * Fix and improve documentation of assert.equal and friends + * browser build + * doc checkpoint - texture + * Update chai-jquery link + * Use defined return value of Assertion extension functions + * Update utility docs + +1.0.0-rc3 / 2012-05-09 +================== + + * Merge branch 'feature/rc3' + * docs update + * browser build + * assert test conformity for minor refactor api + * assert minor refactor + * update util tests for new add/overwrite prop/method format + * added chai.Assertion.add/overwrite prop/method for plugin toolbox + * add/overwrite prop/method don't make assumptions about context + * doc test suite + * docs don't need coverage + * refactor all simple chains into one forEach loop, for clean documentation + * updated npm ignore + * remove old docs + * docs checkpoint - guide styled + * Merge pull request #59 from joliss/doc + * Document how to run the test suite + * don't need to rebuild docs to view + * dep update + * docs checkpoint - api section + * comment updates for docs + * new doc site checkpoint - plugin directory! + * Merge pull request #57 from kossnocorp/patch-1 + * Fix typo: devDependancies → devDependencies + * Using message flag in `getMessage` util instead of old `msg` property. + * Adding self to package.json contributors. + * `getMessage` shouldn't choke on null/omitted messages. + * `return this` not necessary in example. + * `return this` not necessary in example. + * Sinon–Chai has a dash + * updated plugins list for docs + +1.0.0-rc2 / 2012-05-06 +================== + + * Merge branch 'feature/test-cov' + * browser build + * missing assert tests for ownProperty + * appropriate assert equivalent for expect.to.have.property(key, val) + * reset AssertionError to include full stack + * test for plugin utilities + * overwrite Property and Method now ensure chain + * version notes in readme + +1.0.0-rc1 / 2012-05-04 +================== + + * browser build (rc1) + * assert match/notMatch tests + * assert interface - notMatch, ownProperty, notOwnProperty, ownPropertyVal, ownPropertyNotVal + * cleaner should interface export. + * added chai.Assertion.prototype._obj (getter) for quick access to object flag + * moved almostEqual / almostDeepEqual to stats plugin + * added mocha.opts + * Add test for `utils.addMethod` + * Fix a typo + * Add test for `utils.overwriteMethod` + * Fix a typo + * Browser build + * Add undefined assertion + * Add null assertion + * Fix an issue with `mocha --watch` + * travis no longer tests on node 0.4.x + * removing unnecissary carbon dep + * Merge branch 'feature/plugins-app' + * docs build + * templates for docs express app for plugin directory + * express app for plugin and static serving + * added web server deps + * Merge pull request #54 from josher19/master + * Remove old test.assert code + * Use util.inspect instead of inspect for deepAlmostEqual and almostEqual + * browser build + * Added almostEqual and deepAlmostEqual to assert test suite. + * bug - context determinants for utils + * dec=0 means rounding, so assert.deepAlmostEqual({pi: 3.1416}, {pi: 3}, 0) is true + * wrong travis link + * readme updates for version information + * travis tests 0.5.x branch as well + * [bug] util `addProperty` not correctly exporting + * read me version notes + * browser build 1.0.0alpha1 + * not using reserved words in internal assertions. #52 + * version tick + * clean up redundant tests + * Merge branch 'refs/heads/0.6.x' + * update version tag in package 1.0.0alpha1 + * browser build + * added utility tests to browser specs + * beginning utility testing + * updated utility comments + * utility - overwriteMethod + * utility - overwriteProperty + * utility - addMethod + * utility - addProperty + * missing ; + * contributors list update + * Merge branch 'refs/heads/0.6.x-docs' into 0.6.x + * Added guide link to docs. WIP + * Include/contain are now both properties and methods + * Add an alias annotation + * Remove usless function wrapper + * Fix a typo + * A/an are now both properties and methods + * [docs] new site homepage layout / color checkpoint + * Ignore IE-specific error properties. + * Fixing order of error message test. + * New cross-browser `getName` util. + * Fixing up `AssertionError` inheritance. + * backup docs + * Add doctypes + * [bug] was still using `constructor.name` in `throw` assertion + * [bug] flag Object.create(null) instead of new Object + * [test] browser build + * [refactor] all usage of Assertion.prototype.assert now uses template tags and flags + * [refactor] remove Assertion.prototype.inspect for testable object inspection + * [refactor] object to test is now stored in flag, with ssfi and custom message + * [bug] flag util - don't return on `set` + * [docs] comments for getMessage utility + * [feature] getMessage + * [feature] testing utilities + * [refactor] flag doesn't require `call` + * Make order of source files well-defined + * Added support for throw(errorInstance). + * Use a foolproof method of grabbing an error's name. + * Removed constructor.name check from throw. + * disabled stackTrack configuration tests until api is stable again + * first version of line displayed error for node js (unstable) + * refactor core Assertion to use flag utility for negation + * added flag utility + * tests for assert interface negatives. Closed #42 + * added assertion negatives that were missing. #42 + * Support for expected and actual parameters in assert-style error object + * chai as promised - readme + * Added assert.fail. Closes #40 + * better error message for assert.operator. Closes #39 + * [refactor] Assertion#property to use getPathValue property + * added getPathValue utility helper + * removed todo about browser build + * version notes + * version bumb 0.6.0 + * browser build + * [refactor] browser compile function to replace with `require('./error')' with 'require('./browser/error')' + * [feature] browser uses different error.js + * [refactor] error without chai.fail + * Assertion & interfaces use new utils helper export + * [refactor] primary export for new plugin util usage + * added util index.js helper + * added 2012 to copyright headers + * Added DeepEqual assertions + +0.5.3 / 2012-04-21 +================== + + * Merge branch 'refs/heads/jgonera-oldbrowsers' + * browser build + * fixed reserved names for old browsers in interface/assert + * fixed reserved names for old browsers in interface/should + * fixed: chai.js no longer contains fail() + * fixed reserved names for old browsers in Assertion + * Merge pull request #49 from joliss/build-order + * Make order of source files well-defined + * Merge pull request #43 from zzen/patch-1 + * Support for expected and actual parameters in assert-style error object + * chai as promised - readme + +0.5.2 / 2012-03-21 +================== + + * browser build + * Merge branch 'feature/assert-fail' + * Added assert.fail. Closes #40 + * Merge branch 'bug/operator-msg' + * better error message for assert.operator. Closes #39 + * version notes + +0.5.1 / 2012-03-14 +================== + + * chai.fail no longer exists + * Merge branch 'feature/assertdefined' + * Added asset#isDefined. Closes #37. + * dev docs update for Assertion#assert + +0.5.0 / 2012-03-07 +================== + + * [bug] on inspect of reg on n 0.4.12 + * Merge branch 'bug/33-throws' + * Merge pull request #35 from logicalparadox/empty-object + * browser build + * updated #throw docs + * Assertion#throw `should` tests updated + * Assertion#throw `expect` tests + * Should interface supports multiple throw parameters + * Update Assertion#throw to support strings and type checks. + * Add more tests for `empty` in `should`. + * Add more tests for `empty` in `expect`. + * Merge branch 'master' into empty-object + * don't switch act/exp + * Merge pull request #34 from logicalparadox/assert-operator + * Update the compiled verison. + * Add `assert.operator`. + * Notes on messages. #22 + * browser build + * have been test + * below tests + * Merge branch 'feature/actexp' + * browser build + * remove unnecessary fail export + * full support for actual/expected where relevant + * Assertion.assert support expected value + * clean up error + * Update the compiled version. + * Add object & sane arguments support to `Assertion#empty`. + +0.4.2 / 2012-02-28 +================== + + * fix for `process` not available in browser when used via browserify. Closes #28 + * Merge pull request #31 from joliss/doc + * Document that "should" works in browsers other than IE + * Merge pull request #30 from logicalparadox/assert-tests + * Update the browser version of chai. + * Update `assert.doesNotThrow` test in order to check the use case when type is a string. + * Add test for `assert.ifError`. + * Falsey -> falsy. + * Full coverage for `assert.throws` and `assert.doesNotThrow`. + * Add test for `assert.doesNotThrow`. + * Add test for `assert.throws`. + * Add test for `assert.length`. + * Add test for `assert.include`. + * Add test for `assert.isBoolean`. + * Fix the implementation of `assert.isNumber`. + * Add test for `assert.isNumber`. + * Add test for `assert.isString`. + * Add test for `assert.isArray`. + * Add test for `assert.isUndefined`. + * Add test for `assert.isNotNull`. + * Fix `assert.isNotNull` implementation. + * Fix `assert.isNull` implementation. + * Add test for `assert.isNull`. + * Add test for `assert.notDeepEqual`. + * Add test for `assert.deepEqual`. + * Add test for `assert.notStrictEqual`. + * Add test for `assert.strictEqual`. + * Add test for `assert.notEqual`. + +0.4.1 / 2012-02-26 +================== + + * Merge pull request #27 from logicalparadox/type-fix + * Update the browser version. + * Add should tests for type checks. + * Add function type check test. + * Add more type checks tests. + * Add test for `new Number` type check. + * Fix type of actual checks. + +0.4.0 / 2012-02-25 +================== + + * docs and readme for upcoming 0.4.0 + * docs generated + * putting coverage and tests for docs in docs/out/support + * make docs + * makefile copy necessary resources for tests in docs + * rename configuration test + * Merge pull request #21 from logicalparadox/close-to + * Update the browser version. + * Update `closeTo()` docs. + * Add `Assertion.closeTo()` method. + * Add `.closeTo()` should test. + * Add `.closeTo()` expect test. + * Merge pull request #20 from logicalparadox/satisfy + * Update the browser version. + * `..` -> `()` in `.satisfy()` should test. + * Update example for `.satisfy()`. + * Update the compiled browser version. + * Add `Assertion.satisfy()` method. + * Add `.satisfy()` should test. + * Add `.satisfy()` expect test. + * Merge pull request #19 from logicalparadox/respond-to + * Update the compiled browser version. + * Add `respondTo` Assertion. + * Add `respondTo` should test. + * Add `respondTo` expect test. + * Merge branch 'feature/coverage' + * mocha coverage support + * doc contributors + * README contributors + +0.3.4 / 2012-02-23 +================== + + * inline comment typos for #15 + * Merge branch 'refs/heads/jeffbski-configErrorStackCompat' + * includeStack documentation for all interfaces + * suite name more generic + * Update test to be compatible with browsers that do not support err.stack + * udpated compiled chai.js and added to browser tests + * Allow inclusion of stack trace for Assert error messages to be configurable + * docs sharing buttons + * sinon-chai link + * doc updates + * read me updates include plugins + +0.3.3 / 2012-02-12 +================== + + * Merge pull request #14 from jfirebaugh/configurable_properties + * Make Assertion.prototype properties configurable + +0.3.2 / 2012-02-10 +================== + + * codex version + * docs + * docs cleanup + +0.3.1 / 2012-02-07 +================== + + * node 0.4.x compat + +0.3.0 / 2012-02-07 +================== + + * Merge branch 'feature/03x' + * browser build + * remove html/json/headers testign + * regex error.message testing + * tests for using plugins + * Merge pull request #11 from domenic/master + * Make `chai.use` a no-op if the function has already been used. + +0.2.4 / 2012-02-02 +================== + + * added in past tense switch for `been` + +0.2.3 / 2012-02-01 +================== + + * try that again + +0.2.2 / 2012-02-01 +================== + + * added `been` (past of `be`) alias + +0.2.1 / 2012-01-29 +================== + + * added Throw, with a capital T, as an alias to `throw` (#7) + +0.2.0 / 2012-01-26 +================== + + * update gitignore for vim *.swp + * Merge branch 'feature/plugins' + * browser build + * interfaces now work with use + * simple .use function. See #9. + * readme notice on browser compat + +0.1.7 / 2012-01-25 +================== + + * added assert tests to browser test runner + * browser update + * `should` interface patch for primitives support in FF + * fix isObject() Thanks @milewise + * travis only on branch `master` + * add instanceof alias `instanceOf`. #6 + * some tests for assert module + +0.1.6 / 2012-01-02 +================== + + * commenting for assert interface + * updated codex dep + +0.1.5 / 2012-01-02 +================== + + * browser tests pass + * type in should.not.equal + * test for should (not) exist + * added should.exist and should.not.exist + * browser uses tdd + * convert tests to tdd + +0.1.4 / 2011-12-26 +================== + + * browser lib update for new assert interface compatiblitiy + * inspect typos + * added strict equal + negatives and ifError + * interface assert had doesNotThrow + * added should tests to browser + * new expect empty tests + * should test browser compat + * Fix typo for instanceof docs. Closes #3 [ci skip] + +0.1.3 / 2011-12-18 +================== + + * much cleaner reporting string on error. + +0.1.2 / 2011-12-18 +================== + + * [docs] for upcoming 0.1.2 + * browser version built with pre/suffix … all tests passing + * make / compile now use prefix/suffix correctly + * code clean + * prefix/suffix to wrap browser output to prevent conflicts with other `require` methods. + * Merge branch 'feature/should4xcompatibility' + * compile for browser tests.. all pass + * added header/status/html/json + * throw tests + * should.throw & should.not.throw shortcuts + * improved `throw` type detection and messaging + * contain is now `include` … keys modifier is now `contain` + * removed object() test + * removed #respondTo + * Merge branch 'bug/2' + * replaced __defineGetter__ with defineProperty for all uses + * [docs] change mp tracking code + * docs site updated with assert (TDD) interface + * updated doc comments for assert interface + +0.1.1 / 2011-12-16 +================== + + * docs ready for upcoming 0.1.1 + * readme image fixed [ci skip] + * more readme tweaks [ci skip] + * réadmet image fixed [ci skip] + * documentation + * codex locked in version 0.0.5 + * more comments to assertions for docs + * assertions fully commented, browser library updated + * adding codex as doc dependancy + * prepping for docs + * assertion component completely commented for documentation + * added exist test + * var expect outside of browser if check + * added keywords to package.json + +0.1.0 / 2011-12-15 +================== + + * failing on purpose successful .. back to normal + * testing travis failure + * assert#arguments getter + * readme typo + * updated README + * added travis and npmignore + * copyright notices … think i got them all + * moved expect interface to own file for consistency + * assert ui deepEqual + * browser tests expect (all working) + * browser version built + * chai.fail (should ui) + * expect tests browser compatible + * tests for should and expect (all pass) + * moved fail to primary export + * should compatibility testing + * within, greaterThan, object, keys, + * Aliases + * Assertion#property now correctly works with negate and undefined values + * error message language matches should + * Assertion#respondTo + * Assertion now uses inspect util + * git ignore node modules + * should is exported + * AssertionError __proto__ from Error.prototype + * add should interface for should.js compatibility + * moved eql to until folder and added inspect from (joyent/node) + * added mocha for testing + * browser build for current api + * multiple .property assertions + * added deep equal from node + +0.0.2 / 2011-12-07 +================== + + * cleaner output on error + * improved exists detection + * package remnant artifact + * empty deep equal + * test browser build + * assertion cleanup + * client compile script + * makefile + * most of the basic assertions + * allow no parameters to assertion error + * name change + * assertion error instance + * main exports: assert() & expect() + * initialize diff --git a/node_modules/chai/LICENSE b/node_modules/chai/LICENSE new file mode 100644 index 00000000..eedbe238 --- /dev/null +++ b/node_modules/chai/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Chai.js Assertion Library + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/chai/README.md b/node_modules/chai/README.md new file mode 100644 index 00000000..86806688 --- /dev/null +++ b/node_modules/chai/README.md @@ -0,0 +1,212 @@ +

+ + ChaiJS + +
+ chai +

+ +

+ Chai is a BDD / TDD assertion library for node and the browser that can be delightfully paired with any javascript testing framework. +

+ +

+ + license:mit + + + tag:? + + + node:? + +
+ + Selenium Test Status + +
+ + downloads:? + + + build:? + + + coverage:? + + + devDependencies:? + +
+ + Join the Slack chat + + + Join the Gitter chat + + + OpenCollective Backers + +

+ +For more information or to download plugins, view the [documentation](http://chaijs.com). + +## What is Chai? + +Chai is an _assertion library_, similar to Node's built-in `assert`. It makes testing much easier by giving you lots of assertions you can run against your code. + +## Installation + +### Node.js + +`chai` is available on [npm](http://npmjs.org). To install it, type: + + $ npm install chai + +### Browsers + +You can also use it within the browser; install via npm and use the `chai.js` file found within the download. For example: + +```html + +``` + +## Usage + +Import the library in your code, and then pick one of the styles you'd like to use - either `assert`, `expect` or `should`: + +```js +var chai = require('chai'); +var assert = chai.assert; // Using Assert style +var expect = chai.expect; // Using Expect style +var should = chai.should(); // Using Should style +``` + +### Pre-Native Modules Usage (_registers the chai testing style globally_) + +```js +require('chai/register-assert'); // Using Assert style +require('chai/register-expect'); // Using Expect style +require('chai/register-should'); // Using Should style +``` + +### Pre-Native Modules Usage (_as local variables_) + +```js +const { assert } = require('chai'); // Using Assert style +const { expect } = require('chai'); // Using Expect style +const { should } = require('chai'); // Using Should style +should(); // Modifies `Object.prototype` + +const { expect, use } = require('chai'); // Creates local variables `expect` and `use`; useful for plugin use +``` + +### Native Modules Usage (_registers the chai testing style globally_) + +```js +import 'chai/register-assert'; // Using Assert style +import 'chai/register-expect'; // Using Expect style +import 'chai/register-should'; // Using Should style +``` + +### Native Modules Usage (_local import only_) + +```js +import { assert } from 'chai'; // Using Assert style +import { expect } from 'chai'; // Using Expect style +import { should } from 'chai'; // Using Should style +should(); // Modifies `Object.prototype` +``` + +### Usage with Mocha + +```bash +mocha spec.js -r chai/register-assert # Using Assert style +mocha spec.js -r chai/register-expect # Using Expect style +mocha spec.js -r chai/register-should # Using Should style +``` + +[Read more about these styles in our docs](http://chaijs.com/guide/styles/). + +## Plugins + +Chai offers a robust Plugin architecture for extending Chai's assertions and interfaces. + +- Need a plugin? View the [official plugin list](http://chaijs.com/plugins). +- Want to build a plugin? Read the [plugin api documentation](http://chaijs.com/guide/plugins/). +- Have a plugin and want it listed? Simply add the following keywords to your package.json: + - `chai-plugin` + - `browser` if your plugin works in the browser as well as Node.js + - `browser-only` if your plugin does not work with Node.js + +### Related Projects + +- [chaijs / chai-docs](https://github.com/chaijs/chai-docs): The chaijs.com website source code. +- [chaijs / assertion-error](https://github.com/chaijs/assertion-error): Custom `Error` constructor thrown upon an assertion failing. +- [chaijs / deep-eql](https://github.com/chaijs/deep-eql): Improved deep equality testing for Node.js and the browser. +- [chaijs / type-detect](https://github.com/chaijs/type-detect): Improved typeof detection for Node.js and the browser. +- [chaijs / check-error](https://github.com/chaijs/check-error): Error comparison and information related utility for Node.js and the browser. +- [chaijs / loupe](https://github.com/chaijs/loupe): Inspect utility for Node.js and browsers. +- [chaijs / pathval](https://github.com/chaijs/pathval): Object value retrieval given a string path. +- [chaijs / get-func-name](https://github.com/chaijs/get-func-name): Utility for getting a function's name for node and the browser. + +### Contributing + +Thank you very much for considering to contribute! + +Please make sure you follow our [Code Of Conduct](https://github.com/chaijs/chai/blob/master/CODE_OF_CONDUCT.md) and we also strongly recommend reading our [Contributing Guide](https://github.com/chaijs/chai/blob/master/CONTRIBUTING.md). + +Here are a few issues other contributors frequently ran into when opening pull requests: + +- Please do not commit changes to the `chai.js` build. We do it once per release. +- Before pushing your commits, please make sure you [rebase](https://github.com/chaijs/chai/blob/master/CONTRIBUTING.md#pull-requests) them. + +### Contributors + +Please see the full +[Contributors Graph](https://github.com/chaijs/chai/graphs/contributors) for our +list of contributors. + +### Core Contributors + +Feel free to reach out to any of the core contributors with your questions or +concerns. We will do our best to respond in a timely manner. + +[![Jake Luer](https://avatars3.githubusercontent.com/u/58988?v=3&s=50)](https://github.com/logicalparadox) +[![Veselin Todorov](https://avatars3.githubusercontent.com/u/330048?v=3&s=50)](https://github.com/vesln) +[![Keith Cirkel](https://avatars3.githubusercontent.com/u/118266?v=3&s=50)](https://github.com/keithamus) +[![Lucas Fernandes da Costa](https://avatars3.githubusercontent.com/u/6868147?v=3&s=50)](https://github.com/lucasfcosta) +[![Grant Snodgrass](https://avatars3.githubusercontent.com/u/17260989?v=3&s=50)](https://github.com/meeber) diff --git a/node_modules/chai/ReleaseNotes.md b/node_modules/chai/ReleaseNotes.md new file mode 100644 index 00000000..2a80d5ce --- /dev/null +++ b/node_modules/chai/ReleaseNotes.md @@ -0,0 +1,737 @@ +# Release Notes + +## Note + +As of 3.0.0, the ReleaseNotes.md file has been deprecated. [Please refer to the release notes available on Github](https://github.com/chaijs/chai/releases). Or +[the release notes on the chaijs.com website](https://chaijs.com/releases). + +--- + +## 2.3.0 / 2015-04-26 + +Added `ownPropertyDescriptor` assertion: + +```js +expect('test').to.have.ownPropertyDescriptor('length'); +expect('test').to.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 4 }); +expect('test').not.to.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 3 }); +expect('test').ownPropertyDescriptor('length').to.have.property('enumerable', false); +expect('test').ownPropertyDescriptor('length').to.have.keys('value'); +``` + +### Community Contributions + +#### Code Features & Fixes + + * [#408](https://github.com/chaijs/chai/pull/408) Add `ownPropertyDescriptor` + assertion. + By [@ljharb](https://github.com/ljharb) + * [#422](https://github.com/chaijs/chai/pull/422) Improve ownPropertyDescriptor + tests. + By [@ljharb](https://github.com/ljharb) + +#### Documentation fixes + + * [#417](https://github.com/chaijs/chai/pull/417) Fix documentation typo + By [@astorije](https://github.com/astorije) + * [#423](https://github.com/chaijs/chai/pull/423) Fix inconsistency in docs. + By [@ehntoo](https://github.com/ehntoo) + + +## 2.2.0 / 2015-03-26 + +Deep property strings can now be escaped using `\\` - for example: + +```js +var deepCss = { '.link': { '[target]': 42 }}; +expect(deepCss).to.have.deep.property('\\.link.\\[target\\]', 42) +``` + +### Community Contributions + +#### Code Features & Fixes + + * [#402](https://github.com/chaijs/chai/pull/402) Allow escaping of deep + property keys. + By [@umireon](https://github.com/umireon) + +#### Documentation fixes + + * [#405](https://github.com/chaijs/chai/pull/405) Tweak documentation around + deep property escaping. + By [@keithamus](https://github.com/keithamus) + + +## 2.1.2 / 2015-03-15 + +A minor bug fix. No new features. + +### Community Contributions + +#### Code Features & Fixes + + * [#395](https://github.com/chaijs/chai/pull/395) Fix eval-related bugs with + assert.operator ([#386](https://github.com/chaijs/chai/pull/386)). + By [@cjqed](https://github.com/cjqed) + +## 2.1.1 / 2015-03-04 + +Two minor bugfixes. No new features. + +### Community Contributions + +#### Code Features & Fixes + + * [#385](https://github.com/chaijs/chai/pull/385) Fix a bug (also described in + [#387](https://github.com/chaijs/chai/pull/385)) where `deep.property` would not work with single + key names. By [@eldritch-fossicker](https://github.com/eldritch-fossicker) + * [#379](https://github.com/chaijs/chai/pull/379) Fix bug where tools which overwrite + primitive prototypes, such as Babel or core-js would fail. + By [@dcneiner](https://github.com/dcneiner) + +#### Documentation fixes + + * [#382](https://github.com/chaijs/chai/pull/382) Add doc for showDiff argument in assert. + By [@astorije](https://github.com/astorije) + * [#383](https://github.com/chaijs/chai/pull/383) Improve wording for truncateTreshold docs + By [@gurdiga](https://github.com/gurdiga) + * [#381](https://github.com/chaijs/chai/pull/381) Improve wording for assert.empty docs + By [@astorije](https://github.com/astorije) + +## 2.1.0 / 2015-02-23 + +Small release; fixes an issue where the Chai lib was incorrectly reporting the +version number. + +Adds new `should.fail()` and `expect.fail()` methods, which are convinience +methods to throw Assertion Errors. + +### Community Contributions + +#### Code Features & Fixes + + * [#356](https://github.com/chaijs/chai/pull/356) Add should.fail(), expect.fail(). By [@Soviut](https://github.com/Soviut) + * [#374](https://github.com/chaijs/chai/pull/374) Increment version. By [@jmm](https://github.com/jmm) + +## 2.0.0 / 2015-02-09 + +Unfortunately with 1.10.0 - compatibility broke with older versions because of +the `addChainableNoop`. This change has been reverted. + +Any plugins using `addChainableNoop` should cease to do so. + +Any developers wishing for this behaviour can use [dirty-chai](https://www.npmjs.com/package/dirty-chai) +by [@joshperry](https://github.com/joshperry) + +### Community Contributions + +#### Code Features & Fixes + + * [#361](https://github.com/chaijs/chai/pull/361) `.keys()` now accepts Objects, extracting keys from them. By [@gregglind](https://github.com/gregglind) + * [#359](https://github.com/chaijs/chai/pull/359) `.keys()` no longer mutates passed arrays. By [@gregglind](https://github.com/gregglind) + * [#349](https://github.com/chaijs/chai/pull/349) Add a new chainable keyword - `.which`. By [@toastynerd](https://github.com/toastynerd) + * [#333](https://github.com/chaijs/chai/pull/333) Add `.change`, `.increase` and `.decrease` assertions. By [@cmpolis](https://github.com/cmpolis) + * [#335](https://github.com/chaijs/chai/pull/335) `chai.util` is now exposed [@DingoEatingFuzz](https://github.com/DingoEatingFuzz) + * [#328](https://github.com/chaijs/chai/pull/328) Add `.includes` and `.contains` aliases (for `.include` and `.contain`). By [@lo1tuma](https://github.com/lo1tuma) + * [#313](https://github.com/chaijs/chai/pull/313) Add `.any.keys()` and `.all.keys()` qualifiers. By [@cjqed](https://github.com/cjqed) + * [#312](https://github.com/chaijs/chai/pull/312) Add `assert.sameDeepMembers()`. By [@cjqed](https://github.com/cjqed) + * [#311](https://github.com/chaijs/chai/pull/311) Add `assert.isAbove()` and `assert.isBelow()`. By [@cjqed](https://github.com/cjqed) + * [#308](https://github.com/chaijs/chai/pull/308) `property` and `deep.property` now pass if a value is set to `undefined`. By [@prodatakey](https://github.com/prodatakey) + * [#309](https://github.com/chaijs/chai/pull/309) optimize deep equal in Arrays. By [@ericdouglas](https://github.com/ericdouglas) + * [#306](https://github.com/chaijs/chai/pull/306) revert #297 - allowing lint-friendly tests. By [@keithamus](https://github.com/keithamus) + +#### Documentation fixes + + * [#357](https://github.com/chaijs/chai/pull/357) Copyright year updated in docs. By [@danilovaz](https://github.com/danilovaz) + * [#325](https://github.com/chaijs/chai/pull/325) Fix documentation for overwriteChainableMethod. By [@chasenlehara](https://github.com/chasenlehara) + * [#334](https://github.com/chaijs/chai/pull/334) Typo fix. By [@hurrymaplelad](https://github.com/hurrymaplelad) + * [#317](https://github.com/chaijs/chai/pull/317) Typo fix. By [@jasonkarns](https://github.com/jasonkarns) + * [#318](https://github.com/chaijs/chai/pull/318) Typo fix. By [@jasonkarns](https://github.com/jasonkarns) + * [#316](https://github.com/chaijs/chai/pull/316) Typo fix. By [@jasonkarns](https://github.com/jasonkarns) + + +## 1.10.0 / 2014-11-10 + +The following changes are required if you are upgrading from the previous version: + +- **Users:** + - No changes required +- **Plugin Developers:** + - Review `addChainableNoop` notes below. +- **Core Contributors:** + - Refresh `node_modules` folder for updated dependencies. + +### Noop Function for Terminating Assertion Properties + +The following assertions can now also be used in the function-call form: + +* ok +* true +* false +* null +* undefined +* exist +* empty +* arguments +* Arguments + +The above list of assertions are property getters that assert immediately on +access. Because of that, they were written to be used by terminating the assertion +chain with a property access. + +```js +expect(true).to.be.true; +foo.should.be.ok; +``` + +This syntax is definitely aesthetically pleasing but, if you are linting your +test code, your linter will complain with an error something like "Expected an +assignment or function call and instead saw an expression." Since the linter +doesn't know about the property getter it assumes this line has no side-effects, +and throws a warning in case you made a mistake. + +Squelching these errors is not a good solution as test code is getting to be +just as important as, if not more than, production code. Catching syntactical +errors in tests using static analysis is a great tool to help make sure that your +tests are well-defined and free of typos. + +A better option was to provide a function-call form for these assertions so that +the code's intent is more clear and the linters stop complaining about something +looking off. This form is added in addition to the existing property access form +and does not impact existing test code. + +```js +expect(true).to.be.true(); +foo.should.be.ok(); +``` + +These forms can also be mixed in any way, these are all functionally identical: + +```js +expect(true).to.be.true.and.not.false(); +expect(true).to.be.true().and.not.false; +expect(true).to.be.true.and.not.false; +``` + +#### Plugin Authors + +If you would like to provide this function-call form for your terminating assertion +properties, there is a new function to register these types of asserts. Instead +of using `addProperty` to register terminating assertions, simply use `addChainableNoop` +instead; the arguments to both are identical. The latter will make the assertion +available in both the attribute and function-call forms and should have no impact +on existing users of your plugin. + +### Community Contributions + +- [#297](https://github.com/chaijs/chai/pull/297) Allow writing lint-friendly tests. [@joshperry](https://github.com/joshperry) +- [#298](https://github.com/chaijs/chai/pull/298) Add check for logging `-0`. [@dasilvacontin](https://github.com/dasilvacontin) +- [#300](https://github.com/chaijs/chai/pull/300) Fix #299: the test is defining global variables [@julienw](https://github.com/julienw) + +Thank you to all who took time to contribute! + +## 1.9.2 / 2014-09-29 + +The following changes are required if you are upgrading from the previous version: + +- **Users:** + - No changes required +- **Plugin Developers:** + - No changes required +- **Core Contributors:** + - Refresh `node_modules` folder for updated dependencies. + +### Community Contributions + +- [#264](https://github.com/chaijs/chai/pull/264) Show diff for keys assertions [@cjthompson](https://github.com/cjthompson) +- [#267](https://github.com/chaijs/chai/pull/267) Use SVG badges [@shinnn](https://github.com/shinnn) +- [#268](https://github.com/chaijs/chai/pull/268) Allow messages to be functions (sinon-compat) [@charlierudolph](https://github.com/charlierudolph) +- [#269](https://github.com/chaijs/chai/pull/269) Remove unused argument for #lengthOf [@charlierudolph](https://github.com/charlierudolph) +- [#275](https://github.com/chaijs/chai/pull/275) Rewrite pretty-printing HTML elements to prevent throwing internal errors [@DrRataplan](https://github.com/DrRataplan) +- [#277](https://github.com/chaijs/chai/pull/277) Fix assert documentation for #sameMembers [@charlierudolph](https://github.com/charlierudolph) +- [#279](https://github.com/chaijs/chai/pull/279) closeTo should check value's type before assertion [@mohayonao](https://github.com/mohayonao) +- [#289](https://github.com/chaijs/chai/pull/289) satisfy is called twice [@charlierudolph](https://github.com/charlierudolph) +- [#292](https://github.com/chaijs/chai/pull/292) resolve conflicts with node-webkit and global usage [@boneskull](https://github.com/boneskull) + +Thank you to all who took time to contribute! + +## 1.9.1 / 2014-03-19 + +The following changes are required if you are upgrading from the previous version: + +- **Users:** + - Migrate configuration options to new interface. (see notes) +- **Plugin Developers:** + - No changes required +- **Core Contributors:** + - Refresh `node_modules` folder for updated dependencies. + +### Configuration + +There have been requests for changes and additions to the configuration mechanisms +and their impact in the Chai architecture. As such, we have decoupled the +configuration from the `Assertion` constructor. This not only allows for centralized +configuration, but will allow us to shift the responsibility from the `Assertion` +constructor to the `assert` interface in future releases. + +These changes have been implemented in a non-breaking way, but a depretiation +warning will be presented to users until they migrate. The old config method will +be removed in either `v1.11.0` or `v2.0.0`, whichever comes first. + +#### Quick Migration + +```js +// change this: +chai.Assertion.includeStack = true; +chai.Assertion.showDiff = false; + +// ... to this: +chai.config.includeStack = true; +chai.config.showDiff = false; +``` + +#### All Config Options + +##### config.includeStack + +- **@param** _{Boolean}_ +- **@default** `false` + +User configurable property, influences whether stack trace is included in +Assertion error message. Default of `false` suppresses stack trace in the error +message. + +##### config.showDiff + +- **@param** _{Boolean}_ +- **@default** `true` + +User configurable property, influences whether or not the `showDiff` flag +should be included in the thrown AssertionErrors. `false` will always be `false`; +`true` will be true when the assertion has requested a diff be shown. + +##### config.truncateThreshold **(NEW)** + +- **@param** _{Number}_ +- **@default** `40` + +User configurable property, sets length threshold for actual and expected values +in assertion errors. If this threshold is exceeded, the value is truncated. + +Set it to zero if you want to disable truncating altogether. + +```js +chai.config.truncateThreshold = 0; // disable truncating +``` + +### Community Contributions + +- [#228](https://github.com/chaijs/chai/pull/228) Deep equality check for memebers. [@duncanbeevers](https://github.com/duncanbeevers) +- [#247](https://github.com/chaijs/chai/pull/247) Proofreading. [@didorellano](https://github.com/didoarellano) +- [#244](https://github.com/chaijs/chai/pull/244) Fix `contain`/`include` 1.9.0 regression. [@leider](https://github.com/leider) +- [#233](https://github.com/chaijs/chai/pull/233) Improvements to `ssfi` for `assert` interface. [@refack](https://github.com/refack) +- [#251](https://github.com/chaijs/chai/pull/251) New config option: object display threshold. [@romario333](https://github.com/romario333) + +Thank you to all who took time to contribute! + +### Other Bug Fixes + +- [#183](https://github.com/chaijs/chai/issues/183) Allow `undefined` for actual. (internal api) +- Update Karam(+plugins)/Istanbul to most recent versions. + +## 1.9.0 / 2014-01-29 + +The following changes are required if you are upgrading from the previous version: + +- **Users:** + - No changes required +- **Plugin Developers:** + - Review [#219](https://github.com/chaijs/chai/pull/219). +- **Core Contributors:** + - Refresh `node_modules` folder for updated dependencies. + +### Community Contributions + +- [#202](https://github.com/chaijs/chai/pull/201) Improve error message for .throw(). [@andreineculau](https://github.com/andreineculau) +- [#217](https://github.com/chaijs/chai/pull/217) Chai tests can be run with `--watch`. [@demands](https://github.com/demands) +- [#219](https://github.com/chaijs/chai/pull/219) Add overwriteChainableMethod utility. [@demands](https://github.com/demands) +- [#224](https://github.com/chaijs/chai/pull/224) Return error on throw method to chain on error properties. [@vbardales](https://github.com/vbardales) +- [#226](https://github.com/chaijs/chai/pull/226) Add `has` to language chains. [@duncanbeevers](https://github.com/duncanbeevers) +- [#230](https://github.com/chaijs/chai/pull/230) Support `{a:1,b:2}.should.include({a:1})` [@jkroso](https://github.com/jkroso) +- [#231](https://github.com/chaijs/chai/pull/231) Update Copyright notices to 2014 [@duncanbeevers](https://github.com/duncanbeevers) +- [#232](https://github.com/chaijs/chai/pull/232) Avoid error instantiation if possible on assert.throws. [@laconbass](https://github.com/laconbass) + +Thank you to all who took time to contribute! + +### Other Bug Fixes + +- [#225](https://github.com/chaijs/chai/pull/225) Improved AMD wrapper provided by upstream `component(1)`. +- [#185](https://github.com/chaijs/chai/issues/185) `assert.throws()` returns thrown error for further assertions. +- [#237](https://github.com/chaijs/chai/pull/237) Remove coveralls/jscoverage, include istanbul coverage report in travis test. +- Update Karma and Sauce runner versions for consistent CI results. No more karma@canary. + +## 1.8.1 / 2013-10-10 + +The following changes are required if you are upgrading from the previous version: + +- **Users:** + - Refresh `node_modules` folder for updated dependencies. +- **Plugin Developers:** + - No changes required +- **Core Contributors:** + - Refresh `node_modules` folder for updated dependencies. + +### Browserify + +This is a small patch that updates the dependency tree so browserify users can install +chai. (Remove conditional requires) + +## 1.8.0 / 2013-09-18 + +The following changes are required if you are upgrading from the previous version: + +- **Users:** + - See `deep.equal` notes. +- **Plugin Developers:** + - No changes required +- **Core Contributors:** + - Refresh `node_modules` folder for updated dependencies. + +### Deep Equals + +This version of Chai focused on a overhaul to the deep equal utility. The code for this +tool has been removed from the core lib and can now be found at: +[chai / deep-eql](https://github.com/chaijs/deep-eql). As stated in previous releases, +this is part of a larger initiative to provide transparency, independent testing, and coverage for +some of the more complicated internal tools. + +For the most part `.deep.equal` will behave the same as it has. However, in order to provide a +consistent ruleset across all types being tested, the following changes have been made and _might_ +require changes to your tests. + +**1.** Strict equality for non-traversable nodes according to [egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). + +_Previously:_ Non-traversable equal via `===`. + +```js +expect(NaN).to.deep.equal(NaN); +expect(-0).to.not.deep.equal(+0); +``` + +**2.** Arguments are not Arrays (and all types must be equal): + +_Previously:_ Some crazy nonsense that led to empty arrays deep equaling empty objects deep equaling dates. + +```js +expect(arguments).to.not.deep.equal([]); +expect(Array.prototype.slice.call(arguments)).to.deep.equal([]); +``` + +- [#156](https://github.com/chaijs/chai/issues/156) Empty object is eql to empty array +- [#192](https://github.com/chaijs/chai/issues/192) empty object is eql to a Date object +- [#194](https://github.com/chaijs/chai/issues/194) refactor deep-equal utility + +### CI and Browser Testing + +Chai now runs the browser CI suite using [Karma](http://karma-runner.github.io/) directed at +[SauceLabs](https://saucelabs.com/). This means we get to know where our browser support stands... +and we get a cool badge: + +[![Selenium Test Status](https://saucelabs.com/browser-matrix/logicalparadox.svg)](https://saucelabs.com/u/logicalparadox) + +Look for the list of browsers/versions to expand over the coming releases. + +- [#195](https://github.com/chaijs/chai/issues/195) karma test framework + +## 1.7.2 / 2013-06-27 + +The following changes are required if you are upgrading from the previous version: + +- **Users:** + - No changes required. +- **Plugin Developers:** + - No changes required +- **Core Contributors:** + - Refresh `node_modules` folder for updated dependencies. + +### Coverage Reporting + +Coverage reporting has always been available for core-developers but the data has never been published +for our end users. In our ongoing effort to improve accountability this data will now be published via +the [coveralls.io](https://coveralls.io/) service. A badge has been added to the README and the full report +can be viewed online at the [chai coveralls project](https://coveralls.io/r/chaijs/chai). Furthermore, PRs +will receive automated messages indicating how their PR impacts test coverage. This service is tied to TravisCI. + +### Other Fixes + +- [#175](https://github.com/chaijs/chai/issues/175) Add `bower.json`. (Fix ignore all) + +## 1.7.1 / 2013-06-24 + +The following changes are required if you are upgrading from the previous version: + +- **Users:** + - No changes required. +- **Plugin Developers:** + - No changes required +- **Core Contributors:** + - Refresh `node_modules` folder for updated dependencies. + +### Official Bower Support + +Support has been added for the Bower Package Manager ([bower.io])(http://bower.io/). Though +Chai could be installed via Bower in the past, this update adds official support via the `bower.json` +specification file. + +- [#175](https://github.com/chaijs/chai/issues/175) Add `bower.json`. + +## 1.7.0 / 2013-06-17 + +The following changes are required if you are upgrading from the previous version: + +- **Users:** + - No changes required. +- **Plugin Developers:** + - Review AssertionError update notice. +- **Core Contributors:** + - Refresh `node_modules` folder for updated dependencies. + +### AssertionError Update Notice + +Chai now uses [chaijs/assertion-error](https://github.com/chaijs/assertion-error) instead an internal +constructor. This will allow for further iteration/experimentation of the AssertionError constructor +independant of Chai. Future plans include stack parsing for callsite support. + +This update constructor has a different constructor param signature that conforms more with the standard +`Error` object. If your plugin throws and `AssertionError` directly you will need to update your plugin +with the new signature. + +```js +var AssertionError = require('chai').AssertionError; + +/** + * previous + * + * @param {Object} options + */ + +throw new AssertionError({ + message: 'An assertion error occurred' + , actual: actual + , expect: expect + , startStackFunction: arguments.callee + , showStack: true +}); + +/** + * new + * + * @param {String} message + * @param {Object} options + * @param {Function} start stack function + */ + +throw new AssertionError('An assertion error occurred', { + actual: actual + , expect: expect + , showStack: true +}, arguments.callee); + +// other signatures +throw new AssertionError('An assertion error occurred'); +throw new AssertionError('An assertion error occurred', null, arguments.callee); +``` + +#### External Dependencies + +This is the first non-developement dependency for Chai. As Chai continues to evolve we will begin adding +more; the next will likely be improved type detection and deep equality. With Chai's userbase continually growing +there is an higher need for accountability and documentation. External dependencies will allow us to iterate and +test on features independent from our interfaces. + +Note: The browser packaged version `chai.js` will ALWAYS contain all dependencies needed to run Chai. + +### Community Contributions + +- [#169](https://github.com/chaijs/chai/pull/169) Fix deep equal comparison for Date/Regexp types. [@katsgeorgeek](https://github.com/katsgeorgeek) +- [#171](https://github.com/chaijs/chai/pull/171) Add `assert.notOk()`. [@Bartvds](https://github.com/Bartvds) +- [#173](https://github.com/chaijs/chai/pull/173) Fix `inspect` utility. [@domenic](https://github.com/domenic) + +Thank you to all who took the time to contribute! + +## 1.6.1 / 2013-06-05 + +The following changes are required if you are upgrading from the previous version: + +- **Users:** + - No changes required. +- **Plugin Developers:** + - No changes required. +- **Core Contributors:** + - Refresh `node_modules` folder for updated developement dependencies. + +### Deep Equality + +Regular Expressions are now tested as part of all deep equality assertions. In previous versions +they silently passed for all scenarios. Thanks to [@katsgeorgeek](https://github.com/katsgeorgeek) for the contribution. + +### Community Contributions + +- [#161](https://github.com/chaijs/chai/pull/161) Fix documented name for assert interface's isDefined method. [@brandonpayton](https://github.com/brandonpayton) +- [#168](https://github.com/chaijs/chai/pull/168) Fix comparison equality of two regexps for when using deep equality. [@katsgeorgeek](https://github.com/katsgeorgeek) + +Thank you to all who took the time to contribute! + +### Additional Notes + +- Mocha has been locked at version `1.8.x` to ensure `mocha-phantomjs` compatibility. + +## 1.6.0 / 2013-04-29 + +The following changes are required if you are upgrading from the previous version: + +- **Users:** + - No changes required. +- **Plugin Developers:** + - No changes required. +- **Core Contributors:** + - Refresh `node_modules` folder for updated developement dependencies. + +### New Assertions + +#### Array Members Inclusion + +Asserts that the target is a superset of `set`, or that the target and `set` have the same members. +Order is not taken into account. Thanks to [@NickHeiner](https://github.com/NickHeiner) for the contribution. + +```js +// (expect/should) full set +expect([4, 2]).to.have.members([2, 4]); +expect([5, 2]).to.not.have.members([5, 2, 1]); + +// (expect/should) inclusion +expect([1, 2, 3]).to.include.members([3, 2]); +expect([1, 2, 3]).to.not.include.members([3, 2, 8]); + +// (assert) full set +assert.sameMembers([ 1, 2, 3 ], [ 2, 1, 3 ], 'same members'); + +// (assert) inclusion +assert.includeMembers([ 1, 2, 3 ], [ 2, 1 ], 'include members'); + +``` + +#### Non-inclusion for Assert Interface + +Most `assert` functions have a negative version, like `instanceOf()` has a corresponding `notInstaceOf()`. +However `include()` did not have a corresponding `notInclude()`. This has been added. + +```js +assert.notInclude([ 1, 2, 3 ], 8); +assert.notInclude('foobar', 'baz'); +``` + +### Community Contributions + +- [#140](https://github.com/chaijs/chai/pull/140) Restore `call`/`apply` methods for plugin interface. [@RubenVerborgh](https://github.com/RubenVerborgh) +- [#148](https://github.com/chaijs/chai/issues/148)/[#153](https://github.com/chaijs/chai/pull/153) Add `members` and `include.members` assertions. [#NickHeiner](https://github.com/NickHeiner) + +Thank you to all who took time to contribute! + +### Other Bug Fixes + +- [#142](https://github.com/chaijs/chai/issues/142) `assert#include` will no longer silently pass on wrong-type haystack. +- [#158](https://github.com/chaijs/chai/issues/158) `assert#notInclude` has been added. +- Travis-CI now tests Node.js `v0.10.x`. Support for `v0.6.x` has been removed. `v0.8.x` is still tested as before. + +## 1.5.0 / 2013-02-03 + +### Migration Requirements + +The following changes are required if you are upgrading from the previous version: + +- **Users:** + - _Update [2013-02-04]:_ Some users may notice a small subset of deep equality assertions will no longer pass. This is the result of + [#120](https://github.com/chaijs/chai/issues/120), an improvement to our deep equality algorithm. Users will need to revise their assertions + to be more granular should this occur. Further information: [#139](https://github.com/chaijs/chai/issues/139). +- **Plugin Developers:** + - No changes required. +- **Core Contributors:** + - Refresh `node_modules` folder for updated developement dependencies. + +### Community Contributions + +- [#126](https://github.com/chaijs/chai/pull/126): Add `eqls` alias for `eql`. [@RubenVerborgh](https://github.com/RubenVerborgh) +- [#127](https://github.com/chaijs/chai/issues/127): Performance refactor for chainable methods. [@RubenVerborgh](https://github.com/RubenVerborgh) +- [#133](https://github.com/chaijs/chai/pull/133): Assertion `.throw` support for primitives. [@RubenVerborgh](https://github.com/RubenVerborgh) +- [#137](https://github.com/chaijs/chai/issues/137): Assertion `.throw` support for empty messages. [@timnew](https://github.com/timnew) +- [#136](https://github.com/chaijs/chai/pull/136): Fix backward negation messages when using `.above()` and `.below()`. [@whatthejeff](https://github.com/whatthejeff) + +Thank you to all who took time to contribute! + +### Other Bug Fixes + +- Improve type detection of `.a()`/`.an()` to work in cross-browser scenarios. +- [#116](https://github.com/chaijs/chai/issues/116): `.throw()` has cleaner display of errors when WebKit browsers. +- [#120](https://github.com/chaijs/chai/issues/120): `.eql()` now works to compare dom nodes in browsers. + + +### Usage Updates + +#### For Users + +**1. Component Support:** Chai now included the proper configuration to be installed as a +[component](https://github.com/component/component). Component users are encouraged to consult +[chaijs.com](http://chaijs.com) for the latest version number as using the master branch +does not gaurantee stability. + +```js +// relevant component.json + devDependencies: { + "chaijs/chai": "1.5.0" + } +``` + +Alternatively, bleeding-edge is available: + + $ component install chaijs/chai + +**2. Configurable showDiff:** Some test runners (such as [mocha](http://visionmedia.github.com/mocha/)) +include support for showing the diff of strings and objects when an equality error occurs. Chai has +already included support for this, however some users may not prefer this display behavior. To revert to +no diff display, the following configuration is available: + +```js +chai.Assertion.showDiff = false; // diff output disabled +chai.Assertion.showDiff = true; // default, diff output enabled +``` + +#### For Plugin Developers + +**1. New Utility - type**: The new utility `.type()` is available as a better implementation of `typeof` +that can be used cross-browser. It handles the inconsistencies of Array, `null`, and `undefined` detection. + +- **@param** _{Mixed}_ object to detect type of +- **@return** _{String}_ object type + +```js +chai.use(function (c, utils) { + // some examples + utils.type({}); // 'object' + utils.type(null); // `null' + utils.type(undefined); // `undefined` + utils.type([]); // `array` +}); +``` + +#### For Core Contributors + +**1. Browser Testing**: Browser testing of the `./chai.js` file is now available in the command line +via PhantomJS. `make test` and Travis-CI will now also rebuild and test `./chai.js`. Consequently, all +pull requests will now be browser tested in this way. + +_Note: Contributors opening pull requests should still NOT include the browser build._ + +**2. SauceLabs Testing**: Early SauceLab support has been enabled with the file `./support/mocha-cloud.js`. +Those interested in trying it out should create a free [Open Sauce](https://saucelabs.com/signup/plan) account +and include their credentials in `./test/auth/sauce.json`. diff --git a/node_modules/chai/bower.json b/node_modules/chai/bower.json new file mode 100644 index 00000000..af2ee029 --- /dev/null +++ b/node_modules/chai/bower.json @@ -0,0 +1,26 @@ +{ + "name": "chai", + "description": "BDD/TDD assertion library for node.js and the browser. Test framework agnostic.", + "license": "MIT", + "keywords": [ + "test", + "assertion", + "assert", + "testing", + "chai" + ], + "main": "chai.js", + "ignore": [ + "build", + "components", + "lib", + "node_modules", + "support", + "test", + "index.js", + "Makefile", + ".*" + ], + "dependencies": {}, + "devDependencies": {} +} diff --git a/node_modules/chai/chai.js b/node_modules/chai/chai.js new file mode 100644 index 00000000..39429c51 --- /dev/null +++ b/node_modules/chai/chai.js @@ -0,0 +1,10854 @@ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.chai = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i + * MIT Licensed + */ + +var used = []; + +/*! + * Chai version + */ + +exports.version = '4.2.0'; + +/*! + * Assertion Error + */ + +exports.AssertionError = require('assertion-error'); + +/*! + * Utils for plugins (not exported) + */ + +var util = require('./chai/utils'); + +/** + * # .use(function) + * + * Provides a way to extend the internals of Chai. + * + * @param {Function} + * @returns {this} for chaining + * @api public + */ + +exports.use = function (fn) { + if (!~used.indexOf(fn)) { + fn(exports, util); + used.push(fn); + } + + return exports; +}; + +/*! + * Utility Functions + */ + +exports.util = util; + +/*! + * Configuration + */ + +var config = require('./chai/config'); +exports.config = config; + +/*! + * Primary `Assertion` prototype + */ + +var assertion = require('./chai/assertion'); +exports.use(assertion); + +/*! + * Core Assertions + */ + +var core = require('./chai/core/assertions'); +exports.use(core); + +/*! + * Expect interface + */ + +var expect = require('./chai/interface/expect'); +exports.use(expect); + +/*! + * Should interface + */ + +var should = require('./chai/interface/should'); +exports.use(should); + +/*! + * Assert interface + */ + +var assert = require('./chai/interface/assert'); +exports.use(assert); + +},{"./chai/assertion":3,"./chai/config":4,"./chai/core/assertions":5,"./chai/interface/assert":6,"./chai/interface/expect":7,"./chai/interface/should":8,"./chai/utils":22,"assertion-error":33}],3:[function(require,module,exports){ +/*! + * chai + * http://chaijs.com + * Copyright(c) 2011-2014 Jake Luer + * MIT Licensed + */ + +var config = require('./config'); + +module.exports = function (_chai, util) { + /*! + * Module dependencies. + */ + + var AssertionError = _chai.AssertionError + , flag = util.flag; + + /*! + * Module export. + */ + + _chai.Assertion = Assertion; + + /*! + * Assertion Constructor + * + * Creates object for chaining. + * + * `Assertion` objects contain metadata in the form of flags. Three flags can + * be assigned during instantiation by passing arguments to this constructor: + * + * - `object`: This flag contains the target of the assertion. For example, in + * the assertion `expect(numKittens).to.equal(7);`, the `object` flag will + * contain `numKittens` so that the `equal` assertion can reference it when + * needed. + * + * - `message`: This flag contains an optional custom error message to be + * prepended to the error message that's generated by the assertion when it + * fails. + * + * - `ssfi`: This flag stands for "start stack function indicator". It + * contains a function reference that serves as the starting point for + * removing frames from the stack trace of the error that's created by the + * assertion when it fails. The goal is to provide a cleaner stack trace to + * end users by removing Chai's internal functions. Note that it only works + * in environments that support `Error.captureStackTrace`, and only when + * `Chai.config.includeStack` hasn't been set to `false`. + * + * - `lockSsfi`: This flag controls whether or not the given `ssfi` flag + * should retain its current value, even as assertions are chained off of + * this object. This is usually set to `true` when creating a new assertion + * from within another assertion. It's also temporarily set to `true` before + * an overwritten assertion gets called by the overwriting assertion. + * + * @param {Mixed} obj target of the assertion + * @param {String} msg (optional) custom error message + * @param {Function} ssfi (optional) starting point for removing stack frames + * @param {Boolean} lockSsfi (optional) whether or not the ssfi flag is locked + * @api private + */ + + function Assertion (obj, msg, ssfi, lockSsfi) { + flag(this, 'ssfi', ssfi || Assertion); + flag(this, 'lockSsfi', lockSsfi); + flag(this, 'object', obj); + flag(this, 'message', msg); + + return util.proxify(this); + } + + Object.defineProperty(Assertion, 'includeStack', { + get: function() { + console.warn('Assertion.includeStack is deprecated, use chai.config.includeStack instead.'); + return config.includeStack; + }, + set: function(value) { + console.warn('Assertion.includeStack is deprecated, use chai.config.includeStack instead.'); + config.includeStack = value; + } + }); + + Object.defineProperty(Assertion, 'showDiff', { + get: function() { + console.warn('Assertion.showDiff is deprecated, use chai.config.showDiff instead.'); + return config.showDiff; + }, + set: function(value) { + console.warn('Assertion.showDiff is deprecated, use chai.config.showDiff instead.'); + config.showDiff = value; + } + }); + + Assertion.addProperty = function (name, fn) { + util.addProperty(this.prototype, name, fn); + }; + + Assertion.addMethod = function (name, fn) { + util.addMethod(this.prototype, name, fn); + }; + + Assertion.addChainableMethod = function (name, fn, chainingBehavior) { + util.addChainableMethod(this.prototype, name, fn, chainingBehavior); + }; + + Assertion.overwriteProperty = function (name, fn) { + util.overwriteProperty(this.prototype, name, fn); + }; + + Assertion.overwriteMethod = function (name, fn) { + util.overwriteMethod(this.prototype, name, fn); + }; + + Assertion.overwriteChainableMethod = function (name, fn, chainingBehavior) { + util.overwriteChainableMethod(this.prototype, name, fn, chainingBehavior); + }; + + /** + * ### .assert(expression, message, negateMessage, expected, actual, showDiff) + * + * Executes an expression and check expectations. Throws AssertionError for reporting if test doesn't pass. + * + * @name assert + * @param {Philosophical} expression to be tested + * @param {String|Function} message or function that returns message to display if expression fails + * @param {String|Function} negatedMessage or function that returns negatedMessage to display if negated expression fails + * @param {Mixed} expected value (remember to check for negation) + * @param {Mixed} actual (optional) will default to `this.obj` + * @param {Boolean} showDiff (optional) when set to `true`, assert will display a diff in addition to the message if expression fails + * @api private + */ + + Assertion.prototype.assert = function (expr, msg, negateMsg, expected, _actual, showDiff) { + var ok = util.test(this, arguments); + if (false !== showDiff) showDiff = true; + if (undefined === expected && undefined === _actual) showDiff = false; + if (true !== config.showDiff) showDiff = false; + + if (!ok) { + msg = util.getMessage(this, arguments); + var actual = util.getActual(this, arguments); + throw new AssertionError(msg, { + actual: actual + , expected: expected + , showDiff: showDiff + }, (config.includeStack) ? this.assert : flag(this, 'ssfi')); + } + }; + + /*! + * ### ._obj + * + * Quick reference to stored `actual` value for plugin developers. + * + * @api private + */ + + Object.defineProperty(Assertion.prototype, '_obj', + { get: function () { + return flag(this, 'object'); + } + , set: function (val) { + flag(this, 'object', val); + } + }); +}; + +},{"./config":4}],4:[function(require,module,exports){ +module.exports = { + + /** + * ### config.includeStack + * + * User configurable property, influences whether stack trace + * is included in Assertion error message. Default of false + * suppresses stack trace in the error message. + * + * chai.config.includeStack = true; // enable stack on error + * + * @param {Boolean} + * @api public + */ + + includeStack: false, + + /** + * ### config.showDiff + * + * User configurable property, influences whether or not + * the `showDiff` flag should be included in the thrown + * AssertionErrors. `false` will always be `false`; `true` + * will be true when the assertion has requested a diff + * be shown. + * + * @param {Boolean} + * @api public + */ + + showDiff: true, + + /** + * ### config.truncateThreshold + * + * User configurable property, sets length threshold for actual and + * expected values in assertion errors. If this threshold is exceeded, for + * example for large data structures, the value is replaced with something + * like `[ Array(3) ]` or `{ Object (prop1, prop2) }`. + * + * Set it to zero if you want to disable truncating altogether. + * + * This is especially userful when doing assertions on arrays: having this + * set to a reasonable large value makes the failure messages readily + * inspectable. + * + * chai.config.truncateThreshold = 0; // disable truncating + * + * @param {Number} + * @api public + */ + + truncateThreshold: 40, + + /** + * ### config.useProxy + * + * User configurable property, defines if chai will use a Proxy to throw + * an error when a non-existent property is read, which protects users + * from typos when using property-based assertions. + * + * Set it to false if you want to disable this feature. + * + * chai.config.useProxy = false; // disable use of Proxy + * + * This feature is automatically disabled regardless of this config value + * in environments that don't support proxies. + * + * @param {Boolean} + * @api public + */ + + useProxy: true, + + /** + * ### config.proxyExcludedKeys + * + * User configurable property, defines which properties should be ignored + * instead of throwing an error if they do not exist on the assertion. + * This is only applied if the environment Chai is running in supports proxies and + * if the `useProxy` configuration setting is enabled. + * By default, `then` and `inspect` will not throw an error if they do not exist on the + * assertion object because the `.inspect` property is read by `util.inspect` (for example, when + * using `console.log` on the assertion object) and `.then` is necessary for promise type-checking. + * + * // By default these keys will not throw an error if they do not exist on the assertion object + * chai.config.proxyExcludedKeys = ['then', 'inspect']; + * + * @param {Array} + * @api public + */ + + proxyExcludedKeys: ['then', 'catch', 'inspect', 'toJSON'] +}; + +},{}],5:[function(require,module,exports){ +/*! + * chai + * http://chaijs.com + * Copyright(c) 2011-2014 Jake Luer + * MIT Licensed + */ + +module.exports = function (chai, _) { + var Assertion = chai.Assertion + , AssertionError = chai.AssertionError + , flag = _.flag; + + /** + * ### Language Chains + * + * The following are provided as chainable getters to improve the readability + * of your assertions. + * + * **Chains** + * + * - to + * - be + * - been + * - is + * - that + * - which + * - and + * - has + * - have + * - with + * - at + * - of + * - same + * - but + * - does + * - still + * + * @name language chains + * @namespace BDD + * @api public + */ + + [ 'to', 'be', 'been', 'is' + , 'and', 'has', 'have', 'with' + , 'that', 'which', 'at', 'of' + , 'same', 'but', 'does', 'still' ].forEach(function (chain) { + Assertion.addProperty(chain); + }); + + /** + * ### .not + * + * Negates all assertions that follow in the chain. + * + * expect(function () {}).to.not.throw(); + * expect({a: 1}).to.not.have.property('b'); + * expect([1, 2]).to.be.an('array').that.does.not.include(3); + * + * Just because you can negate any assertion with `.not` doesn't mean you + * should. With great power comes great responsibility. It's often best to + * assert that the one expected output was produced, rather than asserting + * that one of countless unexpected outputs wasn't produced. See individual + * assertions for specific guidance. + * + * expect(2).to.equal(2); // Recommended + * expect(2).to.not.equal(1); // Not recommended + * + * @name not + * @namespace BDD + * @api public + */ + + Assertion.addProperty('not', function () { + flag(this, 'negate', true); + }); + + /** + * ### .deep + * + * Causes all `.equal`, `.include`, `.members`, `.keys`, and `.property` + * assertions that follow in the chain to use deep equality instead of strict + * (`===`) equality. See the `deep-eql` project page for info on the deep + * equality algorithm: https://github.com/chaijs/deep-eql. + * + * // Target object deeply (but not strictly) equals `{a: 1}` + * expect({a: 1}).to.deep.equal({a: 1}); + * expect({a: 1}).to.not.equal({a: 1}); + * + * // Target array deeply (but not strictly) includes `{a: 1}` + * expect([{a: 1}]).to.deep.include({a: 1}); + * expect([{a: 1}]).to.not.include({a: 1}); + * + * // Target object deeply (but not strictly) includes `x: {a: 1}` + * expect({x: {a: 1}}).to.deep.include({x: {a: 1}}); + * expect({x: {a: 1}}).to.not.include({x: {a: 1}}); + * + * // Target array deeply (but not strictly) has member `{a: 1}` + * expect([{a: 1}]).to.have.deep.members([{a: 1}]); + * expect([{a: 1}]).to.not.have.members([{a: 1}]); + * + * // Target set deeply (but not strictly) has key `{a: 1}` + * expect(new Set([{a: 1}])).to.have.deep.keys([{a: 1}]); + * expect(new Set([{a: 1}])).to.not.have.keys([{a: 1}]); + * + * // Target object deeply (but not strictly) has property `x: {a: 1}` + * expect({x: {a: 1}}).to.have.deep.property('x', {a: 1}); + * expect({x: {a: 1}}).to.not.have.property('x', {a: 1}); + * + * @name deep + * @namespace BDD + * @api public + */ + + Assertion.addProperty('deep', function () { + flag(this, 'deep', true); + }); + + /** + * ### .nested + * + * Enables dot- and bracket-notation in all `.property` and `.include` + * assertions that follow in the chain. + * + * expect({a: {b: ['x', 'y']}}).to.have.nested.property('a.b[1]'); + * expect({a: {b: ['x', 'y']}}).to.nested.include({'a.b[1]': 'y'}); + * + * If `.` or `[]` are part of an actual property name, they can be escaped by + * adding two backslashes before them. + * + * expect({'.a': {'[b]': 'x'}}).to.have.nested.property('\\.a.\\[b\\]'); + * expect({'.a': {'[b]': 'x'}}).to.nested.include({'\\.a.\\[b\\]': 'x'}); + * + * `.nested` cannot be combined with `.own`. + * + * @name nested + * @namespace BDD + * @api public + */ + + Assertion.addProperty('nested', function () { + flag(this, 'nested', true); + }); + + /** + * ### .own + * + * Causes all `.property` and `.include` assertions that follow in the chain + * to ignore inherited properties. + * + * Object.prototype.b = 2; + * + * expect({a: 1}).to.have.own.property('a'); + * expect({a: 1}).to.have.property('b'); + * expect({a: 1}).to.not.have.own.property('b'); + * + * expect({a: 1}).to.own.include({a: 1}); + * expect({a: 1}).to.include({b: 2}).but.not.own.include({b: 2}); + * + * `.own` cannot be combined with `.nested`. + * + * @name own + * @namespace BDD + * @api public + */ + + Assertion.addProperty('own', function () { + flag(this, 'own', true); + }); + + /** + * ### .ordered + * + * Causes all `.members` assertions that follow in the chain to require that + * members be in the same order. + * + * expect([1, 2]).to.have.ordered.members([1, 2]) + * .but.not.have.ordered.members([2, 1]); + * + * When `.include` and `.ordered` are combined, the ordering begins at the + * start of both arrays. + * + * expect([1, 2, 3]).to.include.ordered.members([1, 2]) + * .but.not.include.ordered.members([2, 3]); + * + * @name ordered + * @namespace BDD + * @api public + */ + + Assertion.addProperty('ordered', function () { + flag(this, 'ordered', true); + }); + + /** + * ### .any + * + * Causes all `.keys` assertions that follow in the chain to only require that + * the target have at least one of the given keys. This is the opposite of + * `.all`, which requires that the target have all of the given keys. + * + * expect({a: 1, b: 2}).to.not.have.any.keys('c', 'd'); + * + * See the `.keys` doc for guidance on when to use `.any` or `.all`. + * + * @name any + * @namespace BDD + * @api public + */ + + Assertion.addProperty('any', function () { + flag(this, 'any', true); + flag(this, 'all', false); + }); + + /** + * ### .all + * + * Causes all `.keys` assertions that follow in the chain to require that the + * target have all of the given keys. This is the opposite of `.any`, which + * only requires that the target have at least one of the given keys. + * + * expect({a: 1, b: 2}).to.have.all.keys('a', 'b'); + * + * Note that `.all` is used by default when neither `.all` nor `.any` are + * added earlier in the chain. However, it's often best to add `.all` anyway + * because it improves readability. + * + * See the `.keys` doc for guidance on when to use `.any` or `.all`. + * + * @name all + * @namespace BDD + * @api public + */ + + Assertion.addProperty('all', function () { + flag(this, 'all', true); + flag(this, 'any', false); + }); + + /** + * ### .a(type[, msg]) + * + * Asserts that the target's type is equal to the given string `type`. Types + * are case insensitive. See the `type-detect` project page for info on the + * type detection algorithm: https://github.com/chaijs/type-detect. + * + * expect('foo').to.be.a('string'); + * expect({a: 1}).to.be.an('object'); + * expect(null).to.be.a('null'); + * expect(undefined).to.be.an('undefined'); + * expect(new Error).to.be.an('error'); + * expect(Promise.resolve()).to.be.a('promise'); + * expect(new Float32Array).to.be.a('float32array'); + * expect(Symbol()).to.be.a('symbol'); + * + * `.a` supports objects that have a custom type set via `Symbol.toStringTag`. + * + * var myObj = { + * [Symbol.toStringTag]: 'myCustomType' + * }; + * + * expect(myObj).to.be.a('myCustomType').but.not.an('object'); + * + * It's often best to use `.a` to check a target's type before making more + * assertions on the same target. That way, you avoid unexpected behavior from + * any assertion that does different things based on the target's type. + * + * expect([1, 2, 3]).to.be.an('array').that.includes(2); + * expect([]).to.be.an('array').that.is.empty; + * + * Add `.not` earlier in the chain to negate `.a`. However, it's often best to + * assert that the target is the expected type, rather than asserting that it + * isn't one of many unexpected types. + * + * expect('foo').to.be.a('string'); // Recommended + * expect('foo').to.not.be.an('array'); // Not recommended + * + * `.a` accepts an optional `msg` argument which is a custom error message to + * show when the assertion fails. The message can also be given as the second + * argument to `expect`. + * + * expect(1).to.be.a('string', 'nooo why fail??'); + * expect(1, 'nooo why fail??').to.be.a('string'); + * + * `.a` can also be used as a language chain to improve the readability of + * your assertions. + * + * expect({b: 2}).to.have.a.property('b'); + * + * The alias `.an` can be used interchangeably with `.a`. + * + * @name a + * @alias an + * @param {String} type + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function an (type, msg) { + if (msg) flag(this, 'message', msg); + type = type.toLowerCase(); + var obj = flag(this, 'object') + , article = ~[ 'a', 'e', 'i', 'o', 'u' ].indexOf(type.charAt(0)) ? 'an ' : 'a '; + + this.assert( + type === _.type(obj).toLowerCase() + , 'expected #{this} to be ' + article + type + , 'expected #{this} not to be ' + article + type + ); + } + + Assertion.addChainableMethod('an', an); + Assertion.addChainableMethod('a', an); + + /** + * ### .include(val[, msg]) + * + * When the target is a string, `.include` asserts that the given string `val` + * is a substring of the target. + * + * expect('foobar').to.include('foo'); + * + * When the target is an array, `.include` asserts that the given `val` is a + * member of the target. + * + * expect([1, 2, 3]).to.include(2); + * + * When the target is an object, `.include` asserts that the given object + * `val`'s properties are a subset of the target's properties. + * + * expect({a: 1, b: 2, c: 3}).to.include({a: 1, b: 2}); + * + * When the target is a Set or WeakSet, `.include` asserts that the given `val` is a + * member of the target. SameValueZero equality algorithm is used. + * + * expect(new Set([1, 2])).to.include(2); + * + * When the target is a Map, `.include` asserts that the given `val` is one of + * the values of the target. SameValueZero equality algorithm is used. + * + * expect(new Map([['a', 1], ['b', 2]])).to.include(2); + * + * Because `.include` does different things based on the target's type, it's + * important to check the target's type before using `.include`. See the `.a` + * doc for info on testing a target's type. + * + * expect([1, 2, 3]).to.be.an('array').that.includes(2); + * + * By default, strict (`===`) equality is used to compare array members and + * object properties. Add `.deep` earlier in the chain to use deep equality + * instead (WeakSet targets are not supported). See the `deep-eql` project + * page for info on the deep equality algorithm: https://github.com/chaijs/deep-eql. + * + * // Target array deeply (but not strictly) includes `{a: 1}` + * expect([{a: 1}]).to.deep.include({a: 1}); + * expect([{a: 1}]).to.not.include({a: 1}); + * + * // Target object deeply (but not strictly) includes `x: {a: 1}` + * expect({x: {a: 1}}).to.deep.include({x: {a: 1}}); + * expect({x: {a: 1}}).to.not.include({x: {a: 1}}); + * + * By default, all of the target's properties are searched when working with + * objects. This includes properties that are inherited and/or non-enumerable. + * Add `.own` earlier in the chain to exclude the target's inherited + * properties from the search. + * + * Object.prototype.b = 2; + * + * expect({a: 1}).to.own.include({a: 1}); + * expect({a: 1}).to.include({b: 2}).but.not.own.include({b: 2}); + * + * Note that a target object is always only searched for `val`'s own + * enumerable properties. + * + * `.deep` and `.own` can be combined. + * + * expect({a: {b: 2}}).to.deep.own.include({a: {b: 2}}); + * + * Add `.nested` earlier in the chain to enable dot- and bracket-notation when + * referencing nested properties. + * + * expect({a: {b: ['x', 'y']}}).to.nested.include({'a.b[1]': 'y'}); + * + * If `.` or `[]` are part of an actual property name, they can be escaped by + * adding two backslashes before them. + * + * expect({'.a': {'[b]': 2}}).to.nested.include({'\\.a.\\[b\\]': 2}); + * + * `.deep` and `.nested` can be combined. + * + * expect({a: {b: [{c: 3}]}}).to.deep.nested.include({'a.b[0]': {c: 3}}); + * + * `.own` and `.nested` cannot be combined. + * + * Add `.not` earlier in the chain to negate `.include`. + * + * expect('foobar').to.not.include('taco'); + * expect([1, 2, 3]).to.not.include(4); + * + * However, it's dangerous to negate `.include` when the target is an object. + * The problem is that it creates uncertain expectations by asserting that the + * target object doesn't have all of `val`'s key/value pairs but may or may + * not have some of them. It's often best to identify the exact output that's + * expected, and then write an assertion that only accepts that exact output. + * + * When the target object isn't even expected to have `val`'s keys, it's + * often best to assert exactly that. + * + * expect({c: 3}).to.not.have.any.keys('a', 'b'); // Recommended + * expect({c: 3}).to.not.include({a: 1, b: 2}); // Not recommended + * + * When the target object is expected to have `val`'s keys, it's often best to + * assert that each of the properties has its expected value, rather than + * asserting that each property doesn't have one of many unexpected values. + * + * expect({a: 3, b: 4}).to.include({a: 3, b: 4}); // Recommended + * expect({a: 3, b: 4}).to.not.include({a: 1, b: 2}); // Not recommended + * + * `.include` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. + * + * expect([1, 2, 3]).to.include(4, 'nooo why fail??'); + * expect([1, 2, 3], 'nooo why fail??').to.include(4); + * + * `.include` can also be used as a language chain, causing all `.members` and + * `.keys` assertions that follow in the chain to require the target to be a + * superset of the expected set, rather than an identical set. Note that + * `.members` ignores duplicates in the subset when `.include` is added. + * + * // Target object's keys are a superset of ['a', 'b'] but not identical + * expect({a: 1, b: 2, c: 3}).to.include.all.keys('a', 'b'); + * expect({a: 1, b: 2, c: 3}).to.not.have.all.keys('a', 'b'); + * + * // Target array is a superset of [1, 2] but not identical + * expect([1, 2, 3]).to.include.members([1, 2]); + * expect([1, 2, 3]).to.not.have.members([1, 2]); + * + * // Duplicates in the subset are ignored + * expect([1, 2, 3]).to.include.members([1, 2, 2, 2]); + * + * Note that adding `.any` earlier in the chain causes the `.keys` assertion + * to ignore `.include`. + * + * // Both assertions are identical + * expect({a: 1}).to.include.any.keys('a', 'b'); + * expect({a: 1}).to.have.any.keys('a', 'b'); + * + * The aliases `.includes`, `.contain`, and `.contains` can be used + * interchangeably with `.include`. + * + * @name include + * @alias contain + * @alias includes + * @alias contains + * @param {Mixed} val + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function SameValueZero(a, b) { + return (_.isNaN(a) && _.isNaN(b)) || a === b; + } + + function includeChainingBehavior () { + flag(this, 'contains', true); + } + + function include (val, msg) { + if (msg) flag(this, 'message', msg); + + var obj = flag(this, 'object') + , objType = _.type(obj).toLowerCase() + , flagMsg = flag(this, 'message') + , negate = flag(this, 'negate') + , ssfi = flag(this, 'ssfi') + , isDeep = flag(this, 'deep') + , descriptor = isDeep ? 'deep ' : ''; + + flagMsg = flagMsg ? flagMsg + ': ' : ''; + + var included = false; + + switch (objType) { + case 'string': + included = obj.indexOf(val) !== -1; + break; + + case 'weakset': + if (isDeep) { + throw new AssertionError( + flagMsg + 'unable to use .deep.include with WeakSet', + undefined, + ssfi + ); + } + + included = obj.has(val); + break; + + case 'map': + var isEql = isDeep ? _.eql : SameValueZero; + obj.forEach(function (item) { + included = included || isEql(item, val); + }); + break; + + case 'set': + if (isDeep) { + obj.forEach(function (item) { + included = included || _.eql(item, val); + }); + } else { + included = obj.has(val); + } + break; + + case 'array': + if (isDeep) { + included = obj.some(function (item) { + return _.eql(item, val); + }) + } else { + included = obj.indexOf(val) !== -1; + } + break; + + default: + // This block is for asserting a subset of properties in an object. + // `_.expectTypes` isn't used here because `.include` should work with + // objects with a custom `@@toStringTag`. + if (val !== Object(val)) { + throw new AssertionError( + flagMsg + 'object tested must be an array, a map, an object,' + + ' a set, a string, or a weakset, but ' + objType + ' given', + undefined, + ssfi + ); + } + + var props = Object.keys(val) + , firstErr = null + , numErrs = 0; + + props.forEach(function (prop) { + var propAssertion = new Assertion(obj); + _.transferFlags(this, propAssertion, true); + flag(propAssertion, 'lockSsfi', true); + + if (!negate || props.length === 1) { + propAssertion.property(prop, val[prop]); + return; + } + + try { + propAssertion.property(prop, val[prop]); + } catch (err) { + if (!_.checkError.compatibleConstructor(err, AssertionError)) { + throw err; + } + if (firstErr === null) firstErr = err; + numErrs++; + } + }, this); + + // When validating .not.include with multiple properties, we only want + // to throw an assertion error if all of the properties are included, + // in which case we throw the first property assertion error that we + // encountered. + if (negate && props.length > 1 && numErrs === props.length) { + throw firstErr; + } + return; + } + + // Assert inclusion in collection or substring in a string. + this.assert( + included + , 'expected #{this} to ' + descriptor + 'include ' + _.inspect(val) + , 'expected #{this} to not ' + descriptor + 'include ' + _.inspect(val)); + } + + Assertion.addChainableMethod('include', include, includeChainingBehavior); + Assertion.addChainableMethod('contain', include, includeChainingBehavior); + Assertion.addChainableMethod('contains', include, includeChainingBehavior); + Assertion.addChainableMethod('includes', include, includeChainingBehavior); + + /** + * ### .ok + * + * Asserts that the target is a truthy value (considered `true` in boolean context). + * However, it's often best to assert that the target is strictly (`===`) or + * deeply equal to its expected value. + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.be.ok; // Not recommended + * + * expect(true).to.be.true; // Recommended + * expect(true).to.be.ok; // Not recommended + * + * Add `.not` earlier in the chain to negate `.ok`. + * + * expect(0).to.equal(0); // Recommended + * expect(0).to.not.be.ok; // Not recommended + * + * expect(false).to.be.false; // Recommended + * expect(false).to.not.be.ok; // Not recommended + * + * expect(null).to.be.null; // Recommended + * expect(null).to.not.be.ok; // Not recommended + * + * expect(undefined).to.be.undefined; // Recommended + * expect(undefined).to.not.be.ok; // Not recommended + * + * A custom error message can be given as the second argument to `expect`. + * + * expect(false, 'nooo why fail??').to.be.ok; + * + * @name ok + * @namespace BDD + * @api public + */ + + Assertion.addProperty('ok', function () { + this.assert( + flag(this, 'object') + , 'expected #{this} to be truthy' + , 'expected #{this} to be falsy'); + }); + + /** + * ### .true + * + * Asserts that the target is strictly (`===`) equal to `true`. + * + * expect(true).to.be.true; + * + * Add `.not` earlier in the chain to negate `.true`. However, it's often best + * to assert that the target is equal to its expected value, rather than not + * equal to `true`. + * + * expect(false).to.be.false; // Recommended + * expect(false).to.not.be.true; // Not recommended + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.not.be.true; // Not recommended + * + * A custom error message can be given as the second argument to `expect`. + * + * expect(false, 'nooo why fail??').to.be.true; + * + * @name true + * @namespace BDD + * @api public + */ + + Assertion.addProperty('true', function () { + this.assert( + true === flag(this, 'object') + , 'expected #{this} to be true' + , 'expected #{this} to be false' + , flag(this, 'negate') ? false : true + ); + }); + + /** + * ### .false + * + * Asserts that the target is strictly (`===`) equal to `false`. + * + * expect(false).to.be.false; + * + * Add `.not` earlier in the chain to negate `.false`. However, it's often + * best to assert that the target is equal to its expected value, rather than + * not equal to `false`. + * + * expect(true).to.be.true; // Recommended + * expect(true).to.not.be.false; // Not recommended + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.not.be.false; // Not recommended + * + * A custom error message can be given as the second argument to `expect`. + * + * expect(true, 'nooo why fail??').to.be.false; + * + * @name false + * @namespace BDD + * @api public + */ + + Assertion.addProperty('false', function () { + this.assert( + false === flag(this, 'object') + , 'expected #{this} to be false' + , 'expected #{this} to be true' + , flag(this, 'negate') ? true : false + ); + }); + + /** + * ### .null + * + * Asserts that the target is strictly (`===`) equal to `null`. + * + * expect(null).to.be.null; + * + * Add `.not` earlier in the chain to negate `.null`. However, it's often best + * to assert that the target is equal to its expected value, rather than not + * equal to `null`. + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.not.be.null; // Not recommended + * + * A custom error message can be given as the second argument to `expect`. + * + * expect(42, 'nooo why fail??').to.be.null; + * + * @name null + * @namespace BDD + * @api public + */ + + Assertion.addProperty('null', function () { + this.assert( + null === flag(this, 'object') + , 'expected #{this} to be null' + , 'expected #{this} not to be null' + ); + }); + + /** + * ### .undefined + * + * Asserts that the target is strictly (`===`) equal to `undefined`. + * + * expect(undefined).to.be.undefined; + * + * Add `.not` earlier in the chain to negate `.undefined`. However, it's often + * best to assert that the target is equal to its expected value, rather than + * not equal to `undefined`. + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.not.be.undefined; // Not recommended + * + * A custom error message can be given as the second argument to `expect`. + * + * expect(42, 'nooo why fail??').to.be.undefined; + * + * @name undefined + * @namespace BDD + * @api public + */ + + Assertion.addProperty('undefined', function () { + this.assert( + undefined === flag(this, 'object') + , 'expected #{this} to be undefined' + , 'expected #{this} not to be undefined' + ); + }); + + /** + * ### .NaN + * + * Asserts that the target is exactly `NaN`. + * + * expect(NaN).to.be.NaN; + * + * Add `.not` earlier in the chain to negate `.NaN`. However, it's often best + * to assert that the target is equal to its expected value, rather than not + * equal to `NaN`. + * + * expect('foo').to.equal('foo'); // Recommended + * expect('foo').to.not.be.NaN; // Not recommended + * + * A custom error message can be given as the second argument to `expect`. + * + * expect(42, 'nooo why fail??').to.be.NaN; + * + * @name NaN + * @namespace BDD + * @api public + */ + + Assertion.addProperty('NaN', function () { + this.assert( + _.isNaN(flag(this, 'object')) + , 'expected #{this} to be NaN' + , 'expected #{this} not to be NaN' + ); + }); + + /** + * ### .exist + * + * Asserts that the target is not strictly (`===`) equal to either `null` or + * `undefined`. However, it's often best to assert that the target is equal to + * its expected value. + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.exist; // Not recommended + * + * expect(0).to.equal(0); // Recommended + * expect(0).to.exist; // Not recommended + * + * Add `.not` earlier in the chain to negate `.exist`. + * + * expect(null).to.be.null; // Recommended + * expect(null).to.not.exist; // Not recommended + * + * expect(undefined).to.be.undefined; // Recommended + * expect(undefined).to.not.exist; // Not recommended + * + * A custom error message can be given as the second argument to `expect`. + * + * expect(null, 'nooo why fail??').to.exist; + * + * @name exist + * @namespace BDD + * @api public + */ + + Assertion.addProperty('exist', function () { + var val = flag(this, 'object'); + this.assert( + val !== null && val !== undefined + , 'expected #{this} to exist' + , 'expected #{this} to not exist' + ); + }); + + /** + * ### .empty + * + * When the target is a string or array, `.empty` asserts that the target's + * `length` property is strictly (`===`) equal to `0`. + * + * expect([]).to.be.empty; + * expect('').to.be.empty; + * + * When the target is a map or set, `.empty` asserts that the target's `size` + * property is strictly equal to `0`. + * + * expect(new Set()).to.be.empty; + * expect(new Map()).to.be.empty; + * + * When the target is a non-function object, `.empty` asserts that the target + * doesn't have any own enumerable properties. Properties with Symbol-based + * keys are excluded from the count. + * + * expect({}).to.be.empty; + * + * Because `.empty` does different things based on the target's type, it's + * important to check the target's type before using `.empty`. See the `.a` + * doc for info on testing a target's type. + * + * expect([]).to.be.an('array').that.is.empty; + * + * Add `.not` earlier in the chain to negate `.empty`. However, it's often + * best to assert that the target contains its expected number of values, + * rather than asserting that it's not empty. + * + * expect([1, 2, 3]).to.have.lengthOf(3); // Recommended + * expect([1, 2, 3]).to.not.be.empty; // Not recommended + * + * expect(new Set([1, 2, 3])).to.have.property('size', 3); // Recommended + * expect(new Set([1, 2, 3])).to.not.be.empty; // Not recommended + * + * expect(Object.keys({a: 1})).to.have.lengthOf(1); // Recommended + * expect({a: 1}).to.not.be.empty; // Not recommended + * + * A custom error message can be given as the second argument to `expect`. + * + * expect([1, 2, 3], 'nooo why fail??').to.be.empty; + * + * @name empty + * @namespace BDD + * @api public + */ + + Assertion.addProperty('empty', function () { + var val = flag(this, 'object') + , ssfi = flag(this, 'ssfi') + , flagMsg = flag(this, 'message') + , itemsCount; + + flagMsg = flagMsg ? flagMsg + ': ' : ''; + + switch (_.type(val).toLowerCase()) { + case 'array': + case 'string': + itemsCount = val.length; + break; + case 'map': + case 'set': + itemsCount = val.size; + break; + case 'weakmap': + case 'weakset': + throw new AssertionError( + flagMsg + '.empty was passed a weak collection', + undefined, + ssfi + ); + case 'function': + var msg = flagMsg + '.empty was passed a function ' + _.getName(val); + throw new AssertionError(msg.trim(), undefined, ssfi); + default: + if (val !== Object(val)) { + throw new AssertionError( + flagMsg + '.empty was passed non-string primitive ' + _.inspect(val), + undefined, + ssfi + ); + } + itemsCount = Object.keys(val).length; + } + + this.assert( + 0 === itemsCount + , 'expected #{this} to be empty' + , 'expected #{this} not to be empty' + ); + }); + + /** + * ### .arguments + * + * Asserts that the target is an `arguments` object. + * + * function test () { + * expect(arguments).to.be.arguments; + * } + * + * test(); + * + * Add `.not` earlier in the chain to negate `.arguments`. However, it's often + * best to assert which type the target is expected to be, rather than + * asserting that its not an `arguments` object. + * + * expect('foo').to.be.a('string'); // Recommended + * expect('foo').to.not.be.arguments; // Not recommended + * + * A custom error message can be given as the second argument to `expect`. + * + * expect({}, 'nooo why fail??').to.be.arguments; + * + * The alias `.Arguments` can be used interchangeably with `.arguments`. + * + * @name arguments + * @alias Arguments + * @namespace BDD + * @api public + */ + + function checkArguments () { + var obj = flag(this, 'object') + , type = _.type(obj); + this.assert( + 'Arguments' === type + , 'expected #{this} to be arguments but got ' + type + , 'expected #{this} to not be arguments' + ); + } + + Assertion.addProperty('arguments', checkArguments); + Assertion.addProperty('Arguments', checkArguments); + + /** + * ### .equal(val[, msg]) + * + * Asserts that the target is strictly (`===`) equal to the given `val`. + * + * expect(1).to.equal(1); + * expect('foo').to.equal('foo'); + * + * Add `.deep` earlier in the chain to use deep equality instead. See the + * `deep-eql` project page for info on the deep equality algorithm: + * https://github.com/chaijs/deep-eql. + * + * // Target object deeply (but not strictly) equals `{a: 1}` + * expect({a: 1}).to.deep.equal({a: 1}); + * expect({a: 1}).to.not.equal({a: 1}); + * + * // Target array deeply (but not strictly) equals `[1, 2]` + * expect([1, 2]).to.deep.equal([1, 2]); + * expect([1, 2]).to.not.equal([1, 2]); + * + * Add `.not` earlier in the chain to negate `.equal`. However, it's often + * best to assert that the target is equal to its expected value, rather than + * not equal to one of countless unexpected values. + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.not.equal(2); // Not recommended + * + * `.equal` accepts an optional `msg` argument which is a custom error message + * to show when the assertion fails. The message can also be given as the + * second argument to `expect`. + * + * expect(1).to.equal(2, 'nooo why fail??'); + * expect(1, 'nooo why fail??').to.equal(2); + * + * The aliases `.equals` and `eq` can be used interchangeably with `.equal`. + * + * @name equal + * @alias equals + * @alias eq + * @param {Mixed} val + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertEqual (val, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object'); + if (flag(this, 'deep')) { + var prevLockSsfi = flag(this, 'lockSsfi'); + flag(this, 'lockSsfi', true); + this.eql(val); + flag(this, 'lockSsfi', prevLockSsfi); + } else { + this.assert( + val === obj + , 'expected #{this} to equal #{exp}' + , 'expected #{this} to not equal #{exp}' + , val + , this._obj + , true + ); + } + } + + Assertion.addMethod('equal', assertEqual); + Assertion.addMethod('equals', assertEqual); + Assertion.addMethod('eq', assertEqual); + + /** + * ### .eql(obj[, msg]) + * + * Asserts that the target is deeply equal to the given `obj`. See the + * `deep-eql` project page for info on the deep equality algorithm: + * https://github.com/chaijs/deep-eql. + * + * // Target object is deeply (but not strictly) equal to {a: 1} + * expect({a: 1}).to.eql({a: 1}).but.not.equal({a: 1}); + * + * // Target array is deeply (but not strictly) equal to [1, 2] + * expect([1, 2]).to.eql([1, 2]).but.not.equal([1, 2]); + * + * Add `.not` earlier in the chain to negate `.eql`. However, it's often best + * to assert that the target is deeply equal to its expected value, rather + * than not deeply equal to one of countless unexpected values. + * + * expect({a: 1}).to.eql({a: 1}); // Recommended + * expect({a: 1}).to.not.eql({b: 2}); // Not recommended + * + * `.eql` accepts an optional `msg` argument which is a custom error message + * to show when the assertion fails. The message can also be given as the + * second argument to `expect`. + * + * expect({a: 1}).to.eql({b: 2}, 'nooo why fail??'); + * expect({a: 1}, 'nooo why fail??').to.eql({b: 2}); + * + * The alias `.eqls` can be used interchangeably with `.eql`. + * + * The `.deep.equal` assertion is almost identical to `.eql` but with one + * difference: `.deep.equal` causes deep equality comparisons to also be used + * for any other assertions that follow in the chain. + * + * @name eql + * @alias eqls + * @param {Mixed} obj + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertEql(obj, msg) { + if (msg) flag(this, 'message', msg); + this.assert( + _.eql(obj, flag(this, 'object')) + , 'expected #{this} to deeply equal #{exp}' + , 'expected #{this} to not deeply equal #{exp}' + , obj + , this._obj + , true + ); + } + + Assertion.addMethod('eql', assertEql); + Assertion.addMethod('eqls', assertEql); + + /** + * ### .above(n[, msg]) + * + * Asserts that the target is a number or a date greater than the given number or date `n` respectively. + * However, it's often best to assert that the target is equal to its expected + * value. + * + * expect(2).to.equal(2); // Recommended + * expect(2).to.be.above(1); // Not recommended + * + * Add `.lengthOf` earlier in the chain to assert that the target's `length` + * or `size` is greater than the given number `n`. + * + * expect('foo').to.have.lengthOf(3); // Recommended + * expect('foo').to.have.lengthOf.above(2); // Not recommended + * + * expect([1, 2, 3]).to.have.lengthOf(3); // Recommended + * expect([1, 2, 3]).to.have.lengthOf.above(2); // Not recommended + * + * Add `.not` earlier in the chain to negate `.above`. + * + * expect(2).to.equal(2); // Recommended + * expect(1).to.not.be.above(2); // Not recommended + * + * `.above` accepts an optional `msg` argument which is a custom error message + * to show when the assertion fails. The message can also be given as the + * second argument to `expect`. + * + * expect(1).to.be.above(2, 'nooo why fail??'); + * expect(1, 'nooo why fail??').to.be.above(2); + * + * The aliases `.gt` and `.greaterThan` can be used interchangeably with + * `.above`. + * + * @name above + * @alias gt + * @alias greaterThan + * @param {Number} n + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertAbove (n, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , doLength = flag(this, 'doLength') + , flagMsg = flag(this, 'message') + , msgPrefix = ((flagMsg) ? flagMsg + ': ' : '') + , ssfi = flag(this, 'ssfi') + , objType = _.type(obj).toLowerCase() + , nType = _.type(n).toLowerCase() + , errorMessage + , shouldThrow = true; + + if (doLength && objType !== 'map' && objType !== 'set') { + new Assertion(obj, flagMsg, ssfi, true).to.have.property('length'); + } + + if (!doLength && (objType === 'date' && nType !== 'date')) { + errorMessage = msgPrefix + 'the argument to above must be a date'; + } else if (nType !== 'number' && (doLength || objType === 'number')) { + errorMessage = msgPrefix + 'the argument to above must be a number'; + } else if (!doLength && (objType !== 'date' && objType !== 'number')) { + var printObj = (objType === 'string') ? "'" + obj + "'" : obj; + errorMessage = msgPrefix + 'expected ' + printObj + ' to be a number or a date'; + } else { + shouldThrow = false; + } + + if (shouldThrow) { + throw new AssertionError(errorMessage, undefined, ssfi); + } + + if (doLength) { + var descriptor = 'length' + , itemsCount; + if (objType === 'map' || objType === 'set') { + descriptor = 'size'; + itemsCount = obj.size; + } else { + itemsCount = obj.length; + } + this.assert( + itemsCount > n + , 'expected #{this} to have a ' + descriptor + ' above #{exp} but got #{act}' + , 'expected #{this} to not have a ' + descriptor + ' above #{exp}' + , n + , itemsCount + ); + } else { + this.assert( + obj > n + , 'expected #{this} to be above #{exp}' + , 'expected #{this} to be at most #{exp}' + , n + ); + } + } + + Assertion.addMethod('above', assertAbove); + Assertion.addMethod('gt', assertAbove); + Assertion.addMethod('greaterThan', assertAbove); + + /** + * ### .least(n[, msg]) + * + * Asserts that the target is a number or a date greater than or equal to the given + * number or date `n` respectively. However, it's often best to assert that the target is equal to + * its expected value. + * + * expect(2).to.equal(2); // Recommended + * expect(2).to.be.at.least(1); // Not recommended + * expect(2).to.be.at.least(2); // Not recommended + * + * Add `.lengthOf` earlier in the chain to assert that the target's `length` + * or `size` is greater than or equal to the given number `n`. + * + * expect('foo').to.have.lengthOf(3); // Recommended + * expect('foo').to.have.lengthOf.at.least(2); // Not recommended + * + * expect([1, 2, 3]).to.have.lengthOf(3); // Recommended + * expect([1, 2, 3]).to.have.lengthOf.at.least(2); // Not recommended + * + * Add `.not` earlier in the chain to negate `.least`. + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.not.be.at.least(2); // Not recommended + * + * `.least` accepts an optional `msg` argument which is a custom error message + * to show when the assertion fails. The message can also be given as the + * second argument to `expect`. + * + * expect(1).to.be.at.least(2, 'nooo why fail??'); + * expect(1, 'nooo why fail??').to.be.at.least(2); + * + * The alias `.gte` can be used interchangeably with `.least`. + * + * @name least + * @alias gte + * @param {Number} n + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertLeast (n, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , doLength = flag(this, 'doLength') + , flagMsg = flag(this, 'message') + , msgPrefix = ((flagMsg) ? flagMsg + ': ' : '') + , ssfi = flag(this, 'ssfi') + , objType = _.type(obj).toLowerCase() + , nType = _.type(n).toLowerCase() + , errorMessage + , shouldThrow = true; + + if (doLength && objType !== 'map' && objType !== 'set') { + new Assertion(obj, flagMsg, ssfi, true).to.have.property('length'); + } + + if (!doLength && (objType === 'date' && nType !== 'date')) { + errorMessage = msgPrefix + 'the argument to least must be a date'; + } else if (nType !== 'number' && (doLength || objType === 'number')) { + errorMessage = msgPrefix + 'the argument to least must be a number'; + } else if (!doLength && (objType !== 'date' && objType !== 'number')) { + var printObj = (objType === 'string') ? "'" + obj + "'" : obj; + errorMessage = msgPrefix + 'expected ' + printObj + ' to be a number or a date'; + } else { + shouldThrow = false; + } + + if (shouldThrow) { + throw new AssertionError(errorMessage, undefined, ssfi); + } + + if (doLength) { + var descriptor = 'length' + , itemsCount; + if (objType === 'map' || objType === 'set') { + descriptor = 'size'; + itemsCount = obj.size; + } else { + itemsCount = obj.length; + } + this.assert( + itemsCount >= n + , 'expected #{this} to have a ' + descriptor + ' at least #{exp} but got #{act}' + , 'expected #{this} to have a ' + descriptor + ' below #{exp}' + , n + , itemsCount + ); + } else { + this.assert( + obj >= n + , 'expected #{this} to be at least #{exp}' + , 'expected #{this} to be below #{exp}' + , n + ); + } + } + + Assertion.addMethod('least', assertLeast); + Assertion.addMethod('gte', assertLeast); + + /** + * ### .below(n[, msg]) + * + * Asserts that the target is a number or a date less than the given number or date `n` respectively. + * However, it's often best to assert that the target is equal to its expected + * value. + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.be.below(2); // Not recommended + * + * Add `.lengthOf` earlier in the chain to assert that the target's `length` + * or `size` is less than the given number `n`. + * + * expect('foo').to.have.lengthOf(3); // Recommended + * expect('foo').to.have.lengthOf.below(4); // Not recommended + * + * expect([1, 2, 3]).to.have.length(3); // Recommended + * expect([1, 2, 3]).to.have.lengthOf.below(4); // Not recommended + * + * Add `.not` earlier in the chain to negate `.below`. + * + * expect(2).to.equal(2); // Recommended + * expect(2).to.not.be.below(1); // Not recommended + * + * `.below` accepts an optional `msg` argument which is a custom error message + * to show when the assertion fails. The message can also be given as the + * second argument to `expect`. + * + * expect(2).to.be.below(1, 'nooo why fail??'); + * expect(2, 'nooo why fail??').to.be.below(1); + * + * The aliases `.lt` and `.lessThan` can be used interchangeably with + * `.below`. + * + * @name below + * @alias lt + * @alias lessThan + * @param {Number} n + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertBelow (n, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , doLength = flag(this, 'doLength') + , flagMsg = flag(this, 'message') + , msgPrefix = ((flagMsg) ? flagMsg + ': ' : '') + , ssfi = flag(this, 'ssfi') + , objType = _.type(obj).toLowerCase() + , nType = _.type(n).toLowerCase() + , errorMessage + , shouldThrow = true; + + if (doLength && objType !== 'map' && objType !== 'set') { + new Assertion(obj, flagMsg, ssfi, true).to.have.property('length'); + } + + if (!doLength && (objType === 'date' && nType !== 'date')) { + errorMessage = msgPrefix + 'the argument to below must be a date'; + } else if (nType !== 'number' && (doLength || objType === 'number')) { + errorMessage = msgPrefix + 'the argument to below must be a number'; + } else if (!doLength && (objType !== 'date' && objType !== 'number')) { + var printObj = (objType === 'string') ? "'" + obj + "'" : obj; + errorMessage = msgPrefix + 'expected ' + printObj + ' to be a number or a date'; + } else { + shouldThrow = false; + } + + if (shouldThrow) { + throw new AssertionError(errorMessage, undefined, ssfi); + } + + if (doLength) { + var descriptor = 'length' + , itemsCount; + if (objType === 'map' || objType === 'set') { + descriptor = 'size'; + itemsCount = obj.size; + } else { + itemsCount = obj.length; + } + this.assert( + itemsCount < n + , 'expected #{this} to have a ' + descriptor + ' below #{exp} but got #{act}' + , 'expected #{this} to not have a ' + descriptor + ' below #{exp}' + , n + , itemsCount + ); + } else { + this.assert( + obj < n + , 'expected #{this} to be below #{exp}' + , 'expected #{this} to be at least #{exp}' + , n + ); + } + } + + Assertion.addMethod('below', assertBelow); + Assertion.addMethod('lt', assertBelow); + Assertion.addMethod('lessThan', assertBelow); + + /** + * ### .most(n[, msg]) + * + * Asserts that the target is a number or a date less than or equal to the given number + * or date `n` respectively. However, it's often best to assert that the target is equal to its + * expected value. + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.be.at.most(2); // Not recommended + * expect(1).to.be.at.most(1); // Not recommended + * + * Add `.lengthOf` earlier in the chain to assert that the target's `length` + * or `size` is less than or equal to the given number `n`. + * + * expect('foo').to.have.lengthOf(3); // Recommended + * expect('foo').to.have.lengthOf.at.most(4); // Not recommended + * + * expect([1, 2, 3]).to.have.lengthOf(3); // Recommended + * expect([1, 2, 3]).to.have.lengthOf.at.most(4); // Not recommended + * + * Add `.not` earlier in the chain to negate `.most`. + * + * expect(2).to.equal(2); // Recommended + * expect(2).to.not.be.at.most(1); // Not recommended + * + * `.most` accepts an optional `msg` argument which is a custom error message + * to show when the assertion fails. The message can also be given as the + * second argument to `expect`. + * + * expect(2).to.be.at.most(1, 'nooo why fail??'); + * expect(2, 'nooo why fail??').to.be.at.most(1); + * + * The alias `.lte` can be used interchangeably with `.most`. + * + * @name most + * @alias lte + * @param {Number} n + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertMost (n, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , doLength = flag(this, 'doLength') + , flagMsg = flag(this, 'message') + , msgPrefix = ((flagMsg) ? flagMsg + ': ' : '') + , ssfi = flag(this, 'ssfi') + , objType = _.type(obj).toLowerCase() + , nType = _.type(n).toLowerCase() + , errorMessage + , shouldThrow = true; + + if (doLength && objType !== 'map' && objType !== 'set') { + new Assertion(obj, flagMsg, ssfi, true).to.have.property('length'); + } + + if (!doLength && (objType === 'date' && nType !== 'date')) { + errorMessage = msgPrefix + 'the argument to most must be a date'; + } else if (nType !== 'number' && (doLength || objType === 'number')) { + errorMessage = msgPrefix + 'the argument to most must be a number'; + } else if (!doLength && (objType !== 'date' && objType !== 'number')) { + var printObj = (objType === 'string') ? "'" + obj + "'" : obj; + errorMessage = msgPrefix + 'expected ' + printObj + ' to be a number or a date'; + } else { + shouldThrow = false; + } + + if (shouldThrow) { + throw new AssertionError(errorMessage, undefined, ssfi); + } + + if (doLength) { + var descriptor = 'length' + , itemsCount; + if (objType === 'map' || objType === 'set') { + descriptor = 'size'; + itemsCount = obj.size; + } else { + itemsCount = obj.length; + } + this.assert( + itemsCount <= n + , 'expected #{this} to have a ' + descriptor + ' at most #{exp} but got #{act}' + , 'expected #{this} to have a ' + descriptor + ' above #{exp}' + , n + , itemsCount + ); + } else { + this.assert( + obj <= n + , 'expected #{this} to be at most #{exp}' + , 'expected #{this} to be above #{exp}' + , n + ); + } + } + + Assertion.addMethod('most', assertMost); + Assertion.addMethod('lte', assertMost); + + /** + * ### .within(start, finish[, msg]) + * + * Asserts that the target is a number or a date greater than or equal to the given + * number or date `start`, and less than or equal to the given number or date `finish` respectively. + * However, it's often best to assert that the target is equal to its expected + * value. + * + * expect(2).to.equal(2); // Recommended + * expect(2).to.be.within(1, 3); // Not recommended + * expect(2).to.be.within(2, 3); // Not recommended + * expect(2).to.be.within(1, 2); // Not recommended + * + * Add `.lengthOf` earlier in the chain to assert that the target's `length` + * or `size` is greater than or equal to the given number `start`, and less + * than or equal to the given number `finish`. + * + * expect('foo').to.have.lengthOf(3); // Recommended + * expect('foo').to.have.lengthOf.within(2, 4); // Not recommended + * + * expect([1, 2, 3]).to.have.lengthOf(3); // Recommended + * expect([1, 2, 3]).to.have.lengthOf.within(2, 4); // Not recommended + * + * Add `.not` earlier in the chain to negate `.within`. + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.not.be.within(2, 4); // Not recommended + * + * `.within` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. + * + * expect(4).to.be.within(1, 3, 'nooo why fail??'); + * expect(4, 'nooo why fail??').to.be.within(1, 3); + * + * @name within + * @param {Number} start lower bound inclusive + * @param {Number} finish upper bound inclusive + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + Assertion.addMethod('within', function (start, finish, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , doLength = flag(this, 'doLength') + , flagMsg = flag(this, 'message') + , msgPrefix = ((flagMsg) ? flagMsg + ': ' : '') + , ssfi = flag(this, 'ssfi') + , objType = _.type(obj).toLowerCase() + , startType = _.type(start).toLowerCase() + , finishType = _.type(finish).toLowerCase() + , errorMessage + , shouldThrow = true + , range = (startType === 'date' && finishType === 'date') + ? start.toUTCString() + '..' + finish.toUTCString() + : start + '..' + finish; + + if (doLength && objType !== 'map' && objType !== 'set') { + new Assertion(obj, flagMsg, ssfi, true).to.have.property('length'); + } + + if (!doLength && (objType === 'date' && (startType !== 'date' || finishType !== 'date'))) { + errorMessage = msgPrefix + 'the arguments to within must be dates'; + } else if ((startType !== 'number' || finishType !== 'number') && (doLength || objType === 'number')) { + errorMessage = msgPrefix + 'the arguments to within must be numbers'; + } else if (!doLength && (objType !== 'date' && objType !== 'number')) { + var printObj = (objType === 'string') ? "'" + obj + "'" : obj; + errorMessage = msgPrefix + 'expected ' + printObj + ' to be a number or a date'; + } else { + shouldThrow = false; + } + + if (shouldThrow) { + throw new AssertionError(errorMessage, undefined, ssfi); + } + + if (doLength) { + var descriptor = 'length' + , itemsCount; + if (objType === 'map' || objType === 'set') { + descriptor = 'size'; + itemsCount = obj.size; + } else { + itemsCount = obj.length; + } + this.assert( + itemsCount >= start && itemsCount <= finish + , 'expected #{this} to have a ' + descriptor + ' within ' + range + , 'expected #{this} to not have a ' + descriptor + ' within ' + range + ); + } else { + this.assert( + obj >= start && obj <= finish + , 'expected #{this} to be within ' + range + , 'expected #{this} to not be within ' + range + ); + } + }); + + /** + * ### .instanceof(constructor[, msg]) + * + * Asserts that the target is an instance of the given `constructor`. + * + * function Cat () { } + * + * expect(new Cat()).to.be.an.instanceof(Cat); + * expect([1, 2]).to.be.an.instanceof(Array); + * + * Add `.not` earlier in the chain to negate `.instanceof`. + * + * expect({a: 1}).to.not.be.an.instanceof(Array); + * + * `.instanceof` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. + * + * expect(1).to.be.an.instanceof(Array, 'nooo why fail??'); + * expect(1, 'nooo why fail??').to.be.an.instanceof(Array); + * + * Due to limitations in ES5, `.instanceof` may not always work as expected + * when using a transpiler such as Babel or TypeScript. In particular, it may + * produce unexpected results when subclassing built-in object such as + * `Array`, `Error`, and `Map`. See your transpiler's docs for details: + * + * - ([Babel](https://babeljs.io/docs/usage/caveats/#classes)) + * - ([TypeScript](https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work)) + * + * The alias `.instanceOf` can be used interchangeably with `.instanceof`. + * + * @name instanceof + * @param {Constructor} constructor + * @param {String} msg _optional_ + * @alias instanceOf + * @namespace BDD + * @api public + */ + + function assertInstanceOf (constructor, msg) { + if (msg) flag(this, 'message', msg); + + var target = flag(this, 'object') + var ssfi = flag(this, 'ssfi'); + var flagMsg = flag(this, 'message'); + + try { + var isInstanceOf = target instanceof constructor; + } catch (err) { + if (err instanceof TypeError) { + flagMsg = flagMsg ? flagMsg + ': ' : ''; + throw new AssertionError( + flagMsg + 'The instanceof assertion needs a constructor but ' + + _.type(constructor) + ' was given.', + undefined, + ssfi + ); + } + throw err; + } + + var name = _.getName(constructor); + if (name === null) { + name = 'an unnamed constructor'; + } + + this.assert( + isInstanceOf + , 'expected #{this} to be an instance of ' + name + , 'expected #{this} to not be an instance of ' + name + ); + }; + + Assertion.addMethod('instanceof', assertInstanceOf); + Assertion.addMethod('instanceOf', assertInstanceOf); + + /** + * ### .property(name[, val[, msg]]) + * + * Asserts that the target has a property with the given key `name`. + * + * expect({a: 1}).to.have.property('a'); + * + * When `val` is provided, `.property` also asserts that the property's value + * is equal to the given `val`. + * + * expect({a: 1}).to.have.property('a', 1); + * + * By default, strict (`===`) equality is used. Add `.deep` earlier in the + * chain to use deep equality instead. See the `deep-eql` project page for + * info on the deep equality algorithm: https://github.com/chaijs/deep-eql. + * + * // Target object deeply (but not strictly) has property `x: {a: 1}` + * expect({x: {a: 1}}).to.have.deep.property('x', {a: 1}); + * expect({x: {a: 1}}).to.not.have.property('x', {a: 1}); + * + * The target's enumerable and non-enumerable properties are always included + * in the search. By default, both own and inherited properties are included. + * Add `.own` earlier in the chain to exclude inherited properties from the + * search. + * + * Object.prototype.b = 2; + * + * expect({a: 1}).to.have.own.property('a'); + * expect({a: 1}).to.have.own.property('a', 1); + * expect({a: 1}).to.have.property('b'); + * expect({a: 1}).to.not.have.own.property('b'); + * + * `.deep` and `.own` can be combined. + * + * expect({x: {a: 1}}).to.have.deep.own.property('x', {a: 1}); + * + * Add `.nested` earlier in the chain to enable dot- and bracket-notation when + * referencing nested properties. + * + * expect({a: {b: ['x', 'y']}}).to.have.nested.property('a.b[1]'); + * expect({a: {b: ['x', 'y']}}).to.have.nested.property('a.b[1]', 'y'); + * + * If `.` or `[]` are part of an actual property name, they can be escaped by + * adding two backslashes before them. + * + * expect({'.a': {'[b]': 'x'}}).to.have.nested.property('\\.a.\\[b\\]'); + * + * `.deep` and `.nested` can be combined. + * + * expect({a: {b: [{c: 3}]}}) + * .to.have.deep.nested.property('a.b[0]', {c: 3}); + * + * `.own` and `.nested` cannot be combined. + * + * Add `.not` earlier in the chain to negate `.property`. + * + * expect({a: 1}).to.not.have.property('b'); + * + * However, it's dangerous to negate `.property` when providing `val`. The + * problem is that it creates uncertain expectations by asserting that the + * target either doesn't have a property with the given key `name`, or that it + * does have a property with the given key `name` but its value isn't equal to + * the given `val`. It's often best to identify the exact output that's + * expected, and then write an assertion that only accepts that exact output. + * + * When the target isn't expected to have a property with the given key + * `name`, it's often best to assert exactly that. + * + * expect({b: 2}).to.not.have.property('a'); // Recommended + * expect({b: 2}).to.not.have.property('a', 1); // Not recommended + * + * When the target is expected to have a property with the given key `name`, + * it's often best to assert that the property has its expected value, rather + * than asserting that it doesn't have one of many unexpected values. + * + * expect({a: 3}).to.have.property('a', 3); // Recommended + * expect({a: 3}).to.not.have.property('a', 1); // Not recommended + * + * `.property` changes the target of any assertions that follow in the chain + * to be the value of the property from the original target object. + * + * expect({a: 1}).to.have.property('a').that.is.a('number'); + * + * `.property` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. When not providing `val`, only use the + * second form. + * + * // Recommended + * expect({a: 1}).to.have.property('a', 2, 'nooo why fail??'); + * expect({a: 1}, 'nooo why fail??').to.have.property('a', 2); + * expect({a: 1}, 'nooo why fail??').to.have.property('b'); + * + * // Not recommended + * expect({a: 1}).to.have.property('b', undefined, 'nooo why fail??'); + * + * The above assertion isn't the same thing as not providing `val`. Instead, + * it's asserting that the target object has a `b` property that's equal to + * `undefined`. + * + * The assertions `.ownProperty` and `.haveOwnProperty` can be used + * interchangeably with `.own.property`. + * + * @name property + * @param {String} name + * @param {Mixed} val (optional) + * @param {String} msg _optional_ + * @returns value of property for chaining + * @namespace BDD + * @api public + */ + + function assertProperty (name, val, msg) { + if (msg) flag(this, 'message', msg); + + var isNested = flag(this, 'nested') + , isOwn = flag(this, 'own') + , flagMsg = flag(this, 'message') + , obj = flag(this, 'object') + , ssfi = flag(this, 'ssfi') + , nameType = typeof name; + + flagMsg = flagMsg ? flagMsg + ': ' : ''; + + if (isNested) { + if (nameType !== 'string') { + throw new AssertionError( + flagMsg + 'the argument to property must be a string when using nested syntax', + undefined, + ssfi + ); + } + } else { + if (nameType !== 'string' && nameType !== 'number' && nameType !== 'symbol') { + throw new AssertionError( + flagMsg + 'the argument to property must be a string, number, or symbol', + undefined, + ssfi + ); + } + } + + if (isNested && isOwn) { + throw new AssertionError( + flagMsg + 'The "nested" and "own" flags cannot be combined.', + undefined, + ssfi + ); + } + + if (obj === null || obj === undefined) { + throw new AssertionError( + flagMsg + 'Target cannot be null or undefined.', + undefined, + ssfi + ); + } + + var isDeep = flag(this, 'deep') + , negate = flag(this, 'negate') + , pathInfo = isNested ? _.getPathInfo(obj, name) : null + , value = isNested ? pathInfo.value : obj[name]; + + var descriptor = ''; + if (isDeep) descriptor += 'deep '; + if (isOwn) descriptor += 'own '; + if (isNested) descriptor += 'nested '; + descriptor += 'property '; + + var hasProperty; + if (isOwn) hasProperty = Object.prototype.hasOwnProperty.call(obj, name); + else if (isNested) hasProperty = pathInfo.exists; + else hasProperty = _.hasProperty(obj, name); + + // When performing a negated assertion for both name and val, merely having + // a property with the given name isn't enough to cause the assertion to + // fail. It must both have a property with the given name, and the value of + // that property must equal the given val. Therefore, skip this assertion in + // favor of the next. + if (!negate || arguments.length === 1) { + this.assert( + hasProperty + , 'expected #{this} to have ' + descriptor + _.inspect(name) + , 'expected #{this} to not have ' + descriptor + _.inspect(name)); + } + + if (arguments.length > 1) { + this.assert( + hasProperty && (isDeep ? _.eql(val, value) : val === value) + , 'expected #{this} to have ' + descriptor + _.inspect(name) + ' of #{exp}, but got #{act}' + , 'expected #{this} to not have ' + descriptor + _.inspect(name) + ' of #{act}' + , val + , value + ); + } + + flag(this, 'object', value); + } + + Assertion.addMethod('property', assertProperty); + + function assertOwnProperty (name, value, msg) { + flag(this, 'own', true); + assertProperty.apply(this, arguments); + } + + Assertion.addMethod('ownProperty', assertOwnProperty); + Assertion.addMethod('haveOwnProperty', assertOwnProperty); + + /** + * ### .ownPropertyDescriptor(name[, descriptor[, msg]]) + * + * Asserts that the target has its own property descriptor with the given key + * `name`. Enumerable and non-enumerable properties are included in the + * search. + * + * expect({a: 1}).to.have.ownPropertyDescriptor('a'); + * + * When `descriptor` is provided, `.ownPropertyDescriptor` also asserts that + * the property's descriptor is deeply equal to the given `descriptor`. See + * the `deep-eql` project page for info on the deep equality algorithm: + * https://github.com/chaijs/deep-eql. + * + * expect({a: 1}).to.have.ownPropertyDescriptor('a', { + * configurable: true, + * enumerable: true, + * writable: true, + * value: 1, + * }); + * + * Add `.not` earlier in the chain to negate `.ownPropertyDescriptor`. + * + * expect({a: 1}).to.not.have.ownPropertyDescriptor('b'); + * + * However, it's dangerous to negate `.ownPropertyDescriptor` when providing + * a `descriptor`. The problem is that it creates uncertain expectations by + * asserting that the target either doesn't have a property descriptor with + * the given key `name`, or that it does have a property descriptor with the + * given key `name` but its not deeply equal to the given `descriptor`. It's + * often best to identify the exact output that's expected, and then write an + * assertion that only accepts that exact output. + * + * When the target isn't expected to have a property descriptor with the given + * key `name`, it's often best to assert exactly that. + * + * // Recommended + * expect({b: 2}).to.not.have.ownPropertyDescriptor('a'); + * + * // Not recommended + * expect({b: 2}).to.not.have.ownPropertyDescriptor('a', { + * configurable: true, + * enumerable: true, + * writable: true, + * value: 1, + * }); + * + * When the target is expected to have a property descriptor with the given + * key `name`, it's often best to assert that the property has its expected + * descriptor, rather than asserting that it doesn't have one of many + * unexpected descriptors. + * + * // Recommended + * expect({a: 3}).to.have.ownPropertyDescriptor('a', { + * configurable: true, + * enumerable: true, + * writable: true, + * value: 3, + * }); + * + * // Not recommended + * expect({a: 3}).to.not.have.ownPropertyDescriptor('a', { + * configurable: true, + * enumerable: true, + * writable: true, + * value: 1, + * }); + * + * `.ownPropertyDescriptor` changes the target of any assertions that follow + * in the chain to be the value of the property descriptor from the original + * target object. + * + * expect({a: 1}).to.have.ownPropertyDescriptor('a') + * .that.has.property('enumerable', true); + * + * `.ownPropertyDescriptor` accepts an optional `msg` argument which is a + * custom error message to show when the assertion fails. The message can also + * be given as the second argument to `expect`. When not providing + * `descriptor`, only use the second form. + * + * // Recommended + * expect({a: 1}).to.have.ownPropertyDescriptor('a', { + * configurable: true, + * enumerable: true, + * writable: true, + * value: 2, + * }, 'nooo why fail??'); + * + * // Recommended + * expect({a: 1}, 'nooo why fail??').to.have.ownPropertyDescriptor('a', { + * configurable: true, + * enumerable: true, + * writable: true, + * value: 2, + * }); + * + * // Recommended + * expect({a: 1}, 'nooo why fail??').to.have.ownPropertyDescriptor('b'); + * + * // Not recommended + * expect({a: 1}) + * .to.have.ownPropertyDescriptor('b', undefined, 'nooo why fail??'); + * + * The above assertion isn't the same thing as not providing `descriptor`. + * Instead, it's asserting that the target object has a `b` property + * descriptor that's deeply equal to `undefined`. + * + * The alias `.haveOwnPropertyDescriptor` can be used interchangeably with + * `.ownPropertyDescriptor`. + * + * @name ownPropertyDescriptor + * @alias haveOwnPropertyDescriptor + * @param {String} name + * @param {Object} descriptor _optional_ + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertOwnPropertyDescriptor (name, descriptor, msg) { + if (typeof descriptor === 'string') { + msg = descriptor; + descriptor = null; + } + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object'); + var actualDescriptor = Object.getOwnPropertyDescriptor(Object(obj), name); + if (actualDescriptor && descriptor) { + this.assert( + _.eql(descriptor, actualDescriptor) + , 'expected the own property descriptor for ' + _.inspect(name) + ' on #{this} to match ' + _.inspect(descriptor) + ', got ' + _.inspect(actualDescriptor) + , 'expected the own property descriptor for ' + _.inspect(name) + ' on #{this} to not match ' + _.inspect(descriptor) + , descriptor + , actualDescriptor + , true + ); + } else { + this.assert( + actualDescriptor + , 'expected #{this} to have an own property descriptor for ' + _.inspect(name) + , 'expected #{this} to not have an own property descriptor for ' + _.inspect(name) + ); + } + flag(this, 'object', actualDescriptor); + } + + Assertion.addMethod('ownPropertyDescriptor', assertOwnPropertyDescriptor); + Assertion.addMethod('haveOwnPropertyDescriptor', assertOwnPropertyDescriptor); + + /** + * ### .lengthOf(n[, msg]) + * + * Asserts that the target's `length` or `size` is equal to the given number + * `n`. + * + * expect([1, 2, 3]).to.have.lengthOf(3); + * expect('foo').to.have.lengthOf(3); + * expect(new Set([1, 2, 3])).to.have.lengthOf(3); + * expect(new Map([['a', 1], ['b', 2], ['c', 3]])).to.have.lengthOf(3); + * + * Add `.not` earlier in the chain to negate `.lengthOf`. However, it's often + * best to assert that the target's `length` property is equal to its expected + * value, rather than not equal to one of many unexpected values. + * + * expect('foo').to.have.lengthOf(3); // Recommended + * expect('foo').to.not.have.lengthOf(4); // Not recommended + * + * `.lengthOf` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. + * + * expect([1, 2, 3]).to.have.lengthOf(2, 'nooo why fail??'); + * expect([1, 2, 3], 'nooo why fail??').to.have.lengthOf(2); + * + * `.lengthOf` can also be used as a language chain, causing all `.above`, + * `.below`, `.least`, `.most`, and `.within` assertions that follow in the + * chain to use the target's `length` property as the target. However, it's + * often best to assert that the target's `length` property is equal to its + * expected length, rather than asserting that its `length` property falls + * within some range of values. + * + * // Recommended + * expect([1, 2, 3]).to.have.lengthOf(3); + * + * // Not recommended + * expect([1, 2, 3]).to.have.lengthOf.above(2); + * expect([1, 2, 3]).to.have.lengthOf.below(4); + * expect([1, 2, 3]).to.have.lengthOf.at.least(3); + * expect([1, 2, 3]).to.have.lengthOf.at.most(3); + * expect([1, 2, 3]).to.have.lengthOf.within(2,4); + * + * Due to a compatibility issue, the alias `.length` can't be chained directly + * off of an uninvoked method such as `.a`. Therefore, `.length` can't be used + * interchangeably with `.lengthOf` in every situation. It's recommended to + * always use `.lengthOf` instead of `.length`. + * + * expect([1, 2, 3]).to.have.a.length(3); // incompatible; throws error + * expect([1, 2, 3]).to.have.a.lengthOf(3); // passes as expected + * + * @name lengthOf + * @alias length + * @param {Number} n + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertLengthChain () { + flag(this, 'doLength', true); + } + + function assertLength (n, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , objType = _.type(obj).toLowerCase() + , flagMsg = flag(this, 'message') + , ssfi = flag(this, 'ssfi') + , descriptor = 'length' + , itemsCount; + + switch (objType) { + case 'map': + case 'set': + descriptor = 'size'; + itemsCount = obj.size; + break; + default: + new Assertion(obj, flagMsg, ssfi, true).to.have.property('length'); + itemsCount = obj.length; + } + + this.assert( + itemsCount == n + , 'expected #{this} to have a ' + descriptor + ' of #{exp} but got #{act}' + , 'expected #{this} to not have a ' + descriptor + ' of #{act}' + , n + , itemsCount + ); + } + + Assertion.addChainableMethod('length', assertLength, assertLengthChain); + Assertion.addChainableMethod('lengthOf', assertLength, assertLengthChain); + + /** + * ### .match(re[, msg]) + * + * Asserts that the target matches the given regular expression `re`. + * + * expect('foobar').to.match(/^foo/); + * + * Add `.not` earlier in the chain to negate `.match`. + * + * expect('foobar').to.not.match(/taco/); + * + * `.match` accepts an optional `msg` argument which is a custom error message + * to show when the assertion fails. The message can also be given as the + * second argument to `expect`. + * + * expect('foobar').to.match(/taco/, 'nooo why fail??'); + * expect('foobar', 'nooo why fail??').to.match(/taco/); + * + * The alias `.matches` can be used interchangeably with `.match`. + * + * @name match + * @alias matches + * @param {RegExp} re + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + function assertMatch(re, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object'); + this.assert( + re.exec(obj) + , 'expected #{this} to match ' + re + , 'expected #{this} not to match ' + re + ); + } + + Assertion.addMethod('match', assertMatch); + Assertion.addMethod('matches', assertMatch); + + /** + * ### .string(str[, msg]) + * + * Asserts that the target string contains the given substring `str`. + * + * expect('foobar').to.have.string('bar'); + * + * Add `.not` earlier in the chain to negate `.string`. + * + * expect('foobar').to.not.have.string('taco'); + * + * `.string` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. + * + * expect('foobar').to.have.string('taco', 'nooo why fail??'); + * expect('foobar', 'nooo why fail??').to.have.string('taco'); + * + * @name string + * @param {String} str + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + Assertion.addMethod('string', function (str, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , flagMsg = flag(this, 'message') + , ssfi = flag(this, 'ssfi'); + new Assertion(obj, flagMsg, ssfi, true).is.a('string'); + + this.assert( + ~obj.indexOf(str) + , 'expected #{this} to contain ' + _.inspect(str) + , 'expected #{this} to not contain ' + _.inspect(str) + ); + }); + + /** + * ### .keys(key1[, key2[, ...]]) + * + * Asserts that the target object, array, map, or set has the given keys. Only + * the target's own inherited properties are included in the search. + * + * When the target is an object or array, keys can be provided as one or more + * string arguments, a single array argument, or a single object argument. In + * the latter case, only the keys in the given object matter; the values are + * ignored. + * + * expect({a: 1, b: 2}).to.have.all.keys('a', 'b'); + * expect(['x', 'y']).to.have.all.keys(0, 1); + * + * expect({a: 1, b: 2}).to.have.all.keys(['a', 'b']); + * expect(['x', 'y']).to.have.all.keys([0, 1]); + * + * expect({a: 1, b: 2}).to.have.all.keys({a: 4, b: 5}); // ignore 4 and 5 + * expect(['x', 'y']).to.have.all.keys({0: 4, 1: 5}); // ignore 4 and 5 + * + * When the target is a map or set, each key must be provided as a separate + * argument. + * + * expect(new Map([['a', 1], ['b', 2]])).to.have.all.keys('a', 'b'); + * expect(new Set(['a', 'b'])).to.have.all.keys('a', 'b'); + * + * Because `.keys` does different things based on the target's type, it's + * important to check the target's type before using `.keys`. See the `.a` doc + * for info on testing a target's type. + * + * expect({a: 1, b: 2}).to.be.an('object').that.has.all.keys('a', 'b'); + * + * By default, strict (`===`) equality is used to compare keys of maps and + * sets. Add `.deep` earlier in the chain to use deep equality instead. See + * the `deep-eql` project page for info on the deep equality algorithm: + * https://github.com/chaijs/deep-eql. + * + * // Target set deeply (but not strictly) has key `{a: 1}` + * expect(new Set([{a: 1}])).to.have.all.deep.keys([{a: 1}]); + * expect(new Set([{a: 1}])).to.not.have.all.keys([{a: 1}]); + * + * By default, the target must have all of the given keys and no more. Add + * `.any` earlier in the chain to only require that the target have at least + * one of the given keys. Also, add `.not` earlier in the chain to negate + * `.keys`. It's often best to add `.any` when negating `.keys`, and to use + * `.all` when asserting `.keys` without negation. + * + * When negating `.keys`, `.any` is preferred because `.not.any.keys` asserts + * exactly what's expected of the output, whereas `.not.all.keys` creates + * uncertain expectations. + * + * // Recommended; asserts that target doesn't have any of the given keys + * expect({a: 1, b: 2}).to.not.have.any.keys('c', 'd'); + * + * // Not recommended; asserts that target doesn't have all of the given + * // keys but may or may not have some of them + * expect({a: 1, b: 2}).to.not.have.all.keys('c', 'd'); + * + * When asserting `.keys` without negation, `.all` is preferred because + * `.all.keys` asserts exactly what's expected of the output, whereas + * `.any.keys` creates uncertain expectations. + * + * // Recommended; asserts that target has all the given keys + * expect({a: 1, b: 2}).to.have.all.keys('a', 'b'); + * + * // Not recommended; asserts that target has at least one of the given + * // keys but may or may not have more of them + * expect({a: 1, b: 2}).to.have.any.keys('a', 'b'); + * + * Note that `.all` is used by default when neither `.all` nor `.any` appear + * earlier in the chain. However, it's often best to add `.all` anyway because + * it improves readability. + * + * // Both assertions are identical + * expect({a: 1, b: 2}).to.have.all.keys('a', 'b'); // Recommended + * expect({a: 1, b: 2}).to.have.keys('a', 'b'); // Not recommended + * + * Add `.include` earlier in the chain to require that the target's keys be a + * superset of the expected keys, rather than identical sets. + * + * // Target object's keys are a superset of ['a', 'b'] but not identical + * expect({a: 1, b: 2, c: 3}).to.include.all.keys('a', 'b'); + * expect({a: 1, b: 2, c: 3}).to.not.have.all.keys('a', 'b'); + * + * However, if `.any` and `.include` are combined, only the `.any` takes + * effect. The `.include` is ignored in this case. + * + * // Both assertions are identical + * expect({a: 1}).to.have.any.keys('a', 'b'); + * expect({a: 1}).to.include.any.keys('a', 'b'); + * + * A custom error message can be given as the second argument to `expect`. + * + * expect({a: 1}, 'nooo why fail??').to.have.key('b'); + * + * The alias `.key` can be used interchangeably with `.keys`. + * + * @name keys + * @alias key + * @param {...String|Array|Object} keys + * @namespace BDD + * @api public + */ + + function assertKeys (keys) { + var obj = flag(this, 'object') + , objType = _.type(obj) + , keysType = _.type(keys) + , ssfi = flag(this, 'ssfi') + , isDeep = flag(this, 'deep') + , str + , deepStr = '' + , actual + , ok = true + , flagMsg = flag(this, 'message'); + + flagMsg = flagMsg ? flagMsg + ': ' : ''; + var mixedArgsMsg = flagMsg + 'when testing keys against an object or an array you must give a single Array|Object|String argument or multiple String arguments'; + + if (objType === 'Map' || objType === 'Set') { + deepStr = isDeep ? 'deeply ' : ''; + actual = []; + + // Map and Set '.keys' aren't supported in IE 11. Therefore, use .forEach. + obj.forEach(function (val, key) { actual.push(key) }); + + if (keysType !== 'Array') { + keys = Array.prototype.slice.call(arguments); + } + } else { + actual = _.getOwnEnumerableProperties(obj); + + switch (keysType) { + case 'Array': + if (arguments.length > 1) { + throw new AssertionError(mixedArgsMsg, undefined, ssfi); + } + break; + case 'Object': + if (arguments.length > 1) { + throw new AssertionError(mixedArgsMsg, undefined, ssfi); + } + keys = Object.keys(keys); + break; + default: + keys = Array.prototype.slice.call(arguments); + } + + // Only stringify non-Symbols because Symbols would become "Symbol()" + keys = keys.map(function (val) { + return typeof val === 'symbol' ? val : String(val); + }); + } + + if (!keys.length) { + throw new AssertionError(flagMsg + 'keys required', undefined, ssfi); + } + + var len = keys.length + , any = flag(this, 'any') + , all = flag(this, 'all') + , expected = keys; + + if (!any && !all) { + all = true; + } + + // Has any + if (any) { + ok = expected.some(function(expectedKey) { + return actual.some(function(actualKey) { + if (isDeep) { + return _.eql(expectedKey, actualKey); + } else { + return expectedKey === actualKey; + } + }); + }); + } + + // Has all + if (all) { + ok = expected.every(function(expectedKey) { + return actual.some(function(actualKey) { + if (isDeep) { + return _.eql(expectedKey, actualKey); + } else { + return expectedKey === actualKey; + } + }); + }); + + if (!flag(this, 'contains')) { + ok = ok && keys.length == actual.length; + } + } + + // Key string + if (len > 1) { + keys = keys.map(function(key) { + return _.inspect(key); + }); + var last = keys.pop(); + if (all) { + str = keys.join(', ') + ', and ' + last; + } + if (any) { + str = keys.join(', ') + ', or ' + last; + } + } else { + str = _.inspect(keys[0]); + } + + // Form + str = (len > 1 ? 'keys ' : 'key ') + str; + + // Have / include + str = (flag(this, 'contains') ? 'contain ' : 'have ') + str; + + // Assertion + this.assert( + ok + , 'expected #{this} to ' + deepStr + str + , 'expected #{this} to not ' + deepStr + str + , expected.slice(0).sort(_.compareByInspect) + , actual.sort(_.compareByInspect) + , true + ); + } + + Assertion.addMethod('keys', assertKeys); + Assertion.addMethod('key', assertKeys); + + /** + * ### .throw([errorLike], [errMsgMatcher], [msg]) + * + * When no arguments are provided, `.throw` invokes the target function and + * asserts that an error is thrown. + * + * var badFn = function () { throw new TypeError('Illegal salmon!'); }; + * + * expect(badFn).to.throw(); + * + * When one argument is provided, and it's an error constructor, `.throw` + * invokes the target function and asserts that an error is thrown that's an + * instance of that error constructor. + * + * var badFn = function () { throw new TypeError('Illegal salmon!'); }; + * + * expect(badFn).to.throw(TypeError); + * + * When one argument is provided, and it's an error instance, `.throw` invokes + * the target function and asserts that an error is thrown that's strictly + * (`===`) equal to that error instance. + * + * var err = new TypeError('Illegal salmon!'); + * var badFn = function () { throw err; }; + * + * expect(badFn).to.throw(err); + * + * When one argument is provided, and it's a string, `.throw` invokes the + * target function and asserts that an error is thrown with a message that + * contains that string. + * + * var badFn = function () { throw new TypeError('Illegal salmon!'); }; + * + * expect(badFn).to.throw('salmon'); + * + * When one argument is provided, and it's a regular expression, `.throw` + * invokes the target function and asserts that an error is thrown with a + * message that matches that regular expression. + * + * var badFn = function () { throw new TypeError('Illegal salmon!'); }; + * + * expect(badFn).to.throw(/salmon/); + * + * When two arguments are provided, and the first is an error instance or + * constructor, and the second is a string or regular expression, `.throw` + * invokes the function and asserts that an error is thrown that fulfills both + * conditions as described above. + * + * var err = new TypeError('Illegal salmon!'); + * var badFn = function () { throw err; }; + * + * expect(badFn).to.throw(TypeError, 'salmon'); + * expect(badFn).to.throw(TypeError, /salmon/); + * expect(badFn).to.throw(err, 'salmon'); + * expect(badFn).to.throw(err, /salmon/); + * + * Add `.not` earlier in the chain to negate `.throw`. + * + * var goodFn = function () {}; + * + * expect(goodFn).to.not.throw(); + * + * However, it's dangerous to negate `.throw` when providing any arguments. + * The problem is that it creates uncertain expectations by asserting that the + * target either doesn't throw an error, or that it throws an error but of a + * different type than the given type, or that it throws an error of the given + * type but with a message that doesn't include the given string. It's often + * best to identify the exact output that's expected, and then write an + * assertion that only accepts that exact output. + * + * When the target isn't expected to throw an error, it's often best to assert + * exactly that. + * + * var goodFn = function () {}; + * + * expect(goodFn).to.not.throw(); // Recommended + * expect(goodFn).to.not.throw(ReferenceError, 'x'); // Not recommended + * + * When the target is expected to throw an error, it's often best to assert + * that the error is of its expected type, and has a message that includes an + * expected string, rather than asserting that it doesn't have one of many + * unexpected types, and doesn't have a message that includes some string. + * + * var badFn = function () { throw new TypeError('Illegal salmon!'); }; + * + * expect(badFn).to.throw(TypeError, 'salmon'); // Recommended + * expect(badFn).to.not.throw(ReferenceError, 'x'); // Not recommended + * + * `.throw` changes the target of any assertions that follow in the chain to + * be the error object that's thrown. + * + * var err = new TypeError('Illegal salmon!'); + * err.code = 42; + * var badFn = function () { throw err; }; + * + * expect(badFn).to.throw(TypeError).with.property('code', 42); + * + * `.throw` accepts an optional `msg` argument which is a custom error message + * to show when the assertion fails. The message can also be given as the + * second argument to `expect`. When not providing two arguments, always use + * the second form. + * + * var goodFn = function () {}; + * + * expect(goodFn).to.throw(TypeError, 'x', 'nooo why fail??'); + * expect(goodFn, 'nooo why fail??').to.throw(); + * + * Due to limitations in ES5, `.throw` may not always work as expected when + * using a transpiler such as Babel or TypeScript. In particular, it may + * produce unexpected results when subclassing the built-in `Error` object and + * then passing the subclassed constructor to `.throw`. See your transpiler's + * docs for details: + * + * - ([Babel](https://babeljs.io/docs/usage/caveats/#classes)) + * - ([TypeScript](https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work)) + * + * Beware of some common mistakes when using the `throw` assertion. One common + * mistake is to accidentally invoke the function yourself instead of letting + * the `throw` assertion invoke the function for you. For example, when + * testing if a function named `fn` throws, provide `fn` instead of `fn()` as + * the target for the assertion. + * + * expect(fn).to.throw(); // Good! Tests `fn` as desired + * expect(fn()).to.throw(); // Bad! Tests result of `fn()`, not `fn` + * + * If you need to assert that your function `fn` throws when passed certain + * arguments, then wrap a call to `fn` inside of another function. + * + * expect(function () { fn(42); }).to.throw(); // Function expression + * expect(() => fn(42)).to.throw(); // ES6 arrow function + * + * Another common mistake is to provide an object method (or any stand-alone + * function that relies on `this`) as the target of the assertion. Doing so is + * problematic because the `this` context will be lost when the function is + * invoked by `.throw`; there's no way for it to know what `this` is supposed + * to be. There are two ways around this problem. One solution is to wrap the + * method or function call inside of another function. Another solution is to + * use `bind`. + * + * expect(function () { cat.meow(); }).to.throw(); // Function expression + * expect(() => cat.meow()).to.throw(); // ES6 arrow function + * expect(cat.meow.bind(cat)).to.throw(); // Bind + * + * Finally, it's worth mentioning that it's a best practice in JavaScript to + * only throw `Error` and derivatives of `Error` such as `ReferenceError`, + * `TypeError`, and user-defined objects that extend `Error`. No other type of + * value will generate a stack trace when initialized. With that said, the + * `throw` assertion does technically support any type of value being thrown, + * not just `Error` and its derivatives. + * + * The aliases `.throws` and `.Throw` can be used interchangeably with + * `.throw`. + * + * @name throw + * @alias throws + * @alias Throw + * @param {Error|ErrorConstructor} errorLike + * @param {String|RegExp} errMsgMatcher error message + * @param {String} msg _optional_ + * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types + * @returns error for chaining (null if no error) + * @namespace BDD + * @api public + */ + + function assertThrows (errorLike, errMsgMatcher, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , ssfi = flag(this, 'ssfi') + , flagMsg = flag(this, 'message') + , negate = flag(this, 'negate') || false; + new Assertion(obj, flagMsg, ssfi, true).is.a('function'); + + if (errorLike instanceof RegExp || typeof errorLike === 'string') { + errMsgMatcher = errorLike; + errorLike = null; + } + + var caughtErr; + try { + obj(); + } catch (err) { + caughtErr = err; + } + + // If we have the negate flag enabled and at least one valid argument it means we do expect an error + // but we want it to match a given set of criteria + var everyArgIsUndefined = errorLike === undefined && errMsgMatcher === undefined; + + // If we've got the negate flag enabled and both args, we should only fail if both aren't compatible + // See Issue #551 and PR #683@GitHub + var everyArgIsDefined = Boolean(errorLike && errMsgMatcher); + var errorLikeFail = false; + var errMsgMatcherFail = false; + + // Checking if error was thrown + if (everyArgIsUndefined || !everyArgIsUndefined && !negate) { + // We need this to display results correctly according to their types + var errorLikeString = 'an error'; + if (errorLike instanceof Error) { + errorLikeString = '#{exp}'; + } else if (errorLike) { + errorLikeString = _.checkError.getConstructorName(errorLike); + } + + this.assert( + caughtErr + , 'expected #{this} to throw ' + errorLikeString + , 'expected #{this} to not throw an error but #{act} was thrown' + , errorLike && errorLike.toString() + , (caughtErr instanceof Error ? + caughtErr.toString() : (typeof caughtErr === 'string' ? caughtErr : caughtErr && + _.checkError.getConstructorName(caughtErr))) + ); + } + + if (errorLike && caughtErr) { + // We should compare instances only if `errorLike` is an instance of `Error` + if (errorLike instanceof Error) { + var isCompatibleInstance = _.checkError.compatibleInstance(caughtErr, errorLike); + + if (isCompatibleInstance === negate) { + // These checks were created to ensure we won't fail too soon when we've got both args and a negate + // See Issue #551 and PR #683@GitHub + if (everyArgIsDefined && negate) { + errorLikeFail = true; + } else { + this.assert( + negate + , 'expected #{this} to throw #{exp} but #{act} was thrown' + , 'expected #{this} to not throw #{exp}' + (caughtErr && !negate ? ' but #{act} was thrown' : '') + , errorLike.toString() + , caughtErr.toString() + ); + } + } + } + + var isCompatibleConstructor = _.checkError.compatibleConstructor(caughtErr, errorLike); + if (isCompatibleConstructor === negate) { + if (everyArgIsDefined && negate) { + errorLikeFail = true; + } else { + this.assert( + negate + , 'expected #{this} to throw #{exp} but #{act} was thrown' + , 'expected #{this} to not throw #{exp}' + (caughtErr ? ' but #{act} was thrown' : '') + , (errorLike instanceof Error ? errorLike.toString() : errorLike && _.checkError.getConstructorName(errorLike)) + , (caughtErr instanceof Error ? caughtErr.toString() : caughtErr && _.checkError.getConstructorName(caughtErr)) + ); + } + } + } + + if (caughtErr && errMsgMatcher !== undefined && errMsgMatcher !== null) { + // Here we check compatible messages + var placeholder = 'including'; + if (errMsgMatcher instanceof RegExp) { + placeholder = 'matching' + } + + var isCompatibleMessage = _.checkError.compatibleMessage(caughtErr, errMsgMatcher); + if (isCompatibleMessage === negate) { + if (everyArgIsDefined && negate) { + errMsgMatcherFail = true; + } else { + this.assert( + negate + , 'expected #{this} to throw error ' + placeholder + ' #{exp} but got #{act}' + , 'expected #{this} to throw error not ' + placeholder + ' #{exp}' + , errMsgMatcher + , _.checkError.getMessage(caughtErr) + ); + } + } + } + + // If both assertions failed and both should've matched we throw an error + if (errorLikeFail && errMsgMatcherFail) { + this.assert( + negate + , 'expected #{this} to throw #{exp} but #{act} was thrown' + , 'expected #{this} to not throw #{exp}' + (caughtErr ? ' but #{act} was thrown' : '') + , (errorLike instanceof Error ? errorLike.toString() : errorLike && _.checkError.getConstructorName(errorLike)) + , (caughtErr instanceof Error ? caughtErr.toString() : caughtErr && _.checkError.getConstructorName(caughtErr)) + ); + } + + flag(this, 'object', caughtErr); + }; + + Assertion.addMethod('throw', assertThrows); + Assertion.addMethod('throws', assertThrows); + Assertion.addMethod('Throw', assertThrows); + + /** + * ### .respondTo(method[, msg]) + * + * When the target is a non-function object, `.respondTo` asserts that the + * target has a method with the given name `method`. The method can be own or + * inherited, and it can be enumerable or non-enumerable. + * + * function Cat () {} + * Cat.prototype.meow = function () {}; + * + * expect(new Cat()).to.respondTo('meow'); + * + * When the target is a function, `.respondTo` asserts that the target's + * `prototype` property has a method with the given name `method`. Again, the + * method can be own or inherited, and it can be enumerable or non-enumerable. + * + * function Cat () {} + * Cat.prototype.meow = function () {}; + * + * expect(Cat).to.respondTo('meow'); + * + * Add `.itself` earlier in the chain to force `.respondTo` to treat the + * target as a non-function object, even if it's a function. Thus, it asserts + * that the target has a method with the given name `method`, rather than + * asserting that the target's `prototype` property has a method with the + * given name `method`. + * + * function Cat () {} + * Cat.prototype.meow = function () {}; + * Cat.hiss = function () {}; + * + * expect(Cat).itself.to.respondTo('hiss').but.not.respondTo('meow'); + * + * When not adding `.itself`, it's important to check the target's type before + * using `.respondTo`. See the `.a` doc for info on checking a target's type. + * + * function Cat () {} + * Cat.prototype.meow = function () {}; + * + * expect(new Cat()).to.be.an('object').that.respondsTo('meow'); + * + * Add `.not` earlier in the chain to negate `.respondTo`. + * + * function Dog () {} + * Dog.prototype.bark = function () {}; + * + * expect(new Dog()).to.not.respondTo('meow'); + * + * `.respondTo` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. + * + * expect({}).to.respondTo('meow', 'nooo why fail??'); + * expect({}, 'nooo why fail??').to.respondTo('meow'); + * + * The alias `.respondsTo` can be used interchangeably with `.respondTo`. + * + * @name respondTo + * @alias respondsTo + * @param {String} method + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function respondTo (method, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , itself = flag(this, 'itself') + , context = ('function' === typeof obj && !itself) + ? obj.prototype[method] + : obj[method]; + + this.assert( + 'function' === typeof context + , 'expected #{this} to respond to ' + _.inspect(method) + , 'expected #{this} to not respond to ' + _.inspect(method) + ); + } + + Assertion.addMethod('respondTo', respondTo); + Assertion.addMethod('respondsTo', respondTo); + + /** + * ### .itself + * + * Forces all `.respondTo` assertions that follow in the chain to behave as if + * the target is a non-function object, even if it's a function. Thus, it + * causes `.respondTo` to assert that the target has a method with the given + * name, rather than asserting that the target's `prototype` property has a + * method with the given name. + * + * function Cat () {} + * Cat.prototype.meow = function () {}; + * Cat.hiss = function () {}; + * + * expect(Cat).itself.to.respondTo('hiss').but.not.respondTo('meow'); + * + * @name itself + * @namespace BDD + * @api public + */ + + Assertion.addProperty('itself', function () { + flag(this, 'itself', true); + }); + + /** + * ### .satisfy(matcher[, msg]) + * + * Invokes the given `matcher` function with the target being passed as the + * first argument, and asserts that the value returned is truthy. + * + * expect(1).to.satisfy(function(num) { + * return num > 0; + * }); + * + * Add `.not` earlier in the chain to negate `.satisfy`. + * + * expect(1).to.not.satisfy(function(num) { + * return num > 2; + * }); + * + * `.satisfy` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. + * + * expect(1).to.satisfy(function(num) { + * return num > 2; + * }, 'nooo why fail??'); + * + * expect(1, 'nooo why fail??').to.satisfy(function(num) { + * return num > 2; + * }); + * + * The alias `.satisfies` can be used interchangeably with `.satisfy`. + * + * @name satisfy + * @alias satisfies + * @param {Function} matcher + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function satisfy (matcher, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object'); + var result = matcher(obj); + this.assert( + result + , 'expected #{this} to satisfy ' + _.objDisplay(matcher) + , 'expected #{this} to not satisfy' + _.objDisplay(matcher) + , flag(this, 'negate') ? false : true + , result + ); + } + + Assertion.addMethod('satisfy', satisfy); + Assertion.addMethod('satisfies', satisfy); + + /** + * ### .closeTo(expected, delta[, msg]) + * + * Asserts that the target is a number that's within a given +/- `delta` range + * of the given number `expected`. However, it's often best to assert that the + * target is equal to its expected value. + * + * // Recommended + * expect(1.5).to.equal(1.5); + * + * // Not recommended + * expect(1.5).to.be.closeTo(1, 0.5); + * expect(1.5).to.be.closeTo(2, 0.5); + * expect(1.5).to.be.closeTo(1, 1); + * + * Add `.not` earlier in the chain to negate `.closeTo`. + * + * expect(1.5).to.equal(1.5); // Recommended + * expect(1.5).to.not.be.closeTo(3, 1); // Not recommended + * + * `.closeTo` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. + * + * expect(1.5).to.be.closeTo(3, 1, 'nooo why fail??'); + * expect(1.5, 'nooo why fail??').to.be.closeTo(3, 1); + * + * The alias `.approximately` can be used interchangeably with `.closeTo`. + * + * @name closeTo + * @alias approximately + * @param {Number} expected + * @param {Number} delta + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function closeTo(expected, delta, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , flagMsg = flag(this, 'message') + , ssfi = flag(this, 'ssfi'); + + new Assertion(obj, flagMsg, ssfi, true).is.a('number'); + if (typeof expected !== 'number' || typeof delta !== 'number') { + flagMsg = flagMsg ? flagMsg + ': ' : ''; + throw new AssertionError( + flagMsg + 'the arguments to closeTo or approximately must be numbers', + undefined, + ssfi + ); + } + + this.assert( + Math.abs(obj - expected) <= delta + , 'expected #{this} to be close to ' + expected + ' +/- ' + delta + , 'expected #{this} not to be close to ' + expected + ' +/- ' + delta + ); + } + + Assertion.addMethod('closeTo', closeTo); + Assertion.addMethod('approximately', closeTo); + + // Note: Duplicates are ignored if testing for inclusion instead of sameness. + function isSubsetOf(subset, superset, cmp, contains, ordered) { + if (!contains) { + if (subset.length !== superset.length) return false; + superset = superset.slice(); + } + + return subset.every(function(elem, idx) { + if (ordered) return cmp ? cmp(elem, superset[idx]) : elem === superset[idx]; + + if (!cmp) { + var matchIdx = superset.indexOf(elem); + if (matchIdx === -1) return false; + + // Remove match from superset so not counted twice if duplicate in subset. + if (!contains) superset.splice(matchIdx, 1); + return true; + } + + return superset.some(function(elem2, matchIdx) { + if (!cmp(elem, elem2)) return false; + + // Remove match from superset so not counted twice if duplicate in subset. + if (!contains) superset.splice(matchIdx, 1); + return true; + }); + }); + } + + /** + * ### .members(set[, msg]) + * + * Asserts that the target array has the same members as the given array + * `set`. + * + * expect([1, 2, 3]).to.have.members([2, 1, 3]); + * expect([1, 2, 2]).to.have.members([2, 1, 2]); + * + * By default, members are compared using strict (`===`) equality. Add `.deep` + * earlier in the chain to use deep equality instead. See the `deep-eql` + * project page for info on the deep equality algorithm: + * https://github.com/chaijs/deep-eql. + * + * // Target array deeply (but not strictly) has member `{a: 1}` + * expect([{a: 1}]).to.have.deep.members([{a: 1}]); + * expect([{a: 1}]).to.not.have.members([{a: 1}]); + * + * By default, order doesn't matter. Add `.ordered` earlier in the chain to + * require that members appear in the same order. + * + * expect([1, 2, 3]).to.have.ordered.members([1, 2, 3]); + * expect([1, 2, 3]).to.have.members([2, 1, 3]) + * .but.not.ordered.members([2, 1, 3]); + * + * By default, both arrays must be the same size. Add `.include` earlier in + * the chain to require that the target's members be a superset of the + * expected members. Note that duplicates are ignored in the subset when + * `.include` is added. + * + * // Target array is a superset of [1, 2] but not identical + * expect([1, 2, 3]).to.include.members([1, 2]); + * expect([1, 2, 3]).to.not.have.members([1, 2]); + * + * // Duplicates in the subset are ignored + * expect([1, 2, 3]).to.include.members([1, 2, 2, 2]); + * + * `.deep`, `.ordered`, and `.include` can all be combined. However, if + * `.include` and `.ordered` are combined, the ordering begins at the start of + * both arrays. + * + * expect([{a: 1}, {b: 2}, {c: 3}]) + * .to.include.deep.ordered.members([{a: 1}, {b: 2}]) + * .but.not.include.deep.ordered.members([{b: 2}, {c: 3}]); + * + * Add `.not` earlier in the chain to negate `.members`. However, it's + * dangerous to do so. The problem is that it creates uncertain expectations + * by asserting that the target array doesn't have all of the same members as + * the given array `set` but may or may not have some of them. It's often best + * to identify the exact output that's expected, and then write an assertion + * that only accepts that exact output. + * + * expect([1, 2]).to.not.include(3).and.not.include(4); // Recommended + * expect([1, 2]).to.not.have.members([3, 4]); // Not recommended + * + * `.members` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. + * + * expect([1, 2]).to.have.members([1, 2, 3], 'nooo why fail??'); + * expect([1, 2], 'nooo why fail??').to.have.members([1, 2, 3]); + * + * @name members + * @param {Array} set + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + Assertion.addMethod('members', function (subset, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , flagMsg = flag(this, 'message') + , ssfi = flag(this, 'ssfi'); + + new Assertion(obj, flagMsg, ssfi, true).to.be.an('array'); + new Assertion(subset, flagMsg, ssfi, true).to.be.an('array'); + + var contains = flag(this, 'contains'); + var ordered = flag(this, 'ordered'); + + var subject, failMsg, failNegateMsg; + + if (contains) { + subject = ordered ? 'an ordered superset' : 'a superset'; + failMsg = 'expected #{this} to be ' + subject + ' of #{exp}'; + failNegateMsg = 'expected #{this} to not be ' + subject + ' of #{exp}'; + } else { + subject = ordered ? 'ordered members' : 'members'; + failMsg = 'expected #{this} to have the same ' + subject + ' as #{exp}'; + failNegateMsg = 'expected #{this} to not have the same ' + subject + ' as #{exp}'; + } + + var cmp = flag(this, 'deep') ? _.eql : undefined; + + this.assert( + isSubsetOf(subset, obj, cmp, contains, ordered) + , failMsg + , failNegateMsg + , subset + , obj + , true + ); + }); + + /** + * ### .oneOf(list[, msg]) + * + * Asserts that the target is a member of the given array `list`. However, + * it's often best to assert that the target is equal to its expected value. + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.be.oneOf([1, 2, 3]); // Not recommended + * + * Comparisons are performed using strict (`===`) equality. + * + * Add `.not` earlier in the chain to negate `.oneOf`. + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.not.be.oneOf([2, 3, 4]); // Not recommended + * + * `.oneOf` accepts an optional `msg` argument which is a custom error message + * to show when the assertion fails. The message can also be given as the + * second argument to `expect`. + * + * expect(1).to.be.oneOf([2, 3, 4], 'nooo why fail??'); + * expect(1, 'nooo why fail??').to.be.oneOf([2, 3, 4]); + * + * @name oneOf + * @param {Array<*>} list + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function oneOf (list, msg) { + if (msg) flag(this, 'message', msg); + var expected = flag(this, 'object') + , flagMsg = flag(this, 'message') + , ssfi = flag(this, 'ssfi'); + new Assertion(list, flagMsg, ssfi, true).to.be.an('array'); + + this.assert( + list.indexOf(expected) > -1 + , 'expected #{this} to be one of #{exp}' + , 'expected #{this} to not be one of #{exp}' + , list + , expected + ); + } + + Assertion.addMethod('oneOf', oneOf); + + /** + * ### .change(subject[, prop[, msg]]) + * + * When one argument is provided, `.change` asserts that the given function + * `subject` returns a different value when it's invoked before the target + * function compared to when it's invoked afterward. However, it's often best + * to assert that `subject` is equal to its expected value. + * + * var dots = '' + * , addDot = function () { dots += '.'; } + * , getDots = function () { return dots; }; + * + * // Recommended + * expect(getDots()).to.equal(''); + * addDot(); + * expect(getDots()).to.equal('.'); + * + * // Not recommended + * expect(addDot).to.change(getDots); + * + * When two arguments are provided, `.change` asserts that the value of the + * given object `subject`'s `prop` property is different before invoking the + * target function compared to afterward. + * + * var myObj = {dots: ''} + * , addDot = function () { myObj.dots += '.'; }; + * + * // Recommended + * expect(myObj).to.have.property('dots', ''); + * addDot(); + * expect(myObj).to.have.property('dots', '.'); + * + * // Not recommended + * expect(addDot).to.change(myObj, 'dots'); + * + * Strict (`===`) equality is used to compare before and after values. + * + * Add `.not` earlier in the chain to negate `.change`. + * + * var dots = '' + * , noop = function () {} + * , getDots = function () { return dots; }; + * + * expect(noop).to.not.change(getDots); + * + * var myObj = {dots: ''} + * , noop = function () {}; + * + * expect(noop).to.not.change(myObj, 'dots'); + * + * `.change` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. When not providing two arguments, always + * use the second form. + * + * var myObj = {dots: ''} + * , addDot = function () { myObj.dots += '.'; }; + * + * expect(addDot).to.not.change(myObj, 'dots', 'nooo why fail??'); + * + * var dots = '' + * , addDot = function () { dots += '.'; } + * , getDots = function () { return dots; }; + * + * expect(addDot, 'nooo why fail??').to.not.change(getDots); + * + * `.change` also causes all `.by` assertions that follow in the chain to + * assert how much a numeric subject was increased or decreased by. However, + * it's dangerous to use `.change.by`. The problem is that it creates + * uncertain expectations by asserting that the subject either increases by + * the given delta, or that it decreases by the given delta. It's often best + * to identify the exact output that's expected, and then write an assertion + * that only accepts that exact output. + * + * var myObj = {val: 1} + * , addTwo = function () { myObj.val += 2; } + * , subtractTwo = function () { myObj.val -= 2; }; + * + * expect(addTwo).to.increase(myObj, 'val').by(2); // Recommended + * expect(addTwo).to.change(myObj, 'val').by(2); // Not recommended + * + * expect(subtractTwo).to.decrease(myObj, 'val').by(2); // Recommended + * expect(subtractTwo).to.change(myObj, 'val').by(2); // Not recommended + * + * The alias `.changes` can be used interchangeably with `.change`. + * + * @name change + * @alias changes + * @param {String} subject + * @param {String} prop name _optional_ + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertChanges (subject, prop, msg) { + if (msg) flag(this, 'message', msg); + var fn = flag(this, 'object') + , flagMsg = flag(this, 'message') + , ssfi = flag(this, 'ssfi'); + new Assertion(fn, flagMsg, ssfi, true).is.a('function'); + + var initial; + if (!prop) { + new Assertion(subject, flagMsg, ssfi, true).is.a('function'); + initial = subject(); + } else { + new Assertion(subject, flagMsg, ssfi, true).to.have.property(prop); + initial = subject[prop]; + } + + fn(); + + var final = prop === undefined || prop === null ? subject() : subject[prop]; + var msgObj = prop === undefined || prop === null ? initial : '.' + prop; + + // This gets flagged because of the .by(delta) assertion + flag(this, 'deltaMsgObj', msgObj); + flag(this, 'initialDeltaValue', initial); + flag(this, 'finalDeltaValue', final); + flag(this, 'deltaBehavior', 'change'); + flag(this, 'realDelta', final !== initial); + + this.assert( + initial !== final + , 'expected ' + msgObj + ' to change' + , 'expected ' + msgObj + ' to not change' + ); + } + + Assertion.addMethod('change', assertChanges); + Assertion.addMethod('changes', assertChanges); + + /** + * ### .increase(subject[, prop[, msg]]) + * + * When one argument is provided, `.increase` asserts that the given function + * `subject` returns a greater number when it's invoked after invoking the + * target function compared to when it's invoked beforehand. `.increase` also + * causes all `.by` assertions that follow in the chain to assert how much + * greater of a number is returned. It's often best to assert that the return + * value increased by the expected amount, rather than asserting it increased + * by any amount. + * + * var val = 1 + * , addTwo = function () { val += 2; } + * , getVal = function () { return val; }; + * + * expect(addTwo).to.increase(getVal).by(2); // Recommended + * expect(addTwo).to.increase(getVal); // Not recommended + * + * When two arguments are provided, `.increase` asserts that the value of the + * given object `subject`'s `prop` property is greater after invoking the + * target function compared to beforehand. + * + * var myObj = {val: 1} + * , addTwo = function () { myObj.val += 2; }; + * + * expect(addTwo).to.increase(myObj, 'val').by(2); // Recommended + * expect(addTwo).to.increase(myObj, 'val'); // Not recommended + * + * Add `.not` earlier in the chain to negate `.increase`. However, it's + * dangerous to do so. The problem is that it creates uncertain expectations + * by asserting that the subject either decreases, or that it stays the same. + * It's often best to identify the exact output that's expected, and then + * write an assertion that only accepts that exact output. + * + * When the subject is expected to decrease, it's often best to assert that it + * decreased by the expected amount. + * + * var myObj = {val: 1} + * , subtractTwo = function () { myObj.val -= 2; }; + * + * expect(subtractTwo).to.decrease(myObj, 'val').by(2); // Recommended + * expect(subtractTwo).to.not.increase(myObj, 'val'); // Not recommended + * + * When the subject is expected to stay the same, it's often best to assert + * exactly that. + * + * var myObj = {val: 1} + * , noop = function () {}; + * + * expect(noop).to.not.change(myObj, 'val'); // Recommended + * expect(noop).to.not.increase(myObj, 'val'); // Not recommended + * + * `.increase` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. When not providing two arguments, always + * use the second form. + * + * var myObj = {val: 1} + * , noop = function () {}; + * + * expect(noop).to.increase(myObj, 'val', 'nooo why fail??'); + * + * var val = 1 + * , noop = function () {} + * , getVal = function () { return val; }; + * + * expect(noop, 'nooo why fail??').to.increase(getVal); + * + * The alias `.increases` can be used interchangeably with `.increase`. + * + * @name increase + * @alias increases + * @param {String|Function} subject + * @param {String} prop name _optional_ + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertIncreases (subject, prop, msg) { + if (msg) flag(this, 'message', msg); + var fn = flag(this, 'object') + , flagMsg = flag(this, 'message') + , ssfi = flag(this, 'ssfi'); + new Assertion(fn, flagMsg, ssfi, true).is.a('function'); + + var initial; + if (!prop) { + new Assertion(subject, flagMsg, ssfi, true).is.a('function'); + initial = subject(); + } else { + new Assertion(subject, flagMsg, ssfi, true).to.have.property(prop); + initial = subject[prop]; + } + + // Make sure that the target is a number + new Assertion(initial, flagMsg, ssfi, true).is.a('number'); + + fn(); + + var final = prop === undefined || prop === null ? subject() : subject[prop]; + var msgObj = prop === undefined || prop === null ? initial : '.' + prop; + + flag(this, 'deltaMsgObj', msgObj); + flag(this, 'initialDeltaValue', initial); + flag(this, 'finalDeltaValue', final); + flag(this, 'deltaBehavior', 'increase'); + flag(this, 'realDelta', final - initial); + + this.assert( + final - initial > 0 + , 'expected ' + msgObj + ' to increase' + , 'expected ' + msgObj + ' to not increase' + ); + } + + Assertion.addMethod('increase', assertIncreases); + Assertion.addMethod('increases', assertIncreases); + + /** + * ### .decrease(subject[, prop[, msg]]) + * + * When one argument is provided, `.decrease` asserts that the given function + * `subject` returns a lesser number when it's invoked after invoking the + * target function compared to when it's invoked beforehand. `.decrease` also + * causes all `.by` assertions that follow in the chain to assert how much + * lesser of a number is returned. It's often best to assert that the return + * value decreased by the expected amount, rather than asserting it decreased + * by any amount. + * + * var val = 1 + * , subtractTwo = function () { val -= 2; } + * , getVal = function () { return val; }; + * + * expect(subtractTwo).to.decrease(getVal).by(2); // Recommended + * expect(subtractTwo).to.decrease(getVal); // Not recommended + * + * When two arguments are provided, `.decrease` asserts that the value of the + * given object `subject`'s `prop` property is lesser after invoking the + * target function compared to beforehand. + * + * var myObj = {val: 1} + * , subtractTwo = function () { myObj.val -= 2; }; + * + * expect(subtractTwo).to.decrease(myObj, 'val').by(2); // Recommended + * expect(subtractTwo).to.decrease(myObj, 'val'); // Not recommended + * + * Add `.not` earlier in the chain to negate `.decrease`. However, it's + * dangerous to do so. The problem is that it creates uncertain expectations + * by asserting that the subject either increases, or that it stays the same. + * It's often best to identify the exact output that's expected, and then + * write an assertion that only accepts that exact output. + * + * When the subject is expected to increase, it's often best to assert that it + * increased by the expected amount. + * + * var myObj = {val: 1} + * , addTwo = function () { myObj.val += 2; }; + * + * expect(addTwo).to.increase(myObj, 'val').by(2); // Recommended + * expect(addTwo).to.not.decrease(myObj, 'val'); // Not recommended + * + * When the subject is expected to stay the same, it's often best to assert + * exactly that. + * + * var myObj = {val: 1} + * , noop = function () {}; + * + * expect(noop).to.not.change(myObj, 'val'); // Recommended + * expect(noop).to.not.decrease(myObj, 'val'); // Not recommended + * + * `.decrease` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. When not providing two arguments, always + * use the second form. + * + * var myObj = {val: 1} + * , noop = function () {}; + * + * expect(noop).to.decrease(myObj, 'val', 'nooo why fail??'); + * + * var val = 1 + * , noop = function () {} + * , getVal = function () { return val; }; + * + * expect(noop, 'nooo why fail??').to.decrease(getVal); + * + * The alias `.decreases` can be used interchangeably with `.decrease`. + * + * @name decrease + * @alias decreases + * @param {String|Function} subject + * @param {String} prop name _optional_ + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertDecreases (subject, prop, msg) { + if (msg) flag(this, 'message', msg); + var fn = flag(this, 'object') + , flagMsg = flag(this, 'message') + , ssfi = flag(this, 'ssfi'); + new Assertion(fn, flagMsg, ssfi, true).is.a('function'); + + var initial; + if (!prop) { + new Assertion(subject, flagMsg, ssfi, true).is.a('function'); + initial = subject(); + } else { + new Assertion(subject, flagMsg, ssfi, true).to.have.property(prop); + initial = subject[prop]; + } + + // Make sure that the target is a number + new Assertion(initial, flagMsg, ssfi, true).is.a('number'); + + fn(); + + var final = prop === undefined || prop === null ? subject() : subject[prop]; + var msgObj = prop === undefined || prop === null ? initial : '.' + prop; + + flag(this, 'deltaMsgObj', msgObj); + flag(this, 'initialDeltaValue', initial); + flag(this, 'finalDeltaValue', final); + flag(this, 'deltaBehavior', 'decrease'); + flag(this, 'realDelta', initial - final); + + this.assert( + final - initial < 0 + , 'expected ' + msgObj + ' to decrease' + , 'expected ' + msgObj + ' to not decrease' + ); + } + + Assertion.addMethod('decrease', assertDecreases); + Assertion.addMethod('decreases', assertDecreases); + + /** + * ### .by(delta[, msg]) + * + * When following an `.increase` assertion in the chain, `.by` asserts that + * the subject of the `.increase` assertion increased by the given `delta`. + * + * var myObj = {val: 1} + * , addTwo = function () { myObj.val += 2; }; + * + * expect(addTwo).to.increase(myObj, 'val').by(2); + * + * When following a `.decrease` assertion in the chain, `.by` asserts that the + * subject of the `.decrease` assertion decreased by the given `delta`. + * + * var myObj = {val: 1} + * , subtractTwo = function () { myObj.val -= 2; }; + * + * expect(subtractTwo).to.decrease(myObj, 'val').by(2); + * + * When following a `.change` assertion in the chain, `.by` asserts that the + * subject of the `.change` assertion either increased or decreased by the + * given `delta`. However, it's dangerous to use `.change.by`. The problem is + * that it creates uncertain expectations. It's often best to identify the + * exact output that's expected, and then write an assertion that only accepts + * that exact output. + * + * var myObj = {val: 1} + * , addTwo = function () { myObj.val += 2; } + * , subtractTwo = function () { myObj.val -= 2; }; + * + * expect(addTwo).to.increase(myObj, 'val').by(2); // Recommended + * expect(addTwo).to.change(myObj, 'val').by(2); // Not recommended + * + * expect(subtractTwo).to.decrease(myObj, 'val').by(2); // Recommended + * expect(subtractTwo).to.change(myObj, 'val').by(2); // Not recommended + * + * Add `.not` earlier in the chain to negate `.by`. However, it's often best + * to assert that the subject changed by its expected delta, rather than + * asserting that it didn't change by one of countless unexpected deltas. + * + * var myObj = {val: 1} + * , addTwo = function () { myObj.val += 2; }; + * + * // Recommended + * expect(addTwo).to.increase(myObj, 'val').by(2); + * + * // Not recommended + * expect(addTwo).to.increase(myObj, 'val').but.not.by(3); + * + * `.by` accepts an optional `msg` argument which is a custom error message to + * show when the assertion fails. The message can also be given as the second + * argument to `expect`. + * + * var myObj = {val: 1} + * , addTwo = function () { myObj.val += 2; }; + * + * expect(addTwo).to.increase(myObj, 'val').by(3, 'nooo why fail??'); + * expect(addTwo, 'nooo why fail??').to.increase(myObj, 'val').by(3); + * + * @name by + * @param {Number} delta + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertDelta(delta, msg) { + if (msg) flag(this, 'message', msg); + + var msgObj = flag(this, 'deltaMsgObj'); + var initial = flag(this, 'initialDeltaValue'); + var final = flag(this, 'finalDeltaValue'); + var behavior = flag(this, 'deltaBehavior'); + var realDelta = flag(this, 'realDelta'); + + var expression; + if (behavior === 'change') { + expression = Math.abs(final - initial) === Math.abs(delta); + } else { + expression = realDelta === Math.abs(delta); + } + + this.assert( + expression + , 'expected ' + msgObj + ' to ' + behavior + ' by ' + delta + , 'expected ' + msgObj + ' to not ' + behavior + ' by ' + delta + ); + } + + Assertion.addMethod('by', assertDelta); + + /** + * ### .extensible + * + * Asserts that the target is extensible, which means that new properties can + * be added to it. Primitives are never extensible. + * + * expect({a: 1}).to.be.extensible; + * + * Add `.not` earlier in the chain to negate `.extensible`. + * + * var nonExtensibleObject = Object.preventExtensions({}) + * , sealedObject = Object.seal({}) + * , frozenObject = Object.freeze({}); + * + * expect(nonExtensibleObject).to.not.be.extensible; + * expect(sealedObject).to.not.be.extensible; + * expect(frozenObject).to.not.be.extensible; + * expect(1).to.not.be.extensible; + * + * A custom error message can be given as the second argument to `expect`. + * + * expect(1, 'nooo why fail??').to.be.extensible; + * + * @name extensible + * @namespace BDD + * @api public + */ + + Assertion.addProperty('extensible', function() { + var obj = flag(this, 'object'); + + // In ES5, if the argument to this method is a primitive, then it will cause a TypeError. + // In ES6, a non-object argument will be treated as if it was a non-extensible ordinary object, simply return false. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible + // The following provides ES6 behavior for ES5 environments. + + var isExtensible = obj === Object(obj) && Object.isExtensible(obj); + + this.assert( + isExtensible + , 'expected #{this} to be extensible' + , 'expected #{this} to not be extensible' + ); + }); + + /** + * ### .sealed + * + * Asserts that the target is sealed, which means that new properties can't be + * added to it, and its existing properties can't be reconfigured or deleted. + * However, it's possible that its existing properties can still be reassigned + * to different values. Primitives are always sealed. + * + * var sealedObject = Object.seal({}); + * var frozenObject = Object.freeze({}); + * + * expect(sealedObject).to.be.sealed; + * expect(frozenObject).to.be.sealed; + * expect(1).to.be.sealed; + * + * Add `.not` earlier in the chain to negate `.sealed`. + * + * expect({a: 1}).to.not.be.sealed; + * + * A custom error message can be given as the second argument to `expect`. + * + * expect({a: 1}, 'nooo why fail??').to.be.sealed; + * + * @name sealed + * @namespace BDD + * @api public + */ + + Assertion.addProperty('sealed', function() { + var obj = flag(this, 'object'); + + // In ES5, if the argument to this method is a primitive, then it will cause a TypeError. + // In ES6, a non-object argument will be treated as if it was a sealed ordinary object, simply return true. + // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isSealed + // The following provides ES6 behavior for ES5 environments. + + var isSealed = obj === Object(obj) ? Object.isSealed(obj) : true; + + this.assert( + isSealed + , 'expected #{this} to be sealed' + , 'expected #{this} to not be sealed' + ); + }); + + /** + * ### .frozen + * + * Asserts that the target is frozen, which means that new properties can't be + * added to it, and its existing properties can't be reassigned to different + * values, reconfigured, or deleted. Primitives are always frozen. + * + * var frozenObject = Object.freeze({}); + * + * expect(frozenObject).to.be.frozen; + * expect(1).to.be.frozen; + * + * Add `.not` earlier in the chain to negate `.frozen`. + * + * expect({a: 1}).to.not.be.frozen; + * + * A custom error message can be given as the second argument to `expect`. + * + * expect({a: 1}, 'nooo why fail??').to.be.frozen; + * + * @name frozen + * @namespace BDD + * @api public + */ + + Assertion.addProperty('frozen', function() { + var obj = flag(this, 'object'); + + // In ES5, if the argument to this method is a primitive, then it will cause a TypeError. + // In ES6, a non-object argument will be treated as if it was a frozen ordinary object, simply return true. + // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isFrozen + // The following provides ES6 behavior for ES5 environments. + + var isFrozen = obj === Object(obj) ? Object.isFrozen(obj) : true; + + this.assert( + isFrozen + , 'expected #{this} to be frozen' + , 'expected #{this} to not be frozen' + ); + }); + + /** + * ### .finite + * + * Asserts that the target is a number, and isn't `NaN` or positive/negative + * `Infinity`. + * + * expect(1).to.be.finite; + * + * Add `.not` earlier in the chain to negate `.finite`. However, it's + * dangerous to do so. The problem is that it creates uncertain expectations + * by asserting that the subject either isn't a number, or that it's `NaN`, or + * that it's positive `Infinity`, or that it's negative `Infinity`. It's often + * best to identify the exact output that's expected, and then write an + * assertion that only accepts that exact output. + * + * When the target isn't expected to be a number, it's often best to assert + * that it's the expected type, rather than asserting that it isn't one of + * many unexpected types. + * + * expect('foo').to.be.a('string'); // Recommended + * expect('foo').to.not.be.finite; // Not recommended + * + * When the target is expected to be `NaN`, it's often best to assert exactly + * that. + * + * expect(NaN).to.be.NaN; // Recommended + * expect(NaN).to.not.be.finite; // Not recommended + * + * When the target is expected to be positive infinity, it's often best to + * assert exactly that. + * + * expect(Infinity).to.equal(Infinity); // Recommended + * expect(Infinity).to.not.be.finite; // Not recommended + * + * When the target is expected to be negative infinity, it's often best to + * assert exactly that. + * + * expect(-Infinity).to.equal(-Infinity); // Recommended + * expect(-Infinity).to.not.be.finite; // Not recommended + * + * A custom error message can be given as the second argument to `expect`. + * + * expect('foo', 'nooo why fail??').to.be.finite; + * + * @name finite + * @namespace BDD + * @api public + */ + + Assertion.addProperty('finite', function(msg) { + var obj = flag(this, 'object'); + + this.assert( + typeof obj === 'number' && isFinite(obj) + , 'expected #{this} to be a finite number' + , 'expected #{this} to not be a finite number' + ); + }); +}; + +},{}],6:[function(require,module,exports){ +/*! + * chai + * Copyright(c) 2011-2014 Jake Luer + * MIT Licensed + */ + +module.exports = function (chai, util) { + /*! + * Chai dependencies. + */ + + var Assertion = chai.Assertion + , flag = util.flag; + + /*! + * Module export. + */ + + /** + * ### assert(expression, message) + * + * Write your own test expressions. + * + * assert('foo' !== 'bar', 'foo is not bar'); + * assert(Array.isArray([]), 'empty arrays are arrays'); + * + * @param {Mixed} expression to test for truthiness + * @param {String} message to display on error + * @name assert + * @namespace Assert + * @api public + */ + + var assert = chai.assert = function (express, errmsg) { + var test = new Assertion(null, null, chai.assert, true); + test.assert( + express + , errmsg + , '[ negation message unavailable ]' + ); + }; + + /** + * ### .fail([message]) + * ### .fail(actual, expected, [message], [operator]) + * + * Throw a failure. Node.js `assert` module-compatible. + * + * assert.fail(); + * assert.fail("custom error message"); + * assert.fail(1, 2); + * assert.fail(1, 2, "custom error message"); + * assert.fail(1, 2, "custom error message", ">"); + * assert.fail(1, 2, undefined, ">"); + * + * @name fail + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @param {String} operator + * @namespace Assert + * @api public + */ + + assert.fail = function (actual, expected, message, operator) { + if (arguments.length < 2) { + // Comply with Node's fail([message]) interface + + message = actual; + actual = undefined; + } + + message = message || 'assert.fail()'; + throw new chai.AssertionError(message, { + actual: actual + , expected: expected + , operator: operator + }, assert.fail); + }; + + /** + * ### .isOk(object, [message]) + * + * Asserts that `object` is truthy. + * + * assert.isOk('everything', 'everything is ok'); + * assert.isOk(false, 'this will fail'); + * + * @name isOk + * @alias ok + * @param {Mixed} object to test + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isOk = function (val, msg) { + new Assertion(val, msg, assert.isOk, true).is.ok; + }; + + /** + * ### .isNotOk(object, [message]) + * + * Asserts that `object` is falsy. + * + * assert.isNotOk('everything', 'this will fail'); + * assert.isNotOk(false, 'this will pass'); + * + * @name isNotOk + * @alias notOk + * @param {Mixed} object to test + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNotOk = function (val, msg) { + new Assertion(val, msg, assert.isNotOk, true).is.not.ok; + }; + + /** + * ### .equal(actual, expected, [message]) + * + * Asserts non-strict equality (`==`) of `actual` and `expected`. + * + * assert.equal(3, '3', '== coerces values to strings'); + * + * @name equal + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.equal = function (act, exp, msg) { + var test = new Assertion(act, msg, assert.equal, true); + + test.assert( + exp == flag(test, 'object') + , 'expected #{this} to equal #{exp}' + , 'expected #{this} to not equal #{act}' + , exp + , act + , true + ); + }; + + /** + * ### .notEqual(actual, expected, [message]) + * + * Asserts non-strict inequality (`!=`) of `actual` and `expected`. + * + * assert.notEqual(3, 4, 'these numbers are not equal'); + * + * @name notEqual + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notEqual = function (act, exp, msg) { + var test = new Assertion(act, msg, assert.notEqual, true); + + test.assert( + exp != flag(test, 'object') + , 'expected #{this} to not equal #{exp}' + , 'expected #{this} to equal #{act}' + , exp + , act + , true + ); + }; + + /** + * ### .strictEqual(actual, expected, [message]) + * + * Asserts strict equality (`===`) of `actual` and `expected`. + * + * assert.strictEqual(true, true, 'these booleans are strictly equal'); + * + * @name strictEqual + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.strictEqual = function (act, exp, msg) { + new Assertion(act, msg, assert.strictEqual, true).to.equal(exp); + }; + + /** + * ### .notStrictEqual(actual, expected, [message]) + * + * Asserts strict inequality (`!==`) of `actual` and `expected`. + * + * assert.notStrictEqual(3, '3', 'no coercion for strict equality'); + * + * @name notStrictEqual + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notStrictEqual = function (act, exp, msg) { + new Assertion(act, msg, assert.notStrictEqual, true).to.not.equal(exp); + }; + + /** + * ### .deepEqual(actual, expected, [message]) + * + * Asserts that `actual` is deeply equal to `expected`. + * + * assert.deepEqual({ tea: 'green' }, { tea: 'green' }); + * + * @name deepEqual + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @alias deepStrictEqual + * @namespace Assert + * @api public + */ + + assert.deepEqual = assert.deepStrictEqual = function (act, exp, msg) { + new Assertion(act, msg, assert.deepEqual, true).to.eql(exp); + }; + + /** + * ### .notDeepEqual(actual, expected, [message]) + * + * Assert that `actual` is not deeply equal to `expected`. + * + * assert.notDeepEqual({ tea: 'green' }, { tea: 'jasmine' }); + * + * @name notDeepEqual + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notDeepEqual = function (act, exp, msg) { + new Assertion(act, msg, assert.notDeepEqual, true).to.not.eql(exp); + }; + + /** + * ### .isAbove(valueToCheck, valueToBeAbove, [message]) + * + * Asserts `valueToCheck` is strictly greater than (>) `valueToBeAbove`. + * + * assert.isAbove(5, 2, '5 is strictly greater than 2'); + * + * @name isAbove + * @param {Mixed} valueToCheck + * @param {Mixed} valueToBeAbove + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isAbove = function (val, abv, msg) { + new Assertion(val, msg, assert.isAbove, true).to.be.above(abv); + }; + + /** + * ### .isAtLeast(valueToCheck, valueToBeAtLeast, [message]) + * + * Asserts `valueToCheck` is greater than or equal to (>=) `valueToBeAtLeast`. + * + * assert.isAtLeast(5, 2, '5 is greater or equal to 2'); + * assert.isAtLeast(3, 3, '3 is greater or equal to 3'); + * + * @name isAtLeast + * @param {Mixed} valueToCheck + * @param {Mixed} valueToBeAtLeast + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isAtLeast = function (val, atlst, msg) { + new Assertion(val, msg, assert.isAtLeast, true).to.be.least(atlst); + }; + + /** + * ### .isBelow(valueToCheck, valueToBeBelow, [message]) + * + * Asserts `valueToCheck` is strictly less than (<) `valueToBeBelow`. + * + * assert.isBelow(3, 6, '3 is strictly less than 6'); + * + * @name isBelow + * @param {Mixed} valueToCheck + * @param {Mixed} valueToBeBelow + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isBelow = function (val, blw, msg) { + new Assertion(val, msg, assert.isBelow, true).to.be.below(blw); + }; + + /** + * ### .isAtMost(valueToCheck, valueToBeAtMost, [message]) + * + * Asserts `valueToCheck` is less than or equal to (<=) `valueToBeAtMost`. + * + * assert.isAtMost(3, 6, '3 is less than or equal to 6'); + * assert.isAtMost(4, 4, '4 is less than or equal to 4'); + * + * @name isAtMost + * @param {Mixed} valueToCheck + * @param {Mixed} valueToBeAtMost + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isAtMost = function (val, atmst, msg) { + new Assertion(val, msg, assert.isAtMost, true).to.be.most(atmst); + }; + + /** + * ### .isTrue(value, [message]) + * + * Asserts that `value` is true. + * + * var teaServed = true; + * assert.isTrue(teaServed, 'the tea has been served'); + * + * @name isTrue + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isTrue = function (val, msg) { + new Assertion(val, msg, assert.isTrue, true).is['true']; + }; + + /** + * ### .isNotTrue(value, [message]) + * + * Asserts that `value` is not true. + * + * var tea = 'tasty chai'; + * assert.isNotTrue(tea, 'great, time for tea!'); + * + * @name isNotTrue + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNotTrue = function (val, msg) { + new Assertion(val, msg, assert.isNotTrue, true).to.not.equal(true); + }; + + /** + * ### .isFalse(value, [message]) + * + * Asserts that `value` is false. + * + * var teaServed = false; + * assert.isFalse(teaServed, 'no tea yet? hmm...'); + * + * @name isFalse + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isFalse = function (val, msg) { + new Assertion(val, msg, assert.isFalse, true).is['false']; + }; + + /** + * ### .isNotFalse(value, [message]) + * + * Asserts that `value` is not false. + * + * var tea = 'tasty chai'; + * assert.isNotFalse(tea, 'great, time for tea!'); + * + * @name isNotFalse + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNotFalse = function (val, msg) { + new Assertion(val, msg, assert.isNotFalse, true).to.not.equal(false); + }; + + /** + * ### .isNull(value, [message]) + * + * Asserts that `value` is null. + * + * assert.isNull(err, 'there was no error'); + * + * @name isNull + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNull = function (val, msg) { + new Assertion(val, msg, assert.isNull, true).to.equal(null); + }; + + /** + * ### .isNotNull(value, [message]) + * + * Asserts that `value` is not null. + * + * var tea = 'tasty chai'; + * assert.isNotNull(tea, 'great, time for tea!'); + * + * @name isNotNull + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNotNull = function (val, msg) { + new Assertion(val, msg, assert.isNotNull, true).to.not.equal(null); + }; + + /** + * ### .isNaN + * + * Asserts that value is NaN. + * + * assert.isNaN(NaN, 'NaN is NaN'); + * + * @name isNaN + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNaN = function (val, msg) { + new Assertion(val, msg, assert.isNaN, true).to.be.NaN; + }; + + /** + * ### .isNotNaN + * + * Asserts that value is not NaN. + * + * assert.isNotNaN(4, '4 is not NaN'); + * + * @name isNotNaN + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + assert.isNotNaN = function (val, msg) { + new Assertion(val, msg, assert.isNotNaN, true).not.to.be.NaN; + }; + + /** + * ### .exists + * + * Asserts that the target is neither `null` nor `undefined`. + * + * var foo = 'hi'; + * + * assert.exists(foo, 'foo is neither `null` nor `undefined`'); + * + * @name exists + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.exists = function (val, msg) { + new Assertion(val, msg, assert.exists, true).to.exist; + }; + + /** + * ### .notExists + * + * Asserts that the target is either `null` or `undefined`. + * + * var bar = null + * , baz; + * + * assert.notExists(bar); + * assert.notExists(baz, 'baz is either null or undefined'); + * + * @name notExists + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notExists = function (val, msg) { + new Assertion(val, msg, assert.notExists, true).to.not.exist; + }; + + /** + * ### .isUndefined(value, [message]) + * + * Asserts that `value` is `undefined`. + * + * var tea; + * assert.isUndefined(tea, 'no tea defined'); + * + * @name isUndefined + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isUndefined = function (val, msg) { + new Assertion(val, msg, assert.isUndefined, true).to.equal(undefined); + }; + + /** + * ### .isDefined(value, [message]) + * + * Asserts that `value` is not `undefined`. + * + * var tea = 'cup of chai'; + * assert.isDefined(tea, 'tea has been defined'); + * + * @name isDefined + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isDefined = function (val, msg) { + new Assertion(val, msg, assert.isDefined, true).to.not.equal(undefined); + }; + + /** + * ### .isFunction(value, [message]) + * + * Asserts that `value` is a function. + * + * function serveTea() { return 'cup of tea'; }; + * assert.isFunction(serveTea, 'great, we can have tea now'); + * + * @name isFunction + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isFunction = function (val, msg) { + new Assertion(val, msg, assert.isFunction, true).to.be.a('function'); + }; + + /** + * ### .isNotFunction(value, [message]) + * + * Asserts that `value` is _not_ a function. + * + * var serveTea = [ 'heat', 'pour', 'sip' ]; + * assert.isNotFunction(serveTea, 'great, we have listed the steps'); + * + * @name isNotFunction + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNotFunction = function (val, msg) { + new Assertion(val, msg, assert.isNotFunction, true).to.not.be.a('function'); + }; + + /** + * ### .isObject(value, [message]) + * + * Asserts that `value` is an object of type 'Object' (as revealed by `Object.prototype.toString`). + * _The assertion does not match subclassed objects._ + * + * var selection = { name: 'Chai', serve: 'with spices' }; + * assert.isObject(selection, 'tea selection is an object'); + * + * @name isObject + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isObject = function (val, msg) { + new Assertion(val, msg, assert.isObject, true).to.be.a('object'); + }; + + /** + * ### .isNotObject(value, [message]) + * + * Asserts that `value` is _not_ an object of type 'Object' (as revealed by `Object.prototype.toString`). + * + * var selection = 'chai' + * assert.isNotObject(selection, 'tea selection is not an object'); + * assert.isNotObject(null, 'null is not an object'); + * + * @name isNotObject + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNotObject = function (val, msg) { + new Assertion(val, msg, assert.isNotObject, true).to.not.be.a('object'); + }; + + /** + * ### .isArray(value, [message]) + * + * Asserts that `value` is an array. + * + * var menu = [ 'green', 'chai', 'oolong' ]; + * assert.isArray(menu, 'what kind of tea do we want?'); + * + * @name isArray + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isArray = function (val, msg) { + new Assertion(val, msg, assert.isArray, true).to.be.an('array'); + }; + + /** + * ### .isNotArray(value, [message]) + * + * Asserts that `value` is _not_ an array. + * + * var menu = 'green|chai|oolong'; + * assert.isNotArray(menu, 'what kind of tea do we want?'); + * + * @name isNotArray + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNotArray = function (val, msg) { + new Assertion(val, msg, assert.isNotArray, true).to.not.be.an('array'); + }; + + /** + * ### .isString(value, [message]) + * + * Asserts that `value` is a string. + * + * var teaOrder = 'chai'; + * assert.isString(teaOrder, 'order placed'); + * + * @name isString + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isString = function (val, msg) { + new Assertion(val, msg, assert.isString, true).to.be.a('string'); + }; + + /** + * ### .isNotString(value, [message]) + * + * Asserts that `value` is _not_ a string. + * + * var teaOrder = 4; + * assert.isNotString(teaOrder, 'order placed'); + * + * @name isNotString + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNotString = function (val, msg) { + new Assertion(val, msg, assert.isNotString, true).to.not.be.a('string'); + }; + + /** + * ### .isNumber(value, [message]) + * + * Asserts that `value` is a number. + * + * var cups = 2; + * assert.isNumber(cups, 'how many cups'); + * + * @name isNumber + * @param {Number} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNumber = function (val, msg) { + new Assertion(val, msg, assert.isNumber, true).to.be.a('number'); + }; + + /** + * ### .isNotNumber(value, [message]) + * + * Asserts that `value` is _not_ a number. + * + * var cups = '2 cups please'; + * assert.isNotNumber(cups, 'how many cups'); + * + * @name isNotNumber + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNotNumber = function (val, msg) { + new Assertion(val, msg, assert.isNotNumber, true).to.not.be.a('number'); + }; + + /** + * ### .isFinite(value, [message]) + * + * Asserts that `value` is a finite number. Unlike `.isNumber`, this will fail for `NaN` and `Infinity`. + * + * var cups = 2; + * assert.isFinite(cups, 'how many cups'); + * + * assert.isFinite(NaN); // throws + * + * @name isFinite + * @param {Number} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isFinite = function (val, msg) { + new Assertion(val, msg, assert.isFinite, true).to.be.finite; + }; + + /** + * ### .isBoolean(value, [message]) + * + * Asserts that `value` is a boolean. + * + * var teaReady = true + * , teaServed = false; + * + * assert.isBoolean(teaReady, 'is the tea ready'); + * assert.isBoolean(teaServed, 'has tea been served'); + * + * @name isBoolean + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isBoolean = function (val, msg) { + new Assertion(val, msg, assert.isBoolean, true).to.be.a('boolean'); + }; + + /** + * ### .isNotBoolean(value, [message]) + * + * Asserts that `value` is _not_ a boolean. + * + * var teaReady = 'yep' + * , teaServed = 'nope'; + * + * assert.isNotBoolean(teaReady, 'is the tea ready'); + * assert.isNotBoolean(teaServed, 'has tea been served'); + * + * @name isNotBoolean + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNotBoolean = function (val, msg) { + new Assertion(val, msg, assert.isNotBoolean, true).to.not.be.a('boolean'); + }; + + /** + * ### .typeOf(value, name, [message]) + * + * Asserts that `value`'s type is `name`, as determined by + * `Object.prototype.toString`. + * + * assert.typeOf({ tea: 'chai' }, 'object', 'we have an object'); + * assert.typeOf(['chai', 'jasmine'], 'array', 'we have an array'); + * assert.typeOf('tea', 'string', 'we have a string'); + * assert.typeOf(/tea/, 'regexp', 'we have a regular expression'); + * assert.typeOf(null, 'null', 'we have a null'); + * assert.typeOf(undefined, 'undefined', 'we have an undefined'); + * + * @name typeOf + * @param {Mixed} value + * @param {String} name + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.typeOf = function (val, type, msg) { + new Assertion(val, msg, assert.typeOf, true).to.be.a(type); + }; + + /** + * ### .notTypeOf(value, name, [message]) + * + * Asserts that `value`'s type is _not_ `name`, as determined by + * `Object.prototype.toString`. + * + * assert.notTypeOf('tea', 'number', 'strings are not numbers'); + * + * @name notTypeOf + * @param {Mixed} value + * @param {String} typeof name + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notTypeOf = function (val, type, msg) { + new Assertion(val, msg, assert.notTypeOf, true).to.not.be.a(type); + }; + + /** + * ### .instanceOf(object, constructor, [message]) + * + * Asserts that `value` is an instance of `constructor`. + * + * var Tea = function (name) { this.name = name; } + * , chai = new Tea('chai'); + * + * assert.instanceOf(chai, Tea, 'chai is an instance of tea'); + * + * @name instanceOf + * @param {Object} object + * @param {Constructor} constructor + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.instanceOf = function (val, type, msg) { + new Assertion(val, msg, assert.instanceOf, true).to.be.instanceOf(type); + }; + + /** + * ### .notInstanceOf(object, constructor, [message]) + * + * Asserts `value` is not an instance of `constructor`. + * + * var Tea = function (name) { this.name = name; } + * , chai = new String('chai'); + * + * assert.notInstanceOf(chai, Tea, 'chai is not an instance of tea'); + * + * @name notInstanceOf + * @param {Object} object + * @param {Constructor} constructor + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notInstanceOf = function (val, type, msg) { + new Assertion(val, msg, assert.notInstanceOf, true) + .to.not.be.instanceOf(type); + }; + + /** + * ### .include(haystack, needle, [message]) + * + * Asserts that `haystack` includes `needle`. Can be used to assert the + * inclusion of a value in an array, a substring in a string, or a subset of + * properties in an object. + * + * assert.include([1,2,3], 2, 'array contains value'); + * assert.include('foobar', 'foo', 'string contains substring'); + * assert.include({ foo: 'bar', hello: 'universe' }, { foo: 'bar' }, 'object contains property'); + * + * Strict equality (===) is used. When asserting the inclusion of a value in + * an array, the array is searched for an element that's strictly equal to the + * given value. When asserting a subset of properties in an object, the object + * is searched for the given property keys, checking that each one is present + * and strictly equal to the given property value. For instance: + * + * var obj1 = {a: 1} + * , obj2 = {b: 2}; + * assert.include([obj1, obj2], obj1); + * assert.include({foo: obj1, bar: obj2}, {foo: obj1}); + * assert.include({foo: obj1, bar: obj2}, {foo: obj1, bar: obj2}); + * + * @name include + * @param {Array|String} haystack + * @param {Mixed} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.include = function (exp, inc, msg) { + new Assertion(exp, msg, assert.include, true).include(inc); + }; + + /** + * ### .notInclude(haystack, needle, [message]) + * + * Asserts that `haystack` does not include `needle`. Can be used to assert + * the absence of a value in an array, a substring in a string, or a subset of + * properties in an object. + * + * assert.notInclude([1,2,3], 4, "array doesn't contain value"); + * assert.notInclude('foobar', 'baz', "string doesn't contain substring"); + * assert.notInclude({ foo: 'bar', hello: 'universe' }, { foo: 'baz' }, 'object doesn't contain property'); + * + * Strict equality (===) is used. When asserting the absence of a value in an + * array, the array is searched to confirm the absence of an element that's + * strictly equal to the given value. When asserting a subset of properties in + * an object, the object is searched to confirm that at least one of the given + * property keys is either not present or not strictly equal to the given + * property value. For instance: + * + * var obj1 = {a: 1} + * , obj2 = {b: 2}; + * assert.notInclude([obj1, obj2], {a: 1}); + * assert.notInclude({foo: obj1, bar: obj2}, {foo: {a: 1}}); + * assert.notInclude({foo: obj1, bar: obj2}, {foo: obj1, bar: {b: 2}}); + * + * @name notInclude + * @param {Array|String} haystack + * @param {Mixed} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notInclude = function (exp, inc, msg) { + new Assertion(exp, msg, assert.notInclude, true).not.include(inc); + }; + + /** + * ### .deepInclude(haystack, needle, [message]) + * + * Asserts that `haystack` includes `needle`. Can be used to assert the + * inclusion of a value in an array or a subset of properties in an object. + * Deep equality is used. + * + * var obj1 = {a: 1} + * , obj2 = {b: 2}; + * assert.deepInclude([obj1, obj2], {a: 1}); + * assert.deepInclude({foo: obj1, bar: obj2}, {foo: {a: 1}}); + * assert.deepInclude({foo: obj1, bar: obj2}, {foo: {a: 1}, bar: {b: 2}}); + * + * @name deepInclude + * @param {Array|String} haystack + * @param {Mixed} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.deepInclude = function (exp, inc, msg) { + new Assertion(exp, msg, assert.deepInclude, true).deep.include(inc); + }; + + /** + * ### .notDeepInclude(haystack, needle, [message]) + * + * Asserts that `haystack` does not include `needle`. Can be used to assert + * the absence of a value in an array or a subset of properties in an object. + * Deep equality is used. + * + * var obj1 = {a: 1} + * , obj2 = {b: 2}; + * assert.notDeepInclude([obj1, obj2], {a: 9}); + * assert.notDeepInclude({foo: obj1, bar: obj2}, {foo: {a: 9}}); + * assert.notDeepInclude({foo: obj1, bar: obj2}, {foo: {a: 1}, bar: {b: 9}}); + * + * @name notDeepInclude + * @param {Array|String} haystack + * @param {Mixed} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notDeepInclude = function (exp, inc, msg) { + new Assertion(exp, msg, assert.notDeepInclude, true).not.deep.include(inc); + }; + + /** + * ### .nestedInclude(haystack, needle, [message]) + * + * Asserts that 'haystack' includes 'needle'. + * Can be used to assert the inclusion of a subset of properties in an + * object. + * Enables the use of dot- and bracket-notation for referencing nested + * properties. + * '[]' and '.' in property names can be escaped using double backslashes. + * + * assert.nestedInclude({'.a': {'b': 'x'}}, {'\\.a.[b]': 'x'}); + * assert.nestedInclude({'a': {'[b]': 'x'}}, {'a.\\[b\\]': 'x'}); + * + * @name nestedInclude + * @param {Object} haystack + * @param {Object} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.nestedInclude = function (exp, inc, msg) { + new Assertion(exp, msg, assert.nestedInclude, true).nested.include(inc); + }; + + /** + * ### .notNestedInclude(haystack, needle, [message]) + * + * Asserts that 'haystack' does not include 'needle'. + * Can be used to assert the absence of a subset of properties in an + * object. + * Enables the use of dot- and bracket-notation for referencing nested + * properties. + * '[]' and '.' in property names can be escaped using double backslashes. + * + * assert.notNestedInclude({'.a': {'b': 'x'}}, {'\\.a.b': 'y'}); + * assert.notNestedInclude({'a': {'[b]': 'x'}}, {'a.\\[b\\]': 'y'}); + * + * @name notNestedInclude + * @param {Object} haystack + * @param {Object} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notNestedInclude = function (exp, inc, msg) { + new Assertion(exp, msg, assert.notNestedInclude, true) + .not.nested.include(inc); + }; + + /** + * ### .deepNestedInclude(haystack, needle, [message]) + * + * Asserts that 'haystack' includes 'needle'. + * Can be used to assert the inclusion of a subset of properties in an + * object while checking for deep equality. + * Enables the use of dot- and bracket-notation for referencing nested + * properties. + * '[]' and '.' in property names can be escaped using double backslashes. + * + * assert.deepNestedInclude({a: {b: [{x: 1}]}}, {'a.b[0]': {x: 1}}); + * assert.deepNestedInclude({'.a': {'[b]': {x: 1}}}, {'\\.a.\\[b\\]': {x: 1}}); + * + * @name deepNestedInclude + * @param {Object} haystack + * @param {Object} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.deepNestedInclude = function(exp, inc, msg) { + new Assertion(exp, msg, assert.deepNestedInclude, true) + .deep.nested.include(inc); + }; + + /** + * ### .notDeepNestedInclude(haystack, needle, [message]) + * + * Asserts that 'haystack' does not include 'needle'. + * Can be used to assert the absence of a subset of properties in an + * object while checking for deep equality. + * Enables the use of dot- and bracket-notation for referencing nested + * properties. + * '[]' and '.' in property names can be escaped using double backslashes. + * + * assert.notDeepNestedInclude({a: {b: [{x: 1}]}}, {'a.b[0]': {y: 1}}) + * assert.notDeepNestedInclude({'.a': {'[b]': {x: 1}}}, {'\\.a.\\[b\\]': {y: 2}}); + * + * @name notDeepNestedInclude + * @param {Object} haystack + * @param {Object} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notDeepNestedInclude = function(exp, inc, msg) { + new Assertion(exp, msg, assert.notDeepNestedInclude, true) + .not.deep.nested.include(inc); + }; + + /** + * ### .ownInclude(haystack, needle, [message]) + * + * Asserts that 'haystack' includes 'needle'. + * Can be used to assert the inclusion of a subset of properties in an + * object while ignoring inherited properties. + * + * assert.ownInclude({ a: 1 }, { a: 1 }); + * + * @name ownInclude + * @param {Object} haystack + * @param {Object} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.ownInclude = function(exp, inc, msg) { + new Assertion(exp, msg, assert.ownInclude, true).own.include(inc); + }; + + /** + * ### .notOwnInclude(haystack, needle, [message]) + * + * Asserts that 'haystack' includes 'needle'. + * Can be used to assert the absence of a subset of properties in an + * object while ignoring inherited properties. + * + * Object.prototype.b = 2; + * + * assert.notOwnInclude({ a: 1 }, { b: 2 }); + * + * @name notOwnInclude + * @param {Object} haystack + * @param {Object} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notOwnInclude = function(exp, inc, msg) { + new Assertion(exp, msg, assert.notOwnInclude, true).not.own.include(inc); + }; + + /** + * ### .deepOwnInclude(haystack, needle, [message]) + * + * Asserts that 'haystack' includes 'needle'. + * Can be used to assert the inclusion of a subset of properties in an + * object while ignoring inherited properties and checking for deep equality. + * + * assert.deepOwnInclude({a: {b: 2}}, {a: {b: 2}}); + * + * @name deepOwnInclude + * @param {Object} haystack + * @param {Object} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.deepOwnInclude = function(exp, inc, msg) { + new Assertion(exp, msg, assert.deepOwnInclude, true) + .deep.own.include(inc); + }; + + /** + * ### .notDeepOwnInclude(haystack, needle, [message]) + * + * Asserts that 'haystack' includes 'needle'. + * Can be used to assert the absence of a subset of properties in an + * object while ignoring inherited properties and checking for deep equality. + * + * assert.notDeepOwnInclude({a: {b: 2}}, {a: {c: 3}}); + * + * @name notDeepOwnInclude + * @param {Object} haystack + * @param {Object} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notDeepOwnInclude = function(exp, inc, msg) { + new Assertion(exp, msg, assert.notDeepOwnInclude, true) + .not.deep.own.include(inc); + }; + + /** + * ### .match(value, regexp, [message]) + * + * Asserts that `value` matches the regular expression `regexp`. + * + * assert.match('foobar', /^foo/, 'regexp matches'); + * + * @name match + * @param {Mixed} value + * @param {RegExp} regexp + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.match = function (exp, re, msg) { + new Assertion(exp, msg, assert.match, true).to.match(re); + }; + + /** + * ### .notMatch(value, regexp, [message]) + * + * Asserts that `value` does not match the regular expression `regexp`. + * + * assert.notMatch('foobar', /^foo/, 'regexp does not match'); + * + * @name notMatch + * @param {Mixed} value + * @param {RegExp} regexp + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notMatch = function (exp, re, msg) { + new Assertion(exp, msg, assert.notMatch, true).to.not.match(re); + }; + + /** + * ### .property(object, property, [message]) + * + * Asserts that `object` has a direct or inherited property named by + * `property`. + * + * assert.property({ tea: { green: 'matcha' }}, 'tea'); + * assert.property({ tea: { green: 'matcha' }}, 'toString'); + * + * @name property + * @param {Object} object + * @param {String} property + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.property = function (obj, prop, msg) { + new Assertion(obj, msg, assert.property, true).to.have.property(prop); + }; + + /** + * ### .notProperty(object, property, [message]) + * + * Asserts that `object` does _not_ have a direct or inherited property named + * by `property`. + * + * assert.notProperty({ tea: { green: 'matcha' }}, 'coffee'); + * + * @name notProperty + * @param {Object} object + * @param {String} property + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notProperty = function (obj, prop, msg) { + new Assertion(obj, msg, assert.notProperty, true) + .to.not.have.property(prop); + }; + + /** + * ### .propertyVal(object, property, value, [message]) + * + * Asserts that `object` has a direct or inherited property named by + * `property` with a value given by `value`. Uses a strict equality check + * (===). + * + * assert.propertyVal({ tea: 'is good' }, 'tea', 'is good'); + * + * @name propertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.propertyVal = function (obj, prop, val, msg) { + new Assertion(obj, msg, assert.propertyVal, true) + .to.have.property(prop, val); + }; + + /** + * ### .notPropertyVal(object, property, value, [message]) + * + * Asserts that `object` does _not_ have a direct or inherited property named + * by `property` with value given by `value`. Uses a strict equality check + * (===). + * + * assert.notPropertyVal({ tea: 'is good' }, 'tea', 'is bad'); + * assert.notPropertyVal({ tea: 'is good' }, 'coffee', 'is good'); + * + * @name notPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notPropertyVal = function (obj, prop, val, msg) { + new Assertion(obj, msg, assert.notPropertyVal, true) + .to.not.have.property(prop, val); + }; + + /** + * ### .deepPropertyVal(object, property, value, [message]) + * + * Asserts that `object` has a direct or inherited property named by + * `property` with a value given by `value`. Uses a deep equality check. + * + * assert.deepPropertyVal({ tea: { green: 'matcha' } }, 'tea', { green: 'matcha' }); + * + * @name deepPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.deepPropertyVal = function (obj, prop, val, msg) { + new Assertion(obj, msg, assert.deepPropertyVal, true) + .to.have.deep.property(prop, val); + }; + + /** + * ### .notDeepPropertyVal(object, property, value, [message]) + * + * Asserts that `object` does _not_ have a direct or inherited property named + * by `property` with value given by `value`. Uses a deep equality check. + * + * assert.notDeepPropertyVal({ tea: { green: 'matcha' } }, 'tea', { black: 'matcha' }); + * assert.notDeepPropertyVal({ tea: { green: 'matcha' } }, 'tea', { green: 'oolong' }); + * assert.notDeepPropertyVal({ tea: { green: 'matcha' } }, 'coffee', { green: 'matcha' }); + * + * @name notDeepPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notDeepPropertyVal = function (obj, prop, val, msg) { + new Assertion(obj, msg, assert.notDeepPropertyVal, true) + .to.not.have.deep.property(prop, val); + }; + + /** + * ### .ownProperty(object, property, [message]) + * + * Asserts that `object` has a direct property named by `property`. Inherited + * properties aren't checked. + * + * assert.ownProperty({ tea: { green: 'matcha' }}, 'tea'); + * + * @name ownProperty + * @param {Object} object + * @param {String} property + * @param {String} message + * @api public + */ + + assert.ownProperty = function (obj, prop, msg) { + new Assertion(obj, msg, assert.ownProperty, true) + .to.have.own.property(prop); + }; + + /** + * ### .notOwnProperty(object, property, [message]) + * + * Asserts that `object` does _not_ have a direct property named by + * `property`. Inherited properties aren't checked. + * + * assert.notOwnProperty({ tea: { green: 'matcha' }}, 'coffee'); + * assert.notOwnProperty({}, 'toString'); + * + * @name notOwnProperty + * @param {Object} object + * @param {String} property + * @param {String} message + * @api public + */ + + assert.notOwnProperty = function (obj, prop, msg) { + new Assertion(obj, msg, assert.notOwnProperty, true) + .to.not.have.own.property(prop); + }; + + /** + * ### .ownPropertyVal(object, property, value, [message]) + * + * Asserts that `object` has a direct property named by `property` and a value + * equal to the provided `value`. Uses a strict equality check (===). + * Inherited properties aren't checked. + * + * assert.ownPropertyVal({ coffee: 'is good'}, 'coffee', 'is good'); + * + * @name ownPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @api public + */ + + assert.ownPropertyVal = function (obj, prop, value, msg) { + new Assertion(obj, msg, assert.ownPropertyVal, true) + .to.have.own.property(prop, value); + }; + + /** + * ### .notOwnPropertyVal(object, property, value, [message]) + * + * Asserts that `object` does _not_ have a direct property named by `property` + * with a value equal to the provided `value`. Uses a strict equality check + * (===). Inherited properties aren't checked. + * + * assert.notOwnPropertyVal({ tea: 'is better'}, 'tea', 'is worse'); + * assert.notOwnPropertyVal({}, 'toString', Object.prototype.toString); + * + * @name notOwnPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @api public + */ + + assert.notOwnPropertyVal = function (obj, prop, value, msg) { + new Assertion(obj, msg, assert.notOwnPropertyVal, true) + .to.not.have.own.property(prop, value); + }; + + /** + * ### .deepOwnPropertyVal(object, property, value, [message]) + * + * Asserts that `object` has a direct property named by `property` and a value + * equal to the provided `value`. Uses a deep equality check. Inherited + * properties aren't checked. + * + * assert.deepOwnPropertyVal({ tea: { green: 'matcha' } }, 'tea', { green: 'matcha' }); + * + * @name deepOwnPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @api public + */ + + assert.deepOwnPropertyVal = function (obj, prop, value, msg) { + new Assertion(obj, msg, assert.deepOwnPropertyVal, true) + .to.have.deep.own.property(prop, value); + }; + + /** + * ### .notDeepOwnPropertyVal(object, property, value, [message]) + * + * Asserts that `object` does _not_ have a direct property named by `property` + * with a value equal to the provided `value`. Uses a deep equality check. + * Inherited properties aren't checked. + * + * assert.notDeepOwnPropertyVal({ tea: { green: 'matcha' } }, 'tea', { black: 'matcha' }); + * assert.notDeepOwnPropertyVal({ tea: { green: 'matcha' } }, 'tea', { green: 'oolong' }); + * assert.notDeepOwnPropertyVal({ tea: { green: 'matcha' } }, 'coffee', { green: 'matcha' }); + * assert.notDeepOwnPropertyVal({}, 'toString', Object.prototype.toString); + * + * @name notDeepOwnPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @api public + */ + + assert.notDeepOwnPropertyVal = function (obj, prop, value, msg) { + new Assertion(obj, msg, assert.notDeepOwnPropertyVal, true) + .to.not.have.deep.own.property(prop, value); + }; + + /** + * ### .nestedProperty(object, property, [message]) + * + * Asserts that `object` has a direct or inherited property named by + * `property`, which can be a string using dot- and bracket-notation for + * nested reference. + * + * assert.nestedProperty({ tea: { green: 'matcha' }}, 'tea.green'); + * + * @name nestedProperty + * @param {Object} object + * @param {String} property + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.nestedProperty = function (obj, prop, msg) { + new Assertion(obj, msg, assert.nestedProperty, true) + .to.have.nested.property(prop); + }; + + /** + * ### .notNestedProperty(object, property, [message]) + * + * Asserts that `object` does _not_ have a property named by `property`, which + * can be a string using dot- and bracket-notation for nested reference. The + * property cannot exist on the object nor anywhere in its prototype chain. + * + * assert.notNestedProperty({ tea: { green: 'matcha' }}, 'tea.oolong'); + * + * @name notNestedProperty + * @param {Object} object + * @param {String} property + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notNestedProperty = function (obj, prop, msg) { + new Assertion(obj, msg, assert.notNestedProperty, true) + .to.not.have.nested.property(prop); + }; + + /** + * ### .nestedPropertyVal(object, property, value, [message]) + * + * Asserts that `object` has a property named by `property` with value given + * by `value`. `property` can use dot- and bracket-notation for nested + * reference. Uses a strict equality check (===). + * + * assert.nestedPropertyVal({ tea: { green: 'matcha' }}, 'tea.green', 'matcha'); + * + * @name nestedPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.nestedPropertyVal = function (obj, prop, val, msg) { + new Assertion(obj, msg, assert.nestedPropertyVal, true) + .to.have.nested.property(prop, val); + }; + + /** + * ### .notNestedPropertyVal(object, property, value, [message]) + * + * Asserts that `object` does _not_ have a property named by `property` with + * value given by `value`. `property` can use dot- and bracket-notation for + * nested reference. Uses a strict equality check (===). + * + * assert.notNestedPropertyVal({ tea: { green: 'matcha' }}, 'tea.green', 'konacha'); + * assert.notNestedPropertyVal({ tea: { green: 'matcha' }}, 'coffee.green', 'matcha'); + * + * @name notNestedPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notNestedPropertyVal = function (obj, prop, val, msg) { + new Assertion(obj, msg, assert.notNestedPropertyVal, true) + .to.not.have.nested.property(prop, val); + }; + + /** + * ### .deepNestedPropertyVal(object, property, value, [message]) + * + * Asserts that `object` has a property named by `property` with a value given + * by `value`. `property` can use dot- and bracket-notation for nested + * reference. Uses a deep equality check. + * + * assert.deepNestedPropertyVal({ tea: { green: { matcha: 'yum' } } }, 'tea.green', { matcha: 'yum' }); + * + * @name deepNestedPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.deepNestedPropertyVal = function (obj, prop, val, msg) { + new Assertion(obj, msg, assert.deepNestedPropertyVal, true) + .to.have.deep.nested.property(prop, val); + }; + + /** + * ### .notDeepNestedPropertyVal(object, property, value, [message]) + * + * Asserts that `object` does _not_ have a property named by `property` with + * value given by `value`. `property` can use dot- and bracket-notation for + * nested reference. Uses a deep equality check. + * + * assert.notDeepNestedPropertyVal({ tea: { green: { matcha: 'yum' } } }, 'tea.green', { oolong: 'yum' }); + * assert.notDeepNestedPropertyVal({ tea: { green: { matcha: 'yum' } } }, 'tea.green', { matcha: 'yuck' }); + * assert.notDeepNestedPropertyVal({ tea: { green: { matcha: 'yum' } } }, 'tea.black', { matcha: 'yum' }); + * + * @name notDeepNestedPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notDeepNestedPropertyVal = function (obj, prop, val, msg) { + new Assertion(obj, msg, assert.notDeepNestedPropertyVal, true) + .to.not.have.deep.nested.property(prop, val); + } + + /** + * ### .lengthOf(object, length, [message]) + * + * Asserts that `object` has a `length` or `size` with the expected value. + * + * assert.lengthOf([1,2,3], 3, 'array has length of 3'); + * assert.lengthOf('foobar', 6, 'string has length of 6'); + * assert.lengthOf(new Set([1,2,3]), 3, 'set has size of 3'); + * assert.lengthOf(new Map([['a',1],['b',2],['c',3]]), 3, 'map has size of 3'); + * + * @name lengthOf + * @param {Mixed} object + * @param {Number} length + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.lengthOf = function (exp, len, msg) { + new Assertion(exp, msg, assert.lengthOf, true).to.have.lengthOf(len); + }; + + /** + * ### .hasAnyKeys(object, [keys], [message]) + * + * Asserts that `object` has at least one of the `keys` provided. + * You can also provide a single object instead of a `keys` array and its keys + * will be used as the expected set of keys. + * + * assert.hasAnyKeys({foo: 1, bar: 2, baz: 3}, ['foo', 'iDontExist', 'baz']); + * assert.hasAnyKeys({foo: 1, bar: 2, baz: 3}, {foo: 30, iDontExist: 99, baz: 1337}); + * assert.hasAnyKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{foo: 1}, 'key']); + * assert.hasAnyKeys(new Set([{foo: 'bar'}, 'anotherKey']), [{foo: 'bar'}, 'anotherKey']); + * + * @name hasAnyKeys + * @param {Mixed} object + * @param {Array|Object} keys + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.hasAnyKeys = function (obj, keys, msg) { + new Assertion(obj, msg, assert.hasAnyKeys, true).to.have.any.keys(keys); + } + + /** + * ### .hasAllKeys(object, [keys], [message]) + * + * Asserts that `object` has all and only all of the `keys` provided. + * You can also provide a single object instead of a `keys` array and its keys + * will be used as the expected set of keys. + * + * assert.hasAllKeys({foo: 1, bar: 2, baz: 3}, ['foo', 'bar', 'baz']); + * assert.hasAllKeys({foo: 1, bar: 2, baz: 3}, {foo: 30, bar: 99, baz: 1337]); + * assert.hasAllKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{foo: 1}, 'key']); + * assert.hasAllKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{foo: 'bar'}, 'anotherKey']); + * + * @name hasAllKeys + * @param {Mixed} object + * @param {String[]} keys + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.hasAllKeys = function (obj, keys, msg) { + new Assertion(obj, msg, assert.hasAllKeys, true).to.have.all.keys(keys); + } + + /** + * ### .containsAllKeys(object, [keys], [message]) + * + * Asserts that `object` has all of the `keys` provided but may have more keys not listed. + * You can also provide a single object instead of a `keys` array and its keys + * will be used as the expected set of keys. + * + * assert.containsAllKeys({foo: 1, bar: 2, baz: 3}, ['foo', 'baz']); + * assert.containsAllKeys({foo: 1, bar: 2, baz: 3}, ['foo', 'bar', 'baz']); + * assert.containsAllKeys({foo: 1, bar: 2, baz: 3}, {foo: 30, baz: 1337}); + * assert.containsAllKeys({foo: 1, bar: 2, baz: 3}, {foo: 30, bar: 99, baz: 1337}); + * assert.containsAllKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{foo: 1}]); + * assert.containsAllKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{foo: 1}, 'key']); + * assert.containsAllKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{foo: 'bar'}]); + * assert.containsAllKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{foo: 'bar'}, 'anotherKey']); + * + * @name containsAllKeys + * @param {Mixed} object + * @param {String[]} keys + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.containsAllKeys = function (obj, keys, msg) { + new Assertion(obj, msg, assert.containsAllKeys, true) + .to.contain.all.keys(keys); + } + + /** + * ### .doesNotHaveAnyKeys(object, [keys], [message]) + * + * Asserts that `object` has none of the `keys` provided. + * You can also provide a single object instead of a `keys` array and its keys + * will be used as the expected set of keys. + * + * assert.doesNotHaveAnyKeys({foo: 1, bar: 2, baz: 3}, ['one', 'two', 'example']); + * assert.doesNotHaveAnyKeys({foo: 1, bar: 2, baz: 3}, {one: 1, two: 2, example: 'foo'}); + * assert.doesNotHaveAnyKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{one: 'two'}, 'example']); + * assert.doesNotHaveAnyKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{one: 'two'}, 'example']); + * + * @name doesNotHaveAnyKeys + * @param {Mixed} object + * @param {String[]} keys + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.doesNotHaveAnyKeys = function (obj, keys, msg) { + new Assertion(obj, msg, assert.doesNotHaveAnyKeys, true) + .to.not.have.any.keys(keys); + } + + /** + * ### .doesNotHaveAllKeys(object, [keys], [message]) + * + * Asserts that `object` does not have at least one of the `keys` provided. + * You can also provide a single object instead of a `keys` array and its keys + * will be used as the expected set of keys. + * + * assert.doesNotHaveAllKeys({foo: 1, bar: 2, baz: 3}, ['one', 'two', 'example']); + * assert.doesNotHaveAllKeys({foo: 1, bar: 2, baz: 3}, {one: 1, two: 2, example: 'foo'}); + * assert.doesNotHaveAllKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{one: 'two'}, 'example']); + * assert.doesNotHaveAllKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{one: 'two'}, 'example']); + * + * @name doesNotHaveAllKeys + * @param {Mixed} object + * @param {String[]} keys + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.doesNotHaveAllKeys = function (obj, keys, msg) { + new Assertion(obj, msg, assert.doesNotHaveAllKeys, true) + .to.not.have.all.keys(keys); + } + + /** + * ### .hasAnyDeepKeys(object, [keys], [message]) + * + * Asserts that `object` has at least one of the `keys` provided. + * Since Sets and Maps can have objects as keys you can use this assertion to perform + * a deep comparison. + * You can also provide a single object instead of a `keys` array and its keys + * will be used as the expected set of keys. + * + * assert.hasAnyDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [1, 2]]), {one: 'one'}); + * assert.hasAnyDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [1, 2]]), [{one: 'one'}, {two: 'two'}]); + * assert.hasAnyDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [{two: 'two'}, 'valueTwo']]), [{one: 'one'}, {two: 'two'}]); + * assert.hasAnyDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), {one: 'one'}); + * assert.hasAnyDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{one: 'one'}, {three: 'three'}]); + * assert.hasAnyDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{one: 'one'}, {two: 'two'}]); + * + * @name doesNotHaveAllKeys + * @param {Mixed} object + * @param {Array|Object} keys + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.hasAnyDeepKeys = function (obj, keys, msg) { + new Assertion(obj, msg, assert.hasAnyDeepKeys, true) + .to.have.any.deep.keys(keys); + } + + /** + * ### .hasAllDeepKeys(object, [keys], [message]) + * + * Asserts that `object` has all and only all of the `keys` provided. + * Since Sets and Maps can have objects as keys you can use this assertion to perform + * a deep comparison. + * You can also provide a single object instead of a `keys` array and its keys + * will be used as the expected set of keys. + * + * assert.hasAllDeepKeys(new Map([[{one: 'one'}, 'valueOne']]), {one: 'one'}); + * assert.hasAllDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [{two: 'two'}, 'valueTwo']]), [{one: 'one'}, {two: 'two'}]); + * assert.hasAllDeepKeys(new Set([{one: 'one'}]), {one: 'one'}); + * assert.hasAllDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{one: 'one'}, {two: 'two'}]); + * + * @name hasAllDeepKeys + * @param {Mixed} object + * @param {Array|Object} keys + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.hasAllDeepKeys = function (obj, keys, msg) { + new Assertion(obj, msg, assert.hasAllDeepKeys, true) + .to.have.all.deep.keys(keys); + } + + /** + * ### .containsAllDeepKeys(object, [keys], [message]) + * + * Asserts that `object` contains all of the `keys` provided. + * Since Sets and Maps can have objects as keys you can use this assertion to perform + * a deep comparison. + * You can also provide a single object instead of a `keys` array and its keys + * will be used as the expected set of keys. + * + * assert.containsAllDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [1, 2]]), {one: 'one'}); + * assert.containsAllDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [{two: 'two'}, 'valueTwo']]), [{one: 'one'}, {two: 'two'}]); + * assert.containsAllDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), {one: 'one'}); + * assert.containsAllDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{one: 'one'}, {two: 'two'}]); + * + * @name containsAllDeepKeys + * @param {Mixed} object + * @param {Array|Object} keys + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.containsAllDeepKeys = function (obj, keys, msg) { + new Assertion(obj, msg, assert.containsAllDeepKeys, true) + .to.contain.all.deep.keys(keys); + } + + /** + * ### .doesNotHaveAnyDeepKeys(object, [keys], [message]) + * + * Asserts that `object` has none of the `keys` provided. + * Since Sets and Maps can have objects as keys you can use this assertion to perform + * a deep comparison. + * You can also provide a single object instead of a `keys` array and its keys + * will be used as the expected set of keys. + * + * assert.doesNotHaveAnyDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [1, 2]]), {thisDoesNot: 'exist'}); + * assert.doesNotHaveAnyDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [{two: 'two'}, 'valueTwo']]), [{twenty: 'twenty'}, {fifty: 'fifty'}]); + * assert.doesNotHaveAnyDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), {twenty: 'twenty'}); + * assert.doesNotHaveAnyDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{twenty: 'twenty'}, {fifty: 'fifty'}]); + * + * @name doesNotHaveAnyDeepKeys + * @param {Mixed} object + * @param {Array|Object} keys + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.doesNotHaveAnyDeepKeys = function (obj, keys, msg) { + new Assertion(obj, msg, assert.doesNotHaveAnyDeepKeys, true) + .to.not.have.any.deep.keys(keys); + } + + /** + * ### .doesNotHaveAllDeepKeys(object, [keys], [message]) + * + * Asserts that `object` does not have at least one of the `keys` provided. + * Since Sets and Maps can have objects as keys you can use this assertion to perform + * a deep comparison. + * You can also provide a single object instead of a `keys` array and its keys + * will be used as the expected set of keys. + * + * assert.doesNotHaveAllDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [1, 2]]), {thisDoesNot: 'exist'}); + * assert.doesNotHaveAllDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [{two: 'two'}, 'valueTwo']]), [{twenty: 'twenty'}, {one: 'one'}]); + * assert.doesNotHaveAllDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), {twenty: 'twenty'}); + * assert.doesNotHaveAllDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{one: 'one'}, {fifty: 'fifty'}]); + * + * @name doesNotHaveAllDeepKeys + * @param {Mixed} object + * @param {Array|Object} keys + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.doesNotHaveAllDeepKeys = function (obj, keys, msg) { + new Assertion(obj, msg, assert.doesNotHaveAllDeepKeys, true) + .to.not.have.all.deep.keys(keys); + } + + /** + * ### .throws(fn, [errorLike/string/regexp], [string/regexp], [message]) + * + * If `errorLike` is an `Error` constructor, asserts that `fn` will throw an error that is an + * instance of `errorLike`. + * If `errorLike` is an `Error` instance, asserts that the error thrown is the same + * instance as `errorLike`. + * If `errMsgMatcher` is provided, it also asserts that the error thrown will have a + * message matching `errMsgMatcher`. + * + * assert.throws(fn, 'Error thrown must have this msg'); + * assert.throws(fn, /Error thrown must have a msg that matches this/); + * assert.throws(fn, ReferenceError); + * assert.throws(fn, errorInstance); + * assert.throws(fn, ReferenceError, 'Error thrown must be a ReferenceError and have this msg'); + * assert.throws(fn, errorInstance, 'Error thrown must be the same errorInstance and have this msg'); + * assert.throws(fn, ReferenceError, /Error thrown must be a ReferenceError and match this/); + * assert.throws(fn, errorInstance, /Error thrown must be the same errorInstance and match this/); + * + * @name throws + * @alias throw + * @alias Throw + * @param {Function} fn + * @param {ErrorConstructor|Error} errorLike + * @param {RegExp|String} errMsgMatcher + * @param {String} message + * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types + * @namespace Assert + * @api public + */ + + assert.throws = function (fn, errorLike, errMsgMatcher, msg) { + if ('string' === typeof errorLike || errorLike instanceof RegExp) { + errMsgMatcher = errorLike; + errorLike = null; + } + + var assertErr = new Assertion(fn, msg, assert.throws, true) + .to.throw(errorLike, errMsgMatcher); + return flag(assertErr, 'object'); + }; + + /** + * ### .doesNotThrow(fn, [errorLike/string/regexp], [string/regexp], [message]) + * + * If `errorLike` is an `Error` constructor, asserts that `fn` will _not_ throw an error that is an + * instance of `errorLike`. + * If `errorLike` is an `Error` instance, asserts that the error thrown is _not_ the same + * instance as `errorLike`. + * If `errMsgMatcher` is provided, it also asserts that the error thrown will _not_ have a + * message matching `errMsgMatcher`. + * + * assert.doesNotThrow(fn, 'Any Error thrown must not have this message'); + * assert.doesNotThrow(fn, /Any Error thrown must not match this/); + * assert.doesNotThrow(fn, Error); + * assert.doesNotThrow(fn, errorInstance); + * assert.doesNotThrow(fn, Error, 'Error must not have this message'); + * assert.doesNotThrow(fn, errorInstance, 'Error must not have this message'); + * assert.doesNotThrow(fn, Error, /Error must not match this/); + * assert.doesNotThrow(fn, errorInstance, /Error must not match this/); + * + * @name doesNotThrow + * @param {Function} fn + * @param {ErrorConstructor} errorLike + * @param {RegExp|String} errMsgMatcher + * @param {String} message + * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types + * @namespace Assert + * @api public + */ + + assert.doesNotThrow = function (fn, errorLike, errMsgMatcher, msg) { + if ('string' === typeof errorLike || errorLike instanceof RegExp) { + errMsgMatcher = errorLike; + errorLike = null; + } + + new Assertion(fn, msg, assert.doesNotThrow, true) + .to.not.throw(errorLike, errMsgMatcher); + }; + + /** + * ### .operator(val1, operator, val2, [message]) + * + * Compares two values using `operator`. + * + * assert.operator(1, '<', 2, 'everything is ok'); + * assert.operator(1, '>', 2, 'this will fail'); + * + * @name operator + * @param {Mixed} val1 + * @param {String} operator + * @param {Mixed} val2 + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.operator = function (val, operator, val2, msg) { + var ok; + switch(operator) { + case '==': + ok = val == val2; + break; + case '===': + ok = val === val2; + break; + case '>': + ok = val > val2; + break; + case '>=': + ok = val >= val2; + break; + case '<': + ok = val < val2; + break; + case '<=': + ok = val <= val2; + break; + case '!=': + ok = val != val2; + break; + case '!==': + ok = val !== val2; + break; + default: + msg = msg ? msg + ': ' : msg; + throw new chai.AssertionError( + msg + 'Invalid operator "' + operator + '"', + undefined, + assert.operator + ); + } + var test = new Assertion(ok, msg, assert.operator, true); + test.assert( + true === flag(test, 'object') + , 'expected ' + util.inspect(val) + ' to be ' + operator + ' ' + util.inspect(val2) + , 'expected ' + util.inspect(val) + ' to not be ' + operator + ' ' + util.inspect(val2) ); + }; + + /** + * ### .closeTo(actual, expected, delta, [message]) + * + * Asserts that the target is equal `expected`, to within a +/- `delta` range. + * + * assert.closeTo(1.5, 1, 0.5, 'numbers are close'); + * + * @name closeTo + * @param {Number} actual + * @param {Number} expected + * @param {Number} delta + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.closeTo = function (act, exp, delta, msg) { + new Assertion(act, msg, assert.closeTo, true).to.be.closeTo(exp, delta); + }; + + /** + * ### .approximately(actual, expected, delta, [message]) + * + * Asserts that the target is equal `expected`, to within a +/- `delta` range. + * + * assert.approximately(1.5, 1, 0.5, 'numbers are close'); + * + * @name approximately + * @param {Number} actual + * @param {Number} expected + * @param {Number} delta + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.approximately = function (act, exp, delta, msg) { + new Assertion(act, msg, assert.approximately, true) + .to.be.approximately(exp, delta); + }; + + /** + * ### .sameMembers(set1, set2, [message]) + * + * Asserts that `set1` and `set2` have the same members in any order. Uses a + * strict equality check (===). + * + * assert.sameMembers([ 1, 2, 3 ], [ 2, 1, 3 ], 'same members'); + * + * @name sameMembers + * @param {Array} set1 + * @param {Array} set2 + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.sameMembers = function (set1, set2, msg) { + new Assertion(set1, msg, assert.sameMembers, true) + .to.have.same.members(set2); + } + + /** + * ### .notSameMembers(set1, set2, [message]) + * + * Asserts that `set1` and `set2` don't have the same members in any order. + * Uses a strict equality check (===). + * + * assert.notSameMembers([ 1, 2, 3 ], [ 5, 1, 3 ], 'not same members'); + * + * @name notSameMembers + * @param {Array} set1 + * @param {Array} set2 + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notSameMembers = function (set1, set2, msg) { + new Assertion(set1, msg, assert.notSameMembers, true) + .to.not.have.same.members(set2); + } + + /** + * ### .sameDeepMembers(set1, set2, [message]) + * + * Asserts that `set1` and `set2` have the same members in any order. Uses a + * deep equality check. + * + * assert.sameDeepMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [{ b: 2 }, { a: 1 }, { c: 3 }], 'same deep members'); + * + * @name sameDeepMembers + * @param {Array} set1 + * @param {Array} set2 + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.sameDeepMembers = function (set1, set2, msg) { + new Assertion(set1, msg, assert.sameDeepMembers, true) + .to.have.same.deep.members(set2); + } + + /** + * ### .notSameDeepMembers(set1, set2, [message]) + * + * Asserts that `set1` and `set2` don't have the same members in any order. + * Uses a deep equality check. + * + * assert.notSameDeepMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [{ b: 2 }, { a: 1 }, { f: 5 }], 'not same deep members'); + * + * @name notSameDeepMembers + * @param {Array} set1 + * @param {Array} set2 + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notSameDeepMembers = function (set1, set2, msg) { + new Assertion(set1, msg, assert.notSameDeepMembers, true) + .to.not.have.same.deep.members(set2); + } + + /** + * ### .sameOrderedMembers(set1, set2, [message]) + * + * Asserts that `set1` and `set2` have the same members in the same order. + * Uses a strict equality check (===). + * + * assert.sameOrderedMembers([ 1, 2, 3 ], [ 1, 2, 3 ], 'same ordered members'); + * + * @name sameOrderedMembers + * @param {Array} set1 + * @param {Array} set2 + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.sameOrderedMembers = function (set1, set2, msg) { + new Assertion(set1, msg, assert.sameOrderedMembers, true) + .to.have.same.ordered.members(set2); + } + + /** + * ### .notSameOrderedMembers(set1, set2, [message]) + * + * Asserts that `set1` and `set2` don't have the same members in the same + * order. Uses a strict equality check (===). + * + * assert.notSameOrderedMembers([ 1, 2, 3 ], [ 2, 1, 3 ], 'not same ordered members'); + * + * @name notSameOrderedMembers + * @param {Array} set1 + * @param {Array} set2 + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notSameOrderedMembers = function (set1, set2, msg) { + new Assertion(set1, msg, assert.notSameOrderedMembers, true) + .to.not.have.same.ordered.members(set2); + } + + /** + * ### .sameDeepOrderedMembers(set1, set2, [message]) + * + * Asserts that `set1` and `set2` have the same members in the same order. + * Uses a deep equality check. + * + * assert.sameDeepOrderedMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { a: 1 }, { b: 2 }, { c: 3 } ], 'same deep ordered members'); + * + * @name sameDeepOrderedMembers + * @param {Array} set1 + * @param {Array} set2 + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.sameDeepOrderedMembers = function (set1, set2, msg) { + new Assertion(set1, msg, assert.sameDeepOrderedMembers, true) + .to.have.same.deep.ordered.members(set2); + } + + /** + * ### .notSameDeepOrderedMembers(set1, set2, [message]) + * + * Asserts that `set1` and `set2` don't have the same members in the same + * order. Uses a deep equality check. + * + * assert.notSameDeepOrderedMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { a: 1 }, { b: 2 }, { z: 5 } ], 'not same deep ordered members'); + * assert.notSameDeepOrderedMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { b: 2 }, { a: 1 }, { c: 3 } ], 'not same deep ordered members'); + * + * @name notSameDeepOrderedMembers + * @param {Array} set1 + * @param {Array} set2 + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notSameDeepOrderedMembers = function (set1, set2, msg) { + new Assertion(set1, msg, assert.notSameDeepOrderedMembers, true) + .to.not.have.same.deep.ordered.members(set2); + } + + /** + * ### .includeMembers(superset, subset, [message]) + * + * Asserts that `subset` is included in `superset` in any order. Uses a + * strict equality check (===). Duplicates are ignored. + * + * assert.includeMembers([ 1, 2, 3 ], [ 2, 1, 2 ], 'include members'); + * + * @name includeMembers + * @param {Array} superset + * @param {Array} subset + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.includeMembers = function (superset, subset, msg) { + new Assertion(superset, msg, assert.includeMembers, true) + .to.include.members(subset); + } + + /** + * ### .notIncludeMembers(superset, subset, [message]) + * + * Asserts that `subset` isn't included in `superset` in any order. Uses a + * strict equality check (===). Duplicates are ignored. + * + * assert.notIncludeMembers([ 1, 2, 3 ], [ 5, 1 ], 'not include members'); + * + * @name notIncludeMembers + * @param {Array} superset + * @param {Array} subset + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notIncludeMembers = function (superset, subset, msg) { + new Assertion(superset, msg, assert.notIncludeMembers, true) + .to.not.include.members(subset); + } + + /** + * ### .includeDeepMembers(superset, subset, [message]) + * + * Asserts that `subset` is included in `superset` in any order. Uses a deep + * equality check. Duplicates are ignored. + * + * assert.includeDeepMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { b: 2 }, { a: 1 }, { b: 2 } ], 'include deep members'); + * + * @name includeDeepMembers + * @param {Array} superset + * @param {Array} subset + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.includeDeepMembers = function (superset, subset, msg) { + new Assertion(superset, msg, assert.includeDeepMembers, true) + .to.include.deep.members(subset); + } + + /** + * ### .notIncludeDeepMembers(superset, subset, [message]) + * + * Asserts that `subset` isn't included in `superset` in any order. Uses a + * deep equality check. Duplicates are ignored. + * + * assert.notIncludeDeepMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { b: 2 }, { f: 5 } ], 'not include deep members'); + * + * @name notIncludeDeepMembers + * @param {Array} superset + * @param {Array} subset + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notIncludeDeepMembers = function (superset, subset, msg) { + new Assertion(superset, msg, assert.notIncludeDeepMembers, true) + .to.not.include.deep.members(subset); + } + + /** + * ### .includeOrderedMembers(superset, subset, [message]) + * + * Asserts that `subset` is included in `superset` in the same order + * beginning with the first element in `superset`. Uses a strict equality + * check (===). + * + * assert.includeOrderedMembers([ 1, 2, 3 ], [ 1, 2 ], 'include ordered members'); + * + * @name includeOrderedMembers + * @param {Array} superset + * @param {Array} subset + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.includeOrderedMembers = function (superset, subset, msg) { + new Assertion(superset, msg, assert.includeOrderedMembers, true) + .to.include.ordered.members(subset); + } + + /** + * ### .notIncludeOrderedMembers(superset, subset, [message]) + * + * Asserts that `subset` isn't included in `superset` in the same order + * beginning with the first element in `superset`. Uses a strict equality + * check (===). + * + * assert.notIncludeOrderedMembers([ 1, 2, 3 ], [ 2, 1 ], 'not include ordered members'); + * assert.notIncludeOrderedMembers([ 1, 2, 3 ], [ 2, 3 ], 'not include ordered members'); + * + * @name notIncludeOrderedMembers + * @param {Array} superset + * @param {Array} subset + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notIncludeOrderedMembers = function (superset, subset, msg) { + new Assertion(superset, msg, assert.notIncludeOrderedMembers, true) + .to.not.include.ordered.members(subset); + } + + /** + * ### .includeDeepOrderedMembers(superset, subset, [message]) + * + * Asserts that `subset` is included in `superset` in the same order + * beginning with the first element in `superset`. Uses a deep equality + * check. + * + * assert.includeDeepOrderedMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { a: 1 }, { b: 2 } ], 'include deep ordered members'); + * + * @name includeDeepOrderedMembers + * @param {Array} superset + * @param {Array} subset + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.includeDeepOrderedMembers = function (superset, subset, msg) { + new Assertion(superset, msg, assert.includeDeepOrderedMembers, true) + .to.include.deep.ordered.members(subset); + } + + /** + * ### .notIncludeDeepOrderedMembers(superset, subset, [message]) + * + * Asserts that `subset` isn't included in `superset` in the same order + * beginning with the first element in `superset`. Uses a deep equality + * check. + * + * assert.notIncludeDeepOrderedMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { a: 1 }, { f: 5 } ], 'not include deep ordered members'); + * assert.notIncludeDeepOrderedMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { b: 2 }, { a: 1 } ], 'not include deep ordered members'); + * assert.notIncludeDeepOrderedMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { b: 2 }, { c: 3 } ], 'not include deep ordered members'); + * + * @name notIncludeDeepOrderedMembers + * @param {Array} superset + * @param {Array} subset + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notIncludeDeepOrderedMembers = function (superset, subset, msg) { + new Assertion(superset, msg, assert.notIncludeDeepOrderedMembers, true) + .to.not.include.deep.ordered.members(subset); + } + + /** + * ### .oneOf(inList, list, [message]) + * + * Asserts that non-object, non-array value `inList` appears in the flat array `list`. + * + * assert.oneOf(1, [ 2, 1 ], 'Not found in list'); + * + * @name oneOf + * @param {*} inList + * @param {Array<*>} list + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.oneOf = function (inList, list, msg) { + new Assertion(inList, msg, assert.oneOf, true).to.be.oneOf(list); + } + + /** + * ### .changes(function, object, property, [message]) + * + * Asserts that a function changes the value of a property. + * + * var obj = { val: 10 }; + * var fn = function() { obj.val = 22 }; + * assert.changes(fn, obj, 'val'); + * + * @name changes + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.changes = function (fn, obj, prop, msg) { + if (arguments.length === 3 && typeof obj === 'function') { + msg = prop; + prop = null; + } + + new Assertion(fn, msg, assert.changes, true).to.change(obj, prop); + } + + /** + * ### .changesBy(function, object, property, delta, [message]) + * + * Asserts that a function changes the value of a property by an amount (delta). + * + * var obj = { val: 10 }; + * var fn = function() { obj.val += 2 }; + * assert.changesBy(fn, obj, 'val', 2); + * + * @name changesBy + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {Number} change amount (delta) + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.changesBy = function (fn, obj, prop, delta, msg) { + if (arguments.length === 4 && typeof obj === 'function') { + var tmpMsg = delta; + delta = prop; + msg = tmpMsg; + } else if (arguments.length === 3) { + delta = prop; + prop = null; + } + + new Assertion(fn, msg, assert.changesBy, true) + .to.change(obj, prop).by(delta); + } + + /** + * ### .doesNotChange(function, object, property, [message]) + * + * Asserts that a function does not change the value of a property. + * + * var obj = { val: 10 }; + * var fn = function() { console.log('foo'); }; + * assert.doesNotChange(fn, obj, 'val'); + * + * @name doesNotChange + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.doesNotChange = function (fn, obj, prop, msg) { + if (arguments.length === 3 && typeof obj === 'function') { + msg = prop; + prop = null; + } + + return new Assertion(fn, msg, assert.doesNotChange, true) + .to.not.change(obj, prop); + } + + /** + * ### .changesButNotBy(function, object, property, delta, [message]) + * + * Asserts that a function does not change the value of a property or of a function's return value by an amount (delta) + * + * var obj = { val: 10 }; + * var fn = function() { obj.val += 10 }; + * assert.changesButNotBy(fn, obj, 'val', 5); + * + * @name changesButNotBy + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {Number} change amount (delta) + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.changesButNotBy = function (fn, obj, prop, delta, msg) { + if (arguments.length === 4 && typeof obj === 'function') { + var tmpMsg = delta; + delta = prop; + msg = tmpMsg; + } else if (arguments.length === 3) { + delta = prop; + prop = null; + } + + new Assertion(fn, msg, assert.changesButNotBy, true) + .to.change(obj, prop).but.not.by(delta); + } + + /** + * ### .increases(function, object, property, [message]) + * + * Asserts that a function increases a numeric object property. + * + * var obj = { val: 10 }; + * var fn = function() { obj.val = 13 }; + * assert.increases(fn, obj, 'val'); + * + * @name increases + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.increases = function (fn, obj, prop, msg) { + if (arguments.length === 3 && typeof obj === 'function') { + msg = prop; + prop = null; + } + + return new Assertion(fn, msg, assert.increases, true) + .to.increase(obj, prop); + } + + /** + * ### .increasesBy(function, object, property, delta, [message]) + * + * Asserts that a function increases a numeric object property or a function's return value by an amount (delta). + * + * var obj = { val: 10 }; + * var fn = function() { obj.val += 10 }; + * assert.increasesBy(fn, obj, 'val', 10); + * + * @name increasesBy + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {Number} change amount (delta) + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.increasesBy = function (fn, obj, prop, delta, msg) { + if (arguments.length === 4 && typeof obj === 'function') { + var tmpMsg = delta; + delta = prop; + msg = tmpMsg; + } else if (arguments.length === 3) { + delta = prop; + prop = null; + } + + new Assertion(fn, msg, assert.increasesBy, true) + .to.increase(obj, prop).by(delta); + } + + /** + * ### .doesNotIncrease(function, object, property, [message]) + * + * Asserts that a function does not increase a numeric object property. + * + * var obj = { val: 10 }; + * var fn = function() { obj.val = 8 }; + * assert.doesNotIncrease(fn, obj, 'val'); + * + * @name doesNotIncrease + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.doesNotIncrease = function (fn, obj, prop, msg) { + if (arguments.length === 3 && typeof obj === 'function') { + msg = prop; + prop = null; + } + + return new Assertion(fn, msg, assert.doesNotIncrease, true) + .to.not.increase(obj, prop); + } + + /** + * ### .increasesButNotBy(function, object, property, [message]) + * + * Asserts that a function does not increase a numeric object property or function's return value by an amount (delta). + * + * var obj = { val: 10 }; + * var fn = function() { obj.val = 15 }; + * assert.increasesButNotBy(fn, obj, 'val', 10); + * + * @name increasesButNotBy + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {Number} change amount (delta) + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.increasesButNotBy = function (fn, obj, prop, delta, msg) { + if (arguments.length === 4 && typeof obj === 'function') { + var tmpMsg = delta; + delta = prop; + msg = tmpMsg; + } else if (arguments.length === 3) { + delta = prop; + prop = null; + } + + new Assertion(fn, msg, assert.increasesButNotBy, true) + .to.increase(obj, prop).but.not.by(delta); + } + + /** + * ### .decreases(function, object, property, [message]) + * + * Asserts that a function decreases a numeric object property. + * + * var obj = { val: 10 }; + * var fn = function() { obj.val = 5 }; + * assert.decreases(fn, obj, 'val'); + * + * @name decreases + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.decreases = function (fn, obj, prop, msg) { + if (arguments.length === 3 && typeof obj === 'function') { + msg = prop; + prop = null; + } + + return new Assertion(fn, msg, assert.decreases, true) + .to.decrease(obj, prop); + } + + /** + * ### .decreasesBy(function, object, property, delta, [message]) + * + * Asserts that a function decreases a numeric object property or a function's return value by an amount (delta) + * + * var obj = { val: 10 }; + * var fn = function() { obj.val -= 5 }; + * assert.decreasesBy(fn, obj, 'val', 5); + * + * @name decreasesBy + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {Number} change amount (delta) + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.decreasesBy = function (fn, obj, prop, delta, msg) { + if (arguments.length === 4 && typeof obj === 'function') { + var tmpMsg = delta; + delta = prop; + msg = tmpMsg; + } else if (arguments.length === 3) { + delta = prop; + prop = null; + } + + new Assertion(fn, msg, assert.decreasesBy, true) + .to.decrease(obj, prop).by(delta); + } + + /** + * ### .doesNotDecrease(function, object, property, [message]) + * + * Asserts that a function does not decreases a numeric object property. + * + * var obj = { val: 10 }; + * var fn = function() { obj.val = 15 }; + * assert.doesNotDecrease(fn, obj, 'val'); + * + * @name doesNotDecrease + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.doesNotDecrease = function (fn, obj, prop, msg) { + if (arguments.length === 3 && typeof obj === 'function') { + msg = prop; + prop = null; + } + + return new Assertion(fn, msg, assert.doesNotDecrease, true) + .to.not.decrease(obj, prop); + } + + /** + * ### .doesNotDecreaseBy(function, object, property, delta, [message]) + * + * Asserts that a function does not decreases a numeric object property or a function's return value by an amount (delta) + * + * var obj = { val: 10 }; + * var fn = function() { obj.val = 5 }; + * assert.doesNotDecreaseBy(fn, obj, 'val', 1); + * + * @name doesNotDecrease + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {Number} change amount (delta) + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.doesNotDecreaseBy = function (fn, obj, prop, delta, msg) { + if (arguments.length === 4 && typeof obj === 'function') { + var tmpMsg = delta; + delta = prop; + msg = tmpMsg; + } else if (arguments.length === 3) { + delta = prop; + prop = null; + } + + return new Assertion(fn, msg, assert.doesNotDecreaseBy, true) + .to.not.decrease(obj, prop).by(delta); + } + + /** + * ### .decreasesButNotBy(function, object, property, delta, [message]) + * + * Asserts that a function does not decreases a numeric object property or a function's return value by an amount (delta) + * + * var obj = { val: 10 }; + * var fn = function() { obj.val = 5 }; + * assert.decreasesButNotBy(fn, obj, 'val', 1); + * + * @name decreasesButNotBy + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {Number} change amount (delta) + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.decreasesButNotBy = function (fn, obj, prop, delta, msg) { + if (arguments.length === 4 && typeof obj === 'function') { + var tmpMsg = delta; + delta = prop; + msg = tmpMsg; + } else if (arguments.length === 3) { + delta = prop; + prop = null; + } + + new Assertion(fn, msg, assert.decreasesButNotBy, true) + .to.decrease(obj, prop).but.not.by(delta); + } + + /*! + * ### .ifError(object) + * + * Asserts if value is not a false value, and throws if it is a true value. + * This is added to allow for chai to be a drop-in replacement for Node's + * assert class. + * + * var err = new Error('I am a custom error'); + * assert.ifError(err); // Rethrows err! + * + * @name ifError + * @param {Object} object + * @namespace Assert + * @api public + */ + + assert.ifError = function (val) { + if (val) { + throw(val); + } + }; + + /** + * ### .isExtensible(object) + * + * Asserts that `object` is extensible (can have new properties added to it). + * + * assert.isExtensible({}); + * + * @name isExtensible + * @alias extensible + * @param {Object} object + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.isExtensible = function (obj, msg) { + new Assertion(obj, msg, assert.isExtensible, true).to.be.extensible; + }; + + /** + * ### .isNotExtensible(object) + * + * Asserts that `object` is _not_ extensible. + * + * var nonExtensibleObject = Object.preventExtensions({}); + * var sealedObject = Object.seal({}); + * var frozenObject = Object.freeze({}); + * + * assert.isNotExtensible(nonExtensibleObject); + * assert.isNotExtensible(sealedObject); + * assert.isNotExtensible(frozenObject); + * + * @name isNotExtensible + * @alias notExtensible + * @param {Object} object + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.isNotExtensible = function (obj, msg) { + new Assertion(obj, msg, assert.isNotExtensible, true).to.not.be.extensible; + }; + + /** + * ### .isSealed(object) + * + * Asserts that `object` is sealed (cannot have new properties added to it + * and its existing properties cannot be removed). + * + * var sealedObject = Object.seal({}); + * var frozenObject = Object.seal({}); + * + * assert.isSealed(sealedObject); + * assert.isSealed(frozenObject); + * + * @name isSealed + * @alias sealed + * @param {Object} object + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.isSealed = function (obj, msg) { + new Assertion(obj, msg, assert.isSealed, true).to.be.sealed; + }; + + /** + * ### .isNotSealed(object) + * + * Asserts that `object` is _not_ sealed. + * + * assert.isNotSealed({}); + * + * @name isNotSealed + * @alias notSealed + * @param {Object} object + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.isNotSealed = function (obj, msg) { + new Assertion(obj, msg, assert.isNotSealed, true).to.not.be.sealed; + }; + + /** + * ### .isFrozen(object) + * + * Asserts that `object` is frozen (cannot have new properties added to it + * and its existing properties cannot be modified). + * + * var frozenObject = Object.freeze({}); + * assert.frozen(frozenObject); + * + * @name isFrozen + * @alias frozen + * @param {Object} object + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.isFrozen = function (obj, msg) { + new Assertion(obj, msg, assert.isFrozen, true).to.be.frozen; + }; + + /** + * ### .isNotFrozen(object) + * + * Asserts that `object` is _not_ frozen. + * + * assert.isNotFrozen({}); + * + * @name isNotFrozen + * @alias notFrozen + * @param {Object} object + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.isNotFrozen = function (obj, msg) { + new Assertion(obj, msg, assert.isNotFrozen, true).to.not.be.frozen; + }; + + /** + * ### .isEmpty(target) + * + * Asserts that the target does not contain any values. + * For arrays and strings, it checks the `length` property. + * For `Map` and `Set` instances, it checks the `size` property. + * For non-function objects, it gets the count of own + * enumerable string keys. + * + * assert.isEmpty([]); + * assert.isEmpty(''); + * assert.isEmpty(new Map); + * assert.isEmpty({}); + * + * @name isEmpty + * @alias empty + * @param {Object|Array|String|Map|Set} target + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.isEmpty = function(val, msg) { + new Assertion(val, msg, assert.isEmpty, true).to.be.empty; + }; + + /** + * ### .isNotEmpty(target) + * + * Asserts that the target contains values. + * For arrays and strings, it checks the `length` property. + * For `Map` and `Set` instances, it checks the `size` property. + * For non-function objects, it gets the count of own + * enumerable string keys. + * + * assert.isNotEmpty([1, 2]); + * assert.isNotEmpty('34'); + * assert.isNotEmpty(new Set([5, 6])); + * assert.isNotEmpty({ key: 7 }); + * + * @name isNotEmpty + * @alias notEmpty + * @param {Object|Array|String|Map|Set} target + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.isNotEmpty = function(val, msg) { + new Assertion(val, msg, assert.isNotEmpty, true).to.not.be.empty; + }; + + /*! + * Aliases. + */ + + (function alias(name, as){ + assert[as] = assert[name]; + return alias; + }) + ('isOk', 'ok') + ('isNotOk', 'notOk') + ('throws', 'throw') + ('throws', 'Throw') + ('isExtensible', 'extensible') + ('isNotExtensible', 'notExtensible') + ('isSealed', 'sealed') + ('isNotSealed', 'notSealed') + ('isFrozen', 'frozen') + ('isNotFrozen', 'notFrozen') + ('isEmpty', 'empty') + ('isNotEmpty', 'notEmpty'); +}; + +},{}],7:[function(require,module,exports){ +/*! + * chai + * Copyright(c) 2011-2014 Jake Luer + * MIT Licensed + */ + +module.exports = function (chai, util) { + chai.expect = function (val, message) { + return new chai.Assertion(val, message); + }; + + /** + * ### .fail([message]) + * ### .fail(actual, expected, [message], [operator]) + * + * Throw a failure. + * + * expect.fail(); + * expect.fail("custom error message"); + * expect.fail(1, 2); + * expect.fail(1, 2, "custom error message"); + * expect.fail(1, 2, "custom error message", ">"); + * expect.fail(1, 2, undefined, ">"); + * + * @name fail + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @param {String} operator + * @namespace BDD + * @api public + */ + + chai.expect.fail = function (actual, expected, message, operator) { + if (arguments.length < 2) { + message = actual; + actual = undefined; + } + + message = message || 'expect.fail()'; + throw new chai.AssertionError(message, { + actual: actual + , expected: expected + , operator: operator + }, chai.expect.fail); + }; +}; + +},{}],8:[function(require,module,exports){ +/*! + * chai + * Copyright(c) 2011-2014 Jake Luer + * MIT Licensed + */ + +module.exports = function (chai, util) { + var Assertion = chai.Assertion; + + function loadShould () { + // explicitly define this method as function as to have it's name to include as `ssfi` + function shouldGetter() { + if (this instanceof String + || this instanceof Number + || this instanceof Boolean + || typeof Symbol === 'function' && this instanceof Symbol) { + return new Assertion(this.valueOf(), null, shouldGetter); + } + return new Assertion(this, null, shouldGetter); + } + function shouldSetter(value) { + // See https://github.com/chaijs/chai/issues/86: this makes + // `whatever.should = someValue` actually set `someValue`, which is + // especially useful for `global.should = require('chai').should()`. + // + // Note that we have to use [[DefineProperty]] instead of [[Put]] + // since otherwise we would trigger this very setter! + Object.defineProperty(this, 'should', { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } + // modify Object.prototype to have `should` + Object.defineProperty(Object.prototype, 'should', { + set: shouldSetter + , get: shouldGetter + , configurable: true + }); + + var should = {}; + + /** + * ### .fail([message]) + * ### .fail(actual, expected, [message], [operator]) + * + * Throw a failure. + * + * should.fail(); + * should.fail("custom error message"); + * should.fail(1, 2); + * should.fail(1, 2, "custom error message"); + * should.fail(1, 2, "custom error message", ">"); + * should.fail(1, 2, undefined, ">"); + * + * + * @name fail + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @param {String} operator + * @namespace BDD + * @api public + */ + + should.fail = function (actual, expected, message, operator) { + if (arguments.length < 2) { + message = actual; + actual = undefined; + } + + message = message || 'should.fail()'; + throw new chai.AssertionError(message, { + actual: actual + , expected: expected + , operator: operator + }, should.fail); + }; + + /** + * ### .equal(actual, expected, [message]) + * + * Asserts non-strict equality (`==`) of `actual` and `expected`. + * + * should.equal(3, '3', '== coerces values to strings'); + * + * @name equal + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @namespace Should + * @api public + */ + + should.equal = function (val1, val2, msg) { + new Assertion(val1, msg).to.equal(val2); + }; + + /** + * ### .throw(function, [constructor/string/regexp], [string/regexp], [message]) + * + * Asserts that `function` will throw an error that is an instance of + * `constructor`, or alternately that it will throw an error with message + * matching `regexp`. + * + * should.throw(fn, 'function throws a reference error'); + * should.throw(fn, /function throws a reference error/); + * should.throw(fn, ReferenceError); + * should.throw(fn, ReferenceError, 'function throws a reference error'); + * should.throw(fn, ReferenceError, /function throws a reference error/); + * + * @name throw + * @alias Throw + * @param {Function} function + * @param {ErrorConstructor} constructor + * @param {RegExp} regexp + * @param {String} message + * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types + * @namespace Should + * @api public + */ + + should.Throw = function (fn, errt, errs, msg) { + new Assertion(fn, msg).to.Throw(errt, errs); + }; + + /** + * ### .exist + * + * Asserts that the target is neither `null` nor `undefined`. + * + * var foo = 'hi'; + * + * should.exist(foo, 'foo exists'); + * + * @name exist + * @namespace Should + * @api public + */ + + should.exist = function (val, msg) { + new Assertion(val, msg).to.exist; + } + + // negation + should.not = {} + + /** + * ### .not.equal(actual, expected, [message]) + * + * Asserts non-strict inequality (`!=`) of `actual` and `expected`. + * + * should.not.equal(3, 4, 'these numbers are not equal'); + * + * @name not.equal + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @namespace Should + * @api public + */ + + should.not.equal = function (val1, val2, msg) { + new Assertion(val1, msg).to.not.equal(val2); + }; + + /** + * ### .throw(function, [constructor/regexp], [message]) + * + * Asserts that `function` will _not_ throw an error that is an instance of + * `constructor`, or alternately that it will not throw an error with message + * matching `regexp`. + * + * should.not.throw(fn, Error, 'function does not throw'); + * + * @name not.throw + * @alias not.Throw + * @param {Function} function + * @param {ErrorConstructor} constructor + * @param {RegExp} regexp + * @param {String} message + * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types + * @namespace Should + * @api public + */ + + should.not.Throw = function (fn, errt, errs, msg) { + new Assertion(fn, msg).to.not.Throw(errt, errs); + }; + + /** + * ### .not.exist + * + * Asserts that the target is neither `null` nor `undefined`. + * + * var bar = null; + * + * should.not.exist(bar, 'bar does not exist'); + * + * @name not.exist + * @namespace Should + * @api public + */ + + should.not.exist = function (val, msg) { + new Assertion(val, msg).to.not.exist; + } + + should['throw'] = should['Throw']; + should.not['throw'] = should.not['Throw']; + + return should; + }; + + chai.should = loadShould; + chai.Should = loadShould; +}; + +},{}],9:[function(require,module,exports){ +/*! + * Chai - addChainingMethod utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/*! + * Module dependencies + */ + +var addLengthGuard = require('./addLengthGuard'); +var chai = require('../../chai'); +var flag = require('./flag'); +var proxify = require('./proxify'); +var transferFlags = require('./transferFlags'); + +/*! + * Module variables + */ + +// Check whether `Object.setPrototypeOf` is supported +var canSetPrototype = typeof Object.setPrototypeOf === 'function'; + +// Without `Object.setPrototypeOf` support, this module will need to add properties to a function. +// However, some of functions' own props are not configurable and should be skipped. +var testFn = function() {}; +var excludeNames = Object.getOwnPropertyNames(testFn).filter(function(name) { + var propDesc = Object.getOwnPropertyDescriptor(testFn, name); + + // Note: PhantomJS 1.x includes `callee` as one of `testFn`'s own properties, + // but then returns `undefined` as the property descriptor for `callee`. As a + // workaround, we perform an otherwise unnecessary type-check for `propDesc`, + // and then filter it out if it's not an object as it should be. + if (typeof propDesc !== 'object') + return true; + + return !propDesc.configurable; +}); + +// Cache `Function` properties +var call = Function.prototype.call, + apply = Function.prototype.apply; + +/** + * ### .addChainableMethod(ctx, name, method, chainingBehavior) + * + * Adds a method to an object, such that the method can also be chained. + * + * utils.addChainableMethod(chai.Assertion.prototype, 'foo', function (str) { + * var obj = utils.flag(this, 'object'); + * new chai.Assertion(obj).to.be.equal(str); + * }); + * + * Can also be accessed directly from `chai.Assertion`. + * + * chai.Assertion.addChainableMethod('foo', fn, chainingBehavior); + * + * The result can then be used as both a method assertion, executing both `method` and + * `chainingBehavior`, or as a language chain, which only executes `chainingBehavior`. + * + * expect(fooStr).to.be.foo('bar'); + * expect(fooStr).to.be.foo.equal('foo'); + * + * @param {Object} ctx object to which the method is added + * @param {String} name of method to add + * @param {Function} method function to be used for `name`, when called + * @param {Function} chainingBehavior function to be called every time the property is accessed + * @namespace Utils + * @name addChainableMethod + * @api public + */ + +module.exports = function addChainableMethod(ctx, name, method, chainingBehavior) { + if (typeof chainingBehavior !== 'function') { + chainingBehavior = function () { }; + } + + var chainableBehavior = { + method: method + , chainingBehavior: chainingBehavior + }; + + // save the methods so we can overwrite them later, if we need to. + if (!ctx.__methods) { + ctx.__methods = {}; + } + ctx.__methods[name] = chainableBehavior; + + Object.defineProperty(ctx, name, + { get: function chainableMethodGetter() { + chainableBehavior.chainingBehavior.call(this); + + var chainableMethodWrapper = function () { + // Setting the `ssfi` flag to `chainableMethodWrapper` causes this + // function to be the starting point for removing implementation + // frames from the stack trace of a failed assertion. + // + // However, we only want to use this function as the starting point if + // the `lockSsfi` flag isn't set. + // + // If the `lockSsfi` flag is set, then this assertion is being + // invoked from inside of another assertion. In this case, the `ssfi` + // flag has already been set by the outer assertion. + // + // Note that overwriting a chainable method merely replaces the saved + // methods in `ctx.__methods` instead of completely replacing the + // overwritten assertion. Therefore, an overwriting assertion won't + // set the `ssfi` or `lockSsfi` flags. + if (!flag(this, 'lockSsfi')) { + flag(this, 'ssfi', chainableMethodWrapper); + } + + var result = chainableBehavior.method.apply(this, arguments); + if (result !== undefined) { + return result; + } + + var newAssertion = new chai.Assertion(); + transferFlags(this, newAssertion); + return newAssertion; + }; + + addLengthGuard(chainableMethodWrapper, name, true); + + // Use `Object.setPrototypeOf` if available + if (canSetPrototype) { + // Inherit all properties from the object by replacing the `Function` prototype + var prototype = Object.create(this); + // Restore the `call` and `apply` methods from `Function` + prototype.call = call; + prototype.apply = apply; + Object.setPrototypeOf(chainableMethodWrapper, prototype); + } + // Otherwise, redefine all properties (slow!) + else { + var asserterNames = Object.getOwnPropertyNames(ctx); + asserterNames.forEach(function (asserterName) { + if (excludeNames.indexOf(asserterName) !== -1) { + return; + } + + var pd = Object.getOwnPropertyDescriptor(ctx, asserterName); + Object.defineProperty(chainableMethodWrapper, asserterName, pd); + }); + } + + transferFlags(this, chainableMethodWrapper); + return proxify(chainableMethodWrapper); + } + , configurable: true + }); +}; + +},{"../../chai":2,"./addLengthGuard":10,"./flag":15,"./proxify":30,"./transferFlags":32}],10:[function(require,module,exports){ +var fnLengthDesc = Object.getOwnPropertyDescriptor(function () {}, 'length'); + +/*! + * Chai - addLengthGuard utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/** + * ### .addLengthGuard(fn, assertionName, isChainable) + * + * Define `length` as a getter on the given uninvoked method assertion. The + * getter acts as a guard against chaining `length` directly off of an uninvoked + * method assertion, which is a problem because it references `function`'s + * built-in `length` property instead of Chai's `length` assertion. When the + * getter catches the user making this mistake, it throws an error with a + * helpful message. + * + * There are two ways in which this mistake can be made. The first way is by + * chaining the `length` assertion directly off of an uninvoked chainable + * method. In this case, Chai suggests that the user use `lengthOf` instead. The + * second way is by chaining the `length` assertion directly off of an uninvoked + * non-chainable method. Non-chainable methods must be invoked prior to + * chaining. In this case, Chai suggests that the user consult the docs for the + * given assertion. + * + * If the `length` property of functions is unconfigurable, then return `fn` + * without modification. + * + * Note that in ES6, the function's `length` property is configurable, so once + * support for legacy environments is dropped, Chai's `length` property can + * replace the built-in function's `length` property, and this length guard will + * no longer be necessary. In the mean time, maintaining consistency across all + * environments is the priority. + * + * @param {Function} fn + * @param {String} assertionName + * @param {Boolean} isChainable + * @namespace Utils + * @name addLengthGuard + */ + +module.exports = function addLengthGuard (fn, assertionName, isChainable) { + if (!fnLengthDesc.configurable) return fn; + + Object.defineProperty(fn, 'length', { + get: function () { + if (isChainable) { + throw Error('Invalid Chai property: ' + assertionName + '.length. Due' + + ' to a compatibility issue, "length" cannot directly follow "' + + assertionName + '". Use "' + assertionName + '.lengthOf" instead.'); + } + + throw Error('Invalid Chai property: ' + assertionName + '.length. See' + + ' docs for proper usage of "' + assertionName + '".'); + } + }); + + return fn; +}; + +},{}],11:[function(require,module,exports){ +/*! + * Chai - addMethod utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +var addLengthGuard = require('./addLengthGuard'); +var chai = require('../../chai'); +var flag = require('./flag'); +var proxify = require('./proxify'); +var transferFlags = require('./transferFlags'); + +/** + * ### .addMethod(ctx, name, method) + * + * Adds a method to the prototype of an object. + * + * utils.addMethod(chai.Assertion.prototype, 'foo', function (str) { + * var obj = utils.flag(this, 'object'); + * new chai.Assertion(obj).to.be.equal(str); + * }); + * + * Can also be accessed directly from `chai.Assertion`. + * + * chai.Assertion.addMethod('foo', fn); + * + * Then can be used as any other assertion. + * + * expect(fooStr).to.be.foo('bar'); + * + * @param {Object} ctx object to which the method is added + * @param {String} name of method to add + * @param {Function} method function to be used for name + * @namespace Utils + * @name addMethod + * @api public + */ + +module.exports = function addMethod(ctx, name, method) { + var methodWrapper = function () { + // Setting the `ssfi` flag to `methodWrapper` causes this function to be the + // starting point for removing implementation frames from the stack trace of + // a failed assertion. + // + // However, we only want to use this function as the starting point if the + // `lockSsfi` flag isn't set. + // + // If the `lockSsfi` flag is set, then either this assertion has been + // overwritten by another assertion, or this assertion is being invoked from + // inside of another assertion. In the first case, the `ssfi` flag has + // already been set by the overwriting assertion. In the second case, the + // `ssfi` flag has already been set by the outer assertion. + if (!flag(this, 'lockSsfi')) { + flag(this, 'ssfi', methodWrapper); + } + + var result = method.apply(this, arguments); + if (result !== undefined) + return result; + + var newAssertion = new chai.Assertion(); + transferFlags(this, newAssertion); + return newAssertion; + }; + + addLengthGuard(methodWrapper, name, false); + ctx[name] = proxify(methodWrapper, name); +}; + +},{"../../chai":2,"./addLengthGuard":10,"./flag":15,"./proxify":30,"./transferFlags":32}],12:[function(require,module,exports){ +/*! + * Chai - addProperty utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +var chai = require('../../chai'); +var flag = require('./flag'); +var isProxyEnabled = require('./isProxyEnabled'); +var transferFlags = require('./transferFlags'); + +/** + * ### .addProperty(ctx, name, getter) + * + * Adds a property to the prototype of an object. + * + * utils.addProperty(chai.Assertion.prototype, 'foo', function () { + * var obj = utils.flag(this, 'object'); + * new chai.Assertion(obj).to.be.instanceof(Foo); + * }); + * + * Can also be accessed directly from `chai.Assertion`. + * + * chai.Assertion.addProperty('foo', fn); + * + * Then can be used as any other assertion. + * + * expect(myFoo).to.be.foo; + * + * @param {Object} ctx object to which the property is added + * @param {String} name of property to add + * @param {Function} getter function to be used for name + * @namespace Utils + * @name addProperty + * @api public + */ + +module.exports = function addProperty(ctx, name, getter) { + getter = getter === undefined ? function () {} : getter; + + Object.defineProperty(ctx, name, + { get: function propertyGetter() { + // Setting the `ssfi` flag to `propertyGetter` causes this function to + // be the starting point for removing implementation frames from the + // stack trace of a failed assertion. + // + // However, we only want to use this function as the starting point if + // the `lockSsfi` flag isn't set and proxy protection is disabled. + // + // If the `lockSsfi` flag is set, then either this assertion has been + // overwritten by another assertion, or this assertion is being invoked + // from inside of another assertion. In the first case, the `ssfi` flag + // has already been set by the overwriting assertion. In the second + // case, the `ssfi` flag has already been set by the outer assertion. + // + // If proxy protection is enabled, then the `ssfi` flag has already been + // set by the proxy getter. + if (!isProxyEnabled() && !flag(this, 'lockSsfi')) { + flag(this, 'ssfi', propertyGetter); + } + + var result = getter.call(this); + if (result !== undefined) + return result; + + var newAssertion = new chai.Assertion(); + transferFlags(this, newAssertion); + return newAssertion; + } + , configurable: true + }); +}; + +},{"../../chai":2,"./flag":15,"./isProxyEnabled":25,"./transferFlags":32}],13:[function(require,module,exports){ +/*! + * Chai - compareByInspect utility + * Copyright(c) 2011-2016 Jake Luer + * MIT Licensed + */ + +/*! + * Module dependencies + */ + +var inspect = require('./inspect'); + +/** + * ### .compareByInspect(mixed, mixed) + * + * To be used as a compareFunction with Array.prototype.sort. Compares elements + * using inspect instead of default behavior of using toString so that Symbols + * and objects with irregular/missing toString can still be sorted without a + * TypeError. + * + * @param {Mixed} first element to compare + * @param {Mixed} second element to compare + * @returns {Number} -1 if 'a' should come before 'b'; otherwise 1 + * @name compareByInspect + * @namespace Utils + * @api public + */ + +module.exports = function compareByInspect(a, b) { + return inspect(a) < inspect(b) ? -1 : 1; +}; + +},{"./inspect":23}],14:[function(require,module,exports){ +/*! + * Chai - expectTypes utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/** + * ### .expectTypes(obj, types) + * + * Ensures that the object being tested against is of a valid type. + * + * utils.expectTypes(this, ['array', 'object', 'string']); + * + * @param {Mixed} obj constructed Assertion + * @param {Array} type A list of allowed types for this assertion + * @namespace Utils + * @name expectTypes + * @api public + */ + +var AssertionError = require('assertion-error'); +var flag = require('./flag'); +var type = require('type-detect'); + +module.exports = function expectTypes(obj, types) { + var flagMsg = flag(obj, 'message'); + var ssfi = flag(obj, 'ssfi'); + + flagMsg = flagMsg ? flagMsg + ': ' : ''; + + obj = flag(obj, 'object'); + types = types.map(function (t) { return t.toLowerCase(); }); + types.sort(); + + // Transforms ['lorem', 'ipsum'] into 'a lorem, or an ipsum' + var str = types.map(function (t, index) { + var art = ~[ 'a', 'e', 'i', 'o', 'u' ].indexOf(t.charAt(0)) ? 'an' : 'a'; + var or = types.length > 1 && index === types.length - 1 ? 'or ' : ''; + return or + art + ' ' + t; + }).join(', '); + + var objType = type(obj).toLowerCase(); + + if (!types.some(function (expected) { return objType === expected; })) { + throw new AssertionError( + flagMsg + 'object tested must be ' + str + ', but ' + objType + ' given', + undefined, + ssfi + ); + } +}; + +},{"./flag":15,"assertion-error":33,"type-detect":38}],15:[function(require,module,exports){ +/*! + * Chai - flag utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/** + * ### .flag(object, key, [value]) + * + * Get or set a flag value on an object. If a + * value is provided it will be set, else it will + * return the currently set value or `undefined` if + * the value is not set. + * + * utils.flag(this, 'foo', 'bar'); // setter + * utils.flag(this, 'foo'); // getter, returns `bar` + * + * @param {Object} object constructed Assertion + * @param {String} key + * @param {Mixed} value (optional) + * @namespace Utils + * @name flag + * @api private + */ + +module.exports = function flag(obj, key, value) { + var flags = obj.__flags || (obj.__flags = Object.create(null)); + if (arguments.length === 3) { + flags[key] = value; + } else { + return flags[key]; + } +}; + +},{}],16:[function(require,module,exports){ +/*! + * Chai - getActual utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/** + * ### .getActual(object, [actual]) + * + * Returns the `actual` value for an Assertion. + * + * @param {Object} object (constructed Assertion) + * @param {Arguments} chai.Assertion.prototype.assert arguments + * @namespace Utils + * @name getActual + */ + +module.exports = function getActual(obj, args) { + return args.length > 4 ? args[4] : obj._obj; +}; + +},{}],17:[function(require,module,exports){ +/*! + * Chai - getEnumerableProperties utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/** + * ### .getEnumerableProperties(object) + * + * This allows the retrieval of enumerable property names of an object, + * inherited or not. + * + * @param {Object} object + * @returns {Array} + * @namespace Utils + * @name getEnumerableProperties + * @api public + */ + +module.exports = function getEnumerableProperties(object) { + var result = []; + for (var name in object) { + result.push(name); + } + return result; +}; + +},{}],18:[function(require,module,exports){ +/*! + * Chai - message composition utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/*! + * Module dependencies + */ + +var flag = require('./flag') + , getActual = require('./getActual') + , objDisplay = require('./objDisplay'); + +/** + * ### .getMessage(object, message, negateMessage) + * + * Construct the error message based on flags + * and template tags. Template tags will return + * a stringified inspection of the object referenced. + * + * Message template tags: + * - `#{this}` current asserted object + * - `#{act}` actual value + * - `#{exp}` expected value + * + * @param {Object} object (constructed Assertion) + * @param {Arguments} chai.Assertion.prototype.assert arguments + * @namespace Utils + * @name getMessage + * @api public + */ + +module.exports = function getMessage(obj, args) { + var negate = flag(obj, 'negate') + , val = flag(obj, 'object') + , expected = args[3] + , actual = getActual(obj, args) + , msg = negate ? args[2] : args[1] + , flagMsg = flag(obj, 'message'); + + if(typeof msg === "function") msg = msg(); + msg = msg || ''; + msg = msg + .replace(/#\{this\}/g, function () { return objDisplay(val); }) + .replace(/#\{act\}/g, function () { return objDisplay(actual); }) + .replace(/#\{exp\}/g, function () { return objDisplay(expected); }); + + return flagMsg ? flagMsg + ': ' + msg : msg; +}; + +},{"./flag":15,"./getActual":16,"./objDisplay":26}],19:[function(require,module,exports){ +/*! + * Chai - getOwnEnumerableProperties utility + * Copyright(c) 2011-2016 Jake Luer + * MIT Licensed + */ + +/*! + * Module dependencies + */ + +var getOwnEnumerablePropertySymbols = require('./getOwnEnumerablePropertySymbols'); + +/** + * ### .getOwnEnumerableProperties(object) + * + * This allows the retrieval of directly-owned enumerable property names and + * symbols of an object. This function is necessary because Object.keys only + * returns enumerable property names, not enumerable property symbols. + * + * @param {Object} object + * @returns {Array} + * @namespace Utils + * @name getOwnEnumerableProperties + * @api public + */ + +module.exports = function getOwnEnumerableProperties(obj) { + return Object.keys(obj).concat(getOwnEnumerablePropertySymbols(obj)); +}; + +},{"./getOwnEnumerablePropertySymbols":20}],20:[function(require,module,exports){ +/*! + * Chai - getOwnEnumerablePropertySymbols utility + * Copyright(c) 2011-2016 Jake Luer + * MIT Licensed + */ + +/** + * ### .getOwnEnumerablePropertySymbols(object) + * + * This allows the retrieval of directly-owned enumerable property symbols of an + * object. This function is necessary because Object.getOwnPropertySymbols + * returns both enumerable and non-enumerable property symbols. + * + * @param {Object} object + * @returns {Array} + * @namespace Utils + * @name getOwnEnumerablePropertySymbols + * @api public + */ + +module.exports = function getOwnEnumerablePropertySymbols(obj) { + if (typeof Object.getOwnPropertySymbols !== 'function') return []; + + return Object.getOwnPropertySymbols(obj).filter(function (sym) { + return Object.getOwnPropertyDescriptor(obj, sym).enumerable; + }); +}; + +},{}],21:[function(require,module,exports){ +/*! + * Chai - getProperties utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/** + * ### .getProperties(object) + * + * This allows the retrieval of property names of an object, enumerable or not, + * inherited or not. + * + * @param {Object} object + * @returns {Array} + * @namespace Utils + * @name getProperties + * @api public + */ + +module.exports = function getProperties(object) { + var result = Object.getOwnPropertyNames(object); + + function addProperty(property) { + if (result.indexOf(property) === -1) { + result.push(property); + } + } + + var proto = Object.getPrototypeOf(object); + while (proto !== null) { + Object.getOwnPropertyNames(proto).forEach(addProperty); + proto = Object.getPrototypeOf(proto); + } + + return result; +}; + +},{}],22:[function(require,module,exports){ +/*! + * chai + * Copyright(c) 2011 Jake Luer + * MIT Licensed + */ + +/*! + * Dependencies that are used for multiple exports are required here only once + */ + +var pathval = require('pathval'); + +/*! + * test utility + */ + +exports.test = require('./test'); + +/*! + * type utility + */ + +exports.type = require('type-detect'); + +/*! + * expectTypes utility + */ +exports.expectTypes = require('./expectTypes'); + +/*! + * message utility + */ + +exports.getMessage = require('./getMessage'); + +/*! + * actual utility + */ + +exports.getActual = require('./getActual'); + +/*! + * Inspect util + */ + +exports.inspect = require('./inspect'); + +/*! + * Object Display util + */ + +exports.objDisplay = require('./objDisplay'); + +/*! + * Flag utility + */ + +exports.flag = require('./flag'); + +/*! + * Flag transferring utility + */ + +exports.transferFlags = require('./transferFlags'); + +/*! + * Deep equal utility + */ + +exports.eql = require('deep-eql'); + +/*! + * Deep path info + */ + +exports.getPathInfo = pathval.getPathInfo; + +/*! + * Check if a property exists + */ + +exports.hasProperty = pathval.hasProperty; + +/*! + * Function name + */ + +exports.getName = require('get-func-name'); + +/*! + * add Property + */ + +exports.addProperty = require('./addProperty'); + +/*! + * add Method + */ + +exports.addMethod = require('./addMethod'); + +/*! + * overwrite Property + */ + +exports.overwriteProperty = require('./overwriteProperty'); + +/*! + * overwrite Method + */ + +exports.overwriteMethod = require('./overwriteMethod'); + +/*! + * Add a chainable method + */ + +exports.addChainableMethod = require('./addChainableMethod'); + +/*! + * Overwrite chainable method + */ + +exports.overwriteChainableMethod = require('./overwriteChainableMethod'); + +/*! + * Compare by inspect method + */ + +exports.compareByInspect = require('./compareByInspect'); + +/*! + * Get own enumerable property symbols method + */ + +exports.getOwnEnumerablePropertySymbols = require('./getOwnEnumerablePropertySymbols'); + +/*! + * Get own enumerable properties method + */ + +exports.getOwnEnumerableProperties = require('./getOwnEnumerableProperties'); + +/*! + * Checks error against a given set of criteria + */ + +exports.checkError = require('check-error'); + +/*! + * Proxify util + */ + +exports.proxify = require('./proxify'); + +/*! + * addLengthGuard util + */ + +exports.addLengthGuard = require('./addLengthGuard'); + +/*! + * isProxyEnabled helper + */ + +exports.isProxyEnabled = require('./isProxyEnabled'); + +/*! + * isNaN method + */ + +exports.isNaN = require('./isNaN'); + +},{"./addChainableMethod":9,"./addLengthGuard":10,"./addMethod":11,"./addProperty":12,"./compareByInspect":13,"./expectTypes":14,"./flag":15,"./getActual":16,"./getMessage":18,"./getOwnEnumerableProperties":19,"./getOwnEnumerablePropertySymbols":20,"./inspect":23,"./isNaN":24,"./isProxyEnabled":25,"./objDisplay":26,"./overwriteChainableMethod":27,"./overwriteMethod":28,"./overwriteProperty":29,"./proxify":30,"./test":31,"./transferFlags":32,"check-error":34,"deep-eql":35,"get-func-name":36,"pathval":37,"type-detect":38}],23:[function(require,module,exports){ +// This is (almost) directly from Node.js utils +// https://github.com/joyent/node/blob/f8c335d0caf47f16d31413f89aa28eda3878e3aa/lib/util.js + +var getName = require('get-func-name'); +var getProperties = require('./getProperties'); +var getEnumerableProperties = require('./getEnumerableProperties'); +var config = require('../config'); + +module.exports = inspect; + +/** + * ### .inspect(obj, [showHidden], [depth], [colors]) + * + * Echoes the value of a value. Tries to print the value out + * in the best way possible given the different types. + * + * @param {Object} obj The object to print out. + * @param {Boolean} showHidden Flag that shows hidden (not enumerable) + * properties of objects. Default is false. + * @param {Number} depth Depth in which to descend in object. Default is 2. + * @param {Boolean} colors Flag to turn on ANSI escape codes to color the + * output. Default is false (no coloring). + * @namespace Utils + * @name inspect + */ +function inspect(obj, showHidden, depth, colors) { + var ctx = { + showHidden: showHidden, + seen: [], + stylize: function (str) { return str; } + }; + return formatValue(ctx, obj, (typeof depth === 'undefined' ? 2 : depth)); +} + +// Returns true if object is a DOM element. +var isDOMElement = function (object) { + if (typeof HTMLElement === 'object') { + return object instanceof HTMLElement; + } else { + return object && + typeof object === 'object' && + 'nodeType' in object && + object.nodeType === 1 && + typeof object.nodeName === 'string'; + } +}; + +function formatValue(ctx, value, recurseTimes) { + // Provide a hook for user-specified inspect functions. + // Check that value is an object with an inspect function on it + if (value && typeof value.inspect === 'function' && + // Filter out the util module, it's inspect function is special + value.inspect !== exports.inspect && + // Also filter out any prototype objects using the circular check. + !(value.constructor && value.constructor.prototype === value)) { + var ret = value.inspect(recurseTimes, ctx); + if (typeof ret !== 'string') { + ret = formatValue(ctx, ret, recurseTimes); + } + return ret; + } + + // Primitive types cannot have properties + var primitive = formatPrimitive(ctx, value); + if (primitive) { + return primitive; + } + + // If this is a DOM element, try to get the outer HTML. + if (isDOMElement(value)) { + if ('outerHTML' in value) { + return value.outerHTML; + // This value does not have an outerHTML attribute, + // it could still be an XML element + } else { + // Attempt to serialize it + try { + if (document.xmlVersion) { + var xmlSerializer = new XMLSerializer(); + return xmlSerializer.serializeToString(value); + } else { + // Firefox 11- do not support outerHTML + // It does, however, support innerHTML + // Use the following to render the element + var ns = "http://www.w3.org/1999/xhtml"; + var container = document.createElementNS(ns, '_'); + + container.appendChild(value.cloneNode(false)); + var html = container.innerHTML + .replace('><', '>' + value.innerHTML + '<'); + container.innerHTML = ''; + return html; + } + } catch (err) { + // This could be a non-native DOM implementation, + // continue with the normal flow: + // printing the element as if it is an object. + } + } + } + + // Look up the keys of the object. + var visibleKeys = getEnumerableProperties(value); + var keys = ctx.showHidden ? getProperties(value) : visibleKeys; + + var name, nameSuffix; + + // Some type of object without properties can be shortcut. + // In IE, errors have a single `stack` property, or if they are vanilla `Error`, + // a `stack` plus `description` property; ignore those for consistency. + if (keys.length === 0 || (isError(value) && ( + (keys.length === 1 && keys[0] === 'stack') || + (keys.length === 2 && keys[0] === 'description' && keys[1] === 'stack') + ))) { + if (typeof value === 'function') { + name = getName(value); + nameSuffix = name ? ': ' + name : ''; + return ctx.stylize('[Function' + nameSuffix + ']', 'special'); + } + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } + if (isDate(value)) { + return ctx.stylize(Date.prototype.toUTCString.call(value), 'date'); + } + if (isError(value)) { + return formatError(value); + } + } + + var base = '' + , array = false + , typedArray = false + , braces = ['{', '}']; + + if (isTypedArray(value)) { + typedArray = true; + braces = ['[', ']']; + } + + // Make Array say that they are Array + if (isArray(value)) { + array = true; + braces = ['[', ']']; + } + + // Make functions say that they are functions + if (typeof value === 'function') { + name = getName(value); + nameSuffix = name ? ': ' + name : ''; + base = ' [Function' + nameSuffix + ']'; + } + + // Make RegExps say that they are RegExps + if (isRegExp(value)) { + base = ' ' + RegExp.prototype.toString.call(value); + } + + // Make dates with properties first say the date + if (isDate(value)) { + base = ' ' + Date.prototype.toUTCString.call(value); + } + + // Make error with message first say the error + if (isError(value)) { + return formatError(value); + } + + if (keys.length === 0 && (!array || value.length == 0)) { + return braces[0] + base + braces[1]; + } + + if (recurseTimes < 0) { + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } else { + return ctx.stylize('[Object]', 'special'); + } + } + + ctx.seen.push(value); + + var output; + if (array) { + output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); + } else if (typedArray) { + return formatTypedArray(value); + } else { + output = keys.map(function(key) { + return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); + }); + } + + ctx.seen.pop(); + + return reduceToSingleString(output, base, braces); +} + +function formatPrimitive(ctx, value) { + switch (typeof value) { + case 'undefined': + return ctx.stylize('undefined', 'undefined'); + + case 'string': + var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') + .replace(/'/g, "\\'") + .replace(/\\"/g, '"') + '\''; + return ctx.stylize(simple, 'string'); + + case 'number': + if (value === 0 && (1/value) === -Infinity) { + return ctx.stylize('-0', 'number'); + } + return ctx.stylize('' + value, 'number'); + + case 'boolean': + return ctx.stylize('' + value, 'boolean'); + + case 'symbol': + return ctx.stylize(value.toString(), 'symbol'); + } + // For some reason typeof null is "object", so special case here. + if (value === null) { + return ctx.stylize('null', 'null'); + } +} + +function formatError(value) { + return '[' + Error.prototype.toString.call(value) + ']'; +} + +function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { + var output = []; + for (var i = 0, l = value.length; i < l; ++i) { + if (Object.prototype.hasOwnProperty.call(value, String(i))) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + String(i), true)); + } else { + output.push(''); + } + } + + keys.forEach(function(key) { + if (!key.match(/^\d+$/)) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + key, true)); + } + }); + return output; +} + +function formatTypedArray(value) { + var str = '[ '; + + for (var i = 0; i < value.length; ++i) { + if (str.length >= config.truncateThreshold - 7) { + str += '...'; + break; + } + str += value[i] + ', '; + } + str += ' ]'; + + // Removing trailing `, ` if the array was not truncated + if (str.indexOf(', ]') !== -1) { + str = str.replace(', ]', ' ]'); + } + + return str; +} + +function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { + var name; + var propDescriptor = Object.getOwnPropertyDescriptor(value, key); + var str; + + if (propDescriptor) { + if (propDescriptor.get) { + if (propDescriptor.set) { + str = ctx.stylize('[Getter/Setter]', 'special'); + } else { + str = ctx.stylize('[Getter]', 'special'); + } + } else { + if (propDescriptor.set) { + str = ctx.stylize('[Setter]', 'special'); + } + } + } + if (visibleKeys.indexOf(key) < 0) { + name = '[' + key + ']'; + } + if (!str) { + if (ctx.seen.indexOf(value[key]) < 0) { + if (recurseTimes === null) { + str = formatValue(ctx, value[key], null); + } else { + str = formatValue(ctx, value[key], recurseTimes - 1); + } + if (str.indexOf('\n') > -1) { + if (array) { + str = str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n').substr(2); + } else { + str = '\n' + str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n'); + } + } + } else { + str = ctx.stylize('[Circular]', 'special'); + } + } + if (typeof name === 'undefined') { + if (array && key.match(/^\d+$/)) { + return str; + } + name = JSON.stringify('' + key); + if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { + name = name.substr(1, name.length - 2); + name = ctx.stylize(name, 'name'); + } else { + name = name.replace(/'/g, "\\'") + .replace(/\\"/g, '"') + .replace(/(^"|"$)/g, "'"); + name = ctx.stylize(name, 'string'); + } + } + + return name + ': ' + str; +} + +function reduceToSingleString(output, base, braces) { + var length = output.reduce(function(prev, cur) { + return prev + cur.length + 1; + }, 0); + + if (length > 60) { + return braces[0] + + (base === '' ? '' : base + '\n ') + + ' ' + + output.join(',\n ') + + ' ' + + braces[1]; + } + + return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; +} + +function isTypedArray(ar) { + // Unfortunately there's no way to check if an object is a TypedArray + // We have to check if it's one of these types + return (typeof ar === 'object' && /\w+Array]$/.test(objectToString(ar))); +} + +function isArray(ar) { + return Array.isArray(ar) || + (typeof ar === 'object' && objectToString(ar) === '[object Array]'); +} + +function isRegExp(re) { + return typeof re === 'object' && objectToString(re) === '[object RegExp]'; +} + +function isDate(d) { + return typeof d === 'object' && objectToString(d) === '[object Date]'; +} + +function isError(e) { + return typeof e === 'object' && objectToString(e) === '[object Error]'; +} + +function objectToString(o) { + return Object.prototype.toString.call(o); +} + +},{"../config":4,"./getEnumerableProperties":17,"./getProperties":21,"get-func-name":36}],24:[function(require,module,exports){ +/*! + * Chai - isNaN utility + * Copyright(c) 2012-2015 Sakthipriyan Vairamani + * MIT Licensed + */ + +/** + * ### .isNaN(value) + * + * Checks if the given value is NaN or not. + * + * utils.isNaN(NaN); // true + * + * @param {Value} The value which has to be checked if it is NaN + * @name isNaN + * @api private + */ + +function isNaN(value) { + // Refer http://www.ecma-international.org/ecma-262/6.0/#sec-isnan-number + // section's NOTE. + return value !== value; +} + +// If ECMAScript 6's Number.isNaN is present, prefer that. +module.exports = Number.isNaN || isNaN; + +},{}],25:[function(require,module,exports){ +var config = require('../config'); + +/*! + * Chai - isProxyEnabled helper + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/** + * ### .isProxyEnabled() + * + * Helper function to check if Chai's proxy protection feature is enabled. If + * proxies are unsupported or disabled via the user's Chai config, then return + * false. Otherwise, return true. + * + * @namespace Utils + * @name isProxyEnabled + */ + +module.exports = function isProxyEnabled() { + return config.useProxy && + typeof Proxy !== 'undefined' && + typeof Reflect !== 'undefined'; +}; + +},{"../config":4}],26:[function(require,module,exports){ +/*! + * Chai - flag utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/*! + * Module dependencies + */ + +var inspect = require('./inspect'); +var config = require('../config'); + +/** + * ### .objDisplay(object) + * + * Determines if an object or an array matches + * criteria to be inspected in-line for error + * messages or should be truncated. + * + * @param {Mixed} javascript object to inspect + * @name objDisplay + * @namespace Utils + * @api public + */ + +module.exports = function objDisplay(obj) { + var str = inspect(obj) + , type = Object.prototype.toString.call(obj); + + if (config.truncateThreshold && str.length >= config.truncateThreshold) { + if (type === '[object Function]') { + return !obj.name || obj.name === '' + ? '[Function]' + : '[Function: ' + obj.name + ']'; + } else if (type === '[object Array]') { + return '[ Array(' + obj.length + ') ]'; + } else if (type === '[object Object]') { + var keys = Object.keys(obj) + , kstr = keys.length > 2 + ? keys.splice(0, 2).join(', ') + ', ...' + : keys.join(', '); + return '{ Object (' + kstr + ') }'; + } else { + return str; + } + } else { + return str; + } +}; + +},{"../config":4,"./inspect":23}],27:[function(require,module,exports){ +/*! + * Chai - overwriteChainableMethod utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +var chai = require('../../chai'); +var transferFlags = require('./transferFlags'); + +/** + * ### .overwriteChainableMethod(ctx, name, method, chainingBehavior) + * + * Overwrites an already existing chainable method + * and provides access to the previous function or + * property. Must return functions to be used for + * name. + * + * utils.overwriteChainableMethod(chai.Assertion.prototype, 'lengthOf', + * function (_super) { + * } + * , function (_super) { + * } + * ); + * + * Can also be accessed directly from `chai.Assertion`. + * + * chai.Assertion.overwriteChainableMethod('foo', fn, fn); + * + * Then can be used as any other assertion. + * + * expect(myFoo).to.have.lengthOf(3); + * expect(myFoo).to.have.lengthOf.above(3); + * + * @param {Object} ctx object whose method / property is to be overwritten + * @param {String} name of method / property to overwrite + * @param {Function} method function that returns a function to be used for name + * @param {Function} chainingBehavior function that returns a function to be used for property + * @namespace Utils + * @name overwriteChainableMethod + * @api public + */ + +module.exports = function overwriteChainableMethod(ctx, name, method, chainingBehavior) { + var chainableBehavior = ctx.__methods[name]; + + var _chainingBehavior = chainableBehavior.chainingBehavior; + chainableBehavior.chainingBehavior = function overwritingChainableMethodGetter() { + var result = chainingBehavior(_chainingBehavior).call(this); + if (result !== undefined) { + return result; + } + + var newAssertion = new chai.Assertion(); + transferFlags(this, newAssertion); + return newAssertion; + }; + + var _method = chainableBehavior.method; + chainableBehavior.method = function overwritingChainableMethodWrapper() { + var result = method(_method).apply(this, arguments); + if (result !== undefined) { + return result; + } + + var newAssertion = new chai.Assertion(); + transferFlags(this, newAssertion); + return newAssertion; + }; +}; + +},{"../../chai":2,"./transferFlags":32}],28:[function(require,module,exports){ +/*! + * Chai - overwriteMethod utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +var addLengthGuard = require('./addLengthGuard'); +var chai = require('../../chai'); +var flag = require('./flag'); +var proxify = require('./proxify'); +var transferFlags = require('./transferFlags'); + +/** + * ### .overwriteMethod(ctx, name, fn) + * + * Overwrites an already existing method and provides + * access to previous function. Must return function + * to be used for name. + * + * utils.overwriteMethod(chai.Assertion.prototype, 'equal', function (_super) { + * return function (str) { + * var obj = utils.flag(this, 'object'); + * if (obj instanceof Foo) { + * new chai.Assertion(obj.value).to.equal(str); + * } else { + * _super.apply(this, arguments); + * } + * } + * }); + * + * Can also be accessed directly from `chai.Assertion`. + * + * chai.Assertion.overwriteMethod('foo', fn); + * + * Then can be used as any other assertion. + * + * expect(myFoo).to.equal('bar'); + * + * @param {Object} ctx object whose method is to be overwritten + * @param {String} name of method to overwrite + * @param {Function} method function that returns a function to be used for name + * @namespace Utils + * @name overwriteMethod + * @api public + */ + +module.exports = function overwriteMethod(ctx, name, method) { + var _method = ctx[name] + , _super = function () { + throw new Error(name + ' is not a function'); + }; + + if (_method && 'function' === typeof _method) + _super = _method; + + var overwritingMethodWrapper = function () { + // Setting the `ssfi` flag to `overwritingMethodWrapper` causes this + // function to be the starting point for removing implementation frames from + // the stack trace of a failed assertion. + // + // However, we only want to use this function as the starting point if the + // `lockSsfi` flag isn't set. + // + // If the `lockSsfi` flag is set, then either this assertion has been + // overwritten by another assertion, or this assertion is being invoked from + // inside of another assertion. In the first case, the `ssfi` flag has + // already been set by the overwriting assertion. In the second case, the + // `ssfi` flag has already been set by the outer assertion. + if (!flag(this, 'lockSsfi')) { + flag(this, 'ssfi', overwritingMethodWrapper); + } + + // Setting the `lockSsfi` flag to `true` prevents the overwritten assertion + // from changing the `ssfi` flag. By this point, the `ssfi` flag is already + // set to the correct starting point for this assertion. + var origLockSsfi = flag(this, 'lockSsfi'); + flag(this, 'lockSsfi', true); + var result = method(_super).apply(this, arguments); + flag(this, 'lockSsfi', origLockSsfi); + + if (result !== undefined) { + return result; + } + + var newAssertion = new chai.Assertion(); + transferFlags(this, newAssertion); + return newAssertion; + } + + addLengthGuard(overwritingMethodWrapper, name, false); + ctx[name] = proxify(overwritingMethodWrapper, name); +}; + +},{"../../chai":2,"./addLengthGuard":10,"./flag":15,"./proxify":30,"./transferFlags":32}],29:[function(require,module,exports){ +/*! + * Chai - overwriteProperty utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +var chai = require('../../chai'); +var flag = require('./flag'); +var isProxyEnabled = require('./isProxyEnabled'); +var transferFlags = require('./transferFlags'); + +/** + * ### .overwriteProperty(ctx, name, fn) + * + * Overwrites an already existing property getter and provides + * access to previous value. Must return function to use as getter. + * + * utils.overwriteProperty(chai.Assertion.prototype, 'ok', function (_super) { + * return function () { + * var obj = utils.flag(this, 'object'); + * if (obj instanceof Foo) { + * new chai.Assertion(obj.name).to.equal('bar'); + * } else { + * _super.call(this); + * } + * } + * }); + * + * + * Can also be accessed directly from `chai.Assertion`. + * + * chai.Assertion.overwriteProperty('foo', fn); + * + * Then can be used as any other assertion. + * + * expect(myFoo).to.be.ok; + * + * @param {Object} ctx object whose property is to be overwritten + * @param {String} name of property to overwrite + * @param {Function} getter function that returns a getter function to be used for name + * @namespace Utils + * @name overwriteProperty + * @api public + */ + +module.exports = function overwriteProperty(ctx, name, getter) { + var _get = Object.getOwnPropertyDescriptor(ctx, name) + , _super = function () {}; + + if (_get && 'function' === typeof _get.get) + _super = _get.get + + Object.defineProperty(ctx, name, + { get: function overwritingPropertyGetter() { + // Setting the `ssfi` flag to `overwritingPropertyGetter` causes this + // function to be the starting point for removing implementation frames + // from the stack trace of a failed assertion. + // + // However, we only want to use this function as the starting point if + // the `lockSsfi` flag isn't set and proxy protection is disabled. + // + // If the `lockSsfi` flag is set, then either this assertion has been + // overwritten by another assertion, or this assertion is being invoked + // from inside of another assertion. In the first case, the `ssfi` flag + // has already been set by the overwriting assertion. In the second + // case, the `ssfi` flag has already been set by the outer assertion. + // + // If proxy protection is enabled, then the `ssfi` flag has already been + // set by the proxy getter. + if (!isProxyEnabled() && !flag(this, 'lockSsfi')) { + flag(this, 'ssfi', overwritingPropertyGetter); + } + + // Setting the `lockSsfi` flag to `true` prevents the overwritten + // assertion from changing the `ssfi` flag. By this point, the `ssfi` + // flag is already set to the correct starting point for this assertion. + var origLockSsfi = flag(this, 'lockSsfi'); + flag(this, 'lockSsfi', true); + var result = getter(_super).call(this); + flag(this, 'lockSsfi', origLockSsfi); + + if (result !== undefined) { + return result; + } + + var newAssertion = new chai.Assertion(); + transferFlags(this, newAssertion); + return newAssertion; + } + , configurable: true + }); +}; + +},{"../../chai":2,"./flag":15,"./isProxyEnabled":25,"./transferFlags":32}],30:[function(require,module,exports){ +var config = require('../config'); +var flag = require('./flag'); +var getProperties = require('./getProperties'); +var isProxyEnabled = require('./isProxyEnabled'); + +/*! + * Chai - proxify utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/** + * ### .proxify(object) + * + * Return a proxy of given object that throws an error when a non-existent + * property is read. By default, the root cause is assumed to be a misspelled + * property, and thus an attempt is made to offer a reasonable suggestion from + * the list of existing properties. However, if a nonChainableMethodName is + * provided, then the root cause is instead a failure to invoke a non-chainable + * method prior to reading the non-existent property. + * + * If proxies are unsupported or disabled via the user's Chai config, then + * return object without modification. + * + * @param {Object} obj + * @param {String} nonChainableMethodName + * @namespace Utils + * @name proxify + */ + +var builtins = ['__flags', '__methods', '_obj', 'assert']; + +module.exports = function proxify(obj, nonChainableMethodName) { + if (!isProxyEnabled()) return obj; + + return new Proxy(obj, { + get: function proxyGetter(target, property) { + // This check is here because we should not throw errors on Symbol properties + // such as `Symbol.toStringTag`. + // The values for which an error should be thrown can be configured using + // the `config.proxyExcludedKeys` setting. + if (typeof property === 'string' && + config.proxyExcludedKeys.indexOf(property) === -1 && + !Reflect.has(target, property)) { + // Special message for invalid property access of non-chainable methods. + if (nonChainableMethodName) { + throw Error('Invalid Chai property: ' + nonChainableMethodName + '.' + + property + '. See docs for proper usage of "' + + nonChainableMethodName + '".'); + } + + // If the property is reasonably close to an existing Chai property, + // suggest that property to the user. Only suggest properties with a + // distance less than 4. + var suggestion = null; + var suggestionDistance = 4; + getProperties(target).forEach(function(prop) { + if ( + !Object.prototype.hasOwnProperty(prop) && + builtins.indexOf(prop) === -1 + ) { + var dist = stringDistanceCapped( + property, + prop, + suggestionDistance + ); + if (dist < suggestionDistance) { + suggestion = prop; + suggestionDistance = dist; + } + } + }); + + if (suggestion !== null) { + throw Error('Invalid Chai property: ' + property + + '. Did you mean "' + suggestion + '"?'); + } else { + throw Error('Invalid Chai property: ' + property); + } + } + + // Use this proxy getter as the starting point for removing implementation + // frames from the stack trace of a failed assertion. For property + // assertions, this prevents the proxy getter from showing up in the stack + // trace since it's invoked before the property getter. For method and + // chainable method assertions, this flag will end up getting changed to + // the method wrapper, which is good since this frame will no longer be in + // the stack once the method is invoked. Note that Chai builtin assertion + // properties such as `__flags` are skipped since this is only meant to + // capture the starting point of an assertion. This step is also skipped + // if the `lockSsfi` flag is set, thus indicating that this assertion is + // being called from within another assertion. In that case, the `ssfi` + // flag is already set to the outer assertion's starting point. + if (builtins.indexOf(property) === -1 && !flag(target, 'lockSsfi')) { + flag(target, 'ssfi', proxyGetter); + } + + return Reflect.get(target, property); + } + }); +}; + +/** + * # stringDistanceCapped(strA, strB, cap) + * Return the Levenshtein distance between two strings, but no more than cap. + * @param {string} strA + * @param {string} strB + * @param {number} number + * @return {number} min(string distance between strA and strB, cap) + * @api private + */ + +function stringDistanceCapped(strA, strB, cap) { + if (Math.abs(strA.length - strB.length) >= cap) { + return cap; + } + + var memo = []; + // `memo` is a two-dimensional array containing distances. + // memo[i][j] is the distance between strA.slice(0, i) and + // strB.slice(0, j). + for (var i = 0; i <= strA.length; i++) { + memo[i] = Array(strB.length + 1).fill(0); + memo[i][0] = i; + } + for (var j = 0; j < strB.length; j++) { + memo[0][j] = j; + } + + for (var i = 1; i <= strA.length; i++) { + var ch = strA.charCodeAt(i - 1); + for (var j = 1; j <= strB.length; j++) { + if (Math.abs(i - j) >= cap) { + memo[i][j] = cap; + continue; + } + memo[i][j] = Math.min( + memo[i - 1][j] + 1, + memo[i][j - 1] + 1, + memo[i - 1][j - 1] + + (ch === strB.charCodeAt(j - 1) ? 0 : 1) + ); + } + } + + return memo[strA.length][strB.length]; +} + +},{"../config":4,"./flag":15,"./getProperties":21,"./isProxyEnabled":25}],31:[function(require,module,exports){ +/*! + * Chai - test utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/*! + * Module dependencies + */ + +var flag = require('./flag'); + +/** + * ### .test(object, expression) + * + * Test and object for expression. + * + * @param {Object} object (constructed Assertion) + * @param {Arguments} chai.Assertion.prototype.assert arguments + * @namespace Utils + * @name test + */ + +module.exports = function test(obj, args) { + var negate = flag(obj, 'negate') + , expr = args[0]; + return negate ? !expr : expr; +}; + +},{"./flag":15}],32:[function(require,module,exports){ +/*! + * Chai - transferFlags utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/** + * ### .transferFlags(assertion, object, includeAll = true) + * + * Transfer all the flags for `assertion` to `object`. If + * `includeAll` is set to `false`, then the base Chai + * assertion flags (namely `object`, `ssfi`, `lockSsfi`, + * and `message`) will not be transferred. + * + * + * var newAssertion = new Assertion(); + * utils.transferFlags(assertion, newAssertion); + * + * var anotherAssertion = new Assertion(myObj); + * utils.transferFlags(assertion, anotherAssertion, false); + * + * @param {Assertion} assertion the assertion to transfer the flags from + * @param {Object} object the object to transfer the flags to; usually a new assertion + * @param {Boolean} includeAll + * @namespace Utils + * @name transferFlags + * @api private + */ + +module.exports = function transferFlags(assertion, object, includeAll) { + var flags = assertion.__flags || (assertion.__flags = Object.create(null)); + + if (!object.__flags) { + object.__flags = Object.create(null); + } + + includeAll = arguments.length === 3 ? includeAll : true; + + for (var flag in flags) { + if (includeAll || + (flag !== 'object' && flag !== 'ssfi' && flag !== 'lockSsfi' && flag != 'message')) { + object.__flags[flag] = flags[flag]; + } + } +}; + +},{}],33:[function(require,module,exports){ +/*! + * assertion-error + * Copyright(c) 2013 Jake Luer + * MIT Licensed + */ + +/*! + * Return a function that will copy properties from + * one object to another excluding any originally + * listed. Returned function will create a new `{}`. + * + * @param {String} excluded properties ... + * @return {Function} + */ + +function exclude () { + var excludes = [].slice.call(arguments); + + function excludeProps (res, obj) { + Object.keys(obj).forEach(function (key) { + if (!~excludes.indexOf(key)) res[key] = obj[key]; + }); + } + + return function extendExclude () { + var args = [].slice.call(arguments) + , i = 0 + , res = {}; + + for (; i < args.length; i++) { + excludeProps(res, args[i]); + } + + return res; + }; +}; + +/*! + * Primary Exports + */ + +module.exports = AssertionError; + +/** + * ### AssertionError + * + * An extension of the JavaScript `Error` constructor for + * assertion and validation scenarios. + * + * @param {String} message + * @param {Object} properties to include (optional) + * @param {callee} start stack function (optional) + */ + +function AssertionError (message, _props, ssf) { + var extend = exclude('name', 'message', 'stack', 'constructor', 'toJSON') + , props = extend(_props || {}); + + // default values + this.message = message || 'Unspecified AssertionError'; + this.showDiff = false; + + // copy from properties + for (var key in props) { + this[key] = props[key]; + } + + // capture stack trace + ssf = ssf || AssertionError; + if (Error.captureStackTrace) { + Error.captureStackTrace(this, ssf); + } else { + try { + throw new Error(); + } catch(e) { + this.stack = e.stack; + } + } +} + +/*! + * Inherit from Error.prototype + */ + +AssertionError.prototype = Object.create(Error.prototype); + +/*! + * Statically set name + */ + +AssertionError.prototype.name = 'AssertionError'; + +/*! + * Ensure correct constructor + */ + +AssertionError.prototype.constructor = AssertionError; + +/** + * Allow errors to be converted to JSON for static transfer. + * + * @param {Boolean} include stack (default: `true`) + * @return {Object} object that can be `JSON.stringify` + */ + +AssertionError.prototype.toJSON = function (stack) { + var extend = exclude('constructor', 'toJSON', 'stack') + , props = extend({ name: this.name }, this); + + // include stack if exists and not turned off + if (false !== stack && this.stack) { + props.stack = this.stack; + } + + return props; +}; + +},{}],34:[function(require,module,exports){ +'use strict'; + +/* ! + * Chai - checkError utility + * Copyright(c) 2012-2016 Jake Luer + * MIT Licensed + */ + +/** + * ### .checkError + * + * Checks that an error conforms to a given set of criteria and/or retrieves information about it. + * + * @api public + */ + +/** + * ### .compatibleInstance(thrown, errorLike) + * + * Checks if two instances are compatible (strict equal). + * Returns false if errorLike is not an instance of Error, because instances + * can only be compatible if they're both error instances. + * + * @name compatibleInstance + * @param {Error} thrown error + * @param {Error|ErrorConstructor} errorLike object to compare against + * @namespace Utils + * @api public + */ + +function compatibleInstance(thrown, errorLike) { + return errorLike instanceof Error && thrown === errorLike; +} + +/** + * ### .compatibleConstructor(thrown, errorLike) + * + * Checks if two constructors are compatible. + * This function can receive either an error constructor or + * an error instance as the `errorLike` argument. + * Constructors are compatible if they're the same or if one is + * an instance of another. + * + * @name compatibleConstructor + * @param {Error} thrown error + * @param {Error|ErrorConstructor} errorLike object to compare against + * @namespace Utils + * @api public + */ + +function compatibleConstructor(thrown, errorLike) { + if (errorLike instanceof Error) { + // If `errorLike` is an instance of any error we compare their constructors + return thrown.constructor === errorLike.constructor || thrown instanceof errorLike.constructor; + } else if (errorLike.prototype instanceof Error || errorLike === Error) { + // If `errorLike` is a constructor that inherits from Error, we compare `thrown` to `errorLike` directly + return thrown.constructor === errorLike || thrown instanceof errorLike; + } + + return false; +} + +/** + * ### .compatibleMessage(thrown, errMatcher) + * + * Checks if an error's message is compatible with a matcher (String or RegExp). + * If the message contains the String or passes the RegExp test, + * it is considered compatible. + * + * @name compatibleMessage + * @param {Error} thrown error + * @param {String|RegExp} errMatcher to look for into the message + * @namespace Utils + * @api public + */ + +function compatibleMessage(thrown, errMatcher) { + var comparisonString = typeof thrown === 'string' ? thrown : thrown.message; + if (errMatcher instanceof RegExp) { + return errMatcher.test(comparisonString); + } else if (typeof errMatcher === 'string') { + return comparisonString.indexOf(errMatcher) !== -1; // eslint-disable-line no-magic-numbers + } + + return false; +} + +/** + * ### .getFunctionName(constructorFn) + * + * Returns the name of a function. + * This also includes a polyfill function if `constructorFn.name` is not defined. + * + * @name getFunctionName + * @param {Function} constructorFn + * @namespace Utils + * @api private + */ + +var functionNameMatch = /\s*function(?:\s|\s*\/\*[^(?:*\/)]+\*\/\s*)*([^\(\/]+)/; +function getFunctionName(constructorFn) { + var name = ''; + if (typeof constructorFn.name === 'undefined') { + // Here we run a polyfill if constructorFn.name is not defined + var match = String(constructorFn).match(functionNameMatch); + if (match) { + name = match[1]; + } + } else { + name = constructorFn.name; + } + + return name; +} + +/** + * ### .getConstructorName(errorLike) + * + * Gets the constructor name for an Error instance or constructor itself. + * + * @name getConstructorName + * @param {Error|ErrorConstructor} errorLike + * @namespace Utils + * @api public + */ + +function getConstructorName(errorLike) { + var constructorName = errorLike; + if (errorLike instanceof Error) { + constructorName = getFunctionName(errorLike.constructor); + } else if (typeof errorLike === 'function') { + // If `err` is not an instance of Error it is an error constructor itself or another function. + // If we've got a common function we get its name, otherwise we may need to create a new instance + // of the error just in case it's a poorly-constructed error. Please see chaijs/chai/issues/45 to know more. + constructorName = getFunctionName(errorLike).trim() || + getFunctionName(new errorLike()); // eslint-disable-line new-cap + } + + return constructorName; +} + +/** + * ### .getMessage(errorLike) + * + * Gets the error message from an error. + * If `err` is a String itself, we return it. + * If the error has no message, we return an empty string. + * + * @name getMessage + * @param {Error|String} errorLike + * @namespace Utils + * @api public + */ + +function getMessage(errorLike) { + var msg = ''; + if (errorLike && errorLike.message) { + msg = errorLike.message; + } else if (typeof errorLike === 'string') { + msg = errorLike; + } + + return msg; +} + +module.exports = { + compatibleInstance: compatibleInstance, + compatibleConstructor: compatibleConstructor, + compatibleMessage: compatibleMessage, + getMessage: getMessage, + getConstructorName: getConstructorName, +}; + +},{}],35:[function(require,module,exports){ +'use strict'; +/* globals Symbol: false, Uint8Array: false, WeakMap: false */ +/*! + * deep-eql + * Copyright(c) 2013 Jake Luer + * MIT Licensed + */ + +var type = require('type-detect'); +function FakeMap() { + this._key = 'chai/deep-eql__' + Math.random() + Date.now(); +} + +FakeMap.prototype = { + get: function getMap(key) { + return key[this._key]; + }, + set: function setMap(key, value) { + if (Object.isExtensible(key)) { + Object.defineProperty(key, this._key, { + value: value, + configurable: true, + }); + } + }, +}; + +var MemoizeMap = typeof WeakMap === 'function' ? WeakMap : FakeMap; +/*! + * Check to see if the MemoizeMap has recorded a result of the two operands + * + * @param {Mixed} leftHandOperand + * @param {Mixed} rightHandOperand + * @param {MemoizeMap} memoizeMap + * @returns {Boolean|null} result +*/ +function memoizeCompare(leftHandOperand, rightHandOperand, memoizeMap) { + // Technically, WeakMap keys can *only* be objects, not primitives. + if (!memoizeMap || isPrimitive(leftHandOperand) || isPrimitive(rightHandOperand)) { + return null; + } + var leftHandMap = memoizeMap.get(leftHandOperand); + if (leftHandMap) { + var result = leftHandMap.get(rightHandOperand); + if (typeof result === 'boolean') { + return result; + } + } + return null; +} + +/*! + * Set the result of the equality into the MemoizeMap + * + * @param {Mixed} leftHandOperand + * @param {Mixed} rightHandOperand + * @param {MemoizeMap} memoizeMap + * @param {Boolean} result +*/ +function memoizeSet(leftHandOperand, rightHandOperand, memoizeMap, result) { + // Technically, WeakMap keys can *only* be objects, not primitives. + if (!memoizeMap || isPrimitive(leftHandOperand) || isPrimitive(rightHandOperand)) { + return; + } + var leftHandMap = memoizeMap.get(leftHandOperand); + if (leftHandMap) { + leftHandMap.set(rightHandOperand, result); + } else { + leftHandMap = new MemoizeMap(); + leftHandMap.set(rightHandOperand, result); + memoizeMap.set(leftHandOperand, leftHandMap); + } +} + +/*! + * Primary Export + */ + +module.exports = deepEqual; +module.exports.MemoizeMap = MemoizeMap; + +/** + * Assert deeply nested sameValue equality between two objects of any type. + * + * @param {Mixed} leftHandOperand + * @param {Mixed} rightHandOperand + * @param {Object} [options] (optional) Additional options + * @param {Array} [options.comparator] (optional) Override default algorithm, determining custom equality. + * @param {Array} [options.memoize] (optional) Provide a custom memoization object which will cache the results of + complex objects for a speed boost. By passing `false` you can disable memoization, but this will cause circular + references to blow the stack. + * @return {Boolean} equal match + */ +function deepEqual(leftHandOperand, rightHandOperand, options) { + // If we have a comparator, we can't assume anything; so bail to its check first. + if (options && options.comparator) { + return extensiveDeepEqual(leftHandOperand, rightHandOperand, options); + } + + var simpleResult = simpleEqual(leftHandOperand, rightHandOperand); + if (simpleResult !== null) { + return simpleResult; + } + + // Deeper comparisons are pushed through to a larger function + return extensiveDeepEqual(leftHandOperand, rightHandOperand, options); +} + +/** + * Many comparisons can be canceled out early via simple equality or primitive checks. + * @param {Mixed} leftHandOperand + * @param {Mixed} rightHandOperand + * @return {Boolean|null} equal match + */ +function simpleEqual(leftHandOperand, rightHandOperand) { + // Equal references (except for Numbers) can be returned early + if (leftHandOperand === rightHandOperand) { + // Handle +-0 cases + return leftHandOperand !== 0 || 1 / leftHandOperand === 1 / rightHandOperand; + } + + // handle NaN cases + if ( + leftHandOperand !== leftHandOperand && // eslint-disable-line no-self-compare + rightHandOperand !== rightHandOperand // eslint-disable-line no-self-compare + ) { + return true; + } + + // Anything that is not an 'object', i.e. symbols, functions, booleans, numbers, + // strings, and undefined, can be compared by reference. + if (isPrimitive(leftHandOperand) || isPrimitive(rightHandOperand)) { + // Easy out b/c it would have passed the first equality check + return false; + } + return null; +} + +/*! + * The main logic of the `deepEqual` function. + * + * @param {Mixed} leftHandOperand + * @param {Mixed} rightHandOperand + * @param {Object} [options] (optional) Additional options + * @param {Array} [options.comparator] (optional) Override default algorithm, determining custom equality. + * @param {Array} [options.memoize] (optional) Provide a custom memoization object which will cache the results of + complex objects for a speed boost. By passing `false` you can disable memoization, but this will cause circular + references to blow the stack. + * @return {Boolean} equal match +*/ +function extensiveDeepEqual(leftHandOperand, rightHandOperand, options) { + options = options || {}; + options.memoize = options.memoize === false ? false : options.memoize || new MemoizeMap(); + var comparator = options && options.comparator; + + // Check if a memoized result exists. + var memoizeResultLeft = memoizeCompare(leftHandOperand, rightHandOperand, options.memoize); + if (memoizeResultLeft !== null) { + return memoizeResultLeft; + } + var memoizeResultRight = memoizeCompare(rightHandOperand, leftHandOperand, options.memoize); + if (memoizeResultRight !== null) { + return memoizeResultRight; + } + + // If a comparator is present, use it. + if (comparator) { + var comparatorResult = comparator(leftHandOperand, rightHandOperand); + // Comparators may return null, in which case we want to go back to default behavior. + if (comparatorResult === false || comparatorResult === true) { + memoizeSet(leftHandOperand, rightHandOperand, options.memoize, comparatorResult); + return comparatorResult; + } + // To allow comparators to override *any* behavior, we ran them first. Since it didn't decide + // what to do, we need to make sure to return the basic tests first before we move on. + var simpleResult = simpleEqual(leftHandOperand, rightHandOperand); + if (simpleResult !== null) { + // Don't memoize this, it takes longer to set/retrieve than to just compare. + return simpleResult; + } + } + + var leftHandType = type(leftHandOperand); + if (leftHandType !== type(rightHandOperand)) { + memoizeSet(leftHandOperand, rightHandOperand, options.memoize, false); + return false; + } + + // Temporarily set the operands in the memoize object to prevent blowing the stack + memoizeSet(leftHandOperand, rightHandOperand, options.memoize, true); + + var result = extensiveDeepEqualByType(leftHandOperand, rightHandOperand, leftHandType, options); + memoizeSet(leftHandOperand, rightHandOperand, options.memoize, result); + return result; +} + +function extensiveDeepEqualByType(leftHandOperand, rightHandOperand, leftHandType, options) { + switch (leftHandType) { + case 'String': + case 'Number': + case 'Boolean': + case 'Date': + // If these types are their instance types (e.g. `new Number`) then re-deepEqual against their values + return deepEqual(leftHandOperand.valueOf(), rightHandOperand.valueOf()); + case 'Promise': + case 'Symbol': + case 'function': + case 'WeakMap': + case 'WeakSet': + case 'Error': + return leftHandOperand === rightHandOperand; + case 'Arguments': + case 'Int8Array': + case 'Uint8Array': + case 'Uint8ClampedArray': + case 'Int16Array': + case 'Uint16Array': + case 'Int32Array': + case 'Uint32Array': + case 'Float32Array': + case 'Float64Array': + case 'Array': + return iterableEqual(leftHandOperand, rightHandOperand, options); + case 'RegExp': + return regexpEqual(leftHandOperand, rightHandOperand); + case 'Generator': + return generatorEqual(leftHandOperand, rightHandOperand, options); + case 'DataView': + return iterableEqual(new Uint8Array(leftHandOperand.buffer), new Uint8Array(rightHandOperand.buffer), options); + case 'ArrayBuffer': + return iterableEqual(new Uint8Array(leftHandOperand), new Uint8Array(rightHandOperand), options); + case 'Set': + return entriesEqual(leftHandOperand, rightHandOperand, options); + case 'Map': + return entriesEqual(leftHandOperand, rightHandOperand, options); + default: + return objectEqual(leftHandOperand, rightHandOperand, options); + } +} + +/*! + * Compare two Regular Expressions for equality. + * + * @param {RegExp} leftHandOperand + * @param {RegExp} rightHandOperand + * @return {Boolean} result + */ + +function regexpEqual(leftHandOperand, rightHandOperand) { + return leftHandOperand.toString() === rightHandOperand.toString(); +} + +/*! + * Compare two Sets/Maps for equality. Faster than other equality functions. + * + * @param {Set} leftHandOperand + * @param {Set} rightHandOperand + * @param {Object} [options] (Optional) + * @return {Boolean} result + */ + +function entriesEqual(leftHandOperand, rightHandOperand, options) { + // IE11 doesn't support Set#entries or Set#@@iterator, so we need manually populate using Set#forEach + if (leftHandOperand.size !== rightHandOperand.size) { + return false; + } + if (leftHandOperand.size === 0) { + return true; + } + var leftHandItems = []; + var rightHandItems = []; + leftHandOperand.forEach(function gatherEntries(key, value) { + leftHandItems.push([ key, value ]); + }); + rightHandOperand.forEach(function gatherEntries(key, value) { + rightHandItems.push([ key, value ]); + }); + return iterableEqual(leftHandItems.sort(), rightHandItems.sort(), options); +} + +/*! + * Simple equality for flat iterable objects such as Arrays, TypedArrays or Node.js buffers. + * + * @param {Iterable} leftHandOperand + * @param {Iterable} rightHandOperand + * @param {Object} [options] (Optional) + * @return {Boolean} result + */ + +function iterableEqual(leftHandOperand, rightHandOperand, options) { + var length = leftHandOperand.length; + if (length !== rightHandOperand.length) { + return false; + } + if (length === 0) { + return true; + } + var index = -1; + while (++index < length) { + if (deepEqual(leftHandOperand[index], rightHandOperand[index], options) === false) { + return false; + } + } + return true; +} + +/*! + * Simple equality for generator objects such as those returned by generator functions. + * + * @param {Iterable} leftHandOperand + * @param {Iterable} rightHandOperand + * @param {Object} [options] (Optional) + * @return {Boolean} result + */ + +function generatorEqual(leftHandOperand, rightHandOperand, options) { + return iterableEqual(getGeneratorEntries(leftHandOperand), getGeneratorEntries(rightHandOperand), options); +} + +/*! + * Determine if the given object has an @@iterator function. + * + * @param {Object} target + * @return {Boolean} `true` if the object has an @@iterator function. + */ +function hasIteratorFunction(target) { + return typeof Symbol !== 'undefined' && + typeof target === 'object' && + typeof Symbol.iterator !== 'undefined' && + typeof target[Symbol.iterator] === 'function'; +} + +/*! + * Gets all iterator entries from the given Object. If the Object has no @@iterator function, returns an empty array. + * This will consume the iterator - which could have side effects depending on the @@iterator implementation. + * + * @param {Object} target + * @returns {Array} an array of entries from the @@iterator function + */ +function getIteratorEntries(target) { + if (hasIteratorFunction(target)) { + try { + return getGeneratorEntries(target[Symbol.iterator]()); + } catch (iteratorError) { + return []; + } + } + return []; +} + +/*! + * Gets all entries from a Generator. This will consume the generator - which could have side effects. + * + * @param {Generator} target + * @returns {Array} an array of entries from the Generator. + */ +function getGeneratorEntries(generator) { + var generatorResult = generator.next(); + var accumulator = [ generatorResult.value ]; + while (generatorResult.done === false) { + generatorResult = generator.next(); + accumulator.push(generatorResult.value); + } + return accumulator; +} + +/*! + * Gets all own and inherited enumerable keys from a target. + * + * @param {Object} target + * @returns {Array} an array of own and inherited enumerable keys from the target. + */ +function getEnumerableKeys(target) { + var keys = []; + for (var key in target) { + keys.push(key); + } + return keys; +} + +/*! + * Determines if two objects have matching values, given a set of keys. Defers to deepEqual for the equality check of + * each key. If any value of the given key is not equal, the function will return false (early). + * + * @param {Mixed} leftHandOperand + * @param {Mixed} rightHandOperand + * @param {Array} keys An array of keys to compare the values of leftHandOperand and rightHandOperand against + * @param {Object} [options] (Optional) + * @return {Boolean} result + */ +function keysEqual(leftHandOperand, rightHandOperand, keys, options) { + var length = keys.length; + if (length === 0) { + return true; + } + for (var i = 0; i < length; i += 1) { + if (deepEqual(leftHandOperand[keys[i]], rightHandOperand[keys[i]], options) === false) { + return false; + } + } + return true; +} + +/*! + * Recursively check the equality of two Objects. Once basic sameness has been established it will defer to `deepEqual` + * for each enumerable key in the object. + * + * @param {Mixed} leftHandOperand + * @param {Mixed} rightHandOperand + * @param {Object} [options] (Optional) + * @return {Boolean} result + */ + +function objectEqual(leftHandOperand, rightHandOperand, options) { + var leftHandKeys = getEnumerableKeys(leftHandOperand); + var rightHandKeys = getEnumerableKeys(rightHandOperand); + if (leftHandKeys.length && leftHandKeys.length === rightHandKeys.length) { + leftHandKeys.sort(); + rightHandKeys.sort(); + if (iterableEqual(leftHandKeys, rightHandKeys) === false) { + return false; + } + return keysEqual(leftHandOperand, rightHandOperand, leftHandKeys, options); + } + + var leftHandEntries = getIteratorEntries(leftHandOperand); + var rightHandEntries = getIteratorEntries(rightHandOperand); + if (leftHandEntries.length && leftHandEntries.length === rightHandEntries.length) { + leftHandEntries.sort(); + rightHandEntries.sort(); + return iterableEqual(leftHandEntries, rightHandEntries, options); + } + + if (leftHandKeys.length === 0 && + leftHandEntries.length === 0 && + rightHandKeys.length === 0 && + rightHandEntries.length === 0) { + return true; + } + + return false; +} + +/*! + * Returns true if the argument is a primitive. + * + * This intentionally returns true for all objects that can be compared by reference, + * including functions and symbols. + * + * @param {Mixed} value + * @return {Boolean} result + */ +function isPrimitive(value) { + return value === null || typeof value !== 'object'; +} + +},{"type-detect":38}],36:[function(require,module,exports){ +'use strict'; + +/* ! + * Chai - getFuncName utility + * Copyright(c) 2012-2016 Jake Luer + * MIT Licensed + */ + +/** + * ### .getFuncName(constructorFn) + * + * Returns the name of a function. + * When a non-function instance is passed, returns `null`. + * This also includes a polyfill function if `aFunc.name` is not defined. + * + * @name getFuncName + * @param {Function} funct + * @namespace Utils + * @api public + */ + +var toString = Function.prototype.toString; +var functionNameMatch = /\s*function(?:\s|\s*\/\*[^(?:*\/)]+\*\/\s*)*([^\s\(\/]+)/; +function getFuncName(aFunc) { + if (typeof aFunc !== 'function') { + return null; + } + + var name = ''; + if (typeof Function.prototype.name === 'undefined' && typeof aFunc.name === 'undefined') { + // Here we run a polyfill if Function does not support the `name` property and if aFunc.name is not defined + var match = toString.call(aFunc).match(functionNameMatch); + if (match) { + name = match[1]; + } + } else { + // If we've got a `name` property we just use it + name = aFunc.name; + } + + return name; +} + +module.exports = getFuncName; + +},{}],37:[function(require,module,exports){ +'use strict'; + +/* ! + * Chai - pathval utility + * Copyright(c) 2012-2014 Jake Luer + * @see https://github.com/logicalparadox/filtr + * MIT Licensed + */ + +/** + * ### .hasProperty(object, name) + * + * This allows checking whether an object has own + * or inherited from prototype chain named property. + * + * Basically does the same thing as the `in` + * operator but works properly with null/undefined values + * and other primitives. + * + * var obj = { + * arr: ['a', 'b', 'c'] + * , str: 'Hello' + * } + * + * The following would be the results. + * + * hasProperty(obj, 'str'); // true + * hasProperty(obj, 'constructor'); // true + * hasProperty(obj, 'bar'); // false + * + * hasProperty(obj.str, 'length'); // true + * hasProperty(obj.str, 1); // true + * hasProperty(obj.str, 5); // false + * + * hasProperty(obj.arr, 'length'); // true + * hasProperty(obj.arr, 2); // true + * hasProperty(obj.arr, 3); // false + * + * @param {Object} object + * @param {String|Symbol} name + * @returns {Boolean} whether it exists + * @namespace Utils + * @name hasProperty + * @api public + */ + +function hasProperty(obj, name) { + if (typeof obj === 'undefined' || obj === null) { + return false; + } + + // The `in` operator does not work with primitives. + return name in Object(obj); +} + +/* ! + * ## parsePath(path) + * + * Helper function used to parse string object + * paths. Use in conjunction with `internalGetPathValue`. + * + * var parsed = parsePath('myobject.property.subprop'); + * + * ### Paths: + * + * * Can be infinitely deep and nested. + * * Arrays are also valid using the formal `myobject.document[3].property`. + * * Literal dots and brackets (not delimiter) must be backslash-escaped. + * + * @param {String} path + * @returns {Object} parsed + * @api private + */ + +function parsePath(path) { + var str = path.replace(/([^\\])\[/g, '$1.['); + var parts = str.match(/(\\\.|[^.]+?)+/g); + return parts.map(function mapMatches(value) { + var regexp = /^\[(\d+)\]$/; + var mArr = regexp.exec(value); + var parsed = null; + if (mArr) { + parsed = { i: parseFloat(mArr[1]) }; + } else { + parsed = { p: value.replace(/\\([.\[\]])/g, '$1') }; + } + + return parsed; + }); +} + +/* ! + * ## internalGetPathValue(obj, parsed[, pathDepth]) + * + * Helper companion function for `.parsePath` that returns + * the value located at the parsed address. + * + * var value = getPathValue(obj, parsed); + * + * @param {Object} object to search against + * @param {Object} parsed definition from `parsePath`. + * @param {Number} depth (nesting level) of the property we want to retrieve + * @returns {Object|Undefined} value + * @api private + */ + +function internalGetPathValue(obj, parsed, pathDepth) { + var temporaryValue = obj; + var res = null; + pathDepth = (typeof pathDepth === 'undefined' ? parsed.length : pathDepth); + + for (var i = 0; i < pathDepth; i++) { + var part = parsed[i]; + if (temporaryValue) { + if (typeof part.p === 'undefined') { + temporaryValue = temporaryValue[part.i]; + } else { + temporaryValue = temporaryValue[part.p]; + } + + if (i === (pathDepth - 1)) { + res = temporaryValue; + } + } + } + + return res; +} + +/* ! + * ## internalSetPathValue(obj, value, parsed) + * + * Companion function for `parsePath` that sets + * the value located at a parsed address. + * + * internalSetPathValue(obj, 'value', parsed); + * + * @param {Object} object to search and define on + * @param {*} value to use upon set + * @param {Object} parsed definition from `parsePath` + * @api private + */ + +function internalSetPathValue(obj, val, parsed) { + var tempObj = obj; + var pathDepth = parsed.length; + var part = null; + // Here we iterate through every part of the path + for (var i = 0; i < pathDepth; i++) { + var propName = null; + var propVal = null; + part = parsed[i]; + + // If it's the last part of the path, we set the 'propName' value with the property name + if (i === (pathDepth - 1)) { + propName = typeof part.p === 'undefined' ? part.i : part.p; + // Now we set the property with the name held by 'propName' on object with the desired val + tempObj[propName] = val; + } else if (typeof part.p !== 'undefined' && tempObj[part.p]) { + tempObj = tempObj[part.p]; + } else if (typeof part.i !== 'undefined' && tempObj[part.i]) { + tempObj = tempObj[part.i]; + } else { + // If the obj doesn't have the property we create one with that name to define it + var next = parsed[i + 1]; + // Here we set the name of the property which will be defined + propName = typeof part.p === 'undefined' ? part.i : part.p; + // Here we decide if this property will be an array or a new object + propVal = typeof next.p === 'undefined' ? [] : {}; + tempObj[propName] = propVal; + tempObj = tempObj[propName]; + } + } +} + +/** + * ### .getPathInfo(object, path) + * + * This allows the retrieval of property info in an + * object given a string path. + * + * The path info consists of an object with the + * following properties: + * + * * parent - The parent object of the property referenced by `path` + * * name - The name of the final property, a number if it was an array indexer + * * value - The value of the property, if it exists, otherwise `undefined` + * * exists - Whether the property exists or not + * + * @param {Object} object + * @param {String} path + * @returns {Object} info + * @namespace Utils + * @name getPathInfo + * @api public + */ + +function getPathInfo(obj, path) { + var parsed = parsePath(path); + var last = parsed[parsed.length - 1]; + var info = { + parent: parsed.length > 1 ? internalGetPathValue(obj, parsed, parsed.length - 1) : obj, + name: last.p || last.i, + value: internalGetPathValue(obj, parsed), + }; + info.exists = hasProperty(info.parent, info.name); + + return info; +} + +/** + * ### .getPathValue(object, path) + * + * This allows the retrieval of values in an + * object given a string path. + * + * var obj = { + * prop1: { + * arr: ['a', 'b', 'c'] + * , str: 'Hello' + * } + * , prop2: { + * arr: [ { nested: 'Universe' } ] + * , str: 'Hello again!' + * } + * } + * + * The following would be the results. + * + * getPathValue(obj, 'prop1.str'); // Hello + * getPathValue(obj, 'prop1.att[2]'); // b + * getPathValue(obj, 'prop2.arr[0].nested'); // Universe + * + * @param {Object} object + * @param {String} path + * @returns {Object} value or `undefined` + * @namespace Utils + * @name getPathValue + * @api public + */ + +function getPathValue(obj, path) { + var info = getPathInfo(obj, path); + return info.value; +} + +/** + * ### .setPathValue(object, path, value) + * + * Define the value in an object at a given string path. + * + * ```js + * var obj = { + * prop1: { + * arr: ['a', 'b', 'c'] + * , str: 'Hello' + * } + * , prop2: { + * arr: [ { nested: 'Universe' } ] + * , str: 'Hello again!' + * } + * }; + * ``` + * + * The following would be acceptable. + * + * ```js + * var properties = require('tea-properties'); + * properties.set(obj, 'prop1.str', 'Hello Universe!'); + * properties.set(obj, 'prop1.arr[2]', 'B'); + * properties.set(obj, 'prop2.arr[0].nested.value', { hello: 'universe' }); + * ``` + * + * @param {Object} object + * @param {String} path + * @param {Mixed} value + * @api private + */ + +function setPathValue(obj, path, val) { + var parsed = parsePath(path); + internalSetPathValue(obj, val, parsed); + return obj; +} + +module.exports = { + hasProperty: hasProperty, + getPathInfo: getPathInfo, + getPathValue: getPathValue, + setPathValue: setPathValue, +}; + +},{}],38:[function(require,module,exports){ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global.typeDetect = factory()); +}(this, (function () { 'use strict'; + +/* ! + * type-detect + * Copyright(c) 2013 jake luer + * MIT Licensed + */ +var promiseExists = typeof Promise === 'function'; + +/* eslint-disable no-undef */ +var globalObject = typeof self === 'object' ? self : global; // eslint-disable-line id-blacklist + +var symbolExists = typeof Symbol !== 'undefined'; +var mapExists = typeof Map !== 'undefined'; +var setExists = typeof Set !== 'undefined'; +var weakMapExists = typeof WeakMap !== 'undefined'; +var weakSetExists = typeof WeakSet !== 'undefined'; +var dataViewExists = typeof DataView !== 'undefined'; +var symbolIteratorExists = symbolExists && typeof Symbol.iterator !== 'undefined'; +var symbolToStringTagExists = symbolExists && typeof Symbol.toStringTag !== 'undefined'; +var setEntriesExists = setExists && typeof Set.prototype.entries === 'function'; +var mapEntriesExists = mapExists && typeof Map.prototype.entries === 'function'; +var setIteratorPrototype = setEntriesExists && Object.getPrototypeOf(new Set().entries()); +var mapIteratorPrototype = mapEntriesExists && Object.getPrototypeOf(new Map().entries()); +var arrayIteratorExists = symbolIteratorExists && typeof Array.prototype[Symbol.iterator] === 'function'; +var arrayIteratorPrototype = arrayIteratorExists && Object.getPrototypeOf([][Symbol.iterator]()); +var stringIteratorExists = symbolIteratorExists && typeof String.prototype[Symbol.iterator] === 'function'; +var stringIteratorPrototype = stringIteratorExists && Object.getPrototypeOf(''[Symbol.iterator]()); +var toStringLeftSliceLength = 8; +var toStringRightSliceLength = -1; +/** + * ### typeOf (obj) + * + * Uses `Object.prototype.toString` to determine the type of an object, + * normalising behaviour across engine versions & well optimised. + * + * @param {Mixed} object + * @return {String} object type + * @api public + */ +function typeDetect(obj) { + /* ! Speed optimisation + * Pre: + * string literal x 3,039,035 ops/sec ±1.62% (78 runs sampled) + * boolean literal x 1,424,138 ops/sec ±4.54% (75 runs sampled) + * number literal x 1,653,153 ops/sec ±1.91% (82 runs sampled) + * undefined x 9,978,660 ops/sec ±1.92% (75 runs sampled) + * function x 2,556,769 ops/sec ±1.73% (77 runs sampled) + * Post: + * string literal x 38,564,796 ops/sec ±1.15% (79 runs sampled) + * boolean literal x 31,148,940 ops/sec ±1.10% (79 runs sampled) + * number literal x 32,679,330 ops/sec ±1.90% (78 runs sampled) + * undefined x 32,363,368 ops/sec ±1.07% (82 runs sampled) + * function x 31,296,870 ops/sec ±0.96% (83 runs sampled) + */ + var typeofObj = typeof obj; + if (typeofObj !== 'object') { + return typeofObj; + } + + /* ! Speed optimisation + * Pre: + * null x 28,645,765 ops/sec ±1.17% (82 runs sampled) + * Post: + * null x 36,428,962 ops/sec ±1.37% (84 runs sampled) + */ + if (obj === null) { + return 'null'; + } + + /* ! Spec Conformance + * Test: `Object.prototype.toString.call(window)`` + * - Node === "[object global]" + * - Chrome === "[object global]" + * - Firefox === "[object Window]" + * - PhantomJS === "[object Window]" + * - Safari === "[object Window]" + * - IE 11 === "[object Window]" + * - IE Edge === "[object Window]" + * Test: `Object.prototype.toString.call(this)`` + * - Chrome Worker === "[object global]" + * - Firefox Worker === "[object DedicatedWorkerGlobalScope]" + * - Safari Worker === "[object DedicatedWorkerGlobalScope]" + * - IE 11 Worker === "[object WorkerGlobalScope]" + * - IE Edge Worker === "[object WorkerGlobalScope]" + */ + if (obj === globalObject) { + return 'global'; + } + + /* ! Speed optimisation + * Pre: + * array literal x 2,888,352 ops/sec ±0.67% (82 runs sampled) + * Post: + * array literal x 22,479,650 ops/sec ±0.96% (81 runs sampled) + */ + if ( + Array.isArray(obj) && + (symbolToStringTagExists === false || !(Symbol.toStringTag in obj)) + ) { + return 'Array'; + } + + // Not caching existence of `window` and related properties due to potential + // for `window` to be unset before tests in quasi-browser environments. + if (typeof window === 'object' && window !== null) { + /* ! Spec Conformance + * (https://html.spec.whatwg.org/multipage/browsers.html#location) + * WhatWG HTML$7.7.3 - The `Location` interface + * Test: `Object.prototype.toString.call(window.location)`` + * - IE <=11 === "[object Object]" + * - IE Edge <=13 === "[object Object]" + */ + if (typeof window.location === 'object' && obj === window.location) { + return 'Location'; + } + + /* ! Spec Conformance + * (https://html.spec.whatwg.org/#document) + * WhatWG HTML$3.1.1 - The `Document` object + * Note: Most browsers currently adher to the W3C DOM Level 2 spec + * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-26809268) + * which suggests that browsers should use HTMLTableCellElement for + * both TD and TH elements. WhatWG separates these. + * WhatWG HTML states: + * > For historical reasons, Window objects must also have a + * > writable, configurable, non-enumerable property named + * > HTMLDocument whose value is the Document interface object. + * Test: `Object.prototype.toString.call(document)`` + * - Chrome === "[object HTMLDocument]" + * - Firefox === "[object HTMLDocument]" + * - Safari === "[object HTMLDocument]" + * - IE <=10 === "[object Document]" + * - IE 11 === "[object HTMLDocument]" + * - IE Edge <=13 === "[object HTMLDocument]" + */ + if (typeof window.document === 'object' && obj === window.document) { + return 'Document'; + } + + if (typeof window.navigator === 'object') { + /* ! Spec Conformance + * (https://html.spec.whatwg.org/multipage/webappapis.html#mimetypearray) + * WhatWG HTML$8.6.1.5 - Plugins - Interface MimeTypeArray + * Test: `Object.prototype.toString.call(navigator.mimeTypes)`` + * - IE <=10 === "[object MSMimeTypesCollection]" + */ + if (typeof window.navigator.mimeTypes === 'object' && + obj === window.navigator.mimeTypes) { + return 'MimeTypeArray'; + } + + /* ! Spec Conformance + * (https://html.spec.whatwg.org/multipage/webappapis.html#pluginarray) + * WhatWG HTML$8.6.1.5 - Plugins - Interface PluginArray + * Test: `Object.prototype.toString.call(navigator.plugins)`` + * - IE <=10 === "[object MSPluginsCollection]" + */ + if (typeof window.navigator.plugins === 'object' && + obj === window.navigator.plugins) { + return 'PluginArray'; + } + } + + if ((typeof window.HTMLElement === 'function' || + typeof window.HTMLElement === 'object') && + obj instanceof window.HTMLElement) { + /* ! Spec Conformance + * (https://html.spec.whatwg.org/multipage/webappapis.html#pluginarray) + * WhatWG HTML$4.4.4 - The `blockquote` element - Interface `HTMLQuoteElement` + * Test: `Object.prototype.toString.call(document.createElement('blockquote'))`` + * - IE <=10 === "[object HTMLBlockElement]" + */ + if (obj.tagName === 'BLOCKQUOTE') { + return 'HTMLQuoteElement'; + } + + /* ! Spec Conformance + * (https://html.spec.whatwg.org/#htmltabledatacellelement) + * WhatWG HTML$4.9.9 - The `td` element - Interface `HTMLTableDataCellElement` + * Note: Most browsers currently adher to the W3C DOM Level 2 spec + * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-82915075) + * which suggests that browsers should use HTMLTableCellElement for + * both TD and TH elements. WhatWG separates these. + * Test: Object.prototype.toString.call(document.createElement('td')) + * - Chrome === "[object HTMLTableCellElement]" + * - Firefox === "[object HTMLTableCellElement]" + * - Safari === "[object HTMLTableCellElement]" + */ + if (obj.tagName === 'TD') { + return 'HTMLTableDataCellElement'; + } + + /* ! Spec Conformance + * (https://html.spec.whatwg.org/#htmltableheadercellelement) + * WhatWG HTML$4.9.9 - The `td` element - Interface `HTMLTableHeaderCellElement` + * Note: Most browsers currently adher to the W3C DOM Level 2 spec + * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-82915075) + * which suggests that browsers should use HTMLTableCellElement for + * both TD and TH elements. WhatWG separates these. + * Test: Object.prototype.toString.call(document.createElement('th')) + * - Chrome === "[object HTMLTableCellElement]" + * - Firefox === "[object HTMLTableCellElement]" + * - Safari === "[object HTMLTableCellElement]" + */ + if (obj.tagName === 'TH') { + return 'HTMLTableHeaderCellElement'; + } + } + } + + /* ! Speed optimisation + * Pre: + * Float64Array x 625,644 ops/sec ±1.58% (80 runs sampled) + * Float32Array x 1,279,852 ops/sec ±2.91% (77 runs sampled) + * Uint32Array x 1,178,185 ops/sec ±1.95% (83 runs sampled) + * Uint16Array x 1,008,380 ops/sec ±2.25% (80 runs sampled) + * Uint8Array x 1,128,040 ops/sec ±2.11% (81 runs sampled) + * Int32Array x 1,170,119 ops/sec ±2.88% (80 runs sampled) + * Int16Array x 1,176,348 ops/sec ±5.79% (86 runs sampled) + * Int8Array x 1,058,707 ops/sec ±4.94% (77 runs sampled) + * Uint8ClampedArray x 1,110,633 ops/sec ±4.20% (80 runs sampled) + * Post: + * Float64Array x 7,105,671 ops/sec ±13.47% (64 runs sampled) + * Float32Array x 5,887,912 ops/sec ±1.46% (82 runs sampled) + * Uint32Array x 6,491,661 ops/sec ±1.76% (79 runs sampled) + * Uint16Array x 6,559,795 ops/sec ±1.67% (82 runs sampled) + * Uint8Array x 6,463,966 ops/sec ±1.43% (85 runs sampled) + * Int32Array x 5,641,841 ops/sec ±3.49% (81 runs sampled) + * Int16Array x 6,583,511 ops/sec ±1.98% (80 runs sampled) + * Int8Array x 6,606,078 ops/sec ±1.74% (81 runs sampled) + * Uint8ClampedArray x 6,602,224 ops/sec ±1.77% (83 runs sampled) + */ + var stringTag = (symbolToStringTagExists && obj[Symbol.toStringTag]); + if (typeof stringTag === 'string') { + return stringTag; + } + + var objPrototype = Object.getPrototypeOf(obj); + /* ! Speed optimisation + * Pre: + * regex literal x 1,772,385 ops/sec ±1.85% (77 runs sampled) + * regex constructor x 2,143,634 ops/sec ±2.46% (78 runs sampled) + * Post: + * regex literal x 3,928,009 ops/sec ±0.65% (78 runs sampled) + * regex constructor x 3,931,108 ops/sec ±0.58% (84 runs sampled) + */ + if (objPrototype === RegExp.prototype) { + return 'RegExp'; + } + + /* ! Speed optimisation + * Pre: + * date x 2,130,074 ops/sec ±4.42% (68 runs sampled) + * Post: + * date x 3,953,779 ops/sec ±1.35% (77 runs sampled) + */ + if (objPrototype === Date.prototype) { + return 'Date'; + } + + /* ! Spec Conformance + * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-promise.prototype-@@tostringtag) + * ES6$25.4.5.4 - Promise.prototype[@@toStringTag] should be "Promise": + * Test: `Object.prototype.toString.call(Promise.resolve())`` + * - Chrome <=47 === "[object Object]" + * - Edge <=20 === "[object Object]" + * - Firefox 29-Latest === "[object Promise]" + * - Safari 7.1-Latest === "[object Promise]" + */ + if (promiseExists && objPrototype === Promise.prototype) { + return 'Promise'; + } + + /* ! Speed optimisation + * Pre: + * set x 2,222,186 ops/sec ±1.31% (82 runs sampled) + * Post: + * set x 4,545,879 ops/sec ±1.13% (83 runs sampled) + */ + if (setExists && objPrototype === Set.prototype) { + return 'Set'; + } + + /* ! Speed optimisation + * Pre: + * map x 2,396,842 ops/sec ±1.59% (81 runs sampled) + * Post: + * map x 4,183,945 ops/sec ±6.59% (82 runs sampled) + */ + if (mapExists && objPrototype === Map.prototype) { + return 'Map'; + } + + /* ! Speed optimisation + * Pre: + * weakset x 1,323,220 ops/sec ±2.17% (76 runs sampled) + * Post: + * weakset x 4,237,510 ops/sec ±2.01% (77 runs sampled) + */ + if (weakSetExists && objPrototype === WeakSet.prototype) { + return 'WeakSet'; + } + + /* ! Speed optimisation + * Pre: + * weakmap x 1,500,260 ops/sec ±2.02% (78 runs sampled) + * Post: + * weakmap x 3,881,384 ops/sec ±1.45% (82 runs sampled) + */ + if (weakMapExists && objPrototype === WeakMap.prototype) { + return 'WeakMap'; + } + + /* ! Spec Conformance + * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-dataview.prototype-@@tostringtag) + * ES6$24.2.4.21 - DataView.prototype[@@toStringTag] should be "DataView": + * Test: `Object.prototype.toString.call(new DataView(new ArrayBuffer(1)))`` + * - Edge <=13 === "[object Object]" + */ + if (dataViewExists && objPrototype === DataView.prototype) { + return 'DataView'; + } + + /* ! Spec Conformance + * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%mapiteratorprototype%-@@tostringtag) + * ES6$23.1.5.2.2 - %MapIteratorPrototype%[@@toStringTag] should be "Map Iterator": + * Test: `Object.prototype.toString.call(new Map().entries())`` + * - Edge <=13 === "[object Object]" + */ + if (mapExists && objPrototype === mapIteratorPrototype) { + return 'Map Iterator'; + } + + /* ! Spec Conformance + * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%setiteratorprototype%-@@tostringtag) + * ES6$23.2.5.2.2 - %SetIteratorPrototype%[@@toStringTag] should be "Set Iterator": + * Test: `Object.prototype.toString.call(new Set().entries())`` + * - Edge <=13 === "[object Object]" + */ + if (setExists && objPrototype === setIteratorPrototype) { + return 'Set Iterator'; + } + + /* ! Spec Conformance + * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%arrayiteratorprototype%-@@tostringtag) + * ES6$22.1.5.2.2 - %ArrayIteratorPrototype%[@@toStringTag] should be "Array Iterator": + * Test: `Object.prototype.toString.call([][Symbol.iterator]())`` + * - Edge <=13 === "[object Object]" + */ + if (arrayIteratorExists && objPrototype === arrayIteratorPrototype) { + return 'Array Iterator'; + } + + /* ! Spec Conformance + * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%stringiteratorprototype%-@@tostringtag) + * ES6$21.1.5.2.2 - %StringIteratorPrototype%[@@toStringTag] should be "String Iterator": + * Test: `Object.prototype.toString.call(''[Symbol.iterator]())`` + * - Edge <=13 === "[object Object]" + */ + if (stringIteratorExists && objPrototype === stringIteratorPrototype) { + return 'String Iterator'; + } + + /* ! Speed optimisation + * Pre: + * object from null x 2,424,320 ops/sec ±1.67% (76 runs sampled) + * Post: + * object from null x 5,838,000 ops/sec ±0.99% (84 runs sampled) + */ + if (objPrototype === null) { + return 'Object'; + } + + return Object + .prototype + .toString + .call(obj) + .slice(toStringLeftSliceLength, toStringRightSliceLength); +} + +return typeDetect; + +}))); + +},{}]},{},[1])(1) +}); diff --git a/node_modules/chai/index.js b/node_modules/chai/index.js new file mode 100644 index 00000000..634483b0 --- /dev/null +++ b/node_modules/chai/index.js @@ -0,0 +1 @@ +module.exports = require('./lib/chai'); diff --git a/node_modules/chai/karma.conf.js b/node_modules/chai/karma.conf.js new file mode 100644 index 00000000..3dadb55c --- /dev/null +++ b/node_modules/chai/karma.conf.js @@ -0,0 +1,28 @@ +module.exports = function(config) { + config.set({ + frameworks: [ 'mocha' ] + , files: [ + 'chai.js' + , 'test/bootstrap/index.js' + , 'test/*.js' + ] + , reporters: [ 'progress' ] + , colors: true + , logLevel: config.LOG_INFO + , autoWatch: false + , browsers: [ 'PhantomJS' ] + , browserDisconnectTimeout: 10000 + , browserDisconnectTolerance: 2 + , browserNoActivityTimeout: 20000 + , singleRun: true + }); + + switch (process.env.CHAI_TEST_ENV) { + case 'sauce': + require('./karma.sauce')(config); + break; + default: + // ... + break; + }; +}; diff --git a/node_modules/chai/karma.sauce.js b/node_modules/chai/karma.sauce.js new file mode 100644 index 00000000..3d65b3e7 --- /dev/null +++ b/node_modules/chai/karma.sauce.js @@ -0,0 +1,41 @@ +var version = require('./package.json').version; +var ts = new Date().getTime(); + +module.exports = function(config) { + var auth; + + try { + auth = require('./test/auth/index'); + } catch(ex) { + auth = {}; + auth.SAUCE_USERNAME = process.env.SAUCE_USERNAME || null; + auth.SAUCE_ACCESS_KEY = process.env.SAUCE_ACCESS_KEY || null; + } + + if (!auth.SAUCE_USERNAME || !auth.SAUCE_ACCESS_KEY) return; + if (process.env.SKIP_SAUCE) return; + + var branch = process.env.TRAVIS_BRANCH || 'local' + var browserConfig = require('./sauce.browsers'); + var browsers = Object.keys(browserConfig); + var tags = [ 'chaijs_' + version, auth.SAUCE_USERNAME + '@' + branch ]; + var tunnel = process.env.TRAVIS_JOB_NUMBER || ts; + + if (process.env.TRAVIS_JOB_NUMBER) { + tags.push('travis@' + process.env.TRAVIS_JOB_NUMBER); + } + + config.browsers = config.browsers.concat(browsers); + config.customLaunchers = browserConfig; + config.reporters.push('saucelabs'); + config.captureTimeout = 300000; + + config.sauceLabs = { + username: auth.SAUCE_USERNAME + , accessKey: auth.SAUCE_ACCESS_KEY + , startConnect: ('TRAVIS' in process.env) === false + , tags: tags + , testName: 'ChaiJS' + , tunnelIdentifier: tunnel + }; +}; diff --git a/node_modules/chai/lib/chai.js b/node_modules/chai/lib/chai.js new file mode 100644 index 00000000..efda439e --- /dev/null +++ b/node_modules/chai/lib/chai.js @@ -0,0 +1,92 @@ +/*! + * chai + * Copyright(c) 2011-2014 Jake Luer + * MIT Licensed + */ + +var used = []; + +/*! + * Chai version + */ + +exports.version = '4.2.0'; + +/*! + * Assertion Error + */ + +exports.AssertionError = require('assertion-error'); + +/*! + * Utils for plugins (not exported) + */ + +var util = require('./chai/utils'); + +/** + * # .use(function) + * + * Provides a way to extend the internals of Chai. + * + * @param {Function} + * @returns {this} for chaining + * @api public + */ + +exports.use = function (fn) { + if (!~used.indexOf(fn)) { + fn(exports, util); + used.push(fn); + } + + return exports; +}; + +/*! + * Utility Functions + */ + +exports.util = util; + +/*! + * Configuration + */ + +var config = require('./chai/config'); +exports.config = config; + +/*! + * Primary `Assertion` prototype + */ + +var assertion = require('./chai/assertion'); +exports.use(assertion); + +/*! + * Core Assertions + */ + +var core = require('./chai/core/assertions'); +exports.use(core); + +/*! + * Expect interface + */ + +var expect = require('./chai/interface/expect'); +exports.use(expect); + +/*! + * Should interface + */ + +var should = require('./chai/interface/should'); +exports.use(should); + +/*! + * Assert interface + */ + +var assert = require('./chai/interface/assert'); +exports.use(assert); diff --git a/node_modules/chai/lib/chai/assertion.js b/node_modules/chai/lib/chai/assertion.js new file mode 100644 index 00000000..4d4217fb --- /dev/null +++ b/node_modules/chai/lib/chai/assertion.js @@ -0,0 +1,165 @@ +/*! + * chai + * http://chaijs.com + * Copyright(c) 2011-2014 Jake Luer + * MIT Licensed + */ + +var config = require('./config'); + +module.exports = function (_chai, util) { + /*! + * Module dependencies. + */ + + var AssertionError = _chai.AssertionError + , flag = util.flag; + + /*! + * Module export. + */ + + _chai.Assertion = Assertion; + + /*! + * Assertion Constructor + * + * Creates object for chaining. + * + * `Assertion` objects contain metadata in the form of flags. Three flags can + * be assigned during instantiation by passing arguments to this constructor: + * + * - `object`: This flag contains the target of the assertion. For example, in + * the assertion `expect(numKittens).to.equal(7);`, the `object` flag will + * contain `numKittens` so that the `equal` assertion can reference it when + * needed. + * + * - `message`: This flag contains an optional custom error message to be + * prepended to the error message that's generated by the assertion when it + * fails. + * + * - `ssfi`: This flag stands for "start stack function indicator". It + * contains a function reference that serves as the starting point for + * removing frames from the stack trace of the error that's created by the + * assertion when it fails. The goal is to provide a cleaner stack trace to + * end users by removing Chai's internal functions. Note that it only works + * in environments that support `Error.captureStackTrace`, and only when + * `Chai.config.includeStack` hasn't been set to `false`. + * + * - `lockSsfi`: This flag controls whether or not the given `ssfi` flag + * should retain its current value, even as assertions are chained off of + * this object. This is usually set to `true` when creating a new assertion + * from within another assertion. It's also temporarily set to `true` before + * an overwritten assertion gets called by the overwriting assertion. + * + * @param {Mixed} obj target of the assertion + * @param {String} msg (optional) custom error message + * @param {Function} ssfi (optional) starting point for removing stack frames + * @param {Boolean} lockSsfi (optional) whether or not the ssfi flag is locked + * @api private + */ + + function Assertion (obj, msg, ssfi, lockSsfi) { + flag(this, 'ssfi', ssfi || Assertion); + flag(this, 'lockSsfi', lockSsfi); + flag(this, 'object', obj); + flag(this, 'message', msg); + + return util.proxify(this); + } + + Object.defineProperty(Assertion, 'includeStack', { + get: function() { + console.warn('Assertion.includeStack is deprecated, use chai.config.includeStack instead.'); + return config.includeStack; + }, + set: function(value) { + console.warn('Assertion.includeStack is deprecated, use chai.config.includeStack instead.'); + config.includeStack = value; + } + }); + + Object.defineProperty(Assertion, 'showDiff', { + get: function() { + console.warn('Assertion.showDiff is deprecated, use chai.config.showDiff instead.'); + return config.showDiff; + }, + set: function(value) { + console.warn('Assertion.showDiff is deprecated, use chai.config.showDiff instead.'); + config.showDiff = value; + } + }); + + Assertion.addProperty = function (name, fn) { + util.addProperty(this.prototype, name, fn); + }; + + Assertion.addMethod = function (name, fn) { + util.addMethod(this.prototype, name, fn); + }; + + Assertion.addChainableMethod = function (name, fn, chainingBehavior) { + util.addChainableMethod(this.prototype, name, fn, chainingBehavior); + }; + + Assertion.overwriteProperty = function (name, fn) { + util.overwriteProperty(this.prototype, name, fn); + }; + + Assertion.overwriteMethod = function (name, fn) { + util.overwriteMethod(this.prototype, name, fn); + }; + + Assertion.overwriteChainableMethod = function (name, fn, chainingBehavior) { + util.overwriteChainableMethod(this.prototype, name, fn, chainingBehavior); + }; + + /** + * ### .assert(expression, message, negateMessage, expected, actual, showDiff) + * + * Executes an expression and check expectations. Throws AssertionError for reporting if test doesn't pass. + * + * @name assert + * @param {Philosophical} expression to be tested + * @param {String|Function} message or function that returns message to display if expression fails + * @param {String|Function} negatedMessage or function that returns negatedMessage to display if negated expression fails + * @param {Mixed} expected value (remember to check for negation) + * @param {Mixed} actual (optional) will default to `this.obj` + * @param {Boolean} showDiff (optional) when set to `true`, assert will display a diff in addition to the message if expression fails + * @api private + */ + + Assertion.prototype.assert = function (expr, msg, negateMsg, expected, _actual, showDiff) { + var ok = util.test(this, arguments); + if (false !== showDiff) showDiff = true; + if (undefined === expected && undefined === _actual) showDiff = false; + if (true !== config.showDiff) showDiff = false; + + if (!ok) { + msg = util.getMessage(this, arguments); + var actual = util.getActual(this, arguments); + throw new AssertionError(msg, { + actual: actual + , expected: expected + , showDiff: showDiff + }, (config.includeStack) ? this.assert : flag(this, 'ssfi')); + } + }; + + /*! + * ### ._obj + * + * Quick reference to stored `actual` value for plugin developers. + * + * @api private + */ + + Object.defineProperty(Assertion.prototype, '_obj', + { get: function () { + return flag(this, 'object'); + } + , set: function (val) { + flag(this, 'object', val); + } + }); +}; diff --git a/node_modules/chai/lib/chai/config.js b/node_modules/chai/lib/chai/config.js new file mode 100644 index 00000000..412a0c80 --- /dev/null +++ b/node_modules/chai/lib/chai/config.js @@ -0,0 +1,94 @@ +module.exports = { + + /** + * ### config.includeStack + * + * User configurable property, influences whether stack trace + * is included in Assertion error message. Default of false + * suppresses stack trace in the error message. + * + * chai.config.includeStack = true; // enable stack on error + * + * @param {Boolean} + * @api public + */ + + includeStack: false, + + /** + * ### config.showDiff + * + * User configurable property, influences whether or not + * the `showDiff` flag should be included in the thrown + * AssertionErrors. `false` will always be `false`; `true` + * will be true when the assertion has requested a diff + * be shown. + * + * @param {Boolean} + * @api public + */ + + showDiff: true, + + /** + * ### config.truncateThreshold + * + * User configurable property, sets length threshold for actual and + * expected values in assertion errors. If this threshold is exceeded, for + * example for large data structures, the value is replaced with something + * like `[ Array(3) ]` or `{ Object (prop1, prop2) }`. + * + * Set it to zero if you want to disable truncating altogether. + * + * This is especially userful when doing assertions on arrays: having this + * set to a reasonable large value makes the failure messages readily + * inspectable. + * + * chai.config.truncateThreshold = 0; // disable truncating + * + * @param {Number} + * @api public + */ + + truncateThreshold: 40, + + /** + * ### config.useProxy + * + * User configurable property, defines if chai will use a Proxy to throw + * an error when a non-existent property is read, which protects users + * from typos when using property-based assertions. + * + * Set it to false if you want to disable this feature. + * + * chai.config.useProxy = false; // disable use of Proxy + * + * This feature is automatically disabled regardless of this config value + * in environments that don't support proxies. + * + * @param {Boolean} + * @api public + */ + + useProxy: true, + + /** + * ### config.proxyExcludedKeys + * + * User configurable property, defines which properties should be ignored + * instead of throwing an error if they do not exist on the assertion. + * This is only applied if the environment Chai is running in supports proxies and + * if the `useProxy` configuration setting is enabled. + * By default, `then` and `inspect` will not throw an error if they do not exist on the + * assertion object because the `.inspect` property is read by `util.inspect` (for example, when + * using `console.log` on the assertion object) and `.then` is necessary for promise type-checking. + * + * // By default these keys will not throw an error if they do not exist on the assertion object + * chai.config.proxyExcludedKeys = ['then', 'inspect']; + * + * @param {Array} + * @api public + */ + + proxyExcludedKeys: ['then', 'catch', 'inspect', 'toJSON'] +}; diff --git a/node_modules/chai/lib/chai/core/assertions.js b/node_modules/chai/lib/chai/core/assertions.js new file mode 100644 index 00000000..cabcf622 --- /dev/null +++ b/node_modules/chai/lib/chai/core/assertions.js @@ -0,0 +1,3804 @@ +/*! + * chai + * http://chaijs.com + * Copyright(c) 2011-2014 Jake Luer + * MIT Licensed + */ + +module.exports = function (chai, _) { + var Assertion = chai.Assertion + , AssertionError = chai.AssertionError + , flag = _.flag; + + /** + * ### Language Chains + * + * The following are provided as chainable getters to improve the readability + * of your assertions. + * + * **Chains** + * + * - to + * - be + * - been + * - is + * - that + * - which + * - and + * - has + * - have + * - with + * - at + * - of + * - same + * - but + * - does + * - still + * + * @name language chains + * @namespace BDD + * @api public + */ + + [ 'to', 'be', 'been', 'is' + , 'and', 'has', 'have', 'with' + , 'that', 'which', 'at', 'of' + , 'same', 'but', 'does', 'still' ].forEach(function (chain) { + Assertion.addProperty(chain); + }); + + /** + * ### .not + * + * Negates all assertions that follow in the chain. + * + * expect(function () {}).to.not.throw(); + * expect({a: 1}).to.not.have.property('b'); + * expect([1, 2]).to.be.an('array').that.does.not.include(3); + * + * Just because you can negate any assertion with `.not` doesn't mean you + * should. With great power comes great responsibility. It's often best to + * assert that the one expected output was produced, rather than asserting + * that one of countless unexpected outputs wasn't produced. See individual + * assertions for specific guidance. + * + * expect(2).to.equal(2); // Recommended + * expect(2).to.not.equal(1); // Not recommended + * + * @name not + * @namespace BDD + * @api public + */ + + Assertion.addProperty('not', function () { + flag(this, 'negate', true); + }); + + /** + * ### .deep + * + * Causes all `.equal`, `.include`, `.members`, `.keys`, and `.property` + * assertions that follow in the chain to use deep equality instead of strict + * (`===`) equality. See the `deep-eql` project page for info on the deep + * equality algorithm: https://github.com/chaijs/deep-eql. + * + * // Target object deeply (but not strictly) equals `{a: 1}` + * expect({a: 1}).to.deep.equal({a: 1}); + * expect({a: 1}).to.not.equal({a: 1}); + * + * // Target array deeply (but not strictly) includes `{a: 1}` + * expect([{a: 1}]).to.deep.include({a: 1}); + * expect([{a: 1}]).to.not.include({a: 1}); + * + * // Target object deeply (but not strictly) includes `x: {a: 1}` + * expect({x: {a: 1}}).to.deep.include({x: {a: 1}}); + * expect({x: {a: 1}}).to.not.include({x: {a: 1}}); + * + * // Target array deeply (but not strictly) has member `{a: 1}` + * expect([{a: 1}]).to.have.deep.members([{a: 1}]); + * expect([{a: 1}]).to.not.have.members([{a: 1}]); + * + * // Target set deeply (but not strictly) has key `{a: 1}` + * expect(new Set([{a: 1}])).to.have.deep.keys([{a: 1}]); + * expect(new Set([{a: 1}])).to.not.have.keys([{a: 1}]); + * + * // Target object deeply (but not strictly) has property `x: {a: 1}` + * expect({x: {a: 1}}).to.have.deep.property('x', {a: 1}); + * expect({x: {a: 1}}).to.not.have.property('x', {a: 1}); + * + * @name deep + * @namespace BDD + * @api public + */ + + Assertion.addProperty('deep', function () { + flag(this, 'deep', true); + }); + + /** + * ### .nested + * + * Enables dot- and bracket-notation in all `.property` and `.include` + * assertions that follow in the chain. + * + * expect({a: {b: ['x', 'y']}}).to.have.nested.property('a.b[1]'); + * expect({a: {b: ['x', 'y']}}).to.nested.include({'a.b[1]': 'y'}); + * + * If `.` or `[]` are part of an actual property name, they can be escaped by + * adding two backslashes before them. + * + * expect({'.a': {'[b]': 'x'}}).to.have.nested.property('\\.a.\\[b\\]'); + * expect({'.a': {'[b]': 'x'}}).to.nested.include({'\\.a.\\[b\\]': 'x'}); + * + * `.nested` cannot be combined with `.own`. + * + * @name nested + * @namespace BDD + * @api public + */ + + Assertion.addProperty('nested', function () { + flag(this, 'nested', true); + }); + + /** + * ### .own + * + * Causes all `.property` and `.include` assertions that follow in the chain + * to ignore inherited properties. + * + * Object.prototype.b = 2; + * + * expect({a: 1}).to.have.own.property('a'); + * expect({a: 1}).to.have.property('b'); + * expect({a: 1}).to.not.have.own.property('b'); + * + * expect({a: 1}).to.own.include({a: 1}); + * expect({a: 1}).to.include({b: 2}).but.not.own.include({b: 2}); + * + * `.own` cannot be combined with `.nested`. + * + * @name own + * @namespace BDD + * @api public + */ + + Assertion.addProperty('own', function () { + flag(this, 'own', true); + }); + + /** + * ### .ordered + * + * Causes all `.members` assertions that follow in the chain to require that + * members be in the same order. + * + * expect([1, 2]).to.have.ordered.members([1, 2]) + * .but.not.have.ordered.members([2, 1]); + * + * When `.include` and `.ordered` are combined, the ordering begins at the + * start of both arrays. + * + * expect([1, 2, 3]).to.include.ordered.members([1, 2]) + * .but.not.include.ordered.members([2, 3]); + * + * @name ordered + * @namespace BDD + * @api public + */ + + Assertion.addProperty('ordered', function () { + flag(this, 'ordered', true); + }); + + /** + * ### .any + * + * Causes all `.keys` assertions that follow in the chain to only require that + * the target have at least one of the given keys. This is the opposite of + * `.all`, which requires that the target have all of the given keys. + * + * expect({a: 1, b: 2}).to.not.have.any.keys('c', 'd'); + * + * See the `.keys` doc for guidance on when to use `.any` or `.all`. + * + * @name any + * @namespace BDD + * @api public + */ + + Assertion.addProperty('any', function () { + flag(this, 'any', true); + flag(this, 'all', false); + }); + + /** + * ### .all + * + * Causes all `.keys` assertions that follow in the chain to require that the + * target have all of the given keys. This is the opposite of `.any`, which + * only requires that the target have at least one of the given keys. + * + * expect({a: 1, b: 2}).to.have.all.keys('a', 'b'); + * + * Note that `.all` is used by default when neither `.all` nor `.any` are + * added earlier in the chain. However, it's often best to add `.all` anyway + * because it improves readability. + * + * See the `.keys` doc for guidance on when to use `.any` or `.all`. + * + * @name all + * @namespace BDD + * @api public + */ + + Assertion.addProperty('all', function () { + flag(this, 'all', true); + flag(this, 'any', false); + }); + + /** + * ### .a(type[, msg]) + * + * Asserts that the target's type is equal to the given string `type`. Types + * are case insensitive. See the `type-detect` project page for info on the + * type detection algorithm: https://github.com/chaijs/type-detect. + * + * expect('foo').to.be.a('string'); + * expect({a: 1}).to.be.an('object'); + * expect(null).to.be.a('null'); + * expect(undefined).to.be.an('undefined'); + * expect(new Error).to.be.an('error'); + * expect(Promise.resolve()).to.be.a('promise'); + * expect(new Float32Array).to.be.a('float32array'); + * expect(Symbol()).to.be.a('symbol'); + * + * `.a` supports objects that have a custom type set via `Symbol.toStringTag`. + * + * var myObj = { + * [Symbol.toStringTag]: 'myCustomType' + * }; + * + * expect(myObj).to.be.a('myCustomType').but.not.an('object'); + * + * It's often best to use `.a` to check a target's type before making more + * assertions on the same target. That way, you avoid unexpected behavior from + * any assertion that does different things based on the target's type. + * + * expect([1, 2, 3]).to.be.an('array').that.includes(2); + * expect([]).to.be.an('array').that.is.empty; + * + * Add `.not` earlier in the chain to negate `.a`. However, it's often best to + * assert that the target is the expected type, rather than asserting that it + * isn't one of many unexpected types. + * + * expect('foo').to.be.a('string'); // Recommended + * expect('foo').to.not.be.an('array'); // Not recommended + * + * `.a` accepts an optional `msg` argument which is a custom error message to + * show when the assertion fails. The message can also be given as the second + * argument to `expect`. + * + * expect(1).to.be.a('string', 'nooo why fail??'); + * expect(1, 'nooo why fail??').to.be.a('string'); + * + * `.a` can also be used as a language chain to improve the readability of + * your assertions. + * + * expect({b: 2}).to.have.a.property('b'); + * + * The alias `.an` can be used interchangeably with `.a`. + * + * @name a + * @alias an + * @param {String} type + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function an (type, msg) { + if (msg) flag(this, 'message', msg); + type = type.toLowerCase(); + var obj = flag(this, 'object') + , article = ~[ 'a', 'e', 'i', 'o', 'u' ].indexOf(type.charAt(0)) ? 'an ' : 'a '; + + this.assert( + type === _.type(obj).toLowerCase() + , 'expected #{this} to be ' + article + type + , 'expected #{this} not to be ' + article + type + ); + } + + Assertion.addChainableMethod('an', an); + Assertion.addChainableMethod('a', an); + + /** + * ### .include(val[, msg]) + * + * When the target is a string, `.include` asserts that the given string `val` + * is a substring of the target. + * + * expect('foobar').to.include('foo'); + * + * When the target is an array, `.include` asserts that the given `val` is a + * member of the target. + * + * expect([1, 2, 3]).to.include(2); + * + * When the target is an object, `.include` asserts that the given object + * `val`'s properties are a subset of the target's properties. + * + * expect({a: 1, b: 2, c: 3}).to.include({a: 1, b: 2}); + * + * When the target is a Set or WeakSet, `.include` asserts that the given `val` is a + * member of the target. SameValueZero equality algorithm is used. + * + * expect(new Set([1, 2])).to.include(2); + * + * When the target is a Map, `.include` asserts that the given `val` is one of + * the values of the target. SameValueZero equality algorithm is used. + * + * expect(new Map([['a', 1], ['b', 2]])).to.include(2); + * + * Because `.include` does different things based on the target's type, it's + * important to check the target's type before using `.include`. See the `.a` + * doc for info on testing a target's type. + * + * expect([1, 2, 3]).to.be.an('array').that.includes(2); + * + * By default, strict (`===`) equality is used to compare array members and + * object properties. Add `.deep` earlier in the chain to use deep equality + * instead (WeakSet targets are not supported). See the `deep-eql` project + * page for info on the deep equality algorithm: https://github.com/chaijs/deep-eql. + * + * // Target array deeply (but not strictly) includes `{a: 1}` + * expect([{a: 1}]).to.deep.include({a: 1}); + * expect([{a: 1}]).to.not.include({a: 1}); + * + * // Target object deeply (but not strictly) includes `x: {a: 1}` + * expect({x: {a: 1}}).to.deep.include({x: {a: 1}}); + * expect({x: {a: 1}}).to.not.include({x: {a: 1}}); + * + * By default, all of the target's properties are searched when working with + * objects. This includes properties that are inherited and/or non-enumerable. + * Add `.own` earlier in the chain to exclude the target's inherited + * properties from the search. + * + * Object.prototype.b = 2; + * + * expect({a: 1}).to.own.include({a: 1}); + * expect({a: 1}).to.include({b: 2}).but.not.own.include({b: 2}); + * + * Note that a target object is always only searched for `val`'s own + * enumerable properties. + * + * `.deep` and `.own` can be combined. + * + * expect({a: {b: 2}}).to.deep.own.include({a: {b: 2}}); + * + * Add `.nested` earlier in the chain to enable dot- and bracket-notation when + * referencing nested properties. + * + * expect({a: {b: ['x', 'y']}}).to.nested.include({'a.b[1]': 'y'}); + * + * If `.` or `[]` are part of an actual property name, they can be escaped by + * adding two backslashes before them. + * + * expect({'.a': {'[b]': 2}}).to.nested.include({'\\.a.\\[b\\]': 2}); + * + * `.deep` and `.nested` can be combined. + * + * expect({a: {b: [{c: 3}]}}).to.deep.nested.include({'a.b[0]': {c: 3}}); + * + * `.own` and `.nested` cannot be combined. + * + * Add `.not` earlier in the chain to negate `.include`. + * + * expect('foobar').to.not.include('taco'); + * expect([1, 2, 3]).to.not.include(4); + * + * However, it's dangerous to negate `.include` when the target is an object. + * The problem is that it creates uncertain expectations by asserting that the + * target object doesn't have all of `val`'s key/value pairs but may or may + * not have some of them. It's often best to identify the exact output that's + * expected, and then write an assertion that only accepts that exact output. + * + * When the target object isn't even expected to have `val`'s keys, it's + * often best to assert exactly that. + * + * expect({c: 3}).to.not.have.any.keys('a', 'b'); // Recommended + * expect({c: 3}).to.not.include({a: 1, b: 2}); // Not recommended + * + * When the target object is expected to have `val`'s keys, it's often best to + * assert that each of the properties has its expected value, rather than + * asserting that each property doesn't have one of many unexpected values. + * + * expect({a: 3, b: 4}).to.include({a: 3, b: 4}); // Recommended + * expect({a: 3, b: 4}).to.not.include({a: 1, b: 2}); // Not recommended + * + * `.include` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. + * + * expect([1, 2, 3]).to.include(4, 'nooo why fail??'); + * expect([1, 2, 3], 'nooo why fail??').to.include(4); + * + * `.include` can also be used as a language chain, causing all `.members` and + * `.keys` assertions that follow in the chain to require the target to be a + * superset of the expected set, rather than an identical set. Note that + * `.members` ignores duplicates in the subset when `.include` is added. + * + * // Target object's keys are a superset of ['a', 'b'] but not identical + * expect({a: 1, b: 2, c: 3}).to.include.all.keys('a', 'b'); + * expect({a: 1, b: 2, c: 3}).to.not.have.all.keys('a', 'b'); + * + * // Target array is a superset of [1, 2] but not identical + * expect([1, 2, 3]).to.include.members([1, 2]); + * expect([1, 2, 3]).to.not.have.members([1, 2]); + * + * // Duplicates in the subset are ignored + * expect([1, 2, 3]).to.include.members([1, 2, 2, 2]); + * + * Note that adding `.any` earlier in the chain causes the `.keys` assertion + * to ignore `.include`. + * + * // Both assertions are identical + * expect({a: 1}).to.include.any.keys('a', 'b'); + * expect({a: 1}).to.have.any.keys('a', 'b'); + * + * The aliases `.includes`, `.contain`, and `.contains` can be used + * interchangeably with `.include`. + * + * @name include + * @alias contain + * @alias includes + * @alias contains + * @param {Mixed} val + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function SameValueZero(a, b) { + return (_.isNaN(a) && _.isNaN(b)) || a === b; + } + + function includeChainingBehavior () { + flag(this, 'contains', true); + } + + function include (val, msg) { + if (msg) flag(this, 'message', msg); + + var obj = flag(this, 'object') + , objType = _.type(obj).toLowerCase() + , flagMsg = flag(this, 'message') + , negate = flag(this, 'negate') + , ssfi = flag(this, 'ssfi') + , isDeep = flag(this, 'deep') + , descriptor = isDeep ? 'deep ' : ''; + + flagMsg = flagMsg ? flagMsg + ': ' : ''; + + var included = false; + + switch (objType) { + case 'string': + included = obj.indexOf(val) !== -1; + break; + + case 'weakset': + if (isDeep) { + throw new AssertionError( + flagMsg + 'unable to use .deep.include with WeakSet', + undefined, + ssfi + ); + } + + included = obj.has(val); + break; + + case 'map': + var isEql = isDeep ? _.eql : SameValueZero; + obj.forEach(function (item) { + included = included || isEql(item, val); + }); + break; + + case 'set': + if (isDeep) { + obj.forEach(function (item) { + included = included || _.eql(item, val); + }); + } else { + included = obj.has(val); + } + break; + + case 'array': + if (isDeep) { + included = obj.some(function (item) { + return _.eql(item, val); + }) + } else { + included = obj.indexOf(val) !== -1; + } + break; + + default: + // This block is for asserting a subset of properties in an object. + // `_.expectTypes` isn't used here because `.include` should work with + // objects with a custom `@@toStringTag`. + if (val !== Object(val)) { + throw new AssertionError( + flagMsg + 'object tested must be an array, a map, an object,' + + ' a set, a string, or a weakset, but ' + objType + ' given', + undefined, + ssfi + ); + } + + var props = Object.keys(val) + , firstErr = null + , numErrs = 0; + + props.forEach(function (prop) { + var propAssertion = new Assertion(obj); + _.transferFlags(this, propAssertion, true); + flag(propAssertion, 'lockSsfi', true); + + if (!negate || props.length === 1) { + propAssertion.property(prop, val[prop]); + return; + } + + try { + propAssertion.property(prop, val[prop]); + } catch (err) { + if (!_.checkError.compatibleConstructor(err, AssertionError)) { + throw err; + } + if (firstErr === null) firstErr = err; + numErrs++; + } + }, this); + + // When validating .not.include with multiple properties, we only want + // to throw an assertion error if all of the properties are included, + // in which case we throw the first property assertion error that we + // encountered. + if (negate && props.length > 1 && numErrs === props.length) { + throw firstErr; + } + return; + } + + // Assert inclusion in collection or substring in a string. + this.assert( + included + , 'expected #{this} to ' + descriptor + 'include ' + _.inspect(val) + , 'expected #{this} to not ' + descriptor + 'include ' + _.inspect(val)); + } + + Assertion.addChainableMethod('include', include, includeChainingBehavior); + Assertion.addChainableMethod('contain', include, includeChainingBehavior); + Assertion.addChainableMethod('contains', include, includeChainingBehavior); + Assertion.addChainableMethod('includes', include, includeChainingBehavior); + + /** + * ### .ok + * + * Asserts that the target is a truthy value (considered `true` in boolean context). + * However, it's often best to assert that the target is strictly (`===`) or + * deeply equal to its expected value. + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.be.ok; // Not recommended + * + * expect(true).to.be.true; // Recommended + * expect(true).to.be.ok; // Not recommended + * + * Add `.not` earlier in the chain to negate `.ok`. + * + * expect(0).to.equal(0); // Recommended + * expect(0).to.not.be.ok; // Not recommended + * + * expect(false).to.be.false; // Recommended + * expect(false).to.not.be.ok; // Not recommended + * + * expect(null).to.be.null; // Recommended + * expect(null).to.not.be.ok; // Not recommended + * + * expect(undefined).to.be.undefined; // Recommended + * expect(undefined).to.not.be.ok; // Not recommended + * + * A custom error message can be given as the second argument to `expect`. + * + * expect(false, 'nooo why fail??').to.be.ok; + * + * @name ok + * @namespace BDD + * @api public + */ + + Assertion.addProperty('ok', function () { + this.assert( + flag(this, 'object') + , 'expected #{this} to be truthy' + , 'expected #{this} to be falsy'); + }); + + /** + * ### .true + * + * Asserts that the target is strictly (`===`) equal to `true`. + * + * expect(true).to.be.true; + * + * Add `.not` earlier in the chain to negate `.true`. However, it's often best + * to assert that the target is equal to its expected value, rather than not + * equal to `true`. + * + * expect(false).to.be.false; // Recommended + * expect(false).to.not.be.true; // Not recommended + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.not.be.true; // Not recommended + * + * A custom error message can be given as the second argument to `expect`. + * + * expect(false, 'nooo why fail??').to.be.true; + * + * @name true + * @namespace BDD + * @api public + */ + + Assertion.addProperty('true', function () { + this.assert( + true === flag(this, 'object') + , 'expected #{this} to be true' + , 'expected #{this} to be false' + , flag(this, 'negate') ? false : true + ); + }); + + /** + * ### .false + * + * Asserts that the target is strictly (`===`) equal to `false`. + * + * expect(false).to.be.false; + * + * Add `.not` earlier in the chain to negate `.false`. However, it's often + * best to assert that the target is equal to its expected value, rather than + * not equal to `false`. + * + * expect(true).to.be.true; // Recommended + * expect(true).to.not.be.false; // Not recommended + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.not.be.false; // Not recommended + * + * A custom error message can be given as the second argument to `expect`. + * + * expect(true, 'nooo why fail??').to.be.false; + * + * @name false + * @namespace BDD + * @api public + */ + + Assertion.addProperty('false', function () { + this.assert( + false === flag(this, 'object') + , 'expected #{this} to be false' + , 'expected #{this} to be true' + , flag(this, 'negate') ? true : false + ); + }); + + /** + * ### .null + * + * Asserts that the target is strictly (`===`) equal to `null`. + * + * expect(null).to.be.null; + * + * Add `.not` earlier in the chain to negate `.null`. However, it's often best + * to assert that the target is equal to its expected value, rather than not + * equal to `null`. + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.not.be.null; // Not recommended + * + * A custom error message can be given as the second argument to `expect`. + * + * expect(42, 'nooo why fail??').to.be.null; + * + * @name null + * @namespace BDD + * @api public + */ + + Assertion.addProperty('null', function () { + this.assert( + null === flag(this, 'object') + , 'expected #{this} to be null' + , 'expected #{this} not to be null' + ); + }); + + /** + * ### .undefined + * + * Asserts that the target is strictly (`===`) equal to `undefined`. + * + * expect(undefined).to.be.undefined; + * + * Add `.not` earlier in the chain to negate `.undefined`. However, it's often + * best to assert that the target is equal to its expected value, rather than + * not equal to `undefined`. + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.not.be.undefined; // Not recommended + * + * A custom error message can be given as the second argument to `expect`. + * + * expect(42, 'nooo why fail??').to.be.undefined; + * + * @name undefined + * @namespace BDD + * @api public + */ + + Assertion.addProperty('undefined', function () { + this.assert( + undefined === flag(this, 'object') + , 'expected #{this} to be undefined' + , 'expected #{this} not to be undefined' + ); + }); + + /** + * ### .NaN + * + * Asserts that the target is exactly `NaN`. + * + * expect(NaN).to.be.NaN; + * + * Add `.not` earlier in the chain to negate `.NaN`. However, it's often best + * to assert that the target is equal to its expected value, rather than not + * equal to `NaN`. + * + * expect('foo').to.equal('foo'); // Recommended + * expect('foo').to.not.be.NaN; // Not recommended + * + * A custom error message can be given as the second argument to `expect`. + * + * expect(42, 'nooo why fail??').to.be.NaN; + * + * @name NaN + * @namespace BDD + * @api public + */ + + Assertion.addProperty('NaN', function () { + this.assert( + _.isNaN(flag(this, 'object')) + , 'expected #{this} to be NaN' + , 'expected #{this} not to be NaN' + ); + }); + + /** + * ### .exist + * + * Asserts that the target is not strictly (`===`) equal to either `null` or + * `undefined`. However, it's often best to assert that the target is equal to + * its expected value. + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.exist; // Not recommended + * + * expect(0).to.equal(0); // Recommended + * expect(0).to.exist; // Not recommended + * + * Add `.not` earlier in the chain to negate `.exist`. + * + * expect(null).to.be.null; // Recommended + * expect(null).to.not.exist; // Not recommended + * + * expect(undefined).to.be.undefined; // Recommended + * expect(undefined).to.not.exist; // Not recommended + * + * A custom error message can be given as the second argument to `expect`. + * + * expect(null, 'nooo why fail??').to.exist; + * + * @name exist + * @namespace BDD + * @api public + */ + + Assertion.addProperty('exist', function () { + var val = flag(this, 'object'); + this.assert( + val !== null && val !== undefined + , 'expected #{this} to exist' + , 'expected #{this} to not exist' + ); + }); + + /** + * ### .empty + * + * When the target is a string or array, `.empty` asserts that the target's + * `length` property is strictly (`===`) equal to `0`. + * + * expect([]).to.be.empty; + * expect('').to.be.empty; + * + * When the target is a map or set, `.empty` asserts that the target's `size` + * property is strictly equal to `0`. + * + * expect(new Set()).to.be.empty; + * expect(new Map()).to.be.empty; + * + * When the target is a non-function object, `.empty` asserts that the target + * doesn't have any own enumerable properties. Properties with Symbol-based + * keys are excluded from the count. + * + * expect({}).to.be.empty; + * + * Because `.empty` does different things based on the target's type, it's + * important to check the target's type before using `.empty`. See the `.a` + * doc for info on testing a target's type. + * + * expect([]).to.be.an('array').that.is.empty; + * + * Add `.not` earlier in the chain to negate `.empty`. However, it's often + * best to assert that the target contains its expected number of values, + * rather than asserting that it's not empty. + * + * expect([1, 2, 3]).to.have.lengthOf(3); // Recommended + * expect([1, 2, 3]).to.not.be.empty; // Not recommended + * + * expect(new Set([1, 2, 3])).to.have.property('size', 3); // Recommended + * expect(new Set([1, 2, 3])).to.not.be.empty; // Not recommended + * + * expect(Object.keys({a: 1})).to.have.lengthOf(1); // Recommended + * expect({a: 1}).to.not.be.empty; // Not recommended + * + * A custom error message can be given as the second argument to `expect`. + * + * expect([1, 2, 3], 'nooo why fail??').to.be.empty; + * + * @name empty + * @namespace BDD + * @api public + */ + + Assertion.addProperty('empty', function () { + var val = flag(this, 'object') + , ssfi = flag(this, 'ssfi') + , flagMsg = flag(this, 'message') + , itemsCount; + + flagMsg = flagMsg ? flagMsg + ': ' : ''; + + switch (_.type(val).toLowerCase()) { + case 'array': + case 'string': + itemsCount = val.length; + break; + case 'map': + case 'set': + itemsCount = val.size; + break; + case 'weakmap': + case 'weakset': + throw new AssertionError( + flagMsg + '.empty was passed a weak collection', + undefined, + ssfi + ); + case 'function': + var msg = flagMsg + '.empty was passed a function ' + _.getName(val); + throw new AssertionError(msg.trim(), undefined, ssfi); + default: + if (val !== Object(val)) { + throw new AssertionError( + flagMsg + '.empty was passed non-string primitive ' + _.inspect(val), + undefined, + ssfi + ); + } + itemsCount = Object.keys(val).length; + } + + this.assert( + 0 === itemsCount + , 'expected #{this} to be empty' + , 'expected #{this} not to be empty' + ); + }); + + /** + * ### .arguments + * + * Asserts that the target is an `arguments` object. + * + * function test () { + * expect(arguments).to.be.arguments; + * } + * + * test(); + * + * Add `.not` earlier in the chain to negate `.arguments`. However, it's often + * best to assert which type the target is expected to be, rather than + * asserting that its not an `arguments` object. + * + * expect('foo').to.be.a('string'); // Recommended + * expect('foo').to.not.be.arguments; // Not recommended + * + * A custom error message can be given as the second argument to `expect`. + * + * expect({}, 'nooo why fail??').to.be.arguments; + * + * The alias `.Arguments` can be used interchangeably with `.arguments`. + * + * @name arguments + * @alias Arguments + * @namespace BDD + * @api public + */ + + function checkArguments () { + var obj = flag(this, 'object') + , type = _.type(obj); + this.assert( + 'Arguments' === type + , 'expected #{this} to be arguments but got ' + type + , 'expected #{this} to not be arguments' + ); + } + + Assertion.addProperty('arguments', checkArguments); + Assertion.addProperty('Arguments', checkArguments); + + /** + * ### .equal(val[, msg]) + * + * Asserts that the target is strictly (`===`) equal to the given `val`. + * + * expect(1).to.equal(1); + * expect('foo').to.equal('foo'); + * + * Add `.deep` earlier in the chain to use deep equality instead. See the + * `deep-eql` project page for info on the deep equality algorithm: + * https://github.com/chaijs/deep-eql. + * + * // Target object deeply (but not strictly) equals `{a: 1}` + * expect({a: 1}).to.deep.equal({a: 1}); + * expect({a: 1}).to.not.equal({a: 1}); + * + * // Target array deeply (but not strictly) equals `[1, 2]` + * expect([1, 2]).to.deep.equal([1, 2]); + * expect([1, 2]).to.not.equal([1, 2]); + * + * Add `.not` earlier in the chain to negate `.equal`. However, it's often + * best to assert that the target is equal to its expected value, rather than + * not equal to one of countless unexpected values. + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.not.equal(2); // Not recommended + * + * `.equal` accepts an optional `msg` argument which is a custom error message + * to show when the assertion fails. The message can also be given as the + * second argument to `expect`. + * + * expect(1).to.equal(2, 'nooo why fail??'); + * expect(1, 'nooo why fail??').to.equal(2); + * + * The aliases `.equals` and `eq` can be used interchangeably with `.equal`. + * + * @name equal + * @alias equals + * @alias eq + * @param {Mixed} val + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertEqual (val, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object'); + if (flag(this, 'deep')) { + var prevLockSsfi = flag(this, 'lockSsfi'); + flag(this, 'lockSsfi', true); + this.eql(val); + flag(this, 'lockSsfi', prevLockSsfi); + } else { + this.assert( + val === obj + , 'expected #{this} to equal #{exp}' + , 'expected #{this} to not equal #{exp}' + , val + , this._obj + , true + ); + } + } + + Assertion.addMethod('equal', assertEqual); + Assertion.addMethod('equals', assertEqual); + Assertion.addMethod('eq', assertEqual); + + /** + * ### .eql(obj[, msg]) + * + * Asserts that the target is deeply equal to the given `obj`. See the + * `deep-eql` project page for info on the deep equality algorithm: + * https://github.com/chaijs/deep-eql. + * + * // Target object is deeply (but not strictly) equal to {a: 1} + * expect({a: 1}).to.eql({a: 1}).but.not.equal({a: 1}); + * + * // Target array is deeply (but not strictly) equal to [1, 2] + * expect([1, 2]).to.eql([1, 2]).but.not.equal([1, 2]); + * + * Add `.not` earlier in the chain to negate `.eql`. However, it's often best + * to assert that the target is deeply equal to its expected value, rather + * than not deeply equal to one of countless unexpected values. + * + * expect({a: 1}).to.eql({a: 1}); // Recommended + * expect({a: 1}).to.not.eql({b: 2}); // Not recommended + * + * `.eql` accepts an optional `msg` argument which is a custom error message + * to show when the assertion fails. The message can also be given as the + * second argument to `expect`. + * + * expect({a: 1}).to.eql({b: 2}, 'nooo why fail??'); + * expect({a: 1}, 'nooo why fail??').to.eql({b: 2}); + * + * The alias `.eqls` can be used interchangeably with `.eql`. + * + * The `.deep.equal` assertion is almost identical to `.eql` but with one + * difference: `.deep.equal` causes deep equality comparisons to also be used + * for any other assertions that follow in the chain. + * + * @name eql + * @alias eqls + * @param {Mixed} obj + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertEql(obj, msg) { + if (msg) flag(this, 'message', msg); + this.assert( + _.eql(obj, flag(this, 'object')) + , 'expected #{this} to deeply equal #{exp}' + , 'expected #{this} to not deeply equal #{exp}' + , obj + , this._obj + , true + ); + } + + Assertion.addMethod('eql', assertEql); + Assertion.addMethod('eqls', assertEql); + + /** + * ### .above(n[, msg]) + * + * Asserts that the target is a number or a date greater than the given number or date `n` respectively. + * However, it's often best to assert that the target is equal to its expected + * value. + * + * expect(2).to.equal(2); // Recommended + * expect(2).to.be.above(1); // Not recommended + * + * Add `.lengthOf` earlier in the chain to assert that the target's `length` + * or `size` is greater than the given number `n`. + * + * expect('foo').to.have.lengthOf(3); // Recommended + * expect('foo').to.have.lengthOf.above(2); // Not recommended + * + * expect([1, 2, 3]).to.have.lengthOf(3); // Recommended + * expect([1, 2, 3]).to.have.lengthOf.above(2); // Not recommended + * + * Add `.not` earlier in the chain to negate `.above`. + * + * expect(2).to.equal(2); // Recommended + * expect(1).to.not.be.above(2); // Not recommended + * + * `.above` accepts an optional `msg` argument which is a custom error message + * to show when the assertion fails. The message can also be given as the + * second argument to `expect`. + * + * expect(1).to.be.above(2, 'nooo why fail??'); + * expect(1, 'nooo why fail??').to.be.above(2); + * + * The aliases `.gt` and `.greaterThan` can be used interchangeably with + * `.above`. + * + * @name above + * @alias gt + * @alias greaterThan + * @param {Number} n + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertAbove (n, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , doLength = flag(this, 'doLength') + , flagMsg = flag(this, 'message') + , msgPrefix = ((flagMsg) ? flagMsg + ': ' : '') + , ssfi = flag(this, 'ssfi') + , objType = _.type(obj).toLowerCase() + , nType = _.type(n).toLowerCase() + , errorMessage + , shouldThrow = true; + + if (doLength && objType !== 'map' && objType !== 'set') { + new Assertion(obj, flagMsg, ssfi, true).to.have.property('length'); + } + + if (!doLength && (objType === 'date' && nType !== 'date')) { + errorMessage = msgPrefix + 'the argument to above must be a date'; + } else if (nType !== 'number' && (doLength || objType === 'number')) { + errorMessage = msgPrefix + 'the argument to above must be a number'; + } else if (!doLength && (objType !== 'date' && objType !== 'number')) { + var printObj = (objType === 'string') ? "'" + obj + "'" : obj; + errorMessage = msgPrefix + 'expected ' + printObj + ' to be a number or a date'; + } else { + shouldThrow = false; + } + + if (shouldThrow) { + throw new AssertionError(errorMessage, undefined, ssfi); + } + + if (doLength) { + var descriptor = 'length' + , itemsCount; + if (objType === 'map' || objType === 'set') { + descriptor = 'size'; + itemsCount = obj.size; + } else { + itemsCount = obj.length; + } + this.assert( + itemsCount > n + , 'expected #{this} to have a ' + descriptor + ' above #{exp} but got #{act}' + , 'expected #{this} to not have a ' + descriptor + ' above #{exp}' + , n + , itemsCount + ); + } else { + this.assert( + obj > n + , 'expected #{this} to be above #{exp}' + , 'expected #{this} to be at most #{exp}' + , n + ); + } + } + + Assertion.addMethod('above', assertAbove); + Assertion.addMethod('gt', assertAbove); + Assertion.addMethod('greaterThan', assertAbove); + + /** + * ### .least(n[, msg]) + * + * Asserts that the target is a number or a date greater than or equal to the given + * number or date `n` respectively. However, it's often best to assert that the target is equal to + * its expected value. + * + * expect(2).to.equal(2); // Recommended + * expect(2).to.be.at.least(1); // Not recommended + * expect(2).to.be.at.least(2); // Not recommended + * + * Add `.lengthOf` earlier in the chain to assert that the target's `length` + * or `size` is greater than or equal to the given number `n`. + * + * expect('foo').to.have.lengthOf(3); // Recommended + * expect('foo').to.have.lengthOf.at.least(2); // Not recommended + * + * expect([1, 2, 3]).to.have.lengthOf(3); // Recommended + * expect([1, 2, 3]).to.have.lengthOf.at.least(2); // Not recommended + * + * Add `.not` earlier in the chain to negate `.least`. + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.not.be.at.least(2); // Not recommended + * + * `.least` accepts an optional `msg` argument which is a custom error message + * to show when the assertion fails. The message can also be given as the + * second argument to `expect`. + * + * expect(1).to.be.at.least(2, 'nooo why fail??'); + * expect(1, 'nooo why fail??').to.be.at.least(2); + * + * The alias `.gte` can be used interchangeably with `.least`. + * + * @name least + * @alias gte + * @param {Number} n + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertLeast (n, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , doLength = flag(this, 'doLength') + , flagMsg = flag(this, 'message') + , msgPrefix = ((flagMsg) ? flagMsg + ': ' : '') + , ssfi = flag(this, 'ssfi') + , objType = _.type(obj).toLowerCase() + , nType = _.type(n).toLowerCase() + , errorMessage + , shouldThrow = true; + + if (doLength && objType !== 'map' && objType !== 'set') { + new Assertion(obj, flagMsg, ssfi, true).to.have.property('length'); + } + + if (!doLength && (objType === 'date' && nType !== 'date')) { + errorMessage = msgPrefix + 'the argument to least must be a date'; + } else if (nType !== 'number' && (doLength || objType === 'number')) { + errorMessage = msgPrefix + 'the argument to least must be a number'; + } else if (!doLength && (objType !== 'date' && objType !== 'number')) { + var printObj = (objType === 'string') ? "'" + obj + "'" : obj; + errorMessage = msgPrefix + 'expected ' + printObj + ' to be a number or a date'; + } else { + shouldThrow = false; + } + + if (shouldThrow) { + throw new AssertionError(errorMessage, undefined, ssfi); + } + + if (doLength) { + var descriptor = 'length' + , itemsCount; + if (objType === 'map' || objType === 'set') { + descriptor = 'size'; + itemsCount = obj.size; + } else { + itemsCount = obj.length; + } + this.assert( + itemsCount >= n + , 'expected #{this} to have a ' + descriptor + ' at least #{exp} but got #{act}' + , 'expected #{this} to have a ' + descriptor + ' below #{exp}' + , n + , itemsCount + ); + } else { + this.assert( + obj >= n + , 'expected #{this} to be at least #{exp}' + , 'expected #{this} to be below #{exp}' + , n + ); + } + } + + Assertion.addMethod('least', assertLeast); + Assertion.addMethod('gte', assertLeast); + + /** + * ### .below(n[, msg]) + * + * Asserts that the target is a number or a date less than the given number or date `n` respectively. + * However, it's often best to assert that the target is equal to its expected + * value. + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.be.below(2); // Not recommended + * + * Add `.lengthOf` earlier in the chain to assert that the target's `length` + * or `size` is less than the given number `n`. + * + * expect('foo').to.have.lengthOf(3); // Recommended + * expect('foo').to.have.lengthOf.below(4); // Not recommended + * + * expect([1, 2, 3]).to.have.length(3); // Recommended + * expect([1, 2, 3]).to.have.lengthOf.below(4); // Not recommended + * + * Add `.not` earlier in the chain to negate `.below`. + * + * expect(2).to.equal(2); // Recommended + * expect(2).to.not.be.below(1); // Not recommended + * + * `.below` accepts an optional `msg` argument which is a custom error message + * to show when the assertion fails. The message can also be given as the + * second argument to `expect`. + * + * expect(2).to.be.below(1, 'nooo why fail??'); + * expect(2, 'nooo why fail??').to.be.below(1); + * + * The aliases `.lt` and `.lessThan` can be used interchangeably with + * `.below`. + * + * @name below + * @alias lt + * @alias lessThan + * @param {Number} n + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertBelow (n, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , doLength = flag(this, 'doLength') + , flagMsg = flag(this, 'message') + , msgPrefix = ((flagMsg) ? flagMsg + ': ' : '') + , ssfi = flag(this, 'ssfi') + , objType = _.type(obj).toLowerCase() + , nType = _.type(n).toLowerCase() + , errorMessage + , shouldThrow = true; + + if (doLength && objType !== 'map' && objType !== 'set') { + new Assertion(obj, flagMsg, ssfi, true).to.have.property('length'); + } + + if (!doLength && (objType === 'date' && nType !== 'date')) { + errorMessage = msgPrefix + 'the argument to below must be a date'; + } else if (nType !== 'number' && (doLength || objType === 'number')) { + errorMessage = msgPrefix + 'the argument to below must be a number'; + } else if (!doLength && (objType !== 'date' && objType !== 'number')) { + var printObj = (objType === 'string') ? "'" + obj + "'" : obj; + errorMessage = msgPrefix + 'expected ' + printObj + ' to be a number or a date'; + } else { + shouldThrow = false; + } + + if (shouldThrow) { + throw new AssertionError(errorMessage, undefined, ssfi); + } + + if (doLength) { + var descriptor = 'length' + , itemsCount; + if (objType === 'map' || objType === 'set') { + descriptor = 'size'; + itemsCount = obj.size; + } else { + itemsCount = obj.length; + } + this.assert( + itemsCount < n + , 'expected #{this} to have a ' + descriptor + ' below #{exp} but got #{act}' + , 'expected #{this} to not have a ' + descriptor + ' below #{exp}' + , n + , itemsCount + ); + } else { + this.assert( + obj < n + , 'expected #{this} to be below #{exp}' + , 'expected #{this} to be at least #{exp}' + , n + ); + } + } + + Assertion.addMethod('below', assertBelow); + Assertion.addMethod('lt', assertBelow); + Assertion.addMethod('lessThan', assertBelow); + + /** + * ### .most(n[, msg]) + * + * Asserts that the target is a number or a date less than or equal to the given number + * or date `n` respectively. However, it's often best to assert that the target is equal to its + * expected value. + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.be.at.most(2); // Not recommended + * expect(1).to.be.at.most(1); // Not recommended + * + * Add `.lengthOf` earlier in the chain to assert that the target's `length` + * or `size` is less than or equal to the given number `n`. + * + * expect('foo').to.have.lengthOf(3); // Recommended + * expect('foo').to.have.lengthOf.at.most(4); // Not recommended + * + * expect([1, 2, 3]).to.have.lengthOf(3); // Recommended + * expect([1, 2, 3]).to.have.lengthOf.at.most(4); // Not recommended + * + * Add `.not` earlier in the chain to negate `.most`. + * + * expect(2).to.equal(2); // Recommended + * expect(2).to.not.be.at.most(1); // Not recommended + * + * `.most` accepts an optional `msg` argument which is a custom error message + * to show when the assertion fails. The message can also be given as the + * second argument to `expect`. + * + * expect(2).to.be.at.most(1, 'nooo why fail??'); + * expect(2, 'nooo why fail??').to.be.at.most(1); + * + * The alias `.lte` can be used interchangeably with `.most`. + * + * @name most + * @alias lte + * @param {Number} n + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertMost (n, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , doLength = flag(this, 'doLength') + , flagMsg = flag(this, 'message') + , msgPrefix = ((flagMsg) ? flagMsg + ': ' : '') + , ssfi = flag(this, 'ssfi') + , objType = _.type(obj).toLowerCase() + , nType = _.type(n).toLowerCase() + , errorMessage + , shouldThrow = true; + + if (doLength && objType !== 'map' && objType !== 'set') { + new Assertion(obj, flagMsg, ssfi, true).to.have.property('length'); + } + + if (!doLength && (objType === 'date' && nType !== 'date')) { + errorMessage = msgPrefix + 'the argument to most must be a date'; + } else if (nType !== 'number' && (doLength || objType === 'number')) { + errorMessage = msgPrefix + 'the argument to most must be a number'; + } else if (!doLength && (objType !== 'date' && objType !== 'number')) { + var printObj = (objType === 'string') ? "'" + obj + "'" : obj; + errorMessage = msgPrefix + 'expected ' + printObj + ' to be a number or a date'; + } else { + shouldThrow = false; + } + + if (shouldThrow) { + throw new AssertionError(errorMessage, undefined, ssfi); + } + + if (doLength) { + var descriptor = 'length' + , itemsCount; + if (objType === 'map' || objType === 'set') { + descriptor = 'size'; + itemsCount = obj.size; + } else { + itemsCount = obj.length; + } + this.assert( + itemsCount <= n + , 'expected #{this} to have a ' + descriptor + ' at most #{exp} but got #{act}' + , 'expected #{this} to have a ' + descriptor + ' above #{exp}' + , n + , itemsCount + ); + } else { + this.assert( + obj <= n + , 'expected #{this} to be at most #{exp}' + , 'expected #{this} to be above #{exp}' + , n + ); + } + } + + Assertion.addMethod('most', assertMost); + Assertion.addMethod('lte', assertMost); + + /** + * ### .within(start, finish[, msg]) + * + * Asserts that the target is a number or a date greater than or equal to the given + * number or date `start`, and less than or equal to the given number or date `finish` respectively. + * However, it's often best to assert that the target is equal to its expected + * value. + * + * expect(2).to.equal(2); // Recommended + * expect(2).to.be.within(1, 3); // Not recommended + * expect(2).to.be.within(2, 3); // Not recommended + * expect(2).to.be.within(1, 2); // Not recommended + * + * Add `.lengthOf` earlier in the chain to assert that the target's `length` + * or `size` is greater than or equal to the given number `start`, and less + * than or equal to the given number `finish`. + * + * expect('foo').to.have.lengthOf(3); // Recommended + * expect('foo').to.have.lengthOf.within(2, 4); // Not recommended + * + * expect([1, 2, 3]).to.have.lengthOf(3); // Recommended + * expect([1, 2, 3]).to.have.lengthOf.within(2, 4); // Not recommended + * + * Add `.not` earlier in the chain to negate `.within`. + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.not.be.within(2, 4); // Not recommended + * + * `.within` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. + * + * expect(4).to.be.within(1, 3, 'nooo why fail??'); + * expect(4, 'nooo why fail??').to.be.within(1, 3); + * + * @name within + * @param {Number} start lower bound inclusive + * @param {Number} finish upper bound inclusive + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + Assertion.addMethod('within', function (start, finish, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , doLength = flag(this, 'doLength') + , flagMsg = flag(this, 'message') + , msgPrefix = ((flagMsg) ? flagMsg + ': ' : '') + , ssfi = flag(this, 'ssfi') + , objType = _.type(obj).toLowerCase() + , startType = _.type(start).toLowerCase() + , finishType = _.type(finish).toLowerCase() + , errorMessage + , shouldThrow = true + , range = (startType === 'date' && finishType === 'date') + ? start.toUTCString() + '..' + finish.toUTCString() + : start + '..' + finish; + + if (doLength && objType !== 'map' && objType !== 'set') { + new Assertion(obj, flagMsg, ssfi, true).to.have.property('length'); + } + + if (!doLength && (objType === 'date' && (startType !== 'date' || finishType !== 'date'))) { + errorMessage = msgPrefix + 'the arguments to within must be dates'; + } else if ((startType !== 'number' || finishType !== 'number') && (doLength || objType === 'number')) { + errorMessage = msgPrefix + 'the arguments to within must be numbers'; + } else if (!doLength && (objType !== 'date' && objType !== 'number')) { + var printObj = (objType === 'string') ? "'" + obj + "'" : obj; + errorMessage = msgPrefix + 'expected ' + printObj + ' to be a number or a date'; + } else { + shouldThrow = false; + } + + if (shouldThrow) { + throw new AssertionError(errorMessage, undefined, ssfi); + } + + if (doLength) { + var descriptor = 'length' + , itemsCount; + if (objType === 'map' || objType === 'set') { + descriptor = 'size'; + itemsCount = obj.size; + } else { + itemsCount = obj.length; + } + this.assert( + itemsCount >= start && itemsCount <= finish + , 'expected #{this} to have a ' + descriptor + ' within ' + range + , 'expected #{this} to not have a ' + descriptor + ' within ' + range + ); + } else { + this.assert( + obj >= start && obj <= finish + , 'expected #{this} to be within ' + range + , 'expected #{this} to not be within ' + range + ); + } + }); + + /** + * ### .instanceof(constructor[, msg]) + * + * Asserts that the target is an instance of the given `constructor`. + * + * function Cat () { } + * + * expect(new Cat()).to.be.an.instanceof(Cat); + * expect([1, 2]).to.be.an.instanceof(Array); + * + * Add `.not` earlier in the chain to negate `.instanceof`. + * + * expect({a: 1}).to.not.be.an.instanceof(Array); + * + * `.instanceof` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. + * + * expect(1).to.be.an.instanceof(Array, 'nooo why fail??'); + * expect(1, 'nooo why fail??').to.be.an.instanceof(Array); + * + * Due to limitations in ES5, `.instanceof` may not always work as expected + * when using a transpiler such as Babel or TypeScript. In particular, it may + * produce unexpected results when subclassing built-in object such as + * `Array`, `Error`, and `Map`. See your transpiler's docs for details: + * + * - ([Babel](https://babeljs.io/docs/usage/caveats/#classes)) + * - ([TypeScript](https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work)) + * + * The alias `.instanceOf` can be used interchangeably with `.instanceof`. + * + * @name instanceof + * @param {Constructor} constructor + * @param {String} msg _optional_ + * @alias instanceOf + * @namespace BDD + * @api public + */ + + function assertInstanceOf (constructor, msg) { + if (msg) flag(this, 'message', msg); + + var target = flag(this, 'object') + var ssfi = flag(this, 'ssfi'); + var flagMsg = flag(this, 'message'); + + try { + var isInstanceOf = target instanceof constructor; + } catch (err) { + if (err instanceof TypeError) { + flagMsg = flagMsg ? flagMsg + ': ' : ''; + throw new AssertionError( + flagMsg + 'The instanceof assertion needs a constructor but ' + + _.type(constructor) + ' was given.', + undefined, + ssfi + ); + } + throw err; + } + + var name = _.getName(constructor); + if (name === null) { + name = 'an unnamed constructor'; + } + + this.assert( + isInstanceOf + , 'expected #{this} to be an instance of ' + name + , 'expected #{this} to not be an instance of ' + name + ); + }; + + Assertion.addMethod('instanceof', assertInstanceOf); + Assertion.addMethod('instanceOf', assertInstanceOf); + + /** + * ### .property(name[, val[, msg]]) + * + * Asserts that the target has a property with the given key `name`. + * + * expect({a: 1}).to.have.property('a'); + * + * When `val` is provided, `.property` also asserts that the property's value + * is equal to the given `val`. + * + * expect({a: 1}).to.have.property('a', 1); + * + * By default, strict (`===`) equality is used. Add `.deep` earlier in the + * chain to use deep equality instead. See the `deep-eql` project page for + * info on the deep equality algorithm: https://github.com/chaijs/deep-eql. + * + * // Target object deeply (but not strictly) has property `x: {a: 1}` + * expect({x: {a: 1}}).to.have.deep.property('x', {a: 1}); + * expect({x: {a: 1}}).to.not.have.property('x', {a: 1}); + * + * The target's enumerable and non-enumerable properties are always included + * in the search. By default, both own and inherited properties are included. + * Add `.own` earlier in the chain to exclude inherited properties from the + * search. + * + * Object.prototype.b = 2; + * + * expect({a: 1}).to.have.own.property('a'); + * expect({a: 1}).to.have.own.property('a', 1); + * expect({a: 1}).to.have.property('b'); + * expect({a: 1}).to.not.have.own.property('b'); + * + * `.deep` and `.own` can be combined. + * + * expect({x: {a: 1}}).to.have.deep.own.property('x', {a: 1}); + * + * Add `.nested` earlier in the chain to enable dot- and bracket-notation when + * referencing nested properties. + * + * expect({a: {b: ['x', 'y']}}).to.have.nested.property('a.b[1]'); + * expect({a: {b: ['x', 'y']}}).to.have.nested.property('a.b[1]', 'y'); + * + * If `.` or `[]` are part of an actual property name, they can be escaped by + * adding two backslashes before them. + * + * expect({'.a': {'[b]': 'x'}}).to.have.nested.property('\\.a.\\[b\\]'); + * + * `.deep` and `.nested` can be combined. + * + * expect({a: {b: [{c: 3}]}}) + * .to.have.deep.nested.property('a.b[0]', {c: 3}); + * + * `.own` and `.nested` cannot be combined. + * + * Add `.not` earlier in the chain to negate `.property`. + * + * expect({a: 1}).to.not.have.property('b'); + * + * However, it's dangerous to negate `.property` when providing `val`. The + * problem is that it creates uncertain expectations by asserting that the + * target either doesn't have a property with the given key `name`, or that it + * does have a property with the given key `name` but its value isn't equal to + * the given `val`. It's often best to identify the exact output that's + * expected, and then write an assertion that only accepts that exact output. + * + * When the target isn't expected to have a property with the given key + * `name`, it's often best to assert exactly that. + * + * expect({b: 2}).to.not.have.property('a'); // Recommended + * expect({b: 2}).to.not.have.property('a', 1); // Not recommended + * + * When the target is expected to have a property with the given key `name`, + * it's often best to assert that the property has its expected value, rather + * than asserting that it doesn't have one of many unexpected values. + * + * expect({a: 3}).to.have.property('a', 3); // Recommended + * expect({a: 3}).to.not.have.property('a', 1); // Not recommended + * + * `.property` changes the target of any assertions that follow in the chain + * to be the value of the property from the original target object. + * + * expect({a: 1}).to.have.property('a').that.is.a('number'); + * + * `.property` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. When not providing `val`, only use the + * second form. + * + * // Recommended + * expect({a: 1}).to.have.property('a', 2, 'nooo why fail??'); + * expect({a: 1}, 'nooo why fail??').to.have.property('a', 2); + * expect({a: 1}, 'nooo why fail??').to.have.property('b'); + * + * // Not recommended + * expect({a: 1}).to.have.property('b', undefined, 'nooo why fail??'); + * + * The above assertion isn't the same thing as not providing `val`. Instead, + * it's asserting that the target object has a `b` property that's equal to + * `undefined`. + * + * The assertions `.ownProperty` and `.haveOwnProperty` can be used + * interchangeably with `.own.property`. + * + * @name property + * @param {String} name + * @param {Mixed} val (optional) + * @param {String} msg _optional_ + * @returns value of property for chaining + * @namespace BDD + * @api public + */ + + function assertProperty (name, val, msg) { + if (msg) flag(this, 'message', msg); + + var isNested = flag(this, 'nested') + , isOwn = flag(this, 'own') + , flagMsg = flag(this, 'message') + , obj = flag(this, 'object') + , ssfi = flag(this, 'ssfi') + , nameType = typeof name; + + flagMsg = flagMsg ? flagMsg + ': ' : ''; + + if (isNested) { + if (nameType !== 'string') { + throw new AssertionError( + flagMsg + 'the argument to property must be a string when using nested syntax', + undefined, + ssfi + ); + } + } else { + if (nameType !== 'string' && nameType !== 'number' && nameType !== 'symbol') { + throw new AssertionError( + flagMsg + 'the argument to property must be a string, number, or symbol', + undefined, + ssfi + ); + } + } + + if (isNested && isOwn) { + throw new AssertionError( + flagMsg + 'The "nested" and "own" flags cannot be combined.', + undefined, + ssfi + ); + } + + if (obj === null || obj === undefined) { + throw new AssertionError( + flagMsg + 'Target cannot be null or undefined.', + undefined, + ssfi + ); + } + + var isDeep = flag(this, 'deep') + , negate = flag(this, 'negate') + , pathInfo = isNested ? _.getPathInfo(obj, name) : null + , value = isNested ? pathInfo.value : obj[name]; + + var descriptor = ''; + if (isDeep) descriptor += 'deep '; + if (isOwn) descriptor += 'own '; + if (isNested) descriptor += 'nested '; + descriptor += 'property '; + + var hasProperty; + if (isOwn) hasProperty = Object.prototype.hasOwnProperty.call(obj, name); + else if (isNested) hasProperty = pathInfo.exists; + else hasProperty = _.hasProperty(obj, name); + + // When performing a negated assertion for both name and val, merely having + // a property with the given name isn't enough to cause the assertion to + // fail. It must both have a property with the given name, and the value of + // that property must equal the given val. Therefore, skip this assertion in + // favor of the next. + if (!negate || arguments.length === 1) { + this.assert( + hasProperty + , 'expected #{this} to have ' + descriptor + _.inspect(name) + , 'expected #{this} to not have ' + descriptor + _.inspect(name)); + } + + if (arguments.length > 1) { + this.assert( + hasProperty && (isDeep ? _.eql(val, value) : val === value) + , 'expected #{this} to have ' + descriptor + _.inspect(name) + ' of #{exp}, but got #{act}' + , 'expected #{this} to not have ' + descriptor + _.inspect(name) + ' of #{act}' + , val + , value + ); + } + + flag(this, 'object', value); + } + + Assertion.addMethod('property', assertProperty); + + function assertOwnProperty (name, value, msg) { + flag(this, 'own', true); + assertProperty.apply(this, arguments); + } + + Assertion.addMethod('ownProperty', assertOwnProperty); + Assertion.addMethod('haveOwnProperty', assertOwnProperty); + + /** + * ### .ownPropertyDescriptor(name[, descriptor[, msg]]) + * + * Asserts that the target has its own property descriptor with the given key + * `name`. Enumerable and non-enumerable properties are included in the + * search. + * + * expect({a: 1}).to.have.ownPropertyDescriptor('a'); + * + * When `descriptor` is provided, `.ownPropertyDescriptor` also asserts that + * the property's descriptor is deeply equal to the given `descriptor`. See + * the `deep-eql` project page for info on the deep equality algorithm: + * https://github.com/chaijs/deep-eql. + * + * expect({a: 1}).to.have.ownPropertyDescriptor('a', { + * configurable: true, + * enumerable: true, + * writable: true, + * value: 1, + * }); + * + * Add `.not` earlier in the chain to negate `.ownPropertyDescriptor`. + * + * expect({a: 1}).to.not.have.ownPropertyDescriptor('b'); + * + * However, it's dangerous to negate `.ownPropertyDescriptor` when providing + * a `descriptor`. The problem is that it creates uncertain expectations by + * asserting that the target either doesn't have a property descriptor with + * the given key `name`, or that it does have a property descriptor with the + * given key `name` but its not deeply equal to the given `descriptor`. It's + * often best to identify the exact output that's expected, and then write an + * assertion that only accepts that exact output. + * + * When the target isn't expected to have a property descriptor with the given + * key `name`, it's often best to assert exactly that. + * + * // Recommended + * expect({b: 2}).to.not.have.ownPropertyDescriptor('a'); + * + * // Not recommended + * expect({b: 2}).to.not.have.ownPropertyDescriptor('a', { + * configurable: true, + * enumerable: true, + * writable: true, + * value: 1, + * }); + * + * When the target is expected to have a property descriptor with the given + * key `name`, it's often best to assert that the property has its expected + * descriptor, rather than asserting that it doesn't have one of many + * unexpected descriptors. + * + * // Recommended + * expect({a: 3}).to.have.ownPropertyDescriptor('a', { + * configurable: true, + * enumerable: true, + * writable: true, + * value: 3, + * }); + * + * // Not recommended + * expect({a: 3}).to.not.have.ownPropertyDescriptor('a', { + * configurable: true, + * enumerable: true, + * writable: true, + * value: 1, + * }); + * + * `.ownPropertyDescriptor` changes the target of any assertions that follow + * in the chain to be the value of the property descriptor from the original + * target object. + * + * expect({a: 1}).to.have.ownPropertyDescriptor('a') + * .that.has.property('enumerable', true); + * + * `.ownPropertyDescriptor` accepts an optional `msg` argument which is a + * custom error message to show when the assertion fails. The message can also + * be given as the second argument to `expect`. When not providing + * `descriptor`, only use the second form. + * + * // Recommended + * expect({a: 1}).to.have.ownPropertyDescriptor('a', { + * configurable: true, + * enumerable: true, + * writable: true, + * value: 2, + * }, 'nooo why fail??'); + * + * // Recommended + * expect({a: 1}, 'nooo why fail??').to.have.ownPropertyDescriptor('a', { + * configurable: true, + * enumerable: true, + * writable: true, + * value: 2, + * }); + * + * // Recommended + * expect({a: 1}, 'nooo why fail??').to.have.ownPropertyDescriptor('b'); + * + * // Not recommended + * expect({a: 1}) + * .to.have.ownPropertyDescriptor('b', undefined, 'nooo why fail??'); + * + * The above assertion isn't the same thing as not providing `descriptor`. + * Instead, it's asserting that the target object has a `b` property + * descriptor that's deeply equal to `undefined`. + * + * The alias `.haveOwnPropertyDescriptor` can be used interchangeably with + * `.ownPropertyDescriptor`. + * + * @name ownPropertyDescriptor + * @alias haveOwnPropertyDescriptor + * @param {String} name + * @param {Object} descriptor _optional_ + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertOwnPropertyDescriptor (name, descriptor, msg) { + if (typeof descriptor === 'string') { + msg = descriptor; + descriptor = null; + } + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object'); + var actualDescriptor = Object.getOwnPropertyDescriptor(Object(obj), name); + if (actualDescriptor && descriptor) { + this.assert( + _.eql(descriptor, actualDescriptor) + , 'expected the own property descriptor for ' + _.inspect(name) + ' on #{this} to match ' + _.inspect(descriptor) + ', got ' + _.inspect(actualDescriptor) + , 'expected the own property descriptor for ' + _.inspect(name) + ' on #{this} to not match ' + _.inspect(descriptor) + , descriptor + , actualDescriptor + , true + ); + } else { + this.assert( + actualDescriptor + , 'expected #{this} to have an own property descriptor for ' + _.inspect(name) + , 'expected #{this} to not have an own property descriptor for ' + _.inspect(name) + ); + } + flag(this, 'object', actualDescriptor); + } + + Assertion.addMethod('ownPropertyDescriptor', assertOwnPropertyDescriptor); + Assertion.addMethod('haveOwnPropertyDescriptor', assertOwnPropertyDescriptor); + + /** + * ### .lengthOf(n[, msg]) + * + * Asserts that the target's `length` or `size` is equal to the given number + * `n`. + * + * expect([1, 2, 3]).to.have.lengthOf(3); + * expect('foo').to.have.lengthOf(3); + * expect(new Set([1, 2, 3])).to.have.lengthOf(3); + * expect(new Map([['a', 1], ['b', 2], ['c', 3]])).to.have.lengthOf(3); + * + * Add `.not` earlier in the chain to negate `.lengthOf`. However, it's often + * best to assert that the target's `length` property is equal to its expected + * value, rather than not equal to one of many unexpected values. + * + * expect('foo').to.have.lengthOf(3); // Recommended + * expect('foo').to.not.have.lengthOf(4); // Not recommended + * + * `.lengthOf` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. + * + * expect([1, 2, 3]).to.have.lengthOf(2, 'nooo why fail??'); + * expect([1, 2, 3], 'nooo why fail??').to.have.lengthOf(2); + * + * `.lengthOf` can also be used as a language chain, causing all `.above`, + * `.below`, `.least`, `.most`, and `.within` assertions that follow in the + * chain to use the target's `length` property as the target. However, it's + * often best to assert that the target's `length` property is equal to its + * expected length, rather than asserting that its `length` property falls + * within some range of values. + * + * // Recommended + * expect([1, 2, 3]).to.have.lengthOf(3); + * + * // Not recommended + * expect([1, 2, 3]).to.have.lengthOf.above(2); + * expect([1, 2, 3]).to.have.lengthOf.below(4); + * expect([1, 2, 3]).to.have.lengthOf.at.least(3); + * expect([1, 2, 3]).to.have.lengthOf.at.most(3); + * expect([1, 2, 3]).to.have.lengthOf.within(2,4); + * + * Due to a compatibility issue, the alias `.length` can't be chained directly + * off of an uninvoked method such as `.a`. Therefore, `.length` can't be used + * interchangeably with `.lengthOf` in every situation. It's recommended to + * always use `.lengthOf` instead of `.length`. + * + * expect([1, 2, 3]).to.have.a.length(3); // incompatible; throws error + * expect([1, 2, 3]).to.have.a.lengthOf(3); // passes as expected + * + * @name lengthOf + * @alias length + * @param {Number} n + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertLengthChain () { + flag(this, 'doLength', true); + } + + function assertLength (n, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , objType = _.type(obj).toLowerCase() + , flagMsg = flag(this, 'message') + , ssfi = flag(this, 'ssfi') + , descriptor = 'length' + , itemsCount; + + switch (objType) { + case 'map': + case 'set': + descriptor = 'size'; + itemsCount = obj.size; + break; + default: + new Assertion(obj, flagMsg, ssfi, true).to.have.property('length'); + itemsCount = obj.length; + } + + this.assert( + itemsCount == n + , 'expected #{this} to have a ' + descriptor + ' of #{exp} but got #{act}' + , 'expected #{this} to not have a ' + descriptor + ' of #{act}' + , n + , itemsCount + ); + } + + Assertion.addChainableMethod('length', assertLength, assertLengthChain); + Assertion.addChainableMethod('lengthOf', assertLength, assertLengthChain); + + /** + * ### .match(re[, msg]) + * + * Asserts that the target matches the given regular expression `re`. + * + * expect('foobar').to.match(/^foo/); + * + * Add `.not` earlier in the chain to negate `.match`. + * + * expect('foobar').to.not.match(/taco/); + * + * `.match` accepts an optional `msg` argument which is a custom error message + * to show when the assertion fails. The message can also be given as the + * second argument to `expect`. + * + * expect('foobar').to.match(/taco/, 'nooo why fail??'); + * expect('foobar', 'nooo why fail??').to.match(/taco/); + * + * The alias `.matches` can be used interchangeably with `.match`. + * + * @name match + * @alias matches + * @param {RegExp} re + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + function assertMatch(re, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object'); + this.assert( + re.exec(obj) + , 'expected #{this} to match ' + re + , 'expected #{this} not to match ' + re + ); + } + + Assertion.addMethod('match', assertMatch); + Assertion.addMethod('matches', assertMatch); + + /** + * ### .string(str[, msg]) + * + * Asserts that the target string contains the given substring `str`. + * + * expect('foobar').to.have.string('bar'); + * + * Add `.not` earlier in the chain to negate `.string`. + * + * expect('foobar').to.not.have.string('taco'); + * + * `.string` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. + * + * expect('foobar').to.have.string('taco', 'nooo why fail??'); + * expect('foobar', 'nooo why fail??').to.have.string('taco'); + * + * @name string + * @param {String} str + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + Assertion.addMethod('string', function (str, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , flagMsg = flag(this, 'message') + , ssfi = flag(this, 'ssfi'); + new Assertion(obj, flagMsg, ssfi, true).is.a('string'); + + this.assert( + ~obj.indexOf(str) + , 'expected #{this} to contain ' + _.inspect(str) + , 'expected #{this} to not contain ' + _.inspect(str) + ); + }); + + /** + * ### .keys(key1[, key2[, ...]]) + * + * Asserts that the target object, array, map, or set has the given keys. Only + * the target's own inherited properties are included in the search. + * + * When the target is an object or array, keys can be provided as one or more + * string arguments, a single array argument, or a single object argument. In + * the latter case, only the keys in the given object matter; the values are + * ignored. + * + * expect({a: 1, b: 2}).to.have.all.keys('a', 'b'); + * expect(['x', 'y']).to.have.all.keys(0, 1); + * + * expect({a: 1, b: 2}).to.have.all.keys(['a', 'b']); + * expect(['x', 'y']).to.have.all.keys([0, 1]); + * + * expect({a: 1, b: 2}).to.have.all.keys({a: 4, b: 5}); // ignore 4 and 5 + * expect(['x', 'y']).to.have.all.keys({0: 4, 1: 5}); // ignore 4 and 5 + * + * When the target is a map or set, each key must be provided as a separate + * argument. + * + * expect(new Map([['a', 1], ['b', 2]])).to.have.all.keys('a', 'b'); + * expect(new Set(['a', 'b'])).to.have.all.keys('a', 'b'); + * + * Because `.keys` does different things based on the target's type, it's + * important to check the target's type before using `.keys`. See the `.a` doc + * for info on testing a target's type. + * + * expect({a: 1, b: 2}).to.be.an('object').that.has.all.keys('a', 'b'); + * + * By default, strict (`===`) equality is used to compare keys of maps and + * sets. Add `.deep` earlier in the chain to use deep equality instead. See + * the `deep-eql` project page for info on the deep equality algorithm: + * https://github.com/chaijs/deep-eql. + * + * // Target set deeply (but not strictly) has key `{a: 1}` + * expect(new Set([{a: 1}])).to.have.all.deep.keys([{a: 1}]); + * expect(new Set([{a: 1}])).to.not.have.all.keys([{a: 1}]); + * + * By default, the target must have all of the given keys and no more. Add + * `.any` earlier in the chain to only require that the target have at least + * one of the given keys. Also, add `.not` earlier in the chain to negate + * `.keys`. It's often best to add `.any` when negating `.keys`, and to use + * `.all` when asserting `.keys` without negation. + * + * When negating `.keys`, `.any` is preferred because `.not.any.keys` asserts + * exactly what's expected of the output, whereas `.not.all.keys` creates + * uncertain expectations. + * + * // Recommended; asserts that target doesn't have any of the given keys + * expect({a: 1, b: 2}).to.not.have.any.keys('c', 'd'); + * + * // Not recommended; asserts that target doesn't have all of the given + * // keys but may or may not have some of them + * expect({a: 1, b: 2}).to.not.have.all.keys('c', 'd'); + * + * When asserting `.keys` without negation, `.all` is preferred because + * `.all.keys` asserts exactly what's expected of the output, whereas + * `.any.keys` creates uncertain expectations. + * + * // Recommended; asserts that target has all the given keys + * expect({a: 1, b: 2}).to.have.all.keys('a', 'b'); + * + * // Not recommended; asserts that target has at least one of the given + * // keys but may or may not have more of them + * expect({a: 1, b: 2}).to.have.any.keys('a', 'b'); + * + * Note that `.all` is used by default when neither `.all` nor `.any` appear + * earlier in the chain. However, it's often best to add `.all` anyway because + * it improves readability. + * + * // Both assertions are identical + * expect({a: 1, b: 2}).to.have.all.keys('a', 'b'); // Recommended + * expect({a: 1, b: 2}).to.have.keys('a', 'b'); // Not recommended + * + * Add `.include` earlier in the chain to require that the target's keys be a + * superset of the expected keys, rather than identical sets. + * + * // Target object's keys are a superset of ['a', 'b'] but not identical + * expect({a: 1, b: 2, c: 3}).to.include.all.keys('a', 'b'); + * expect({a: 1, b: 2, c: 3}).to.not.have.all.keys('a', 'b'); + * + * However, if `.any` and `.include` are combined, only the `.any` takes + * effect. The `.include` is ignored in this case. + * + * // Both assertions are identical + * expect({a: 1}).to.have.any.keys('a', 'b'); + * expect({a: 1}).to.include.any.keys('a', 'b'); + * + * A custom error message can be given as the second argument to `expect`. + * + * expect({a: 1}, 'nooo why fail??').to.have.key('b'); + * + * The alias `.key` can be used interchangeably with `.keys`. + * + * @name keys + * @alias key + * @param {...String|Array|Object} keys + * @namespace BDD + * @api public + */ + + function assertKeys (keys) { + var obj = flag(this, 'object') + , objType = _.type(obj) + , keysType = _.type(keys) + , ssfi = flag(this, 'ssfi') + , isDeep = flag(this, 'deep') + , str + , deepStr = '' + , actual + , ok = true + , flagMsg = flag(this, 'message'); + + flagMsg = flagMsg ? flagMsg + ': ' : ''; + var mixedArgsMsg = flagMsg + 'when testing keys against an object or an array you must give a single Array|Object|String argument or multiple String arguments'; + + if (objType === 'Map' || objType === 'Set') { + deepStr = isDeep ? 'deeply ' : ''; + actual = []; + + // Map and Set '.keys' aren't supported in IE 11. Therefore, use .forEach. + obj.forEach(function (val, key) { actual.push(key) }); + + if (keysType !== 'Array') { + keys = Array.prototype.slice.call(arguments); + } + } else { + actual = _.getOwnEnumerableProperties(obj); + + switch (keysType) { + case 'Array': + if (arguments.length > 1) { + throw new AssertionError(mixedArgsMsg, undefined, ssfi); + } + break; + case 'Object': + if (arguments.length > 1) { + throw new AssertionError(mixedArgsMsg, undefined, ssfi); + } + keys = Object.keys(keys); + break; + default: + keys = Array.prototype.slice.call(arguments); + } + + // Only stringify non-Symbols because Symbols would become "Symbol()" + keys = keys.map(function (val) { + return typeof val === 'symbol' ? val : String(val); + }); + } + + if (!keys.length) { + throw new AssertionError(flagMsg + 'keys required', undefined, ssfi); + } + + var len = keys.length + , any = flag(this, 'any') + , all = flag(this, 'all') + , expected = keys; + + if (!any && !all) { + all = true; + } + + // Has any + if (any) { + ok = expected.some(function(expectedKey) { + return actual.some(function(actualKey) { + if (isDeep) { + return _.eql(expectedKey, actualKey); + } else { + return expectedKey === actualKey; + } + }); + }); + } + + // Has all + if (all) { + ok = expected.every(function(expectedKey) { + return actual.some(function(actualKey) { + if (isDeep) { + return _.eql(expectedKey, actualKey); + } else { + return expectedKey === actualKey; + } + }); + }); + + if (!flag(this, 'contains')) { + ok = ok && keys.length == actual.length; + } + } + + // Key string + if (len > 1) { + keys = keys.map(function(key) { + return _.inspect(key); + }); + var last = keys.pop(); + if (all) { + str = keys.join(', ') + ', and ' + last; + } + if (any) { + str = keys.join(', ') + ', or ' + last; + } + } else { + str = _.inspect(keys[0]); + } + + // Form + str = (len > 1 ? 'keys ' : 'key ') + str; + + // Have / include + str = (flag(this, 'contains') ? 'contain ' : 'have ') + str; + + // Assertion + this.assert( + ok + , 'expected #{this} to ' + deepStr + str + , 'expected #{this} to not ' + deepStr + str + , expected.slice(0).sort(_.compareByInspect) + , actual.sort(_.compareByInspect) + , true + ); + } + + Assertion.addMethod('keys', assertKeys); + Assertion.addMethod('key', assertKeys); + + /** + * ### .throw([errorLike], [errMsgMatcher], [msg]) + * + * When no arguments are provided, `.throw` invokes the target function and + * asserts that an error is thrown. + * + * var badFn = function () { throw new TypeError('Illegal salmon!'); }; + * + * expect(badFn).to.throw(); + * + * When one argument is provided, and it's an error constructor, `.throw` + * invokes the target function and asserts that an error is thrown that's an + * instance of that error constructor. + * + * var badFn = function () { throw new TypeError('Illegal salmon!'); }; + * + * expect(badFn).to.throw(TypeError); + * + * When one argument is provided, and it's an error instance, `.throw` invokes + * the target function and asserts that an error is thrown that's strictly + * (`===`) equal to that error instance. + * + * var err = new TypeError('Illegal salmon!'); + * var badFn = function () { throw err; }; + * + * expect(badFn).to.throw(err); + * + * When one argument is provided, and it's a string, `.throw` invokes the + * target function and asserts that an error is thrown with a message that + * contains that string. + * + * var badFn = function () { throw new TypeError('Illegal salmon!'); }; + * + * expect(badFn).to.throw('salmon'); + * + * When one argument is provided, and it's a regular expression, `.throw` + * invokes the target function and asserts that an error is thrown with a + * message that matches that regular expression. + * + * var badFn = function () { throw new TypeError('Illegal salmon!'); }; + * + * expect(badFn).to.throw(/salmon/); + * + * When two arguments are provided, and the first is an error instance or + * constructor, and the second is a string or regular expression, `.throw` + * invokes the function and asserts that an error is thrown that fulfills both + * conditions as described above. + * + * var err = new TypeError('Illegal salmon!'); + * var badFn = function () { throw err; }; + * + * expect(badFn).to.throw(TypeError, 'salmon'); + * expect(badFn).to.throw(TypeError, /salmon/); + * expect(badFn).to.throw(err, 'salmon'); + * expect(badFn).to.throw(err, /salmon/); + * + * Add `.not` earlier in the chain to negate `.throw`. + * + * var goodFn = function () {}; + * + * expect(goodFn).to.not.throw(); + * + * However, it's dangerous to negate `.throw` when providing any arguments. + * The problem is that it creates uncertain expectations by asserting that the + * target either doesn't throw an error, or that it throws an error but of a + * different type than the given type, or that it throws an error of the given + * type but with a message that doesn't include the given string. It's often + * best to identify the exact output that's expected, and then write an + * assertion that only accepts that exact output. + * + * When the target isn't expected to throw an error, it's often best to assert + * exactly that. + * + * var goodFn = function () {}; + * + * expect(goodFn).to.not.throw(); // Recommended + * expect(goodFn).to.not.throw(ReferenceError, 'x'); // Not recommended + * + * When the target is expected to throw an error, it's often best to assert + * that the error is of its expected type, and has a message that includes an + * expected string, rather than asserting that it doesn't have one of many + * unexpected types, and doesn't have a message that includes some string. + * + * var badFn = function () { throw new TypeError('Illegal salmon!'); }; + * + * expect(badFn).to.throw(TypeError, 'salmon'); // Recommended + * expect(badFn).to.not.throw(ReferenceError, 'x'); // Not recommended + * + * `.throw` changes the target of any assertions that follow in the chain to + * be the error object that's thrown. + * + * var err = new TypeError('Illegal salmon!'); + * err.code = 42; + * var badFn = function () { throw err; }; + * + * expect(badFn).to.throw(TypeError).with.property('code', 42); + * + * `.throw` accepts an optional `msg` argument which is a custom error message + * to show when the assertion fails. The message can also be given as the + * second argument to `expect`. When not providing two arguments, always use + * the second form. + * + * var goodFn = function () {}; + * + * expect(goodFn).to.throw(TypeError, 'x', 'nooo why fail??'); + * expect(goodFn, 'nooo why fail??').to.throw(); + * + * Due to limitations in ES5, `.throw` may not always work as expected when + * using a transpiler such as Babel or TypeScript. In particular, it may + * produce unexpected results when subclassing the built-in `Error` object and + * then passing the subclassed constructor to `.throw`. See your transpiler's + * docs for details: + * + * - ([Babel](https://babeljs.io/docs/usage/caveats/#classes)) + * - ([TypeScript](https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work)) + * + * Beware of some common mistakes when using the `throw` assertion. One common + * mistake is to accidentally invoke the function yourself instead of letting + * the `throw` assertion invoke the function for you. For example, when + * testing if a function named `fn` throws, provide `fn` instead of `fn()` as + * the target for the assertion. + * + * expect(fn).to.throw(); // Good! Tests `fn` as desired + * expect(fn()).to.throw(); // Bad! Tests result of `fn()`, not `fn` + * + * If you need to assert that your function `fn` throws when passed certain + * arguments, then wrap a call to `fn` inside of another function. + * + * expect(function () { fn(42); }).to.throw(); // Function expression + * expect(() => fn(42)).to.throw(); // ES6 arrow function + * + * Another common mistake is to provide an object method (or any stand-alone + * function that relies on `this`) as the target of the assertion. Doing so is + * problematic because the `this` context will be lost when the function is + * invoked by `.throw`; there's no way for it to know what `this` is supposed + * to be. There are two ways around this problem. One solution is to wrap the + * method or function call inside of another function. Another solution is to + * use `bind`. + * + * expect(function () { cat.meow(); }).to.throw(); // Function expression + * expect(() => cat.meow()).to.throw(); // ES6 arrow function + * expect(cat.meow.bind(cat)).to.throw(); // Bind + * + * Finally, it's worth mentioning that it's a best practice in JavaScript to + * only throw `Error` and derivatives of `Error` such as `ReferenceError`, + * `TypeError`, and user-defined objects that extend `Error`. No other type of + * value will generate a stack trace when initialized. With that said, the + * `throw` assertion does technically support any type of value being thrown, + * not just `Error` and its derivatives. + * + * The aliases `.throws` and `.Throw` can be used interchangeably with + * `.throw`. + * + * @name throw + * @alias throws + * @alias Throw + * @param {Error|ErrorConstructor} errorLike + * @param {String|RegExp} errMsgMatcher error message + * @param {String} msg _optional_ + * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types + * @returns error for chaining (null if no error) + * @namespace BDD + * @api public + */ + + function assertThrows (errorLike, errMsgMatcher, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , ssfi = flag(this, 'ssfi') + , flagMsg = flag(this, 'message') + , negate = flag(this, 'negate') || false; + new Assertion(obj, flagMsg, ssfi, true).is.a('function'); + + if (errorLike instanceof RegExp || typeof errorLike === 'string') { + errMsgMatcher = errorLike; + errorLike = null; + } + + var caughtErr; + try { + obj(); + } catch (err) { + caughtErr = err; + } + + // If we have the negate flag enabled and at least one valid argument it means we do expect an error + // but we want it to match a given set of criteria + var everyArgIsUndefined = errorLike === undefined && errMsgMatcher === undefined; + + // If we've got the negate flag enabled and both args, we should only fail if both aren't compatible + // See Issue #551 and PR #683@GitHub + var everyArgIsDefined = Boolean(errorLike && errMsgMatcher); + var errorLikeFail = false; + var errMsgMatcherFail = false; + + // Checking if error was thrown + if (everyArgIsUndefined || !everyArgIsUndefined && !negate) { + // We need this to display results correctly according to their types + var errorLikeString = 'an error'; + if (errorLike instanceof Error) { + errorLikeString = '#{exp}'; + } else if (errorLike) { + errorLikeString = _.checkError.getConstructorName(errorLike); + } + + this.assert( + caughtErr + , 'expected #{this} to throw ' + errorLikeString + , 'expected #{this} to not throw an error but #{act} was thrown' + , errorLike && errorLike.toString() + , (caughtErr instanceof Error ? + caughtErr.toString() : (typeof caughtErr === 'string' ? caughtErr : caughtErr && + _.checkError.getConstructorName(caughtErr))) + ); + } + + if (errorLike && caughtErr) { + // We should compare instances only if `errorLike` is an instance of `Error` + if (errorLike instanceof Error) { + var isCompatibleInstance = _.checkError.compatibleInstance(caughtErr, errorLike); + + if (isCompatibleInstance === negate) { + // These checks were created to ensure we won't fail too soon when we've got both args and a negate + // See Issue #551 and PR #683@GitHub + if (everyArgIsDefined && negate) { + errorLikeFail = true; + } else { + this.assert( + negate + , 'expected #{this} to throw #{exp} but #{act} was thrown' + , 'expected #{this} to not throw #{exp}' + (caughtErr && !negate ? ' but #{act} was thrown' : '') + , errorLike.toString() + , caughtErr.toString() + ); + } + } + } + + var isCompatibleConstructor = _.checkError.compatibleConstructor(caughtErr, errorLike); + if (isCompatibleConstructor === negate) { + if (everyArgIsDefined && negate) { + errorLikeFail = true; + } else { + this.assert( + negate + , 'expected #{this} to throw #{exp} but #{act} was thrown' + , 'expected #{this} to not throw #{exp}' + (caughtErr ? ' but #{act} was thrown' : '') + , (errorLike instanceof Error ? errorLike.toString() : errorLike && _.checkError.getConstructorName(errorLike)) + , (caughtErr instanceof Error ? caughtErr.toString() : caughtErr && _.checkError.getConstructorName(caughtErr)) + ); + } + } + } + + if (caughtErr && errMsgMatcher !== undefined && errMsgMatcher !== null) { + // Here we check compatible messages + var placeholder = 'including'; + if (errMsgMatcher instanceof RegExp) { + placeholder = 'matching' + } + + var isCompatibleMessage = _.checkError.compatibleMessage(caughtErr, errMsgMatcher); + if (isCompatibleMessage === negate) { + if (everyArgIsDefined && negate) { + errMsgMatcherFail = true; + } else { + this.assert( + negate + , 'expected #{this} to throw error ' + placeholder + ' #{exp} but got #{act}' + , 'expected #{this} to throw error not ' + placeholder + ' #{exp}' + , errMsgMatcher + , _.checkError.getMessage(caughtErr) + ); + } + } + } + + // If both assertions failed and both should've matched we throw an error + if (errorLikeFail && errMsgMatcherFail) { + this.assert( + negate + , 'expected #{this} to throw #{exp} but #{act} was thrown' + , 'expected #{this} to not throw #{exp}' + (caughtErr ? ' but #{act} was thrown' : '') + , (errorLike instanceof Error ? errorLike.toString() : errorLike && _.checkError.getConstructorName(errorLike)) + , (caughtErr instanceof Error ? caughtErr.toString() : caughtErr && _.checkError.getConstructorName(caughtErr)) + ); + } + + flag(this, 'object', caughtErr); + }; + + Assertion.addMethod('throw', assertThrows); + Assertion.addMethod('throws', assertThrows); + Assertion.addMethod('Throw', assertThrows); + + /** + * ### .respondTo(method[, msg]) + * + * When the target is a non-function object, `.respondTo` asserts that the + * target has a method with the given name `method`. The method can be own or + * inherited, and it can be enumerable or non-enumerable. + * + * function Cat () {} + * Cat.prototype.meow = function () {}; + * + * expect(new Cat()).to.respondTo('meow'); + * + * When the target is a function, `.respondTo` asserts that the target's + * `prototype` property has a method with the given name `method`. Again, the + * method can be own or inherited, and it can be enumerable or non-enumerable. + * + * function Cat () {} + * Cat.prototype.meow = function () {}; + * + * expect(Cat).to.respondTo('meow'); + * + * Add `.itself` earlier in the chain to force `.respondTo` to treat the + * target as a non-function object, even if it's a function. Thus, it asserts + * that the target has a method with the given name `method`, rather than + * asserting that the target's `prototype` property has a method with the + * given name `method`. + * + * function Cat () {} + * Cat.prototype.meow = function () {}; + * Cat.hiss = function () {}; + * + * expect(Cat).itself.to.respondTo('hiss').but.not.respondTo('meow'); + * + * When not adding `.itself`, it's important to check the target's type before + * using `.respondTo`. See the `.a` doc for info on checking a target's type. + * + * function Cat () {} + * Cat.prototype.meow = function () {}; + * + * expect(new Cat()).to.be.an('object').that.respondsTo('meow'); + * + * Add `.not` earlier in the chain to negate `.respondTo`. + * + * function Dog () {} + * Dog.prototype.bark = function () {}; + * + * expect(new Dog()).to.not.respondTo('meow'); + * + * `.respondTo` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. + * + * expect({}).to.respondTo('meow', 'nooo why fail??'); + * expect({}, 'nooo why fail??').to.respondTo('meow'); + * + * The alias `.respondsTo` can be used interchangeably with `.respondTo`. + * + * @name respondTo + * @alias respondsTo + * @param {String} method + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function respondTo (method, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , itself = flag(this, 'itself') + , context = ('function' === typeof obj && !itself) + ? obj.prototype[method] + : obj[method]; + + this.assert( + 'function' === typeof context + , 'expected #{this} to respond to ' + _.inspect(method) + , 'expected #{this} to not respond to ' + _.inspect(method) + ); + } + + Assertion.addMethod('respondTo', respondTo); + Assertion.addMethod('respondsTo', respondTo); + + /** + * ### .itself + * + * Forces all `.respondTo` assertions that follow in the chain to behave as if + * the target is a non-function object, even if it's a function. Thus, it + * causes `.respondTo` to assert that the target has a method with the given + * name, rather than asserting that the target's `prototype` property has a + * method with the given name. + * + * function Cat () {} + * Cat.prototype.meow = function () {}; + * Cat.hiss = function () {}; + * + * expect(Cat).itself.to.respondTo('hiss').but.not.respondTo('meow'); + * + * @name itself + * @namespace BDD + * @api public + */ + + Assertion.addProperty('itself', function () { + flag(this, 'itself', true); + }); + + /** + * ### .satisfy(matcher[, msg]) + * + * Invokes the given `matcher` function with the target being passed as the + * first argument, and asserts that the value returned is truthy. + * + * expect(1).to.satisfy(function(num) { + * return num > 0; + * }); + * + * Add `.not` earlier in the chain to negate `.satisfy`. + * + * expect(1).to.not.satisfy(function(num) { + * return num > 2; + * }); + * + * `.satisfy` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. + * + * expect(1).to.satisfy(function(num) { + * return num > 2; + * }, 'nooo why fail??'); + * + * expect(1, 'nooo why fail??').to.satisfy(function(num) { + * return num > 2; + * }); + * + * The alias `.satisfies` can be used interchangeably with `.satisfy`. + * + * @name satisfy + * @alias satisfies + * @param {Function} matcher + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function satisfy (matcher, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object'); + var result = matcher(obj); + this.assert( + result + , 'expected #{this} to satisfy ' + _.objDisplay(matcher) + , 'expected #{this} to not satisfy' + _.objDisplay(matcher) + , flag(this, 'negate') ? false : true + , result + ); + } + + Assertion.addMethod('satisfy', satisfy); + Assertion.addMethod('satisfies', satisfy); + + /** + * ### .closeTo(expected, delta[, msg]) + * + * Asserts that the target is a number that's within a given +/- `delta` range + * of the given number `expected`. However, it's often best to assert that the + * target is equal to its expected value. + * + * // Recommended + * expect(1.5).to.equal(1.5); + * + * // Not recommended + * expect(1.5).to.be.closeTo(1, 0.5); + * expect(1.5).to.be.closeTo(2, 0.5); + * expect(1.5).to.be.closeTo(1, 1); + * + * Add `.not` earlier in the chain to negate `.closeTo`. + * + * expect(1.5).to.equal(1.5); // Recommended + * expect(1.5).to.not.be.closeTo(3, 1); // Not recommended + * + * `.closeTo` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. + * + * expect(1.5).to.be.closeTo(3, 1, 'nooo why fail??'); + * expect(1.5, 'nooo why fail??').to.be.closeTo(3, 1); + * + * The alias `.approximately` can be used interchangeably with `.closeTo`. + * + * @name closeTo + * @alias approximately + * @param {Number} expected + * @param {Number} delta + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function closeTo(expected, delta, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , flagMsg = flag(this, 'message') + , ssfi = flag(this, 'ssfi'); + + new Assertion(obj, flagMsg, ssfi, true).is.a('number'); + if (typeof expected !== 'number' || typeof delta !== 'number') { + flagMsg = flagMsg ? flagMsg + ': ' : ''; + throw new AssertionError( + flagMsg + 'the arguments to closeTo or approximately must be numbers', + undefined, + ssfi + ); + } + + this.assert( + Math.abs(obj - expected) <= delta + , 'expected #{this} to be close to ' + expected + ' +/- ' + delta + , 'expected #{this} not to be close to ' + expected + ' +/- ' + delta + ); + } + + Assertion.addMethod('closeTo', closeTo); + Assertion.addMethod('approximately', closeTo); + + // Note: Duplicates are ignored if testing for inclusion instead of sameness. + function isSubsetOf(subset, superset, cmp, contains, ordered) { + if (!contains) { + if (subset.length !== superset.length) return false; + superset = superset.slice(); + } + + return subset.every(function(elem, idx) { + if (ordered) return cmp ? cmp(elem, superset[idx]) : elem === superset[idx]; + + if (!cmp) { + var matchIdx = superset.indexOf(elem); + if (matchIdx === -1) return false; + + // Remove match from superset so not counted twice if duplicate in subset. + if (!contains) superset.splice(matchIdx, 1); + return true; + } + + return superset.some(function(elem2, matchIdx) { + if (!cmp(elem, elem2)) return false; + + // Remove match from superset so not counted twice if duplicate in subset. + if (!contains) superset.splice(matchIdx, 1); + return true; + }); + }); + } + + /** + * ### .members(set[, msg]) + * + * Asserts that the target array has the same members as the given array + * `set`. + * + * expect([1, 2, 3]).to.have.members([2, 1, 3]); + * expect([1, 2, 2]).to.have.members([2, 1, 2]); + * + * By default, members are compared using strict (`===`) equality. Add `.deep` + * earlier in the chain to use deep equality instead. See the `deep-eql` + * project page for info on the deep equality algorithm: + * https://github.com/chaijs/deep-eql. + * + * // Target array deeply (but not strictly) has member `{a: 1}` + * expect([{a: 1}]).to.have.deep.members([{a: 1}]); + * expect([{a: 1}]).to.not.have.members([{a: 1}]); + * + * By default, order doesn't matter. Add `.ordered` earlier in the chain to + * require that members appear in the same order. + * + * expect([1, 2, 3]).to.have.ordered.members([1, 2, 3]); + * expect([1, 2, 3]).to.have.members([2, 1, 3]) + * .but.not.ordered.members([2, 1, 3]); + * + * By default, both arrays must be the same size. Add `.include` earlier in + * the chain to require that the target's members be a superset of the + * expected members. Note that duplicates are ignored in the subset when + * `.include` is added. + * + * // Target array is a superset of [1, 2] but not identical + * expect([1, 2, 3]).to.include.members([1, 2]); + * expect([1, 2, 3]).to.not.have.members([1, 2]); + * + * // Duplicates in the subset are ignored + * expect([1, 2, 3]).to.include.members([1, 2, 2, 2]); + * + * `.deep`, `.ordered`, and `.include` can all be combined. However, if + * `.include` and `.ordered` are combined, the ordering begins at the start of + * both arrays. + * + * expect([{a: 1}, {b: 2}, {c: 3}]) + * .to.include.deep.ordered.members([{a: 1}, {b: 2}]) + * .but.not.include.deep.ordered.members([{b: 2}, {c: 3}]); + * + * Add `.not` earlier in the chain to negate `.members`. However, it's + * dangerous to do so. The problem is that it creates uncertain expectations + * by asserting that the target array doesn't have all of the same members as + * the given array `set` but may or may not have some of them. It's often best + * to identify the exact output that's expected, and then write an assertion + * that only accepts that exact output. + * + * expect([1, 2]).to.not.include(3).and.not.include(4); // Recommended + * expect([1, 2]).to.not.have.members([3, 4]); // Not recommended + * + * `.members` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. + * + * expect([1, 2]).to.have.members([1, 2, 3], 'nooo why fail??'); + * expect([1, 2], 'nooo why fail??').to.have.members([1, 2, 3]); + * + * @name members + * @param {Array} set + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + Assertion.addMethod('members', function (subset, msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object') + , flagMsg = flag(this, 'message') + , ssfi = flag(this, 'ssfi'); + + new Assertion(obj, flagMsg, ssfi, true).to.be.an('array'); + new Assertion(subset, flagMsg, ssfi, true).to.be.an('array'); + + var contains = flag(this, 'contains'); + var ordered = flag(this, 'ordered'); + + var subject, failMsg, failNegateMsg; + + if (contains) { + subject = ordered ? 'an ordered superset' : 'a superset'; + failMsg = 'expected #{this} to be ' + subject + ' of #{exp}'; + failNegateMsg = 'expected #{this} to not be ' + subject + ' of #{exp}'; + } else { + subject = ordered ? 'ordered members' : 'members'; + failMsg = 'expected #{this} to have the same ' + subject + ' as #{exp}'; + failNegateMsg = 'expected #{this} to not have the same ' + subject + ' as #{exp}'; + } + + var cmp = flag(this, 'deep') ? _.eql : undefined; + + this.assert( + isSubsetOf(subset, obj, cmp, contains, ordered) + , failMsg + , failNegateMsg + , subset + , obj + , true + ); + }); + + /** + * ### .oneOf(list[, msg]) + * + * Asserts that the target is a member of the given array `list`. However, + * it's often best to assert that the target is equal to its expected value. + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.be.oneOf([1, 2, 3]); // Not recommended + * + * Comparisons are performed using strict (`===`) equality. + * + * Add `.not` earlier in the chain to negate `.oneOf`. + * + * expect(1).to.equal(1); // Recommended + * expect(1).to.not.be.oneOf([2, 3, 4]); // Not recommended + * + * `.oneOf` accepts an optional `msg` argument which is a custom error message + * to show when the assertion fails. The message can also be given as the + * second argument to `expect`. + * + * expect(1).to.be.oneOf([2, 3, 4], 'nooo why fail??'); + * expect(1, 'nooo why fail??').to.be.oneOf([2, 3, 4]); + * + * @name oneOf + * @param {Array<*>} list + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function oneOf (list, msg) { + if (msg) flag(this, 'message', msg); + var expected = flag(this, 'object') + , flagMsg = flag(this, 'message') + , ssfi = flag(this, 'ssfi'); + new Assertion(list, flagMsg, ssfi, true).to.be.an('array'); + + this.assert( + list.indexOf(expected) > -1 + , 'expected #{this} to be one of #{exp}' + , 'expected #{this} to not be one of #{exp}' + , list + , expected + ); + } + + Assertion.addMethod('oneOf', oneOf); + + /** + * ### .change(subject[, prop[, msg]]) + * + * When one argument is provided, `.change` asserts that the given function + * `subject` returns a different value when it's invoked before the target + * function compared to when it's invoked afterward. However, it's often best + * to assert that `subject` is equal to its expected value. + * + * var dots = '' + * , addDot = function () { dots += '.'; } + * , getDots = function () { return dots; }; + * + * // Recommended + * expect(getDots()).to.equal(''); + * addDot(); + * expect(getDots()).to.equal('.'); + * + * // Not recommended + * expect(addDot).to.change(getDots); + * + * When two arguments are provided, `.change` asserts that the value of the + * given object `subject`'s `prop` property is different before invoking the + * target function compared to afterward. + * + * var myObj = {dots: ''} + * , addDot = function () { myObj.dots += '.'; }; + * + * // Recommended + * expect(myObj).to.have.property('dots', ''); + * addDot(); + * expect(myObj).to.have.property('dots', '.'); + * + * // Not recommended + * expect(addDot).to.change(myObj, 'dots'); + * + * Strict (`===`) equality is used to compare before and after values. + * + * Add `.not` earlier in the chain to negate `.change`. + * + * var dots = '' + * , noop = function () {} + * , getDots = function () { return dots; }; + * + * expect(noop).to.not.change(getDots); + * + * var myObj = {dots: ''} + * , noop = function () {}; + * + * expect(noop).to.not.change(myObj, 'dots'); + * + * `.change` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. When not providing two arguments, always + * use the second form. + * + * var myObj = {dots: ''} + * , addDot = function () { myObj.dots += '.'; }; + * + * expect(addDot).to.not.change(myObj, 'dots', 'nooo why fail??'); + * + * var dots = '' + * , addDot = function () { dots += '.'; } + * , getDots = function () { return dots; }; + * + * expect(addDot, 'nooo why fail??').to.not.change(getDots); + * + * `.change` also causes all `.by` assertions that follow in the chain to + * assert how much a numeric subject was increased or decreased by. However, + * it's dangerous to use `.change.by`. The problem is that it creates + * uncertain expectations by asserting that the subject either increases by + * the given delta, or that it decreases by the given delta. It's often best + * to identify the exact output that's expected, and then write an assertion + * that only accepts that exact output. + * + * var myObj = {val: 1} + * , addTwo = function () { myObj.val += 2; } + * , subtractTwo = function () { myObj.val -= 2; }; + * + * expect(addTwo).to.increase(myObj, 'val').by(2); // Recommended + * expect(addTwo).to.change(myObj, 'val').by(2); // Not recommended + * + * expect(subtractTwo).to.decrease(myObj, 'val').by(2); // Recommended + * expect(subtractTwo).to.change(myObj, 'val').by(2); // Not recommended + * + * The alias `.changes` can be used interchangeably with `.change`. + * + * @name change + * @alias changes + * @param {String} subject + * @param {String} prop name _optional_ + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertChanges (subject, prop, msg) { + if (msg) flag(this, 'message', msg); + var fn = flag(this, 'object') + , flagMsg = flag(this, 'message') + , ssfi = flag(this, 'ssfi'); + new Assertion(fn, flagMsg, ssfi, true).is.a('function'); + + var initial; + if (!prop) { + new Assertion(subject, flagMsg, ssfi, true).is.a('function'); + initial = subject(); + } else { + new Assertion(subject, flagMsg, ssfi, true).to.have.property(prop); + initial = subject[prop]; + } + + fn(); + + var final = prop === undefined || prop === null ? subject() : subject[prop]; + var msgObj = prop === undefined || prop === null ? initial : '.' + prop; + + // This gets flagged because of the .by(delta) assertion + flag(this, 'deltaMsgObj', msgObj); + flag(this, 'initialDeltaValue', initial); + flag(this, 'finalDeltaValue', final); + flag(this, 'deltaBehavior', 'change'); + flag(this, 'realDelta', final !== initial); + + this.assert( + initial !== final + , 'expected ' + msgObj + ' to change' + , 'expected ' + msgObj + ' to not change' + ); + } + + Assertion.addMethod('change', assertChanges); + Assertion.addMethod('changes', assertChanges); + + /** + * ### .increase(subject[, prop[, msg]]) + * + * When one argument is provided, `.increase` asserts that the given function + * `subject` returns a greater number when it's invoked after invoking the + * target function compared to when it's invoked beforehand. `.increase` also + * causes all `.by` assertions that follow in the chain to assert how much + * greater of a number is returned. It's often best to assert that the return + * value increased by the expected amount, rather than asserting it increased + * by any amount. + * + * var val = 1 + * , addTwo = function () { val += 2; } + * , getVal = function () { return val; }; + * + * expect(addTwo).to.increase(getVal).by(2); // Recommended + * expect(addTwo).to.increase(getVal); // Not recommended + * + * When two arguments are provided, `.increase` asserts that the value of the + * given object `subject`'s `prop` property is greater after invoking the + * target function compared to beforehand. + * + * var myObj = {val: 1} + * , addTwo = function () { myObj.val += 2; }; + * + * expect(addTwo).to.increase(myObj, 'val').by(2); // Recommended + * expect(addTwo).to.increase(myObj, 'val'); // Not recommended + * + * Add `.not` earlier in the chain to negate `.increase`. However, it's + * dangerous to do so. The problem is that it creates uncertain expectations + * by asserting that the subject either decreases, or that it stays the same. + * It's often best to identify the exact output that's expected, and then + * write an assertion that only accepts that exact output. + * + * When the subject is expected to decrease, it's often best to assert that it + * decreased by the expected amount. + * + * var myObj = {val: 1} + * , subtractTwo = function () { myObj.val -= 2; }; + * + * expect(subtractTwo).to.decrease(myObj, 'val').by(2); // Recommended + * expect(subtractTwo).to.not.increase(myObj, 'val'); // Not recommended + * + * When the subject is expected to stay the same, it's often best to assert + * exactly that. + * + * var myObj = {val: 1} + * , noop = function () {}; + * + * expect(noop).to.not.change(myObj, 'val'); // Recommended + * expect(noop).to.not.increase(myObj, 'val'); // Not recommended + * + * `.increase` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. When not providing two arguments, always + * use the second form. + * + * var myObj = {val: 1} + * , noop = function () {}; + * + * expect(noop).to.increase(myObj, 'val', 'nooo why fail??'); + * + * var val = 1 + * , noop = function () {} + * , getVal = function () { return val; }; + * + * expect(noop, 'nooo why fail??').to.increase(getVal); + * + * The alias `.increases` can be used interchangeably with `.increase`. + * + * @name increase + * @alias increases + * @param {String|Function} subject + * @param {String} prop name _optional_ + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertIncreases (subject, prop, msg) { + if (msg) flag(this, 'message', msg); + var fn = flag(this, 'object') + , flagMsg = flag(this, 'message') + , ssfi = flag(this, 'ssfi'); + new Assertion(fn, flagMsg, ssfi, true).is.a('function'); + + var initial; + if (!prop) { + new Assertion(subject, flagMsg, ssfi, true).is.a('function'); + initial = subject(); + } else { + new Assertion(subject, flagMsg, ssfi, true).to.have.property(prop); + initial = subject[prop]; + } + + // Make sure that the target is a number + new Assertion(initial, flagMsg, ssfi, true).is.a('number'); + + fn(); + + var final = prop === undefined || prop === null ? subject() : subject[prop]; + var msgObj = prop === undefined || prop === null ? initial : '.' + prop; + + flag(this, 'deltaMsgObj', msgObj); + flag(this, 'initialDeltaValue', initial); + flag(this, 'finalDeltaValue', final); + flag(this, 'deltaBehavior', 'increase'); + flag(this, 'realDelta', final - initial); + + this.assert( + final - initial > 0 + , 'expected ' + msgObj + ' to increase' + , 'expected ' + msgObj + ' to not increase' + ); + } + + Assertion.addMethod('increase', assertIncreases); + Assertion.addMethod('increases', assertIncreases); + + /** + * ### .decrease(subject[, prop[, msg]]) + * + * When one argument is provided, `.decrease` asserts that the given function + * `subject` returns a lesser number when it's invoked after invoking the + * target function compared to when it's invoked beforehand. `.decrease` also + * causes all `.by` assertions that follow in the chain to assert how much + * lesser of a number is returned. It's often best to assert that the return + * value decreased by the expected amount, rather than asserting it decreased + * by any amount. + * + * var val = 1 + * , subtractTwo = function () { val -= 2; } + * , getVal = function () { return val; }; + * + * expect(subtractTwo).to.decrease(getVal).by(2); // Recommended + * expect(subtractTwo).to.decrease(getVal); // Not recommended + * + * When two arguments are provided, `.decrease` asserts that the value of the + * given object `subject`'s `prop` property is lesser after invoking the + * target function compared to beforehand. + * + * var myObj = {val: 1} + * , subtractTwo = function () { myObj.val -= 2; }; + * + * expect(subtractTwo).to.decrease(myObj, 'val').by(2); // Recommended + * expect(subtractTwo).to.decrease(myObj, 'val'); // Not recommended + * + * Add `.not` earlier in the chain to negate `.decrease`. However, it's + * dangerous to do so. The problem is that it creates uncertain expectations + * by asserting that the subject either increases, or that it stays the same. + * It's often best to identify the exact output that's expected, and then + * write an assertion that only accepts that exact output. + * + * When the subject is expected to increase, it's often best to assert that it + * increased by the expected amount. + * + * var myObj = {val: 1} + * , addTwo = function () { myObj.val += 2; }; + * + * expect(addTwo).to.increase(myObj, 'val').by(2); // Recommended + * expect(addTwo).to.not.decrease(myObj, 'val'); // Not recommended + * + * When the subject is expected to stay the same, it's often best to assert + * exactly that. + * + * var myObj = {val: 1} + * , noop = function () {}; + * + * expect(noop).to.not.change(myObj, 'val'); // Recommended + * expect(noop).to.not.decrease(myObj, 'val'); // Not recommended + * + * `.decrease` accepts an optional `msg` argument which is a custom error + * message to show when the assertion fails. The message can also be given as + * the second argument to `expect`. When not providing two arguments, always + * use the second form. + * + * var myObj = {val: 1} + * , noop = function () {}; + * + * expect(noop).to.decrease(myObj, 'val', 'nooo why fail??'); + * + * var val = 1 + * , noop = function () {} + * , getVal = function () { return val; }; + * + * expect(noop, 'nooo why fail??').to.decrease(getVal); + * + * The alias `.decreases` can be used interchangeably with `.decrease`. + * + * @name decrease + * @alias decreases + * @param {String|Function} subject + * @param {String} prop name _optional_ + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertDecreases (subject, prop, msg) { + if (msg) flag(this, 'message', msg); + var fn = flag(this, 'object') + , flagMsg = flag(this, 'message') + , ssfi = flag(this, 'ssfi'); + new Assertion(fn, flagMsg, ssfi, true).is.a('function'); + + var initial; + if (!prop) { + new Assertion(subject, flagMsg, ssfi, true).is.a('function'); + initial = subject(); + } else { + new Assertion(subject, flagMsg, ssfi, true).to.have.property(prop); + initial = subject[prop]; + } + + // Make sure that the target is a number + new Assertion(initial, flagMsg, ssfi, true).is.a('number'); + + fn(); + + var final = prop === undefined || prop === null ? subject() : subject[prop]; + var msgObj = prop === undefined || prop === null ? initial : '.' + prop; + + flag(this, 'deltaMsgObj', msgObj); + flag(this, 'initialDeltaValue', initial); + flag(this, 'finalDeltaValue', final); + flag(this, 'deltaBehavior', 'decrease'); + flag(this, 'realDelta', initial - final); + + this.assert( + final - initial < 0 + , 'expected ' + msgObj + ' to decrease' + , 'expected ' + msgObj + ' to not decrease' + ); + } + + Assertion.addMethod('decrease', assertDecreases); + Assertion.addMethod('decreases', assertDecreases); + + /** + * ### .by(delta[, msg]) + * + * When following an `.increase` assertion in the chain, `.by` asserts that + * the subject of the `.increase` assertion increased by the given `delta`. + * + * var myObj = {val: 1} + * , addTwo = function () { myObj.val += 2; }; + * + * expect(addTwo).to.increase(myObj, 'val').by(2); + * + * When following a `.decrease` assertion in the chain, `.by` asserts that the + * subject of the `.decrease` assertion decreased by the given `delta`. + * + * var myObj = {val: 1} + * , subtractTwo = function () { myObj.val -= 2; }; + * + * expect(subtractTwo).to.decrease(myObj, 'val').by(2); + * + * When following a `.change` assertion in the chain, `.by` asserts that the + * subject of the `.change` assertion either increased or decreased by the + * given `delta`. However, it's dangerous to use `.change.by`. The problem is + * that it creates uncertain expectations. It's often best to identify the + * exact output that's expected, and then write an assertion that only accepts + * that exact output. + * + * var myObj = {val: 1} + * , addTwo = function () { myObj.val += 2; } + * , subtractTwo = function () { myObj.val -= 2; }; + * + * expect(addTwo).to.increase(myObj, 'val').by(2); // Recommended + * expect(addTwo).to.change(myObj, 'val').by(2); // Not recommended + * + * expect(subtractTwo).to.decrease(myObj, 'val').by(2); // Recommended + * expect(subtractTwo).to.change(myObj, 'val').by(2); // Not recommended + * + * Add `.not` earlier in the chain to negate `.by`. However, it's often best + * to assert that the subject changed by its expected delta, rather than + * asserting that it didn't change by one of countless unexpected deltas. + * + * var myObj = {val: 1} + * , addTwo = function () { myObj.val += 2; }; + * + * // Recommended + * expect(addTwo).to.increase(myObj, 'val').by(2); + * + * // Not recommended + * expect(addTwo).to.increase(myObj, 'val').but.not.by(3); + * + * `.by` accepts an optional `msg` argument which is a custom error message to + * show when the assertion fails. The message can also be given as the second + * argument to `expect`. + * + * var myObj = {val: 1} + * , addTwo = function () { myObj.val += 2; }; + * + * expect(addTwo).to.increase(myObj, 'val').by(3, 'nooo why fail??'); + * expect(addTwo, 'nooo why fail??').to.increase(myObj, 'val').by(3); + * + * @name by + * @param {Number} delta + * @param {String} msg _optional_ + * @namespace BDD + * @api public + */ + + function assertDelta(delta, msg) { + if (msg) flag(this, 'message', msg); + + var msgObj = flag(this, 'deltaMsgObj'); + var initial = flag(this, 'initialDeltaValue'); + var final = flag(this, 'finalDeltaValue'); + var behavior = flag(this, 'deltaBehavior'); + var realDelta = flag(this, 'realDelta'); + + var expression; + if (behavior === 'change') { + expression = Math.abs(final - initial) === Math.abs(delta); + } else { + expression = realDelta === Math.abs(delta); + } + + this.assert( + expression + , 'expected ' + msgObj + ' to ' + behavior + ' by ' + delta + , 'expected ' + msgObj + ' to not ' + behavior + ' by ' + delta + ); + } + + Assertion.addMethod('by', assertDelta); + + /** + * ### .extensible + * + * Asserts that the target is extensible, which means that new properties can + * be added to it. Primitives are never extensible. + * + * expect({a: 1}).to.be.extensible; + * + * Add `.not` earlier in the chain to negate `.extensible`. + * + * var nonExtensibleObject = Object.preventExtensions({}) + * , sealedObject = Object.seal({}) + * , frozenObject = Object.freeze({}); + * + * expect(nonExtensibleObject).to.not.be.extensible; + * expect(sealedObject).to.not.be.extensible; + * expect(frozenObject).to.not.be.extensible; + * expect(1).to.not.be.extensible; + * + * A custom error message can be given as the second argument to `expect`. + * + * expect(1, 'nooo why fail??').to.be.extensible; + * + * @name extensible + * @namespace BDD + * @api public + */ + + Assertion.addProperty('extensible', function() { + var obj = flag(this, 'object'); + + // In ES5, if the argument to this method is a primitive, then it will cause a TypeError. + // In ES6, a non-object argument will be treated as if it was a non-extensible ordinary object, simply return false. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible + // The following provides ES6 behavior for ES5 environments. + + var isExtensible = obj === Object(obj) && Object.isExtensible(obj); + + this.assert( + isExtensible + , 'expected #{this} to be extensible' + , 'expected #{this} to not be extensible' + ); + }); + + /** + * ### .sealed + * + * Asserts that the target is sealed, which means that new properties can't be + * added to it, and its existing properties can't be reconfigured or deleted. + * However, it's possible that its existing properties can still be reassigned + * to different values. Primitives are always sealed. + * + * var sealedObject = Object.seal({}); + * var frozenObject = Object.freeze({}); + * + * expect(sealedObject).to.be.sealed; + * expect(frozenObject).to.be.sealed; + * expect(1).to.be.sealed; + * + * Add `.not` earlier in the chain to negate `.sealed`. + * + * expect({a: 1}).to.not.be.sealed; + * + * A custom error message can be given as the second argument to `expect`. + * + * expect({a: 1}, 'nooo why fail??').to.be.sealed; + * + * @name sealed + * @namespace BDD + * @api public + */ + + Assertion.addProperty('sealed', function() { + var obj = flag(this, 'object'); + + // In ES5, if the argument to this method is a primitive, then it will cause a TypeError. + // In ES6, a non-object argument will be treated as if it was a sealed ordinary object, simply return true. + // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isSealed + // The following provides ES6 behavior for ES5 environments. + + var isSealed = obj === Object(obj) ? Object.isSealed(obj) : true; + + this.assert( + isSealed + , 'expected #{this} to be sealed' + , 'expected #{this} to not be sealed' + ); + }); + + /** + * ### .frozen + * + * Asserts that the target is frozen, which means that new properties can't be + * added to it, and its existing properties can't be reassigned to different + * values, reconfigured, or deleted. Primitives are always frozen. + * + * var frozenObject = Object.freeze({}); + * + * expect(frozenObject).to.be.frozen; + * expect(1).to.be.frozen; + * + * Add `.not` earlier in the chain to negate `.frozen`. + * + * expect({a: 1}).to.not.be.frozen; + * + * A custom error message can be given as the second argument to `expect`. + * + * expect({a: 1}, 'nooo why fail??').to.be.frozen; + * + * @name frozen + * @namespace BDD + * @api public + */ + + Assertion.addProperty('frozen', function() { + var obj = flag(this, 'object'); + + // In ES5, if the argument to this method is a primitive, then it will cause a TypeError. + // In ES6, a non-object argument will be treated as if it was a frozen ordinary object, simply return true. + // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isFrozen + // The following provides ES6 behavior for ES5 environments. + + var isFrozen = obj === Object(obj) ? Object.isFrozen(obj) : true; + + this.assert( + isFrozen + , 'expected #{this} to be frozen' + , 'expected #{this} to not be frozen' + ); + }); + + /** + * ### .finite + * + * Asserts that the target is a number, and isn't `NaN` or positive/negative + * `Infinity`. + * + * expect(1).to.be.finite; + * + * Add `.not` earlier in the chain to negate `.finite`. However, it's + * dangerous to do so. The problem is that it creates uncertain expectations + * by asserting that the subject either isn't a number, or that it's `NaN`, or + * that it's positive `Infinity`, or that it's negative `Infinity`. It's often + * best to identify the exact output that's expected, and then write an + * assertion that only accepts that exact output. + * + * When the target isn't expected to be a number, it's often best to assert + * that it's the expected type, rather than asserting that it isn't one of + * many unexpected types. + * + * expect('foo').to.be.a('string'); // Recommended + * expect('foo').to.not.be.finite; // Not recommended + * + * When the target is expected to be `NaN`, it's often best to assert exactly + * that. + * + * expect(NaN).to.be.NaN; // Recommended + * expect(NaN).to.not.be.finite; // Not recommended + * + * When the target is expected to be positive infinity, it's often best to + * assert exactly that. + * + * expect(Infinity).to.equal(Infinity); // Recommended + * expect(Infinity).to.not.be.finite; // Not recommended + * + * When the target is expected to be negative infinity, it's often best to + * assert exactly that. + * + * expect(-Infinity).to.equal(-Infinity); // Recommended + * expect(-Infinity).to.not.be.finite; // Not recommended + * + * A custom error message can be given as the second argument to `expect`. + * + * expect('foo', 'nooo why fail??').to.be.finite; + * + * @name finite + * @namespace BDD + * @api public + */ + + Assertion.addProperty('finite', function(msg) { + var obj = flag(this, 'object'); + + this.assert( + typeof obj === 'number' && isFinite(obj) + , 'expected #{this} to be a finite number' + , 'expected #{this} to not be a finite number' + ); + }); +}; diff --git a/node_modules/chai/lib/chai/interface/assert.js b/node_modules/chai/lib/chai/interface/assert.js new file mode 100644 index 00000000..2099c9b6 --- /dev/null +++ b/node_modules/chai/lib/chai/interface/assert.js @@ -0,0 +1,3113 @@ +/*! + * chai + * Copyright(c) 2011-2014 Jake Luer + * MIT Licensed + */ + +module.exports = function (chai, util) { + /*! + * Chai dependencies. + */ + + var Assertion = chai.Assertion + , flag = util.flag; + + /*! + * Module export. + */ + + /** + * ### assert(expression, message) + * + * Write your own test expressions. + * + * assert('foo' !== 'bar', 'foo is not bar'); + * assert(Array.isArray([]), 'empty arrays are arrays'); + * + * @param {Mixed} expression to test for truthiness + * @param {String} message to display on error + * @name assert + * @namespace Assert + * @api public + */ + + var assert = chai.assert = function (express, errmsg) { + var test = new Assertion(null, null, chai.assert, true); + test.assert( + express + , errmsg + , '[ negation message unavailable ]' + ); + }; + + /** + * ### .fail([message]) + * ### .fail(actual, expected, [message], [operator]) + * + * Throw a failure. Node.js `assert` module-compatible. + * + * assert.fail(); + * assert.fail("custom error message"); + * assert.fail(1, 2); + * assert.fail(1, 2, "custom error message"); + * assert.fail(1, 2, "custom error message", ">"); + * assert.fail(1, 2, undefined, ">"); + * + * @name fail + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @param {String} operator + * @namespace Assert + * @api public + */ + + assert.fail = function (actual, expected, message, operator) { + if (arguments.length < 2) { + // Comply with Node's fail([message]) interface + + message = actual; + actual = undefined; + } + + message = message || 'assert.fail()'; + throw new chai.AssertionError(message, { + actual: actual + , expected: expected + , operator: operator + }, assert.fail); + }; + + /** + * ### .isOk(object, [message]) + * + * Asserts that `object` is truthy. + * + * assert.isOk('everything', 'everything is ok'); + * assert.isOk(false, 'this will fail'); + * + * @name isOk + * @alias ok + * @param {Mixed} object to test + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isOk = function (val, msg) { + new Assertion(val, msg, assert.isOk, true).is.ok; + }; + + /** + * ### .isNotOk(object, [message]) + * + * Asserts that `object` is falsy. + * + * assert.isNotOk('everything', 'this will fail'); + * assert.isNotOk(false, 'this will pass'); + * + * @name isNotOk + * @alias notOk + * @param {Mixed} object to test + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNotOk = function (val, msg) { + new Assertion(val, msg, assert.isNotOk, true).is.not.ok; + }; + + /** + * ### .equal(actual, expected, [message]) + * + * Asserts non-strict equality (`==`) of `actual` and `expected`. + * + * assert.equal(3, '3', '== coerces values to strings'); + * + * @name equal + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.equal = function (act, exp, msg) { + var test = new Assertion(act, msg, assert.equal, true); + + test.assert( + exp == flag(test, 'object') + , 'expected #{this} to equal #{exp}' + , 'expected #{this} to not equal #{act}' + , exp + , act + , true + ); + }; + + /** + * ### .notEqual(actual, expected, [message]) + * + * Asserts non-strict inequality (`!=`) of `actual` and `expected`. + * + * assert.notEqual(3, 4, 'these numbers are not equal'); + * + * @name notEqual + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notEqual = function (act, exp, msg) { + var test = new Assertion(act, msg, assert.notEqual, true); + + test.assert( + exp != flag(test, 'object') + , 'expected #{this} to not equal #{exp}' + , 'expected #{this} to equal #{act}' + , exp + , act + , true + ); + }; + + /** + * ### .strictEqual(actual, expected, [message]) + * + * Asserts strict equality (`===`) of `actual` and `expected`. + * + * assert.strictEqual(true, true, 'these booleans are strictly equal'); + * + * @name strictEqual + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.strictEqual = function (act, exp, msg) { + new Assertion(act, msg, assert.strictEqual, true).to.equal(exp); + }; + + /** + * ### .notStrictEqual(actual, expected, [message]) + * + * Asserts strict inequality (`!==`) of `actual` and `expected`. + * + * assert.notStrictEqual(3, '3', 'no coercion for strict equality'); + * + * @name notStrictEqual + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notStrictEqual = function (act, exp, msg) { + new Assertion(act, msg, assert.notStrictEqual, true).to.not.equal(exp); + }; + + /** + * ### .deepEqual(actual, expected, [message]) + * + * Asserts that `actual` is deeply equal to `expected`. + * + * assert.deepEqual({ tea: 'green' }, { tea: 'green' }); + * + * @name deepEqual + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @alias deepStrictEqual + * @namespace Assert + * @api public + */ + + assert.deepEqual = assert.deepStrictEqual = function (act, exp, msg) { + new Assertion(act, msg, assert.deepEqual, true).to.eql(exp); + }; + + /** + * ### .notDeepEqual(actual, expected, [message]) + * + * Assert that `actual` is not deeply equal to `expected`. + * + * assert.notDeepEqual({ tea: 'green' }, { tea: 'jasmine' }); + * + * @name notDeepEqual + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notDeepEqual = function (act, exp, msg) { + new Assertion(act, msg, assert.notDeepEqual, true).to.not.eql(exp); + }; + + /** + * ### .isAbove(valueToCheck, valueToBeAbove, [message]) + * + * Asserts `valueToCheck` is strictly greater than (>) `valueToBeAbove`. + * + * assert.isAbove(5, 2, '5 is strictly greater than 2'); + * + * @name isAbove + * @param {Mixed} valueToCheck + * @param {Mixed} valueToBeAbove + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isAbove = function (val, abv, msg) { + new Assertion(val, msg, assert.isAbove, true).to.be.above(abv); + }; + + /** + * ### .isAtLeast(valueToCheck, valueToBeAtLeast, [message]) + * + * Asserts `valueToCheck` is greater than or equal to (>=) `valueToBeAtLeast`. + * + * assert.isAtLeast(5, 2, '5 is greater or equal to 2'); + * assert.isAtLeast(3, 3, '3 is greater or equal to 3'); + * + * @name isAtLeast + * @param {Mixed} valueToCheck + * @param {Mixed} valueToBeAtLeast + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isAtLeast = function (val, atlst, msg) { + new Assertion(val, msg, assert.isAtLeast, true).to.be.least(atlst); + }; + + /** + * ### .isBelow(valueToCheck, valueToBeBelow, [message]) + * + * Asserts `valueToCheck` is strictly less than (<) `valueToBeBelow`. + * + * assert.isBelow(3, 6, '3 is strictly less than 6'); + * + * @name isBelow + * @param {Mixed} valueToCheck + * @param {Mixed} valueToBeBelow + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isBelow = function (val, blw, msg) { + new Assertion(val, msg, assert.isBelow, true).to.be.below(blw); + }; + + /** + * ### .isAtMost(valueToCheck, valueToBeAtMost, [message]) + * + * Asserts `valueToCheck` is less than or equal to (<=) `valueToBeAtMost`. + * + * assert.isAtMost(3, 6, '3 is less than or equal to 6'); + * assert.isAtMost(4, 4, '4 is less than or equal to 4'); + * + * @name isAtMost + * @param {Mixed} valueToCheck + * @param {Mixed} valueToBeAtMost + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isAtMost = function (val, atmst, msg) { + new Assertion(val, msg, assert.isAtMost, true).to.be.most(atmst); + }; + + /** + * ### .isTrue(value, [message]) + * + * Asserts that `value` is true. + * + * var teaServed = true; + * assert.isTrue(teaServed, 'the tea has been served'); + * + * @name isTrue + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isTrue = function (val, msg) { + new Assertion(val, msg, assert.isTrue, true).is['true']; + }; + + /** + * ### .isNotTrue(value, [message]) + * + * Asserts that `value` is not true. + * + * var tea = 'tasty chai'; + * assert.isNotTrue(tea, 'great, time for tea!'); + * + * @name isNotTrue + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNotTrue = function (val, msg) { + new Assertion(val, msg, assert.isNotTrue, true).to.not.equal(true); + }; + + /** + * ### .isFalse(value, [message]) + * + * Asserts that `value` is false. + * + * var teaServed = false; + * assert.isFalse(teaServed, 'no tea yet? hmm...'); + * + * @name isFalse + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isFalse = function (val, msg) { + new Assertion(val, msg, assert.isFalse, true).is['false']; + }; + + /** + * ### .isNotFalse(value, [message]) + * + * Asserts that `value` is not false. + * + * var tea = 'tasty chai'; + * assert.isNotFalse(tea, 'great, time for tea!'); + * + * @name isNotFalse + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNotFalse = function (val, msg) { + new Assertion(val, msg, assert.isNotFalse, true).to.not.equal(false); + }; + + /** + * ### .isNull(value, [message]) + * + * Asserts that `value` is null. + * + * assert.isNull(err, 'there was no error'); + * + * @name isNull + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNull = function (val, msg) { + new Assertion(val, msg, assert.isNull, true).to.equal(null); + }; + + /** + * ### .isNotNull(value, [message]) + * + * Asserts that `value` is not null. + * + * var tea = 'tasty chai'; + * assert.isNotNull(tea, 'great, time for tea!'); + * + * @name isNotNull + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNotNull = function (val, msg) { + new Assertion(val, msg, assert.isNotNull, true).to.not.equal(null); + }; + + /** + * ### .isNaN + * + * Asserts that value is NaN. + * + * assert.isNaN(NaN, 'NaN is NaN'); + * + * @name isNaN + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNaN = function (val, msg) { + new Assertion(val, msg, assert.isNaN, true).to.be.NaN; + }; + + /** + * ### .isNotNaN + * + * Asserts that value is not NaN. + * + * assert.isNotNaN(4, '4 is not NaN'); + * + * @name isNotNaN + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + assert.isNotNaN = function (val, msg) { + new Assertion(val, msg, assert.isNotNaN, true).not.to.be.NaN; + }; + + /** + * ### .exists + * + * Asserts that the target is neither `null` nor `undefined`. + * + * var foo = 'hi'; + * + * assert.exists(foo, 'foo is neither `null` nor `undefined`'); + * + * @name exists + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.exists = function (val, msg) { + new Assertion(val, msg, assert.exists, true).to.exist; + }; + + /** + * ### .notExists + * + * Asserts that the target is either `null` or `undefined`. + * + * var bar = null + * , baz; + * + * assert.notExists(bar); + * assert.notExists(baz, 'baz is either null or undefined'); + * + * @name notExists + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notExists = function (val, msg) { + new Assertion(val, msg, assert.notExists, true).to.not.exist; + }; + + /** + * ### .isUndefined(value, [message]) + * + * Asserts that `value` is `undefined`. + * + * var tea; + * assert.isUndefined(tea, 'no tea defined'); + * + * @name isUndefined + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isUndefined = function (val, msg) { + new Assertion(val, msg, assert.isUndefined, true).to.equal(undefined); + }; + + /** + * ### .isDefined(value, [message]) + * + * Asserts that `value` is not `undefined`. + * + * var tea = 'cup of chai'; + * assert.isDefined(tea, 'tea has been defined'); + * + * @name isDefined + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isDefined = function (val, msg) { + new Assertion(val, msg, assert.isDefined, true).to.not.equal(undefined); + }; + + /** + * ### .isFunction(value, [message]) + * + * Asserts that `value` is a function. + * + * function serveTea() { return 'cup of tea'; }; + * assert.isFunction(serveTea, 'great, we can have tea now'); + * + * @name isFunction + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isFunction = function (val, msg) { + new Assertion(val, msg, assert.isFunction, true).to.be.a('function'); + }; + + /** + * ### .isNotFunction(value, [message]) + * + * Asserts that `value` is _not_ a function. + * + * var serveTea = [ 'heat', 'pour', 'sip' ]; + * assert.isNotFunction(serveTea, 'great, we have listed the steps'); + * + * @name isNotFunction + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNotFunction = function (val, msg) { + new Assertion(val, msg, assert.isNotFunction, true).to.not.be.a('function'); + }; + + /** + * ### .isObject(value, [message]) + * + * Asserts that `value` is an object of type 'Object' (as revealed by `Object.prototype.toString`). + * _The assertion does not match subclassed objects._ + * + * var selection = { name: 'Chai', serve: 'with spices' }; + * assert.isObject(selection, 'tea selection is an object'); + * + * @name isObject + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isObject = function (val, msg) { + new Assertion(val, msg, assert.isObject, true).to.be.a('object'); + }; + + /** + * ### .isNotObject(value, [message]) + * + * Asserts that `value` is _not_ an object of type 'Object' (as revealed by `Object.prototype.toString`). + * + * var selection = 'chai' + * assert.isNotObject(selection, 'tea selection is not an object'); + * assert.isNotObject(null, 'null is not an object'); + * + * @name isNotObject + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNotObject = function (val, msg) { + new Assertion(val, msg, assert.isNotObject, true).to.not.be.a('object'); + }; + + /** + * ### .isArray(value, [message]) + * + * Asserts that `value` is an array. + * + * var menu = [ 'green', 'chai', 'oolong' ]; + * assert.isArray(menu, 'what kind of tea do we want?'); + * + * @name isArray + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isArray = function (val, msg) { + new Assertion(val, msg, assert.isArray, true).to.be.an('array'); + }; + + /** + * ### .isNotArray(value, [message]) + * + * Asserts that `value` is _not_ an array. + * + * var menu = 'green|chai|oolong'; + * assert.isNotArray(menu, 'what kind of tea do we want?'); + * + * @name isNotArray + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNotArray = function (val, msg) { + new Assertion(val, msg, assert.isNotArray, true).to.not.be.an('array'); + }; + + /** + * ### .isString(value, [message]) + * + * Asserts that `value` is a string. + * + * var teaOrder = 'chai'; + * assert.isString(teaOrder, 'order placed'); + * + * @name isString + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isString = function (val, msg) { + new Assertion(val, msg, assert.isString, true).to.be.a('string'); + }; + + /** + * ### .isNotString(value, [message]) + * + * Asserts that `value` is _not_ a string. + * + * var teaOrder = 4; + * assert.isNotString(teaOrder, 'order placed'); + * + * @name isNotString + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNotString = function (val, msg) { + new Assertion(val, msg, assert.isNotString, true).to.not.be.a('string'); + }; + + /** + * ### .isNumber(value, [message]) + * + * Asserts that `value` is a number. + * + * var cups = 2; + * assert.isNumber(cups, 'how many cups'); + * + * @name isNumber + * @param {Number} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNumber = function (val, msg) { + new Assertion(val, msg, assert.isNumber, true).to.be.a('number'); + }; + + /** + * ### .isNotNumber(value, [message]) + * + * Asserts that `value` is _not_ a number. + * + * var cups = '2 cups please'; + * assert.isNotNumber(cups, 'how many cups'); + * + * @name isNotNumber + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNotNumber = function (val, msg) { + new Assertion(val, msg, assert.isNotNumber, true).to.not.be.a('number'); + }; + + /** + * ### .isFinite(value, [message]) + * + * Asserts that `value` is a finite number. Unlike `.isNumber`, this will fail for `NaN` and `Infinity`. + * + * var cups = 2; + * assert.isFinite(cups, 'how many cups'); + * + * assert.isFinite(NaN); // throws + * + * @name isFinite + * @param {Number} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isFinite = function (val, msg) { + new Assertion(val, msg, assert.isFinite, true).to.be.finite; + }; + + /** + * ### .isBoolean(value, [message]) + * + * Asserts that `value` is a boolean. + * + * var teaReady = true + * , teaServed = false; + * + * assert.isBoolean(teaReady, 'is the tea ready'); + * assert.isBoolean(teaServed, 'has tea been served'); + * + * @name isBoolean + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isBoolean = function (val, msg) { + new Assertion(val, msg, assert.isBoolean, true).to.be.a('boolean'); + }; + + /** + * ### .isNotBoolean(value, [message]) + * + * Asserts that `value` is _not_ a boolean. + * + * var teaReady = 'yep' + * , teaServed = 'nope'; + * + * assert.isNotBoolean(teaReady, 'is the tea ready'); + * assert.isNotBoolean(teaServed, 'has tea been served'); + * + * @name isNotBoolean + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.isNotBoolean = function (val, msg) { + new Assertion(val, msg, assert.isNotBoolean, true).to.not.be.a('boolean'); + }; + + /** + * ### .typeOf(value, name, [message]) + * + * Asserts that `value`'s type is `name`, as determined by + * `Object.prototype.toString`. + * + * assert.typeOf({ tea: 'chai' }, 'object', 'we have an object'); + * assert.typeOf(['chai', 'jasmine'], 'array', 'we have an array'); + * assert.typeOf('tea', 'string', 'we have a string'); + * assert.typeOf(/tea/, 'regexp', 'we have a regular expression'); + * assert.typeOf(null, 'null', 'we have a null'); + * assert.typeOf(undefined, 'undefined', 'we have an undefined'); + * + * @name typeOf + * @param {Mixed} value + * @param {String} name + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.typeOf = function (val, type, msg) { + new Assertion(val, msg, assert.typeOf, true).to.be.a(type); + }; + + /** + * ### .notTypeOf(value, name, [message]) + * + * Asserts that `value`'s type is _not_ `name`, as determined by + * `Object.prototype.toString`. + * + * assert.notTypeOf('tea', 'number', 'strings are not numbers'); + * + * @name notTypeOf + * @param {Mixed} value + * @param {String} typeof name + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notTypeOf = function (val, type, msg) { + new Assertion(val, msg, assert.notTypeOf, true).to.not.be.a(type); + }; + + /** + * ### .instanceOf(object, constructor, [message]) + * + * Asserts that `value` is an instance of `constructor`. + * + * var Tea = function (name) { this.name = name; } + * , chai = new Tea('chai'); + * + * assert.instanceOf(chai, Tea, 'chai is an instance of tea'); + * + * @name instanceOf + * @param {Object} object + * @param {Constructor} constructor + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.instanceOf = function (val, type, msg) { + new Assertion(val, msg, assert.instanceOf, true).to.be.instanceOf(type); + }; + + /** + * ### .notInstanceOf(object, constructor, [message]) + * + * Asserts `value` is not an instance of `constructor`. + * + * var Tea = function (name) { this.name = name; } + * , chai = new String('chai'); + * + * assert.notInstanceOf(chai, Tea, 'chai is not an instance of tea'); + * + * @name notInstanceOf + * @param {Object} object + * @param {Constructor} constructor + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notInstanceOf = function (val, type, msg) { + new Assertion(val, msg, assert.notInstanceOf, true) + .to.not.be.instanceOf(type); + }; + + /** + * ### .include(haystack, needle, [message]) + * + * Asserts that `haystack` includes `needle`. Can be used to assert the + * inclusion of a value in an array, a substring in a string, or a subset of + * properties in an object. + * + * assert.include([1,2,3], 2, 'array contains value'); + * assert.include('foobar', 'foo', 'string contains substring'); + * assert.include({ foo: 'bar', hello: 'universe' }, { foo: 'bar' }, 'object contains property'); + * + * Strict equality (===) is used. When asserting the inclusion of a value in + * an array, the array is searched for an element that's strictly equal to the + * given value. When asserting a subset of properties in an object, the object + * is searched for the given property keys, checking that each one is present + * and strictly equal to the given property value. For instance: + * + * var obj1 = {a: 1} + * , obj2 = {b: 2}; + * assert.include([obj1, obj2], obj1); + * assert.include({foo: obj1, bar: obj2}, {foo: obj1}); + * assert.include({foo: obj1, bar: obj2}, {foo: obj1, bar: obj2}); + * + * @name include + * @param {Array|String} haystack + * @param {Mixed} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.include = function (exp, inc, msg) { + new Assertion(exp, msg, assert.include, true).include(inc); + }; + + /** + * ### .notInclude(haystack, needle, [message]) + * + * Asserts that `haystack` does not include `needle`. Can be used to assert + * the absence of a value in an array, a substring in a string, or a subset of + * properties in an object. + * + * assert.notInclude([1,2,3], 4, "array doesn't contain value"); + * assert.notInclude('foobar', 'baz', "string doesn't contain substring"); + * assert.notInclude({ foo: 'bar', hello: 'universe' }, { foo: 'baz' }, 'object doesn't contain property'); + * + * Strict equality (===) is used. When asserting the absence of a value in an + * array, the array is searched to confirm the absence of an element that's + * strictly equal to the given value. When asserting a subset of properties in + * an object, the object is searched to confirm that at least one of the given + * property keys is either not present or not strictly equal to the given + * property value. For instance: + * + * var obj1 = {a: 1} + * , obj2 = {b: 2}; + * assert.notInclude([obj1, obj2], {a: 1}); + * assert.notInclude({foo: obj1, bar: obj2}, {foo: {a: 1}}); + * assert.notInclude({foo: obj1, bar: obj2}, {foo: obj1, bar: {b: 2}}); + * + * @name notInclude + * @param {Array|String} haystack + * @param {Mixed} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notInclude = function (exp, inc, msg) { + new Assertion(exp, msg, assert.notInclude, true).not.include(inc); + }; + + /** + * ### .deepInclude(haystack, needle, [message]) + * + * Asserts that `haystack` includes `needle`. Can be used to assert the + * inclusion of a value in an array or a subset of properties in an object. + * Deep equality is used. + * + * var obj1 = {a: 1} + * , obj2 = {b: 2}; + * assert.deepInclude([obj1, obj2], {a: 1}); + * assert.deepInclude({foo: obj1, bar: obj2}, {foo: {a: 1}}); + * assert.deepInclude({foo: obj1, bar: obj2}, {foo: {a: 1}, bar: {b: 2}}); + * + * @name deepInclude + * @param {Array|String} haystack + * @param {Mixed} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.deepInclude = function (exp, inc, msg) { + new Assertion(exp, msg, assert.deepInclude, true).deep.include(inc); + }; + + /** + * ### .notDeepInclude(haystack, needle, [message]) + * + * Asserts that `haystack` does not include `needle`. Can be used to assert + * the absence of a value in an array or a subset of properties in an object. + * Deep equality is used. + * + * var obj1 = {a: 1} + * , obj2 = {b: 2}; + * assert.notDeepInclude([obj1, obj2], {a: 9}); + * assert.notDeepInclude({foo: obj1, bar: obj2}, {foo: {a: 9}}); + * assert.notDeepInclude({foo: obj1, bar: obj2}, {foo: {a: 1}, bar: {b: 9}}); + * + * @name notDeepInclude + * @param {Array|String} haystack + * @param {Mixed} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notDeepInclude = function (exp, inc, msg) { + new Assertion(exp, msg, assert.notDeepInclude, true).not.deep.include(inc); + }; + + /** + * ### .nestedInclude(haystack, needle, [message]) + * + * Asserts that 'haystack' includes 'needle'. + * Can be used to assert the inclusion of a subset of properties in an + * object. + * Enables the use of dot- and bracket-notation for referencing nested + * properties. + * '[]' and '.' in property names can be escaped using double backslashes. + * + * assert.nestedInclude({'.a': {'b': 'x'}}, {'\\.a.[b]': 'x'}); + * assert.nestedInclude({'a': {'[b]': 'x'}}, {'a.\\[b\\]': 'x'}); + * + * @name nestedInclude + * @param {Object} haystack + * @param {Object} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.nestedInclude = function (exp, inc, msg) { + new Assertion(exp, msg, assert.nestedInclude, true).nested.include(inc); + }; + + /** + * ### .notNestedInclude(haystack, needle, [message]) + * + * Asserts that 'haystack' does not include 'needle'. + * Can be used to assert the absence of a subset of properties in an + * object. + * Enables the use of dot- and bracket-notation for referencing nested + * properties. + * '[]' and '.' in property names can be escaped using double backslashes. + * + * assert.notNestedInclude({'.a': {'b': 'x'}}, {'\\.a.b': 'y'}); + * assert.notNestedInclude({'a': {'[b]': 'x'}}, {'a.\\[b\\]': 'y'}); + * + * @name notNestedInclude + * @param {Object} haystack + * @param {Object} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notNestedInclude = function (exp, inc, msg) { + new Assertion(exp, msg, assert.notNestedInclude, true) + .not.nested.include(inc); + }; + + /** + * ### .deepNestedInclude(haystack, needle, [message]) + * + * Asserts that 'haystack' includes 'needle'. + * Can be used to assert the inclusion of a subset of properties in an + * object while checking for deep equality. + * Enables the use of dot- and bracket-notation for referencing nested + * properties. + * '[]' and '.' in property names can be escaped using double backslashes. + * + * assert.deepNestedInclude({a: {b: [{x: 1}]}}, {'a.b[0]': {x: 1}}); + * assert.deepNestedInclude({'.a': {'[b]': {x: 1}}}, {'\\.a.\\[b\\]': {x: 1}}); + * + * @name deepNestedInclude + * @param {Object} haystack + * @param {Object} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.deepNestedInclude = function(exp, inc, msg) { + new Assertion(exp, msg, assert.deepNestedInclude, true) + .deep.nested.include(inc); + }; + + /** + * ### .notDeepNestedInclude(haystack, needle, [message]) + * + * Asserts that 'haystack' does not include 'needle'. + * Can be used to assert the absence of a subset of properties in an + * object while checking for deep equality. + * Enables the use of dot- and bracket-notation for referencing nested + * properties. + * '[]' and '.' in property names can be escaped using double backslashes. + * + * assert.notDeepNestedInclude({a: {b: [{x: 1}]}}, {'a.b[0]': {y: 1}}) + * assert.notDeepNestedInclude({'.a': {'[b]': {x: 1}}}, {'\\.a.\\[b\\]': {y: 2}}); + * + * @name notDeepNestedInclude + * @param {Object} haystack + * @param {Object} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notDeepNestedInclude = function(exp, inc, msg) { + new Assertion(exp, msg, assert.notDeepNestedInclude, true) + .not.deep.nested.include(inc); + }; + + /** + * ### .ownInclude(haystack, needle, [message]) + * + * Asserts that 'haystack' includes 'needle'. + * Can be used to assert the inclusion of a subset of properties in an + * object while ignoring inherited properties. + * + * assert.ownInclude({ a: 1 }, { a: 1 }); + * + * @name ownInclude + * @param {Object} haystack + * @param {Object} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.ownInclude = function(exp, inc, msg) { + new Assertion(exp, msg, assert.ownInclude, true).own.include(inc); + }; + + /** + * ### .notOwnInclude(haystack, needle, [message]) + * + * Asserts that 'haystack' includes 'needle'. + * Can be used to assert the absence of a subset of properties in an + * object while ignoring inherited properties. + * + * Object.prototype.b = 2; + * + * assert.notOwnInclude({ a: 1 }, { b: 2 }); + * + * @name notOwnInclude + * @param {Object} haystack + * @param {Object} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notOwnInclude = function(exp, inc, msg) { + new Assertion(exp, msg, assert.notOwnInclude, true).not.own.include(inc); + }; + + /** + * ### .deepOwnInclude(haystack, needle, [message]) + * + * Asserts that 'haystack' includes 'needle'. + * Can be used to assert the inclusion of a subset of properties in an + * object while ignoring inherited properties and checking for deep equality. + * + * assert.deepOwnInclude({a: {b: 2}}, {a: {b: 2}}); + * + * @name deepOwnInclude + * @param {Object} haystack + * @param {Object} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.deepOwnInclude = function(exp, inc, msg) { + new Assertion(exp, msg, assert.deepOwnInclude, true) + .deep.own.include(inc); + }; + + /** + * ### .notDeepOwnInclude(haystack, needle, [message]) + * + * Asserts that 'haystack' includes 'needle'. + * Can be used to assert the absence of a subset of properties in an + * object while ignoring inherited properties and checking for deep equality. + * + * assert.notDeepOwnInclude({a: {b: 2}}, {a: {c: 3}}); + * + * @name notDeepOwnInclude + * @param {Object} haystack + * @param {Object} needle + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notDeepOwnInclude = function(exp, inc, msg) { + new Assertion(exp, msg, assert.notDeepOwnInclude, true) + .not.deep.own.include(inc); + }; + + /** + * ### .match(value, regexp, [message]) + * + * Asserts that `value` matches the regular expression `regexp`. + * + * assert.match('foobar', /^foo/, 'regexp matches'); + * + * @name match + * @param {Mixed} value + * @param {RegExp} regexp + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.match = function (exp, re, msg) { + new Assertion(exp, msg, assert.match, true).to.match(re); + }; + + /** + * ### .notMatch(value, regexp, [message]) + * + * Asserts that `value` does not match the regular expression `regexp`. + * + * assert.notMatch('foobar', /^foo/, 'regexp does not match'); + * + * @name notMatch + * @param {Mixed} value + * @param {RegExp} regexp + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notMatch = function (exp, re, msg) { + new Assertion(exp, msg, assert.notMatch, true).to.not.match(re); + }; + + /** + * ### .property(object, property, [message]) + * + * Asserts that `object` has a direct or inherited property named by + * `property`. + * + * assert.property({ tea: { green: 'matcha' }}, 'tea'); + * assert.property({ tea: { green: 'matcha' }}, 'toString'); + * + * @name property + * @param {Object} object + * @param {String} property + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.property = function (obj, prop, msg) { + new Assertion(obj, msg, assert.property, true).to.have.property(prop); + }; + + /** + * ### .notProperty(object, property, [message]) + * + * Asserts that `object` does _not_ have a direct or inherited property named + * by `property`. + * + * assert.notProperty({ tea: { green: 'matcha' }}, 'coffee'); + * + * @name notProperty + * @param {Object} object + * @param {String} property + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notProperty = function (obj, prop, msg) { + new Assertion(obj, msg, assert.notProperty, true) + .to.not.have.property(prop); + }; + + /** + * ### .propertyVal(object, property, value, [message]) + * + * Asserts that `object` has a direct or inherited property named by + * `property` with a value given by `value`. Uses a strict equality check + * (===). + * + * assert.propertyVal({ tea: 'is good' }, 'tea', 'is good'); + * + * @name propertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.propertyVal = function (obj, prop, val, msg) { + new Assertion(obj, msg, assert.propertyVal, true) + .to.have.property(prop, val); + }; + + /** + * ### .notPropertyVal(object, property, value, [message]) + * + * Asserts that `object` does _not_ have a direct or inherited property named + * by `property` with value given by `value`. Uses a strict equality check + * (===). + * + * assert.notPropertyVal({ tea: 'is good' }, 'tea', 'is bad'); + * assert.notPropertyVal({ tea: 'is good' }, 'coffee', 'is good'); + * + * @name notPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notPropertyVal = function (obj, prop, val, msg) { + new Assertion(obj, msg, assert.notPropertyVal, true) + .to.not.have.property(prop, val); + }; + + /** + * ### .deepPropertyVal(object, property, value, [message]) + * + * Asserts that `object` has a direct or inherited property named by + * `property` with a value given by `value`. Uses a deep equality check. + * + * assert.deepPropertyVal({ tea: { green: 'matcha' } }, 'tea', { green: 'matcha' }); + * + * @name deepPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.deepPropertyVal = function (obj, prop, val, msg) { + new Assertion(obj, msg, assert.deepPropertyVal, true) + .to.have.deep.property(prop, val); + }; + + /** + * ### .notDeepPropertyVal(object, property, value, [message]) + * + * Asserts that `object` does _not_ have a direct or inherited property named + * by `property` with value given by `value`. Uses a deep equality check. + * + * assert.notDeepPropertyVal({ tea: { green: 'matcha' } }, 'tea', { black: 'matcha' }); + * assert.notDeepPropertyVal({ tea: { green: 'matcha' } }, 'tea', { green: 'oolong' }); + * assert.notDeepPropertyVal({ tea: { green: 'matcha' } }, 'coffee', { green: 'matcha' }); + * + * @name notDeepPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notDeepPropertyVal = function (obj, prop, val, msg) { + new Assertion(obj, msg, assert.notDeepPropertyVal, true) + .to.not.have.deep.property(prop, val); + }; + + /** + * ### .ownProperty(object, property, [message]) + * + * Asserts that `object` has a direct property named by `property`. Inherited + * properties aren't checked. + * + * assert.ownProperty({ tea: { green: 'matcha' }}, 'tea'); + * + * @name ownProperty + * @param {Object} object + * @param {String} property + * @param {String} message + * @api public + */ + + assert.ownProperty = function (obj, prop, msg) { + new Assertion(obj, msg, assert.ownProperty, true) + .to.have.own.property(prop); + }; + + /** + * ### .notOwnProperty(object, property, [message]) + * + * Asserts that `object` does _not_ have a direct property named by + * `property`. Inherited properties aren't checked. + * + * assert.notOwnProperty({ tea: { green: 'matcha' }}, 'coffee'); + * assert.notOwnProperty({}, 'toString'); + * + * @name notOwnProperty + * @param {Object} object + * @param {String} property + * @param {String} message + * @api public + */ + + assert.notOwnProperty = function (obj, prop, msg) { + new Assertion(obj, msg, assert.notOwnProperty, true) + .to.not.have.own.property(prop); + }; + + /** + * ### .ownPropertyVal(object, property, value, [message]) + * + * Asserts that `object` has a direct property named by `property` and a value + * equal to the provided `value`. Uses a strict equality check (===). + * Inherited properties aren't checked. + * + * assert.ownPropertyVal({ coffee: 'is good'}, 'coffee', 'is good'); + * + * @name ownPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @api public + */ + + assert.ownPropertyVal = function (obj, prop, value, msg) { + new Assertion(obj, msg, assert.ownPropertyVal, true) + .to.have.own.property(prop, value); + }; + + /** + * ### .notOwnPropertyVal(object, property, value, [message]) + * + * Asserts that `object` does _not_ have a direct property named by `property` + * with a value equal to the provided `value`. Uses a strict equality check + * (===). Inherited properties aren't checked. + * + * assert.notOwnPropertyVal({ tea: 'is better'}, 'tea', 'is worse'); + * assert.notOwnPropertyVal({}, 'toString', Object.prototype.toString); + * + * @name notOwnPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @api public + */ + + assert.notOwnPropertyVal = function (obj, prop, value, msg) { + new Assertion(obj, msg, assert.notOwnPropertyVal, true) + .to.not.have.own.property(prop, value); + }; + + /** + * ### .deepOwnPropertyVal(object, property, value, [message]) + * + * Asserts that `object` has a direct property named by `property` and a value + * equal to the provided `value`. Uses a deep equality check. Inherited + * properties aren't checked. + * + * assert.deepOwnPropertyVal({ tea: { green: 'matcha' } }, 'tea', { green: 'matcha' }); + * + * @name deepOwnPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @api public + */ + + assert.deepOwnPropertyVal = function (obj, prop, value, msg) { + new Assertion(obj, msg, assert.deepOwnPropertyVal, true) + .to.have.deep.own.property(prop, value); + }; + + /** + * ### .notDeepOwnPropertyVal(object, property, value, [message]) + * + * Asserts that `object` does _not_ have a direct property named by `property` + * with a value equal to the provided `value`. Uses a deep equality check. + * Inherited properties aren't checked. + * + * assert.notDeepOwnPropertyVal({ tea: { green: 'matcha' } }, 'tea', { black: 'matcha' }); + * assert.notDeepOwnPropertyVal({ tea: { green: 'matcha' } }, 'tea', { green: 'oolong' }); + * assert.notDeepOwnPropertyVal({ tea: { green: 'matcha' } }, 'coffee', { green: 'matcha' }); + * assert.notDeepOwnPropertyVal({}, 'toString', Object.prototype.toString); + * + * @name notDeepOwnPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @api public + */ + + assert.notDeepOwnPropertyVal = function (obj, prop, value, msg) { + new Assertion(obj, msg, assert.notDeepOwnPropertyVal, true) + .to.not.have.deep.own.property(prop, value); + }; + + /** + * ### .nestedProperty(object, property, [message]) + * + * Asserts that `object` has a direct or inherited property named by + * `property`, which can be a string using dot- and bracket-notation for + * nested reference. + * + * assert.nestedProperty({ tea: { green: 'matcha' }}, 'tea.green'); + * + * @name nestedProperty + * @param {Object} object + * @param {String} property + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.nestedProperty = function (obj, prop, msg) { + new Assertion(obj, msg, assert.nestedProperty, true) + .to.have.nested.property(prop); + }; + + /** + * ### .notNestedProperty(object, property, [message]) + * + * Asserts that `object` does _not_ have a property named by `property`, which + * can be a string using dot- and bracket-notation for nested reference. The + * property cannot exist on the object nor anywhere in its prototype chain. + * + * assert.notNestedProperty({ tea: { green: 'matcha' }}, 'tea.oolong'); + * + * @name notNestedProperty + * @param {Object} object + * @param {String} property + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notNestedProperty = function (obj, prop, msg) { + new Assertion(obj, msg, assert.notNestedProperty, true) + .to.not.have.nested.property(prop); + }; + + /** + * ### .nestedPropertyVal(object, property, value, [message]) + * + * Asserts that `object` has a property named by `property` with value given + * by `value`. `property` can use dot- and bracket-notation for nested + * reference. Uses a strict equality check (===). + * + * assert.nestedPropertyVal({ tea: { green: 'matcha' }}, 'tea.green', 'matcha'); + * + * @name nestedPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.nestedPropertyVal = function (obj, prop, val, msg) { + new Assertion(obj, msg, assert.nestedPropertyVal, true) + .to.have.nested.property(prop, val); + }; + + /** + * ### .notNestedPropertyVal(object, property, value, [message]) + * + * Asserts that `object` does _not_ have a property named by `property` with + * value given by `value`. `property` can use dot- and bracket-notation for + * nested reference. Uses a strict equality check (===). + * + * assert.notNestedPropertyVal({ tea: { green: 'matcha' }}, 'tea.green', 'konacha'); + * assert.notNestedPropertyVal({ tea: { green: 'matcha' }}, 'coffee.green', 'matcha'); + * + * @name notNestedPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notNestedPropertyVal = function (obj, prop, val, msg) { + new Assertion(obj, msg, assert.notNestedPropertyVal, true) + .to.not.have.nested.property(prop, val); + }; + + /** + * ### .deepNestedPropertyVal(object, property, value, [message]) + * + * Asserts that `object` has a property named by `property` with a value given + * by `value`. `property` can use dot- and bracket-notation for nested + * reference. Uses a deep equality check. + * + * assert.deepNestedPropertyVal({ tea: { green: { matcha: 'yum' } } }, 'tea.green', { matcha: 'yum' }); + * + * @name deepNestedPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.deepNestedPropertyVal = function (obj, prop, val, msg) { + new Assertion(obj, msg, assert.deepNestedPropertyVal, true) + .to.have.deep.nested.property(prop, val); + }; + + /** + * ### .notDeepNestedPropertyVal(object, property, value, [message]) + * + * Asserts that `object` does _not_ have a property named by `property` with + * value given by `value`. `property` can use dot- and bracket-notation for + * nested reference. Uses a deep equality check. + * + * assert.notDeepNestedPropertyVal({ tea: { green: { matcha: 'yum' } } }, 'tea.green', { oolong: 'yum' }); + * assert.notDeepNestedPropertyVal({ tea: { green: { matcha: 'yum' } } }, 'tea.green', { matcha: 'yuck' }); + * assert.notDeepNestedPropertyVal({ tea: { green: { matcha: 'yum' } } }, 'tea.black', { matcha: 'yum' }); + * + * @name notDeepNestedPropertyVal + * @param {Object} object + * @param {String} property + * @param {Mixed} value + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notDeepNestedPropertyVal = function (obj, prop, val, msg) { + new Assertion(obj, msg, assert.notDeepNestedPropertyVal, true) + .to.not.have.deep.nested.property(prop, val); + } + + /** + * ### .lengthOf(object, length, [message]) + * + * Asserts that `object` has a `length` or `size` with the expected value. + * + * assert.lengthOf([1,2,3], 3, 'array has length of 3'); + * assert.lengthOf('foobar', 6, 'string has length of 6'); + * assert.lengthOf(new Set([1,2,3]), 3, 'set has size of 3'); + * assert.lengthOf(new Map([['a',1],['b',2],['c',3]]), 3, 'map has size of 3'); + * + * @name lengthOf + * @param {Mixed} object + * @param {Number} length + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.lengthOf = function (exp, len, msg) { + new Assertion(exp, msg, assert.lengthOf, true).to.have.lengthOf(len); + }; + + /** + * ### .hasAnyKeys(object, [keys], [message]) + * + * Asserts that `object` has at least one of the `keys` provided. + * You can also provide a single object instead of a `keys` array and its keys + * will be used as the expected set of keys. + * + * assert.hasAnyKeys({foo: 1, bar: 2, baz: 3}, ['foo', 'iDontExist', 'baz']); + * assert.hasAnyKeys({foo: 1, bar: 2, baz: 3}, {foo: 30, iDontExist: 99, baz: 1337}); + * assert.hasAnyKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{foo: 1}, 'key']); + * assert.hasAnyKeys(new Set([{foo: 'bar'}, 'anotherKey']), [{foo: 'bar'}, 'anotherKey']); + * + * @name hasAnyKeys + * @param {Mixed} object + * @param {Array|Object} keys + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.hasAnyKeys = function (obj, keys, msg) { + new Assertion(obj, msg, assert.hasAnyKeys, true).to.have.any.keys(keys); + } + + /** + * ### .hasAllKeys(object, [keys], [message]) + * + * Asserts that `object` has all and only all of the `keys` provided. + * You can also provide a single object instead of a `keys` array and its keys + * will be used as the expected set of keys. + * + * assert.hasAllKeys({foo: 1, bar: 2, baz: 3}, ['foo', 'bar', 'baz']); + * assert.hasAllKeys({foo: 1, bar: 2, baz: 3}, {foo: 30, bar: 99, baz: 1337]); + * assert.hasAllKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{foo: 1}, 'key']); + * assert.hasAllKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{foo: 'bar'}, 'anotherKey']); + * + * @name hasAllKeys + * @param {Mixed} object + * @param {String[]} keys + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.hasAllKeys = function (obj, keys, msg) { + new Assertion(obj, msg, assert.hasAllKeys, true).to.have.all.keys(keys); + } + + /** + * ### .containsAllKeys(object, [keys], [message]) + * + * Asserts that `object` has all of the `keys` provided but may have more keys not listed. + * You can also provide a single object instead of a `keys` array and its keys + * will be used as the expected set of keys. + * + * assert.containsAllKeys({foo: 1, bar: 2, baz: 3}, ['foo', 'baz']); + * assert.containsAllKeys({foo: 1, bar: 2, baz: 3}, ['foo', 'bar', 'baz']); + * assert.containsAllKeys({foo: 1, bar: 2, baz: 3}, {foo: 30, baz: 1337}); + * assert.containsAllKeys({foo: 1, bar: 2, baz: 3}, {foo: 30, bar: 99, baz: 1337}); + * assert.containsAllKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{foo: 1}]); + * assert.containsAllKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{foo: 1}, 'key']); + * assert.containsAllKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{foo: 'bar'}]); + * assert.containsAllKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{foo: 'bar'}, 'anotherKey']); + * + * @name containsAllKeys + * @param {Mixed} object + * @param {String[]} keys + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.containsAllKeys = function (obj, keys, msg) { + new Assertion(obj, msg, assert.containsAllKeys, true) + .to.contain.all.keys(keys); + } + + /** + * ### .doesNotHaveAnyKeys(object, [keys], [message]) + * + * Asserts that `object` has none of the `keys` provided. + * You can also provide a single object instead of a `keys` array and its keys + * will be used as the expected set of keys. + * + * assert.doesNotHaveAnyKeys({foo: 1, bar: 2, baz: 3}, ['one', 'two', 'example']); + * assert.doesNotHaveAnyKeys({foo: 1, bar: 2, baz: 3}, {one: 1, two: 2, example: 'foo'}); + * assert.doesNotHaveAnyKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{one: 'two'}, 'example']); + * assert.doesNotHaveAnyKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{one: 'two'}, 'example']); + * + * @name doesNotHaveAnyKeys + * @param {Mixed} object + * @param {String[]} keys + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.doesNotHaveAnyKeys = function (obj, keys, msg) { + new Assertion(obj, msg, assert.doesNotHaveAnyKeys, true) + .to.not.have.any.keys(keys); + } + + /** + * ### .doesNotHaveAllKeys(object, [keys], [message]) + * + * Asserts that `object` does not have at least one of the `keys` provided. + * You can also provide a single object instead of a `keys` array and its keys + * will be used as the expected set of keys. + * + * assert.doesNotHaveAllKeys({foo: 1, bar: 2, baz: 3}, ['one', 'two', 'example']); + * assert.doesNotHaveAllKeys({foo: 1, bar: 2, baz: 3}, {one: 1, two: 2, example: 'foo'}); + * assert.doesNotHaveAllKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{one: 'two'}, 'example']); + * assert.doesNotHaveAllKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{one: 'two'}, 'example']); + * + * @name doesNotHaveAllKeys + * @param {Mixed} object + * @param {String[]} keys + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.doesNotHaveAllKeys = function (obj, keys, msg) { + new Assertion(obj, msg, assert.doesNotHaveAllKeys, true) + .to.not.have.all.keys(keys); + } + + /** + * ### .hasAnyDeepKeys(object, [keys], [message]) + * + * Asserts that `object` has at least one of the `keys` provided. + * Since Sets and Maps can have objects as keys you can use this assertion to perform + * a deep comparison. + * You can also provide a single object instead of a `keys` array and its keys + * will be used as the expected set of keys. + * + * assert.hasAnyDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [1, 2]]), {one: 'one'}); + * assert.hasAnyDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [1, 2]]), [{one: 'one'}, {two: 'two'}]); + * assert.hasAnyDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [{two: 'two'}, 'valueTwo']]), [{one: 'one'}, {two: 'two'}]); + * assert.hasAnyDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), {one: 'one'}); + * assert.hasAnyDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{one: 'one'}, {three: 'three'}]); + * assert.hasAnyDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{one: 'one'}, {two: 'two'}]); + * + * @name doesNotHaveAllKeys + * @param {Mixed} object + * @param {Array|Object} keys + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.hasAnyDeepKeys = function (obj, keys, msg) { + new Assertion(obj, msg, assert.hasAnyDeepKeys, true) + .to.have.any.deep.keys(keys); + } + + /** + * ### .hasAllDeepKeys(object, [keys], [message]) + * + * Asserts that `object` has all and only all of the `keys` provided. + * Since Sets and Maps can have objects as keys you can use this assertion to perform + * a deep comparison. + * You can also provide a single object instead of a `keys` array and its keys + * will be used as the expected set of keys. + * + * assert.hasAllDeepKeys(new Map([[{one: 'one'}, 'valueOne']]), {one: 'one'}); + * assert.hasAllDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [{two: 'two'}, 'valueTwo']]), [{one: 'one'}, {two: 'two'}]); + * assert.hasAllDeepKeys(new Set([{one: 'one'}]), {one: 'one'}); + * assert.hasAllDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{one: 'one'}, {two: 'two'}]); + * + * @name hasAllDeepKeys + * @param {Mixed} object + * @param {Array|Object} keys + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.hasAllDeepKeys = function (obj, keys, msg) { + new Assertion(obj, msg, assert.hasAllDeepKeys, true) + .to.have.all.deep.keys(keys); + } + + /** + * ### .containsAllDeepKeys(object, [keys], [message]) + * + * Asserts that `object` contains all of the `keys` provided. + * Since Sets and Maps can have objects as keys you can use this assertion to perform + * a deep comparison. + * You can also provide a single object instead of a `keys` array and its keys + * will be used as the expected set of keys. + * + * assert.containsAllDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [1, 2]]), {one: 'one'}); + * assert.containsAllDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [{two: 'two'}, 'valueTwo']]), [{one: 'one'}, {two: 'two'}]); + * assert.containsAllDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), {one: 'one'}); + * assert.containsAllDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{one: 'one'}, {two: 'two'}]); + * + * @name containsAllDeepKeys + * @param {Mixed} object + * @param {Array|Object} keys + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.containsAllDeepKeys = function (obj, keys, msg) { + new Assertion(obj, msg, assert.containsAllDeepKeys, true) + .to.contain.all.deep.keys(keys); + } + + /** + * ### .doesNotHaveAnyDeepKeys(object, [keys], [message]) + * + * Asserts that `object` has none of the `keys` provided. + * Since Sets and Maps can have objects as keys you can use this assertion to perform + * a deep comparison. + * You can also provide a single object instead of a `keys` array and its keys + * will be used as the expected set of keys. + * + * assert.doesNotHaveAnyDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [1, 2]]), {thisDoesNot: 'exist'}); + * assert.doesNotHaveAnyDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [{two: 'two'}, 'valueTwo']]), [{twenty: 'twenty'}, {fifty: 'fifty'}]); + * assert.doesNotHaveAnyDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), {twenty: 'twenty'}); + * assert.doesNotHaveAnyDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{twenty: 'twenty'}, {fifty: 'fifty'}]); + * + * @name doesNotHaveAnyDeepKeys + * @param {Mixed} object + * @param {Array|Object} keys + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.doesNotHaveAnyDeepKeys = function (obj, keys, msg) { + new Assertion(obj, msg, assert.doesNotHaveAnyDeepKeys, true) + .to.not.have.any.deep.keys(keys); + } + + /** + * ### .doesNotHaveAllDeepKeys(object, [keys], [message]) + * + * Asserts that `object` does not have at least one of the `keys` provided. + * Since Sets and Maps can have objects as keys you can use this assertion to perform + * a deep comparison. + * You can also provide a single object instead of a `keys` array and its keys + * will be used as the expected set of keys. + * + * assert.doesNotHaveAllDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [1, 2]]), {thisDoesNot: 'exist'}); + * assert.doesNotHaveAllDeepKeys(new Map([[{one: 'one'}, 'valueOne'], [{two: 'two'}, 'valueTwo']]), [{twenty: 'twenty'}, {one: 'one'}]); + * assert.doesNotHaveAllDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), {twenty: 'twenty'}); + * assert.doesNotHaveAllDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{one: 'one'}, {fifty: 'fifty'}]); + * + * @name doesNotHaveAllDeepKeys + * @param {Mixed} object + * @param {Array|Object} keys + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.doesNotHaveAllDeepKeys = function (obj, keys, msg) { + new Assertion(obj, msg, assert.doesNotHaveAllDeepKeys, true) + .to.not.have.all.deep.keys(keys); + } + + /** + * ### .throws(fn, [errorLike/string/regexp], [string/regexp], [message]) + * + * If `errorLike` is an `Error` constructor, asserts that `fn` will throw an error that is an + * instance of `errorLike`. + * If `errorLike` is an `Error` instance, asserts that the error thrown is the same + * instance as `errorLike`. + * If `errMsgMatcher` is provided, it also asserts that the error thrown will have a + * message matching `errMsgMatcher`. + * + * assert.throws(fn, 'Error thrown must have this msg'); + * assert.throws(fn, /Error thrown must have a msg that matches this/); + * assert.throws(fn, ReferenceError); + * assert.throws(fn, errorInstance); + * assert.throws(fn, ReferenceError, 'Error thrown must be a ReferenceError and have this msg'); + * assert.throws(fn, errorInstance, 'Error thrown must be the same errorInstance and have this msg'); + * assert.throws(fn, ReferenceError, /Error thrown must be a ReferenceError and match this/); + * assert.throws(fn, errorInstance, /Error thrown must be the same errorInstance and match this/); + * + * @name throws + * @alias throw + * @alias Throw + * @param {Function} fn + * @param {ErrorConstructor|Error} errorLike + * @param {RegExp|String} errMsgMatcher + * @param {String} message + * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types + * @namespace Assert + * @api public + */ + + assert.throws = function (fn, errorLike, errMsgMatcher, msg) { + if ('string' === typeof errorLike || errorLike instanceof RegExp) { + errMsgMatcher = errorLike; + errorLike = null; + } + + var assertErr = new Assertion(fn, msg, assert.throws, true) + .to.throw(errorLike, errMsgMatcher); + return flag(assertErr, 'object'); + }; + + /** + * ### .doesNotThrow(fn, [errorLike/string/regexp], [string/regexp], [message]) + * + * If `errorLike` is an `Error` constructor, asserts that `fn` will _not_ throw an error that is an + * instance of `errorLike`. + * If `errorLike` is an `Error` instance, asserts that the error thrown is _not_ the same + * instance as `errorLike`. + * If `errMsgMatcher` is provided, it also asserts that the error thrown will _not_ have a + * message matching `errMsgMatcher`. + * + * assert.doesNotThrow(fn, 'Any Error thrown must not have this message'); + * assert.doesNotThrow(fn, /Any Error thrown must not match this/); + * assert.doesNotThrow(fn, Error); + * assert.doesNotThrow(fn, errorInstance); + * assert.doesNotThrow(fn, Error, 'Error must not have this message'); + * assert.doesNotThrow(fn, errorInstance, 'Error must not have this message'); + * assert.doesNotThrow(fn, Error, /Error must not match this/); + * assert.doesNotThrow(fn, errorInstance, /Error must not match this/); + * + * @name doesNotThrow + * @param {Function} fn + * @param {ErrorConstructor} errorLike + * @param {RegExp|String} errMsgMatcher + * @param {String} message + * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types + * @namespace Assert + * @api public + */ + + assert.doesNotThrow = function (fn, errorLike, errMsgMatcher, msg) { + if ('string' === typeof errorLike || errorLike instanceof RegExp) { + errMsgMatcher = errorLike; + errorLike = null; + } + + new Assertion(fn, msg, assert.doesNotThrow, true) + .to.not.throw(errorLike, errMsgMatcher); + }; + + /** + * ### .operator(val1, operator, val2, [message]) + * + * Compares two values using `operator`. + * + * assert.operator(1, '<', 2, 'everything is ok'); + * assert.operator(1, '>', 2, 'this will fail'); + * + * @name operator + * @param {Mixed} val1 + * @param {String} operator + * @param {Mixed} val2 + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.operator = function (val, operator, val2, msg) { + var ok; + switch(operator) { + case '==': + ok = val == val2; + break; + case '===': + ok = val === val2; + break; + case '>': + ok = val > val2; + break; + case '>=': + ok = val >= val2; + break; + case '<': + ok = val < val2; + break; + case '<=': + ok = val <= val2; + break; + case '!=': + ok = val != val2; + break; + case '!==': + ok = val !== val2; + break; + default: + msg = msg ? msg + ': ' : msg; + throw new chai.AssertionError( + msg + 'Invalid operator "' + operator + '"', + undefined, + assert.operator + ); + } + var test = new Assertion(ok, msg, assert.operator, true); + test.assert( + true === flag(test, 'object') + , 'expected ' + util.inspect(val) + ' to be ' + operator + ' ' + util.inspect(val2) + , 'expected ' + util.inspect(val) + ' to not be ' + operator + ' ' + util.inspect(val2) ); + }; + + /** + * ### .closeTo(actual, expected, delta, [message]) + * + * Asserts that the target is equal `expected`, to within a +/- `delta` range. + * + * assert.closeTo(1.5, 1, 0.5, 'numbers are close'); + * + * @name closeTo + * @param {Number} actual + * @param {Number} expected + * @param {Number} delta + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.closeTo = function (act, exp, delta, msg) { + new Assertion(act, msg, assert.closeTo, true).to.be.closeTo(exp, delta); + }; + + /** + * ### .approximately(actual, expected, delta, [message]) + * + * Asserts that the target is equal `expected`, to within a +/- `delta` range. + * + * assert.approximately(1.5, 1, 0.5, 'numbers are close'); + * + * @name approximately + * @param {Number} actual + * @param {Number} expected + * @param {Number} delta + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.approximately = function (act, exp, delta, msg) { + new Assertion(act, msg, assert.approximately, true) + .to.be.approximately(exp, delta); + }; + + /** + * ### .sameMembers(set1, set2, [message]) + * + * Asserts that `set1` and `set2` have the same members in any order. Uses a + * strict equality check (===). + * + * assert.sameMembers([ 1, 2, 3 ], [ 2, 1, 3 ], 'same members'); + * + * @name sameMembers + * @param {Array} set1 + * @param {Array} set2 + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.sameMembers = function (set1, set2, msg) { + new Assertion(set1, msg, assert.sameMembers, true) + .to.have.same.members(set2); + } + + /** + * ### .notSameMembers(set1, set2, [message]) + * + * Asserts that `set1` and `set2` don't have the same members in any order. + * Uses a strict equality check (===). + * + * assert.notSameMembers([ 1, 2, 3 ], [ 5, 1, 3 ], 'not same members'); + * + * @name notSameMembers + * @param {Array} set1 + * @param {Array} set2 + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notSameMembers = function (set1, set2, msg) { + new Assertion(set1, msg, assert.notSameMembers, true) + .to.not.have.same.members(set2); + } + + /** + * ### .sameDeepMembers(set1, set2, [message]) + * + * Asserts that `set1` and `set2` have the same members in any order. Uses a + * deep equality check. + * + * assert.sameDeepMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [{ b: 2 }, { a: 1 }, { c: 3 }], 'same deep members'); + * + * @name sameDeepMembers + * @param {Array} set1 + * @param {Array} set2 + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.sameDeepMembers = function (set1, set2, msg) { + new Assertion(set1, msg, assert.sameDeepMembers, true) + .to.have.same.deep.members(set2); + } + + /** + * ### .notSameDeepMembers(set1, set2, [message]) + * + * Asserts that `set1` and `set2` don't have the same members in any order. + * Uses a deep equality check. + * + * assert.notSameDeepMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [{ b: 2 }, { a: 1 }, { f: 5 }], 'not same deep members'); + * + * @name notSameDeepMembers + * @param {Array} set1 + * @param {Array} set2 + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notSameDeepMembers = function (set1, set2, msg) { + new Assertion(set1, msg, assert.notSameDeepMembers, true) + .to.not.have.same.deep.members(set2); + } + + /** + * ### .sameOrderedMembers(set1, set2, [message]) + * + * Asserts that `set1` and `set2` have the same members in the same order. + * Uses a strict equality check (===). + * + * assert.sameOrderedMembers([ 1, 2, 3 ], [ 1, 2, 3 ], 'same ordered members'); + * + * @name sameOrderedMembers + * @param {Array} set1 + * @param {Array} set2 + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.sameOrderedMembers = function (set1, set2, msg) { + new Assertion(set1, msg, assert.sameOrderedMembers, true) + .to.have.same.ordered.members(set2); + } + + /** + * ### .notSameOrderedMembers(set1, set2, [message]) + * + * Asserts that `set1` and `set2` don't have the same members in the same + * order. Uses a strict equality check (===). + * + * assert.notSameOrderedMembers([ 1, 2, 3 ], [ 2, 1, 3 ], 'not same ordered members'); + * + * @name notSameOrderedMembers + * @param {Array} set1 + * @param {Array} set2 + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notSameOrderedMembers = function (set1, set2, msg) { + new Assertion(set1, msg, assert.notSameOrderedMembers, true) + .to.not.have.same.ordered.members(set2); + } + + /** + * ### .sameDeepOrderedMembers(set1, set2, [message]) + * + * Asserts that `set1` and `set2` have the same members in the same order. + * Uses a deep equality check. + * + * assert.sameDeepOrderedMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { a: 1 }, { b: 2 }, { c: 3 } ], 'same deep ordered members'); + * + * @name sameDeepOrderedMembers + * @param {Array} set1 + * @param {Array} set2 + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.sameDeepOrderedMembers = function (set1, set2, msg) { + new Assertion(set1, msg, assert.sameDeepOrderedMembers, true) + .to.have.same.deep.ordered.members(set2); + } + + /** + * ### .notSameDeepOrderedMembers(set1, set2, [message]) + * + * Asserts that `set1` and `set2` don't have the same members in the same + * order. Uses a deep equality check. + * + * assert.notSameDeepOrderedMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { a: 1 }, { b: 2 }, { z: 5 } ], 'not same deep ordered members'); + * assert.notSameDeepOrderedMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { b: 2 }, { a: 1 }, { c: 3 } ], 'not same deep ordered members'); + * + * @name notSameDeepOrderedMembers + * @param {Array} set1 + * @param {Array} set2 + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notSameDeepOrderedMembers = function (set1, set2, msg) { + new Assertion(set1, msg, assert.notSameDeepOrderedMembers, true) + .to.not.have.same.deep.ordered.members(set2); + } + + /** + * ### .includeMembers(superset, subset, [message]) + * + * Asserts that `subset` is included in `superset` in any order. Uses a + * strict equality check (===). Duplicates are ignored. + * + * assert.includeMembers([ 1, 2, 3 ], [ 2, 1, 2 ], 'include members'); + * + * @name includeMembers + * @param {Array} superset + * @param {Array} subset + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.includeMembers = function (superset, subset, msg) { + new Assertion(superset, msg, assert.includeMembers, true) + .to.include.members(subset); + } + + /** + * ### .notIncludeMembers(superset, subset, [message]) + * + * Asserts that `subset` isn't included in `superset` in any order. Uses a + * strict equality check (===). Duplicates are ignored. + * + * assert.notIncludeMembers([ 1, 2, 3 ], [ 5, 1 ], 'not include members'); + * + * @name notIncludeMembers + * @param {Array} superset + * @param {Array} subset + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notIncludeMembers = function (superset, subset, msg) { + new Assertion(superset, msg, assert.notIncludeMembers, true) + .to.not.include.members(subset); + } + + /** + * ### .includeDeepMembers(superset, subset, [message]) + * + * Asserts that `subset` is included in `superset` in any order. Uses a deep + * equality check. Duplicates are ignored. + * + * assert.includeDeepMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { b: 2 }, { a: 1 }, { b: 2 } ], 'include deep members'); + * + * @name includeDeepMembers + * @param {Array} superset + * @param {Array} subset + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.includeDeepMembers = function (superset, subset, msg) { + new Assertion(superset, msg, assert.includeDeepMembers, true) + .to.include.deep.members(subset); + } + + /** + * ### .notIncludeDeepMembers(superset, subset, [message]) + * + * Asserts that `subset` isn't included in `superset` in any order. Uses a + * deep equality check. Duplicates are ignored. + * + * assert.notIncludeDeepMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { b: 2 }, { f: 5 } ], 'not include deep members'); + * + * @name notIncludeDeepMembers + * @param {Array} superset + * @param {Array} subset + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notIncludeDeepMembers = function (superset, subset, msg) { + new Assertion(superset, msg, assert.notIncludeDeepMembers, true) + .to.not.include.deep.members(subset); + } + + /** + * ### .includeOrderedMembers(superset, subset, [message]) + * + * Asserts that `subset` is included in `superset` in the same order + * beginning with the first element in `superset`. Uses a strict equality + * check (===). + * + * assert.includeOrderedMembers([ 1, 2, 3 ], [ 1, 2 ], 'include ordered members'); + * + * @name includeOrderedMembers + * @param {Array} superset + * @param {Array} subset + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.includeOrderedMembers = function (superset, subset, msg) { + new Assertion(superset, msg, assert.includeOrderedMembers, true) + .to.include.ordered.members(subset); + } + + /** + * ### .notIncludeOrderedMembers(superset, subset, [message]) + * + * Asserts that `subset` isn't included in `superset` in the same order + * beginning with the first element in `superset`. Uses a strict equality + * check (===). + * + * assert.notIncludeOrderedMembers([ 1, 2, 3 ], [ 2, 1 ], 'not include ordered members'); + * assert.notIncludeOrderedMembers([ 1, 2, 3 ], [ 2, 3 ], 'not include ordered members'); + * + * @name notIncludeOrderedMembers + * @param {Array} superset + * @param {Array} subset + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notIncludeOrderedMembers = function (superset, subset, msg) { + new Assertion(superset, msg, assert.notIncludeOrderedMembers, true) + .to.not.include.ordered.members(subset); + } + + /** + * ### .includeDeepOrderedMembers(superset, subset, [message]) + * + * Asserts that `subset` is included in `superset` in the same order + * beginning with the first element in `superset`. Uses a deep equality + * check. + * + * assert.includeDeepOrderedMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { a: 1 }, { b: 2 } ], 'include deep ordered members'); + * + * @name includeDeepOrderedMembers + * @param {Array} superset + * @param {Array} subset + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.includeDeepOrderedMembers = function (superset, subset, msg) { + new Assertion(superset, msg, assert.includeDeepOrderedMembers, true) + .to.include.deep.ordered.members(subset); + } + + /** + * ### .notIncludeDeepOrderedMembers(superset, subset, [message]) + * + * Asserts that `subset` isn't included in `superset` in the same order + * beginning with the first element in `superset`. Uses a deep equality + * check. + * + * assert.notIncludeDeepOrderedMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { a: 1 }, { f: 5 } ], 'not include deep ordered members'); + * assert.notIncludeDeepOrderedMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { b: 2 }, { a: 1 } ], 'not include deep ordered members'); + * assert.notIncludeDeepOrderedMembers([ { a: 1 }, { b: 2 }, { c: 3 } ], [ { b: 2 }, { c: 3 } ], 'not include deep ordered members'); + * + * @name notIncludeDeepOrderedMembers + * @param {Array} superset + * @param {Array} subset + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.notIncludeDeepOrderedMembers = function (superset, subset, msg) { + new Assertion(superset, msg, assert.notIncludeDeepOrderedMembers, true) + .to.not.include.deep.ordered.members(subset); + } + + /** + * ### .oneOf(inList, list, [message]) + * + * Asserts that non-object, non-array value `inList` appears in the flat array `list`. + * + * assert.oneOf(1, [ 2, 1 ], 'Not found in list'); + * + * @name oneOf + * @param {*} inList + * @param {Array<*>} list + * @param {String} message + * @namespace Assert + * @api public + */ + + assert.oneOf = function (inList, list, msg) { + new Assertion(inList, msg, assert.oneOf, true).to.be.oneOf(list); + } + + /** + * ### .changes(function, object, property, [message]) + * + * Asserts that a function changes the value of a property. + * + * var obj = { val: 10 }; + * var fn = function() { obj.val = 22 }; + * assert.changes(fn, obj, 'val'); + * + * @name changes + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.changes = function (fn, obj, prop, msg) { + if (arguments.length === 3 && typeof obj === 'function') { + msg = prop; + prop = null; + } + + new Assertion(fn, msg, assert.changes, true).to.change(obj, prop); + } + + /** + * ### .changesBy(function, object, property, delta, [message]) + * + * Asserts that a function changes the value of a property by an amount (delta). + * + * var obj = { val: 10 }; + * var fn = function() { obj.val += 2 }; + * assert.changesBy(fn, obj, 'val', 2); + * + * @name changesBy + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {Number} change amount (delta) + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.changesBy = function (fn, obj, prop, delta, msg) { + if (arguments.length === 4 && typeof obj === 'function') { + var tmpMsg = delta; + delta = prop; + msg = tmpMsg; + } else if (arguments.length === 3) { + delta = prop; + prop = null; + } + + new Assertion(fn, msg, assert.changesBy, true) + .to.change(obj, prop).by(delta); + } + + /** + * ### .doesNotChange(function, object, property, [message]) + * + * Asserts that a function does not change the value of a property. + * + * var obj = { val: 10 }; + * var fn = function() { console.log('foo'); }; + * assert.doesNotChange(fn, obj, 'val'); + * + * @name doesNotChange + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.doesNotChange = function (fn, obj, prop, msg) { + if (arguments.length === 3 && typeof obj === 'function') { + msg = prop; + prop = null; + } + + return new Assertion(fn, msg, assert.doesNotChange, true) + .to.not.change(obj, prop); + } + + /** + * ### .changesButNotBy(function, object, property, delta, [message]) + * + * Asserts that a function does not change the value of a property or of a function's return value by an amount (delta) + * + * var obj = { val: 10 }; + * var fn = function() { obj.val += 10 }; + * assert.changesButNotBy(fn, obj, 'val', 5); + * + * @name changesButNotBy + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {Number} change amount (delta) + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.changesButNotBy = function (fn, obj, prop, delta, msg) { + if (arguments.length === 4 && typeof obj === 'function') { + var tmpMsg = delta; + delta = prop; + msg = tmpMsg; + } else if (arguments.length === 3) { + delta = prop; + prop = null; + } + + new Assertion(fn, msg, assert.changesButNotBy, true) + .to.change(obj, prop).but.not.by(delta); + } + + /** + * ### .increases(function, object, property, [message]) + * + * Asserts that a function increases a numeric object property. + * + * var obj = { val: 10 }; + * var fn = function() { obj.val = 13 }; + * assert.increases(fn, obj, 'val'); + * + * @name increases + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.increases = function (fn, obj, prop, msg) { + if (arguments.length === 3 && typeof obj === 'function') { + msg = prop; + prop = null; + } + + return new Assertion(fn, msg, assert.increases, true) + .to.increase(obj, prop); + } + + /** + * ### .increasesBy(function, object, property, delta, [message]) + * + * Asserts that a function increases a numeric object property or a function's return value by an amount (delta). + * + * var obj = { val: 10 }; + * var fn = function() { obj.val += 10 }; + * assert.increasesBy(fn, obj, 'val', 10); + * + * @name increasesBy + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {Number} change amount (delta) + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.increasesBy = function (fn, obj, prop, delta, msg) { + if (arguments.length === 4 && typeof obj === 'function') { + var tmpMsg = delta; + delta = prop; + msg = tmpMsg; + } else if (arguments.length === 3) { + delta = prop; + prop = null; + } + + new Assertion(fn, msg, assert.increasesBy, true) + .to.increase(obj, prop).by(delta); + } + + /** + * ### .doesNotIncrease(function, object, property, [message]) + * + * Asserts that a function does not increase a numeric object property. + * + * var obj = { val: 10 }; + * var fn = function() { obj.val = 8 }; + * assert.doesNotIncrease(fn, obj, 'val'); + * + * @name doesNotIncrease + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.doesNotIncrease = function (fn, obj, prop, msg) { + if (arguments.length === 3 && typeof obj === 'function') { + msg = prop; + prop = null; + } + + return new Assertion(fn, msg, assert.doesNotIncrease, true) + .to.not.increase(obj, prop); + } + + /** + * ### .increasesButNotBy(function, object, property, [message]) + * + * Asserts that a function does not increase a numeric object property or function's return value by an amount (delta). + * + * var obj = { val: 10 }; + * var fn = function() { obj.val = 15 }; + * assert.increasesButNotBy(fn, obj, 'val', 10); + * + * @name increasesButNotBy + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {Number} change amount (delta) + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.increasesButNotBy = function (fn, obj, prop, delta, msg) { + if (arguments.length === 4 && typeof obj === 'function') { + var tmpMsg = delta; + delta = prop; + msg = tmpMsg; + } else if (arguments.length === 3) { + delta = prop; + prop = null; + } + + new Assertion(fn, msg, assert.increasesButNotBy, true) + .to.increase(obj, prop).but.not.by(delta); + } + + /** + * ### .decreases(function, object, property, [message]) + * + * Asserts that a function decreases a numeric object property. + * + * var obj = { val: 10 }; + * var fn = function() { obj.val = 5 }; + * assert.decreases(fn, obj, 'val'); + * + * @name decreases + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.decreases = function (fn, obj, prop, msg) { + if (arguments.length === 3 && typeof obj === 'function') { + msg = prop; + prop = null; + } + + return new Assertion(fn, msg, assert.decreases, true) + .to.decrease(obj, prop); + } + + /** + * ### .decreasesBy(function, object, property, delta, [message]) + * + * Asserts that a function decreases a numeric object property or a function's return value by an amount (delta) + * + * var obj = { val: 10 }; + * var fn = function() { obj.val -= 5 }; + * assert.decreasesBy(fn, obj, 'val', 5); + * + * @name decreasesBy + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {Number} change amount (delta) + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.decreasesBy = function (fn, obj, prop, delta, msg) { + if (arguments.length === 4 && typeof obj === 'function') { + var tmpMsg = delta; + delta = prop; + msg = tmpMsg; + } else if (arguments.length === 3) { + delta = prop; + prop = null; + } + + new Assertion(fn, msg, assert.decreasesBy, true) + .to.decrease(obj, prop).by(delta); + } + + /** + * ### .doesNotDecrease(function, object, property, [message]) + * + * Asserts that a function does not decreases a numeric object property. + * + * var obj = { val: 10 }; + * var fn = function() { obj.val = 15 }; + * assert.doesNotDecrease(fn, obj, 'val'); + * + * @name doesNotDecrease + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.doesNotDecrease = function (fn, obj, prop, msg) { + if (arguments.length === 3 && typeof obj === 'function') { + msg = prop; + prop = null; + } + + return new Assertion(fn, msg, assert.doesNotDecrease, true) + .to.not.decrease(obj, prop); + } + + /** + * ### .doesNotDecreaseBy(function, object, property, delta, [message]) + * + * Asserts that a function does not decreases a numeric object property or a function's return value by an amount (delta) + * + * var obj = { val: 10 }; + * var fn = function() { obj.val = 5 }; + * assert.doesNotDecreaseBy(fn, obj, 'val', 1); + * + * @name doesNotDecrease + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {Number} change amount (delta) + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.doesNotDecreaseBy = function (fn, obj, prop, delta, msg) { + if (arguments.length === 4 && typeof obj === 'function') { + var tmpMsg = delta; + delta = prop; + msg = tmpMsg; + } else if (arguments.length === 3) { + delta = prop; + prop = null; + } + + return new Assertion(fn, msg, assert.doesNotDecreaseBy, true) + .to.not.decrease(obj, prop).by(delta); + } + + /** + * ### .decreasesButNotBy(function, object, property, delta, [message]) + * + * Asserts that a function does not decreases a numeric object property or a function's return value by an amount (delta) + * + * var obj = { val: 10 }; + * var fn = function() { obj.val = 5 }; + * assert.decreasesButNotBy(fn, obj, 'val', 1); + * + * @name decreasesButNotBy + * @param {Function} modifier function + * @param {Object} object or getter function + * @param {String} property name _optional_ + * @param {Number} change amount (delta) + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.decreasesButNotBy = function (fn, obj, prop, delta, msg) { + if (arguments.length === 4 && typeof obj === 'function') { + var tmpMsg = delta; + delta = prop; + msg = tmpMsg; + } else if (arguments.length === 3) { + delta = prop; + prop = null; + } + + new Assertion(fn, msg, assert.decreasesButNotBy, true) + .to.decrease(obj, prop).but.not.by(delta); + } + + /*! + * ### .ifError(object) + * + * Asserts if value is not a false value, and throws if it is a true value. + * This is added to allow for chai to be a drop-in replacement for Node's + * assert class. + * + * var err = new Error('I am a custom error'); + * assert.ifError(err); // Rethrows err! + * + * @name ifError + * @param {Object} object + * @namespace Assert + * @api public + */ + + assert.ifError = function (val) { + if (val) { + throw(val); + } + }; + + /** + * ### .isExtensible(object) + * + * Asserts that `object` is extensible (can have new properties added to it). + * + * assert.isExtensible({}); + * + * @name isExtensible + * @alias extensible + * @param {Object} object + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.isExtensible = function (obj, msg) { + new Assertion(obj, msg, assert.isExtensible, true).to.be.extensible; + }; + + /** + * ### .isNotExtensible(object) + * + * Asserts that `object` is _not_ extensible. + * + * var nonExtensibleObject = Object.preventExtensions({}); + * var sealedObject = Object.seal({}); + * var frozenObject = Object.freeze({}); + * + * assert.isNotExtensible(nonExtensibleObject); + * assert.isNotExtensible(sealedObject); + * assert.isNotExtensible(frozenObject); + * + * @name isNotExtensible + * @alias notExtensible + * @param {Object} object + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.isNotExtensible = function (obj, msg) { + new Assertion(obj, msg, assert.isNotExtensible, true).to.not.be.extensible; + }; + + /** + * ### .isSealed(object) + * + * Asserts that `object` is sealed (cannot have new properties added to it + * and its existing properties cannot be removed). + * + * var sealedObject = Object.seal({}); + * var frozenObject = Object.seal({}); + * + * assert.isSealed(sealedObject); + * assert.isSealed(frozenObject); + * + * @name isSealed + * @alias sealed + * @param {Object} object + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.isSealed = function (obj, msg) { + new Assertion(obj, msg, assert.isSealed, true).to.be.sealed; + }; + + /** + * ### .isNotSealed(object) + * + * Asserts that `object` is _not_ sealed. + * + * assert.isNotSealed({}); + * + * @name isNotSealed + * @alias notSealed + * @param {Object} object + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.isNotSealed = function (obj, msg) { + new Assertion(obj, msg, assert.isNotSealed, true).to.not.be.sealed; + }; + + /** + * ### .isFrozen(object) + * + * Asserts that `object` is frozen (cannot have new properties added to it + * and its existing properties cannot be modified). + * + * var frozenObject = Object.freeze({}); + * assert.frozen(frozenObject); + * + * @name isFrozen + * @alias frozen + * @param {Object} object + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.isFrozen = function (obj, msg) { + new Assertion(obj, msg, assert.isFrozen, true).to.be.frozen; + }; + + /** + * ### .isNotFrozen(object) + * + * Asserts that `object` is _not_ frozen. + * + * assert.isNotFrozen({}); + * + * @name isNotFrozen + * @alias notFrozen + * @param {Object} object + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.isNotFrozen = function (obj, msg) { + new Assertion(obj, msg, assert.isNotFrozen, true).to.not.be.frozen; + }; + + /** + * ### .isEmpty(target) + * + * Asserts that the target does not contain any values. + * For arrays and strings, it checks the `length` property. + * For `Map` and `Set` instances, it checks the `size` property. + * For non-function objects, it gets the count of own + * enumerable string keys. + * + * assert.isEmpty([]); + * assert.isEmpty(''); + * assert.isEmpty(new Map); + * assert.isEmpty({}); + * + * @name isEmpty + * @alias empty + * @param {Object|Array|String|Map|Set} target + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.isEmpty = function(val, msg) { + new Assertion(val, msg, assert.isEmpty, true).to.be.empty; + }; + + /** + * ### .isNotEmpty(target) + * + * Asserts that the target contains values. + * For arrays and strings, it checks the `length` property. + * For `Map` and `Set` instances, it checks the `size` property. + * For non-function objects, it gets the count of own + * enumerable string keys. + * + * assert.isNotEmpty([1, 2]); + * assert.isNotEmpty('34'); + * assert.isNotEmpty(new Set([5, 6])); + * assert.isNotEmpty({ key: 7 }); + * + * @name isNotEmpty + * @alias notEmpty + * @param {Object|Array|String|Map|Set} target + * @param {String} message _optional_ + * @namespace Assert + * @api public + */ + + assert.isNotEmpty = function(val, msg) { + new Assertion(val, msg, assert.isNotEmpty, true).to.not.be.empty; + }; + + /*! + * Aliases. + */ + + (function alias(name, as){ + assert[as] = assert[name]; + return alias; + }) + ('isOk', 'ok') + ('isNotOk', 'notOk') + ('throws', 'throw') + ('throws', 'Throw') + ('isExtensible', 'extensible') + ('isNotExtensible', 'notExtensible') + ('isSealed', 'sealed') + ('isNotSealed', 'notSealed') + ('isFrozen', 'frozen') + ('isNotFrozen', 'notFrozen') + ('isEmpty', 'empty') + ('isNotEmpty', 'notEmpty'); +}; diff --git a/node_modules/chai/lib/chai/interface/expect.js b/node_modules/chai/lib/chai/interface/expect.js new file mode 100644 index 00000000..6867e2a9 --- /dev/null +++ b/node_modules/chai/lib/chai/interface/expect.js @@ -0,0 +1,47 @@ +/*! + * chai + * Copyright(c) 2011-2014 Jake Luer + * MIT Licensed + */ + +module.exports = function (chai, util) { + chai.expect = function (val, message) { + return new chai.Assertion(val, message); + }; + + /** + * ### .fail([message]) + * ### .fail(actual, expected, [message], [operator]) + * + * Throw a failure. + * + * expect.fail(); + * expect.fail("custom error message"); + * expect.fail(1, 2); + * expect.fail(1, 2, "custom error message"); + * expect.fail(1, 2, "custom error message", ">"); + * expect.fail(1, 2, undefined, ">"); + * + * @name fail + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @param {String} operator + * @namespace BDD + * @api public + */ + + chai.expect.fail = function (actual, expected, message, operator) { + if (arguments.length < 2) { + message = actual; + actual = undefined; + } + + message = message || 'expect.fail()'; + throw new chai.AssertionError(message, { + actual: actual + , expected: expected + , operator: operator + }, chai.expect.fail); + }; +}; diff --git a/node_modules/chai/lib/chai/interface/should.js b/node_modules/chai/lib/chai/interface/should.js new file mode 100644 index 00000000..5406e5e4 --- /dev/null +++ b/node_modules/chai/lib/chai/interface/should.js @@ -0,0 +1,218 @@ +/*! + * chai + * Copyright(c) 2011-2014 Jake Luer + * MIT Licensed + */ + +module.exports = function (chai, util) { + var Assertion = chai.Assertion; + + function loadShould () { + // explicitly define this method as function as to have it's name to include as `ssfi` + function shouldGetter() { + if (this instanceof String + || this instanceof Number + || this instanceof Boolean + || typeof Symbol === 'function' && this instanceof Symbol) { + return new Assertion(this.valueOf(), null, shouldGetter); + } + return new Assertion(this, null, shouldGetter); + } + function shouldSetter(value) { + // See https://github.com/chaijs/chai/issues/86: this makes + // `whatever.should = someValue` actually set `someValue`, which is + // especially useful for `global.should = require('chai').should()`. + // + // Note that we have to use [[DefineProperty]] instead of [[Put]] + // since otherwise we would trigger this very setter! + Object.defineProperty(this, 'should', { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } + // modify Object.prototype to have `should` + Object.defineProperty(Object.prototype, 'should', { + set: shouldSetter + , get: shouldGetter + , configurable: true + }); + + var should = {}; + + /** + * ### .fail([message]) + * ### .fail(actual, expected, [message], [operator]) + * + * Throw a failure. + * + * should.fail(); + * should.fail("custom error message"); + * should.fail(1, 2); + * should.fail(1, 2, "custom error message"); + * should.fail(1, 2, "custom error message", ">"); + * should.fail(1, 2, undefined, ">"); + * + * + * @name fail + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @param {String} operator + * @namespace BDD + * @api public + */ + + should.fail = function (actual, expected, message, operator) { + if (arguments.length < 2) { + message = actual; + actual = undefined; + } + + message = message || 'should.fail()'; + throw new chai.AssertionError(message, { + actual: actual + , expected: expected + , operator: operator + }, should.fail); + }; + + /** + * ### .equal(actual, expected, [message]) + * + * Asserts non-strict equality (`==`) of `actual` and `expected`. + * + * should.equal(3, '3', '== coerces values to strings'); + * + * @name equal + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @namespace Should + * @api public + */ + + should.equal = function (val1, val2, msg) { + new Assertion(val1, msg).to.equal(val2); + }; + + /** + * ### .throw(function, [constructor/string/regexp], [string/regexp], [message]) + * + * Asserts that `function` will throw an error that is an instance of + * `constructor`, or alternately that it will throw an error with message + * matching `regexp`. + * + * should.throw(fn, 'function throws a reference error'); + * should.throw(fn, /function throws a reference error/); + * should.throw(fn, ReferenceError); + * should.throw(fn, ReferenceError, 'function throws a reference error'); + * should.throw(fn, ReferenceError, /function throws a reference error/); + * + * @name throw + * @alias Throw + * @param {Function} function + * @param {ErrorConstructor} constructor + * @param {RegExp} regexp + * @param {String} message + * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types + * @namespace Should + * @api public + */ + + should.Throw = function (fn, errt, errs, msg) { + new Assertion(fn, msg).to.Throw(errt, errs); + }; + + /** + * ### .exist + * + * Asserts that the target is neither `null` nor `undefined`. + * + * var foo = 'hi'; + * + * should.exist(foo, 'foo exists'); + * + * @name exist + * @namespace Should + * @api public + */ + + should.exist = function (val, msg) { + new Assertion(val, msg).to.exist; + } + + // negation + should.not = {} + + /** + * ### .not.equal(actual, expected, [message]) + * + * Asserts non-strict inequality (`!=`) of `actual` and `expected`. + * + * should.not.equal(3, 4, 'these numbers are not equal'); + * + * @name not.equal + * @param {Mixed} actual + * @param {Mixed} expected + * @param {String} message + * @namespace Should + * @api public + */ + + should.not.equal = function (val1, val2, msg) { + new Assertion(val1, msg).to.not.equal(val2); + }; + + /** + * ### .throw(function, [constructor/regexp], [message]) + * + * Asserts that `function` will _not_ throw an error that is an instance of + * `constructor`, or alternately that it will not throw an error with message + * matching `regexp`. + * + * should.not.throw(fn, Error, 'function does not throw'); + * + * @name not.throw + * @alias not.Throw + * @param {Function} function + * @param {ErrorConstructor} constructor + * @param {RegExp} regexp + * @param {String} message + * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types + * @namespace Should + * @api public + */ + + should.not.Throw = function (fn, errt, errs, msg) { + new Assertion(fn, msg).to.not.Throw(errt, errs); + }; + + /** + * ### .not.exist + * + * Asserts that the target is neither `null` nor `undefined`. + * + * var bar = null; + * + * should.not.exist(bar, 'bar does not exist'); + * + * @name not.exist + * @namespace Should + * @api public + */ + + should.not.exist = function (val, msg) { + new Assertion(val, msg).to.not.exist; + } + + should['throw'] = should['Throw']; + should.not['throw'] = should.not['Throw']; + + return should; + }; + + chai.should = loadShould; + chai.Should = loadShould; +}; diff --git a/node_modules/chai/lib/chai/utils/addChainableMethod.js b/node_modules/chai/lib/chai/utils/addChainableMethod.js new file mode 100644 index 00000000..a713f6ac --- /dev/null +++ b/node_modules/chai/lib/chai/utils/addChainableMethod.js @@ -0,0 +1,152 @@ +/*! + * Chai - addChainingMethod utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/*! + * Module dependencies + */ + +var addLengthGuard = require('./addLengthGuard'); +var chai = require('../../chai'); +var flag = require('./flag'); +var proxify = require('./proxify'); +var transferFlags = require('./transferFlags'); + +/*! + * Module variables + */ + +// Check whether `Object.setPrototypeOf` is supported +var canSetPrototype = typeof Object.setPrototypeOf === 'function'; + +// Without `Object.setPrototypeOf` support, this module will need to add properties to a function. +// However, some of functions' own props are not configurable and should be skipped. +var testFn = function() {}; +var excludeNames = Object.getOwnPropertyNames(testFn).filter(function(name) { + var propDesc = Object.getOwnPropertyDescriptor(testFn, name); + + // Note: PhantomJS 1.x includes `callee` as one of `testFn`'s own properties, + // but then returns `undefined` as the property descriptor for `callee`. As a + // workaround, we perform an otherwise unnecessary type-check for `propDesc`, + // and then filter it out if it's not an object as it should be. + if (typeof propDesc !== 'object') + return true; + + return !propDesc.configurable; +}); + +// Cache `Function` properties +var call = Function.prototype.call, + apply = Function.prototype.apply; + +/** + * ### .addChainableMethod(ctx, name, method, chainingBehavior) + * + * Adds a method to an object, such that the method can also be chained. + * + * utils.addChainableMethod(chai.Assertion.prototype, 'foo', function (str) { + * var obj = utils.flag(this, 'object'); + * new chai.Assertion(obj).to.be.equal(str); + * }); + * + * Can also be accessed directly from `chai.Assertion`. + * + * chai.Assertion.addChainableMethod('foo', fn, chainingBehavior); + * + * The result can then be used as both a method assertion, executing both `method` and + * `chainingBehavior`, or as a language chain, which only executes `chainingBehavior`. + * + * expect(fooStr).to.be.foo('bar'); + * expect(fooStr).to.be.foo.equal('foo'); + * + * @param {Object} ctx object to which the method is added + * @param {String} name of method to add + * @param {Function} method function to be used for `name`, when called + * @param {Function} chainingBehavior function to be called every time the property is accessed + * @namespace Utils + * @name addChainableMethod + * @api public + */ + +module.exports = function addChainableMethod(ctx, name, method, chainingBehavior) { + if (typeof chainingBehavior !== 'function') { + chainingBehavior = function () { }; + } + + var chainableBehavior = { + method: method + , chainingBehavior: chainingBehavior + }; + + // save the methods so we can overwrite them later, if we need to. + if (!ctx.__methods) { + ctx.__methods = {}; + } + ctx.__methods[name] = chainableBehavior; + + Object.defineProperty(ctx, name, + { get: function chainableMethodGetter() { + chainableBehavior.chainingBehavior.call(this); + + var chainableMethodWrapper = function () { + // Setting the `ssfi` flag to `chainableMethodWrapper` causes this + // function to be the starting point for removing implementation + // frames from the stack trace of a failed assertion. + // + // However, we only want to use this function as the starting point if + // the `lockSsfi` flag isn't set. + // + // If the `lockSsfi` flag is set, then this assertion is being + // invoked from inside of another assertion. In this case, the `ssfi` + // flag has already been set by the outer assertion. + // + // Note that overwriting a chainable method merely replaces the saved + // methods in `ctx.__methods` instead of completely replacing the + // overwritten assertion. Therefore, an overwriting assertion won't + // set the `ssfi` or `lockSsfi` flags. + if (!flag(this, 'lockSsfi')) { + flag(this, 'ssfi', chainableMethodWrapper); + } + + var result = chainableBehavior.method.apply(this, arguments); + if (result !== undefined) { + return result; + } + + var newAssertion = new chai.Assertion(); + transferFlags(this, newAssertion); + return newAssertion; + }; + + addLengthGuard(chainableMethodWrapper, name, true); + + // Use `Object.setPrototypeOf` if available + if (canSetPrototype) { + // Inherit all properties from the object by replacing the `Function` prototype + var prototype = Object.create(this); + // Restore the `call` and `apply` methods from `Function` + prototype.call = call; + prototype.apply = apply; + Object.setPrototypeOf(chainableMethodWrapper, prototype); + } + // Otherwise, redefine all properties (slow!) + else { + var asserterNames = Object.getOwnPropertyNames(ctx); + asserterNames.forEach(function (asserterName) { + if (excludeNames.indexOf(asserterName) !== -1) { + return; + } + + var pd = Object.getOwnPropertyDescriptor(ctx, asserterName); + Object.defineProperty(chainableMethodWrapper, asserterName, pd); + }); + } + + transferFlags(this, chainableMethodWrapper); + return proxify(chainableMethodWrapper); + } + , configurable: true + }); +}; diff --git a/node_modules/chai/lib/chai/utils/addLengthGuard.js b/node_modules/chai/lib/chai/utils/addLengthGuard.js new file mode 100644 index 00000000..e51ce80e --- /dev/null +++ b/node_modules/chai/lib/chai/utils/addLengthGuard.js @@ -0,0 +1,60 @@ +var fnLengthDesc = Object.getOwnPropertyDescriptor(function () {}, 'length'); + +/*! + * Chai - addLengthGuard utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/** + * ### .addLengthGuard(fn, assertionName, isChainable) + * + * Define `length` as a getter on the given uninvoked method assertion. The + * getter acts as a guard against chaining `length` directly off of an uninvoked + * method assertion, which is a problem because it references `function`'s + * built-in `length` property instead of Chai's `length` assertion. When the + * getter catches the user making this mistake, it throws an error with a + * helpful message. + * + * There are two ways in which this mistake can be made. The first way is by + * chaining the `length` assertion directly off of an uninvoked chainable + * method. In this case, Chai suggests that the user use `lengthOf` instead. The + * second way is by chaining the `length` assertion directly off of an uninvoked + * non-chainable method. Non-chainable methods must be invoked prior to + * chaining. In this case, Chai suggests that the user consult the docs for the + * given assertion. + * + * If the `length` property of functions is unconfigurable, then return `fn` + * without modification. + * + * Note that in ES6, the function's `length` property is configurable, so once + * support for legacy environments is dropped, Chai's `length` property can + * replace the built-in function's `length` property, and this length guard will + * no longer be necessary. In the mean time, maintaining consistency across all + * environments is the priority. + * + * @param {Function} fn + * @param {String} assertionName + * @param {Boolean} isChainable + * @namespace Utils + * @name addLengthGuard + */ + +module.exports = function addLengthGuard (fn, assertionName, isChainable) { + if (!fnLengthDesc.configurable) return fn; + + Object.defineProperty(fn, 'length', { + get: function () { + if (isChainable) { + throw Error('Invalid Chai property: ' + assertionName + '.length. Due' + + ' to a compatibility issue, "length" cannot directly follow "' + + assertionName + '". Use "' + assertionName + '.lengthOf" instead.'); + } + + throw Error('Invalid Chai property: ' + assertionName + '.length. See' + + ' docs for proper usage of "' + assertionName + '".'); + } + }); + + return fn; +}; diff --git a/node_modules/chai/lib/chai/utils/addMethod.js b/node_modules/chai/lib/chai/utils/addMethod.js new file mode 100644 index 00000000..021f0804 --- /dev/null +++ b/node_modules/chai/lib/chai/utils/addMethod.js @@ -0,0 +1,68 @@ +/*! + * Chai - addMethod utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +var addLengthGuard = require('./addLengthGuard'); +var chai = require('../../chai'); +var flag = require('./flag'); +var proxify = require('./proxify'); +var transferFlags = require('./transferFlags'); + +/** + * ### .addMethod(ctx, name, method) + * + * Adds a method to the prototype of an object. + * + * utils.addMethod(chai.Assertion.prototype, 'foo', function (str) { + * var obj = utils.flag(this, 'object'); + * new chai.Assertion(obj).to.be.equal(str); + * }); + * + * Can also be accessed directly from `chai.Assertion`. + * + * chai.Assertion.addMethod('foo', fn); + * + * Then can be used as any other assertion. + * + * expect(fooStr).to.be.foo('bar'); + * + * @param {Object} ctx object to which the method is added + * @param {String} name of method to add + * @param {Function} method function to be used for name + * @namespace Utils + * @name addMethod + * @api public + */ + +module.exports = function addMethod(ctx, name, method) { + var methodWrapper = function () { + // Setting the `ssfi` flag to `methodWrapper` causes this function to be the + // starting point for removing implementation frames from the stack trace of + // a failed assertion. + // + // However, we only want to use this function as the starting point if the + // `lockSsfi` flag isn't set. + // + // If the `lockSsfi` flag is set, then either this assertion has been + // overwritten by another assertion, or this assertion is being invoked from + // inside of another assertion. In the first case, the `ssfi` flag has + // already been set by the overwriting assertion. In the second case, the + // `ssfi` flag has already been set by the outer assertion. + if (!flag(this, 'lockSsfi')) { + flag(this, 'ssfi', methodWrapper); + } + + var result = method.apply(this, arguments); + if (result !== undefined) + return result; + + var newAssertion = new chai.Assertion(); + transferFlags(this, newAssertion); + return newAssertion; + }; + + addLengthGuard(methodWrapper, name, false); + ctx[name] = proxify(methodWrapper, name); +}; diff --git a/node_modules/chai/lib/chai/utils/addProperty.js b/node_modules/chai/lib/chai/utils/addProperty.js new file mode 100644 index 00000000..872a8cd7 --- /dev/null +++ b/node_modules/chai/lib/chai/utils/addProperty.js @@ -0,0 +1,72 @@ +/*! + * Chai - addProperty utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +var chai = require('../../chai'); +var flag = require('./flag'); +var isProxyEnabled = require('./isProxyEnabled'); +var transferFlags = require('./transferFlags'); + +/** + * ### .addProperty(ctx, name, getter) + * + * Adds a property to the prototype of an object. + * + * utils.addProperty(chai.Assertion.prototype, 'foo', function () { + * var obj = utils.flag(this, 'object'); + * new chai.Assertion(obj).to.be.instanceof(Foo); + * }); + * + * Can also be accessed directly from `chai.Assertion`. + * + * chai.Assertion.addProperty('foo', fn); + * + * Then can be used as any other assertion. + * + * expect(myFoo).to.be.foo; + * + * @param {Object} ctx object to which the property is added + * @param {String} name of property to add + * @param {Function} getter function to be used for name + * @namespace Utils + * @name addProperty + * @api public + */ + +module.exports = function addProperty(ctx, name, getter) { + getter = getter === undefined ? function () {} : getter; + + Object.defineProperty(ctx, name, + { get: function propertyGetter() { + // Setting the `ssfi` flag to `propertyGetter` causes this function to + // be the starting point for removing implementation frames from the + // stack trace of a failed assertion. + // + // However, we only want to use this function as the starting point if + // the `lockSsfi` flag isn't set and proxy protection is disabled. + // + // If the `lockSsfi` flag is set, then either this assertion has been + // overwritten by another assertion, or this assertion is being invoked + // from inside of another assertion. In the first case, the `ssfi` flag + // has already been set by the overwriting assertion. In the second + // case, the `ssfi` flag has already been set by the outer assertion. + // + // If proxy protection is enabled, then the `ssfi` flag has already been + // set by the proxy getter. + if (!isProxyEnabled() && !flag(this, 'lockSsfi')) { + flag(this, 'ssfi', propertyGetter); + } + + var result = getter.call(this); + if (result !== undefined) + return result; + + var newAssertion = new chai.Assertion(); + transferFlags(this, newAssertion); + return newAssertion; + } + , configurable: true + }); +}; diff --git a/node_modules/chai/lib/chai/utils/compareByInspect.js b/node_modules/chai/lib/chai/utils/compareByInspect.js new file mode 100644 index 00000000..c8cd5e19 --- /dev/null +++ b/node_modules/chai/lib/chai/utils/compareByInspect.js @@ -0,0 +1,31 @@ +/*! + * Chai - compareByInspect utility + * Copyright(c) 2011-2016 Jake Luer + * MIT Licensed + */ + +/*! + * Module dependencies + */ + +var inspect = require('./inspect'); + +/** + * ### .compareByInspect(mixed, mixed) + * + * To be used as a compareFunction with Array.prototype.sort. Compares elements + * using inspect instead of default behavior of using toString so that Symbols + * and objects with irregular/missing toString can still be sorted without a + * TypeError. + * + * @param {Mixed} first element to compare + * @param {Mixed} second element to compare + * @returns {Number} -1 if 'a' should come before 'b'; otherwise 1 + * @name compareByInspect + * @namespace Utils + * @api public + */ + +module.exports = function compareByInspect(a, b) { + return inspect(a) < inspect(b) ? -1 : 1; +}; diff --git a/node_modules/chai/lib/chai/utils/expectTypes.js b/node_modules/chai/lib/chai/utils/expectTypes.js new file mode 100644 index 00000000..6293db74 --- /dev/null +++ b/node_modules/chai/lib/chai/utils/expectTypes.js @@ -0,0 +1,51 @@ +/*! + * Chai - expectTypes utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/** + * ### .expectTypes(obj, types) + * + * Ensures that the object being tested against is of a valid type. + * + * utils.expectTypes(this, ['array', 'object', 'string']); + * + * @param {Mixed} obj constructed Assertion + * @param {Array} type A list of allowed types for this assertion + * @namespace Utils + * @name expectTypes + * @api public + */ + +var AssertionError = require('assertion-error'); +var flag = require('./flag'); +var type = require('type-detect'); + +module.exports = function expectTypes(obj, types) { + var flagMsg = flag(obj, 'message'); + var ssfi = flag(obj, 'ssfi'); + + flagMsg = flagMsg ? flagMsg + ': ' : ''; + + obj = flag(obj, 'object'); + types = types.map(function (t) { return t.toLowerCase(); }); + types.sort(); + + // Transforms ['lorem', 'ipsum'] into 'a lorem, or an ipsum' + var str = types.map(function (t, index) { + var art = ~[ 'a', 'e', 'i', 'o', 'u' ].indexOf(t.charAt(0)) ? 'an' : 'a'; + var or = types.length > 1 && index === types.length - 1 ? 'or ' : ''; + return or + art + ' ' + t; + }).join(', '); + + var objType = type(obj).toLowerCase(); + + if (!types.some(function (expected) { return objType === expected; })) { + throw new AssertionError( + flagMsg + 'object tested must be ' + str + ', but ' + objType + ' given', + undefined, + ssfi + ); + } +}; diff --git a/node_modules/chai/lib/chai/utils/flag.js b/node_modules/chai/lib/chai/utils/flag.js new file mode 100644 index 00000000..dd53bfbf --- /dev/null +++ b/node_modules/chai/lib/chai/utils/flag.js @@ -0,0 +1,33 @@ +/*! + * Chai - flag utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/** + * ### .flag(object, key, [value]) + * + * Get or set a flag value on an object. If a + * value is provided it will be set, else it will + * return the currently set value or `undefined` if + * the value is not set. + * + * utils.flag(this, 'foo', 'bar'); // setter + * utils.flag(this, 'foo'); // getter, returns `bar` + * + * @param {Object} object constructed Assertion + * @param {String} key + * @param {Mixed} value (optional) + * @namespace Utils + * @name flag + * @api private + */ + +module.exports = function flag(obj, key, value) { + var flags = obj.__flags || (obj.__flags = Object.create(null)); + if (arguments.length === 3) { + flags[key] = value; + } else { + return flags[key]; + } +}; diff --git a/node_modules/chai/lib/chai/utils/getActual.js b/node_modules/chai/lib/chai/utils/getActual.js new file mode 100644 index 00000000..976e1125 --- /dev/null +++ b/node_modules/chai/lib/chai/utils/getActual.js @@ -0,0 +1,20 @@ +/*! + * Chai - getActual utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/** + * ### .getActual(object, [actual]) + * + * Returns the `actual` value for an Assertion. + * + * @param {Object} object (constructed Assertion) + * @param {Arguments} chai.Assertion.prototype.assert arguments + * @namespace Utils + * @name getActual + */ + +module.exports = function getActual(obj, args) { + return args.length > 4 ? args[4] : obj._obj; +}; diff --git a/node_modules/chai/lib/chai/utils/getEnumerableProperties.js b/node_modules/chai/lib/chai/utils/getEnumerableProperties.js new file mode 100644 index 00000000..a84252cf --- /dev/null +++ b/node_modules/chai/lib/chai/utils/getEnumerableProperties.js @@ -0,0 +1,26 @@ +/*! + * Chai - getEnumerableProperties utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/** + * ### .getEnumerableProperties(object) + * + * This allows the retrieval of enumerable property names of an object, + * inherited or not. + * + * @param {Object} object + * @returns {Array} + * @namespace Utils + * @name getEnumerableProperties + * @api public + */ + +module.exports = function getEnumerableProperties(object) { + var result = []; + for (var name in object) { + result.push(name); + } + return result; +}; diff --git a/node_modules/chai/lib/chai/utils/getMessage.js b/node_modules/chai/lib/chai/utils/getMessage.js new file mode 100644 index 00000000..bb837166 --- /dev/null +++ b/node_modules/chai/lib/chai/utils/getMessage.js @@ -0,0 +1,50 @@ +/*! + * Chai - message composition utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/*! + * Module dependencies + */ + +var flag = require('./flag') + , getActual = require('./getActual') + , objDisplay = require('./objDisplay'); + +/** + * ### .getMessage(object, message, negateMessage) + * + * Construct the error message based on flags + * and template tags. Template tags will return + * a stringified inspection of the object referenced. + * + * Message template tags: + * - `#{this}` current asserted object + * - `#{act}` actual value + * - `#{exp}` expected value + * + * @param {Object} object (constructed Assertion) + * @param {Arguments} chai.Assertion.prototype.assert arguments + * @namespace Utils + * @name getMessage + * @api public + */ + +module.exports = function getMessage(obj, args) { + var negate = flag(obj, 'negate') + , val = flag(obj, 'object') + , expected = args[3] + , actual = getActual(obj, args) + , msg = negate ? args[2] : args[1] + , flagMsg = flag(obj, 'message'); + + if(typeof msg === "function") msg = msg(); + msg = msg || ''; + msg = msg + .replace(/#\{this\}/g, function () { return objDisplay(val); }) + .replace(/#\{act\}/g, function () { return objDisplay(actual); }) + .replace(/#\{exp\}/g, function () { return objDisplay(expected); }); + + return flagMsg ? flagMsg + ': ' + msg : msg; +}; diff --git a/node_modules/chai/lib/chai/utils/getOwnEnumerableProperties.js b/node_modules/chai/lib/chai/utils/getOwnEnumerableProperties.js new file mode 100644 index 00000000..a4aa83a4 --- /dev/null +++ b/node_modules/chai/lib/chai/utils/getOwnEnumerableProperties.js @@ -0,0 +1,29 @@ +/*! + * Chai - getOwnEnumerableProperties utility + * Copyright(c) 2011-2016 Jake Luer + * MIT Licensed + */ + +/*! + * Module dependencies + */ + +var getOwnEnumerablePropertySymbols = require('./getOwnEnumerablePropertySymbols'); + +/** + * ### .getOwnEnumerableProperties(object) + * + * This allows the retrieval of directly-owned enumerable property names and + * symbols of an object. This function is necessary because Object.keys only + * returns enumerable property names, not enumerable property symbols. + * + * @param {Object} object + * @returns {Array} + * @namespace Utils + * @name getOwnEnumerableProperties + * @api public + */ + +module.exports = function getOwnEnumerableProperties(obj) { + return Object.keys(obj).concat(getOwnEnumerablePropertySymbols(obj)); +}; diff --git a/node_modules/chai/lib/chai/utils/getOwnEnumerablePropertySymbols.js b/node_modules/chai/lib/chai/utils/getOwnEnumerablePropertySymbols.js new file mode 100644 index 00000000..823c6b7a --- /dev/null +++ b/node_modules/chai/lib/chai/utils/getOwnEnumerablePropertySymbols.js @@ -0,0 +1,27 @@ +/*! + * Chai - getOwnEnumerablePropertySymbols utility + * Copyright(c) 2011-2016 Jake Luer + * MIT Licensed + */ + +/** + * ### .getOwnEnumerablePropertySymbols(object) + * + * This allows the retrieval of directly-owned enumerable property symbols of an + * object. This function is necessary because Object.getOwnPropertySymbols + * returns both enumerable and non-enumerable property symbols. + * + * @param {Object} object + * @returns {Array} + * @namespace Utils + * @name getOwnEnumerablePropertySymbols + * @api public + */ + +module.exports = function getOwnEnumerablePropertySymbols(obj) { + if (typeof Object.getOwnPropertySymbols !== 'function') return []; + + return Object.getOwnPropertySymbols(obj).filter(function (sym) { + return Object.getOwnPropertyDescriptor(obj, sym).enumerable; + }); +}; diff --git a/node_modules/chai/lib/chai/utils/getProperties.js b/node_modules/chai/lib/chai/utils/getProperties.js new file mode 100644 index 00000000..ccf9631a --- /dev/null +++ b/node_modules/chai/lib/chai/utils/getProperties.js @@ -0,0 +1,36 @@ +/*! + * Chai - getProperties utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/** + * ### .getProperties(object) + * + * This allows the retrieval of property names of an object, enumerable or not, + * inherited or not. + * + * @param {Object} object + * @returns {Array} + * @namespace Utils + * @name getProperties + * @api public + */ + +module.exports = function getProperties(object) { + var result = Object.getOwnPropertyNames(object); + + function addProperty(property) { + if (result.indexOf(property) === -1) { + result.push(property); + } + } + + var proto = Object.getPrototypeOf(object); + while (proto !== null) { + Object.getOwnPropertyNames(proto).forEach(addProperty); + proto = Object.getPrototypeOf(proto); + } + + return result; +}; diff --git a/node_modules/chai/lib/chai/utils/index.js b/node_modules/chai/lib/chai/utils/index.js new file mode 100644 index 00000000..d4f329c7 --- /dev/null +++ b/node_modules/chai/lib/chai/utils/index.js @@ -0,0 +1,172 @@ +/*! + * chai + * Copyright(c) 2011 Jake Luer + * MIT Licensed + */ + +/*! + * Dependencies that are used for multiple exports are required here only once + */ + +var pathval = require('pathval'); + +/*! + * test utility + */ + +exports.test = require('./test'); + +/*! + * type utility + */ + +exports.type = require('type-detect'); + +/*! + * expectTypes utility + */ +exports.expectTypes = require('./expectTypes'); + +/*! + * message utility + */ + +exports.getMessage = require('./getMessage'); + +/*! + * actual utility + */ + +exports.getActual = require('./getActual'); + +/*! + * Inspect util + */ + +exports.inspect = require('./inspect'); + +/*! + * Object Display util + */ + +exports.objDisplay = require('./objDisplay'); + +/*! + * Flag utility + */ + +exports.flag = require('./flag'); + +/*! + * Flag transferring utility + */ + +exports.transferFlags = require('./transferFlags'); + +/*! + * Deep equal utility + */ + +exports.eql = require('deep-eql'); + +/*! + * Deep path info + */ + +exports.getPathInfo = pathval.getPathInfo; + +/*! + * Check if a property exists + */ + +exports.hasProperty = pathval.hasProperty; + +/*! + * Function name + */ + +exports.getName = require('get-func-name'); + +/*! + * add Property + */ + +exports.addProperty = require('./addProperty'); + +/*! + * add Method + */ + +exports.addMethod = require('./addMethod'); + +/*! + * overwrite Property + */ + +exports.overwriteProperty = require('./overwriteProperty'); + +/*! + * overwrite Method + */ + +exports.overwriteMethod = require('./overwriteMethod'); + +/*! + * Add a chainable method + */ + +exports.addChainableMethod = require('./addChainableMethod'); + +/*! + * Overwrite chainable method + */ + +exports.overwriteChainableMethod = require('./overwriteChainableMethod'); + +/*! + * Compare by inspect method + */ + +exports.compareByInspect = require('./compareByInspect'); + +/*! + * Get own enumerable property symbols method + */ + +exports.getOwnEnumerablePropertySymbols = require('./getOwnEnumerablePropertySymbols'); + +/*! + * Get own enumerable properties method + */ + +exports.getOwnEnumerableProperties = require('./getOwnEnumerableProperties'); + +/*! + * Checks error against a given set of criteria + */ + +exports.checkError = require('check-error'); + +/*! + * Proxify util + */ + +exports.proxify = require('./proxify'); + +/*! + * addLengthGuard util + */ + +exports.addLengthGuard = require('./addLengthGuard'); + +/*! + * isProxyEnabled helper + */ + +exports.isProxyEnabled = require('./isProxyEnabled'); + +/*! + * isNaN method + */ + +exports.isNaN = require('./isNaN'); diff --git a/node_modules/chai/lib/chai/utils/inspect.js b/node_modules/chai/lib/chai/utils/inspect.js new file mode 100644 index 00000000..b054aeba --- /dev/null +++ b/node_modules/chai/lib/chai/utils/inspect.js @@ -0,0 +1,376 @@ +// This is (almost) directly from Node.js utils +// https://github.com/joyent/node/blob/f8c335d0caf47f16d31413f89aa28eda3878e3aa/lib/util.js + +var getName = require('get-func-name'); +var getProperties = require('./getProperties'); +var getEnumerableProperties = require('./getEnumerableProperties'); +var config = require('../config'); + +module.exports = inspect; + +/** + * ### .inspect(obj, [showHidden], [depth], [colors]) + * + * Echoes the value of a value. Tries to print the value out + * in the best way possible given the different types. + * + * @param {Object} obj The object to print out. + * @param {Boolean} showHidden Flag that shows hidden (not enumerable) + * properties of objects. Default is false. + * @param {Number} depth Depth in which to descend in object. Default is 2. + * @param {Boolean} colors Flag to turn on ANSI escape codes to color the + * output. Default is false (no coloring). + * @namespace Utils + * @name inspect + */ +function inspect(obj, showHidden, depth, colors) { + var ctx = { + showHidden: showHidden, + seen: [], + stylize: function (str) { return str; } + }; + return formatValue(ctx, obj, (typeof depth === 'undefined' ? 2 : depth)); +} + +// Returns true if object is a DOM element. +var isDOMElement = function (object) { + if (typeof HTMLElement === 'object') { + return object instanceof HTMLElement; + } else { + return object && + typeof object === 'object' && + 'nodeType' in object && + object.nodeType === 1 && + typeof object.nodeName === 'string'; + } +}; + +function formatValue(ctx, value, recurseTimes) { + // Provide a hook for user-specified inspect functions. + // Check that value is an object with an inspect function on it + if (value && typeof value.inspect === 'function' && + // Filter out the util module, it's inspect function is special + value.inspect !== exports.inspect && + // Also filter out any prototype objects using the circular check. + !(value.constructor && value.constructor.prototype === value)) { + var ret = value.inspect(recurseTimes, ctx); + if (typeof ret !== 'string') { + ret = formatValue(ctx, ret, recurseTimes); + } + return ret; + } + + // Primitive types cannot have properties + var primitive = formatPrimitive(ctx, value); + if (primitive) { + return primitive; + } + + // If this is a DOM element, try to get the outer HTML. + if (isDOMElement(value)) { + if ('outerHTML' in value) { + return value.outerHTML; + // This value does not have an outerHTML attribute, + // it could still be an XML element + } else { + // Attempt to serialize it + try { + if (document.xmlVersion) { + var xmlSerializer = new XMLSerializer(); + return xmlSerializer.serializeToString(value); + } else { + // Firefox 11- do not support outerHTML + // It does, however, support innerHTML + // Use the following to render the element + var ns = "http://www.w3.org/1999/xhtml"; + var container = document.createElementNS(ns, '_'); + + container.appendChild(value.cloneNode(false)); + var html = container.innerHTML + .replace('><', '>' + value.innerHTML + '<'); + container.innerHTML = ''; + return html; + } + } catch (err) { + // This could be a non-native DOM implementation, + // continue with the normal flow: + // printing the element as if it is an object. + } + } + } + + // Look up the keys of the object. + var visibleKeys = getEnumerableProperties(value); + var keys = ctx.showHidden ? getProperties(value) : visibleKeys; + + var name, nameSuffix; + + // Some type of object without properties can be shortcut. + // In IE, errors have a single `stack` property, or if they are vanilla `Error`, + // a `stack` plus `description` property; ignore those for consistency. + if (keys.length === 0 || (isError(value) && ( + (keys.length === 1 && keys[0] === 'stack') || + (keys.length === 2 && keys[0] === 'description' && keys[1] === 'stack') + ))) { + if (typeof value === 'function') { + name = getName(value); + nameSuffix = name ? ': ' + name : ''; + return ctx.stylize('[Function' + nameSuffix + ']', 'special'); + } + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } + if (isDate(value)) { + return ctx.stylize(Date.prototype.toUTCString.call(value), 'date'); + } + if (isError(value)) { + return formatError(value); + } + } + + var base = '' + , array = false + , typedArray = false + , braces = ['{', '}']; + + if (isTypedArray(value)) { + typedArray = true; + braces = ['[', ']']; + } + + // Make Array say that they are Array + if (isArray(value)) { + array = true; + braces = ['[', ']']; + } + + // Make functions say that they are functions + if (typeof value === 'function') { + name = getName(value); + nameSuffix = name ? ': ' + name : ''; + base = ' [Function' + nameSuffix + ']'; + } + + // Make RegExps say that they are RegExps + if (isRegExp(value)) { + base = ' ' + RegExp.prototype.toString.call(value); + } + + // Make dates with properties first say the date + if (isDate(value)) { + base = ' ' + Date.prototype.toUTCString.call(value); + } + + // Make error with message first say the error + if (isError(value)) { + return formatError(value); + } + + if (keys.length === 0 && (!array || value.length == 0)) { + return braces[0] + base + braces[1]; + } + + if (recurseTimes < 0) { + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } else { + return ctx.stylize('[Object]', 'special'); + } + } + + ctx.seen.push(value); + + var output; + if (array) { + output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); + } else if (typedArray) { + return formatTypedArray(value); + } else { + output = keys.map(function(key) { + return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); + }); + } + + ctx.seen.pop(); + + return reduceToSingleString(output, base, braces); +} + +function formatPrimitive(ctx, value) { + switch (typeof value) { + case 'undefined': + return ctx.stylize('undefined', 'undefined'); + + case 'string': + var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') + .replace(/'/g, "\\'") + .replace(/\\"/g, '"') + '\''; + return ctx.stylize(simple, 'string'); + + case 'number': + if (value === 0 && (1/value) === -Infinity) { + return ctx.stylize('-0', 'number'); + } + return ctx.stylize('' + value, 'number'); + + case 'boolean': + return ctx.stylize('' + value, 'boolean'); + + case 'symbol': + return ctx.stylize(value.toString(), 'symbol'); + } + // For some reason typeof null is "object", so special case here. + if (value === null) { + return ctx.stylize('null', 'null'); + } +} + +function formatError(value) { + return '[' + Error.prototype.toString.call(value) + ']'; +} + +function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { + var output = []; + for (var i = 0, l = value.length; i < l; ++i) { + if (Object.prototype.hasOwnProperty.call(value, String(i))) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + String(i), true)); + } else { + output.push(''); + } + } + + keys.forEach(function(key) { + if (!key.match(/^\d+$/)) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + key, true)); + } + }); + return output; +} + +function formatTypedArray(value) { + var str = '[ '; + + for (var i = 0; i < value.length; ++i) { + if (str.length >= config.truncateThreshold - 7) { + str += '...'; + break; + } + str += value[i] + ', '; + } + str += ' ]'; + + // Removing trailing `, ` if the array was not truncated + if (str.indexOf(', ]') !== -1) { + str = str.replace(', ]', ' ]'); + } + + return str; +} + +function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { + var name; + var propDescriptor = Object.getOwnPropertyDescriptor(value, key); + var str; + + if (propDescriptor) { + if (propDescriptor.get) { + if (propDescriptor.set) { + str = ctx.stylize('[Getter/Setter]', 'special'); + } else { + str = ctx.stylize('[Getter]', 'special'); + } + } else { + if (propDescriptor.set) { + str = ctx.stylize('[Setter]', 'special'); + } + } + } + if (visibleKeys.indexOf(key) < 0) { + name = '[' + key + ']'; + } + if (!str) { + if (ctx.seen.indexOf(value[key]) < 0) { + if (recurseTimes === null) { + str = formatValue(ctx, value[key], null); + } else { + str = formatValue(ctx, value[key], recurseTimes - 1); + } + if (str.indexOf('\n') > -1) { + if (array) { + str = str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n').substr(2); + } else { + str = '\n' + str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n'); + } + } + } else { + str = ctx.stylize('[Circular]', 'special'); + } + } + if (typeof name === 'undefined') { + if (array && key.match(/^\d+$/)) { + return str; + } + name = JSON.stringify('' + key); + if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { + name = name.substr(1, name.length - 2); + name = ctx.stylize(name, 'name'); + } else { + name = name.replace(/'/g, "\\'") + .replace(/\\"/g, '"') + .replace(/(^"|"$)/g, "'"); + name = ctx.stylize(name, 'string'); + } + } + + return name + ': ' + str; +} + +function reduceToSingleString(output, base, braces) { + var length = output.reduce(function(prev, cur) { + return prev + cur.length + 1; + }, 0); + + if (length > 60) { + return braces[0] + + (base === '' ? '' : base + '\n ') + + ' ' + + output.join(',\n ') + + ' ' + + braces[1]; + } + + return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; +} + +function isTypedArray(ar) { + // Unfortunately there's no way to check if an object is a TypedArray + // We have to check if it's one of these types + return (typeof ar === 'object' && /\w+Array]$/.test(objectToString(ar))); +} + +function isArray(ar) { + return Array.isArray(ar) || + (typeof ar === 'object' && objectToString(ar) === '[object Array]'); +} + +function isRegExp(re) { + return typeof re === 'object' && objectToString(re) === '[object RegExp]'; +} + +function isDate(d) { + return typeof d === 'object' && objectToString(d) === '[object Date]'; +} + +function isError(e) { + return typeof e === 'object' && objectToString(e) === '[object Error]'; +} + +function objectToString(o) { + return Object.prototype.toString.call(o); +} diff --git a/node_modules/chai/lib/chai/utils/isNaN.js b/node_modules/chai/lib/chai/utils/isNaN.js new file mode 100644 index 00000000..d64f7f4a --- /dev/null +++ b/node_modules/chai/lib/chai/utils/isNaN.js @@ -0,0 +1,26 @@ +/*! + * Chai - isNaN utility + * Copyright(c) 2012-2015 Sakthipriyan Vairamani + * MIT Licensed + */ + +/** + * ### .isNaN(value) + * + * Checks if the given value is NaN or not. + * + * utils.isNaN(NaN); // true + * + * @param {Value} The value which has to be checked if it is NaN + * @name isNaN + * @api private + */ + +function isNaN(value) { + // Refer http://www.ecma-international.org/ecma-262/6.0/#sec-isnan-number + // section's NOTE. + return value !== value; +} + +// If ECMAScript 6's Number.isNaN is present, prefer that. +module.exports = Number.isNaN || isNaN; diff --git a/node_modules/chai/lib/chai/utils/isProxyEnabled.js b/node_modules/chai/lib/chai/utils/isProxyEnabled.js new file mode 100644 index 00000000..11e58edf --- /dev/null +++ b/node_modules/chai/lib/chai/utils/isProxyEnabled.js @@ -0,0 +1,24 @@ +var config = require('../config'); + +/*! + * Chai - isProxyEnabled helper + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/** + * ### .isProxyEnabled() + * + * Helper function to check if Chai's proxy protection feature is enabled. If + * proxies are unsupported or disabled via the user's Chai config, then return + * false. Otherwise, return true. + * + * @namespace Utils + * @name isProxyEnabled + */ + +module.exports = function isProxyEnabled() { + return config.useProxy && + typeof Proxy !== 'undefined' && + typeof Reflect !== 'undefined'; +}; diff --git a/node_modules/chai/lib/chai/utils/objDisplay.js b/node_modules/chai/lib/chai/utils/objDisplay.js new file mode 100644 index 00000000..3010f46d --- /dev/null +++ b/node_modules/chai/lib/chai/utils/objDisplay.js @@ -0,0 +1,50 @@ +/*! + * Chai - flag utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/*! + * Module dependencies + */ + +var inspect = require('./inspect'); +var config = require('../config'); + +/** + * ### .objDisplay(object) + * + * Determines if an object or an array matches + * criteria to be inspected in-line for error + * messages or should be truncated. + * + * @param {Mixed} javascript object to inspect + * @name objDisplay + * @namespace Utils + * @api public + */ + +module.exports = function objDisplay(obj) { + var str = inspect(obj) + , type = Object.prototype.toString.call(obj); + + if (config.truncateThreshold && str.length >= config.truncateThreshold) { + if (type === '[object Function]') { + return !obj.name || obj.name === '' + ? '[Function]' + : '[Function: ' + obj.name + ']'; + } else if (type === '[object Array]') { + return '[ Array(' + obj.length + ') ]'; + } else if (type === '[object Object]') { + var keys = Object.keys(obj) + , kstr = keys.length > 2 + ? keys.splice(0, 2).join(', ') + ', ...' + : keys.join(', '); + return '{ Object (' + kstr + ') }'; + } else { + return str; + } + } else { + return str; + } +}; diff --git a/node_modules/chai/lib/chai/utils/overwriteChainableMethod.js b/node_modules/chai/lib/chai/utils/overwriteChainableMethod.js new file mode 100644 index 00000000..4b38569e --- /dev/null +++ b/node_modules/chai/lib/chai/utils/overwriteChainableMethod.js @@ -0,0 +1,69 @@ +/*! + * Chai - overwriteChainableMethod utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +var chai = require('../../chai'); +var transferFlags = require('./transferFlags'); + +/** + * ### .overwriteChainableMethod(ctx, name, method, chainingBehavior) + * + * Overwrites an already existing chainable method + * and provides access to the previous function or + * property. Must return functions to be used for + * name. + * + * utils.overwriteChainableMethod(chai.Assertion.prototype, 'lengthOf', + * function (_super) { + * } + * , function (_super) { + * } + * ); + * + * Can also be accessed directly from `chai.Assertion`. + * + * chai.Assertion.overwriteChainableMethod('foo', fn, fn); + * + * Then can be used as any other assertion. + * + * expect(myFoo).to.have.lengthOf(3); + * expect(myFoo).to.have.lengthOf.above(3); + * + * @param {Object} ctx object whose method / property is to be overwritten + * @param {String} name of method / property to overwrite + * @param {Function} method function that returns a function to be used for name + * @param {Function} chainingBehavior function that returns a function to be used for property + * @namespace Utils + * @name overwriteChainableMethod + * @api public + */ + +module.exports = function overwriteChainableMethod(ctx, name, method, chainingBehavior) { + var chainableBehavior = ctx.__methods[name]; + + var _chainingBehavior = chainableBehavior.chainingBehavior; + chainableBehavior.chainingBehavior = function overwritingChainableMethodGetter() { + var result = chainingBehavior(_chainingBehavior).call(this); + if (result !== undefined) { + return result; + } + + var newAssertion = new chai.Assertion(); + transferFlags(this, newAssertion); + return newAssertion; + }; + + var _method = chainableBehavior.method; + chainableBehavior.method = function overwritingChainableMethodWrapper() { + var result = method(_method).apply(this, arguments); + if (result !== undefined) { + return result; + } + + var newAssertion = new chai.Assertion(); + transferFlags(this, newAssertion); + return newAssertion; + }; +}; diff --git a/node_modules/chai/lib/chai/utils/overwriteMethod.js b/node_modules/chai/lib/chai/utils/overwriteMethod.js new file mode 100644 index 00000000..7925e05f --- /dev/null +++ b/node_modules/chai/lib/chai/utils/overwriteMethod.js @@ -0,0 +1,92 @@ +/*! + * Chai - overwriteMethod utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +var addLengthGuard = require('./addLengthGuard'); +var chai = require('../../chai'); +var flag = require('./flag'); +var proxify = require('./proxify'); +var transferFlags = require('./transferFlags'); + +/** + * ### .overwriteMethod(ctx, name, fn) + * + * Overwrites an already existing method and provides + * access to previous function. Must return function + * to be used for name. + * + * utils.overwriteMethod(chai.Assertion.prototype, 'equal', function (_super) { + * return function (str) { + * var obj = utils.flag(this, 'object'); + * if (obj instanceof Foo) { + * new chai.Assertion(obj.value).to.equal(str); + * } else { + * _super.apply(this, arguments); + * } + * } + * }); + * + * Can also be accessed directly from `chai.Assertion`. + * + * chai.Assertion.overwriteMethod('foo', fn); + * + * Then can be used as any other assertion. + * + * expect(myFoo).to.equal('bar'); + * + * @param {Object} ctx object whose method is to be overwritten + * @param {String} name of method to overwrite + * @param {Function} method function that returns a function to be used for name + * @namespace Utils + * @name overwriteMethod + * @api public + */ + +module.exports = function overwriteMethod(ctx, name, method) { + var _method = ctx[name] + , _super = function () { + throw new Error(name + ' is not a function'); + }; + + if (_method && 'function' === typeof _method) + _super = _method; + + var overwritingMethodWrapper = function () { + // Setting the `ssfi` flag to `overwritingMethodWrapper` causes this + // function to be the starting point for removing implementation frames from + // the stack trace of a failed assertion. + // + // However, we only want to use this function as the starting point if the + // `lockSsfi` flag isn't set. + // + // If the `lockSsfi` flag is set, then either this assertion has been + // overwritten by another assertion, or this assertion is being invoked from + // inside of another assertion. In the first case, the `ssfi` flag has + // already been set by the overwriting assertion. In the second case, the + // `ssfi` flag has already been set by the outer assertion. + if (!flag(this, 'lockSsfi')) { + flag(this, 'ssfi', overwritingMethodWrapper); + } + + // Setting the `lockSsfi` flag to `true` prevents the overwritten assertion + // from changing the `ssfi` flag. By this point, the `ssfi` flag is already + // set to the correct starting point for this assertion. + var origLockSsfi = flag(this, 'lockSsfi'); + flag(this, 'lockSsfi', true); + var result = method(_super).apply(this, arguments); + flag(this, 'lockSsfi', origLockSsfi); + + if (result !== undefined) { + return result; + } + + var newAssertion = new chai.Assertion(); + transferFlags(this, newAssertion); + return newAssertion; + } + + addLengthGuard(overwritingMethodWrapper, name, false); + ctx[name] = proxify(overwritingMethodWrapper, name); +}; diff --git a/node_modules/chai/lib/chai/utils/overwriteProperty.js b/node_modules/chai/lib/chai/utils/overwriteProperty.js new file mode 100644 index 00000000..5f870b02 --- /dev/null +++ b/node_modules/chai/lib/chai/utils/overwriteProperty.js @@ -0,0 +1,92 @@ +/*! + * Chai - overwriteProperty utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +var chai = require('../../chai'); +var flag = require('./flag'); +var isProxyEnabled = require('./isProxyEnabled'); +var transferFlags = require('./transferFlags'); + +/** + * ### .overwriteProperty(ctx, name, fn) + * + * Overwrites an already existing property getter and provides + * access to previous value. Must return function to use as getter. + * + * utils.overwriteProperty(chai.Assertion.prototype, 'ok', function (_super) { + * return function () { + * var obj = utils.flag(this, 'object'); + * if (obj instanceof Foo) { + * new chai.Assertion(obj.name).to.equal('bar'); + * } else { + * _super.call(this); + * } + * } + * }); + * + * + * Can also be accessed directly from `chai.Assertion`. + * + * chai.Assertion.overwriteProperty('foo', fn); + * + * Then can be used as any other assertion. + * + * expect(myFoo).to.be.ok; + * + * @param {Object} ctx object whose property is to be overwritten + * @param {String} name of property to overwrite + * @param {Function} getter function that returns a getter function to be used for name + * @namespace Utils + * @name overwriteProperty + * @api public + */ + +module.exports = function overwriteProperty(ctx, name, getter) { + var _get = Object.getOwnPropertyDescriptor(ctx, name) + , _super = function () {}; + + if (_get && 'function' === typeof _get.get) + _super = _get.get + + Object.defineProperty(ctx, name, + { get: function overwritingPropertyGetter() { + // Setting the `ssfi` flag to `overwritingPropertyGetter` causes this + // function to be the starting point for removing implementation frames + // from the stack trace of a failed assertion. + // + // However, we only want to use this function as the starting point if + // the `lockSsfi` flag isn't set and proxy protection is disabled. + // + // If the `lockSsfi` flag is set, then either this assertion has been + // overwritten by another assertion, or this assertion is being invoked + // from inside of another assertion. In the first case, the `ssfi` flag + // has already been set by the overwriting assertion. In the second + // case, the `ssfi` flag has already been set by the outer assertion. + // + // If proxy protection is enabled, then the `ssfi` flag has already been + // set by the proxy getter. + if (!isProxyEnabled() && !flag(this, 'lockSsfi')) { + flag(this, 'ssfi', overwritingPropertyGetter); + } + + // Setting the `lockSsfi` flag to `true` prevents the overwritten + // assertion from changing the `ssfi` flag. By this point, the `ssfi` + // flag is already set to the correct starting point for this assertion. + var origLockSsfi = flag(this, 'lockSsfi'); + flag(this, 'lockSsfi', true); + var result = getter(_super).call(this); + flag(this, 'lockSsfi', origLockSsfi); + + if (result !== undefined) { + return result; + } + + var newAssertion = new chai.Assertion(); + transferFlags(this, newAssertion); + return newAssertion; + } + , configurable: true + }); +}; diff --git a/node_modules/chai/lib/chai/utils/proxify.js b/node_modules/chai/lib/chai/utils/proxify.js new file mode 100644 index 00000000..4bbbee38 --- /dev/null +++ b/node_modules/chai/lib/chai/utils/proxify.js @@ -0,0 +1,147 @@ +var config = require('../config'); +var flag = require('./flag'); +var getProperties = require('./getProperties'); +var isProxyEnabled = require('./isProxyEnabled'); + +/*! + * Chai - proxify utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/** + * ### .proxify(object) + * + * Return a proxy of given object that throws an error when a non-existent + * property is read. By default, the root cause is assumed to be a misspelled + * property, and thus an attempt is made to offer a reasonable suggestion from + * the list of existing properties. However, if a nonChainableMethodName is + * provided, then the root cause is instead a failure to invoke a non-chainable + * method prior to reading the non-existent property. + * + * If proxies are unsupported or disabled via the user's Chai config, then + * return object without modification. + * + * @param {Object} obj + * @param {String} nonChainableMethodName + * @namespace Utils + * @name proxify + */ + +var builtins = ['__flags', '__methods', '_obj', 'assert']; + +module.exports = function proxify(obj, nonChainableMethodName) { + if (!isProxyEnabled()) return obj; + + return new Proxy(obj, { + get: function proxyGetter(target, property) { + // This check is here because we should not throw errors on Symbol properties + // such as `Symbol.toStringTag`. + // The values for which an error should be thrown can be configured using + // the `config.proxyExcludedKeys` setting. + if (typeof property === 'string' && + config.proxyExcludedKeys.indexOf(property) === -1 && + !Reflect.has(target, property)) { + // Special message for invalid property access of non-chainable methods. + if (nonChainableMethodName) { + throw Error('Invalid Chai property: ' + nonChainableMethodName + '.' + + property + '. See docs for proper usage of "' + + nonChainableMethodName + '".'); + } + + // If the property is reasonably close to an existing Chai property, + // suggest that property to the user. Only suggest properties with a + // distance less than 4. + var suggestion = null; + var suggestionDistance = 4; + getProperties(target).forEach(function(prop) { + if ( + !Object.prototype.hasOwnProperty(prop) && + builtins.indexOf(prop) === -1 + ) { + var dist = stringDistanceCapped( + property, + prop, + suggestionDistance + ); + if (dist < suggestionDistance) { + suggestion = prop; + suggestionDistance = dist; + } + } + }); + + if (suggestion !== null) { + throw Error('Invalid Chai property: ' + property + + '. Did you mean "' + suggestion + '"?'); + } else { + throw Error('Invalid Chai property: ' + property); + } + } + + // Use this proxy getter as the starting point for removing implementation + // frames from the stack trace of a failed assertion. For property + // assertions, this prevents the proxy getter from showing up in the stack + // trace since it's invoked before the property getter. For method and + // chainable method assertions, this flag will end up getting changed to + // the method wrapper, which is good since this frame will no longer be in + // the stack once the method is invoked. Note that Chai builtin assertion + // properties such as `__flags` are skipped since this is only meant to + // capture the starting point of an assertion. This step is also skipped + // if the `lockSsfi` flag is set, thus indicating that this assertion is + // being called from within another assertion. In that case, the `ssfi` + // flag is already set to the outer assertion's starting point. + if (builtins.indexOf(property) === -1 && !flag(target, 'lockSsfi')) { + flag(target, 'ssfi', proxyGetter); + } + + return Reflect.get(target, property); + } + }); +}; + +/** + * # stringDistanceCapped(strA, strB, cap) + * Return the Levenshtein distance between two strings, but no more than cap. + * @param {string} strA + * @param {string} strB + * @param {number} number + * @return {number} min(string distance between strA and strB, cap) + * @api private + */ + +function stringDistanceCapped(strA, strB, cap) { + if (Math.abs(strA.length - strB.length) >= cap) { + return cap; + } + + var memo = []; + // `memo` is a two-dimensional array containing distances. + // memo[i][j] is the distance between strA.slice(0, i) and + // strB.slice(0, j). + for (var i = 0; i <= strA.length; i++) { + memo[i] = Array(strB.length + 1).fill(0); + memo[i][0] = i; + } + for (var j = 0; j < strB.length; j++) { + memo[0][j] = j; + } + + for (var i = 1; i <= strA.length; i++) { + var ch = strA.charCodeAt(i - 1); + for (var j = 1; j <= strB.length; j++) { + if (Math.abs(i - j) >= cap) { + memo[i][j] = cap; + continue; + } + memo[i][j] = Math.min( + memo[i - 1][j] + 1, + memo[i][j - 1] + 1, + memo[i - 1][j - 1] + + (ch === strB.charCodeAt(j - 1) ? 0 : 1) + ); + } + } + + return memo[strA.length][strB.length]; +} diff --git a/node_modules/chai/lib/chai/utils/test.js b/node_modules/chai/lib/chai/utils/test.js new file mode 100644 index 00000000..09886d44 --- /dev/null +++ b/node_modules/chai/lib/chai/utils/test.js @@ -0,0 +1,28 @@ +/*! + * Chai - test utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/*! + * Module dependencies + */ + +var flag = require('./flag'); + +/** + * ### .test(object, expression) + * + * Test and object for expression. + * + * @param {Object} object (constructed Assertion) + * @param {Arguments} chai.Assertion.prototype.assert arguments + * @namespace Utils + * @name test + */ + +module.exports = function test(obj, args) { + var negate = flag(obj, 'negate') + , expr = args[0]; + return negate ? !expr : expr; +}; diff --git a/node_modules/chai/lib/chai/utils/transferFlags.js b/node_modules/chai/lib/chai/utils/transferFlags.js new file mode 100644 index 00000000..7b501900 --- /dev/null +++ b/node_modules/chai/lib/chai/utils/transferFlags.js @@ -0,0 +1,45 @@ +/*! + * Chai - transferFlags utility + * Copyright(c) 2012-2014 Jake Luer + * MIT Licensed + */ + +/** + * ### .transferFlags(assertion, object, includeAll = true) + * + * Transfer all the flags for `assertion` to `object`. If + * `includeAll` is set to `false`, then the base Chai + * assertion flags (namely `object`, `ssfi`, `lockSsfi`, + * and `message`) will not be transferred. + * + * + * var newAssertion = new Assertion(); + * utils.transferFlags(assertion, newAssertion); + * + * var anotherAssertion = new Assertion(myObj); + * utils.transferFlags(assertion, anotherAssertion, false); + * + * @param {Assertion} assertion the assertion to transfer the flags from + * @param {Object} object the object to transfer the flags to; usually a new assertion + * @param {Boolean} includeAll + * @namespace Utils + * @name transferFlags + * @api private + */ + +module.exports = function transferFlags(assertion, object, includeAll) { + var flags = assertion.__flags || (assertion.__flags = Object.create(null)); + + if (!object.__flags) { + object.__flags = Object.create(null); + } + + includeAll = arguments.length === 3 ? includeAll : true; + + for (var flag in flags) { + if (includeAll || + (flag !== 'object' && flag !== 'ssfi' && flag !== 'lockSsfi' && flag != 'message')) { + object.__flags[flag] = flags[flag]; + } + } +}; diff --git a/node_modules/chai/package.json b/node_modules/chai/package.json new file mode 100644 index 00000000..fff03127 --- /dev/null +++ b/node_modules/chai/package.json @@ -0,0 +1,99 @@ +{ + "_args": [ + [ + "chai@4.2.0", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "chai@4.2.0", + "_id": "chai@4.2.0", + "_inBundle": false, + "_integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==", + "_location": "/chai", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "chai@4.2.0", + "name": "chai", + "escapedName": "chai", + "rawSpec": "4.2.0", + "saveSpec": null, + "fetchSpec": "4.2.0" + }, + "_requiredBy": [ + "/nock" + ], + "_resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", + "_spec": "4.2.0", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "Jake Luer", + "email": "jake@alogicalparadox.com" + }, + "bugs": { + "url": "https://github.com/chaijs/chai/issues" + }, + "contributors": [ + { + "name": "Jake Luer", + "email": "jake@alogicalparadox.com" + }, + { + "name": "Domenic Denicola", + "email": "domenic@domenicdenicola.com", + "url": "http://domenicdenicola.com" + }, + { + "name": "Veselin Todorov", + "email": "hi@vesln.com" + }, + { + "name": "John Firebaugh", + "email": "john.firebaugh@gmail.com" + } + ], + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "pathval": "^1.1.0", + "type-detect": "^4.0.5" + }, + "description": "BDD/TDD assertion library for node.js and the browser. Test framework agnostic.", + "devDependencies": { + "browserify": "^16.0.0", + "bump-cli": "^1.1.3", + "codecov": "^3.0.0", + "istanbul": "^0.4.3", + "karma": "^2.0.0", + "karma-firefox-launcher": "^1.0.0", + "karma-mocha": "^1.0.1", + "karma-phantomjs-launcher": "^1.0.0", + "karma-sauce-launcher": "^1.2.0", + "mocha": "^5.0.0" + }, + "engines": { + "node": ">=4" + }, + "homepage": "http://chaijs.com", + "keywords": [ + "test", + "assertion", + "assert", + "testing", + "chai" + ], + "license": "MIT", + "main": "./index", + "name": "chai", + "repository": { + "type": "git", + "url": "git+https://github.com/chaijs/chai.git" + }, + "scripts": { + "test": "make test" + }, + "version": "4.2.0" +} diff --git a/node_modules/chai/register-assert.js b/node_modules/chai/register-assert.js new file mode 100644 index 00000000..f80cb4de --- /dev/null +++ b/node_modules/chai/register-assert.js @@ -0,0 +1 @@ +global.assert = require('./').assert; diff --git a/node_modules/chai/register-expect.js b/node_modules/chai/register-expect.js new file mode 100644 index 00000000..f905c3a2 --- /dev/null +++ b/node_modules/chai/register-expect.js @@ -0,0 +1 @@ +global.expect = require('./').expect; diff --git a/node_modules/chai/register-should.js b/node_modules/chai/register-should.js new file mode 100644 index 00000000..5dab96fc --- /dev/null +++ b/node_modules/chai/register-should.js @@ -0,0 +1 @@ +global.should = require('./').should(); diff --git a/node_modules/chai/sauce.browsers.js b/node_modules/chai/sauce.browsers.js new file mode 100644 index 00000000..62252dc4 --- /dev/null +++ b/node_modules/chai/sauce.browsers.js @@ -0,0 +1,102 @@ + +/*! + * Chrome + */ + +exports['SL_Chrome'] = { + base: 'SauceLabs' + , browserName: 'chrome' +}; + +/*! + * Firefox + */ + + exports['SL_Firefox'] = { + base: 'SauceLabs' + , browserName: 'firefox' + }; + + exports['SL_Firefox_ESR'] = { + base: 'SauceLabs' + , browserName: 'firefox' + , version: 38 + }; + +/*! + * Internet Explorer + */ + +exports['SL_IE'] = { + base: 'SauceLabs' + , browserName: 'internet explorer' +}; + +exports['SL_IE_Old'] = { + base: 'SauceLabs' + , browserName: 'internet explorer' + , version: 10 +}; + +exports['SL_Edge'] = { + base: 'SauceLabs' + , browserName: 'microsoftedge' +}; + +/*! + * Safari + */ + +exports['SL_Safari'] = { + base: 'SauceLabs' + , browserName: 'safari' + , platform: 'Mac 10.11' +}; + +/*! + * iPhone + */ + +/*! + * TODO: These take forever to boot or shut down. Causes timeout. + * + +exports['SL_iPhone_6'] = { + base: 'SauceLabs' + , browserName: 'iphone' + , platform: 'Mac 10.8' + , version: '6' +}; + +exports['SL_iPhone_5-1'] = { + base: 'SauceLabs' + , browserName: 'iphone' + , platform: 'Mac 10.8' + , version: '5.1' +}; + +exports['SL_iPhone_5'] = { + base: 'SauceLabs' + , browserName: 'iphone' + , platform: 'Mac 10.6' + , version: '5' +}; + +*/ + +/*! + * Android + */ + +/*! + * TODO: fails because of error serialization + * + +exports['SL_Android_4'] = { + base: 'SauceLabs' + , browserName: 'android' + , platform: 'Linux' + , version: '4' +}; + +*/ diff --git a/node_modules/check-error/LICENSE b/node_modules/check-error/LICENSE new file mode 100644 index 00000000..7ea799f0 --- /dev/null +++ b/node_modules/check-error/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2013 Jake Luer (http://alogicalparadox.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/check-error/README.md b/node_modules/check-error/README.md new file mode 100644 index 00000000..1fa64c3d --- /dev/null +++ b/node_modules/check-error/README.md @@ -0,0 +1,207 @@ +

+ + ChaiJS check-error + +

+ +

+ Error comparison and information related utility for node and the browser. +

+ +

+ + license:mit + + + tag:? + + + build:? + + + coverage:? + + + npm:? + + + dependencies:? + + + devDependencies:? + +
+ + Selenium Test Status + +
+ + Join the Slack chat + + + Join the Gitter chat + +

+ +## What is Check-Error? + +Check-Error is a module which you can use to retrieve an Error's information such as its `message` or `constructor` name and also to check whether two Errors are compatible based on their messages, constructors or even instances. + +## Installation + +### Node.js + +`check-error` is available on [npm](http://npmjs.org). To install it, type: + + $ npm install check-error + +### Browsers + +You can also use it within the browser; install via npm and use the `check-error.js` file found within the download. For example: + +```html + +``` + +## Usage + +The primary export of `check-error` is an object which has the following methods: + +* `compatibleInstance(err, errorLike)` - Checks if an error is compatible with another `errorLike` object. If `errorLike` is an error instance we do a strict comparison, otherwise we return `false` by default, because instances of objects can only be compatible if they're both error instances. +* `compatibleConstructor(err, errorLike)` - Checks if an error's constructor is compatible with another `errorLike` object. If `err` has the same constructor as `errorLike` or if `err` is an instance of `errorLike`. +* `compatibleMessage(err, errMatcher)` - Checks if an error message is compatible with an `errMatcher` RegExp or String (we check if the message contains the String). +* `getConstructorName(errorLike)` - Retrieves the name of a constructor, an error's constructor or `errorLike` itself if it's not an error instance or constructor. +* `getMessage(err)` - Retrieves the message of an error or `err` itself if it's a String. If `err` or `err.message` is undefined we return an empty String. + +```js +var checkError = require('check-error'); +``` + +#### .compatibleInstance(err, errorLike) + +```js +var checkError = require('check-error'); + +var funcThatThrows = function() { throw new TypeError('I am a TypeError') }; +var caughtErr; + +try { + funcThatThrows(); +} catch(e) { + caughtErr = e; +} + +var sameInstance = caughtErr; + +checkError.compatibleInstance(caughtErr, sameInstance); // true +checkError.compatibleInstance(caughtErr, new TypeError('Another error')); // false +``` + +#### .compatibleConstructor(err, errorLike) + +```js +var checkError = require('check-error'); + +var funcThatThrows = function() { throw new TypeError('I am a TypeError') }; +var caughtErr; + +try { + funcThatThrows(); +} catch(e) { + caughtErr = e; +} + +checkError.compatibleConstructor(caughtErr, Error); // true +checkError.compatibleConstructor(caughtErr, TypeError); // true +checkError.compatibleConstructor(caughtErr, RangeError); // false +``` + +#### .compatibleMessage(err, errMatcher) + +```js +var checkError = require('check-error'); + +var funcThatThrows = function() { throw new TypeError('I am a TypeError') }; +var caughtErr; + +try { + funcThatThrows(); +} catch(e) { + caughtErr = e; +} + +var sameInstance = caughtErr; + +checkError.compatibleMessage(caughtErr, /TypeError$/); // true +checkError.compatibleMessage(caughtErr, 'I am a'); // true +checkError.compatibleMessage(caughtErr, /unicorn/); // false +checkError.compatibleMessage(caughtErr, 'I do not exist'); // false +``` + +#### .getConstructorName(errorLike) + +```js +var checkError = require('check-error'); + +var funcThatThrows = function() { throw new TypeError('I am a TypeError') }; +var caughtErr; + +try { + funcThatThrows(); +} catch(e) { + caughtErr = e; +} + +var sameInstance = caughtErr; + +checkError.getConstructorName(caughtErr) // 'TypeError' +``` + +#### .getMessage(err) + +```js +var checkError = require('check-error'); + +var funcThatThrows = function() { throw new TypeError('I am a TypeError') }; +var caughtErr; + +try { + funcThatThrows(); +} catch(e) { + caughtErr = e; +} + +var sameInstance = caughtErr; + +checkError.getMessage(caughtErr) // 'I am a TypeError' +``` diff --git a/node_modules/check-error/check-error.js b/node_modules/check-error/check-error.js new file mode 100644 index 00000000..8e47a65d --- /dev/null +++ b/node_modules/check-error/check-error.js @@ -0,0 +1,176 @@ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.checkError = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o + * MIT Licensed + */ + +/** + * ### .checkError + * + * Checks that an error conforms to a given set of criteria and/or retrieves information about it. + * + * @api public + */ + +/** + * ### .compatibleInstance(thrown, errorLike) + * + * Checks if two instances are compatible (strict equal). + * Returns false if errorLike is not an instance of Error, because instances + * can only be compatible if they're both error instances. + * + * @name compatibleInstance + * @param {Error} thrown error + * @param {Error|ErrorConstructor} errorLike object to compare against + * @namespace Utils + * @api public + */ + +function compatibleInstance(thrown, errorLike) { + return errorLike instanceof Error && thrown === errorLike; +} + +/** + * ### .compatibleConstructor(thrown, errorLike) + * + * Checks if two constructors are compatible. + * This function can receive either an error constructor or + * an error instance as the `errorLike` argument. + * Constructors are compatible if they're the same or if one is + * an instance of another. + * + * @name compatibleConstructor + * @param {Error} thrown error + * @param {Error|ErrorConstructor} errorLike object to compare against + * @namespace Utils + * @api public + */ + +function compatibleConstructor(thrown, errorLike) { + if (errorLike instanceof Error) { + // If `errorLike` is an instance of any error we compare their constructors + return thrown.constructor === errorLike.constructor || thrown instanceof errorLike.constructor; + } else if (errorLike.prototype instanceof Error || errorLike === Error) { + // If `errorLike` is a constructor that inherits from Error, we compare `thrown` to `errorLike` directly + return thrown.constructor === errorLike || thrown instanceof errorLike; + } + + return false; +} + +/** + * ### .compatibleMessage(thrown, errMatcher) + * + * Checks if an error's message is compatible with a matcher (String or RegExp). + * If the message contains the String or passes the RegExp test, + * it is considered compatible. + * + * @name compatibleMessage + * @param {Error} thrown error + * @param {String|RegExp} errMatcher to look for into the message + * @namespace Utils + * @api public + */ + +function compatibleMessage(thrown, errMatcher) { + var comparisonString = typeof thrown === 'string' ? thrown : thrown.message; + if (errMatcher instanceof RegExp) { + return errMatcher.test(comparisonString); + } else if (typeof errMatcher === 'string') { + return comparisonString.indexOf(errMatcher) !== -1; // eslint-disable-line no-magic-numbers + } + + return false; +} + +/** + * ### .getFunctionName(constructorFn) + * + * Returns the name of a function. + * This also includes a polyfill function if `constructorFn.name` is not defined. + * + * @name getFunctionName + * @param {Function} constructorFn + * @namespace Utils + * @api private + */ + +var functionNameMatch = /\s*function(?:\s|\s*\/\*[^(?:*\/)]+\*\/\s*)*([^\(\/]+)/; +function getFunctionName(constructorFn) { + var name = ''; + if (typeof constructorFn.name === 'undefined') { + // Here we run a polyfill if constructorFn.name is not defined + var match = String(constructorFn).match(functionNameMatch); + if (match) { + name = match[1]; + } + } else { + name = constructorFn.name; + } + + return name; +} + +/** + * ### .getConstructorName(errorLike) + * + * Gets the constructor name for an Error instance or constructor itself. + * + * @name getConstructorName + * @param {Error|ErrorConstructor} errorLike + * @namespace Utils + * @api public + */ + +function getConstructorName(errorLike) { + var constructorName = errorLike; + if (errorLike instanceof Error) { + constructorName = getFunctionName(errorLike.constructor); + } else if (typeof errorLike === 'function') { + // If `err` is not an instance of Error it is an error constructor itself or another function. + // If we've got a common function we get its name, otherwise we may need to create a new instance + // of the error just in case it's a poorly-constructed error. Please see chaijs/chai/issues/45 to know more. + constructorName = getFunctionName(errorLike).trim() || + getFunctionName(new errorLike()); // eslint-disable-line new-cap + } + + return constructorName; +} + +/** + * ### .getMessage(errorLike) + * + * Gets the error message from an error. + * If `err` is a String itself, we return it. + * If the error has no message, we return an empty string. + * + * @name getMessage + * @param {Error|String} errorLike + * @namespace Utils + * @api public + */ + +function getMessage(errorLike) { + var msg = ''; + if (errorLike && errorLike.message) { + msg = errorLike.message; + } else if (typeof errorLike === 'string') { + msg = errorLike; + } + + return msg; +} + +module.exports = { + compatibleInstance: compatibleInstance, + compatibleConstructor: compatibleConstructor, + compatibleMessage: compatibleMessage, + getMessage: getMessage, + getConstructorName: getConstructorName, +}; + +},{}]},{},[1])(1) +}); \ No newline at end of file diff --git a/node_modules/check-error/index.js b/node_modules/check-error/index.js new file mode 100644 index 00000000..603ef50b --- /dev/null +++ b/node_modules/check-error/index.js @@ -0,0 +1,172 @@ +'use strict'; + +/* ! + * Chai - checkError utility + * Copyright(c) 2012-2016 Jake Luer + * MIT Licensed + */ + +/** + * ### .checkError + * + * Checks that an error conforms to a given set of criteria and/or retrieves information about it. + * + * @api public + */ + +/** + * ### .compatibleInstance(thrown, errorLike) + * + * Checks if two instances are compatible (strict equal). + * Returns false if errorLike is not an instance of Error, because instances + * can only be compatible if they're both error instances. + * + * @name compatibleInstance + * @param {Error} thrown error + * @param {Error|ErrorConstructor} errorLike object to compare against + * @namespace Utils + * @api public + */ + +function compatibleInstance(thrown, errorLike) { + return errorLike instanceof Error && thrown === errorLike; +} + +/** + * ### .compatibleConstructor(thrown, errorLike) + * + * Checks if two constructors are compatible. + * This function can receive either an error constructor or + * an error instance as the `errorLike` argument. + * Constructors are compatible if they're the same or if one is + * an instance of another. + * + * @name compatibleConstructor + * @param {Error} thrown error + * @param {Error|ErrorConstructor} errorLike object to compare against + * @namespace Utils + * @api public + */ + +function compatibleConstructor(thrown, errorLike) { + if (errorLike instanceof Error) { + // If `errorLike` is an instance of any error we compare their constructors + return thrown.constructor === errorLike.constructor || thrown instanceof errorLike.constructor; + } else if (errorLike.prototype instanceof Error || errorLike === Error) { + // If `errorLike` is a constructor that inherits from Error, we compare `thrown` to `errorLike` directly + return thrown.constructor === errorLike || thrown instanceof errorLike; + } + + return false; +} + +/** + * ### .compatibleMessage(thrown, errMatcher) + * + * Checks if an error's message is compatible with a matcher (String or RegExp). + * If the message contains the String or passes the RegExp test, + * it is considered compatible. + * + * @name compatibleMessage + * @param {Error} thrown error + * @param {String|RegExp} errMatcher to look for into the message + * @namespace Utils + * @api public + */ + +function compatibleMessage(thrown, errMatcher) { + var comparisonString = typeof thrown === 'string' ? thrown : thrown.message; + if (errMatcher instanceof RegExp) { + return errMatcher.test(comparisonString); + } else if (typeof errMatcher === 'string') { + return comparisonString.indexOf(errMatcher) !== -1; // eslint-disable-line no-magic-numbers + } + + return false; +} + +/** + * ### .getFunctionName(constructorFn) + * + * Returns the name of a function. + * This also includes a polyfill function if `constructorFn.name` is not defined. + * + * @name getFunctionName + * @param {Function} constructorFn + * @namespace Utils + * @api private + */ + +var functionNameMatch = /\s*function(?:\s|\s*\/\*[^(?:*\/)]+\*\/\s*)*([^\(\/]+)/; +function getFunctionName(constructorFn) { + var name = ''; + if (typeof constructorFn.name === 'undefined') { + // Here we run a polyfill if constructorFn.name is not defined + var match = String(constructorFn).match(functionNameMatch); + if (match) { + name = match[1]; + } + } else { + name = constructorFn.name; + } + + return name; +} + +/** + * ### .getConstructorName(errorLike) + * + * Gets the constructor name for an Error instance or constructor itself. + * + * @name getConstructorName + * @param {Error|ErrorConstructor} errorLike + * @namespace Utils + * @api public + */ + +function getConstructorName(errorLike) { + var constructorName = errorLike; + if (errorLike instanceof Error) { + constructorName = getFunctionName(errorLike.constructor); + } else if (typeof errorLike === 'function') { + // If `err` is not an instance of Error it is an error constructor itself or another function. + // If we've got a common function we get its name, otherwise we may need to create a new instance + // of the error just in case it's a poorly-constructed error. Please see chaijs/chai/issues/45 to know more. + constructorName = getFunctionName(errorLike).trim() || + getFunctionName(new errorLike()); // eslint-disable-line new-cap + } + + return constructorName; +} + +/** + * ### .getMessage(errorLike) + * + * Gets the error message from an error. + * If `err` is a String itself, we return it. + * If the error has no message, we return an empty string. + * + * @name getMessage + * @param {Error|String} errorLike + * @namespace Utils + * @api public + */ + +function getMessage(errorLike) { + var msg = ''; + if (errorLike && errorLike.message) { + msg = errorLike.message; + } else if (typeof errorLike === 'string') { + msg = errorLike; + } + + return msg; +} + +module.exports = { + compatibleInstance: compatibleInstance, + compatibleConstructor: compatibleConstructor, + compatibleMessage: compatibleMessage, + getMessage: getMessage, + getConstructorName: getConstructorName, +}; diff --git a/node_modules/check-error/package.json b/node_modules/check-error/package.json new file mode 100644 index 00000000..f36fb79b --- /dev/null +++ b/node_modules/check-error/package.json @@ -0,0 +1,133 @@ +{ + "_args": [ + [ + "check-error@1.0.2", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "check-error@1.0.2", + "_id": "check-error@1.0.2", + "_inBundle": false, + "_integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "_location": "/check-error", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "check-error@1.0.2", + "name": "check-error", + "escapedName": "check-error", + "rawSpec": "1.0.2", + "saveSpec": null, + "fetchSpec": "1.0.2" + }, + "_requiredBy": [ + "/chai" + ], + "_resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "_spec": "1.0.2", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "Jake Luer", + "email": "jake@alogicalparadox.com", + "url": "http://alogicalparadox.com" + }, + "bugs": { + "url": "https://github.com/chaijs/check-error/issues" + }, + "config": { + "ghooks": { + "commit-msg": "validate-commit-msg" + } + }, + "contributors": [ + { + "name": "David Losert", + "url": "https://github.com/davelosert" + }, + { + "name": "Keith Cirkel", + "url": "https://github.com/keithamus" + }, + { + "name": "Miroslav Bajtoš", + "url": "https://github.com/bajtos" + }, + { + "name": "Lucas Fernandes da Costa", + "url": "https://github.com/lucasfcosta" + } + ], + "dependencies": {}, + "description": "Error comparison and information related utility for node and the browser", + "devDependencies": { + "browserify": "^13.0.0", + "browserify-istanbul": "^1.0.0", + "coveralls": "2.11.9", + "eslint": "^2.4.0", + "eslint-config-strict": "^8.5.0", + "eslint-plugin-filenames": "^0.2.0", + "ghooks": "^1.0.1", + "istanbul": "^0.4.2", + "karma": "^0.13.22", + "karma-browserify": "^5.0.2", + "karma-coverage": "^0.5.5", + "karma-mocha": "^0.2.2", + "karma-phantomjs-launcher": "^1.0.0", + "karma-sauce-launcher": "^0.3.1", + "lcov-result-merger": "^1.0.2", + "mocha": "^2.4.5", + "phantomjs-prebuilt": "^2.1.5", + "semantic-release": "^4.3.5", + "simple-assert": "^1.0.0", + "travis-after-all": "^1.4.4", + "validate-commit-msg": "^2.3.1" + }, + "engines": { + "node": "*" + }, + "eslintConfig": { + "extends": [ + "strict/es5" + ], + "env": { + "es6": true + }, + "globals": { + "HTMLElement": false + }, + "rules": { + "complexity": 0, + "max-statements": 0 + } + }, + "files": [ + "index.js", + "check-error.js" + ], + "homepage": "https://github.com/chaijs/check-error#readme", + "keywords": [ + "check-error", + "error", + "chai util" + ], + "license": "MIT", + "main": "./index.js", + "name": "check-error", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/chaijs/check-error.git" + }, + "scripts": { + "build": "browserify --bare $npm_package_main --standalone checkError -o check-error.js", + "lint": "eslint --ignore-path .gitignore .", + "prepublish": "npm run build", + "pretest": "npm run lint", + "semantic-release": "semantic-release pre && npm publish && semantic-release post", + "test": "npm run test:node && npm run test:browser && npm run upload-coverage", + "test:browser": "karma start --singleRun=true", + "test:node": "istanbul cover _mocha", + "upload-coverage": "lcov-result-merger 'coverage/**/lcov.info' | coveralls; exit 0" + }, + "version": "1.0.2" +} diff --git a/node_modules/cross-spawn/CHANGELOG.md b/node_modules/cross-spawn/CHANGELOG.md new file mode 100644 index 00000000..ded9620b --- /dev/null +++ b/node_modules/cross-spawn/CHANGELOG.md @@ -0,0 +1,100 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +## [6.0.5](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.4...v6.0.5) (2018-03-02) + + +### Bug Fixes + +* avoid using deprecated Buffer constructor ([#94](https://github.com/moxystudio/node-cross-spawn/issues/94)) ([d5770df](https://github.com/moxystudio/node-cross-spawn/commit/d5770df)), closes [/nodejs.org/api/deprecations.html#deprecations_dep0005](https://github.com//nodejs.org/api/deprecations.html/issues/deprecations_dep0005) + + + + +## [6.0.4](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.3...v6.0.4) (2018-01-31) + + +### Bug Fixes + +* fix paths being incorrectly normalized on unix ([06ee3c6](https://github.com/moxystudio/node-cross-spawn/commit/06ee3c6)), closes [#90](https://github.com/moxystudio/node-cross-spawn/issues/90) + + + + +## [6.0.3](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.2...v6.0.3) (2018-01-23) + + + + +## [6.0.2](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.1...v6.0.2) (2018-01-23) + + + + +## [6.0.1](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.0...v6.0.1) (2018-01-23) + + + + +# [6.0.0](https://github.com/moxystudio/node-cross-spawn/compare/5.1.0...6.0.0) (2018-01-23) + + +### Bug Fixes + +* fix certain arguments not being correctly escaped or causing batch syntax error ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)), closes [#82](https://github.com/moxystudio/node-cross-spawn/issues/82) [#51](https://github.com/moxystudio/node-cross-spawn/issues/51) +* fix commands as posix relatixe paths not working correctly, e.g.: `./my-command` ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) +* fix `options` argument being mutated ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) +* fix commands resolution when PATH was actually Path ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) + + +### Features + +* improve compliance with node's ENOENT errors ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) +* improve detection of node's shell option support ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) + + +### Chores + +* upgrade tooling +* upgrate project to es6 (node v4) + + +### BREAKING CHANGES + +* remove support for older nodejs versions, only `node >= 4` is supported + + + +## [5.1.0](https://github.com/moxystudio/node-cross-spawn/compare/5.0.1...5.1.0) (2017-02-26) + + +### Bug Fixes + +* fix `options.shell` support for NodeJS [v4.8](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V4.md#4.8.0) + + + +## [5.0.1](https://github.com/moxystudio/node-cross-spawn/compare/5.0.0...5.0.1) (2016-11-04) + + +### Bug Fixes + +* fix `options.shell` support for NodeJS v7 + + + +# [5.0.0](https://github.com/moxystudio/node-cross-spawn/compare/4.0.2...5.0.0) (2016-10-30) + + +## Features + +* add support for `options.shell` +* improve parsing of shebangs by using [`shebang-command`](https://github.com/kevva/shebang-command) module + + +## Chores + +* refactor some code to make it more clear +* update README caveats diff --git a/node_modules/cross-spawn/LICENSE b/node_modules/cross-spawn/LICENSE new file mode 100644 index 00000000..8407b9a3 --- /dev/null +++ b/node_modules/cross-spawn/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018 Made With MOXY Lda + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/cross-spawn/README.md b/node_modules/cross-spawn/README.md new file mode 100644 index 00000000..e895cd7a --- /dev/null +++ b/node_modules/cross-spawn/README.md @@ -0,0 +1,94 @@ +# cross-spawn + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Build status][appveyor-image]][appveyor-url] [![Coverage Status][codecov-image]][codecov-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url] [![Greenkeeper badge][greenkeeper-image]][greenkeeper-url] + +[npm-url]:https://npmjs.org/package/cross-spawn +[downloads-image]:http://img.shields.io/npm/dm/cross-spawn.svg +[npm-image]:http://img.shields.io/npm/v/cross-spawn.svg +[travis-url]:https://travis-ci.org/moxystudio/node-cross-spawn +[travis-image]:http://img.shields.io/travis/moxystudio/node-cross-spawn/master.svg +[appveyor-url]:https://ci.appveyor.com/project/satazor/node-cross-spawn +[appveyor-image]:https://img.shields.io/appveyor/ci/satazor/node-cross-spawn/master.svg +[codecov-url]:https://codecov.io/gh/moxystudio/node-cross-spawn +[codecov-image]:https://img.shields.io/codecov/c/github/moxystudio/node-cross-spawn/master.svg +[david-dm-url]:https://david-dm.org/moxystudio/node-cross-spawn +[david-dm-image]:https://img.shields.io/david/moxystudio/node-cross-spawn.svg +[david-dm-dev-url]:https://david-dm.org/moxystudio/node-cross-spawn?type=dev +[david-dm-dev-image]:https://img.shields.io/david/dev/moxystudio/node-cross-spawn.svg +[greenkeeper-image]:https://badges.greenkeeper.io/moxystudio/node-cross-spawn.svg +[greenkeeper-url]:https://greenkeeper.io/ + +A cross platform solution to node's spawn and spawnSync. + + +## Installation + +`$ npm install cross-spawn` + + +## Why + +Node has issues when using spawn on Windows: + +- It ignores [PATHEXT](https://github.com/joyent/node/issues/2318) +- It does not support [shebangs](https://en.wikipedia.org/wiki/Shebang_(Unix)) +- Has problems running commands with [spaces](https://github.com/nodejs/node/issues/7367) +- Has problems running commands with posix relative paths (e.g.: `./my-folder/my-executable`) +- Has an [issue](https://github.com/moxystudio/node-cross-spawn/issues/82) with command shims (files in `node_modules/.bin/`), where arguments with quotes and parenthesis would result in [invalid syntax error](https://github.com/moxystudio/node-cross-spawn/blob/e77b8f22a416db46b6196767bcd35601d7e11d54/test/index.test.js#L149) +- No `options.shell` support on node `` where `` must not contain any arguments. +If you would like to have the shebang support improved, feel free to contribute via a pull-request. + +Remember to always test your code on Windows! + + +## Tests + +`$ npm test` +`$ npm test -- --watch` during development + +## License + +Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php). diff --git a/node_modules/cross-spawn/index.js b/node_modules/cross-spawn/index.js new file mode 100644 index 00000000..5509742c --- /dev/null +++ b/node_modules/cross-spawn/index.js @@ -0,0 +1,39 @@ +'use strict'; + +const cp = require('child_process'); +const parse = require('./lib/parse'); +const enoent = require('./lib/enoent'); + +function spawn(command, args, options) { + // Parse the arguments + const parsed = parse(command, args, options); + + // Spawn the child process + const spawned = cp.spawn(parsed.command, parsed.args, parsed.options); + + // Hook into child process "exit" event to emit an error if the command + // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 + enoent.hookChildProcess(spawned, parsed); + + return spawned; +} + +function spawnSync(command, args, options) { + // Parse the arguments + const parsed = parse(command, args, options); + + // Spawn the child process + const result = cp.spawnSync(parsed.command, parsed.args, parsed.options); + + // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 + result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); + + return result; +} + +module.exports = spawn; +module.exports.spawn = spawn; +module.exports.sync = spawnSync; + +module.exports._parse = parse; +module.exports._enoent = enoent; diff --git a/node_modules/cross-spawn/lib/enoent.js b/node_modules/cross-spawn/lib/enoent.js new file mode 100644 index 00000000..14df9b62 --- /dev/null +++ b/node_modules/cross-spawn/lib/enoent.js @@ -0,0 +1,59 @@ +'use strict'; + +const isWin = process.platform === 'win32'; + +function notFoundError(original, syscall) { + return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), { + code: 'ENOENT', + errno: 'ENOENT', + syscall: `${syscall} ${original.command}`, + path: original.command, + spawnargs: original.args, + }); +} + +function hookChildProcess(cp, parsed) { + if (!isWin) { + return; + } + + const originalEmit = cp.emit; + + cp.emit = function (name, arg1) { + // If emitting "exit" event and exit code is 1, we need to check if + // the command exists and emit an "error" instead + // See https://github.com/IndigoUnited/node-cross-spawn/issues/16 + if (name === 'exit') { + const err = verifyENOENT(arg1, parsed, 'spawn'); + + if (err) { + return originalEmit.call(cp, 'error', err); + } + } + + return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params + }; +} + +function verifyENOENT(status, parsed) { + if (isWin && status === 1 && !parsed.file) { + return notFoundError(parsed.original, 'spawn'); + } + + return null; +} + +function verifyENOENTSync(status, parsed) { + if (isWin && status === 1 && !parsed.file) { + return notFoundError(parsed.original, 'spawnSync'); + } + + return null; +} + +module.exports = { + hookChildProcess, + verifyENOENT, + verifyENOENTSync, + notFoundError, +}; diff --git a/node_modules/cross-spawn/lib/parse.js b/node_modules/cross-spawn/lib/parse.js new file mode 100644 index 00000000..962827a9 --- /dev/null +++ b/node_modules/cross-spawn/lib/parse.js @@ -0,0 +1,125 @@ +'use strict'; + +const path = require('path'); +const niceTry = require('nice-try'); +const resolveCommand = require('./util/resolveCommand'); +const escape = require('./util/escape'); +const readShebang = require('./util/readShebang'); +const semver = require('semver'); + +const isWin = process.platform === 'win32'; +const isExecutableRegExp = /\.(?:com|exe)$/i; +const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i; + +// `options.shell` is supported in Node ^4.8.0, ^5.7.0 and >= 6.0.0 +const supportsShellOption = niceTry(() => semver.satisfies(process.version, '^4.8.0 || ^5.7.0 || >= 6.0.0', true)) || false; + +function detectShebang(parsed) { + parsed.file = resolveCommand(parsed); + + const shebang = parsed.file && readShebang(parsed.file); + + if (shebang) { + parsed.args.unshift(parsed.file); + parsed.command = shebang; + + return resolveCommand(parsed); + } + + return parsed.file; +} + +function parseNonShell(parsed) { + if (!isWin) { + return parsed; + } + + // Detect & add support for shebangs + const commandFile = detectShebang(parsed); + + // We don't need a shell if the command filename is an executable + const needsShell = !isExecutableRegExp.test(commandFile); + + // If a shell is required, use cmd.exe and take care of escaping everything correctly + // Note that `forceShell` is an hidden option used only in tests + if (parsed.options.forceShell || needsShell) { + // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/` + // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument + // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called, + // we need to double escape them + const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile); + + // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\bar) + // This is necessary otherwise it will always fail with ENOENT in those cases + parsed.command = path.normalize(parsed.command); + + // Escape command & arguments + parsed.command = escape.command(parsed.command); + parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars)); + + const shellCommand = [parsed.command].concat(parsed.args).join(' '); + + parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`]; + parsed.command = process.env.comspec || 'cmd.exe'; + parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped + } + + return parsed; +} + +function parseShell(parsed) { + // If node supports the shell option, there's no need to mimic its behavior + if (supportsShellOption) { + return parsed; + } + + // Mimic node shell option + // See https://github.com/nodejs/node/blob/b9f6a2dc059a1062776133f3d4fd848c4da7d150/lib/child_process.js#L335 + const shellCommand = [parsed.command].concat(parsed.args).join(' '); + + if (isWin) { + parsed.command = typeof parsed.options.shell === 'string' ? parsed.options.shell : process.env.comspec || 'cmd.exe'; + parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`]; + parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped + } else { + if (typeof parsed.options.shell === 'string') { + parsed.command = parsed.options.shell; + } else if (process.platform === 'android') { + parsed.command = '/system/bin/sh'; + } else { + parsed.command = '/bin/sh'; + } + + parsed.args = ['-c', shellCommand]; + } + + return parsed; +} + +function parse(command, args, options) { + // Normalize arguments, similar to nodejs + if (args && !Array.isArray(args)) { + options = args; + args = null; + } + + args = args ? args.slice(0) : []; // Clone array to avoid changing the original + options = Object.assign({}, options); // Clone object to avoid changing the original + + // Build our parsed object + const parsed = { + command, + args, + options, + file: undefined, + original: { + command, + args, + }, + }; + + // Delegate further parsing to shell or non-shell + return options.shell ? parseShell(parsed) : parseNonShell(parsed); +} + +module.exports = parse; diff --git a/node_modules/cross-spawn/lib/util/escape.js b/node_modules/cross-spawn/lib/util/escape.js new file mode 100644 index 00000000..b0bb84c3 --- /dev/null +++ b/node_modules/cross-spawn/lib/util/escape.js @@ -0,0 +1,45 @@ +'use strict'; + +// See http://www.robvanderwoude.com/escapechars.php +const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g; + +function escapeCommand(arg) { + // Escape meta chars + arg = arg.replace(metaCharsRegExp, '^$1'); + + return arg; +} + +function escapeArgument(arg, doubleEscapeMetaChars) { + // Convert to string + arg = `${arg}`; + + // Algorithm below is based on https://qntm.org/cmd + + // Sequence of backslashes followed by a double quote: + // double up all the backslashes and escape the double quote + arg = arg.replace(/(\\*)"/g, '$1$1\\"'); + + // Sequence of backslashes followed by the end of the string + // (which will become a double quote later): + // double up all the backslashes + arg = arg.replace(/(\\*)$/, '$1$1'); + + // All other backslashes occur literally + + // Quote the whole thing: + arg = `"${arg}"`; + + // Escape meta chars + arg = arg.replace(metaCharsRegExp, '^$1'); + + // Double escape meta chars if necessary + if (doubleEscapeMetaChars) { + arg = arg.replace(metaCharsRegExp, '^$1'); + } + + return arg; +} + +module.exports.command = escapeCommand; +module.exports.argument = escapeArgument; diff --git a/node_modules/cross-spawn/lib/util/readShebang.js b/node_modules/cross-spawn/lib/util/readShebang.js new file mode 100644 index 00000000..bd4f1280 --- /dev/null +++ b/node_modules/cross-spawn/lib/util/readShebang.js @@ -0,0 +1,32 @@ +'use strict'; + +const fs = require('fs'); +const shebangCommand = require('shebang-command'); + +function readShebang(command) { + // Read the first 150 bytes from the file + const size = 150; + let buffer; + + if (Buffer.alloc) { + // Node.js v4.5+ / v5.10+ + buffer = Buffer.alloc(size); + } else { + // Old Node.js API + buffer = new Buffer(size); + buffer.fill(0); // zero-fill + } + + let fd; + + try { + fd = fs.openSync(command, 'r'); + fs.readSync(fd, buffer, 0, size, 0); + fs.closeSync(fd); + } catch (e) { /* Empty */ } + + // Attempt to extract shebang (null is returned if not a shebang) + return shebangCommand(buffer.toString()); +} + +module.exports = readShebang; diff --git a/node_modules/cross-spawn/lib/util/resolveCommand.js b/node_modules/cross-spawn/lib/util/resolveCommand.js new file mode 100644 index 00000000..2fd5ad27 --- /dev/null +++ b/node_modules/cross-spawn/lib/util/resolveCommand.js @@ -0,0 +1,47 @@ +'use strict'; + +const path = require('path'); +const which = require('which'); +const pathKey = require('path-key')(); + +function resolveCommandAttempt(parsed, withoutPathExt) { + const cwd = process.cwd(); + const hasCustomCwd = parsed.options.cwd != null; + + // If a custom `cwd` was specified, we need to change the process cwd + // because `which` will do stat calls but does not support a custom cwd + if (hasCustomCwd) { + try { + process.chdir(parsed.options.cwd); + } catch (err) { + /* Empty */ + } + } + + let resolved; + + try { + resolved = which.sync(parsed.command, { + path: (parsed.options.env || process.env)[pathKey], + pathExt: withoutPathExt ? path.delimiter : undefined, + }); + } catch (e) { + /* Empty */ + } finally { + process.chdir(cwd); + } + + // If we successfully resolved, ensure that an absolute path is returned + // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it + if (resolved) { + resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved); + } + + return resolved; +} + +function resolveCommand(parsed) { + return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true); +} + +module.exports = resolveCommand; diff --git a/node_modules/cross-spawn/node_modules/.bin/semver b/node_modules/cross-spawn/node_modules/.bin/semver new file mode 120000 index 00000000..317eb293 --- /dev/null +++ b/node_modules/cross-spawn/node_modules/.bin/semver @@ -0,0 +1 @@ +../semver/bin/semver \ No newline at end of file diff --git a/node_modules/cross-spawn/node_modules/semver/CHANGELOG.md b/node_modules/cross-spawn/node_modules/semver/CHANGELOG.md new file mode 100644 index 00000000..66304fdd --- /dev/null +++ b/node_modules/cross-spawn/node_modules/semver/CHANGELOG.md @@ -0,0 +1,39 @@ +# changes log + +## 5.7 + +* Add `minVersion` method + +## 5.6 + +* Move boolean `loose` param to an options object, with + backwards-compatibility protection. +* Add ability to opt out of special prerelease version handling with + the `includePrerelease` option flag. + +## 5.5 + +* Add version coercion capabilities + +## 5.4 + +* Add intersection checking + +## 5.3 + +* Add `minSatisfying` method + +## 5.2 + +* Add `prerelease(v)` that returns prerelease components + +## 5.1 + +* Add Backus-Naur for ranges +* Remove excessively cute inspection methods + +## 5.0 + +* Remove AMD/Browserified build artifacts +* Fix ltr and gtr when using the `*` range +* Fix for range `*` with a prerelease identifier diff --git a/node_modules/cross-spawn/node_modules/semver/LICENSE b/node_modules/cross-spawn/node_modules/semver/LICENSE new file mode 100644 index 00000000..19129e31 --- /dev/null +++ b/node_modules/cross-spawn/node_modules/semver/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/cross-spawn/node_modules/semver/README.md b/node_modules/cross-spawn/node_modules/semver/README.md new file mode 100644 index 00000000..e5ccecec --- /dev/null +++ b/node_modules/cross-spawn/node_modules/semver/README.md @@ -0,0 +1,411 @@ +semver(1) -- The semantic versioner for npm +=========================================== + +## Install + +```bash +npm install --save semver +```` + +## Usage + +As a node module: + +```js +const semver = require('semver') + +semver.valid('1.2.3') // '1.2.3' +semver.valid('a.b.c') // null +semver.clean(' =v1.2.3 ') // '1.2.3' +semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true +semver.gt('1.2.3', '9.8.7') // false +semver.lt('1.2.3', '9.8.7') // true +semver.minVersion('>=1.0.0') // '1.0.0' +semver.valid(semver.coerce('v2')) // '2.0.0' +semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7' +``` + +As a command-line utility: + +``` +$ semver -h + +A JavaScript implementation of the https://semver.org/ specification +Copyright Isaac Z. Schlueter + +Usage: semver [options] [ [...]] +Prints valid versions sorted by SemVer precedence + +Options: +-r --range + Print versions that match the specified range. + +-i --increment [] + Increment a version by the specified level. Level can + be one of: major, minor, patch, premajor, preminor, + prepatch, or prerelease. Default level is 'patch'. + Only one version may be specified. + +--preid + Identifier to be used to prefix premajor, preminor, + prepatch or prerelease version increments. + +-l --loose + Interpret versions and ranges loosely + +-p --include-prerelease + Always include prerelease versions in range matching + +-c --coerce + Coerce a string into SemVer if possible + (does not imply --loose) + +Program exits successfully if any valid version satisfies +all supplied ranges, and prints all satisfying versions. + +If no satisfying versions are found, then exits failure. + +Versions are printed in ascending order, so supplying +multiple versions to the utility will just sort them. +``` + +## Versions + +A "version" is described by the `v2.0.0` specification found at +. + +A leading `"="` or `"v"` character is stripped off and ignored. + +## Ranges + +A `version range` is a set of `comparators` which specify versions +that satisfy the range. + +A `comparator` is composed of an `operator` and a `version`. The set +of primitive `operators` is: + +* `<` Less than +* `<=` Less than or equal to +* `>` Greater than +* `>=` Greater than or equal to +* `=` Equal. If no operator is specified, then equality is assumed, + so this operator is optional, but MAY be included. + +For example, the comparator `>=1.2.7` would match the versions +`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` +or `1.1.0`. + +Comparators can be joined by whitespace to form a `comparator set`, +which is satisfied by the **intersection** of all of the comparators +it includes. + +A range is composed of one or more comparator sets, joined by `||`. A +version matches a range if and only if every comparator in at least +one of the `||`-separated comparator sets is satisfied by the version. + +For example, the range `>=1.2.7 <1.3.0` would match the versions +`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, +or `1.1.0`. + +The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, +`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. + +### Prerelease Tags + +If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then +it will only be allowed to satisfy comparator sets if at least one +comparator with the same `[major, minor, patch]` tuple also has a +prerelease tag. + +For example, the range `>1.2.3-alpha.3` would be allowed to match the +version `1.2.3-alpha.7`, but it would *not* be satisfied by +`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater +than" `1.2.3-alpha.3` according to the SemVer sort rules. The version +range only accepts prerelease tags on the `1.2.3` version. The +version `3.4.5` *would* satisfy the range, because it does not have a +prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. + +The purpose for this behavior is twofold. First, prerelease versions +frequently are updated very quickly, and contain many breaking changes +that are (by the author's design) not yet fit for public consumption. +Therefore, by default, they are excluded from range matching +semantics. + +Second, a user who has opted into using a prerelease version has +clearly indicated the intent to use *that specific* set of +alpha/beta/rc versions. By including a prerelease tag in the range, +the user is indicating that they are aware of the risk. However, it +is still not appropriate to assume that they have opted into taking a +similar risk on the *next* set of prerelease versions. + +Note that this behavior can be suppressed (treating all prerelease +versions as if they were normal versions, for the purpose of range +matching) by setting the `includePrerelease` flag on the options +object to any +[functions](https://github.com/npm/node-semver#functions) that do +range matching. + +#### Prerelease Identifiers + +The method `.inc` takes an additional `identifier` string argument that +will append the value of the string as a prerelease identifier: + +```javascript +semver.inc('1.2.3', 'prerelease', 'beta') +// '1.2.4-beta.0' +``` + +command-line example: + +```bash +$ semver 1.2.3 -i prerelease --preid beta +1.2.4-beta.0 +``` + +Which then can be used to increment further: + +```bash +$ semver 1.2.4-beta.0 -i prerelease +1.2.4-beta.1 +``` + +### Advanced Range Syntax + +Advanced range syntax desugars to primitive comparators in +deterministic ways. + +Advanced ranges may be combined in the same way as primitive +comparators using white space or `||`. + +#### Hyphen Ranges `X.Y.Z - A.B.C` + +Specifies an inclusive set. + +* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` + +If a partial version is provided as the first version in the inclusive +range, then the missing pieces are replaced with zeroes. + +* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` + +If a partial version is provided as the second version in the +inclusive range, then all versions that start with the supplied parts +of the tuple are accepted, but nothing that would be greater than the +provided tuple parts. + +* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0` +* `1.2.3 - 2` := `>=1.2.3 <3.0.0` + +#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` + +Any of `X`, `x`, or `*` may be used to "stand in" for one of the +numeric values in the `[major, minor, patch]` tuple. + +* `*` := `>=0.0.0` (Any version satisfies) +* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) +* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) + +A partial version range is treated as an X-Range, so the special +character is in fact optional. + +* `""` (empty string) := `*` := `>=0.0.0` +* `1` := `1.x.x` := `>=1.0.0 <2.0.0` +* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` + +#### Tilde Ranges `~1.2.3` `~1.2` `~1` + +Allows patch-level changes if a minor version is specified on the +comparator. Allows minor-level changes if not. + +* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` +* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) +* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) +* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` +* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) +* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) +* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. + +#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` + +Allows changes that do not modify the left-most non-zero digit in the +`[major, minor, patch]` tuple. In other words, this allows patch and +minor updates for versions `1.0.0` and above, patch updates for +versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. + +Many authors treat a `0.x` version as if the `x` were the major +"breaking-change" indicator. + +Caret ranges are ideal when an author may make breaking changes +between `0.2.4` and `0.3.0` releases, which is a common practice. +However, it presumes that there will *not* be breaking changes between +`0.2.4` and `0.2.5`. It allows for changes that are presumed to be +additive (but non-breaking), according to commonly observed practices. + +* `^1.2.3` := `>=1.2.3 <2.0.0` +* `^0.2.3` := `>=0.2.3 <0.3.0` +* `^0.0.3` := `>=0.0.3 <0.0.4` +* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. +* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the + `0.0.3` version *only* will be allowed, if they are greater than or + equal to `beta`. So, `0.0.3-pr.2` would be allowed. + +When parsing caret ranges, a missing `patch` value desugars to the +number `0`, but will allow flexibility within that value, even if the +major and minor versions are both `0`. + +* `^1.2.x` := `>=1.2.0 <2.0.0` +* `^0.0.x` := `>=0.0.0 <0.1.0` +* `^0.0` := `>=0.0.0 <0.1.0` + +A missing `minor` and `patch` values will desugar to zero, but also +allow flexibility within those values, even if the major version is +zero. + +* `^1.x` := `>=1.0.0 <2.0.0` +* `^0.x` := `>=0.0.0 <1.0.0` + +### Range Grammar + +Putting all this together, here is a Backus-Naur grammar for ranges, +for the benefit of parser authors: + +```bnf +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ +``` + +## Functions + +All methods and classes take a final `options` object argument. All +options in this object are `false` by default. The options supported +are: + +- `loose` Be more forgiving about not-quite-valid semver strings. + (Any resulting output will always be 100% strict compliant, of + course.) For backwards compatibility reasons, if the `options` + argument is a boolean value instead of an object, it is interpreted + to be the `loose` param. +- `includePrerelease` Set to suppress the [default + behavior](https://github.com/npm/node-semver#prerelease-tags) of + excluding prerelease tagged versions from ranges unless they are + explicitly opted into. + +Strict-mode Comparators and Ranges will be strict about the SemVer +strings that they parse. + +* `valid(v)`: Return the parsed version, or null if it's not valid. +* `inc(v, release)`: Return the version incremented by the release + type (`major`, `premajor`, `minor`, `preminor`, `patch`, + `prepatch`, or `prerelease`), or null if it's not valid + * `premajor` in one call will bump the version up to the next major + version and down to a prerelease of that major version. + `preminor`, and `prepatch` work the same way. + * If called from a non-prerelease version, the `prerelease` will work the + same as `prepatch`. It increments the patch version, then makes a + prerelease. If the input version is already a prerelease it simply + increments it. +* `prerelease(v)`: Returns an array of prerelease components, or null + if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]` +* `major(v)`: Return the major version number. +* `minor(v)`: Return the minor version number. +* `patch(v)`: Return the patch version number. +* `intersects(r1, r2, loose)`: Return true if the two supplied ranges + or comparators intersect. +* `parse(v)`: Attempt to parse a string as a semantic version, returning either + a `SemVer` object or `null`. + +### Comparison + +* `gt(v1, v2)`: `v1 > v2` +* `gte(v1, v2)`: `v1 >= v2` +* `lt(v1, v2)`: `v1 < v2` +* `lte(v1, v2)`: `v1 <= v2` +* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, + even if they're not the exact same string. You already know how to + compare strings. +* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. +* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call + the corresponding function above. `"==="` and `"!=="` do simple + string comparison, but are included for completeness. Throws if an + invalid comparison string is provided. +* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if + `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. +* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions + in descending order when passed to `Array.sort()`. +* `diff(v1, v2)`: Returns difference between two versions by the release type + (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), + or null if the versions are the same. + +### Comparators + +* `intersects(comparator)`: Return true if the comparators intersect + +### Ranges + +* `validRange(range)`: Return the valid range or null if it's not valid +* `satisfies(version, range)`: Return true if the version satisfies the + range. +* `maxSatisfying(versions, range)`: Return the highest version in the list + that satisfies the range, or `null` if none of them do. +* `minSatisfying(versions, range)`: Return the lowest version in the list + that satisfies the range, or `null` if none of them do. +* `minVersion(range)`: Return the lowest version that can possibly match + the given range. +* `gtr(version, range)`: Return `true` if version is greater than all the + versions possible in the range. +* `ltr(version, range)`: Return `true` if version is less than all the + versions possible in the range. +* `outside(version, range, hilo)`: Return true if the version is outside + the bounds of the range in either the high or low direction. The + `hilo` argument must be either the string `'>'` or `'<'`. (This is + the function called by `gtr` and `ltr`.) +* `intersects(range)`: Return true if any of the ranges comparators intersect + +Note that, since ranges may be non-contiguous, a version might not be +greater than a range, less than a range, *or* satisfy a range! For +example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` +until `2.0.0`, so the version `1.2.10` would not be greater than the +range (because `2.0.1` satisfies, which is higher), nor less than the +range (since `1.2.8` satisfies, which is lower), and it also does not +satisfy the range. + +If you want to know if a version satisfies or does not satisfy a +range, use the `satisfies(version, range)` function. + +### Coercion + +* `coerce(version)`: Coerces a string to semver if possible + +This aims to provide a very forgiving translation of a non-semver +string to semver. It looks for the first digit in a string, and +consumes all remaining characters which satisfy at least a partial semver +(e.g., `1`, `1.2`, `1.2.3`) up to the max permitted length (256 characters). +Longer versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). +All surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes `3.4.0`). +Only text which lacks digits will fail coercion (`version one` is not valid). +The maximum length for any semver component considered for coercion is 16 characters; +longer components will be ignored (`10000000000000000.4.7.4` becomes `4.7.4`). +The maximum value for any semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`; +higher value components are invalid (`9999999999999999.4.7.4` is likely invalid). diff --git a/node_modules/cross-spawn/node_modules/semver/bin/semver b/node_modules/cross-spawn/node_modules/semver/bin/semver new file mode 100755 index 00000000..801e77f1 --- /dev/null +++ b/node_modules/cross-spawn/node_modules/semver/bin/semver @@ -0,0 +1,160 @@ +#!/usr/bin/env node +// Standalone semver comparison program. +// Exits successfully and prints matching version(s) if +// any supplied version is valid and passes all tests. + +var argv = process.argv.slice(2) + +var versions = [] + +var range = [] + +var inc = null + +var version = require('../package.json').version + +var loose = false + +var includePrerelease = false + +var coerce = false + +var identifier + +var semver = require('../semver') + +var reverse = false + +var options = {} + +main() + +function main () { + if (!argv.length) return help() + while (argv.length) { + var a = argv.shift() + var indexOfEqualSign = a.indexOf('=') + if (indexOfEqualSign !== -1) { + a = a.slice(0, indexOfEqualSign) + argv.unshift(a.slice(indexOfEqualSign + 1)) + } + switch (a) { + case '-rv': case '-rev': case '--rev': case '--reverse': + reverse = true + break + case '-l': case '--loose': + loose = true + break + case '-p': case '--include-prerelease': + includePrerelease = true + break + case '-v': case '--version': + versions.push(argv.shift()) + break + case '-i': case '--inc': case '--increment': + switch (argv[0]) { + case 'major': case 'minor': case 'patch': case 'prerelease': + case 'premajor': case 'preminor': case 'prepatch': + inc = argv.shift() + break + default: + inc = 'patch' + break + } + break + case '--preid': + identifier = argv.shift() + break + case '-r': case '--range': + range.push(argv.shift()) + break + case '-c': case '--coerce': + coerce = true + break + case '-h': case '--help': case '-?': + return help() + default: + versions.push(a) + break + } + } + + var options = { loose: loose, includePrerelease: includePrerelease } + + versions = versions.map(function (v) { + return coerce ? (semver.coerce(v) || { version: v }).version : v + }).filter(function (v) { + return semver.valid(v) + }) + if (!versions.length) return fail() + if (inc && (versions.length !== 1 || range.length)) { return failInc() } + + for (var i = 0, l = range.length; i < l; i++) { + versions = versions.filter(function (v) { + return semver.satisfies(v, range[i], options) + }) + if (!versions.length) return fail() + } + return success(versions) +} + +function failInc () { + console.error('--inc can only be used on a single version with no range') + fail() +} + +function fail () { process.exit(1) } + +function success () { + var compare = reverse ? 'rcompare' : 'compare' + versions.sort(function (a, b) { + return semver[compare](a, b, options) + }).map(function (v) { + return semver.clean(v, options) + }).map(function (v) { + return inc ? semver.inc(v, inc, options, identifier) : v + }).forEach(function (v, i, _) { console.log(v) }) +} + +function help () { + console.log(['SemVer ' + version, + '', + 'A JavaScript implementation of the https://semver.org/ specification', + 'Copyright Isaac Z. Schlueter', + '', + 'Usage: semver [options] [ [...]]', + 'Prints valid versions sorted by SemVer precedence', + '', + 'Options:', + '-r --range ', + ' Print versions that match the specified range.', + '', + '-i --increment []', + ' Increment a version by the specified level. Level can', + ' be one of: major, minor, patch, premajor, preminor,', + " prepatch, or prerelease. Default level is 'patch'.", + ' Only one version may be specified.', + '', + '--preid ', + ' Identifier to be used to prefix premajor, preminor,', + ' prepatch or prerelease version increments.', + '', + '-l --loose', + ' Interpret versions and ranges loosely', + '', + '-p --include-prerelease', + ' Always include prerelease versions in range matching', + '', + '-c --coerce', + ' Coerce a string into SemVer if possible', + ' (does not imply --loose)', + '', + 'Program exits successfully if any valid version satisfies', + 'all supplied ranges, and prints all satisfying versions.', + '', + 'If no satisfying versions are found, then exits failure.', + '', + 'Versions are printed in ascending order, so supplying', + 'multiple versions to the utility will just sort them.' + ].join('\n')) +} diff --git a/node_modules/cross-spawn/node_modules/semver/package.json b/node_modules/cross-spawn/node_modules/semver/package.json new file mode 100644 index 00000000..1fcc12d3 --- /dev/null +++ b/node_modules/cross-spawn/node_modules/semver/package.json @@ -0,0 +1,63 @@ +{ + "_args": [ + [ + "semver@5.7.0", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "semver@5.7.0", + "_id": "semver@5.7.0", + "_inBundle": false, + "_integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "_location": "/cross-spawn/semver", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "semver@5.7.0", + "name": "semver", + "escapedName": "semver", + "rawSpec": "5.7.0", + "saveSpec": null, + "fetchSpec": "5.7.0" + }, + "_requiredBy": [ + "/cross-spawn" + ], + "_resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "_spec": "5.7.0", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "bin": { + "semver": "./bin/semver" + }, + "bugs": { + "url": "https://github.com/npm/node-semver/issues" + }, + "description": "The semantic version parser used by npm.", + "devDependencies": { + "tap": "^13.0.0-rc.18" + }, + "files": [ + "bin", + "range.bnf", + "semver.js" + ], + "homepage": "https://github.com/npm/node-semver#readme", + "license": "ISC", + "main": "semver.js", + "name": "semver", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/node-semver.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap" + }, + "tap": { + "check-coverage": true + }, + "version": "5.7.0" +} diff --git a/node_modules/cross-spawn/node_modules/semver/range.bnf b/node_modules/cross-spawn/node_modules/semver/range.bnf new file mode 100644 index 00000000..d4c6ae0d --- /dev/null +++ b/node_modules/cross-spawn/node_modules/semver/range.bnf @@ -0,0 +1,16 @@ +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | [1-9] ( [0-9] ) * +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ diff --git a/node_modules/cross-spawn/node_modules/semver/semver.js b/node_modules/cross-spawn/node_modules/semver/semver.js new file mode 100644 index 00000000..d315d5d6 --- /dev/null +++ b/node_modules/cross-spawn/node_modules/semver/semver.js @@ -0,0 +1,1483 @@ +exports = module.exports = SemVer + +var debug +/* istanbul ignore next */ +if (typeof process === 'object' && + process.env && + process.env.NODE_DEBUG && + /\bsemver\b/i.test(process.env.NODE_DEBUG)) { + debug = function () { + var args = Array.prototype.slice.call(arguments, 0) + args.unshift('SEMVER') + console.log.apply(console, args) + } +} else { + debug = function () {} +} + +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +exports.SEMVER_SPEC_VERSION = '2.0.0' + +var MAX_LENGTH = 256 +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || + /* istanbul ignore next */ 9007199254740991 + +// Max safe segment length for coercion. +var MAX_SAFE_COMPONENT_LENGTH = 16 + +// The actual regexps go on exports.re +var re = exports.re = [] +var src = exports.src = [] +var R = 0 + +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. + +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. + +var NUMERICIDENTIFIER = R++ +src[NUMERICIDENTIFIER] = '0|[1-9]\\d*' +var NUMERICIDENTIFIERLOOSE = R++ +src[NUMERICIDENTIFIERLOOSE] = '[0-9]+' + +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. + +var NONNUMERICIDENTIFIER = R++ +src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' + +// ## Main Version +// Three dot-separated numeric identifiers. + +var MAINVERSION = R++ +src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')' + +var MAINVERSIONLOOSE = R++ +src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')' + +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. + +var PRERELEASEIDENTIFIER = R++ +src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + + '|' + src[NONNUMERICIDENTIFIER] + ')' + +var PRERELEASEIDENTIFIERLOOSE = R++ +src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + + '|' + src[NONNUMERICIDENTIFIER] + ')' + +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. + +var PRERELEASE = R++ +src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + + '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))' + +var PRERELEASELOOSE = R++ +src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + + '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))' + +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. + +var BUILDIDENTIFIER = R++ +src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+' + +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. + +var BUILD = R++ +src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + + '(?:\\.' + src[BUILDIDENTIFIER] + ')*))' + +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. + +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. + +var FULL = R++ +var FULLPLAIN = 'v?' + src[MAINVERSION] + + src[PRERELEASE] + '?' + + src[BUILD] + '?' + +src[FULL] = '^' + FULLPLAIN + '$' + +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + + src[PRERELEASELOOSE] + '?' + + src[BUILD] + '?' + +var LOOSE = R++ +src[LOOSE] = '^' + LOOSEPLAIN + '$' + +var GTLT = R++ +src[GTLT] = '((?:<|>)?=?)' + +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +var XRANGEIDENTIFIERLOOSE = R++ +src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' +var XRANGEIDENTIFIER = R++ +src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*' + +var XRANGEPLAIN = R++ +src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:' + src[PRERELEASE] + ')?' + + src[BUILD] + '?' + + ')?)?' + +var XRANGEPLAINLOOSE = R++ +src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:' + src[PRERELEASELOOSE] + ')?' + + src[BUILD] + '?' + + ')?)?' + +var XRANGE = R++ +src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$' +var XRANGELOOSE = R++ +src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$' + +// Coercion. +// Extract anything that could conceivably be a part of a valid semver +var COERCE = R++ +src[COERCE] = '(?:^|[^\\d])' + + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:$|[^\\d])' + +// Tilde ranges. +// Meaning is "reasonably at or greater than" +var LONETILDE = R++ +src[LONETILDE] = '(?:~>?)' + +var TILDETRIM = R++ +src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+' +re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g') +var tildeTrimReplace = '$1~' + +var TILDE = R++ +src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$' +var TILDELOOSE = R++ +src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$' + +// Caret ranges. +// Meaning is "at least and backwards compatible with" +var LONECARET = R++ +src[LONECARET] = '(?:\\^)' + +var CARETTRIM = R++ +src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+' +re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g') +var caretTrimReplace = '$1^' + +var CARET = R++ +src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$' +var CARETLOOSE = R++ +src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$' + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +var COMPARATORLOOSE = R++ +src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$' +var COMPARATOR = R++ +src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$' + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +var COMPARATORTRIM = R++ +src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + + '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')' + +// this one has to use the /g flag +re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g') +var comparatorTrimReplace = '$1$2$3' + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +var HYPHENRANGE = R++ +src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAIN] + ')' + + '\\s*$' + +var HYPHENRANGELOOSE = R++ +src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s*$' + +// Star ranges basically just allow anything at all. +var STAR = R++ +src[STAR] = '(<|>)?=?\\s*\\*' + +// Compile to actual regexp objects. +// All are flag-free, unless they were created above with a flag. +for (var i = 0; i < R; i++) { + debug(i, src[i]) + if (!re[i]) { + re[i] = new RegExp(src[i]) + } +} + +exports.parse = parse +function parse (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + if (version.length > MAX_LENGTH) { + return null + } + + var r = options.loose ? re[LOOSE] : re[FULL] + if (!r.test(version)) { + return null + } + + try { + return new SemVer(version, options) + } catch (er) { + return null + } +} + +exports.valid = valid +function valid (version, options) { + var v = parse(version, options) + return v ? v.version : null +} + +exports.clean = clean +function clean (version, options) { + var s = parse(version.trim().replace(/^[=v]+/, ''), options) + return s ? s.version : null +} + +exports.SemVer = SemVer + +function SemVer (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + if (version instanceof SemVer) { + if (version.loose === options.loose) { + return version + } else { + version = version.version + } + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version) + } + + if (version.length > MAX_LENGTH) { + throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') + } + + if (!(this instanceof SemVer)) { + return new SemVer(version, options) + } + + debug('SemVer', version, options) + this.options = options + this.loose = !!options.loose + + var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL]) + + if (!m) { + throw new TypeError('Invalid Version: ' + version) + } + + this.raw = version + + // these are actually numbers + this.major = +m[1] + this.minor = +m[2] + this.patch = +m[3] + + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError('Invalid major version') + } + + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError('Invalid minor version') + } + + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError('Invalid patch version') + } + + // numberify any prerelease numeric ids + if (!m[4]) { + this.prerelease = [] + } else { + this.prerelease = m[4].split('.').map(function (id) { + if (/^[0-9]+$/.test(id)) { + var num = +id + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num + } + } + return id + }) + } + + this.build = m[5] ? m[5].split('.') : [] + this.format() +} + +SemVer.prototype.format = function () { + this.version = this.major + '.' + this.minor + '.' + this.patch + if (this.prerelease.length) { + this.version += '-' + this.prerelease.join('.') + } + return this.version +} + +SemVer.prototype.toString = function () { + return this.version +} + +SemVer.prototype.compare = function (other) { + debug('SemVer.compare', this.version, this.options, other) + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return this.compareMain(other) || this.comparePre(other) +} + +SemVer.prototype.compareMain = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch) +} + +SemVer.prototype.comparePre = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) { + return -1 + } else if (!this.prerelease.length && other.prerelease.length) { + return 1 + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0 + } + + var i = 0 + do { + var a = this.prerelease[i] + var b = other.prerelease[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) +} + +// preminor will bump the version up to the next minor release, and immediately +// down to pre-release. premajor and prepatch work the same way. +SemVer.prototype.inc = function (release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0 + this.patch = 0 + this.minor = 0 + this.major++ + this.inc('pre', identifier) + break + case 'preminor': + this.prerelease.length = 0 + this.patch = 0 + this.minor++ + this.inc('pre', identifier) + break + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0 + this.inc('patch', identifier) + this.inc('pre', identifier) + break + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) { + this.inc('patch', identifier) + } + this.inc('pre', identifier) + break + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if (this.minor !== 0 || + this.patch !== 0 || + this.prerelease.length === 0) { + this.major++ + } + this.minor = 0 + this.patch = 0 + this.prerelease = [] + break + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++ + } + this.patch = 0 + this.prerelease = [] + break + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) { + this.patch++ + } + this.prerelease = [] + break + // This probably shouldn't be used publicly. + // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. + case 'pre': + if (this.prerelease.length === 0) { + this.prerelease = [0] + } else { + var i = this.prerelease.length + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++ + i = -2 + } + } + if (i === -1) { + // didn't increment anything + this.prerelease.push(0) + } + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) { + this.prerelease = [identifier, 0] + } + } else { + this.prerelease = [identifier, 0] + } + } + break + + default: + throw new Error('invalid increment argument: ' + release) + } + this.format() + this.raw = this.version + return this +} + +exports.inc = inc +function inc (version, release, loose, identifier) { + if (typeof (loose) === 'string') { + identifier = loose + loose = undefined + } + + try { + return new SemVer(version, loose).inc(release, identifier).version + } catch (er) { + return null + } +} + +exports.diff = diff +function diff (version1, version2) { + if (eq(version1, version2)) { + return null + } else { + var v1 = parse(version1) + var v2 = parse(version2) + var prefix = '' + if (v1.prerelease.length || v2.prerelease.length) { + prefix = 'pre' + var defaultResult = 'prerelease' + } + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return prefix + key + } + } + } + return defaultResult // may be undefined + } +} + +exports.compareIdentifiers = compareIdentifiers + +var numeric = /^[0-9]+$/ +function compareIdentifiers (a, b) { + var anum = numeric.test(a) + var bnum = numeric.test(b) + + if (anum && bnum) { + a = +a + b = +b + } + + return a === b ? 0 + : (anum && !bnum) ? -1 + : (bnum && !anum) ? 1 + : a < b ? -1 + : 1 +} + +exports.rcompareIdentifiers = rcompareIdentifiers +function rcompareIdentifiers (a, b) { + return compareIdentifiers(b, a) +} + +exports.major = major +function major (a, loose) { + return new SemVer(a, loose).major +} + +exports.minor = minor +function minor (a, loose) { + return new SemVer(a, loose).minor +} + +exports.patch = patch +function patch (a, loose) { + return new SemVer(a, loose).patch +} + +exports.compare = compare +function compare (a, b, loose) { + return new SemVer(a, loose).compare(new SemVer(b, loose)) +} + +exports.compareLoose = compareLoose +function compareLoose (a, b) { + return compare(a, b, true) +} + +exports.rcompare = rcompare +function rcompare (a, b, loose) { + return compare(b, a, loose) +} + +exports.sort = sort +function sort (list, loose) { + return list.sort(function (a, b) { + return exports.compare(a, b, loose) + }) +} + +exports.rsort = rsort +function rsort (list, loose) { + return list.sort(function (a, b) { + return exports.rcompare(a, b, loose) + }) +} + +exports.gt = gt +function gt (a, b, loose) { + return compare(a, b, loose) > 0 +} + +exports.lt = lt +function lt (a, b, loose) { + return compare(a, b, loose) < 0 +} + +exports.eq = eq +function eq (a, b, loose) { + return compare(a, b, loose) === 0 +} + +exports.neq = neq +function neq (a, b, loose) { + return compare(a, b, loose) !== 0 +} + +exports.gte = gte +function gte (a, b, loose) { + return compare(a, b, loose) >= 0 +} + +exports.lte = lte +function lte (a, b, loose) { + return compare(a, b, loose) <= 0 +} + +exports.cmp = cmp +function cmp (a, op, b, loose) { + switch (op) { + case '===': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a === b + + case '!==': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a !== b + + case '': + case '=': + case '==': + return eq(a, b, loose) + + case '!=': + return neq(a, b, loose) + + case '>': + return gt(a, b, loose) + + case '>=': + return gte(a, b, loose) + + case '<': + return lt(a, b, loose) + + case '<=': + return lte(a, b, loose) + + default: + throw new TypeError('Invalid operator: ' + op) + } +} + +exports.Comparator = Comparator +function Comparator (comp, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp + } else { + comp = comp.value + } + } + + if (!(this instanceof Comparator)) { + return new Comparator(comp, options) + } + + debug('comparator', comp, options) + this.options = options + this.loose = !!options.loose + this.parse(comp) + + if (this.semver === ANY) { + this.value = '' + } else { + this.value = this.operator + this.semver.version + } + + debug('comp', this) +} + +var ANY = {} +Comparator.prototype.parse = function (comp) { + var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR] + var m = comp.match(r) + + if (!m) { + throw new TypeError('Invalid comparator: ' + comp) + } + + this.operator = m[1] + if (this.operator === '=') { + this.operator = '' + } + + // if it literally is just '>' or '' then allow anything. + if (!m[2]) { + this.semver = ANY + } else { + this.semver = new SemVer(m[2], this.options.loose) + } +} + +Comparator.prototype.toString = function () { + return this.value +} + +Comparator.prototype.test = function (version) { + debug('Comparator.test', version, this.options.loose) + + if (this.semver === ANY) { + return true + } + + if (typeof version === 'string') { + version = new SemVer(version, this.options) + } + + return cmp(version, this.operator, this.semver, this.options) +} + +Comparator.prototype.intersects = function (comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required') + } + + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + var rangeTmp + + if (this.operator === '') { + rangeTmp = new Range(comp.value, options) + return satisfies(this.value, rangeTmp, options) + } else if (comp.operator === '') { + rangeTmp = new Range(this.value, options) + return satisfies(comp.semver, rangeTmp, options) + } + + var sameDirectionIncreasing = + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '>=' || comp.operator === '>') + var sameDirectionDecreasing = + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '<=' || comp.operator === '<') + var sameSemVer = this.semver.version === comp.semver.version + var differentDirectionsInclusive = + (this.operator === '>=' || this.operator === '<=') && + (comp.operator === '>=' || comp.operator === '<=') + var oppositeDirectionsLessThan = + cmp(this.semver, '<', comp.semver, options) && + ((this.operator === '>=' || this.operator === '>') && + (comp.operator === '<=' || comp.operator === '<')) + var oppositeDirectionsGreaterThan = + cmp(this.semver, '>', comp.semver, options) && + ((this.operator === '<=' || this.operator === '<') && + (comp.operator === '>=' || comp.operator === '>')) + + return sameDirectionIncreasing || sameDirectionDecreasing || + (sameSemVer && differentDirectionsInclusive) || + oppositeDirectionsLessThan || oppositeDirectionsGreaterThan +} + +exports.Range = Range +function Range (range, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (range instanceof Range) { + if (range.loose === !!options.loose && + range.includePrerelease === !!options.includePrerelease) { + return range + } else { + return new Range(range.raw, options) + } + } + + if (range instanceof Comparator) { + return new Range(range.value, options) + } + + if (!(this instanceof Range)) { + return new Range(range, options) + } + + this.options = options + this.loose = !!options.loose + this.includePrerelease = !!options.includePrerelease + + // First, split based on boolean or || + this.raw = range + this.set = range.split(/\s*\|\|\s*/).map(function (range) { + return this.parseRange(range.trim()) + }, this).filter(function (c) { + // throw out any that are not relevant for whatever reason + return c.length + }) + + if (!this.set.length) { + throw new TypeError('Invalid SemVer Range: ' + range) + } + + this.format() +} + +Range.prototype.format = function () { + this.range = this.set.map(function (comps) { + return comps.join(' ').trim() + }).join('||').trim() + return this.range +} + +Range.prototype.toString = function () { + return this.range +} + +Range.prototype.parseRange = function (range) { + var loose = this.options.loose + range = range.trim() + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE] + range = range.replace(hr, hyphenReplace) + debug('hyphen replace', range) + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace) + debug('comparator trim', range, re[COMPARATORTRIM]) + + // `~ 1.2.3` => `~1.2.3` + range = range.replace(re[TILDETRIM], tildeTrimReplace) + + // `^ 1.2.3` => `^1.2.3` + range = range.replace(re[CARETTRIM], caretTrimReplace) + + // normalize spaces + range = range.split(/\s+/).join(' ') + + // At this point, the range is completely trimmed and + // ready to be split into comparators. + + var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR] + var set = range.split(' ').map(function (comp) { + return parseComparator(comp, this.options) + }, this).join(' ').split(/\s+/) + if (this.options.loose) { + // in loose mode, throw out any that are not valid comparators + set = set.filter(function (comp) { + return !!comp.match(compRe) + }) + } + set = set.map(function (comp) { + return new Comparator(comp, this.options) + }, this) + + return set +} + +Range.prototype.intersects = function (range, options) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required') + } + + return this.set.some(function (thisComparators) { + return thisComparators.every(function (thisComparator) { + return range.set.some(function (rangeComparators) { + return rangeComparators.every(function (rangeComparator) { + return thisComparator.intersects(rangeComparator, options) + }) + }) + }) + }) +} + +// Mostly just for testing and legacy API reasons +exports.toComparators = toComparators +function toComparators (range, options) { + return new Range(range, options).set.map(function (comp) { + return comp.map(function (c) { + return c.value + }).join(' ').trim().split(' ') + }) +} + +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +function parseComparator (comp, options) { + debug('comp', comp, options) + comp = replaceCarets(comp, options) + debug('caret', comp) + comp = replaceTildes(comp, options) + debug('tildes', comp) + comp = replaceXRanges(comp, options) + debug('xrange', comp) + comp = replaceStars(comp, options) + debug('stars', comp) + return comp +} + +function isX (id) { + return !id || id.toLowerCase() === 'x' || id === '*' +} + +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 +function replaceTildes (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceTilde(comp, options) + }).join(' ') +} + +function replaceTilde (comp, options) { + var r = options.loose ? re[TILDELOOSE] : re[TILDE] + return comp.replace(r, function (_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + // ~1.2 == >=1.2.0 <1.3.0 + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else if (pr) { + debug('replaceTilde pr', pr) + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } else { + // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + + debug('tilde return', ret) + return ret + }) +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 +// ^1.2.3 --> >=1.2.3 <2.0.0 +// ^1.2.0 --> >=1.2.0 <2.0.0 +function replaceCarets (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceCaret(comp, options) + }).join(' ') +} + +function replaceCaret (comp, options) { + debug('caret', comp, options) + var r = options.loose ? re[CARETLOOSE] : re[CARET] + return comp.replace(r, function (_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + if (M === '0') { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else { + ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' + } + } else if (pr) { + debug('replaceCaret pr', pr) + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + (+M + 1) + '.0.0' + } + } else { + debug('no pr') + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + (+M + 1) + '.0.0' + } + } + + debug('caret return', ret) + return ret + }) +} + +function replaceXRanges (comp, options) { + debug('replaceXRanges', comp, options) + return comp.split(/\s+/).map(function (comp) { + return replaceXRange(comp, options) + }).join(' ') +} + +function replaceXRange (comp, options) { + comp = comp.trim() + var r = options.loose ? re[XRANGELOOSE] : re[XRANGE] + return comp.replace(r, function (ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr) + var xM = isX(M) + var xm = xM || isX(m) + var xp = xm || isX(p) + var anyX = xp + + if (gtlt === '=' && anyX) { + gtlt = '' + } + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0' + } else { + // nothing is forbidden + ret = '*' + } + } else if (gtlt && anyX) { + // we know patch is an x, because we have any x at all. + // replace X with 0 + if (xm) { + m = 0 + } + p = 0 + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>=' + if (xm) { + M = +M + 1 + m = 0 + p = 0 + } else { + m = +m + 1 + p = 0 + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<' + if (xm) { + M = +M + 1 + } else { + m = +m + 1 + } + } + + ret = gtlt + M + '.' + m + '.' + p + } else if (xm) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (xp) { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } + + debug('xRange return', ret) + + return ret + }) +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +function replaceStars (comp, options) { + debug('replaceStars', comp, options) + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(re[STAR], '') +} + +// This function is passed to string.replace(re[HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0 +function hyphenReplace ($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) { + if (isX(fM)) { + from = '' + } else if (isX(fm)) { + from = '>=' + fM + '.0.0' + } else if (isX(fp)) { + from = '>=' + fM + '.' + fm + '.0' + } else { + from = '>=' + from + } + + if (isX(tM)) { + to = '' + } else if (isX(tm)) { + to = '<' + (+tM + 1) + '.0.0' + } else if (isX(tp)) { + to = '<' + tM + '.' + (+tm + 1) + '.0' + } else if (tpr) { + to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr + } else { + to = '<=' + to + } + + return (from + ' ' + to).trim() +} + +// if ANY of the sets match ALL of its comparators, then pass +Range.prototype.test = function (version) { + if (!version) { + return false + } + + if (typeof version === 'string') { + version = new SemVer(version, this.options) + } + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) { + return true + } + } + return false +} + +function testSet (set, version, options) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) { + return false + } + } + + if (version.prerelease.length && !options.includePrerelease) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (i = 0; i < set.length; i++) { + debug(set[i].semver) + if (set[i].semver === ANY) { + continue + } + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) { + return true + } + } + } + + // Version has a -pre, but it's not one of the ones we like. + return false + } + + return true +} + +exports.satisfies = satisfies +function satisfies (version, range, options) { + try { + range = new Range(range, options) + } catch (er) { + return false + } + return range.test(version) +} + +exports.maxSatisfying = maxSatisfying +function maxSatisfying (versions, range, options) { + var max = null + var maxSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!max || maxSV.compare(v) === -1) { + // compare(max, v, true) + max = v + maxSV = new SemVer(max, options) + } + } + }) + return max +} + +exports.minSatisfying = minSatisfying +function minSatisfying (versions, range, options) { + var min = null + var minSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!min || minSV.compare(v) === 1) { + // compare(min, v, true) + min = v + minSV = new SemVer(min, options) + } + } + }) + return min +} + +exports.minVersion = minVersion +function minVersion (range, loose) { + range = new Range(range, loose) + + var minver = new SemVer('0.0.0') + if (range.test(minver)) { + return minver + } + + minver = new SemVer('0.0.0-0') + if (range.test(minver)) { + return minver + } + + minver = null + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + comparators.forEach(function (comparator) { + // Clone to avoid manipulating the comparator's semver object. + var compver = new SemVer(comparator.semver.version) + switch (comparator.operator) { + case '>': + if (compver.prerelease.length === 0) { + compver.patch++ + } else { + compver.prerelease.push(0) + } + compver.raw = compver.format() + /* fallthrough */ + case '': + case '>=': + if (!minver || gt(minver, compver)) { + minver = compver + } + break + case '<': + case '<=': + /* Ignore maximum versions */ + break + /* istanbul ignore next */ + default: + throw new Error('Unexpected operation: ' + comparator.operator) + } + }) + } + + if (minver && range.test(minver)) { + return minver + } + + return null +} + +exports.validRange = validRange +function validRange (range, options) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, options).range || '*' + } catch (er) { + return null + } +} + +// Determine if version is less than all the versions possible in the range +exports.ltr = ltr +function ltr (version, range, options) { + return outside(version, range, '<', options) +} + +// Determine if version is greater than all the versions possible in the range. +exports.gtr = gtr +function gtr (version, range, options) { + return outside(version, range, '>', options) +} + +exports.outside = outside +function outside (version, range, hilo, options) { + version = new SemVer(version, options) + range = new Range(range, options) + + var gtfn, ltefn, ltfn, comp, ecomp + switch (hilo) { + case '>': + gtfn = gt + ltefn = lte + ltfn = lt + comp = '>' + ecomp = '>=' + break + case '<': + gtfn = lt + ltefn = gte + ltfn = gt + comp = '<' + ecomp = '<=' + break + default: + throw new TypeError('Must provide a hilo val of "<" or ">"') + } + + // If it satisifes the range it is not outside + if (satisfies(version, range, options)) { + return false + } + + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + var high = null + var low = null + + comparators.forEach(function (comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator + low = low || comparator + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator + } + }) + + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false + } + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false + } + } + return true +} + +exports.prerelease = prerelease +function prerelease (version, options) { + var parsed = parse(version, options) + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null +} + +exports.intersects = intersects +function intersects (r1, r2, options) { + r1 = new Range(r1, options) + r2 = new Range(r2, options) + return r1.intersects(r2) +} + +exports.coerce = coerce +function coerce (version) { + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + var match = version.match(re[COERCE]) + + if (match == null) { + return null + } + + return parse(match[1] + + '.' + (match[2] || '0') + + '.' + (match[3] || '0')) +} diff --git a/node_modules/cross-spawn/package.json b/node_modules/cross-spawn/package.json new file mode 100644 index 00000000..f48c9e84 --- /dev/null +++ b/node_modules/cross-spawn/package.json @@ -0,0 +1,110 @@ +{ + "_args": [ + [ + "cross-spawn@6.0.5", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "cross-spawn@6.0.5", + "_id": "cross-spawn@6.0.5", + "_inBundle": false, + "_integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "_location": "/cross-spawn", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "cross-spawn@6.0.5", + "name": "cross-spawn", + "escapedName": "cross-spawn", + "rawSpec": "6.0.5", + "saveSpec": null, + "fetchSpec": "6.0.5" + }, + "_requiredBy": [ + "/execa" + ], + "_resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "_spec": "6.0.5", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "André Cruz", + "email": "andre@moxy.studio" + }, + "bugs": { + "url": "https://github.com/moxystudio/node-cross-spawn/issues" + }, + "commitlint": { + "extends": [ + "@commitlint/config-conventional" + ] + }, + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "description": "Cross platform child_process#spawn and child_process#spawnSync", + "devDependencies": { + "@commitlint/cli": "^6.0.0", + "@commitlint/config-conventional": "^6.0.2", + "babel-core": "^6.26.0", + "babel-jest": "^22.1.0", + "babel-preset-moxy": "^2.2.1", + "eslint": "^4.3.0", + "eslint-config-moxy": "^5.0.0", + "husky": "^0.14.3", + "jest": "^22.0.0", + "lint-staged": "^7.0.0", + "mkdirp": "^0.5.1", + "regenerator-runtime": "^0.11.1", + "rimraf": "^2.6.2", + "standard-version": "^4.2.0" + }, + "engines": { + "node": ">=4.8" + }, + "files": [ + "lib" + ], + "homepage": "https://github.com/moxystudio/node-cross-spawn", + "keywords": [ + "spawn", + "spawnSync", + "windows", + "cross-platform", + "path-ext", + "shebang", + "cmd", + "execute" + ], + "license": "MIT", + "lint-staged": { + "*.js": [ + "eslint --fix", + "git add" + ] + }, + "main": "index.js", + "name": "cross-spawn", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/moxystudio/node-cross-spawn.git" + }, + "scripts": { + "commitmsg": "commitlint -e $GIT_PARAMS", + "lint": "eslint .", + "precommit": "lint-staged", + "prerelease": "npm t && npm run lint", + "release": "standard-version", + "test": "jest --env node --coverage" + }, + "standard-version": { + "scripts": { + "posttag": "git push --follow-tags origin master && npm publish" + } + }, + "version": "6.0.5" +} diff --git a/node_modules/deep-eql/LICENSE b/node_modules/deep-eql/LICENSE new file mode 100644 index 00000000..7ea799f0 --- /dev/null +++ b/node_modules/deep-eql/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2013 Jake Luer (http://alogicalparadox.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/deep-eql/README.md b/node_modules/deep-eql/README.md new file mode 100644 index 00000000..96ecef1d --- /dev/null +++ b/node_modules/deep-eql/README.md @@ -0,0 +1,116 @@ +

+ + ChaiJS deep-eql + +

+ +

+ Improved deep equality testing for [node](http://nodejs.org) and the browser. +

+ +

+ + license:mit + + tag:? + + build:? + + coverage:? + + code quality:? + + dependencies:? + + devDependencies:? + + Supported Node Version: 4+ + +
+ + Selenium Test Status + +
+ + Join the Slack chat + + + Join the Gitter chat + +

+ +## What is Deep-Eql? + +Deep Eql is a module which you can use to determine if two objects are "deeply" equal - that is, rather than having referential equality (`a === b`), this module checks an object's keys recursively, until it finds primitives to check for referential equality. For more on equality in JavaScript, read [the comparison operators article on mdn](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators). + +As an example, take the following: + +```js +1 === 1 // These are primitives, they hold the same reference - they are strictly equal +1 == '1' // These are two different primitives, through type coercion they hold the same value - they are loosely equal +{ a: 1 } !== { a: 1 } // These are two different objects, they hold different references and so are not strictly equal - even though they hold the same values inside +{ a: 1 } != { a: 1 } // They have the same type, meaning loose equality performs the same check as strict equality - they are still not equal. + +var deepEql = require("deep-eql"); +deepEql({ a: 1 }, { a: 1 }) === true // deepEql can determine that they share the same keys and those keys share the same values, therefore they are deeply equal! +``` + +## Installation + +### Node.js + +`deep-eql` is available on [npm](http://npmjs.org). + + $ npm install deep-eql + +## Usage + +The primary export of `deep-eql` is function that can be given two objects to compare. It will always return a boolean which can be used to determine if two objects are deeply equal. + +### Rules + +- Strict equality for non-traversable nodes according to [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is): + - `eql(NaN, NaN).should.be.true;` + - `eql(-0, +0).should.be.false;` +- All own and inherited enumerable properties are considered: + - `eql(Object.create({ foo: { a: 1 } }), Object.create({ foo: { a: 1 } })).should.be.true;` + - `eql(Object.create({ foo: { a: 1 } }), Object.create({ foo: { a: 2 } })).should.be.false;` +- Arguments are not Arrays: + - `eql([], arguments).should.be.false;` + - `eql([], Array.prototype.slice.call(arguments)).should.be.true;` +- Error objects are compared by reference (see https://github.com/chaijs/chai/issues/608): + - `eql(new Error('msg'), new Error('msg')).should.be.false;` + - `var err = new Error('msg'); eql(err, err).should.be.true;` diff --git a/node_modules/deep-eql/deep-eql.js b/node_modules/deep-eql/deep-eql.js new file mode 100644 index 00000000..86f0b41a --- /dev/null +++ b/node_modules/deep-eql/deep-eql.js @@ -0,0 +1,833 @@ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.deepEqual = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o + * MIT Licensed + */ + +var type = require('type-detect'); +function FakeMap() { + this._key = 'chai/deep-eql__' + Math.random() + Date.now(); +} + +FakeMap.prototype = { + get: function getMap(key) { + return key[this._key]; + }, + set: function setMap(key, value) { + if (Object.isExtensible(key)) { + Object.defineProperty(key, this._key, { + value: value, + configurable: true, + }); + } + }, +}; + +var MemoizeMap = typeof WeakMap === 'function' ? WeakMap : FakeMap; +/*! + * Check to see if the MemoizeMap has recorded a result of the two operands + * + * @param {Mixed} leftHandOperand + * @param {Mixed} rightHandOperand + * @param {MemoizeMap} memoizeMap + * @returns {Boolean|null} result +*/ +function memoizeCompare(leftHandOperand, rightHandOperand, memoizeMap) { + // Technically, WeakMap keys can *only* be objects, not primitives. + if (!memoizeMap || isPrimitive(leftHandOperand) || isPrimitive(rightHandOperand)) { + return null; + } + var leftHandMap = memoizeMap.get(leftHandOperand); + if (leftHandMap) { + var result = leftHandMap.get(rightHandOperand); + if (typeof result === 'boolean') { + return result; + } + } + return null; +} + +/*! + * Set the result of the equality into the MemoizeMap + * + * @param {Mixed} leftHandOperand + * @param {Mixed} rightHandOperand + * @param {MemoizeMap} memoizeMap + * @param {Boolean} result +*/ +function memoizeSet(leftHandOperand, rightHandOperand, memoizeMap, result) { + // Technically, WeakMap keys can *only* be objects, not primitives. + if (!memoizeMap || isPrimitive(leftHandOperand) || isPrimitive(rightHandOperand)) { + return; + } + var leftHandMap = memoizeMap.get(leftHandOperand); + if (leftHandMap) { + leftHandMap.set(rightHandOperand, result); + } else { + leftHandMap = new MemoizeMap(); + leftHandMap.set(rightHandOperand, result); + memoizeMap.set(leftHandOperand, leftHandMap); + } +} + +/*! + * Primary Export + */ + +module.exports = deepEqual; +module.exports.MemoizeMap = MemoizeMap; + +/** + * Assert deeply nested sameValue equality between two objects of any type. + * + * @param {Mixed} leftHandOperand + * @param {Mixed} rightHandOperand + * @param {Object} [options] (optional) Additional options + * @param {Array} [options.comparator] (optional) Override default algorithm, determining custom equality. + * @param {Array} [options.memoize] (optional) Provide a custom memoization object which will cache the results of + complex objects for a speed boost. By passing `false` you can disable memoization, but this will cause circular + references to blow the stack. + * @return {Boolean} equal match + */ +function deepEqual(leftHandOperand, rightHandOperand, options) { + // If we have a comparator, we can't assume anything; so bail to its check first. + if (options && options.comparator) { + return extensiveDeepEqual(leftHandOperand, rightHandOperand, options); + } + + var simpleResult = simpleEqual(leftHandOperand, rightHandOperand); + if (simpleResult !== null) { + return simpleResult; + } + + // Deeper comparisons are pushed through to a larger function + return extensiveDeepEqual(leftHandOperand, rightHandOperand, options); +} + +/** + * Many comparisons can be canceled out early via simple equality or primitive checks. + * @param {Mixed} leftHandOperand + * @param {Mixed} rightHandOperand + * @return {Boolean|null} equal match + */ +function simpleEqual(leftHandOperand, rightHandOperand) { + // Equal references (except for Numbers) can be returned early + if (leftHandOperand === rightHandOperand) { + // Handle +-0 cases + return leftHandOperand !== 0 || 1 / leftHandOperand === 1 / rightHandOperand; + } + + // handle NaN cases + if ( + leftHandOperand !== leftHandOperand && // eslint-disable-line no-self-compare + rightHandOperand !== rightHandOperand // eslint-disable-line no-self-compare + ) { + return true; + } + + // Anything that is not an 'object', i.e. symbols, functions, booleans, numbers, + // strings, and undefined, can be compared by reference. + if (isPrimitive(leftHandOperand) || isPrimitive(rightHandOperand)) { + // Easy out b/c it would have passed the first equality check + return false; + } + return null; +} + +/*! + * The main logic of the `deepEqual` function. + * + * @param {Mixed} leftHandOperand + * @param {Mixed} rightHandOperand + * @param {Object} [options] (optional) Additional options + * @param {Array} [options.comparator] (optional) Override default algorithm, determining custom equality. + * @param {Array} [options.memoize] (optional) Provide a custom memoization object which will cache the results of + complex objects for a speed boost. By passing `false` you can disable memoization, but this will cause circular + references to blow the stack. + * @return {Boolean} equal match +*/ +function extensiveDeepEqual(leftHandOperand, rightHandOperand, options) { + options = options || {}; + options.memoize = options.memoize === false ? false : options.memoize || new MemoizeMap(); + var comparator = options && options.comparator; + + // Check if a memoized result exists. + var memoizeResultLeft = memoizeCompare(leftHandOperand, rightHandOperand, options.memoize); + if (memoizeResultLeft !== null) { + return memoizeResultLeft; + } + var memoizeResultRight = memoizeCompare(rightHandOperand, leftHandOperand, options.memoize); + if (memoizeResultRight !== null) { + return memoizeResultRight; + } + + // If a comparator is present, use it. + if (comparator) { + var comparatorResult = comparator(leftHandOperand, rightHandOperand); + // Comparators may return null, in which case we want to go back to default behavior. + if (comparatorResult === false || comparatorResult === true) { + memoizeSet(leftHandOperand, rightHandOperand, options.memoize, comparatorResult); + return comparatorResult; + } + // To allow comparators to override *any* behavior, we ran them first. Since it didn't decide + // what to do, we need to make sure to return the basic tests first before we move on. + var simpleResult = simpleEqual(leftHandOperand, rightHandOperand); + if (simpleResult !== null) { + // Don't memoize this, it takes longer to set/retrieve than to just compare. + return simpleResult; + } + } + + var leftHandType = type(leftHandOperand); + if (leftHandType !== type(rightHandOperand)) { + memoizeSet(leftHandOperand, rightHandOperand, options.memoize, false); + return false; + } + + // Temporarily set the operands in the memoize object to prevent blowing the stack + memoizeSet(leftHandOperand, rightHandOperand, options.memoize, true); + + var result = extensiveDeepEqualByType(leftHandOperand, rightHandOperand, leftHandType, options); + memoizeSet(leftHandOperand, rightHandOperand, options.memoize, result); + return result; +} + +function extensiveDeepEqualByType(leftHandOperand, rightHandOperand, leftHandType, options) { + switch (leftHandType) { + case 'String': + case 'Number': + case 'Boolean': + case 'Date': + // If these types are their instance types (e.g. `new Number`) then re-deepEqual against their values + return deepEqual(leftHandOperand.valueOf(), rightHandOperand.valueOf()); + case 'Promise': + case 'Symbol': + case 'function': + case 'WeakMap': + case 'WeakSet': + case 'Error': + return leftHandOperand === rightHandOperand; + case 'Arguments': + case 'Int8Array': + case 'Uint8Array': + case 'Uint8ClampedArray': + case 'Int16Array': + case 'Uint16Array': + case 'Int32Array': + case 'Uint32Array': + case 'Float32Array': + case 'Float64Array': + case 'Array': + return iterableEqual(leftHandOperand, rightHandOperand, options); + case 'RegExp': + return regexpEqual(leftHandOperand, rightHandOperand); + case 'Generator': + return generatorEqual(leftHandOperand, rightHandOperand, options); + case 'DataView': + return iterableEqual(new Uint8Array(leftHandOperand.buffer), new Uint8Array(rightHandOperand.buffer), options); + case 'ArrayBuffer': + return iterableEqual(new Uint8Array(leftHandOperand), new Uint8Array(rightHandOperand), options); + case 'Set': + return entriesEqual(leftHandOperand, rightHandOperand, options); + case 'Map': + return entriesEqual(leftHandOperand, rightHandOperand, options); + default: + return objectEqual(leftHandOperand, rightHandOperand, options); + } +} + +/*! + * Compare two Regular Expressions for equality. + * + * @param {RegExp} leftHandOperand + * @param {RegExp} rightHandOperand + * @return {Boolean} result + */ + +function regexpEqual(leftHandOperand, rightHandOperand) { + return leftHandOperand.toString() === rightHandOperand.toString(); +} + +/*! + * Compare two Sets/Maps for equality. Faster than other equality functions. + * + * @param {Set} leftHandOperand + * @param {Set} rightHandOperand + * @param {Object} [options] (Optional) + * @return {Boolean} result + */ + +function entriesEqual(leftHandOperand, rightHandOperand, options) { + // IE11 doesn't support Set#entries or Set#@@iterator, so we need manually populate using Set#forEach + if (leftHandOperand.size !== rightHandOperand.size) { + return false; + } + if (leftHandOperand.size === 0) { + return true; + } + var leftHandItems = []; + var rightHandItems = []; + leftHandOperand.forEach(function gatherEntries(key, value) { + leftHandItems.push([ key, value ]); + }); + rightHandOperand.forEach(function gatherEntries(key, value) { + rightHandItems.push([ key, value ]); + }); + return iterableEqual(leftHandItems.sort(), rightHandItems.sort(), options); +} + +/*! + * Simple equality for flat iterable objects such as Arrays, TypedArrays or Node.js buffers. + * + * @param {Iterable} leftHandOperand + * @param {Iterable} rightHandOperand + * @param {Object} [options] (Optional) + * @return {Boolean} result + */ + +function iterableEqual(leftHandOperand, rightHandOperand, options) { + var length = leftHandOperand.length; + if (length !== rightHandOperand.length) { + return false; + } + if (length === 0) { + return true; + } + var index = -1; + while (++index < length) { + if (deepEqual(leftHandOperand[index], rightHandOperand[index], options) === false) { + return false; + } + } + return true; +} + +/*! + * Simple equality for generator objects such as those returned by generator functions. + * + * @param {Iterable} leftHandOperand + * @param {Iterable} rightHandOperand + * @param {Object} [options] (Optional) + * @return {Boolean} result + */ + +function generatorEqual(leftHandOperand, rightHandOperand, options) { + return iterableEqual(getGeneratorEntries(leftHandOperand), getGeneratorEntries(rightHandOperand), options); +} + +/*! + * Determine if the given object has an @@iterator function. + * + * @param {Object} target + * @return {Boolean} `true` if the object has an @@iterator function. + */ +function hasIteratorFunction(target) { + return typeof Symbol !== 'undefined' && + typeof target === 'object' && + typeof Symbol.iterator !== 'undefined' && + typeof target[Symbol.iterator] === 'function'; +} + +/*! + * Gets all iterator entries from the given Object. If the Object has no @@iterator function, returns an empty array. + * This will consume the iterator - which could have side effects depending on the @@iterator implementation. + * + * @param {Object} target + * @returns {Array} an array of entries from the @@iterator function + */ +function getIteratorEntries(target) { + if (hasIteratorFunction(target)) { + try { + return getGeneratorEntries(target[Symbol.iterator]()); + } catch (iteratorError) { + return []; + } + } + return []; +} + +/*! + * Gets all entries from a Generator. This will consume the generator - which could have side effects. + * + * @param {Generator} target + * @returns {Array} an array of entries from the Generator. + */ +function getGeneratorEntries(generator) { + var generatorResult = generator.next(); + var accumulator = [ generatorResult.value ]; + while (generatorResult.done === false) { + generatorResult = generator.next(); + accumulator.push(generatorResult.value); + } + return accumulator; +} + +/*! + * Gets all own and inherited enumerable keys from a target. + * + * @param {Object} target + * @returns {Array} an array of own and inherited enumerable keys from the target. + */ +function getEnumerableKeys(target) { + var keys = []; + for (var key in target) { + keys.push(key); + } + return keys; +} + +/*! + * Determines if two objects have matching values, given a set of keys. Defers to deepEqual for the equality check of + * each key. If any value of the given key is not equal, the function will return false (early). + * + * @param {Mixed} leftHandOperand + * @param {Mixed} rightHandOperand + * @param {Array} keys An array of keys to compare the values of leftHandOperand and rightHandOperand against + * @param {Object} [options] (Optional) + * @return {Boolean} result + */ +function keysEqual(leftHandOperand, rightHandOperand, keys, options) { + var length = keys.length; + if (length === 0) { + return true; + } + for (var i = 0; i < length; i += 1) { + if (deepEqual(leftHandOperand[keys[i]], rightHandOperand[keys[i]], options) === false) { + return false; + } + } + return true; +} + +/*! + * Recursively check the equality of two Objects. Once basic sameness has been established it will defer to `deepEqual` + * for each enumerable key in the object. + * + * @param {Mixed} leftHandOperand + * @param {Mixed} rightHandOperand + * @param {Object} [options] (Optional) + * @return {Boolean} result + */ + +function objectEqual(leftHandOperand, rightHandOperand, options) { + var leftHandKeys = getEnumerableKeys(leftHandOperand); + var rightHandKeys = getEnumerableKeys(rightHandOperand); + if (leftHandKeys.length && leftHandKeys.length === rightHandKeys.length) { + leftHandKeys.sort(); + rightHandKeys.sort(); + if (iterableEqual(leftHandKeys, rightHandKeys) === false) { + return false; + } + return keysEqual(leftHandOperand, rightHandOperand, leftHandKeys, options); + } + + var leftHandEntries = getIteratorEntries(leftHandOperand); + var rightHandEntries = getIteratorEntries(rightHandOperand); + if (leftHandEntries.length && leftHandEntries.length === rightHandEntries.length) { + leftHandEntries.sort(); + rightHandEntries.sort(); + return iterableEqual(leftHandEntries, rightHandEntries, options); + } + + if (leftHandKeys.length === 0 && + leftHandEntries.length === 0 && + rightHandKeys.length === 0 && + rightHandEntries.length === 0) { + return true; + } + + return false; +} + +/*! + * Returns true if the argument is a primitive. + * + * This intentionally returns true for all objects that can be compared by reference, + * including functions and symbols. + * + * @param {Mixed} value + * @return {Boolean} result + */ +function isPrimitive(value) { + return value === null || typeof value !== 'object'; +} + +},{"type-detect":2}],2:[function(require,module,exports){ +(function (global){ +'use strict'; + +/* ! + * type-detect + * Copyright(c) 2013 jake luer + * MIT Licensed + */ +var promiseExists = typeof Promise === 'function'; +var globalObject = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : self; // eslint-disable-line +var isDom = 'location' in globalObject && 'document' in globalObject; +var symbolExists = typeof Symbol !== 'undefined'; +var mapExists = typeof Map !== 'undefined'; +var setExists = typeof Set !== 'undefined'; +var weakMapExists = typeof WeakMap !== 'undefined'; +var weakSetExists = typeof WeakSet !== 'undefined'; +var dataViewExists = typeof DataView !== 'undefined'; +var symbolIteratorExists = symbolExists && typeof Symbol.iterator !== 'undefined'; +var symbolToStringTagExists = symbolExists && typeof Symbol.toStringTag !== 'undefined'; +var setEntriesExists = setExists && typeof Set.prototype.entries === 'function'; +var mapEntriesExists = mapExists && typeof Map.prototype.entries === 'function'; +var setIteratorPrototype = setEntriesExists && Object.getPrototypeOf(new Set().entries()); +var mapIteratorPrototype = mapEntriesExists && Object.getPrototypeOf(new Map().entries()); +var arrayIteratorExists = symbolIteratorExists && typeof Array.prototype[Symbol.iterator] === 'function'; +var arrayIteratorPrototype = arrayIteratorExists && Object.getPrototypeOf([][Symbol.iterator]()); +var stringIteratorExists = symbolIteratorExists && typeof String.prototype[Symbol.iterator] === 'function'; +var stringIteratorPrototype = stringIteratorExists && Object.getPrototypeOf(''[Symbol.iterator]()); +var toStringLeftSliceLength = 8; +var toStringRightSliceLength = -1; +/** + * ### typeOf (obj) + * + * Uses `Object.prototype.toString` to determine the type of an object, + * normalising behaviour across engine versions & well optimised. + * + * @param {Mixed} object + * @return {String} object type + * @api public + */ +module.exports = function typeDetect(obj) { + /* ! Speed optimisation + * Pre: + * string literal x 3,039,035 ops/sec ±1.62% (78 runs sampled) + * boolean literal x 1,424,138 ops/sec ±4.54% (75 runs sampled) + * number literal x 1,653,153 ops/sec ±1.91% (82 runs sampled) + * undefined x 9,978,660 ops/sec ±1.92% (75 runs sampled) + * function x 2,556,769 ops/sec ±1.73% (77 runs sampled) + * Post: + * string literal x 38,564,796 ops/sec ±1.15% (79 runs sampled) + * boolean literal x 31,148,940 ops/sec ±1.10% (79 runs sampled) + * number literal x 32,679,330 ops/sec ±1.90% (78 runs sampled) + * undefined x 32,363,368 ops/sec ±1.07% (82 runs sampled) + * function x 31,296,870 ops/sec ±0.96% (83 runs sampled) + */ + var typeofObj = typeof obj; + if (typeofObj !== 'object') { + return typeofObj; + } + + /* ! Speed optimisation + * Pre: + * null x 28,645,765 ops/sec ±1.17% (82 runs sampled) + * Post: + * null x 36,428,962 ops/sec ±1.37% (84 runs sampled) + */ + if (obj === null) { + return 'null'; + } + + /* ! Spec Conformance + * Test: `Object.prototype.toString.call(window)`` + * - Node === "[object global]" + * - Chrome === "[object global]" + * - Firefox === "[object Window]" + * - PhantomJS === "[object Window]" + * - Safari === "[object Window]" + * - IE 11 === "[object Window]" + * - IE Edge === "[object Window]" + * Test: `Object.prototype.toString.call(this)`` + * - Chrome Worker === "[object global]" + * - Firefox Worker === "[object DedicatedWorkerGlobalScope]" + * - Safari Worker === "[object DedicatedWorkerGlobalScope]" + * - IE 11 Worker === "[object WorkerGlobalScope]" + * - IE Edge Worker === "[object WorkerGlobalScope]" + */ + if (obj === globalObject) { + return 'global'; + } + + /* ! Speed optimisation + * Pre: + * array literal x 2,888,352 ops/sec ±0.67% (82 runs sampled) + * Post: + * array literal x 22,479,650 ops/sec ±0.96% (81 runs sampled) + */ + if ( + Array.isArray(obj) && + (symbolToStringTagExists === false || !(Symbol.toStringTag in obj)) + ) { + return 'Array'; + } + + if (isDom) { + /* ! Spec Conformance + * (https://html.spec.whatwg.org/multipage/browsers.html#location) + * WhatWG HTML$7.7.3 - The `Location` interface + * Test: `Object.prototype.toString.call(window.location)`` + * - IE <=11 === "[object Object]" + * - IE Edge <=13 === "[object Object]" + */ + if (obj === globalObject.location) { + return 'Location'; + } + + /* ! Spec Conformance + * (https://html.spec.whatwg.org/#document) + * WhatWG HTML$3.1.1 - The `Document` object + * Note: Most browsers currently adher to the W3C DOM Level 2 spec + * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-26809268) + * which suggests that browsers should use HTMLTableCellElement for + * both TD and TH elements. WhatWG separates these. + * WhatWG HTML states: + * > For historical reasons, Window objects must also have a + * > writable, configurable, non-enumerable property named + * > HTMLDocument whose value is the Document interface object. + * Test: `Object.prototype.toString.call(document)`` + * - Chrome === "[object HTMLDocument]" + * - Firefox === "[object HTMLDocument]" + * - Safari === "[object HTMLDocument]" + * - IE <=10 === "[object Document]" + * - IE 11 === "[object HTMLDocument]" + * - IE Edge <=13 === "[object HTMLDocument]" + */ + if (obj === globalObject.document) { + return 'Document'; + } + + /* ! Spec Conformance + * (https://html.spec.whatwg.org/multipage/webappapis.html#mimetypearray) + * WhatWG HTML$8.6.1.5 - Plugins - Interface MimeTypeArray + * Test: `Object.prototype.toString.call(navigator.mimeTypes)`` + * - IE <=10 === "[object MSMimeTypesCollection]" + */ + if (obj === (globalObject.navigator || {}).mimeTypes) { + return 'MimeTypeArray'; + } + + /* ! Spec Conformance + * (https://html.spec.whatwg.org/multipage/webappapis.html#pluginarray) + * WhatWG HTML$8.6.1.5 - Plugins - Interface PluginArray + * Test: `Object.prototype.toString.call(navigator.plugins)`` + * - IE <=10 === "[object MSPluginsCollection]" + */ + if (obj === (globalObject.navigator || {}).plugins) { + return 'PluginArray'; + } + + /* ! Spec Conformance + * (https://html.spec.whatwg.org/multipage/webappapis.html#pluginarray) + * WhatWG HTML$4.4.4 - The `blockquote` element - Interface `HTMLQuoteElement` + * Test: `Object.prototype.toString.call(document.createElement('blockquote'))`` + * - IE <=10 === "[object HTMLBlockElement]" + */ + if (obj instanceof HTMLElement && obj.tagName === 'BLOCKQUOTE') { + return 'HTMLQuoteElement'; + } + + /* ! Spec Conformance + * (https://html.spec.whatwg.org/#htmltabledatacellelement) + * WhatWG HTML$4.9.9 - The `td` element - Interface `HTMLTableDataCellElement` + * Note: Most browsers currently adher to the W3C DOM Level 2 spec + * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-82915075) + * which suggests that browsers should use HTMLTableCellElement for + * both TD and TH elements. WhatWG separates these. + * Test: Object.prototype.toString.call(document.createElement('td')) + * - Chrome === "[object HTMLTableCellElement]" + * - Firefox === "[object HTMLTableCellElement]" + * - Safari === "[object HTMLTableCellElement]" + */ + if (obj instanceof HTMLElement && obj.tagName === 'TD') { + return 'HTMLTableDataCellElement'; + } + + /* ! Spec Conformance + * (https://html.spec.whatwg.org/#htmltableheadercellelement) + * WhatWG HTML$4.9.9 - The `td` element - Interface `HTMLTableHeaderCellElement` + * Note: Most browsers currently adher to the W3C DOM Level 2 spec + * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-82915075) + * which suggests that browsers should use HTMLTableCellElement for + * both TD and TH elements. WhatWG separates these. + * Test: Object.prototype.toString.call(document.createElement('th')) + * - Chrome === "[object HTMLTableCellElement]" + * - Firefox === "[object HTMLTableCellElement]" + * - Safari === "[object HTMLTableCellElement]" + */ + if (obj instanceof HTMLElement && obj.tagName === 'TH') { + return 'HTMLTableHeaderCellElement'; + } + } + + /* ! Speed optimisation + * Pre: + * Float64Array x 625,644 ops/sec ±1.58% (80 runs sampled) + * Float32Array x 1,279,852 ops/sec ±2.91% (77 runs sampled) + * Uint32Array x 1,178,185 ops/sec ±1.95% (83 runs sampled) + * Uint16Array x 1,008,380 ops/sec ±2.25% (80 runs sampled) + * Uint8Array x 1,128,040 ops/sec ±2.11% (81 runs sampled) + * Int32Array x 1,170,119 ops/sec ±2.88% (80 runs sampled) + * Int16Array x 1,176,348 ops/sec ±5.79% (86 runs sampled) + * Int8Array x 1,058,707 ops/sec ±4.94% (77 runs sampled) + * Uint8ClampedArray x 1,110,633 ops/sec ±4.20% (80 runs sampled) + * Post: + * Float64Array x 7,105,671 ops/sec ±13.47% (64 runs sampled) + * Float32Array x 5,887,912 ops/sec ±1.46% (82 runs sampled) + * Uint32Array x 6,491,661 ops/sec ±1.76% (79 runs sampled) + * Uint16Array x 6,559,795 ops/sec ±1.67% (82 runs sampled) + * Uint8Array x 6,463,966 ops/sec ±1.43% (85 runs sampled) + * Int32Array x 5,641,841 ops/sec ±3.49% (81 runs sampled) + * Int16Array x 6,583,511 ops/sec ±1.98% (80 runs sampled) + * Int8Array x 6,606,078 ops/sec ±1.74% (81 runs sampled) + * Uint8ClampedArray x 6,602,224 ops/sec ±1.77% (83 runs sampled) + */ + var stringTag = (symbolToStringTagExists && obj[Symbol.toStringTag]); + if (typeof stringTag === 'string') { + return stringTag; + } + + var objPrototype = Object.getPrototypeOf(obj); + /* ! Speed optimisation + * Pre: + * regex literal x 1,772,385 ops/sec ±1.85% (77 runs sampled) + * regex constructor x 2,143,634 ops/sec ±2.46% (78 runs sampled) + * Post: + * regex literal x 3,928,009 ops/sec ±0.65% (78 runs sampled) + * regex constructor x 3,931,108 ops/sec ±0.58% (84 runs sampled) + */ + if (objPrototype === RegExp.prototype) { + return 'RegExp'; + } + + /* ! Speed optimisation + * Pre: + * date x 2,130,074 ops/sec ±4.42% (68 runs sampled) + * Post: + * date x 3,953,779 ops/sec ±1.35% (77 runs sampled) + */ + if (objPrototype === Date.prototype) { + return 'Date'; + } + + /* ! Spec Conformance + * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-promise.prototype-@@tostringtag) + * ES6$25.4.5.4 - Promise.prototype[@@toStringTag] should be "Promise": + * Test: `Object.prototype.toString.call(Promise.resolve())`` + * - Chrome <=47 === "[object Object]" + * - Edge <=20 === "[object Object]" + * - Firefox 29-Latest === "[object Promise]" + * - Safari 7.1-Latest === "[object Promise]" + */ + if (promiseExists && objPrototype === Promise.prototype) { + return 'Promise'; + } + + /* ! Speed optimisation + * Pre: + * set x 2,222,186 ops/sec ±1.31% (82 runs sampled) + * Post: + * set x 4,545,879 ops/sec ±1.13% (83 runs sampled) + */ + if (setExists && objPrototype === Set.prototype) { + return 'Set'; + } + + /* ! Speed optimisation + * Pre: + * map x 2,396,842 ops/sec ±1.59% (81 runs sampled) + * Post: + * map x 4,183,945 ops/sec ±6.59% (82 runs sampled) + */ + if (mapExists && objPrototype === Map.prototype) { + return 'Map'; + } + + /* ! Speed optimisation + * Pre: + * weakset x 1,323,220 ops/sec ±2.17% (76 runs sampled) + * Post: + * weakset x 4,237,510 ops/sec ±2.01% (77 runs sampled) + */ + if (weakSetExists && objPrototype === WeakSet.prototype) { + return 'WeakSet'; + } + + /* ! Speed optimisation + * Pre: + * weakmap x 1,500,260 ops/sec ±2.02% (78 runs sampled) + * Post: + * weakmap x 3,881,384 ops/sec ±1.45% (82 runs sampled) + */ + if (weakMapExists && objPrototype === WeakMap.prototype) { + return 'WeakMap'; + } + + /* ! Spec Conformance + * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-dataview.prototype-@@tostringtag) + * ES6$24.2.4.21 - DataView.prototype[@@toStringTag] should be "DataView": + * Test: `Object.prototype.toString.call(new DataView(new ArrayBuffer(1)))`` + * - Edge <=13 === "[object Object]" + */ + if (dataViewExists && objPrototype === DataView.prototype) { + return 'DataView'; + } + + /* ! Spec Conformance + * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%mapiteratorprototype%-@@tostringtag) + * ES6$23.1.5.2.2 - %MapIteratorPrototype%[@@toStringTag] should be "Map Iterator": + * Test: `Object.prototype.toString.call(new Map().entries())`` + * - Edge <=13 === "[object Object]" + */ + if (mapExists && objPrototype === mapIteratorPrototype) { + return 'Map Iterator'; + } + + /* ! Spec Conformance + * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%setiteratorprototype%-@@tostringtag) + * ES6$23.2.5.2.2 - %SetIteratorPrototype%[@@toStringTag] should be "Set Iterator": + * Test: `Object.prototype.toString.call(new Set().entries())`` + * - Edge <=13 === "[object Object]" + */ + if (setExists && objPrototype === setIteratorPrototype) { + return 'Set Iterator'; + } + + /* ! Spec Conformance + * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%arrayiteratorprototype%-@@tostringtag) + * ES6$22.1.5.2.2 - %ArrayIteratorPrototype%[@@toStringTag] should be "Array Iterator": + * Test: `Object.prototype.toString.call([][Symbol.iterator]())`` + * - Edge <=13 === "[object Object]" + */ + if (arrayIteratorExists && objPrototype === arrayIteratorPrototype) { + return 'Array Iterator'; + } + + /* ! Spec Conformance + * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%stringiteratorprototype%-@@tostringtag) + * ES6$21.1.5.2.2 - %StringIteratorPrototype%[@@toStringTag] should be "String Iterator": + * Test: `Object.prototype.toString.call(''[Symbol.iterator]())`` + * - Edge <=13 === "[object Object]" + */ + if (stringIteratorExists && objPrototype === stringIteratorPrototype) { + return 'String Iterator'; + } + + /* ! Speed optimisation + * Pre: + * object from null x 2,424,320 ops/sec ±1.67% (76 runs sampled) + * Post: + * object from null x 5,838,000 ops/sec ±0.99% (84 runs sampled) + */ + if (objPrototype === null) { + return 'Object'; + } + + return Object + .prototype + .toString + .call(obj) + .slice(toStringLeftSliceLength, toStringRightSliceLength); +}; + +module.exports.typeDetect = module.exports; + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}]},{},[1])(1) +}); \ No newline at end of file diff --git a/node_modules/deep-eql/index.js b/node_modules/deep-eql/index.js new file mode 100644 index 00000000..b1b52951 --- /dev/null +++ b/node_modules/deep-eql/index.js @@ -0,0 +1,455 @@ +'use strict'; +/* globals Symbol: false, Uint8Array: false, WeakMap: false */ +/*! + * deep-eql + * Copyright(c) 2013 Jake Luer + * MIT Licensed + */ + +var type = require('type-detect'); +function FakeMap() { + this._key = 'chai/deep-eql__' + Math.random() + Date.now(); +} + +FakeMap.prototype = { + get: function getMap(key) { + return key[this._key]; + }, + set: function setMap(key, value) { + if (Object.isExtensible(key)) { + Object.defineProperty(key, this._key, { + value: value, + configurable: true, + }); + } + }, +}; + +var MemoizeMap = typeof WeakMap === 'function' ? WeakMap : FakeMap; +/*! + * Check to see if the MemoizeMap has recorded a result of the two operands + * + * @param {Mixed} leftHandOperand + * @param {Mixed} rightHandOperand + * @param {MemoizeMap} memoizeMap + * @returns {Boolean|null} result +*/ +function memoizeCompare(leftHandOperand, rightHandOperand, memoizeMap) { + // Technically, WeakMap keys can *only* be objects, not primitives. + if (!memoizeMap || isPrimitive(leftHandOperand) || isPrimitive(rightHandOperand)) { + return null; + } + var leftHandMap = memoizeMap.get(leftHandOperand); + if (leftHandMap) { + var result = leftHandMap.get(rightHandOperand); + if (typeof result === 'boolean') { + return result; + } + } + return null; +} + +/*! + * Set the result of the equality into the MemoizeMap + * + * @param {Mixed} leftHandOperand + * @param {Mixed} rightHandOperand + * @param {MemoizeMap} memoizeMap + * @param {Boolean} result +*/ +function memoizeSet(leftHandOperand, rightHandOperand, memoizeMap, result) { + // Technically, WeakMap keys can *only* be objects, not primitives. + if (!memoizeMap || isPrimitive(leftHandOperand) || isPrimitive(rightHandOperand)) { + return; + } + var leftHandMap = memoizeMap.get(leftHandOperand); + if (leftHandMap) { + leftHandMap.set(rightHandOperand, result); + } else { + leftHandMap = new MemoizeMap(); + leftHandMap.set(rightHandOperand, result); + memoizeMap.set(leftHandOperand, leftHandMap); + } +} + +/*! + * Primary Export + */ + +module.exports = deepEqual; +module.exports.MemoizeMap = MemoizeMap; + +/** + * Assert deeply nested sameValue equality between two objects of any type. + * + * @param {Mixed} leftHandOperand + * @param {Mixed} rightHandOperand + * @param {Object} [options] (optional) Additional options + * @param {Array} [options.comparator] (optional) Override default algorithm, determining custom equality. + * @param {Array} [options.memoize] (optional) Provide a custom memoization object which will cache the results of + complex objects for a speed boost. By passing `false` you can disable memoization, but this will cause circular + references to blow the stack. + * @return {Boolean} equal match + */ +function deepEqual(leftHandOperand, rightHandOperand, options) { + // If we have a comparator, we can't assume anything; so bail to its check first. + if (options && options.comparator) { + return extensiveDeepEqual(leftHandOperand, rightHandOperand, options); + } + + var simpleResult = simpleEqual(leftHandOperand, rightHandOperand); + if (simpleResult !== null) { + return simpleResult; + } + + // Deeper comparisons are pushed through to a larger function + return extensiveDeepEqual(leftHandOperand, rightHandOperand, options); +} + +/** + * Many comparisons can be canceled out early via simple equality or primitive checks. + * @param {Mixed} leftHandOperand + * @param {Mixed} rightHandOperand + * @return {Boolean|null} equal match + */ +function simpleEqual(leftHandOperand, rightHandOperand) { + // Equal references (except for Numbers) can be returned early + if (leftHandOperand === rightHandOperand) { + // Handle +-0 cases + return leftHandOperand !== 0 || 1 / leftHandOperand === 1 / rightHandOperand; + } + + // handle NaN cases + if ( + leftHandOperand !== leftHandOperand && // eslint-disable-line no-self-compare + rightHandOperand !== rightHandOperand // eslint-disable-line no-self-compare + ) { + return true; + } + + // Anything that is not an 'object', i.e. symbols, functions, booleans, numbers, + // strings, and undefined, can be compared by reference. + if (isPrimitive(leftHandOperand) || isPrimitive(rightHandOperand)) { + // Easy out b/c it would have passed the first equality check + return false; + } + return null; +} + +/*! + * The main logic of the `deepEqual` function. + * + * @param {Mixed} leftHandOperand + * @param {Mixed} rightHandOperand + * @param {Object} [options] (optional) Additional options + * @param {Array} [options.comparator] (optional) Override default algorithm, determining custom equality. + * @param {Array} [options.memoize] (optional) Provide a custom memoization object which will cache the results of + complex objects for a speed boost. By passing `false` you can disable memoization, but this will cause circular + references to blow the stack. + * @return {Boolean} equal match +*/ +function extensiveDeepEqual(leftHandOperand, rightHandOperand, options) { + options = options || {}; + options.memoize = options.memoize === false ? false : options.memoize || new MemoizeMap(); + var comparator = options && options.comparator; + + // Check if a memoized result exists. + var memoizeResultLeft = memoizeCompare(leftHandOperand, rightHandOperand, options.memoize); + if (memoizeResultLeft !== null) { + return memoizeResultLeft; + } + var memoizeResultRight = memoizeCompare(rightHandOperand, leftHandOperand, options.memoize); + if (memoizeResultRight !== null) { + return memoizeResultRight; + } + + // If a comparator is present, use it. + if (comparator) { + var comparatorResult = comparator(leftHandOperand, rightHandOperand); + // Comparators may return null, in which case we want to go back to default behavior. + if (comparatorResult === false || comparatorResult === true) { + memoizeSet(leftHandOperand, rightHandOperand, options.memoize, comparatorResult); + return comparatorResult; + } + // To allow comparators to override *any* behavior, we ran them first. Since it didn't decide + // what to do, we need to make sure to return the basic tests first before we move on. + var simpleResult = simpleEqual(leftHandOperand, rightHandOperand); + if (simpleResult !== null) { + // Don't memoize this, it takes longer to set/retrieve than to just compare. + return simpleResult; + } + } + + var leftHandType = type(leftHandOperand); + if (leftHandType !== type(rightHandOperand)) { + memoizeSet(leftHandOperand, rightHandOperand, options.memoize, false); + return false; + } + + // Temporarily set the operands in the memoize object to prevent blowing the stack + memoizeSet(leftHandOperand, rightHandOperand, options.memoize, true); + + var result = extensiveDeepEqualByType(leftHandOperand, rightHandOperand, leftHandType, options); + memoizeSet(leftHandOperand, rightHandOperand, options.memoize, result); + return result; +} + +function extensiveDeepEqualByType(leftHandOperand, rightHandOperand, leftHandType, options) { + switch (leftHandType) { + case 'String': + case 'Number': + case 'Boolean': + case 'Date': + // If these types are their instance types (e.g. `new Number`) then re-deepEqual against their values + return deepEqual(leftHandOperand.valueOf(), rightHandOperand.valueOf()); + case 'Promise': + case 'Symbol': + case 'function': + case 'WeakMap': + case 'WeakSet': + case 'Error': + return leftHandOperand === rightHandOperand; + case 'Arguments': + case 'Int8Array': + case 'Uint8Array': + case 'Uint8ClampedArray': + case 'Int16Array': + case 'Uint16Array': + case 'Int32Array': + case 'Uint32Array': + case 'Float32Array': + case 'Float64Array': + case 'Array': + return iterableEqual(leftHandOperand, rightHandOperand, options); + case 'RegExp': + return regexpEqual(leftHandOperand, rightHandOperand); + case 'Generator': + return generatorEqual(leftHandOperand, rightHandOperand, options); + case 'DataView': + return iterableEqual(new Uint8Array(leftHandOperand.buffer), new Uint8Array(rightHandOperand.buffer), options); + case 'ArrayBuffer': + return iterableEqual(new Uint8Array(leftHandOperand), new Uint8Array(rightHandOperand), options); + case 'Set': + return entriesEqual(leftHandOperand, rightHandOperand, options); + case 'Map': + return entriesEqual(leftHandOperand, rightHandOperand, options); + default: + return objectEqual(leftHandOperand, rightHandOperand, options); + } +} + +/*! + * Compare two Regular Expressions for equality. + * + * @param {RegExp} leftHandOperand + * @param {RegExp} rightHandOperand + * @return {Boolean} result + */ + +function regexpEqual(leftHandOperand, rightHandOperand) { + return leftHandOperand.toString() === rightHandOperand.toString(); +} + +/*! + * Compare two Sets/Maps for equality. Faster than other equality functions. + * + * @param {Set} leftHandOperand + * @param {Set} rightHandOperand + * @param {Object} [options] (Optional) + * @return {Boolean} result + */ + +function entriesEqual(leftHandOperand, rightHandOperand, options) { + // IE11 doesn't support Set#entries or Set#@@iterator, so we need manually populate using Set#forEach + if (leftHandOperand.size !== rightHandOperand.size) { + return false; + } + if (leftHandOperand.size === 0) { + return true; + } + var leftHandItems = []; + var rightHandItems = []; + leftHandOperand.forEach(function gatherEntries(key, value) { + leftHandItems.push([ key, value ]); + }); + rightHandOperand.forEach(function gatherEntries(key, value) { + rightHandItems.push([ key, value ]); + }); + return iterableEqual(leftHandItems.sort(), rightHandItems.sort(), options); +} + +/*! + * Simple equality for flat iterable objects such as Arrays, TypedArrays or Node.js buffers. + * + * @param {Iterable} leftHandOperand + * @param {Iterable} rightHandOperand + * @param {Object} [options] (Optional) + * @return {Boolean} result + */ + +function iterableEqual(leftHandOperand, rightHandOperand, options) { + var length = leftHandOperand.length; + if (length !== rightHandOperand.length) { + return false; + } + if (length === 0) { + return true; + } + var index = -1; + while (++index < length) { + if (deepEqual(leftHandOperand[index], rightHandOperand[index], options) === false) { + return false; + } + } + return true; +} + +/*! + * Simple equality for generator objects such as those returned by generator functions. + * + * @param {Iterable} leftHandOperand + * @param {Iterable} rightHandOperand + * @param {Object} [options] (Optional) + * @return {Boolean} result + */ + +function generatorEqual(leftHandOperand, rightHandOperand, options) { + return iterableEqual(getGeneratorEntries(leftHandOperand), getGeneratorEntries(rightHandOperand), options); +} + +/*! + * Determine if the given object has an @@iterator function. + * + * @param {Object} target + * @return {Boolean} `true` if the object has an @@iterator function. + */ +function hasIteratorFunction(target) { + return typeof Symbol !== 'undefined' && + typeof target === 'object' && + typeof Symbol.iterator !== 'undefined' && + typeof target[Symbol.iterator] === 'function'; +} + +/*! + * Gets all iterator entries from the given Object. If the Object has no @@iterator function, returns an empty array. + * This will consume the iterator - which could have side effects depending on the @@iterator implementation. + * + * @param {Object} target + * @returns {Array} an array of entries from the @@iterator function + */ +function getIteratorEntries(target) { + if (hasIteratorFunction(target)) { + try { + return getGeneratorEntries(target[Symbol.iterator]()); + } catch (iteratorError) { + return []; + } + } + return []; +} + +/*! + * Gets all entries from a Generator. This will consume the generator - which could have side effects. + * + * @param {Generator} target + * @returns {Array} an array of entries from the Generator. + */ +function getGeneratorEntries(generator) { + var generatorResult = generator.next(); + var accumulator = [ generatorResult.value ]; + while (generatorResult.done === false) { + generatorResult = generator.next(); + accumulator.push(generatorResult.value); + } + return accumulator; +} + +/*! + * Gets all own and inherited enumerable keys from a target. + * + * @param {Object} target + * @returns {Array} an array of own and inherited enumerable keys from the target. + */ +function getEnumerableKeys(target) { + var keys = []; + for (var key in target) { + keys.push(key); + } + return keys; +} + +/*! + * Determines if two objects have matching values, given a set of keys. Defers to deepEqual for the equality check of + * each key. If any value of the given key is not equal, the function will return false (early). + * + * @param {Mixed} leftHandOperand + * @param {Mixed} rightHandOperand + * @param {Array} keys An array of keys to compare the values of leftHandOperand and rightHandOperand against + * @param {Object} [options] (Optional) + * @return {Boolean} result + */ +function keysEqual(leftHandOperand, rightHandOperand, keys, options) { + var length = keys.length; + if (length === 0) { + return true; + } + for (var i = 0; i < length; i += 1) { + if (deepEqual(leftHandOperand[keys[i]], rightHandOperand[keys[i]], options) === false) { + return false; + } + } + return true; +} + +/*! + * Recursively check the equality of two Objects. Once basic sameness has been established it will defer to `deepEqual` + * for each enumerable key in the object. + * + * @param {Mixed} leftHandOperand + * @param {Mixed} rightHandOperand + * @param {Object} [options] (Optional) + * @return {Boolean} result + */ + +function objectEqual(leftHandOperand, rightHandOperand, options) { + var leftHandKeys = getEnumerableKeys(leftHandOperand); + var rightHandKeys = getEnumerableKeys(rightHandOperand); + if (leftHandKeys.length && leftHandKeys.length === rightHandKeys.length) { + leftHandKeys.sort(); + rightHandKeys.sort(); + if (iterableEqual(leftHandKeys, rightHandKeys) === false) { + return false; + } + return keysEqual(leftHandOperand, rightHandOperand, leftHandKeys, options); + } + + var leftHandEntries = getIteratorEntries(leftHandOperand); + var rightHandEntries = getIteratorEntries(rightHandOperand); + if (leftHandEntries.length && leftHandEntries.length === rightHandEntries.length) { + leftHandEntries.sort(); + rightHandEntries.sort(); + return iterableEqual(leftHandEntries, rightHandEntries, options); + } + + if (leftHandKeys.length === 0 && + leftHandEntries.length === 0 && + rightHandKeys.length === 0 && + rightHandEntries.length === 0) { + return true; + } + + return false; +} + +/*! + * Returns true if the argument is a primitive. + * + * This intentionally returns true for all objects that can be compared by reference, + * including functions and symbols. + * + * @param {Mixed} value + * @return {Boolean} result + */ +function isPrimitive(value) { + return value === null || typeof value !== 'object'; +} diff --git a/node_modules/deep-eql/package.json b/node_modules/deep-eql/package.json new file mode 100644 index 00000000..62967679 --- /dev/null +++ b/node_modules/deep-eql/package.json @@ -0,0 +1,134 @@ +{ + "_args": [ + [ + "deep-eql@3.0.1", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "deep-eql@3.0.1", + "_id": "deep-eql@3.0.1", + "_inBundle": false, + "_integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "_location": "/deep-eql", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "deep-eql@3.0.1", + "name": "deep-eql", + "escapedName": "deep-eql", + "rawSpec": "3.0.1", + "saveSpec": null, + "fetchSpec": "3.0.1" + }, + "_requiredBy": [ + "/chai" + ], + "_resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "_spec": "3.0.1", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "Jake Luer", + "email": "jake@alogicalparadox.com" + }, + "bugs": { + "url": "https://github.com/chaijs/deep-eql/issues" + }, + "config": { + "ghooks": { + "commit-msg": "validate-commit-msg" + } + }, + "contributors": [ + { + "name": "Keith Cirkel", + "url": "https://github.com/keithamus" + }, + { + "name": "dougluce", + "url": "https://github.com/dougluce" + }, + { + "name": "Lorenz Leutgeb", + "url": "https://github.com/flowlo" + } + ], + "dependencies": { + "type-detect": "^4.0.0" + }, + "description": "Improved deep equality testing for Node.js and the browser.", + "devDependencies": { + "benchmark": "^2.1.0", + "browserify": "^13.0.0", + "browserify-istanbul": "^1.0.0", + "component": "*", + "coveralls": "2.11.8", + "eslint": "^2.4.0", + "eslint-config-strict": "^8.5.0", + "eslint-plugin-filenames": "^0.2.0", + "ghooks": "^1.0.1", + "istanbul": "^0.4.2", + "karma": "^0.13.22", + "karma-browserify": "^5.0.2", + "karma-coverage": "^0.5.5", + "karma-mocha": "^0.2.2", + "karma-phantomjs-launcher": "^1.0.0", + "karma-sauce-launcher": "^0.3.1", + "kewlr": "^0.3.1", + "lcov-result-merger": "^1.0.2", + "lodash.isequal": "^4.4.0", + "mocha": "^3.1.2", + "phantomjs-prebuilt": "^2.1.5", + "semantic-release": "^4.3.5", + "simple-assert": "^1.0.0", + "travis-after-all": "^1.4.4", + "validate-commit-msg": "^2.3.1", + "watchify": "^3.7.0" + }, + "engines": { + "node": ">=0.12" + }, + "eslintConfig": { + "extends": [ + "strict/es5" + ], + "rules": { + "complexity": 0, + "spaced-comment": 0, + "no-underscore-dangle": 0, + "no-use-before-define": 0 + } + }, + "files": [ + "index.js", + "deep-eql.js" + ], + "homepage": "https://github.com/chaijs/deep-eql#readme", + "keywords": [ + "chai util", + "deep equal", + "object equal", + "testing" + ], + "license": "MIT", + "main": "./index", + "name": "deep-eql", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/chaijs/deep-eql.git" + }, + "scripts": { + "bench": "node bench", + "build": "browserify $npm_package_main --standalone deepEqual -o deep-eql.js", + "lint": "eslint --ignore-path .gitignore .", + "prepublish": "npm run build", + "pretest": "npm run lint", + "semantic-release": "semantic-release pre && npm publish && semantic-release post", + "test": "npm run test:node && npm run test:browser", + "test:browser": "karma start --singleRun=true", + "test:node": "istanbul cover _mocha", + "upload-coverage": "lcov-result-merger 'coverage/**/lcov.info' | coveralls; exit 0", + "watch": "karma start --auto-watch --singleRun=false" + }, + "version": "3.0.1" +} diff --git a/node_modules/deprecation/LICENSE b/node_modules/deprecation/LICENSE new file mode 100644 index 00000000..1683b583 --- /dev/null +++ b/node_modules/deprecation/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Gregor Martynus and contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/deprecation/README.md b/node_modules/deprecation/README.md new file mode 100644 index 00000000..648809d5 --- /dev/null +++ b/node_modules/deprecation/README.md @@ -0,0 +1,77 @@ +# deprecation + +> Log a deprecation message with stack + +![build](https://action-badges.now.sh/gr2m/deprecation) + +## Usage + + + + + + +
+Browsers + + +Load `deprecation` directly from [cdn.pika.dev](https://cdn.pika.dev) + +```html + +``` + +
+Node + + +Install with `npm install deprecation` + +```js +const { Deprecation } = require("deprecation"); +// or: import { Deprecation } from "deprecation"; +``` + +
+ +```js +function foo() { + bar(); +} + +function bar() { + baz(); +} + +function baz() { + console.warn(new Deprecation("[my-lib] foo() is deprecated, use bar()")); +} + +foo(); +// { Deprecation: [my-lib] foo() is deprecated, use bar() +// at baz (/path/to/file.js:12:15) +// at bar (/path/to/file.js:8:3) +// at foo (/path/to/file.js:4:3) +``` + +To log a deprecation message only once, you can use the [once](https://www.npmjs.com/package/once) module. + +```js +const Deprecation = require("deprecation"); +const once = require("once"); + +const deprecateFoo = once(console.warn); + +function foo() { + deprecateFoo(new Deprecation("[my-lib] foo() is deprecated, use bar()")); +} + +foo(); +foo(); // logs nothing +``` + +## License + +[ISC](LICENSE) diff --git a/node_modules/deprecation/dist-node/index.js b/node_modules/deprecation/dist-node/index.js new file mode 100644 index 00000000..9da17757 --- /dev/null +++ b/node_modules/deprecation/dist-node/index.js @@ -0,0 +1,20 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +class Deprecation extends Error { + constructor(message) { + super(message); // Maintains proper stack trace (only available on V8) + + /* istanbul ignore next */ + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + + this.name = 'Deprecation'; + } + +} + +exports.Deprecation = Deprecation; diff --git a/node_modules/deprecation/dist-src/index.js b/node_modules/deprecation/dist-src/index.js new file mode 100644 index 00000000..7950fdc0 --- /dev/null +++ b/node_modules/deprecation/dist-src/index.js @@ -0,0 +1,14 @@ +export class Deprecation extends Error { + constructor(message) { + super(message); // Maintains proper stack trace (only available on V8) + + /* istanbul ignore next */ + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + + this.name = 'Deprecation'; + } + +} \ No newline at end of file diff --git a/node_modules/deprecation/dist-types/index.d.ts b/node_modules/deprecation/dist-types/index.d.ts new file mode 100644 index 00000000..e3ae7ad4 --- /dev/null +++ b/node_modules/deprecation/dist-types/index.d.ts @@ -0,0 +1,3 @@ +export class Deprecation extends Error { + name: "Deprecation"; +} diff --git a/node_modules/deprecation/dist-web/index.js b/node_modules/deprecation/dist-web/index.js new file mode 100644 index 00000000..c6bbda75 --- /dev/null +++ b/node_modules/deprecation/dist-web/index.js @@ -0,0 +1,16 @@ +class Deprecation extends Error { + constructor(message) { + super(message); // Maintains proper stack trace (only available on V8) + + /* istanbul ignore next */ + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + + this.name = 'Deprecation'; + } + +} + +export { Deprecation }; diff --git a/node_modules/deprecation/package.json b/node_modules/deprecation/package.json new file mode 100644 index 00000000..1aebc4b9 --- /dev/null +++ b/node_modules/deprecation/package.json @@ -0,0 +1,68 @@ +{ + "_args": [ + [ + "deprecation@2.3.1", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "deprecation@2.3.1", + "_id": "deprecation@2.3.1", + "_inBundle": false, + "_integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==", + "_location": "/deprecation", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "deprecation@2.3.1", + "name": "deprecation", + "escapedName": "deprecation", + "rawSpec": "2.3.1", + "saveSpec": null, + "fetchSpec": "2.3.1" + }, + "_requiredBy": [ + "/@octokit/request", + "/@octokit/request-error", + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", + "_spec": "2.3.1", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "bugs": { + "url": "https://github.com/gr2m/deprecation/issues" + }, + "dependencies": {}, + "description": "Log a deprecation message with stack", + "devDependencies": { + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.4.0", + "@pika/plugin-build-types": "^0.4.0", + "@pika/plugin-build-web": "^0.4.0", + "@pika/plugin-standard-pkg": "^0.4.0", + "semantic-release": "^15.13.3" + }, + "esnext": "dist-src/index.js", + "files": [ + "dist-*/", + "bin/" + ], + "homepage": "https://github.com/gr2m/deprecation#readme", + "keywords": [ + "deprecate", + "deprecated", + "deprecation" + ], + "license": "ISC", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "name": "deprecation", + "pika": true, + "repository": { + "type": "git", + "url": "git+https://github.com/gr2m/deprecation.git" + }, + "sideEffects": false, + "types": "dist-types/index.d.ts", + "version": "2.3.1" +} diff --git a/node_modules/end-of-stream/LICENSE b/node_modules/end-of-stream/LICENSE new file mode 100644 index 00000000..757562ec --- /dev/null +++ b/node_modules/end-of-stream/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Mathias Buus + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/end-of-stream/README.md b/node_modules/end-of-stream/README.md new file mode 100644 index 00000000..f2560c93 --- /dev/null +++ b/node_modules/end-of-stream/README.md @@ -0,0 +1,52 @@ +# end-of-stream + +A node module that calls a callback when a readable/writable/duplex stream has completed or failed. + + npm install end-of-stream + +## Usage + +Simply pass a stream and a callback to the `eos`. +Both legacy streams, streams2 and stream3 are supported. + +``` js +var eos = require('end-of-stream'); + +eos(readableStream, function(err) { + // this will be set to the stream instance + if (err) return console.log('stream had an error or closed early'); + console.log('stream has ended', this === readableStream); +}); + +eos(writableStream, function(err) { + if (err) return console.log('stream had an error or closed early'); + console.log('stream has finished', this === writableStream); +}); + +eos(duplexStream, function(err) { + if (err) return console.log('stream had an error or closed early'); + console.log('stream has ended and finished', this === duplexStream); +}); + +eos(duplexStream, {readable:false}, function(err) { + if (err) return console.log('stream had an error or closed early'); + console.log('stream has finished but might still be readable'); +}); + +eos(duplexStream, {writable:false}, function(err) { + if (err) return console.log('stream had an error or closed early'); + console.log('stream has ended but might still be writable'); +}); + +eos(readableStream, {error:false}, function(err) { + // do not treat emit('error', err) as a end-of-stream +}); +``` + +## License + +MIT + +## Related + +`end-of-stream` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one. diff --git a/node_modules/end-of-stream/index.js b/node_modules/end-of-stream/index.js new file mode 100644 index 00000000..be426c22 --- /dev/null +++ b/node_modules/end-of-stream/index.js @@ -0,0 +1,87 @@ +var once = require('once'); + +var noop = function() {}; + +var isRequest = function(stream) { + return stream.setHeader && typeof stream.abort === 'function'; +}; + +var isChildProcess = function(stream) { + return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3 +}; + +var eos = function(stream, opts, callback) { + if (typeof opts === 'function') return eos(stream, null, opts); + if (!opts) opts = {}; + + callback = once(callback || noop); + + var ws = stream._writableState; + var rs = stream._readableState; + var readable = opts.readable || (opts.readable !== false && stream.readable); + var writable = opts.writable || (opts.writable !== false && stream.writable); + + var onlegacyfinish = function() { + if (!stream.writable) onfinish(); + }; + + var onfinish = function() { + writable = false; + if (!readable) callback.call(stream); + }; + + var onend = function() { + readable = false; + if (!writable) callback.call(stream); + }; + + var onexit = function(exitCode) { + callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null); + }; + + var onerror = function(err) { + callback.call(stream, err); + }; + + var onclose = function() { + if (readable && !(rs && rs.ended)) return callback.call(stream, new Error('premature close')); + if (writable && !(ws && ws.ended)) return callback.call(stream, new Error('premature close')); + }; + + var onrequest = function() { + stream.req.on('finish', onfinish); + }; + + if (isRequest(stream)) { + stream.on('complete', onfinish); + stream.on('abort', onclose); + if (stream.req) onrequest(); + else stream.on('request', onrequest); + } else if (writable && !ws) { // legacy streams + stream.on('end', onlegacyfinish); + stream.on('close', onlegacyfinish); + } + + if (isChildProcess(stream)) stream.on('exit', onexit); + + stream.on('end', onend); + stream.on('finish', onfinish); + if (opts.error !== false) stream.on('error', onerror); + stream.on('close', onclose); + + return function() { + stream.removeListener('complete', onfinish); + stream.removeListener('abort', onclose); + stream.removeListener('request', onrequest); + if (stream.req) stream.req.removeListener('finish', onfinish); + stream.removeListener('end', onlegacyfinish); + stream.removeListener('close', onlegacyfinish); + stream.removeListener('finish', onfinish); + stream.removeListener('exit', onexit); + stream.removeListener('end', onend); + stream.removeListener('error', onerror); + stream.removeListener('close', onclose); + }; +}; + +module.exports = eos; diff --git a/node_modules/end-of-stream/package.json b/node_modules/end-of-stream/package.json new file mode 100644 index 00000000..6649ebc5 --- /dev/null +++ b/node_modules/end-of-stream/package.json @@ -0,0 +1,65 @@ +{ + "_args": [ + [ + "end-of-stream@1.4.1", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "end-of-stream@1.4.1", + "_id": "end-of-stream@1.4.1", + "_inBundle": false, + "_integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "_location": "/end-of-stream", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "end-of-stream@1.4.1", + "name": "end-of-stream", + "escapedName": "end-of-stream", + "rawSpec": "1.4.1", + "saveSpec": null, + "fetchSpec": "1.4.1" + }, + "_requiredBy": [ + "/pump" + ], + "_resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "_spec": "1.4.1", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "Mathias Buus", + "email": "mathiasbuus@gmail.com" + }, + "bugs": { + "url": "https://github.com/mafintosh/end-of-stream/issues" + }, + "dependencies": { + "once": "^1.4.0" + }, + "description": "Call a callback when a readable/writable/duplex stream has completed or failed.", + "files": [ + "index.js" + ], + "homepage": "https://github.com/mafintosh/end-of-stream", + "keywords": [ + "stream", + "streams", + "callback", + "finish", + "close", + "end", + "wait" + ], + "license": "MIT", + "main": "index.js", + "name": "end-of-stream", + "repository": { + "type": "git", + "url": "git://github.com/mafintosh/end-of-stream.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.4.1" +} diff --git a/node_modules/execa/index.js b/node_modules/execa/index.js new file mode 100644 index 00000000..aad9ac88 --- /dev/null +++ b/node_modules/execa/index.js @@ -0,0 +1,361 @@ +'use strict'; +const path = require('path'); +const childProcess = require('child_process'); +const crossSpawn = require('cross-spawn'); +const stripEof = require('strip-eof'); +const npmRunPath = require('npm-run-path'); +const isStream = require('is-stream'); +const _getStream = require('get-stream'); +const pFinally = require('p-finally'); +const onExit = require('signal-exit'); +const errname = require('./lib/errname'); +const stdio = require('./lib/stdio'); + +const TEN_MEGABYTES = 1000 * 1000 * 10; + +function handleArgs(cmd, args, opts) { + let parsed; + + opts = Object.assign({ + extendEnv: true, + env: {} + }, opts); + + if (opts.extendEnv) { + opts.env = Object.assign({}, process.env, opts.env); + } + + if (opts.__winShell === true) { + delete opts.__winShell; + parsed = { + command: cmd, + args, + options: opts, + file: cmd, + original: { + cmd, + args + } + }; + } else { + parsed = crossSpawn._parse(cmd, args, opts); + } + + opts = Object.assign({ + maxBuffer: TEN_MEGABYTES, + buffer: true, + stripEof: true, + preferLocal: true, + localDir: parsed.options.cwd || process.cwd(), + encoding: 'utf8', + reject: true, + cleanup: true + }, parsed.options); + + opts.stdio = stdio(opts); + + if (opts.preferLocal) { + opts.env = npmRunPath.env(Object.assign({}, opts, {cwd: opts.localDir})); + } + + if (opts.detached) { + // #115 + opts.cleanup = false; + } + + if (process.platform === 'win32' && path.basename(parsed.command) === 'cmd.exe') { + // #116 + parsed.args.unshift('/q'); + } + + return { + cmd: parsed.command, + args: parsed.args, + opts, + parsed + }; +} + +function handleInput(spawned, input) { + if (input === null || input === undefined) { + return; + } + + if (isStream(input)) { + input.pipe(spawned.stdin); + } else { + spawned.stdin.end(input); + } +} + +function handleOutput(opts, val) { + if (val && opts.stripEof) { + val = stripEof(val); + } + + return val; +} + +function handleShell(fn, cmd, opts) { + let file = '/bin/sh'; + let args = ['-c', cmd]; + + opts = Object.assign({}, opts); + + if (process.platform === 'win32') { + opts.__winShell = true; + file = process.env.comspec || 'cmd.exe'; + args = ['/s', '/c', `"${cmd}"`]; + opts.windowsVerbatimArguments = true; + } + + if (opts.shell) { + file = opts.shell; + delete opts.shell; + } + + return fn(file, args, opts); +} + +function getStream(process, stream, {encoding, buffer, maxBuffer}) { + if (!process[stream]) { + return null; + } + + let ret; + + if (!buffer) { + // TODO: Use `ret = util.promisify(stream.finished)(process[stream]);` when targeting Node.js 10 + ret = new Promise((resolve, reject) => { + process[stream] + .once('end', resolve) + .once('error', reject); + }); + } else if (encoding) { + ret = _getStream(process[stream], { + encoding, + maxBuffer + }); + } else { + ret = _getStream.buffer(process[stream], {maxBuffer}); + } + + return ret.catch(err => { + err.stream = stream; + err.message = `${stream} ${err.message}`; + throw err; + }); +} + +function makeError(result, options) { + const {stdout, stderr} = result; + + let err = result.error; + const {code, signal} = result; + + const {parsed, joinedCmd} = options; + const timedOut = options.timedOut || false; + + if (!err) { + let output = ''; + + if (Array.isArray(parsed.opts.stdio)) { + if (parsed.opts.stdio[2] !== 'inherit') { + output += output.length > 0 ? stderr : `\n${stderr}`; + } + + if (parsed.opts.stdio[1] !== 'inherit') { + output += `\n${stdout}`; + } + } else if (parsed.opts.stdio !== 'inherit') { + output = `\n${stderr}${stdout}`; + } + + err = new Error(`Command failed: ${joinedCmd}${output}`); + err.code = code < 0 ? errname(code) : code; + } + + err.stdout = stdout; + err.stderr = stderr; + err.failed = true; + err.signal = signal || null; + err.cmd = joinedCmd; + err.timedOut = timedOut; + + return err; +} + +function joinCmd(cmd, args) { + let joinedCmd = cmd; + + if (Array.isArray(args) && args.length > 0) { + joinedCmd += ' ' + args.join(' '); + } + + return joinedCmd; +} + +module.exports = (cmd, args, opts) => { + const parsed = handleArgs(cmd, args, opts); + const {encoding, buffer, maxBuffer} = parsed.opts; + const joinedCmd = joinCmd(cmd, args); + + let spawned; + try { + spawned = childProcess.spawn(parsed.cmd, parsed.args, parsed.opts); + } catch (err) { + return Promise.reject(err); + } + + let removeExitHandler; + if (parsed.opts.cleanup) { + removeExitHandler = onExit(() => { + spawned.kill(); + }); + } + + let timeoutId = null; + let timedOut = false; + + const cleanup = () => { + if (timeoutId) { + clearTimeout(timeoutId); + timeoutId = null; + } + + if (removeExitHandler) { + removeExitHandler(); + } + }; + + if (parsed.opts.timeout > 0) { + timeoutId = setTimeout(() => { + timeoutId = null; + timedOut = true; + spawned.kill(parsed.opts.killSignal); + }, parsed.opts.timeout); + } + + const processDone = new Promise(resolve => { + spawned.on('exit', (code, signal) => { + cleanup(); + resolve({code, signal}); + }); + + spawned.on('error', err => { + cleanup(); + resolve({error: err}); + }); + + if (spawned.stdin) { + spawned.stdin.on('error', err => { + cleanup(); + resolve({error: err}); + }); + } + }); + + function destroy() { + if (spawned.stdout) { + spawned.stdout.destroy(); + } + + if (spawned.stderr) { + spawned.stderr.destroy(); + } + } + + const handlePromise = () => pFinally(Promise.all([ + processDone, + getStream(spawned, 'stdout', {encoding, buffer, maxBuffer}), + getStream(spawned, 'stderr', {encoding, buffer, maxBuffer}) + ]).then(arr => { + const result = arr[0]; + result.stdout = arr[1]; + result.stderr = arr[2]; + + if (result.error || result.code !== 0 || result.signal !== null) { + const err = makeError(result, { + joinedCmd, + parsed, + timedOut + }); + + // TODO: missing some timeout logic for killed + // https://github.com/nodejs/node/blob/master/lib/child_process.js#L203 + // err.killed = spawned.killed || killed; + err.killed = err.killed || spawned.killed; + + if (!parsed.opts.reject) { + return err; + } + + throw err; + } + + return { + stdout: handleOutput(parsed.opts, result.stdout), + stderr: handleOutput(parsed.opts, result.stderr), + code: 0, + failed: false, + killed: false, + signal: null, + cmd: joinedCmd, + timedOut: false + }; + }), destroy); + + crossSpawn._enoent.hookChildProcess(spawned, parsed.parsed); + + handleInput(spawned, parsed.opts.input); + + spawned.then = (onfulfilled, onrejected) => handlePromise().then(onfulfilled, onrejected); + spawned.catch = onrejected => handlePromise().catch(onrejected); + + return spawned; +}; + +// TODO: set `stderr: 'ignore'` when that option is implemented +module.exports.stdout = (...args) => module.exports(...args).then(x => x.stdout); + +// TODO: set `stdout: 'ignore'` when that option is implemented +module.exports.stderr = (...args) => module.exports(...args).then(x => x.stderr); + +module.exports.shell = (cmd, opts) => handleShell(module.exports, cmd, opts); + +module.exports.sync = (cmd, args, opts) => { + const parsed = handleArgs(cmd, args, opts); + const joinedCmd = joinCmd(cmd, args); + + if (isStream(parsed.opts.input)) { + throw new TypeError('The `input` option cannot be a stream in sync mode'); + } + + const result = childProcess.spawnSync(parsed.cmd, parsed.args, parsed.opts); + result.code = result.status; + + if (result.error || result.status !== 0 || result.signal !== null) { + const err = makeError(result, { + joinedCmd, + parsed + }); + + if (!parsed.opts.reject) { + return err; + } + + throw err; + } + + return { + stdout: handleOutput(parsed.opts, result.stdout), + stderr: handleOutput(parsed.opts, result.stderr), + code: 0, + failed: false, + signal: null, + cmd: joinedCmd, + timedOut: false + }; +}; + +module.exports.shellSync = (cmd, opts) => handleShell(module.exports.sync, cmd, opts); diff --git a/node_modules/execa/lib/errname.js b/node_modules/execa/lib/errname.js new file mode 100644 index 00000000..e367837b --- /dev/null +++ b/node_modules/execa/lib/errname.js @@ -0,0 +1,39 @@ +'use strict'; +// Older verions of Node.js might not have `util.getSystemErrorName()`. +// In that case, fall back to a deprecated internal. +const util = require('util'); + +let uv; + +if (typeof util.getSystemErrorName === 'function') { + module.exports = util.getSystemErrorName; +} else { + try { + uv = process.binding('uv'); + + if (typeof uv.errname !== 'function') { + throw new TypeError('uv.errname is not a function'); + } + } catch (err) { + console.error('execa/lib/errname: unable to establish process.binding(\'uv\')', err); + uv = null; + } + + module.exports = code => errname(uv, code); +} + +// Used for testing the fallback behavior +module.exports.__test__ = errname; + +function errname(uv, code) { + if (uv) { + return uv.errname(code); + } + + if (!(code < 0)) { + throw new Error('err >= 0'); + } + + return `Unknown system error ${code}`; +} + diff --git a/node_modules/execa/lib/stdio.js b/node_modules/execa/lib/stdio.js new file mode 100644 index 00000000..a82d4683 --- /dev/null +++ b/node_modules/execa/lib/stdio.js @@ -0,0 +1,41 @@ +'use strict'; +const alias = ['stdin', 'stdout', 'stderr']; + +const hasAlias = opts => alias.some(x => Boolean(opts[x])); + +module.exports = opts => { + if (!opts) { + return null; + } + + if (opts.stdio && hasAlias(opts)) { + throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${alias.map(x => `\`${x}\``).join(', ')}`); + } + + if (typeof opts.stdio === 'string') { + return opts.stdio; + } + + const stdio = opts.stdio || []; + + if (!Array.isArray(stdio)) { + throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``); + } + + const result = []; + const len = Math.max(stdio.length, alias.length); + + for (let i = 0; i < len; i++) { + let value = null; + + if (stdio[i] !== undefined) { + value = stdio[i]; + } else if (opts[alias[i]] !== undefined) { + value = opts[alias[i]]; + } + + result[i] = value; + } + + return result; +}; diff --git a/node_modules/execa/license b/node_modules/execa/license new file mode 100644 index 00000000..e7af2f77 --- /dev/null +++ b/node_modules/execa/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/execa/package.json b/node_modules/execa/package.json new file mode 100644 index 00000000..83d03595 --- /dev/null +++ b/node_modules/execa/package.json @@ -0,0 +1,107 @@ +{ + "_args": [ + [ + "execa@1.0.0", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "execa@1.0.0", + "_id": "execa@1.0.0", + "_inBundle": false, + "_integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "_location": "/execa", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "execa@1.0.0", + "name": "execa", + "escapedName": "execa", + "rawSpec": "1.0.0", + "saveSpec": null, + "fetchSpec": "1.0.0" + }, + "_requiredBy": [ + "/jest-changed-files", + "/os-locale", + "/sane", + "/windows-release" + ], + "_resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "_spec": "1.0.0", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/execa/issues" + }, + "dependencies": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "description": "A better `child_process`", + "devDependencies": { + "ava": "*", + "cat-names": "^1.0.2", + "coveralls": "^3.0.1", + "delay": "^3.0.0", + "is-running": "^2.0.0", + "nyc": "^13.0.1", + "tempfile": "^2.0.0", + "xo": "*" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js", + "lib" + ], + "homepage": "https://github.com/sindresorhus/execa#readme", + "keywords": [ + "exec", + "child", + "process", + "execute", + "fork", + "execfile", + "spawn", + "file", + "shell", + "bin", + "binary", + "binaries", + "npm", + "path", + "local" + ], + "license": "MIT", + "name": "execa", + "nyc": { + "reporter": [ + "text", + "lcov" + ], + "exclude": [ + "**/fixtures/**", + "**/test.js", + "**/test/**" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/execa.git" + }, + "scripts": { + "test": "xo && nyc ava" + }, + "version": "1.0.0" +} diff --git a/node_modules/execa/readme.md b/node_modules/execa/readme.md new file mode 100644 index 00000000..f3f533d9 --- /dev/null +++ b/node_modules/execa/readme.md @@ -0,0 +1,327 @@ +# execa [![Build Status: Linux](https://travis-ci.org/sindresorhus/execa.svg?branch=master)](https://travis-ci.org/sindresorhus/execa) [![Build status: Windows](https://ci.appveyor.com/api/projects/status/x5ajamxtjtt93cqv/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/execa/branch/master) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/execa/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/execa?branch=master) + +> A better [`child_process`](https://nodejs.org/api/child_process.html) + + +## Why + +- Promise interface. +- [Strips EOF](https://github.com/sindresorhus/strip-eof) from the output so you don't have to `stdout.trim()`. +- Supports [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) binaries cross-platform. +- [Improved Windows support.](https://github.com/IndigoUnited/node-cross-spawn#why) +- Higher max buffer. 10 MB instead of 200 KB. +- [Executes locally installed binaries by name.](#preferlocal) +- [Cleans up spawned processes when the parent process dies.](#cleanup) + + +## Install + +``` +$ npm install execa +``` + + + + + + +## Usage + +```js +const execa = require('execa'); + +(async () => { + const {stdout} = await execa('echo', ['unicorns']); + console.log(stdout); + //=> 'unicorns' +})(); +``` + +Additional examples: + +```js +const execa = require('execa'); + +(async () => { + // Pipe the child process stdout to the current stdout + execa('echo', ['unicorns']).stdout.pipe(process.stdout); + + + // Run a shell command + const {stdout} = await execa.shell('echo unicorns'); + //=> 'unicorns' + + + // Catching an error + try { + await execa.shell('exit 3'); + } catch (error) { + console.log(error); + /* + { + message: 'Command failed: /bin/sh -c exit 3' + killed: false, + code: 3, + signal: null, + cmd: '/bin/sh -c exit 3', + stdout: '', + stderr: '', + timedOut: false + } + */ + } +})(); + +// Catching an error with a sync method +try { + execa.shellSync('exit 3'); +} catch (error) { + console.log(error); + /* + { + message: 'Command failed: /bin/sh -c exit 3' + code: 3, + signal: null, + cmd: '/bin/sh -c exit 3', + stdout: '', + stderr: '', + timedOut: false + } + */ +} +``` + + +## API + +### execa(file, [arguments], [options]) + +Execute a file. + +Think of this as a mix of `child_process.execFile` and `child_process.spawn`. + +Returns a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess), which is enhanced to also be a `Promise` for a result `Object` with `stdout` and `stderr` properties. + +### execa.stdout(file, [arguments], [options]) + +Same as `execa()`, but returns only `stdout`. + +### execa.stderr(file, [arguments], [options]) + +Same as `execa()`, but returns only `stderr`. + +### execa.shell(command, [options]) + +Execute a command through the system shell. Prefer `execa()` whenever possible, as it's both faster and safer. + +Returns a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess). + +The `child_process` instance is enhanced to also be promise for a result object with `stdout` and `stderr` properties. + +### execa.sync(file, [arguments], [options]) + +Execute a file synchronously. + +Returns the same result object as [`child_process.spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options). + +This method throws an `Error` if the command fails. + +### execa.shellSync(file, [options]) + +Execute a command synchronously through the system shell. + +Returns the same result object as [`child_process.spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options). + +### options + +Type: `Object` + +#### cwd + +Type: `string`
+Default: `process.cwd()` + +Current working directory of the child process. + +#### env + +Type: `Object`
+Default: `process.env` + +Environment key-value pairs. Extends automatically from `process.env`. Set `extendEnv` to `false` if you don't want this. + +#### extendEnv + +Type: `boolean`
+Default: `true` + +Set to `false` if you don't want to extend the environment variables when providing the `env` property. + +#### argv0 + +Type: `string` + +Explicitly set the value of `argv[0]` sent to the child process. This will be set to `command` or `file` if not specified. + +#### stdio + +Type: `string[]` `string`
+Default: `pipe` + +Child's [stdio](https://nodejs.org/api/child_process.html#child_process_options_stdio) configuration. + +#### detached + +Type: `boolean` + +Prepare child to run independently of its parent process. Specific behavior [depends on the platform](https://nodejs.org/api/child_process.html#child_process_options_detached). + +#### uid + +Type: `number` + +Sets the user identity of the process. + +#### gid + +Type: `number` + +Sets the group identity of the process. + +#### shell + +Type: `boolean` `string`
+Default: `false` + +If `true`, runs `command` inside of a shell. Uses `/bin/sh` on UNIX and `cmd.exe` on Windows. A different shell can be specified as a string. The shell should understand the `-c` switch on UNIX or `/d /s /c` on Windows. + +#### stripEof + +Type: `boolean`
+Default: `true` + +[Strip EOF](https://github.com/sindresorhus/strip-eof) (last newline) from the output. + +#### preferLocal + +Type: `boolean`
+Default: `true` + +Prefer locally installed binaries when looking for a binary to execute.
+If you `$ npm install foo`, you can then `execa('foo')`. + +#### localDir + +Type: `string`
+Default: `process.cwd()` + +Preferred path to find locally installed binaries in (use with `preferLocal`). + +#### input + +Type: `string` `Buffer` `stream.Readable` + +Write some input to the `stdin` of your binary.
+Streams are not allowed when using the synchronous methods. + +#### reject + +Type: `boolean`
+Default: `true` + +Setting this to `false` resolves the promise with the error instead of rejecting it. + +#### cleanup + +Type: `boolean`
+Default: `true` + +Keep track of the spawned process and `kill` it when the parent process exits. + +#### encoding + +Type: `string`
+Default: `utf8` + +Specify the character encoding used to decode the `stdout` and `stderr` output. + +#### timeout + +Type: `number`
+Default: `0` + +If timeout is greater than `0`, the parent will send the signal identified by the `killSignal` property (the default is `SIGTERM`) if the child runs longer than timeout milliseconds. + +#### buffer + +Type: `boolean`
+Default: `true` + +Buffer the output from the spawned process. When buffering is disabled you must consume the output of the `stdout` and `stderr` streams because the promise will not be resolved/rejected until they have completed. + +#### maxBuffer + +Type: `number`
+Default: `10000000` (10MB) + +Largest amount of data in bytes allowed on `stdout` or `stderr`. + +#### killSignal + +Type: `string` `number`
+Default: `SIGTERM` + +Signal value to be used when the spawned process will be killed. + +#### stdin + +Type: `string` `number` `Stream` `undefined` `null`
+Default: `pipe` + +Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio). + +#### stdout + +Type: `string` `number` `Stream` `undefined` `null`
+Default: `pipe` + +Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio). + +#### stderr + +Type: `string` `number` `Stream` `undefined` `null`
+Default: `pipe` + +Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio). + +#### windowsVerbatimArguments + +Type: `boolean`
+Default: `false` + +If `true`, no quoting or escaping of arguments is done on Windows. Ignored on other platforms. This is set to `true` automatically when the `shell` option is `true`. + + +## Tips + +### Save and pipe output from a child process + +Let's say you want to show the output of a child process in real-time while also saving it to a variable. + +```js +const execa = require('execa'); +const getStream = require('get-stream'); + +const stream = execa('echo', ['foo']).stdout; + +stream.pipe(process.stdout); + +getStream(stream).then(value => { + console.log('child output:', value); +}); +``` + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/get-func-name/LICENSE b/node_modules/get-func-name/LICENSE new file mode 100644 index 00000000..7ea799f0 --- /dev/null +++ b/node_modules/get-func-name/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2013 Jake Luer (http://alogicalparadox.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/get-func-name/README.md b/node_modules/get-func-name/README.md new file mode 100644 index 00000000..e9084162 --- /dev/null +++ b/node_modules/get-func-name/README.md @@ -0,0 +1,123 @@ +

+ + ChaiJS +
+ get-func-name +
+

+ +

+ Utility for getting a function's name for node and the browser. +

+ +

+ + license:mit + + + tag:? + + + build:? + + + coverage:? + + + npm:? + + + dependencies:? + + + devDependencies:? + +
+ + Selenium Test Status + +
+ + Join the Slack chat + + + Join the Gitter chat + +

+ +## What is get-func-name? + +This is a module to retrieve a function's name securely and consistently both in NodeJS and the browser. + +## Installation + +### Node.js + +`get-func-name` is available on [npm](http://npmjs.org). To install it, type: + + $ npm install get-func-name + +### Browsers + +You can also use it within the browser; install via npm and use the `get-func-name.js` file found within the download. For example: + +```html + +``` + +## Usage + +The module `get-func-name` exports the following method: + +* `getFuncName(fn)` - Returns the name of a function. + +```js +var getFuncName = require('get-func-name'); +``` + +#### .getFuncName(fun) + +```js +var getFuncName = require('get-func-name'); + +var unknownFunction = function myCoolFunction(word) { + return word + 'is cool'; +}; + +var anonymousFunction = (function () { + return function () {}; +}()); + +getFuncName(unknownFunction) // 'myCoolFunction' +getFuncName(anonymousFunction) // '' +``` diff --git a/node_modules/get-func-name/get-func-name.js b/node_modules/get-func-name/get-func-name.js new file mode 100644 index 00000000..f0c4069e --- /dev/null +++ b/node_modules/get-func-name/get-func-name.js @@ -0,0 +1,48 @@ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.getFuncName = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o + * MIT Licensed + */ + +/** + * ### .getFuncName(constructorFn) + * + * Returns the name of a function. + * When a non-function instance is passed, returns `null`. + * This also includes a polyfill function if `aFunc.name` is not defined. + * + * @name getFuncName + * @param {Function} funct + * @namespace Utils + * @api public + */ + +var toString = Function.prototype.toString; +var functionNameMatch = /\s*function(?:\s|\s*\/\*[^(?:*\/)]+\*\/\s*)*([^\s\(\/]+)/; +function getFuncName(aFunc) { + if (typeof aFunc !== 'function') { + return null; + } + + var name = ''; + if (typeof Function.prototype.name === 'undefined' && typeof aFunc.name === 'undefined') { + // Here we run a polyfill if Function does not support the `name` property and if aFunc.name is not defined + var match = toString.call(aFunc).match(functionNameMatch); + if (match) { + name = match[1]; + } + } else { + // If we've got a `name` property we just use it + name = aFunc.name; + } + + return name; +} + +module.exports = getFuncName; + +},{}]},{},[1])(1) +}); \ No newline at end of file diff --git a/node_modules/get-func-name/index.js b/node_modules/get-func-name/index.js new file mode 100644 index 00000000..e4aa5824 --- /dev/null +++ b/node_modules/get-func-name/index.js @@ -0,0 +1,44 @@ +'use strict'; + +/* ! + * Chai - getFuncName utility + * Copyright(c) 2012-2016 Jake Luer + * MIT Licensed + */ + +/** + * ### .getFuncName(constructorFn) + * + * Returns the name of a function. + * When a non-function instance is passed, returns `null`. + * This also includes a polyfill function if `aFunc.name` is not defined. + * + * @name getFuncName + * @param {Function} funct + * @namespace Utils + * @api public + */ + +var toString = Function.prototype.toString; +var functionNameMatch = /\s*function(?:\s|\s*\/\*[^(?:*\/)]+\*\/\s*)*([^\s\(\/]+)/; +function getFuncName(aFunc) { + if (typeof aFunc !== 'function') { + return null; + } + + var name = ''; + if (typeof Function.prototype.name === 'undefined' && typeof aFunc.name === 'undefined') { + // Here we run a polyfill if Function does not support the `name` property and if aFunc.name is not defined + var match = toString.call(aFunc).match(functionNameMatch); + if (match) { + name = match[1]; + } + } else { + // If we've got a `name` property we just use it + name = aFunc.name; + } + + return name; +} + +module.exports = getFuncName; diff --git a/node_modules/get-func-name/package.json b/node_modules/get-func-name/package.json new file mode 100644 index 00000000..15374ed5 --- /dev/null +++ b/node_modules/get-func-name/package.json @@ -0,0 +1,136 @@ +{ + "_args": [ + [ + "get-func-name@2.0.0", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "get-func-name@2.0.0", + "_id": "get-func-name@2.0.0", + "_inBundle": false, + "_integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "_location": "/get-func-name", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "get-func-name@2.0.0", + "name": "get-func-name", + "escapedName": "get-func-name", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/chai" + ], + "_resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "Jake Luer", + "email": "jake@alogicalparadox.com", + "url": "http://alogicalparadox.com" + }, + "bugs": { + "url": "https://github.com/chaijs/get-func-name/issues" + }, + "config": { + "ghooks": { + "commit-msg": "validate-commit-msg" + } + }, + "contributors": [ + { + "name": "Keith Cirkel", + "url": "https://github.com/keithamus" + }, + { + "name": "Lucas Fernandes da Costa", + "url": "https://github.com/lucasfcosta" + }, + { + "name": "Grant Snodgrass", + "url": "https://github.com/meeber" + }, + { + "name": "Lucas Vieira", + "url": "https://github.com/vieiralucas" + }, + { + "name": "Aleksey Shvayka", + "url": "https://github.com/shvaikalesh" + } + ], + "dependencies": {}, + "description": "Utility for getting a function's name for node and the browser", + "devDependencies": { + "browserify": "^13.0.0", + "browserify-istanbul": "^2.0.0", + "coveralls": "2.11.14", + "eslint": "^2.4.0", + "eslint-config-strict": "^9.1.0", + "eslint-plugin-filenames": "^1.1.0", + "ghooks": "^1.0.1", + "istanbul": "^0.4.2", + "karma": "^1.3.0", + "karma-browserify": "^5.0.2", + "karma-coverage": "^1.1.1", + "karma-mocha": "^1.2.0", + "karma-phantomjs-launcher": "^1.0.0", + "karma-sauce-launcher": "^1.0.0", + "lcov-result-merger": "^1.0.2", + "mocha": "^3.1.2", + "phantomjs-prebuilt": "^2.1.5", + "semantic-release": "^4.3.5", + "simple-assert": "^1.0.0", + "travis-after-all": "^1.4.4", + "validate-commit-msg": "^2.3.1" + }, + "engines": { + "node": "*" + }, + "eslintConfig": { + "extends": [ + "strict/es5" + ], + "env": { + "es6": true + }, + "globals": { + "HTMLElement": false + }, + "rules": { + "complexity": 0, + "max-statements": 0 + } + }, + "files": [ + "index.js", + "get-func-name.js" + ], + "homepage": "https://github.com/chaijs/get-func-name#readme", + "keywords": [ + "get-func-name", + "chai util" + ], + "license": "MIT", + "main": "./index.js", + "name": "get-func-name", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/chaijs/get-func-name.git" + }, + "scripts": { + "build": "browserify --bare $npm_package_main --standalone getFuncName -o get-func-name.js", + "lint": "eslint --ignore-path .gitignore .", + "prepublish": "npm run build", + "pretest": "npm run lint", + "semantic-release": "semantic-release pre && npm publish && semantic-release post", + "test": "npm run test:node && npm run test:browser && npm run upload-coverage", + "test:browser": "karma start --singleRun=true", + "test:node": "istanbul cover _mocha", + "upload-coverage": "lcov-result-merger 'coverage/**/lcov.info' | coveralls; exit 0" + }, + "version": "2.0.0" +} diff --git a/node_modules/get-stream/buffer-stream.js b/node_modules/get-stream/buffer-stream.js new file mode 100644 index 00000000..4121c8e5 --- /dev/null +++ b/node_modules/get-stream/buffer-stream.js @@ -0,0 +1,51 @@ +'use strict'; +const {PassThrough} = require('stream'); + +module.exports = options => { + options = Object.assign({}, options); + + const {array} = options; + let {encoding} = options; + const buffer = encoding === 'buffer'; + let objectMode = false; + + if (array) { + objectMode = !(encoding || buffer); + } else { + encoding = encoding || 'utf8'; + } + + if (buffer) { + encoding = null; + } + + let len = 0; + const ret = []; + const stream = new PassThrough({objectMode}); + + if (encoding) { + stream.setEncoding(encoding); + } + + stream.on('data', chunk => { + ret.push(chunk); + + if (objectMode) { + len = ret.length; + } else { + len += chunk.length; + } + }); + + stream.getBufferedValue = () => { + if (array) { + return ret; + } + + return buffer ? Buffer.concat(ret, len) : ret.join(''); + }; + + stream.getBufferedLength = () => len; + + return stream; +}; diff --git a/node_modules/get-stream/index.js b/node_modules/get-stream/index.js new file mode 100644 index 00000000..7e5584a6 --- /dev/null +++ b/node_modules/get-stream/index.js @@ -0,0 +1,50 @@ +'use strict'; +const pump = require('pump'); +const bufferStream = require('./buffer-stream'); + +class MaxBufferError extends Error { + constructor() { + super('maxBuffer exceeded'); + this.name = 'MaxBufferError'; + } +} + +function getStream(inputStream, options) { + if (!inputStream) { + return Promise.reject(new Error('Expected a stream')); + } + + options = Object.assign({maxBuffer: Infinity}, options); + + const {maxBuffer} = options; + + let stream; + return new Promise((resolve, reject) => { + const rejectPromise = error => { + if (error) { // A null check + error.bufferedData = stream.getBufferedValue(); + } + reject(error); + }; + + stream = pump(inputStream, bufferStream(options), error => { + if (error) { + rejectPromise(error); + return; + } + + resolve(); + }); + + stream.on('data', () => { + if (stream.getBufferedLength() > maxBuffer) { + rejectPromise(new MaxBufferError()); + } + }); + }).then(() => stream.getBufferedValue()); +} + +module.exports = getStream; +module.exports.buffer = (stream, options) => getStream(stream, Object.assign({}, options, {encoding: 'buffer'})); +module.exports.array = (stream, options) => getStream(stream, Object.assign({}, options, {array: true})); +module.exports.MaxBufferError = MaxBufferError; diff --git a/node_modules/get-stream/license b/node_modules/get-stream/license new file mode 100644 index 00000000..e7af2f77 --- /dev/null +++ b/node_modules/get-stream/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/get-stream/package.json b/node_modules/get-stream/package.json new file mode 100644 index 00000000..05683686 --- /dev/null +++ b/node_modules/get-stream/package.json @@ -0,0 +1,81 @@ +{ + "_args": [ + [ + "get-stream@4.1.0", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "get-stream@4.1.0", + "_id": "get-stream@4.1.0", + "_inBundle": false, + "_integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "_location": "/get-stream", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "get-stream@4.1.0", + "name": "get-stream", + "escapedName": "get-stream", + "rawSpec": "4.1.0", + "saveSpec": null, + "fetchSpec": "4.1.0" + }, + "_requiredBy": [ + "/execa" + ], + "_resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "_spec": "4.1.0", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/get-stream/issues" + }, + "dependencies": { + "pump": "^3.0.0" + }, + "description": "Get a stream as a string, buffer, or array", + "devDependencies": { + "ava": "*", + "into-stream": "^3.0.0", + "xo": "*" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js", + "buffer-stream.js" + ], + "homepage": "https://github.com/sindresorhus/get-stream#readme", + "keywords": [ + "get", + "stream", + "promise", + "concat", + "string", + "text", + "buffer", + "read", + "data", + "consume", + "readable", + "readablestream", + "array", + "object" + ], + "license": "MIT", + "name": "get-stream", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/get-stream.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "4.1.0" +} diff --git a/node_modules/get-stream/readme.md b/node_modules/get-stream/readme.md new file mode 100644 index 00000000..b87a4d37 --- /dev/null +++ b/node_modules/get-stream/readme.md @@ -0,0 +1,123 @@ +# get-stream [![Build Status](https://travis-ci.org/sindresorhus/get-stream.svg?branch=master)](https://travis-ci.org/sindresorhus/get-stream) + +> Get a stream as a string, buffer, or array + + +## Install + +``` +$ npm install get-stream +``` + + +## Usage + +```js +const fs = require('fs'); +const getStream = require('get-stream'); + +(async () => { + const stream = fs.createReadStream('unicorn.txt'); + + console.log(await getStream(stream)); + /* + ,,))))))));, + __)))))))))))))), + \|/ -\(((((''''((((((((. + -*-==//////(('' . `)))))), + /|\ ))| o ;-. '((((( ,(, + ( `| / ) ;))))' ,_))^;(~ + | | | ,))((((_ _____------~~~-. %,;(;(>';'~ + o_); ; )))(((` ~---~ `:: \ %%~~)(v;(`('~ + ; ''''```` `: `:::|\,__,%% );`'; ~ + | _ ) / `:|`----' `-' + ______/\/~ | / / + /~;;.____/;;' / ___--,-( `;;;/ + / // _;______;'------~~~~~ /;;/\ / + // | | / ; \;;,\ + (<_ | ; /',/-----' _> + \_| ||_ //~;~~~~~~~~~ + `\_| (,~~ + \~\ + ~~ + */ +})(); +``` + + +## API + +The methods returns a promise that resolves when the `end` event fires on the stream, indicating that there is no more data to be read. The stream is switched to flowing mode. + +### getStream(stream, [options]) + +Get the `stream` as a string. + +#### options + +Type: `Object` + +##### encoding + +Type: `string`
+Default: `utf8` + +[Encoding](https://nodejs.org/api/buffer.html#buffer_buffer) of the incoming stream. + +##### maxBuffer + +Type: `number`
+Default: `Infinity` + +Maximum length of the returned string. If it exceeds this value before the stream ends, the promise will be rejected with a `getStream.MaxBufferError` error. + +### getStream.buffer(stream, [options]) + +Get the `stream` as a buffer. + +It honors the `maxBuffer` option as above, but it refers to byte length rather than string length. + +### getStream.array(stream, [options]) + +Get the `stream` as an array of values. + +It honors both the `maxBuffer` and `encoding` options. The behavior changes slightly based on the encoding chosen: + +- When `encoding` is unset, it assumes an [object mode stream](https://nodesource.com/blog/understanding-object-streams/) and collects values emitted from `stream` unmodified. In this case `maxBuffer` refers to the number of items in the array (not the sum of their sizes). + +- When `encoding` is set to `buffer`, it collects an array of buffers. `maxBuffer` refers to the summed byte lengths of every buffer in the array. + +- When `encoding` is set to anything else, it collects an array of strings. `maxBuffer` refers to the summed character lengths of every string in the array. + + +## Errors + +If the input stream emits an `error` event, the promise will be rejected with the error. The buffered data will be attached to the `bufferedData` property of the error. + +```js +(async () => { + try { + await getStream(streamThatErrorsAtTheEnd('unicorn')); + } catch (error) { + console.log(error.bufferedData); + //=> 'unicorn' + } +})() +``` + + +## FAQ + +### How is this different from [`concat-stream`](https://github.com/maxogden/concat-stream)? + +This module accepts a stream instead of being one and returns a promise instead of using a callback. The API is simpler and it only supports returning a string, buffer, or array. It doesn't have a fragile type inference. You explicitly choose what you want. And it doesn't depend on the huge `readable-stream` package. + + +## Related + +- [get-stdin](https://github.com/sindresorhus/get-stdin) - Get stdin as a string or buffer + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/is-plain-object/LICENSE b/node_modules/is-plain-object/LICENSE new file mode 100644 index 00000000..3f2eca18 --- /dev/null +++ b/node_modules/is-plain-object/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-plain-object/README.md b/node_modules/is-plain-object/README.md new file mode 100644 index 00000000..60b7b591 --- /dev/null +++ b/node_modules/is-plain-object/README.md @@ -0,0 +1,119 @@ +# is-plain-object [![NPM version](https://img.shields.io/npm/v/is-plain-object.svg?style=flat)](https://www.npmjs.com/package/is-plain-object) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![NPM total downloads](https://img.shields.io/npm/dt/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-plain-object.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-plain-object) + +> Returns true if an object was created by the `Object` constructor. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-plain-object +``` + +Use [isobject](https://github.com/jonschlinkert/isobject) if you only want to check if the value is an object and not an array or null. + +## Usage + +```js +import isPlainObject from 'is-plain-object'; +``` + +**true** when created by the `Object` constructor. + +```js +isPlainObject(Object.create({})); +//=> true +isPlainObject(Object.create(Object.prototype)); +//=> true +isPlainObject({foo: 'bar'}); +//=> true +isPlainObject({}); +//=> true +``` + +**false** when not created by the `Object` constructor. + +```js +isPlainObject(1); +//=> false +isPlainObject(['foo', 'bar']); +//=> false +isPlainObject([]); +//=> false +isPlainObject(new Foo); +//=> false +isPlainObject(null); +//=> false +isPlainObject(Object.create(null)); +//=> false +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [is-number](https://www.npmjs.com/package/is-number): Returns true if a number or string value is a finite number. Useful for regex… [more](https://github.com/jonschlinkert/is-number) | [homepage](https://github.com/jonschlinkert/is-number "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 19 | [jonschlinkert](https://github.com/jonschlinkert) | +| 6 | [TrySound](https://github.com/TrySound) | +| 6 | [stevenvachon](https://github.com/stevenvachon) | +| 3 | [onokumus](https://github.com/onokumus) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 28, 2019._ \ No newline at end of file diff --git a/node_modules/is-plain-object/index.cjs.js b/node_modules/is-plain-object/index.cjs.js new file mode 100644 index 00000000..d7dda951 --- /dev/null +++ b/node_modules/is-plain-object/index.cjs.js @@ -0,0 +1,48 @@ +'use strict'; + +/*! + * isobject + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +function isObject(val) { + return val != null && typeof val === 'object' && Array.isArray(val) === false; +} + +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +function isObjectObject(o) { + return isObject(o) === true + && Object.prototype.toString.call(o) === '[object Object]'; +} + +function isPlainObject(o) { + var ctor,prot; + + if (isObjectObject(o) === false) return false; + + // If has modified constructor + ctor = o.constructor; + if (typeof ctor !== 'function') return false; + + // If has modified prototype + prot = ctor.prototype; + if (isObjectObject(prot) === false) return false; + + // If constructor does not have an Object-specific method + if (prot.hasOwnProperty('isPrototypeOf') === false) { + return false; + } + + // Most likely a plain Object + return true; +} + +module.exports = isPlainObject; diff --git a/node_modules/is-plain-object/index.d.ts b/node_modules/is-plain-object/index.d.ts new file mode 100644 index 00000000..fd131f01 --- /dev/null +++ b/node_modules/is-plain-object/index.d.ts @@ -0,0 +1,3 @@ +declare function isPlainObject(o: any): boolean; + +export default isPlainObject; diff --git a/node_modules/is-plain-object/index.js b/node_modules/is-plain-object/index.js new file mode 100644 index 00000000..565ce9e4 --- /dev/null +++ b/node_modules/is-plain-object/index.js @@ -0,0 +1,35 @@ +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +import isObject from 'isobject'; + +function isObjectObject(o) { + return isObject(o) === true + && Object.prototype.toString.call(o) === '[object Object]'; +} + +export default function isPlainObject(o) { + var ctor,prot; + + if (isObjectObject(o) === false) return false; + + // If has modified constructor + ctor = o.constructor; + if (typeof ctor !== 'function') return false; + + // If has modified prototype + prot = ctor.prototype; + if (isObjectObject(prot) === false) return false; + + // If constructor does not have an Object-specific method + if (prot.hasOwnProperty('isPrototypeOf') === false) { + return false; + } + + // Most likely a plain Object + return true; +}; diff --git a/node_modules/is-plain-object/package.json b/node_modules/is-plain-object/package.json new file mode 100644 index 00000000..fe57028e --- /dev/null +++ b/node_modules/is-plain-object/package.json @@ -0,0 +1,128 @@ +{ + "_args": [ + [ + "is-plain-object@3.0.0", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "is-plain-object@3.0.0", + "_id": "is-plain-object@3.0.0", + "_inBundle": false, + "_integrity": "sha512-tZIpofR+P05k8Aocp7UI/2UTa9lTJSebCXpFFoR9aibpokDj/uXBsJ8luUu0tTVYKkMU6URDUuOfJZ7koewXvg==", + "_location": "/is-plain-object", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-plain-object@3.0.0", + "name": "is-plain-object", + "escapedName": "is-plain-object", + "rawSpec": "3.0.0", + "saveSpec": null, + "fetchSpec": "3.0.0" + }, + "_requiredBy": [ + "/@octokit/endpoint", + "/@octokit/request" + ], + "_resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.0.tgz", + "_spec": "3.0.0", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-plain-object/issues" + }, + "contributors": [ + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Osman Nuri Okumuş", + "url": "http://onokumus.com" + }, + { + "name": "Steven Vachon", + "url": "https://svachon.com" + }, + { + "url": "https://github.com/wtgtybhertgeghgtwtg" + } + ], + "dependencies": { + "isobject": "^4.0.0" + }, + "description": "Returns true if an object was created by the `Object` constructor.", + "devDependencies": { + "chai": "^4.2.0", + "esm": "^3.2.22", + "gulp-format-md": "^1.0.0", + "mocha": "^6.1.4", + "mocha-headless-chrome": "^2.0.2", + "rollup": "^1.10.1", + "rollup-plugin-node-resolve": "^4.2.3" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.d.ts", + "index.js", + "index.cjs.js" + ], + "homepage": "https://github.com/jonschlinkert/is-plain-object", + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "javascript", + "kind", + "kind-of", + "object", + "plain", + "type", + "typeof", + "value" + ], + "license": "MIT", + "main": "index.cjs.js", + "module": "index.js", + "name": "is-plain-object", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-plain-object.git" + }, + "scripts": { + "build": "rollup -c", + "prepare": "rollup -c", + "test": "npm run test_node && npm run build && npm run test_browser", + "test_browser": "mocha-headless-chrome --args=disable-web-security -f test/browser.html", + "test_node": "mocha -r esm" + }, + "types": "index.d.ts", + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "is-number", + "isobject", + "kind-of" + ] + }, + "lint": { + "reflinks": true + } + }, + "version": "3.0.0" +} diff --git a/node_modules/is-stream/index.js b/node_modules/is-stream/index.js new file mode 100644 index 00000000..6f7ec91a --- /dev/null +++ b/node_modules/is-stream/index.js @@ -0,0 +1,21 @@ +'use strict'; + +var isStream = module.exports = function (stream) { + return stream !== null && typeof stream === 'object' && typeof stream.pipe === 'function'; +}; + +isStream.writable = function (stream) { + return isStream(stream) && stream.writable !== false && typeof stream._write === 'function' && typeof stream._writableState === 'object'; +}; + +isStream.readable = function (stream) { + return isStream(stream) && stream.readable !== false && typeof stream._read === 'function' && typeof stream._readableState === 'object'; +}; + +isStream.duplex = function (stream) { + return isStream.writable(stream) && isStream.readable(stream); +}; + +isStream.transform = function (stream) { + return isStream.duplex(stream) && typeof stream._transform === 'function' && typeof stream._transformState === 'object'; +}; diff --git a/node_modules/is-stream/license b/node_modules/is-stream/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/node_modules/is-stream/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-stream/package.json b/node_modules/is-stream/package.json new file mode 100644 index 00000000..33e41b34 --- /dev/null +++ b/node_modules/is-stream/package.json @@ -0,0 +1,73 @@ +{ + "_args": [ + [ + "is-stream@1.1.0", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "is-stream@1.1.0", + "_id": "is-stream@1.1.0", + "_inBundle": false, + "_integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "_location": "/is-stream", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-stream@1.1.0", + "name": "is-stream", + "escapedName": "is-stream", + "rawSpec": "1.1.0", + "saveSpec": null, + "fetchSpec": "1.1.0" + }, + "_requiredBy": [ + "/execa" + ], + "_resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "_spec": "1.1.0", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-stream/issues" + }, + "description": "Check if something is a Node.js stream", + "devDependencies": { + "ava": "*", + "tempfile": "^1.1.0", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/is-stream#readme", + "keywords": [ + "stream", + "type", + "streams", + "writable", + "readable", + "duplex", + "transform", + "check", + "detect", + "is" + ], + "license": "MIT", + "name": "is-stream", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-stream.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.1.0" +} diff --git a/node_modules/is-stream/readme.md b/node_modules/is-stream/readme.md new file mode 100644 index 00000000..d8afce81 --- /dev/null +++ b/node_modules/is-stream/readme.md @@ -0,0 +1,42 @@ +# is-stream [![Build Status](https://travis-ci.org/sindresorhus/is-stream.svg?branch=master)](https://travis-ci.org/sindresorhus/is-stream) + +> Check if something is a [Node.js stream](https://nodejs.org/api/stream.html) + + +## Install + +``` +$ npm install --save is-stream +``` + + +## Usage + +```js +const fs = require('fs'); +const isStream = require('is-stream'); + +isStream(fs.createReadStream('unicorn.png')); +//=> true + +isStream({}); +//=> false +``` + + +## API + +### isStream(stream) + +#### isStream.writable(stream) + +#### isStream.readable(stream) + +#### isStream.duplex(stream) + +#### isStream.transform(stream) + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/isexe/.npmignore b/node_modules/isexe/.npmignore new file mode 100644 index 00000000..c1cb757a --- /dev/null +++ b/node_modules/isexe/.npmignore @@ -0,0 +1,2 @@ +.nyc_output/ +coverage/ diff --git a/node_modules/isexe/LICENSE b/node_modules/isexe/LICENSE new file mode 100644 index 00000000..19129e31 --- /dev/null +++ b/node_modules/isexe/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/isexe/README.md b/node_modules/isexe/README.md new file mode 100644 index 00000000..35769e84 --- /dev/null +++ b/node_modules/isexe/README.md @@ -0,0 +1,51 @@ +# isexe + +Minimal module to check if a file is executable, and a normal file. + +Uses `fs.stat` and tests against the `PATHEXT` environment variable on +Windows. + +## USAGE + +```javascript +var isexe = require('isexe') +isexe('some-file-name', function (err, isExe) { + if (err) { + console.error('probably file does not exist or something', err) + } else if (isExe) { + console.error('this thing can be run') + } else { + console.error('cannot be run') + } +}) + +// same thing but synchronous, throws errors +var isExe = isexe.sync('some-file-name') + +// treat errors as just "not executable" +isexe('maybe-missing-file', { ignoreErrors: true }, callback) +var isExe = isexe.sync('maybe-missing-file', { ignoreErrors: true }) +``` + +## API + +### `isexe(path, [options], [callback])` + +Check if the path is executable. If no callback provided, and a +global `Promise` object is available, then a Promise will be returned. + +Will raise whatever errors may be raised by `fs.stat`, unless +`options.ignoreErrors` is set to true. + +### `isexe.sync(path, [options])` + +Same as `isexe` but returns the value and throws any errors raised. + +### Options + +* `ignoreErrors` Treat all errors as "no, this is not executable", but + don't raise them. +* `uid` Number to use as the user id +* `gid` Number to use as the group id +* `pathExt` List of path extensions to use instead of `PATHEXT` + environment variable on Windows. diff --git a/node_modules/isexe/index.js b/node_modules/isexe/index.js new file mode 100644 index 00000000..553fb32b --- /dev/null +++ b/node_modules/isexe/index.js @@ -0,0 +1,57 @@ +var fs = require('fs') +var core +if (process.platform === 'win32' || global.TESTING_WINDOWS) { + core = require('./windows.js') +} else { + core = require('./mode.js') +} + +module.exports = isexe +isexe.sync = sync + +function isexe (path, options, cb) { + if (typeof options === 'function') { + cb = options + options = {} + } + + if (!cb) { + if (typeof Promise !== 'function') { + throw new TypeError('callback not provided') + } + + return new Promise(function (resolve, reject) { + isexe(path, options || {}, function (er, is) { + if (er) { + reject(er) + } else { + resolve(is) + } + }) + }) + } + + core(path, options || {}, function (er, is) { + // ignore EACCES because that just means we aren't allowed to run it + if (er) { + if (er.code === 'EACCES' || options && options.ignoreErrors) { + er = null + is = false + } + } + cb(er, is) + }) +} + +function sync (path, options) { + // my kingdom for a filtered catch + try { + return core.sync(path, options || {}) + } catch (er) { + if (options && options.ignoreErrors || er.code === 'EACCES') { + return false + } else { + throw er + } + } +} diff --git a/node_modules/isexe/mode.js b/node_modules/isexe/mode.js new file mode 100644 index 00000000..1995ea4a --- /dev/null +++ b/node_modules/isexe/mode.js @@ -0,0 +1,41 @@ +module.exports = isexe +isexe.sync = sync + +var fs = require('fs') + +function isexe (path, options, cb) { + fs.stat(path, function (er, stat) { + cb(er, er ? false : checkStat(stat, options)) + }) +} + +function sync (path, options) { + return checkStat(fs.statSync(path), options) +} + +function checkStat (stat, options) { + return stat.isFile() && checkMode(stat, options) +} + +function checkMode (stat, options) { + var mod = stat.mode + var uid = stat.uid + var gid = stat.gid + + var myUid = options.uid !== undefined ? + options.uid : process.getuid && process.getuid() + var myGid = options.gid !== undefined ? + options.gid : process.getgid && process.getgid() + + var u = parseInt('100', 8) + var g = parseInt('010', 8) + var o = parseInt('001', 8) + var ug = u | g + + var ret = (mod & o) || + (mod & g) && gid === myGid || + (mod & u) && uid === myUid || + (mod & ug) && myUid === 0 + + return ret +} diff --git a/node_modules/isexe/package.json b/node_modules/isexe/package.json new file mode 100644 index 00000000..84bb3f68 --- /dev/null +++ b/node_modules/isexe/package.json @@ -0,0 +1,63 @@ +{ + "_args": [ + [ + "isexe@2.0.0", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "isexe@2.0.0", + "_id": "isexe@2.0.0", + "_inBundle": false, + "_integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "_location": "/isexe", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "isexe@2.0.0", + "name": "isexe", + "escapedName": "isexe", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/which" + ], + "_resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/isexe/issues" + }, + "description": "Minimal module to check if a file is executable.", + "devDependencies": { + "mkdirp": "^0.5.1", + "rimraf": "^2.5.0", + "tap": "^10.3.0" + }, + "directories": { + "test": "test" + }, + "homepage": "https://github.com/isaacs/isexe#readme", + "keywords": [], + "license": "ISC", + "main": "index.js", + "name": "isexe", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/isexe.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap test/*.js --100" + }, + "version": "2.0.0" +} diff --git a/node_modules/isexe/test/basic.js b/node_modules/isexe/test/basic.js new file mode 100644 index 00000000..d926df64 --- /dev/null +++ b/node_modules/isexe/test/basic.js @@ -0,0 +1,221 @@ +var t = require('tap') +var fs = require('fs') +var path = require('path') +var fixture = path.resolve(__dirname, 'fixtures') +var meow = fixture + '/meow.cat' +var mine = fixture + '/mine.cat' +var ours = fixture + '/ours.cat' +var fail = fixture + '/fail.false' +var noent = fixture + '/enoent.exe' +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') + +var isWindows = process.platform === 'win32' +var hasAccess = typeof fs.access === 'function' +var winSkip = isWindows && 'windows' +var accessSkip = !hasAccess && 'no fs.access function' +var hasPromise = typeof Promise === 'function' +var promiseSkip = !hasPromise && 'no global Promise' + +function reset () { + delete require.cache[require.resolve('../')] + return require('../') +} + +t.test('setup fixtures', function (t) { + rimraf.sync(fixture) + mkdirp.sync(fixture) + fs.writeFileSync(meow, '#!/usr/bin/env cat\nmeow\n') + fs.chmodSync(meow, parseInt('0755', 8)) + fs.writeFileSync(fail, '#!/usr/bin/env false\n') + fs.chmodSync(fail, parseInt('0644', 8)) + fs.writeFileSync(mine, '#!/usr/bin/env cat\nmine\n') + fs.chmodSync(mine, parseInt('0744', 8)) + fs.writeFileSync(ours, '#!/usr/bin/env cat\nours\n') + fs.chmodSync(ours, parseInt('0754', 8)) + t.end() +}) + +t.test('promise', { skip: promiseSkip }, function (t) { + var isexe = reset() + t.test('meow async', function (t) { + isexe(meow).then(function (is) { + t.ok(is) + t.end() + }) + }) + t.test('fail async', function (t) { + isexe(fail).then(function (is) { + t.notOk(is) + t.end() + }) + }) + t.test('noent async', function (t) { + isexe(noent).catch(function (er) { + t.ok(er) + t.end() + }) + }) + t.test('noent ignore async', function (t) { + isexe(noent, { ignoreErrors: true }).then(function (is) { + t.notOk(is) + t.end() + }) + }) + t.end() +}) + +t.test('no promise', function (t) { + global.Promise = null + var isexe = reset() + t.throws('try to meow a promise', function () { + isexe(meow) + }) + t.end() +}) + +t.test('access', { skip: accessSkip || winSkip }, function (t) { + runTest(t) +}) + +t.test('mode', { skip: winSkip }, function (t) { + delete fs.access + delete fs.accessSync + var isexe = reset() + t.ok(isexe.sync(ours, { uid: 0, gid: 0 })) + t.ok(isexe.sync(mine, { uid: 0, gid: 0 })) + runTest(t) +}) + +t.test('windows', function (t) { + global.TESTING_WINDOWS = true + var pathExt = '.EXE;.CAT;.CMD;.COM' + t.test('pathExt option', function (t) { + runTest(t, { pathExt: '.EXE;.CAT;.CMD;.COM' }) + }) + t.test('pathExt env', function (t) { + process.env.PATHEXT = pathExt + runTest(t) + }) + t.test('no pathExt', function (t) { + // with a pathExt of '', any filename is fine. + // so the "fail" one would still pass. + runTest(t, { pathExt: '', skipFail: true }) + }) + t.test('pathext with empty entry', function (t) { + // with a pathExt of '', any filename is fine. + // so the "fail" one would still pass. + runTest(t, { pathExt: ';' + pathExt, skipFail: true }) + }) + t.end() +}) + +t.test('cleanup', function (t) { + rimraf.sync(fixture) + t.end() +}) + +function runTest (t, options) { + var isexe = reset() + + var optionsIgnore = Object.create(options || {}) + optionsIgnore.ignoreErrors = true + + if (!options || !options.skipFail) { + t.notOk(isexe.sync(fail, options)) + } + t.notOk(isexe.sync(noent, optionsIgnore)) + if (!options) { + t.ok(isexe.sync(meow)) + } else { + t.ok(isexe.sync(meow, options)) + } + + t.ok(isexe.sync(mine, options)) + t.ok(isexe.sync(ours, options)) + t.throws(function () { + isexe.sync(noent, options) + }) + + t.test('meow async', function (t) { + if (!options) { + isexe(meow, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + } else { + isexe(meow, options, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + } + }) + + t.test('mine async', function (t) { + isexe(mine, options, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + }) + + t.test('ours async', function (t) { + isexe(ours, options, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + }) + + if (!options || !options.skipFail) { + t.test('fail async', function (t) { + isexe(fail, options, function (er, is) { + if (er) { + throw er + } + t.notOk(is) + t.end() + }) + }) + } + + t.test('noent async', function (t) { + isexe(noent, options, function (er, is) { + t.ok(er) + t.notOk(is) + t.end() + }) + }) + + t.test('noent ignore async', function (t) { + isexe(noent, optionsIgnore, function (er, is) { + if (er) { + throw er + } + t.notOk(is) + t.end() + }) + }) + + t.test('directory is not executable', function (t) { + isexe(__dirname, options, function (er, is) { + if (er) { + throw er + } + t.notOk(is) + t.end() + }) + }) + + t.end() +} diff --git a/node_modules/isexe/windows.js b/node_modules/isexe/windows.js new file mode 100644 index 00000000..34996734 --- /dev/null +++ b/node_modules/isexe/windows.js @@ -0,0 +1,42 @@ +module.exports = isexe +isexe.sync = sync + +var fs = require('fs') + +function checkPathExt (path, options) { + var pathext = options.pathExt !== undefined ? + options.pathExt : process.env.PATHEXT + + if (!pathext) { + return true + } + + pathext = pathext.split(';') + if (pathext.indexOf('') !== -1) { + return true + } + for (var i = 0; i < pathext.length; i++) { + var p = pathext[i].toLowerCase() + if (p && path.substr(-p.length).toLowerCase() === p) { + return true + } + } + return false +} + +function checkStat (stat, path, options) { + if (!stat.isSymbolicLink() && !stat.isFile()) { + return false + } + return checkPathExt(path, options) +} + +function isexe (path, options, cb) { + fs.stat(path, function (er, stat) { + cb(er, er ? false : checkStat(stat, path, options)) + }) +} + +function sync (path, options) { + return checkStat(fs.statSync(path), path, options) +} diff --git a/node_modules/isobject/LICENSE b/node_modules/isobject/LICENSE new file mode 100644 index 00000000..943e71d0 --- /dev/null +++ b/node_modules/isobject/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/isobject/README.md b/node_modules/isobject/README.md new file mode 100644 index 00000000..1c6e21fa --- /dev/null +++ b/node_modules/isobject/README.md @@ -0,0 +1,127 @@ +# isobject [![NPM version](https://img.shields.io/npm/v/isobject.svg?style=flat)](https://www.npmjs.com/package/isobject) [![NPM monthly downloads](https://img.shields.io/npm/dm/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![NPM total downloads](https://img.shields.io/npm/dt/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/isobject.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/isobject) + +> Returns true if the value is an object and not an array or null. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save isobject +``` + +Use [is-plain-object](https://github.com/jonschlinkert/is-plain-object) if you want only objects that are created by the `Object` constructor. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install isobject +``` + +## Usage + +```js +import isObject from 'isobject'; +``` + +**True** + +All of the following return `true`: + +```js +isObject({}); +isObject(Object.create({})); +isObject(Object.create(Object.prototype)); +isObject(Object.create(null)); +isObject({}); +isObject(new Foo); +isObject(/foo/); +``` + +**False** + +All of the following return `false`: + +```js +isObject(); +isObject(function () {}); +isObject(1); +isObject([]); +isObject(undefined); +isObject(null); +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") +* [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep "Recursively merge values in a javascript object.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 30 | [jonschlinkert](https://github.com/jonschlinkert) | +| 8 | [doowb](https://github.com/doowb) | +| 7 | [TrySound](https://github.com/TrySound) | +| 3 | [onokumus](https://github.com/onokumus) | +| 1 | [LeSuisse](https://github.com/LeSuisse) | +| 1 | [tmcw](https://github.com/tmcw) | +| 1 | [ZhouHansen](https://github.com/ZhouHansen) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 28, 2019._ \ No newline at end of file diff --git a/node_modules/isobject/index.cjs.js b/node_modules/isobject/index.cjs.js new file mode 100644 index 00000000..49debe73 --- /dev/null +++ b/node_modules/isobject/index.cjs.js @@ -0,0 +1,14 @@ +'use strict'; + +/*! + * isobject + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +function isObject(val) { + return val != null && typeof val === 'object' && Array.isArray(val) === false; +} + +module.exports = isObject; diff --git a/node_modules/isobject/index.d.ts b/node_modules/isobject/index.d.ts new file mode 100644 index 00000000..c471c715 --- /dev/null +++ b/node_modules/isobject/index.d.ts @@ -0,0 +1,3 @@ +declare function isObject(val: any): boolean; + +export default isObject; diff --git a/node_modules/isobject/index.js b/node_modules/isobject/index.js new file mode 100644 index 00000000..e9f03822 --- /dev/null +++ b/node_modules/isobject/index.js @@ -0,0 +1,10 @@ +/*! + * isobject + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +export default function isObject(val) { + return val != null && typeof val === 'object' && Array.isArray(val) === false; +}; diff --git a/node_modules/isobject/package.json b/node_modules/isobject/package.json new file mode 100644 index 00000000..b3a86e5a --- /dev/null +++ b/node_modules/isobject/package.json @@ -0,0 +1,128 @@ +{ + "_args": [ + [ + "isobject@4.0.0", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "isobject@4.0.0", + "_id": "isobject@4.0.0", + "_inBundle": false, + "_integrity": "sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA==", + "_location": "/isobject", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "isobject@4.0.0", + "name": "isobject", + "escapedName": "isobject", + "rawSpec": "4.0.0", + "saveSpec": null, + "fetchSpec": "4.0.0" + }, + "_requiredBy": [ + "/is-plain-object" + ], + "_resolved": "https://registry.npmjs.org/isobject/-/isobject-4.0.0.tgz", + "_spec": "4.0.0", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/isobject/issues" + }, + "contributors": [ + { + "url": "https://github.com/LeSuisse" + }, + { + "name": "Brian Woodward", + "url": "https://twitter.com/doowb" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Magnús Dæhlen", + "url": "https://github.com/magnudae" + }, + { + "name": "Tom MacWright", + "url": "https://macwright.org" + } + ], + "dependencies": {}, + "description": "Returns true if the value is an object and not an array or null.", + "devDependencies": { + "esm": "^3.2.22", + "gulp-format-md": "^0.1.9", + "mocha": "^2.4.5", + "rollup": "^1.10.1" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.d.ts", + "index.cjs.js", + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/isobject", + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "kind", + "kind-of", + "kindof", + "native", + "object", + "type", + "typeof", + "value" + ], + "license": "MIT", + "main": "index.cjs.js", + "module": "index.js", + "name": "isobject", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/isobject.git" + }, + "scripts": { + "build": "rollup -i index.js -o index.cjs.js -f cjs", + "prepublish": "npm run build", + "test": "mocha -r esm" + }, + "types": "index.d.ts", + "verb": { + "related": { + "list": [ + "extend-shallow", + "is-plain-object", + "kind-of", + "merge-deep" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + }, + "version": "4.0.0" +} diff --git a/node_modules/json-stringify-safe/.npmignore b/node_modules/json-stringify-safe/.npmignore new file mode 100644 index 00000000..17d6b367 --- /dev/null +++ b/node_modules/json-stringify-safe/.npmignore @@ -0,0 +1 @@ +/*.tgz diff --git a/node_modules/json-stringify-safe/CHANGELOG.md b/node_modules/json-stringify-safe/CHANGELOG.md new file mode 100644 index 00000000..42bcb60a --- /dev/null +++ b/node_modules/json-stringify-safe/CHANGELOG.md @@ -0,0 +1,14 @@ +## Unreleased +- Fixes stringify to only take ancestors into account when checking + circularity. + It previously assumed every visited object was circular which led to [false + positives][issue9]. + Uses the tiny serializer I wrote for [Must.js][must] a year and a half ago. +- Fixes calling the `replacer` function in the proper context (`thisArg`). +- Fixes calling the `cycleReplacer` function in the proper context (`thisArg`). +- Speeds serializing by a factor of + Big-O(h-my-god-it-linearly-searched-every-object) it had ever seen. Searching + only the ancestors for a circular references speeds up things considerably. + +[must]: https://github.com/moll/js-must +[issue9]: https://github.com/isaacs/json-stringify-safe/issues/9 diff --git a/node_modules/json-stringify-safe/LICENSE b/node_modules/json-stringify-safe/LICENSE new file mode 100644 index 00000000..19129e31 --- /dev/null +++ b/node_modules/json-stringify-safe/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/json-stringify-safe/Makefile b/node_modules/json-stringify-safe/Makefile new file mode 100644 index 00000000..36088c72 --- /dev/null +++ b/node_modules/json-stringify-safe/Makefile @@ -0,0 +1,35 @@ +NODE_OPTS = +TEST_OPTS = + +love: + @echo "Feel like makin' love." + +test: + @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R dot $(TEST_OPTS) + +spec: + @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R spec $(TEST_OPTS) + +autotest: + @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R dot --watch $(TEST_OPTS) + +autospec: + @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R spec --watch $(TEST_OPTS) + +pack: + @file=$$(npm pack); echo "$$file"; tar tf "$$file" + +publish: + npm publish + +tag: + git tag "v$$(node -e 'console.log(require("./package").version)')" + +clean: + rm -f *.tgz + npm prune --production + +.PHONY: love +.PHONY: test spec autotest autospec +.PHONY: pack publish tag +.PHONY: clean diff --git a/node_modules/json-stringify-safe/README.md b/node_modules/json-stringify-safe/README.md new file mode 100644 index 00000000..a11f302a --- /dev/null +++ b/node_modules/json-stringify-safe/README.md @@ -0,0 +1,52 @@ +# json-stringify-safe + +Like JSON.stringify, but doesn't throw on circular references. + +## Usage + +Takes the same arguments as `JSON.stringify`. + +```javascript +var stringify = require('json-stringify-safe'); +var circularObj = {}; +circularObj.circularRef = circularObj; +circularObj.list = [ circularObj, circularObj ]; +console.log(stringify(circularObj, null, 2)); +``` + +Output: + +```json +{ + "circularRef": "[Circular]", + "list": [ + "[Circular]", + "[Circular]" + ] +} +``` + +## Details + +``` +stringify(obj, serializer, indent, decycler) +``` + +The first three arguments are the same as to JSON.stringify. The last +is an argument that's only used when the object has been seen already. + +The default `decycler` function returns the string `'[Circular]'`. +If, for example, you pass in `function(k,v){}` (return nothing) then it +will prune cycles. If you pass in `function(k,v){ return {foo: 'bar'}}`, +then cyclical objects will always be represented as `{"foo":"bar"}` in +the result. + +``` +stringify.getSerialize(serializer, decycler) +``` + +Returns a serializer that can be used elsewhere. This is the actual +function that's passed to JSON.stringify. + +**Note** that the function returned from `getSerialize` is stateful for now, so +do **not** use it more than once. diff --git a/node_modules/json-stringify-safe/package.json b/node_modules/json-stringify-safe/package.json new file mode 100644 index 00000000..22e1d784 --- /dev/null +++ b/node_modules/json-stringify-safe/package.json @@ -0,0 +1,70 @@ +{ + "_args": [ + [ + "json-stringify-safe@5.0.1", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "json-stringify-safe@5.0.1", + "_id": "json-stringify-safe@5.0.1", + "_inBundle": false, + "_integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "_location": "/json-stringify-safe", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "json-stringify-safe@5.0.1", + "name": "json-stringify-safe", + "escapedName": "json-stringify-safe", + "rawSpec": "5.0.1", + "saveSpec": null, + "fetchSpec": "5.0.1" + }, + "_requiredBy": [ + "/nock", + "/request" + ], + "_resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "_spec": "5.0.1", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me" + }, + "bugs": { + "url": "https://github.com/isaacs/json-stringify-safe/issues" + }, + "contributors": [ + { + "name": "Andri Möll", + "email": "andri@dot.ee", + "url": "http://themoll.com" + } + ], + "description": "Like JSON.stringify, but doesn't blow up on circular refs.", + "devDependencies": { + "mocha": ">= 2.1.0 < 3", + "must": ">= 0.12 < 0.13", + "sinon": ">= 1.12.2 < 2" + }, + "homepage": "https://github.com/isaacs/json-stringify-safe", + "keywords": [ + "json", + "stringify", + "circular", + "safe" + ], + "license": "ISC", + "main": "stringify.js", + "name": "json-stringify-safe", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/json-stringify-safe.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "5.0.1" +} diff --git a/node_modules/json-stringify-safe/stringify.js b/node_modules/json-stringify-safe/stringify.js new file mode 100644 index 00000000..124a4521 --- /dev/null +++ b/node_modules/json-stringify-safe/stringify.js @@ -0,0 +1,27 @@ +exports = module.exports = stringify +exports.getSerialize = serializer + +function stringify(obj, replacer, spaces, cycleReplacer) { + return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces) +} + +function serializer(replacer, cycleReplacer) { + var stack = [], keys = [] + + if (cycleReplacer == null) cycleReplacer = function(key, value) { + if (stack[0] === value) return "[Circular ~]" + return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]" + } + + return function(key, value) { + if (stack.length > 0) { + var thisPos = stack.indexOf(this) + ~thisPos ? stack.splice(thisPos + 1) : stack.push(this) + ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key) + if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value) + } + else stack.push(value) + + return replacer == null ? value : replacer.call(this, key, value) + } +} diff --git a/node_modules/json-stringify-safe/test/mocha.opts b/node_modules/json-stringify-safe/test/mocha.opts new file mode 100644 index 00000000..2544e586 --- /dev/null +++ b/node_modules/json-stringify-safe/test/mocha.opts @@ -0,0 +1,2 @@ +--recursive +--require must diff --git a/node_modules/json-stringify-safe/test/stringify_test.js b/node_modules/json-stringify-safe/test/stringify_test.js new file mode 100644 index 00000000..5b325831 --- /dev/null +++ b/node_modules/json-stringify-safe/test/stringify_test.js @@ -0,0 +1,246 @@ +var Sinon = require("sinon") +var stringify = require("..") +function jsonify(obj) { return JSON.stringify(obj, null, 2) } + +describe("Stringify", function() { + it("must stringify circular objects", function() { + var obj = {name: "Alice"} + obj.self = obj + var json = stringify(obj, null, 2) + json.must.eql(jsonify({name: "Alice", self: "[Circular ~]"})) + }) + + it("must stringify circular objects with intermediaries", function() { + var obj = {name: "Alice"} + obj.identity = {self: obj} + var json = stringify(obj, null, 2) + json.must.eql(jsonify({name: "Alice", identity: {self: "[Circular ~]"}})) + }) + + it("must stringify circular objects deeper", function() { + var obj = {name: "Alice", child: {name: "Bob"}} + obj.child.self = obj.child + + stringify(obj, null, 2).must.eql(jsonify({ + name: "Alice", + child: {name: "Bob", self: "[Circular ~.child]"} + })) + }) + + it("must stringify circular objects deeper with intermediaries", function() { + var obj = {name: "Alice", child: {name: "Bob"}} + obj.child.identity = {self: obj.child} + + stringify(obj, null, 2).must.eql(jsonify({ + name: "Alice", + child: {name: "Bob", identity: {self: "[Circular ~.child]"}} + })) + }) + + it("must stringify circular objects in an array", function() { + var obj = {name: "Alice"} + obj.self = [obj, obj] + + stringify(obj, null, 2).must.eql(jsonify({ + name: "Alice", self: ["[Circular ~]", "[Circular ~]"] + })) + }) + + it("must stringify circular objects deeper in an array", function() { + var obj = {name: "Alice", children: [{name: "Bob"}, {name: "Eve"}]} + obj.children[0].self = obj.children[0] + obj.children[1].self = obj.children[1] + + stringify(obj, null, 2).must.eql(jsonify({ + name: "Alice", + children: [ + {name: "Bob", self: "[Circular ~.children.0]"}, + {name: "Eve", self: "[Circular ~.children.1]"} + ] + })) + }) + + it("must stringify circular arrays", function() { + var obj = [] + obj.push(obj) + obj.push(obj) + var json = stringify(obj, null, 2) + json.must.eql(jsonify(["[Circular ~]", "[Circular ~]"])) + }) + + it("must stringify circular arrays with intermediaries", function() { + var obj = [] + obj.push({name: "Alice", self: obj}) + obj.push({name: "Bob", self: obj}) + + stringify(obj, null, 2).must.eql(jsonify([ + {name: "Alice", self: "[Circular ~]"}, + {name: "Bob", self: "[Circular ~]"} + ])) + }) + + it("must stringify repeated objects in objects", function() { + var obj = {} + var alice = {name: "Alice"} + obj.alice1 = alice + obj.alice2 = alice + + stringify(obj, null, 2).must.eql(jsonify({ + alice1: {name: "Alice"}, + alice2: {name: "Alice"} + })) + }) + + it("must stringify repeated objects in arrays", function() { + var alice = {name: "Alice"} + var obj = [alice, alice] + var json = stringify(obj, null, 2) + json.must.eql(jsonify([{name: "Alice"}, {name: "Alice"}])) + }) + + it("must call given decycler and use its output", function() { + var obj = {} + obj.a = obj + obj.b = obj + + var decycle = Sinon.spy(function() { return decycle.callCount }) + var json = stringify(obj, null, 2, decycle) + json.must.eql(jsonify({a: 1, b: 2}, null, 2)) + + decycle.callCount.must.equal(2) + decycle.thisValues[0].must.equal(obj) + decycle.args[0][0].must.equal("a") + decycle.args[0][1].must.equal(obj) + decycle.thisValues[1].must.equal(obj) + decycle.args[1][0].must.equal("b") + decycle.args[1][1].must.equal(obj) + }) + + it("must call replacer and use its output", function() { + var obj = {name: "Alice", child: {name: "Bob"}} + + var replacer = Sinon.spy(bangString) + var json = stringify(obj, replacer, 2) + json.must.eql(jsonify({name: "Alice!", child: {name: "Bob!"}})) + + replacer.callCount.must.equal(4) + replacer.args[0][0].must.equal("") + replacer.args[0][1].must.equal(obj) + replacer.thisValues[1].must.equal(obj) + replacer.args[1][0].must.equal("name") + replacer.args[1][1].must.equal("Alice") + replacer.thisValues[2].must.equal(obj) + replacer.args[2][0].must.equal("child") + replacer.args[2][1].must.equal(obj.child) + replacer.thisValues[3].must.equal(obj.child) + replacer.args[3][0].must.equal("name") + replacer.args[3][1].must.equal("Bob") + }) + + it("must call replacer after describing circular references", function() { + var obj = {name: "Alice"} + obj.self = obj + + var replacer = Sinon.spy(bangString) + var json = stringify(obj, replacer, 2) + json.must.eql(jsonify({name: "Alice!", self: "[Circular ~]!"})) + + replacer.callCount.must.equal(3) + replacer.args[0][0].must.equal("") + replacer.args[0][1].must.equal(obj) + replacer.thisValues[1].must.equal(obj) + replacer.args[1][0].must.equal("name") + replacer.args[1][1].must.equal("Alice") + replacer.thisValues[2].must.equal(obj) + replacer.args[2][0].must.equal("self") + replacer.args[2][1].must.equal("[Circular ~]") + }) + + it("must call given decycler and use its output for nested objects", + function() { + var obj = {} + obj.a = obj + obj.b = {self: obj} + + var decycle = Sinon.spy(function() { return decycle.callCount }) + var json = stringify(obj, null, 2, decycle) + json.must.eql(jsonify({a: 1, b: {self: 2}})) + + decycle.callCount.must.equal(2) + decycle.args[0][0].must.equal("a") + decycle.args[0][1].must.equal(obj) + decycle.args[1][0].must.equal("self") + decycle.args[1][1].must.equal(obj) + }) + + it("must use decycler's output when it returned null", function() { + var obj = {a: "b"} + obj.self = obj + obj.selves = [obj, obj] + + function decycle() { return null } + stringify(obj, null, 2, decycle).must.eql(jsonify({ + a: "b", + self: null, + selves: [null, null] + })) + }) + + it("must use decycler's output when it returned undefined", function() { + var obj = {a: "b"} + obj.self = obj + obj.selves = [obj, obj] + + function decycle() {} + stringify(obj, null, 2, decycle).must.eql(jsonify({ + a: "b", + selves: [null, null] + })) + }) + + it("must throw given a decycler that returns a cycle", function() { + var obj = {} + obj.self = obj + var err + function identity(key, value) { return value } + try { stringify(obj, null, 2, identity) } catch (ex) { err = ex } + err.must.be.an.instanceof(TypeError) + }) + + describe(".getSerialize", function() { + it("must stringify circular objects", function() { + var obj = {a: "b"} + obj.circularRef = obj + obj.list = [obj, obj] + + var json = JSON.stringify(obj, stringify.getSerialize(), 2) + json.must.eql(jsonify({ + "a": "b", + "circularRef": "[Circular ~]", + "list": ["[Circular ~]", "[Circular ~]"] + })) + }) + + // This is the behavior as of Mar 3, 2015. + // The serializer function keeps state inside the returned function and + // so far I'm not sure how to not do that. JSON.stringify's replacer is not + // called _after_ serialization. + xit("must return a function that could be called twice", function() { + var obj = {name: "Alice"} + obj.self = obj + + var json + var serializer = stringify.getSerialize() + + json = JSON.stringify(obj, serializer, 2) + json.must.eql(jsonify({name: "Alice", self: "[Circular ~]"})) + + json = JSON.stringify(obj, serializer, 2) + json.must.eql(jsonify({name: "Alice", self: "[Circular ~]"})) + }) + }) +}) + +function bangString(key, value) { + return typeof value == "string" ? value + "!" : value +} diff --git a/node_modules/lodash.get/LICENSE b/node_modules/lodash.get/LICENSE new file mode 100644 index 00000000..e0c69d56 --- /dev/null +++ b/node_modules/lodash.get/LICENSE @@ -0,0 +1,47 @@ +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/node_modules/lodash.get/README.md b/node_modules/lodash.get/README.md new file mode 100644 index 00000000..90796144 --- /dev/null +++ b/node_modules/lodash.get/README.md @@ -0,0 +1,18 @@ +# lodash.get v4.4.2 + +The [lodash](https://lodash.com/) method `_.get` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.get +``` + +In Node.js: +```js +var get = require('lodash.get'); +``` + +See the [documentation](https://lodash.com/docs#get) or [package source](https://github.com/lodash/lodash/blob/4.4.2-npm-packages/lodash.get) for more details. diff --git a/node_modules/lodash.get/index.js b/node_modules/lodash.get/index.js new file mode 100644 index 00000000..0eaadec5 --- /dev/null +++ b/node_modules/lodash.get/index.js @@ -0,0 +1,931 @@ +/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** `Object#toString` result references. */ +var funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + symbolTag = '[object Symbol]'; + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + reLeadingDot = /^\./, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; +} + +/** Used for built-in method references. */ +var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** Built-in value references. */ +var Symbol = root.Symbol, + splice = arrayProto.splice; + +/* Built-in method references that are verified to be native. */ +var Map = getNative(root, 'Map'), + nativeCreate = getNative(Object, 'create'); + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; +} + +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; +} + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); +} + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; +} + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; +} + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + return getMapData(this, key)['delete'](key); +} + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +/** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path) { + path = isKey(path, object) ? [path] : castPath(path); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return (index && index == length) ? object : undefined; +} + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value) { + return isArray(value) ? value : stringToPath(value); +} + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); +} + +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +/** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ +var stringToPath = memoize(function(string) { + string = toString(string); + + var result = []; + if (reLeadingDot.test(string)) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +/** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ +function memoize(func, resolver) { + if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result); + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; +} + +// Assign cache to `_.memoize`. +memoize.Cache = MapCache; + +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +/** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {string} Returns the string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString(value) { + return value == null ? '' : baseToString(value); +} + +/** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ +function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; +} + +module.exports = get; diff --git a/node_modules/lodash.get/package.json b/node_modules/lodash.get/package.json new file mode 100644 index 00000000..cadae78f --- /dev/null +++ b/node_modules/lodash.get/package.json @@ -0,0 +1,72 @@ +{ + "_args": [ + [ + "lodash.get@4.4.2", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "lodash.get@4.4.2", + "_id": "lodash.get@4.4.2", + "_inBundle": false, + "_integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "_location": "/lodash.get", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "lodash.get@4.4.2", + "name": "lodash.get", + "escapedName": "lodash.get", + "rawSpec": "4.4.2", + "saveSpec": null, + "fetchSpec": "4.4.2" + }, + "_requiredBy": [ + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "_spec": "4.4.2", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine.bublitz@gmail.com", + "url": "https://github.com/phated" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "description": "The lodash method `_.get` exported as a module.", + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "keywords": [ + "lodash-modularized", + "get" + ], + "license": "MIT", + "name": "lodash.get", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "4.4.2" +} diff --git a/node_modules/lodash.set/LICENSE b/node_modules/lodash.set/LICENSE new file mode 100644 index 00000000..e0c69d56 --- /dev/null +++ b/node_modules/lodash.set/LICENSE @@ -0,0 +1,47 @@ +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/node_modules/lodash.set/README.md b/node_modules/lodash.set/README.md new file mode 100644 index 00000000..1f530bc4 --- /dev/null +++ b/node_modules/lodash.set/README.md @@ -0,0 +1,18 @@ +# lodash.set v4.3.2 + +The [lodash](https://lodash.com/) method `_.set` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.set +``` + +In Node.js: +```js +var set = require('lodash.set'); +``` + +See the [documentation](https://lodash.com/docs#set) or [package source](https://github.com/lodash/lodash/blob/4.3.2-npm-packages/lodash.set) for more details. diff --git a/node_modules/lodash.set/index.js b/node_modules/lodash.set/index.js new file mode 100644 index 00000000..9f3ed6b1 --- /dev/null +++ b/node_modules/lodash.set/index.js @@ -0,0 +1,990 @@ +/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991; + +/** `Object#toString` result references. */ +var funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + symbolTag = '[object Symbol]'; + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + reLeadingDot = /^\./, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; +} + +/** Used for built-in method references. */ +var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** Built-in value references. */ +var Symbol = root.Symbol, + splice = arrayProto.splice; + +/* Built-in method references that are verified to be native. */ +var Map = getNative(root, 'Map'), + nativeCreate = getNative(Object, 'create'); + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; +} + +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; +} + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); +} + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; +} + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; +} + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + return getMapData(this, key)['delete'](key); +} + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + object[key] = value; + } +} + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +/** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ +function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = isKey(path, object) ? [path] : castPath(path); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; +} + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value) { + return isArray(value) ? value : stringToPath(value); +} + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); +} + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); +} + +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +/** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ +var stringToPath = memoize(function(string) { + string = toString(string); + + var result = []; + if (reLeadingDot.test(string)) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +/** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ +function memoize(func, resolver) { + if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result); + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; +} + +// Assign cache to `_.memoize`. +memoize.Cache = MapCache; + +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +/** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {string} Returns the string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString(value) { + return value == null ? '' : baseToString(value); +} + +/** + * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, + * it's created. Arrays are created for missing index properties while objects + * are created for all other missing properties. Use `_.setWith` to customize + * `path` creation. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, ['x', '0', 'y', 'z'], 5); + * console.log(object.x[0].y.z); + * // => 5 + */ +function set(object, path, value) { + return object == null ? object : baseSet(object, path, value); +} + +module.exports = set; diff --git a/node_modules/lodash.set/package.json b/node_modules/lodash.set/package.json new file mode 100644 index 00000000..84c6321e --- /dev/null +++ b/node_modules/lodash.set/package.json @@ -0,0 +1,72 @@ +{ + "_args": [ + [ + "lodash.set@4.3.2", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "lodash.set@4.3.2", + "_id": "lodash.set@4.3.2", + "_inBundle": false, + "_integrity": "sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM=", + "_location": "/lodash.set", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "lodash.set@4.3.2", + "name": "lodash.set", + "escapedName": "lodash.set", + "rawSpec": "4.3.2", + "saveSpec": null, + "fetchSpec": "4.3.2" + }, + "_requiredBy": [ + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz", + "_spec": "4.3.2", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine.bublitz@gmail.com", + "url": "https://github.com/phated" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "description": "The lodash method `_.set` exported as a module.", + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "keywords": [ + "lodash-modularized", + "set" + ], + "license": "MIT", + "name": "lodash.set", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "4.3.2" +} diff --git a/node_modules/lodash.uniq/LICENSE b/node_modules/lodash.uniq/LICENSE new file mode 100644 index 00000000..e0c69d56 --- /dev/null +++ b/node_modules/lodash.uniq/LICENSE @@ -0,0 +1,47 @@ +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/node_modules/lodash.uniq/README.md b/node_modules/lodash.uniq/README.md new file mode 100644 index 00000000..a662a5e3 --- /dev/null +++ b/node_modules/lodash.uniq/README.md @@ -0,0 +1,18 @@ +# lodash.uniq v4.5.0 + +The [lodash](https://lodash.com/) method `_.uniq` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.uniq +``` + +In Node.js: +```js +var uniq = require('lodash.uniq'); +``` + +See the [documentation](https://lodash.com/docs#uniq) or [package source](https://github.com/lodash/lodash/blob/4.5.0-npm-packages/lodash.uniq) for more details. diff --git a/node_modules/lodash.uniq/index.js b/node_modules/lodash.uniq/index.js new file mode 100644 index 00000000..83fce2bc --- /dev/null +++ b/node_modules/lodash.uniq/index.js @@ -0,0 +1,896 @@ +/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** `Object#toString` result references. */ +var funcTag = '[object Function]', + genTag = '[object GeneratorFunction]'; + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludes(array, value) { + var length = array ? array.length : 0; + return !!length && baseIndexOf(array, value, 0) > -1; +} + +/** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array ? array.length : 0; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; +} + +/** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; +} + +/** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOf(array, value, fromIndex) { + if (value !== value) { + return baseFindIndex(array, baseIsNaN, fromIndex); + } + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +/** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ +function baseIsNaN(value) { + return value !== value; +} + +/** + * Checks if a cache value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function cacheHas(cache, key) { + return cache.has(key); +} + +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; +} + +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +/** Used for built-in method references. */ +var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** Built-in value references. */ +var splice = arrayProto.splice; + +/* Built-in method references that are verified to be native. */ +var Map = getNative(root, 'Map'), + Set = getNative(root, 'Set'), + nativeCreate = getNative(Object, 'create'); + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; +} + +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; +} + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); +} + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; +} + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; +} + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + return getMapData(this, key)['delete'](key); +} + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values ? values.length : 0; + + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } +} + +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; +} + +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); +} + +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; +SetCache.prototype.has = setCacheHas; + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +/** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ +function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} + +/** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ +var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { + return new Set(values); +}; + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +/** + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each + * element is kept. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + */ +function uniq(array) { + return (array && array.length) + ? baseUniq(array) + : []; +} + +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ +function noop() { + // No operation performed. +} + +module.exports = uniq; diff --git a/node_modules/lodash.uniq/package.json b/node_modules/lodash.uniq/package.json new file mode 100644 index 00000000..8add2114 --- /dev/null +++ b/node_modules/lodash.uniq/package.json @@ -0,0 +1,72 @@ +{ + "_args": [ + [ + "lodash.uniq@4.5.0", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "lodash.uniq@4.5.0", + "_id": "lodash.uniq@4.5.0", + "_inBundle": false, + "_integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "_location": "/lodash.uniq", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "lodash.uniq@4.5.0", + "name": "lodash.uniq", + "escapedName": "lodash.uniq", + "rawSpec": "4.5.0", + "saveSpec": null, + "fetchSpec": "4.5.0" + }, + "_requiredBy": [ + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "_spec": "4.5.0", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine.bublitz@gmail.com", + "url": "https://github.com/phated" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "description": "The lodash method `_.uniq` exported as a module.", + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "keywords": [ + "lodash-modularized", + "uniq" + ], + "license": "MIT", + "name": "lodash.uniq", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "4.5.0" +} diff --git a/node_modules/lodash/LICENSE b/node_modules/lodash/LICENSE new file mode 100644 index 00000000..77c42f14 --- /dev/null +++ b/node_modules/lodash/LICENSE @@ -0,0 +1,47 @@ +Copyright OpenJS Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/node_modules/lodash/README.md b/node_modules/lodash/README.md new file mode 100644 index 00000000..292832fe --- /dev/null +++ b/node_modules/lodash/README.md @@ -0,0 +1,39 @@ +# lodash v4.17.15 + +The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules. + +## Installation + +Using npm: +```shell +$ npm i -g npm +$ npm i --save lodash +``` + +In Node.js: +```js +// Load the full build. +var _ = require('lodash'); +// Load the core build. +var _ = require('lodash/core'); +// Load the FP build for immutable auto-curried iteratee-first data-last methods. +var fp = require('lodash/fp'); + +// Load method categories. +var array = require('lodash/array'); +var object = require('lodash/fp/object'); + +// Cherry-pick methods for smaller browserify/rollup/webpack bundles. +var at = require('lodash/at'); +var curryN = require('lodash/fp/curryN'); +``` + +See the [package source](https://github.com/lodash/lodash/tree/4.17.15-npm) for more details. + +**Note:**
+Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL. + +## Support + +Tested in Chrome 74-75, Firefox 66-67, IE 11, Edge 18, Safari 11-12, & Node.js 8-12.
+Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available. diff --git a/node_modules/lodash/_DataView.js b/node_modules/lodash/_DataView.js new file mode 100644 index 00000000..ac2d57ca --- /dev/null +++ b/node_modules/lodash/_DataView.js @@ -0,0 +1,7 @@ +var getNative = require('./_getNative'), + root = require('./_root'); + +/* Built-in method references that are verified to be native. */ +var DataView = getNative(root, 'DataView'); + +module.exports = DataView; diff --git a/node_modules/lodash/_Hash.js b/node_modules/lodash/_Hash.js new file mode 100644 index 00000000..b504fe34 --- /dev/null +++ b/node_modules/lodash/_Hash.js @@ -0,0 +1,32 @@ +var hashClear = require('./_hashClear'), + hashDelete = require('./_hashDelete'), + hashGet = require('./_hashGet'), + hashHas = require('./_hashHas'), + hashSet = require('./_hashSet'); + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +module.exports = Hash; diff --git a/node_modules/lodash/_LazyWrapper.js b/node_modules/lodash/_LazyWrapper.js new file mode 100644 index 00000000..81786c7f --- /dev/null +++ b/node_modules/lodash/_LazyWrapper.js @@ -0,0 +1,28 @@ +var baseCreate = require('./_baseCreate'), + baseLodash = require('./_baseLodash'); + +/** Used as references for the maximum length and index of an array. */ +var MAX_ARRAY_LENGTH = 4294967295; + +/** + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * + * @private + * @constructor + * @param {*} value The value to wrap. + */ +function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = MAX_ARRAY_LENGTH; + this.__views__ = []; +} + +// Ensure `LazyWrapper` is an instance of `baseLodash`. +LazyWrapper.prototype = baseCreate(baseLodash.prototype); +LazyWrapper.prototype.constructor = LazyWrapper; + +module.exports = LazyWrapper; diff --git a/node_modules/lodash/_ListCache.js b/node_modules/lodash/_ListCache.js new file mode 100644 index 00000000..26895c3a --- /dev/null +++ b/node_modules/lodash/_ListCache.js @@ -0,0 +1,32 @@ +var listCacheClear = require('./_listCacheClear'), + listCacheDelete = require('./_listCacheDelete'), + listCacheGet = require('./_listCacheGet'), + listCacheHas = require('./_listCacheHas'), + listCacheSet = require('./_listCacheSet'); + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +module.exports = ListCache; diff --git a/node_modules/lodash/_LodashWrapper.js b/node_modules/lodash/_LodashWrapper.js new file mode 100644 index 00000000..c1e4d9df --- /dev/null +++ b/node_modules/lodash/_LodashWrapper.js @@ -0,0 +1,22 @@ +var baseCreate = require('./_baseCreate'), + baseLodash = require('./_baseLodash'); + +/** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ +function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + this.__index__ = 0; + this.__values__ = undefined; +} + +LodashWrapper.prototype = baseCreate(baseLodash.prototype); +LodashWrapper.prototype.constructor = LodashWrapper; + +module.exports = LodashWrapper; diff --git a/node_modules/lodash/_Map.js b/node_modules/lodash/_Map.js new file mode 100644 index 00000000..b73f29a0 --- /dev/null +++ b/node_modules/lodash/_Map.js @@ -0,0 +1,7 @@ +var getNative = require('./_getNative'), + root = require('./_root'); + +/* Built-in method references that are verified to be native. */ +var Map = getNative(root, 'Map'); + +module.exports = Map; diff --git a/node_modules/lodash/_MapCache.js b/node_modules/lodash/_MapCache.js new file mode 100644 index 00000000..4a4eea7b --- /dev/null +++ b/node_modules/lodash/_MapCache.js @@ -0,0 +1,32 @@ +var mapCacheClear = require('./_mapCacheClear'), + mapCacheDelete = require('./_mapCacheDelete'), + mapCacheGet = require('./_mapCacheGet'), + mapCacheHas = require('./_mapCacheHas'), + mapCacheSet = require('./_mapCacheSet'); + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +module.exports = MapCache; diff --git a/node_modules/lodash/_Promise.js b/node_modules/lodash/_Promise.js new file mode 100644 index 00000000..247b9e1b --- /dev/null +++ b/node_modules/lodash/_Promise.js @@ -0,0 +1,7 @@ +var getNative = require('./_getNative'), + root = require('./_root'); + +/* Built-in method references that are verified to be native. */ +var Promise = getNative(root, 'Promise'); + +module.exports = Promise; diff --git a/node_modules/lodash/_Set.js b/node_modules/lodash/_Set.js new file mode 100644 index 00000000..b3c8dcbf --- /dev/null +++ b/node_modules/lodash/_Set.js @@ -0,0 +1,7 @@ +var getNative = require('./_getNative'), + root = require('./_root'); + +/* Built-in method references that are verified to be native. */ +var Set = getNative(root, 'Set'); + +module.exports = Set; diff --git a/node_modules/lodash/_SetCache.js b/node_modules/lodash/_SetCache.js new file mode 100644 index 00000000..6468b064 --- /dev/null +++ b/node_modules/lodash/_SetCache.js @@ -0,0 +1,27 @@ +var MapCache = require('./_MapCache'), + setCacheAdd = require('./_setCacheAdd'), + setCacheHas = require('./_setCacheHas'); + +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } +} + +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; +SetCache.prototype.has = setCacheHas; + +module.exports = SetCache; diff --git a/node_modules/lodash/_Stack.js b/node_modules/lodash/_Stack.js new file mode 100644 index 00000000..80b2cf1b --- /dev/null +++ b/node_modules/lodash/_Stack.js @@ -0,0 +1,27 @@ +var ListCache = require('./_ListCache'), + stackClear = require('./_stackClear'), + stackDelete = require('./_stackDelete'), + stackGet = require('./_stackGet'), + stackHas = require('./_stackHas'), + stackSet = require('./_stackSet'); + +/** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; +} + +// Add methods to `Stack`. +Stack.prototype.clear = stackClear; +Stack.prototype['delete'] = stackDelete; +Stack.prototype.get = stackGet; +Stack.prototype.has = stackHas; +Stack.prototype.set = stackSet; + +module.exports = Stack; diff --git a/node_modules/lodash/_Symbol.js b/node_modules/lodash/_Symbol.js new file mode 100644 index 00000000..a013f7c5 --- /dev/null +++ b/node_modules/lodash/_Symbol.js @@ -0,0 +1,6 @@ +var root = require('./_root'); + +/** Built-in value references. */ +var Symbol = root.Symbol; + +module.exports = Symbol; diff --git a/node_modules/lodash/_Uint8Array.js b/node_modules/lodash/_Uint8Array.js new file mode 100644 index 00000000..2fb30e15 --- /dev/null +++ b/node_modules/lodash/_Uint8Array.js @@ -0,0 +1,6 @@ +var root = require('./_root'); + +/** Built-in value references. */ +var Uint8Array = root.Uint8Array; + +module.exports = Uint8Array; diff --git a/node_modules/lodash/_WeakMap.js b/node_modules/lodash/_WeakMap.js new file mode 100644 index 00000000..567f86c6 --- /dev/null +++ b/node_modules/lodash/_WeakMap.js @@ -0,0 +1,7 @@ +var getNative = require('./_getNative'), + root = require('./_root'); + +/* Built-in method references that are verified to be native. */ +var WeakMap = getNative(root, 'WeakMap'); + +module.exports = WeakMap; diff --git a/node_modules/lodash/_apply.js b/node_modules/lodash/_apply.js new file mode 100644 index 00000000..36436dda --- /dev/null +++ b/node_modules/lodash/_apply.js @@ -0,0 +1,21 @@ +/** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ +function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); +} + +module.exports = apply; diff --git a/node_modules/lodash/_arrayAggregator.js b/node_modules/lodash/_arrayAggregator.js new file mode 100644 index 00000000..d96c3ca4 --- /dev/null +++ b/node_modules/lodash/_arrayAggregator.js @@ -0,0 +1,22 @@ +/** + * A specialized version of `baseAggregator` for arrays. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ +function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); + } + return accumulator; +} + +module.exports = arrayAggregator; diff --git a/node_modules/lodash/_arrayEach.js b/node_modules/lodash/_arrayEach.js new file mode 100644 index 00000000..2c5f5796 --- /dev/null +++ b/node_modules/lodash/_arrayEach.js @@ -0,0 +1,22 @@ +/** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} + +module.exports = arrayEach; diff --git a/node_modules/lodash/_arrayEachRight.js b/node_modules/lodash/_arrayEachRight.js new file mode 100644 index 00000000..976ca5c2 --- /dev/null +++ b/node_modules/lodash/_arrayEachRight.js @@ -0,0 +1,21 @@ +/** + * A specialized version of `_.forEachRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEachRight(array, iteratee) { + var length = array == null ? 0 : array.length; + + while (length--) { + if (iteratee(array[length], length, array) === false) { + break; + } + } + return array; +} + +module.exports = arrayEachRight; diff --git a/node_modules/lodash/_arrayEvery.js b/node_modules/lodash/_arrayEvery.js new file mode 100644 index 00000000..e26a9184 --- /dev/null +++ b/node_modules/lodash/_arrayEvery.js @@ -0,0 +1,23 @@ +/** + * A specialized version of `_.every` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ +function arrayEvery(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; +} + +module.exports = arrayEvery; diff --git a/node_modules/lodash/_arrayFilter.js b/node_modules/lodash/_arrayFilter.js new file mode 100644 index 00000000..75ea2544 --- /dev/null +++ b/node_modules/lodash/_arrayFilter.js @@ -0,0 +1,25 @@ +/** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; +} + +module.exports = arrayFilter; diff --git a/node_modules/lodash/_arrayIncludes.js b/node_modules/lodash/_arrayIncludes.js new file mode 100644 index 00000000..3737a6d9 --- /dev/null +++ b/node_modules/lodash/_arrayIncludes.js @@ -0,0 +1,17 @@ +var baseIndexOf = require('./_baseIndexOf'); + +/** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; +} + +module.exports = arrayIncludes; diff --git a/node_modules/lodash/_arrayIncludesWith.js b/node_modules/lodash/_arrayIncludesWith.js new file mode 100644 index 00000000..235fd975 --- /dev/null +++ b/node_modules/lodash/_arrayIncludesWith.js @@ -0,0 +1,22 @@ +/** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; +} + +module.exports = arrayIncludesWith; diff --git a/node_modules/lodash/_arrayLikeKeys.js b/node_modules/lodash/_arrayLikeKeys.js new file mode 100644 index 00000000..b2ec9ce7 --- /dev/null +++ b/node_modules/lodash/_arrayLikeKeys.js @@ -0,0 +1,49 @@ +var baseTimes = require('./_baseTimes'), + isArguments = require('./isArguments'), + isArray = require('./isArray'), + isBuffer = require('./isBuffer'), + isIndex = require('./_isIndex'), + isTypedArray = require('./isTypedArray'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ +function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; +} + +module.exports = arrayLikeKeys; diff --git a/node_modules/lodash/_arrayMap.js b/node_modules/lodash/_arrayMap.js new file mode 100644 index 00000000..22b22464 --- /dev/null +++ b/node_modules/lodash/_arrayMap.js @@ -0,0 +1,21 @@ +/** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} + +module.exports = arrayMap; diff --git a/node_modules/lodash/_arrayPush.js b/node_modules/lodash/_arrayPush.js new file mode 100644 index 00000000..7d742b38 --- /dev/null +++ b/node_modules/lodash/_arrayPush.js @@ -0,0 +1,20 @@ +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +module.exports = arrayPush; diff --git a/node_modules/lodash/_arrayReduce.js b/node_modules/lodash/_arrayReduce.js new file mode 100644 index 00000000..de8b79b2 --- /dev/null +++ b/node_modules/lodash/_arrayReduce.js @@ -0,0 +1,26 @@ +/** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ +function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; +} + +module.exports = arrayReduce; diff --git a/node_modules/lodash/_arrayReduceRight.js b/node_modules/lodash/_arrayReduceRight.js new file mode 100644 index 00000000..22d8976d --- /dev/null +++ b/node_modules/lodash/_arrayReduceRight.js @@ -0,0 +1,24 @@ +/** + * A specialized version of `_.reduceRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the last element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ +function arrayReduceRight(array, iteratee, accumulator, initAccum) { + var length = array == null ? 0 : array.length; + if (initAccum && length) { + accumulator = array[--length]; + } + while (length--) { + accumulator = iteratee(accumulator, array[length], length, array); + } + return accumulator; +} + +module.exports = arrayReduceRight; diff --git a/node_modules/lodash/_arraySample.js b/node_modules/lodash/_arraySample.js new file mode 100644 index 00000000..fcab0105 --- /dev/null +++ b/node_modules/lodash/_arraySample.js @@ -0,0 +1,15 @@ +var baseRandom = require('./_baseRandom'); + +/** + * A specialized version of `_.sample` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @returns {*} Returns the random element. + */ +function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined; +} + +module.exports = arraySample; diff --git a/node_modules/lodash/_arraySampleSize.js b/node_modules/lodash/_arraySampleSize.js new file mode 100644 index 00000000..8c7e364f --- /dev/null +++ b/node_modules/lodash/_arraySampleSize.js @@ -0,0 +1,17 @@ +var baseClamp = require('./_baseClamp'), + copyArray = require('./_copyArray'), + shuffleSelf = require('./_shuffleSelf'); + +/** + * A specialized version of `_.sampleSize` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ +function arraySampleSize(array, n) { + return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); +} + +module.exports = arraySampleSize; diff --git a/node_modules/lodash/_arrayShuffle.js b/node_modules/lodash/_arrayShuffle.js new file mode 100644 index 00000000..46313a39 --- /dev/null +++ b/node_modules/lodash/_arrayShuffle.js @@ -0,0 +1,15 @@ +var copyArray = require('./_copyArray'), + shuffleSelf = require('./_shuffleSelf'); + +/** + * A specialized version of `_.shuffle` for arrays. + * + * @private + * @param {Array} array The array to shuffle. + * @returns {Array} Returns the new shuffled array. + */ +function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); +} + +module.exports = arrayShuffle; diff --git a/node_modules/lodash/_arraySome.js b/node_modules/lodash/_arraySome.js new file mode 100644 index 00000000..6fd02fd4 --- /dev/null +++ b/node_modules/lodash/_arraySome.js @@ -0,0 +1,23 @@ +/** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; +} + +module.exports = arraySome; diff --git a/node_modules/lodash/_asciiSize.js b/node_modules/lodash/_asciiSize.js new file mode 100644 index 00000000..11d29c33 --- /dev/null +++ b/node_modules/lodash/_asciiSize.js @@ -0,0 +1,12 @@ +var baseProperty = require('./_baseProperty'); + +/** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +var asciiSize = baseProperty('length'); + +module.exports = asciiSize; diff --git a/node_modules/lodash/_asciiToArray.js b/node_modules/lodash/_asciiToArray.js new file mode 100644 index 00000000..8e3dd5b4 --- /dev/null +++ b/node_modules/lodash/_asciiToArray.js @@ -0,0 +1,12 @@ +/** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function asciiToArray(string) { + return string.split(''); +} + +module.exports = asciiToArray; diff --git a/node_modules/lodash/_asciiWords.js b/node_modules/lodash/_asciiWords.js new file mode 100644 index 00000000..d765f0f7 --- /dev/null +++ b/node_modules/lodash/_asciiWords.js @@ -0,0 +1,15 @@ +/** Used to match words composed of alphanumeric characters. */ +var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; + +/** + * Splits an ASCII `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ +function asciiWords(string) { + return string.match(reAsciiWord) || []; +} + +module.exports = asciiWords; diff --git a/node_modules/lodash/_assignMergeValue.js b/node_modules/lodash/_assignMergeValue.js new file mode 100644 index 00000000..cb1185e9 --- /dev/null +++ b/node_modules/lodash/_assignMergeValue.js @@ -0,0 +1,20 @@ +var baseAssignValue = require('./_baseAssignValue'), + eq = require('./eq'); + +/** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignMergeValue(object, key, value) { + if ((value !== undefined && !eq(object[key], value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } +} + +module.exports = assignMergeValue; diff --git a/node_modules/lodash/_assignValue.js b/node_modules/lodash/_assignValue.js new file mode 100644 index 00000000..40839575 --- /dev/null +++ b/node_modules/lodash/_assignValue.js @@ -0,0 +1,28 @@ +var baseAssignValue = require('./_baseAssignValue'), + eq = require('./eq'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } +} + +module.exports = assignValue; diff --git a/node_modules/lodash/_assocIndexOf.js b/node_modules/lodash/_assocIndexOf.js new file mode 100644 index 00000000..5b77a2bd --- /dev/null +++ b/node_modules/lodash/_assocIndexOf.js @@ -0,0 +1,21 @@ +var eq = require('./eq'); + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +module.exports = assocIndexOf; diff --git a/node_modules/lodash/_baseAggregator.js b/node_modules/lodash/_baseAggregator.js new file mode 100644 index 00000000..4bc9e91f --- /dev/null +++ b/node_modules/lodash/_baseAggregator.js @@ -0,0 +1,21 @@ +var baseEach = require('./_baseEach'); + +/** + * Aggregates elements of `collection` on `accumulator` with keys transformed + * by `iteratee` and values set by `setter`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ +function baseAggregator(collection, setter, iteratee, accumulator) { + baseEach(collection, function(value, key, collection) { + setter(accumulator, value, iteratee(value), collection); + }); + return accumulator; +} + +module.exports = baseAggregator; diff --git a/node_modules/lodash/_baseAssign.js b/node_modules/lodash/_baseAssign.js new file mode 100644 index 00000000..e5c4a1a5 --- /dev/null +++ b/node_modules/lodash/_baseAssign.js @@ -0,0 +1,17 @@ +var copyObject = require('./_copyObject'), + keys = require('./keys'); + +/** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); +} + +module.exports = baseAssign; diff --git a/node_modules/lodash/_baseAssignIn.js b/node_modules/lodash/_baseAssignIn.js new file mode 100644 index 00000000..6624f900 --- /dev/null +++ b/node_modules/lodash/_baseAssignIn.js @@ -0,0 +1,17 @@ +var copyObject = require('./_copyObject'), + keysIn = require('./keysIn'); + +/** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); +} + +module.exports = baseAssignIn; diff --git a/node_modules/lodash/_baseAssignValue.js b/node_modules/lodash/_baseAssignValue.js new file mode 100644 index 00000000..d6f66ef3 --- /dev/null +++ b/node_modules/lodash/_baseAssignValue.js @@ -0,0 +1,25 @@ +var defineProperty = require('./_defineProperty'); + +/** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } +} + +module.exports = baseAssignValue; diff --git a/node_modules/lodash/_baseAt.js b/node_modules/lodash/_baseAt.js new file mode 100644 index 00000000..90e4237a --- /dev/null +++ b/node_modules/lodash/_baseAt.js @@ -0,0 +1,23 @@ +var get = require('./get'); + +/** + * The base implementation of `_.at` without support for individual paths. + * + * @private + * @param {Object} object The object to iterate over. + * @param {string[]} paths The property paths to pick. + * @returns {Array} Returns the picked elements. + */ +function baseAt(object, paths) { + var index = -1, + length = paths.length, + result = Array(length), + skip = object == null; + + while (++index < length) { + result[index] = skip ? undefined : get(object, paths[index]); + } + return result; +} + +module.exports = baseAt; diff --git a/node_modules/lodash/_baseClamp.js b/node_modules/lodash/_baseClamp.js new file mode 100644 index 00000000..a1c56929 --- /dev/null +++ b/node_modules/lodash/_baseClamp.js @@ -0,0 +1,22 @@ +/** + * The base implementation of `_.clamp` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + */ +function baseClamp(number, lower, upper) { + if (number === number) { + if (upper !== undefined) { + number = number <= upper ? number : upper; + } + if (lower !== undefined) { + number = number >= lower ? number : lower; + } + } + return number; +} + +module.exports = baseClamp; diff --git a/node_modules/lodash/_baseClone.js b/node_modules/lodash/_baseClone.js new file mode 100644 index 00000000..290de927 --- /dev/null +++ b/node_modules/lodash/_baseClone.js @@ -0,0 +1,165 @@ +var Stack = require('./_Stack'), + arrayEach = require('./_arrayEach'), + assignValue = require('./_assignValue'), + baseAssign = require('./_baseAssign'), + baseAssignIn = require('./_baseAssignIn'), + cloneBuffer = require('./_cloneBuffer'), + copyArray = require('./_copyArray'), + copySymbols = require('./_copySymbols'), + copySymbolsIn = require('./_copySymbolsIn'), + getAllKeys = require('./_getAllKeys'), + getAllKeysIn = require('./_getAllKeysIn'), + getTag = require('./_getTag'), + initCloneArray = require('./_initCloneArray'), + initCloneByTag = require('./_initCloneByTag'), + initCloneObject = require('./_initCloneObject'), + isArray = require('./isArray'), + isBuffer = require('./isBuffer'), + isMap = require('./isMap'), + isObject = require('./isObject'), + isSet = require('./isSet'), + keys = require('./keys'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values supported by `_.clone`. */ +var cloneableTags = {}; +cloneableTags[argsTag] = cloneableTags[arrayTag] = +cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = +cloneableTags[boolTag] = cloneableTags[dateTag] = +cloneableTags[float32Tag] = cloneableTags[float64Tag] = +cloneableTags[int8Tag] = cloneableTags[int16Tag] = +cloneableTags[int32Tag] = cloneableTags[mapTag] = +cloneableTags[numberTag] = cloneableTags[objectTag] = +cloneableTags[regexpTag] = cloneableTags[setTag] = +cloneableTags[stringTag] = cloneableTags[symbolTag] = +cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = +cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; +cloneableTags[errorTag] = cloneableTags[funcTag] = +cloneableTags[weakMapTag] = false; + +/** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ +function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat + ? copySymbolsIn(value, baseAssignIn(result, value)) + : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (isMap(value)) { + value.forEach(function(subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + } + + var keysFunc = isFull + ? (isFlat ? getAllKeysIn : getAllKeys) + : (isFlat ? keysIn : keys); + + var props = isArr ? undefined : keysFunc(value); + arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; +} + +module.exports = baseClone; diff --git a/node_modules/lodash/_baseConforms.js b/node_modules/lodash/_baseConforms.js new file mode 100644 index 00000000..947e20d4 --- /dev/null +++ b/node_modules/lodash/_baseConforms.js @@ -0,0 +1,18 @@ +var baseConformsTo = require('./_baseConformsTo'), + keys = require('./keys'); + +/** + * The base implementation of `_.conforms` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + */ +function baseConforms(source) { + var props = keys(source); + return function(object) { + return baseConformsTo(object, source, props); + }; +} + +module.exports = baseConforms; diff --git a/node_modules/lodash/_baseConformsTo.js b/node_modules/lodash/_baseConformsTo.js new file mode 100644 index 00000000..e449cb84 --- /dev/null +++ b/node_modules/lodash/_baseConformsTo.js @@ -0,0 +1,27 @@ +/** + * The base implementation of `_.conformsTo` which accepts `props` to check. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + */ +function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length], + predicate = source[key], + value = object[key]; + + if ((value === undefined && !(key in object)) || !predicate(value)) { + return false; + } + } + return true; +} + +module.exports = baseConformsTo; diff --git a/node_modules/lodash/_baseCreate.js b/node_modules/lodash/_baseCreate.js new file mode 100644 index 00000000..ffa6a52a --- /dev/null +++ b/node_modules/lodash/_baseCreate.js @@ -0,0 +1,30 @@ +var isObject = require('./isObject'); + +/** Built-in value references. */ +var objectCreate = Object.create; + +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ +var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; +}()); + +module.exports = baseCreate; diff --git a/node_modules/lodash/_baseDelay.js b/node_modules/lodash/_baseDelay.js new file mode 100644 index 00000000..1486d697 --- /dev/null +++ b/node_modules/lodash/_baseDelay.js @@ -0,0 +1,21 @@ +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. + */ +function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function() { func.apply(undefined, args); }, wait); +} + +module.exports = baseDelay; diff --git a/node_modules/lodash/_baseDifference.js b/node_modules/lodash/_baseDifference.js new file mode 100644 index 00000000..343ac19f --- /dev/null +++ b/node_modules/lodash/_baseDifference.js @@ -0,0 +1,67 @@ +var SetCache = require('./_SetCache'), + arrayIncludes = require('./_arrayIncludes'), + arrayIncludesWith = require('./_arrayIncludesWith'), + arrayMap = require('./_arrayMap'), + baseUnary = require('./_baseUnary'), + cacheHas = require('./_cacheHas'); + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * The base implementation of methods like `_.difference` without support + * for excluding multiple arrays or iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + */ +function baseDifference(array, values, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + isCommon = true, + length = array.length, + result = [], + valuesLength = values.length; + + if (!length) { + return result; + } + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)); + } + if (comparator) { + includes = arrayIncludesWith; + isCommon = false; + } + else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas; + isCommon = false; + values = new SetCache(values); + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee == null ? value : iteratee(value); + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } + } + result.push(value); + } + else if (!includes(values, computed, comparator)) { + result.push(value); + } + } + return result; +} + +module.exports = baseDifference; diff --git a/node_modules/lodash/_baseEach.js b/node_modules/lodash/_baseEach.js new file mode 100644 index 00000000..512c0676 --- /dev/null +++ b/node_modules/lodash/_baseEach.js @@ -0,0 +1,14 @@ +var baseForOwn = require('./_baseForOwn'), + createBaseEach = require('./_createBaseEach'); + +/** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ +var baseEach = createBaseEach(baseForOwn); + +module.exports = baseEach; diff --git a/node_modules/lodash/_baseEachRight.js b/node_modules/lodash/_baseEachRight.js new file mode 100644 index 00000000..0a8feeca --- /dev/null +++ b/node_modules/lodash/_baseEachRight.js @@ -0,0 +1,14 @@ +var baseForOwnRight = require('./_baseForOwnRight'), + createBaseEach = require('./_createBaseEach'); + +/** + * The base implementation of `_.forEachRight` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ +var baseEachRight = createBaseEach(baseForOwnRight, true); + +module.exports = baseEachRight; diff --git a/node_modules/lodash/_baseEvery.js b/node_modules/lodash/_baseEvery.js new file mode 100644 index 00000000..fa52f7bc --- /dev/null +++ b/node_modules/lodash/_baseEvery.js @@ -0,0 +1,21 @@ +var baseEach = require('./_baseEach'); + +/** + * The base implementation of `_.every` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ +function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; +} + +module.exports = baseEvery; diff --git a/node_modules/lodash/_baseExtremum.js b/node_modules/lodash/_baseExtremum.js new file mode 100644 index 00000000..9d6aa77e --- /dev/null +++ b/node_modules/lodash/_baseExtremum.js @@ -0,0 +1,32 @@ +var isSymbol = require('./isSymbol'); + +/** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ +function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !isSymbol(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; +} + +module.exports = baseExtremum; diff --git a/node_modules/lodash/_baseFill.js b/node_modules/lodash/_baseFill.js new file mode 100644 index 00000000..46ef9c76 --- /dev/null +++ b/node_modules/lodash/_baseFill.js @@ -0,0 +1,32 @@ +var toInteger = require('./toInteger'), + toLength = require('./toLength'); + +/** + * The base implementation of `_.fill` without an iteratee call guard. + * + * @private + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + */ +function baseFill(array, value, start, end) { + var length = array.length; + + start = toInteger(start); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : toInteger(end); + if (end < 0) { + end += length; + } + end = start > end ? 0 : toLength(end); + while (start < end) { + array[start++] = value; + } + return array; +} + +module.exports = baseFill; diff --git a/node_modules/lodash/_baseFilter.js b/node_modules/lodash/_baseFilter.js new file mode 100644 index 00000000..46784773 --- /dev/null +++ b/node_modules/lodash/_baseFilter.js @@ -0,0 +1,21 @@ +var baseEach = require('./_baseEach'); + +/** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; +} + +module.exports = baseFilter; diff --git a/node_modules/lodash/_baseFindIndex.js b/node_modules/lodash/_baseFindIndex.js new file mode 100644 index 00000000..e3f5d8aa --- /dev/null +++ b/node_modules/lodash/_baseFindIndex.js @@ -0,0 +1,24 @@ +/** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; +} + +module.exports = baseFindIndex; diff --git a/node_modules/lodash/_baseFindKey.js b/node_modules/lodash/_baseFindKey.js new file mode 100644 index 00000000..2e430f3a --- /dev/null +++ b/node_modules/lodash/_baseFindKey.js @@ -0,0 +1,23 @@ +/** + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the found element or its key, else `undefined`. + */ +function baseFindKey(collection, predicate, eachFunc) { + var result; + eachFunc(collection, function(value, key, collection) { + if (predicate(value, key, collection)) { + result = key; + return false; + } + }); + return result; +} + +module.exports = baseFindKey; diff --git a/node_modules/lodash/_baseFlatten.js b/node_modules/lodash/_baseFlatten.js new file mode 100644 index 00000000..4b1e009b --- /dev/null +++ b/node_modules/lodash/_baseFlatten.js @@ -0,0 +1,38 @@ +var arrayPush = require('./_arrayPush'), + isFlattenable = require('./_isFlattenable'); + +/** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ +function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; +} + +module.exports = baseFlatten; diff --git a/node_modules/lodash/_baseFor.js b/node_modules/lodash/_baseFor.js new file mode 100644 index 00000000..d946590f --- /dev/null +++ b/node_modules/lodash/_baseFor.js @@ -0,0 +1,16 @@ +var createBaseFor = require('./_createBaseFor'); + +/** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseFor = createBaseFor(); + +module.exports = baseFor; diff --git a/node_modules/lodash/_baseForOwn.js b/node_modules/lodash/_baseForOwn.js new file mode 100644 index 00000000..503d5234 --- /dev/null +++ b/node_modules/lodash/_baseForOwn.js @@ -0,0 +1,16 @@ +var baseFor = require('./_baseFor'), + keys = require('./keys'); + +/** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); +} + +module.exports = baseForOwn; diff --git a/node_modules/lodash/_baseForOwnRight.js b/node_modules/lodash/_baseForOwnRight.js new file mode 100644 index 00000000..a4b10e6c --- /dev/null +++ b/node_modules/lodash/_baseForOwnRight.js @@ -0,0 +1,16 @@ +var baseForRight = require('./_baseForRight'), + keys = require('./keys'); + +/** + * The base implementation of `_.forOwnRight` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwnRight(object, iteratee) { + return object && baseForRight(object, iteratee, keys); +} + +module.exports = baseForOwnRight; diff --git a/node_modules/lodash/_baseForRight.js b/node_modules/lodash/_baseForRight.js new file mode 100644 index 00000000..32842cd8 --- /dev/null +++ b/node_modules/lodash/_baseForRight.js @@ -0,0 +1,15 @@ +var createBaseFor = require('./_createBaseFor'); + +/** + * This function is like `baseFor` except that it iterates over properties + * in the opposite order. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseForRight = createBaseFor(true); + +module.exports = baseForRight; diff --git a/node_modules/lodash/_baseFunctions.js b/node_modules/lodash/_baseFunctions.js new file mode 100644 index 00000000..d23bc9b4 --- /dev/null +++ b/node_modules/lodash/_baseFunctions.js @@ -0,0 +1,19 @@ +var arrayFilter = require('./_arrayFilter'), + isFunction = require('./isFunction'); + +/** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ +function baseFunctions(object, props) { + return arrayFilter(props, function(key) { + return isFunction(object[key]); + }); +} + +module.exports = baseFunctions; diff --git a/node_modules/lodash/_baseGet.js b/node_modules/lodash/_baseGet.js new file mode 100644 index 00000000..a194913d --- /dev/null +++ b/node_modules/lodash/_baseGet.js @@ -0,0 +1,24 @@ +var castPath = require('./_castPath'), + toKey = require('./_toKey'); + +/** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path) { + path = castPath(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return (index && index == length) ? object : undefined; +} + +module.exports = baseGet; diff --git a/node_modules/lodash/_baseGetAllKeys.js b/node_modules/lodash/_baseGetAllKeys.js new file mode 100644 index 00000000..8ad204ea --- /dev/null +++ b/node_modules/lodash/_baseGetAllKeys.js @@ -0,0 +1,20 @@ +var arrayPush = require('./_arrayPush'), + isArray = require('./isArray'); + +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); +} + +module.exports = baseGetAllKeys; diff --git a/node_modules/lodash/_baseGetTag.js b/node_modules/lodash/_baseGetTag.js new file mode 100644 index 00000000..b927ccc1 --- /dev/null +++ b/node_modules/lodash/_baseGetTag.js @@ -0,0 +1,28 @@ +var Symbol = require('./_Symbol'), + getRawTag = require('./_getRawTag'), + objectToString = require('./_objectToString'); + +/** `Object#toString` result references. */ +var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); +} + +module.exports = baseGetTag; diff --git a/node_modules/lodash/_baseGt.js b/node_modules/lodash/_baseGt.js new file mode 100644 index 00000000..502d273c --- /dev/null +++ b/node_modules/lodash/_baseGt.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ +function baseGt(value, other) { + return value > other; +} + +module.exports = baseGt; diff --git a/node_modules/lodash/_baseHas.js b/node_modules/lodash/_baseHas.js new file mode 100644 index 00000000..1b730321 --- /dev/null +++ b/node_modules/lodash/_baseHas.js @@ -0,0 +1,19 @@ +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); +} + +module.exports = baseHas; diff --git a/node_modules/lodash/_baseHasIn.js b/node_modules/lodash/_baseHasIn.js new file mode 100644 index 00000000..2e0d0426 --- /dev/null +++ b/node_modules/lodash/_baseHasIn.js @@ -0,0 +1,13 @@ +/** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHasIn(object, key) { + return object != null && key in Object(object); +} + +module.exports = baseHasIn; diff --git a/node_modules/lodash/_baseInRange.js b/node_modules/lodash/_baseInRange.js new file mode 100644 index 00000000..ec956661 --- /dev/null +++ b/node_modules/lodash/_baseInRange.js @@ -0,0 +1,18 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * The base implementation of `_.inRange` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to check. + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + */ +function baseInRange(number, start, end) { + return number >= nativeMin(start, end) && number < nativeMax(start, end); +} + +module.exports = baseInRange; diff --git a/node_modules/lodash/_baseIndexOf.js b/node_modules/lodash/_baseIndexOf.js new file mode 100644 index 00000000..167e706e --- /dev/null +++ b/node_modules/lodash/_baseIndexOf.js @@ -0,0 +1,20 @@ +var baseFindIndex = require('./_baseFindIndex'), + baseIsNaN = require('./_baseIsNaN'), + strictIndexOf = require('./_strictIndexOf'); + +/** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); +} + +module.exports = baseIndexOf; diff --git a/node_modules/lodash/_baseIndexOfWith.js b/node_modules/lodash/_baseIndexOfWith.js new file mode 100644 index 00000000..f815fe0d --- /dev/null +++ b/node_modules/lodash/_baseIndexOfWith.js @@ -0,0 +1,23 @@ +/** + * This function is like `baseIndexOf` except that it accepts a comparator. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @param {Function} comparator The comparator invoked per element. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOfWith(array, value, fromIndex, comparator) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (comparator(array[index], value)) { + return index; + } + } + return -1; +} + +module.exports = baseIndexOfWith; diff --git a/node_modules/lodash/_baseIntersection.js b/node_modules/lodash/_baseIntersection.js new file mode 100644 index 00000000..c1d250c2 --- /dev/null +++ b/node_modules/lodash/_baseIntersection.js @@ -0,0 +1,74 @@ +var SetCache = require('./_SetCache'), + arrayIncludes = require('./_arrayIncludes'), + arrayIncludesWith = require('./_arrayIncludesWith'), + arrayMap = require('./_arrayMap'), + baseUnary = require('./_baseUnary'), + cacheHas = require('./_cacheHas'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * The base implementation of methods like `_.intersection`, without support + * for iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of shared values. + */ +function baseIntersection(arrays, iteratee, comparator) { + var includes = comparator ? arrayIncludesWith : arrayIncludes, + length = arrays[0].length, + othLength = arrays.length, + othIndex = othLength, + caches = Array(othLength), + maxLength = Infinity, + result = []; + + while (othIndex--) { + var array = arrays[othIndex]; + if (othIndex && iteratee) { + array = arrayMap(array, baseUnary(iteratee)); + } + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) + ? new SetCache(othIndex && array) + : undefined; + } + array = arrays[0]; + + var index = -1, + seen = caches[0]; + + outer: + while (++index < length && result.length < maxLength) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (!(seen + ? cacheHas(seen, computed) + : includes(result, computed, comparator) + )) { + othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if (!(cache + ? cacheHas(cache, computed) + : includes(arrays[othIndex], computed, comparator)) + ) { + continue outer; + } + } + if (seen) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} + +module.exports = baseIntersection; diff --git a/node_modules/lodash/_baseInverter.js b/node_modules/lodash/_baseInverter.js new file mode 100644 index 00000000..fbc337f0 --- /dev/null +++ b/node_modules/lodash/_baseInverter.js @@ -0,0 +1,21 @@ +var baseForOwn = require('./_baseForOwn'); + +/** + * The base implementation of `_.invert` and `_.invertBy` which inverts + * `object` with values transformed by `iteratee` and set by `setter`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform values. + * @param {Object} accumulator The initial inverted object. + * @returns {Function} Returns `accumulator`. + */ +function baseInverter(object, setter, iteratee, accumulator) { + baseForOwn(object, function(value, key, object) { + setter(accumulator, iteratee(value), key, object); + }); + return accumulator; +} + +module.exports = baseInverter; diff --git a/node_modules/lodash/_baseInvoke.js b/node_modules/lodash/_baseInvoke.js new file mode 100644 index 00000000..49bcf3c3 --- /dev/null +++ b/node_modules/lodash/_baseInvoke.js @@ -0,0 +1,24 @@ +var apply = require('./_apply'), + castPath = require('./_castPath'), + last = require('./last'), + parent = require('./_parent'), + toKey = require('./_toKey'); + +/** + * The base implementation of `_.invoke` without support for individual + * method arguments. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {Array} args The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + */ +function baseInvoke(object, path, args) { + path = castPath(path, object); + object = parent(object, path); + var func = object == null ? object : object[toKey(last(path))]; + return func == null ? undefined : apply(func, object, args); +} + +module.exports = baseInvoke; diff --git a/node_modules/lodash/_baseIsArguments.js b/node_modules/lodash/_baseIsArguments.js new file mode 100644 index 00000000..b3562cca --- /dev/null +++ b/node_modules/lodash/_baseIsArguments.js @@ -0,0 +1,18 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]'; + +/** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ +function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; +} + +module.exports = baseIsArguments; diff --git a/node_modules/lodash/_baseIsArrayBuffer.js b/node_modules/lodash/_baseIsArrayBuffer.js new file mode 100644 index 00000000..a2c4f30a --- /dev/null +++ b/node_modules/lodash/_baseIsArrayBuffer.js @@ -0,0 +1,17 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +var arrayBufferTag = '[object ArrayBuffer]'; + +/** + * The base implementation of `_.isArrayBuffer` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + */ +function baseIsArrayBuffer(value) { + return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; +} + +module.exports = baseIsArrayBuffer; diff --git a/node_modules/lodash/_baseIsDate.js b/node_modules/lodash/_baseIsDate.js new file mode 100644 index 00000000..ba67c785 --- /dev/null +++ b/node_modules/lodash/_baseIsDate.js @@ -0,0 +1,18 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var dateTag = '[object Date]'; + +/** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ +function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; +} + +module.exports = baseIsDate; diff --git a/node_modules/lodash/_baseIsEqual.js b/node_modules/lodash/_baseIsEqual.js new file mode 100644 index 00000000..00a68a4f --- /dev/null +++ b/node_modules/lodash/_baseIsEqual.js @@ -0,0 +1,28 @@ +var baseIsEqualDeep = require('./_baseIsEqualDeep'), + isObjectLike = require('./isObjectLike'); + +/** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ +function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); +} + +module.exports = baseIsEqual; diff --git a/node_modules/lodash/_baseIsEqualDeep.js b/node_modules/lodash/_baseIsEqualDeep.js new file mode 100644 index 00000000..e3cfd6a8 --- /dev/null +++ b/node_modules/lodash/_baseIsEqualDeep.js @@ -0,0 +1,83 @@ +var Stack = require('./_Stack'), + equalArrays = require('./_equalArrays'), + equalByTag = require('./_equalByTag'), + equalObjects = require('./_equalObjects'), + getTag = require('./_getTag'), + isArray = require('./isArray'), + isBuffer = require('./isBuffer'), + isTypedArray = require('./isTypedArray'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack); + return (objIsArr || isTypedArray(object)) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new Stack); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); +} + +module.exports = baseIsEqualDeep; diff --git a/node_modules/lodash/_baseIsMap.js b/node_modules/lodash/_baseIsMap.js new file mode 100644 index 00000000..02a4021c --- /dev/null +++ b/node_modules/lodash/_baseIsMap.js @@ -0,0 +1,18 @@ +var getTag = require('./_getTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]'; + +/** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ +function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; +} + +module.exports = baseIsMap; diff --git a/node_modules/lodash/_baseIsMatch.js b/node_modules/lodash/_baseIsMatch.js new file mode 100644 index 00000000..72494bed --- /dev/null +++ b/node_modules/lodash/_baseIsMatch.js @@ -0,0 +1,62 @@ +var Stack = require('./_Stack'), + baseIsEqual = require('./_baseIsEqual'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ +function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; +} + +module.exports = baseIsMatch; diff --git a/node_modules/lodash/_baseIsNaN.js b/node_modules/lodash/_baseIsNaN.js new file mode 100644 index 00000000..316f1eb1 --- /dev/null +++ b/node_modules/lodash/_baseIsNaN.js @@ -0,0 +1,12 @@ +/** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ +function baseIsNaN(value) { + return value !== value; +} + +module.exports = baseIsNaN; diff --git a/node_modules/lodash/_baseIsNative.js b/node_modules/lodash/_baseIsNative.js new file mode 100644 index 00000000..87023304 --- /dev/null +++ b/node_modules/lodash/_baseIsNative.js @@ -0,0 +1,47 @@ +var isFunction = require('./isFunction'), + isMasked = require('./_isMasked'), + isObject = require('./isObject'), + toSource = require('./_toSource'); + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +module.exports = baseIsNative; diff --git a/node_modules/lodash/_baseIsRegExp.js b/node_modules/lodash/_baseIsRegExp.js new file mode 100644 index 00000000..6cd7c1ae --- /dev/null +++ b/node_modules/lodash/_baseIsRegExp.js @@ -0,0 +1,18 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var regexpTag = '[object RegExp]'; + +/** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ +function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; +} + +module.exports = baseIsRegExp; diff --git a/node_modules/lodash/_baseIsSet.js b/node_modules/lodash/_baseIsSet.js new file mode 100644 index 00000000..6dee3671 --- /dev/null +++ b/node_modules/lodash/_baseIsSet.js @@ -0,0 +1,18 @@ +var getTag = require('./_getTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var setTag = '[object Set]'; + +/** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ +function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; +} + +module.exports = baseIsSet; diff --git a/node_modules/lodash/_baseIsTypedArray.js b/node_modules/lodash/_baseIsTypedArray.js new file mode 100644 index 00000000..1edb32ff --- /dev/null +++ b/node_modules/lodash/_baseIsTypedArray.js @@ -0,0 +1,60 @@ +var baseGetTag = require('./_baseGetTag'), + isLength = require('./isLength'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; + +/** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ +function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; +} + +module.exports = baseIsTypedArray; diff --git a/node_modules/lodash/_baseIteratee.js b/node_modules/lodash/_baseIteratee.js new file mode 100644 index 00000000..995c2575 --- /dev/null +++ b/node_modules/lodash/_baseIteratee.js @@ -0,0 +1,31 @@ +var baseMatches = require('./_baseMatches'), + baseMatchesProperty = require('./_baseMatchesProperty'), + identity = require('./identity'), + isArray = require('./isArray'), + property = require('./property'); + +/** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ +function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == 'object') { + return isArray(value) + ? baseMatchesProperty(value[0], value[1]) + : baseMatches(value); + } + return property(value); +} + +module.exports = baseIteratee; diff --git a/node_modules/lodash/_baseKeys.js b/node_modules/lodash/_baseKeys.js new file mode 100644 index 00000000..45e9e6f3 --- /dev/null +++ b/node_modules/lodash/_baseKeys.js @@ -0,0 +1,30 @@ +var isPrototype = require('./_isPrototype'), + nativeKeys = require('./_nativeKeys'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; +} + +module.exports = baseKeys; diff --git a/node_modules/lodash/_baseKeysIn.js b/node_modules/lodash/_baseKeysIn.js new file mode 100644 index 00000000..ea8a0a17 --- /dev/null +++ b/node_modules/lodash/_baseKeysIn.js @@ -0,0 +1,33 @@ +var isObject = require('./isObject'), + isPrototype = require('./_isPrototype'), + nativeKeysIn = require('./_nativeKeysIn'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; +} + +module.exports = baseKeysIn; diff --git a/node_modules/lodash/_baseLodash.js b/node_modules/lodash/_baseLodash.js new file mode 100644 index 00000000..f76c790e --- /dev/null +++ b/node_modules/lodash/_baseLodash.js @@ -0,0 +1,10 @@ +/** + * The function whose prototype chain sequence wrappers inherit from. + * + * @private + */ +function baseLodash() { + // No operation performed. +} + +module.exports = baseLodash; diff --git a/node_modules/lodash/_baseLt.js b/node_modules/lodash/_baseLt.js new file mode 100644 index 00000000..8674d294 --- /dev/null +++ b/node_modules/lodash/_baseLt.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ +function baseLt(value, other) { + return value < other; +} + +module.exports = baseLt; diff --git a/node_modules/lodash/_baseMap.js b/node_modules/lodash/_baseMap.js new file mode 100644 index 00000000..0bf5cead --- /dev/null +++ b/node_modules/lodash/_baseMap.js @@ -0,0 +1,22 @@ +var baseEach = require('./_baseEach'), + isArrayLike = require('./isArrayLike'); + +/** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; +} + +module.exports = baseMap; diff --git a/node_modules/lodash/_baseMatches.js b/node_modules/lodash/_baseMatches.js new file mode 100644 index 00000000..e56582ad --- /dev/null +++ b/node_modules/lodash/_baseMatches.js @@ -0,0 +1,22 @@ +var baseIsMatch = require('./_baseIsMatch'), + getMatchData = require('./_getMatchData'), + matchesStrictComparable = require('./_matchesStrictComparable'); + +/** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; +} + +module.exports = baseMatches; diff --git a/node_modules/lodash/_baseMatchesProperty.js b/node_modules/lodash/_baseMatchesProperty.js new file mode 100644 index 00000000..24afd893 --- /dev/null +++ b/node_modules/lodash/_baseMatchesProperty.js @@ -0,0 +1,33 @@ +var baseIsEqual = require('./_baseIsEqual'), + get = require('./get'), + hasIn = require('./hasIn'), + isKey = require('./_isKey'), + isStrictComparable = require('./_isStrictComparable'), + matchesStrictComparable = require('./_matchesStrictComparable'), + toKey = require('./_toKey'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function(object) { + var objValue = get(object, path); + return (objValue === undefined && objValue === srcValue) + ? hasIn(object, path) + : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; +} + +module.exports = baseMatchesProperty; diff --git a/node_modules/lodash/_baseMean.js b/node_modules/lodash/_baseMean.js new file mode 100644 index 00000000..fa9e00a0 --- /dev/null +++ b/node_modules/lodash/_baseMean.js @@ -0,0 +1,20 @@ +var baseSum = require('./_baseSum'); + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** + * The base implementation of `_.mean` and `_.meanBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the mean. + */ +function baseMean(array, iteratee) { + var length = array == null ? 0 : array.length; + return length ? (baseSum(array, iteratee) / length) : NAN; +} + +module.exports = baseMean; diff --git a/node_modules/lodash/_baseMerge.js b/node_modules/lodash/_baseMerge.js new file mode 100644 index 00000000..c98b5eb0 --- /dev/null +++ b/node_modules/lodash/_baseMerge.js @@ -0,0 +1,42 @@ +var Stack = require('./_Stack'), + assignMergeValue = require('./_assignMergeValue'), + baseFor = require('./_baseFor'), + baseMergeDeep = require('./_baseMergeDeep'), + isObject = require('./isObject'), + keysIn = require('./keysIn'), + safeGet = require('./_safeGet'); + +/** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor(source, function(srcValue, key) { + stack || (stack = new Stack); + if (isObject(srcValue)) { + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, keysIn); +} + +module.exports = baseMerge; diff --git a/node_modules/lodash/_baseMergeDeep.js b/node_modules/lodash/_baseMergeDeep.js new file mode 100644 index 00000000..4679e8dc --- /dev/null +++ b/node_modules/lodash/_baseMergeDeep.js @@ -0,0 +1,94 @@ +var assignMergeValue = require('./_assignMergeValue'), + cloneBuffer = require('./_cloneBuffer'), + cloneTypedArray = require('./_cloneTypedArray'), + copyArray = require('./_copyArray'), + initCloneObject = require('./_initCloneObject'), + isArguments = require('./isArguments'), + isArray = require('./isArray'), + isArrayLikeObject = require('./isArrayLikeObject'), + isBuffer = require('./isBuffer'), + isFunction = require('./isFunction'), + isObject = require('./isObject'), + isPlainObject = require('./isPlainObject'), + isTypedArray = require('./isTypedArray'), + safeGet = require('./_safeGet'), + toPlainObject = require('./toPlainObject'); + +/** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object, key), + srcValue = safeGet(source, key), + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } + else { + newValue = []; + } + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || isFunction(objValue)) { + newValue = initCloneObject(srcValue); + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); +} + +module.exports = baseMergeDeep; diff --git a/node_modules/lodash/_baseNth.js b/node_modules/lodash/_baseNth.js new file mode 100644 index 00000000..0403c2a3 --- /dev/null +++ b/node_modules/lodash/_baseNth.js @@ -0,0 +1,20 @@ +var isIndex = require('./_isIndex'); + +/** + * The base implementation of `_.nth` which doesn't coerce arguments. + * + * @private + * @param {Array} array The array to query. + * @param {number} n The index of the element to return. + * @returns {*} Returns the nth element of `array`. + */ +function baseNth(array, n) { + var length = array.length; + if (!length) { + return; + } + n += n < 0 ? length : 0; + return isIndex(n, length) ? array[n] : undefined; +} + +module.exports = baseNth; diff --git a/node_modules/lodash/_baseOrderBy.js b/node_modules/lodash/_baseOrderBy.js new file mode 100644 index 00000000..d8a46ab2 --- /dev/null +++ b/node_modules/lodash/_baseOrderBy.js @@ -0,0 +1,34 @@ +var arrayMap = require('./_arrayMap'), + baseIteratee = require('./_baseIteratee'), + baseMap = require('./_baseMap'), + baseSortBy = require('./_baseSortBy'), + baseUnary = require('./_baseUnary'), + compareMultiple = require('./_compareMultiple'), + identity = require('./identity'); + +/** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ +function baseOrderBy(collection, iteratees, orders) { + var index = -1; + iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee)); + + var result = baseMap(collection, function(value, key, collection) { + var criteria = arrayMap(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); +} + +module.exports = baseOrderBy; diff --git a/node_modules/lodash/_basePick.js b/node_modules/lodash/_basePick.js new file mode 100644 index 00000000..09b458a6 --- /dev/null +++ b/node_modules/lodash/_basePick.js @@ -0,0 +1,19 @@ +var basePickBy = require('./_basePickBy'), + hasIn = require('./hasIn'); + +/** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ +function basePick(object, paths) { + return basePickBy(object, paths, function(value, path) { + return hasIn(object, path); + }); +} + +module.exports = basePick; diff --git a/node_modules/lodash/_basePickBy.js b/node_modules/lodash/_basePickBy.js new file mode 100644 index 00000000..85be68c8 --- /dev/null +++ b/node_modules/lodash/_basePickBy.js @@ -0,0 +1,30 @@ +var baseGet = require('./_baseGet'), + baseSet = require('./_baseSet'), + castPath = require('./_castPath'); + +/** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ +function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = baseGet(object, path); + + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); + } + } + return result; +} + +module.exports = basePickBy; diff --git a/node_modules/lodash/_baseProperty.js b/node_modules/lodash/_baseProperty.js new file mode 100644 index 00000000..496281ec --- /dev/null +++ b/node_modules/lodash/_baseProperty.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +module.exports = baseProperty; diff --git a/node_modules/lodash/_basePropertyDeep.js b/node_modules/lodash/_basePropertyDeep.js new file mode 100644 index 00000000..1e5aae50 --- /dev/null +++ b/node_modules/lodash/_basePropertyDeep.js @@ -0,0 +1,16 @@ +var baseGet = require('./_baseGet'); + +/** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; +} + +module.exports = basePropertyDeep; diff --git a/node_modules/lodash/_basePropertyOf.js b/node_modules/lodash/_basePropertyOf.js new file mode 100644 index 00000000..46173999 --- /dev/null +++ b/node_modules/lodash/_basePropertyOf.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; +} + +module.exports = basePropertyOf; diff --git a/node_modules/lodash/_basePullAll.js b/node_modules/lodash/_basePullAll.js new file mode 100644 index 00000000..305720ed --- /dev/null +++ b/node_modules/lodash/_basePullAll.js @@ -0,0 +1,51 @@ +var arrayMap = require('./_arrayMap'), + baseIndexOf = require('./_baseIndexOf'), + baseIndexOfWith = require('./_baseIndexOfWith'), + baseUnary = require('./_baseUnary'), + copyArray = require('./_copyArray'); + +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/** Built-in value references. */ +var splice = arrayProto.splice; + +/** + * The base implementation of `_.pullAllBy` without support for iteratee + * shorthands. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + */ +function basePullAll(array, values, iteratee, comparator) { + var indexOf = comparator ? baseIndexOfWith : baseIndexOf, + index = -1, + length = values.length, + seen = array; + + if (array === values) { + values = copyArray(values); + } + if (iteratee) { + seen = arrayMap(array, baseUnary(iteratee)); + } + while (++index < length) { + var fromIndex = 0, + value = values[index], + computed = iteratee ? iteratee(value) : value; + + while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { + if (seen !== array) { + splice.call(seen, fromIndex, 1); + } + splice.call(array, fromIndex, 1); + } + } + return array; +} + +module.exports = basePullAll; diff --git a/node_modules/lodash/_basePullAt.js b/node_modules/lodash/_basePullAt.js new file mode 100644 index 00000000..c3e9e710 --- /dev/null +++ b/node_modules/lodash/_basePullAt.js @@ -0,0 +1,37 @@ +var baseUnset = require('./_baseUnset'), + isIndex = require('./_isIndex'); + +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/** Built-in value references. */ +var splice = arrayProto.splice; + +/** + * The base implementation of `_.pullAt` without support for individual + * indexes or capturing the removed elements. + * + * @private + * @param {Array} array The array to modify. + * @param {number[]} indexes The indexes of elements to remove. + * @returns {Array} Returns `array`. + */ +function basePullAt(array, indexes) { + var length = array ? indexes.length : 0, + lastIndex = length - 1; + + while (length--) { + var index = indexes[length]; + if (length == lastIndex || index !== previous) { + var previous = index; + if (isIndex(index)) { + splice.call(array, index, 1); + } else { + baseUnset(array, index); + } + } + } + return array; +} + +module.exports = basePullAt; diff --git a/node_modules/lodash/_baseRandom.js b/node_modules/lodash/_baseRandom.js new file mode 100644 index 00000000..94f76a76 --- /dev/null +++ b/node_modules/lodash/_baseRandom.js @@ -0,0 +1,18 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeFloor = Math.floor, + nativeRandom = Math.random; + +/** + * The base implementation of `_.random` without support for returning + * floating-point numbers. + * + * @private + * @param {number} lower The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the random number. + */ +function baseRandom(lower, upper) { + return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); +} + +module.exports = baseRandom; diff --git a/node_modules/lodash/_baseRange.js b/node_modules/lodash/_baseRange.js new file mode 100644 index 00000000..0fb8e419 --- /dev/null +++ b/node_modules/lodash/_baseRange.js @@ -0,0 +1,28 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil, + nativeMax = Math.max; + +/** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ +function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; +} + +module.exports = baseRange; diff --git a/node_modules/lodash/_baseReduce.js b/node_modules/lodash/_baseReduce.js new file mode 100644 index 00000000..5a1f8b57 --- /dev/null +++ b/node_modules/lodash/_baseReduce.js @@ -0,0 +1,23 @@ +/** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ +function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; +} + +module.exports = baseReduce; diff --git a/node_modules/lodash/_baseRepeat.js b/node_modules/lodash/_baseRepeat.js new file mode 100644 index 00000000..ee44c31a --- /dev/null +++ b/node_modules/lodash/_baseRepeat.js @@ -0,0 +1,35 @@ +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeFloor = Math.floor; + +/** + * The base implementation of `_.repeat` which doesn't coerce arguments. + * + * @private + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. + */ +function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + + return result; +} + +module.exports = baseRepeat; diff --git a/node_modules/lodash/_baseRest.js b/node_modules/lodash/_baseRest.js new file mode 100644 index 00000000..d0dc4bdd --- /dev/null +++ b/node_modules/lodash/_baseRest.js @@ -0,0 +1,17 @@ +var identity = require('./identity'), + overRest = require('./_overRest'), + setToString = require('./_setToString'); + +/** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ +function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); +} + +module.exports = baseRest; diff --git a/node_modules/lodash/_baseSample.js b/node_modules/lodash/_baseSample.js new file mode 100644 index 00000000..58582b91 --- /dev/null +++ b/node_modules/lodash/_baseSample.js @@ -0,0 +1,15 @@ +var arraySample = require('./_arraySample'), + values = require('./values'); + +/** + * The base implementation of `_.sample`. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + */ +function baseSample(collection) { + return arraySample(values(collection)); +} + +module.exports = baseSample; diff --git a/node_modules/lodash/_baseSampleSize.js b/node_modules/lodash/_baseSampleSize.js new file mode 100644 index 00000000..5c90ec51 --- /dev/null +++ b/node_modules/lodash/_baseSampleSize.js @@ -0,0 +1,18 @@ +var baseClamp = require('./_baseClamp'), + shuffleSelf = require('./_shuffleSelf'), + values = require('./values'); + +/** + * The base implementation of `_.sampleSize` without param guards. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ +function baseSampleSize(collection, n) { + var array = values(collection); + return shuffleSelf(array, baseClamp(n, 0, array.length)); +} + +module.exports = baseSampleSize; diff --git a/node_modules/lodash/_baseSet.js b/node_modules/lodash/_baseSet.js new file mode 100644 index 00000000..612a24cc --- /dev/null +++ b/node_modules/lodash/_baseSet.js @@ -0,0 +1,47 @@ +var assignValue = require('./_assignValue'), + castPath = require('./_castPath'), + isIndex = require('./_isIndex'), + isObject = require('./isObject'), + toKey = require('./_toKey'); + +/** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ +function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = castPath(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; +} + +module.exports = baseSet; diff --git a/node_modules/lodash/_baseSetData.js b/node_modules/lodash/_baseSetData.js new file mode 100644 index 00000000..c409947d --- /dev/null +++ b/node_modules/lodash/_baseSetData.js @@ -0,0 +1,17 @@ +var identity = require('./identity'), + metaMap = require('./_metaMap'); + +/** + * The base implementation of `setData` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ +var baseSetData = !metaMap ? identity : function(func, data) { + metaMap.set(func, data); + return func; +}; + +module.exports = baseSetData; diff --git a/node_modules/lodash/_baseSetToString.js b/node_modules/lodash/_baseSetToString.js new file mode 100644 index 00000000..89eaca38 --- /dev/null +++ b/node_modules/lodash/_baseSetToString.js @@ -0,0 +1,22 @@ +var constant = require('./constant'), + defineProperty = require('./_defineProperty'), + identity = require('./identity'); + +/** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); +}; + +module.exports = baseSetToString; diff --git a/node_modules/lodash/_baseShuffle.js b/node_modules/lodash/_baseShuffle.js new file mode 100644 index 00000000..023077ac --- /dev/null +++ b/node_modules/lodash/_baseShuffle.js @@ -0,0 +1,15 @@ +var shuffleSelf = require('./_shuffleSelf'), + values = require('./values'); + +/** + * The base implementation of `_.shuffle`. + * + * @private + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + */ +function baseShuffle(collection) { + return shuffleSelf(values(collection)); +} + +module.exports = baseShuffle; diff --git a/node_modules/lodash/_baseSlice.js b/node_modules/lodash/_baseSlice.js new file mode 100644 index 00000000..786f6c99 --- /dev/null +++ b/node_modules/lodash/_baseSlice.js @@ -0,0 +1,31 @@ +/** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ +function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; +} + +module.exports = baseSlice; diff --git a/node_modules/lodash/_baseSome.js b/node_modules/lodash/_baseSome.js new file mode 100644 index 00000000..58f3f447 --- /dev/null +++ b/node_modules/lodash/_baseSome.js @@ -0,0 +1,22 @@ +var baseEach = require('./_baseEach'); + +/** + * The base implementation of `_.some` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function baseSome(collection, predicate) { + var result; + + baseEach(collection, function(value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; +} + +module.exports = baseSome; diff --git a/node_modules/lodash/_baseSortBy.js b/node_modules/lodash/_baseSortBy.js new file mode 100644 index 00000000..a25c92ed --- /dev/null +++ b/node_modules/lodash/_baseSortBy.js @@ -0,0 +1,21 @@ +/** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ +function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; +} + +module.exports = baseSortBy; diff --git a/node_modules/lodash/_baseSortedIndex.js b/node_modules/lodash/_baseSortedIndex.js new file mode 100644 index 00000000..638c366c --- /dev/null +++ b/node_modules/lodash/_baseSortedIndex.js @@ -0,0 +1,42 @@ +var baseSortedIndexBy = require('./_baseSortedIndexBy'), + identity = require('./identity'), + isSymbol = require('./isSymbol'); + +/** Used as references for the maximum length and index of an array. */ +var MAX_ARRAY_LENGTH = 4294967295, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + +/** + * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which + * performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ +function baseSortedIndex(array, value, retHighest) { + var low = 0, + high = array == null ? low : array.length; + + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; + + if (computed !== null && !isSymbol(computed) && + (retHighest ? (computed <= value) : (computed < value))) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return baseSortedIndexBy(array, value, identity, retHighest); +} + +module.exports = baseSortedIndex; diff --git a/node_modules/lodash/_baseSortedIndexBy.js b/node_modules/lodash/_baseSortedIndexBy.js new file mode 100644 index 00000000..bb22e36d --- /dev/null +++ b/node_modules/lodash/_baseSortedIndexBy.js @@ -0,0 +1,64 @@ +var isSymbol = require('./isSymbol'); + +/** Used as references for the maximum length and index of an array. */ +var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeFloor = Math.floor, + nativeMin = Math.min; + +/** + * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` + * which invokes `iteratee` for `value` and each element of `array` to compute + * their sort ranking. The iteratee is invoked with one argument; (value). + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The iteratee invoked per element. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ +function baseSortedIndexBy(array, value, iteratee, retHighest) { + value = iteratee(value); + + var low = 0, + high = array == null ? 0 : array.length, + valIsNaN = value !== value, + valIsNull = value === null, + valIsSymbol = isSymbol(value), + valIsUndefined = value === undefined; + + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + othIsDefined = computed !== undefined, + othIsNull = computed === null, + othIsReflexive = computed === computed, + othIsSymbol = isSymbol(computed); + + if (valIsNaN) { + var setLow = retHighest || othIsReflexive; + } else if (valIsUndefined) { + setLow = othIsReflexive && (retHighest || othIsDefined); + } else if (valIsNull) { + setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); + } else if (valIsSymbol) { + setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); + } else if (othIsNull || othIsSymbol) { + setLow = false; + } else { + setLow = retHighest ? (computed <= value) : (computed < value); + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); +} + +module.exports = baseSortedIndexBy; diff --git a/node_modules/lodash/_baseSortedUniq.js b/node_modules/lodash/_baseSortedUniq.js new file mode 100644 index 00000000..802159a3 --- /dev/null +++ b/node_modules/lodash/_baseSortedUniq.js @@ -0,0 +1,30 @@ +var eq = require('./eq'); + +/** + * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ +function baseSortedUniq(array, iteratee) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + if (!index || !eq(computed, seen)) { + var seen = computed; + result[resIndex++] = value === 0 ? 0 : value; + } + } + return result; +} + +module.exports = baseSortedUniq; diff --git a/node_modules/lodash/_baseSum.js b/node_modules/lodash/_baseSum.js new file mode 100644 index 00000000..a9e84c13 --- /dev/null +++ b/node_modules/lodash/_baseSum.js @@ -0,0 +1,24 @@ +/** + * The base implementation of `_.sum` and `_.sumBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ +function baseSum(array, iteratee) { + var result, + index = -1, + length = array.length; + + while (++index < length) { + var current = iteratee(array[index]); + if (current !== undefined) { + result = result === undefined ? current : (result + current); + } + } + return result; +} + +module.exports = baseSum; diff --git a/node_modules/lodash/_baseTimes.js b/node_modules/lodash/_baseTimes.js new file mode 100644 index 00000000..0603fc37 --- /dev/null +++ b/node_modules/lodash/_baseTimes.js @@ -0,0 +1,20 @@ +/** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} + +module.exports = baseTimes; diff --git a/node_modules/lodash/_baseToNumber.js b/node_modules/lodash/_baseToNumber.js new file mode 100644 index 00000000..04859f39 --- /dev/null +++ b/node_modules/lodash/_baseToNumber.js @@ -0,0 +1,24 @@ +var isSymbol = require('./isSymbol'); + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** + * The base implementation of `_.toNumber` which doesn't ensure correct + * conversions of binary, hexadecimal, or octal string values. + * + * @private + * @param {*} value The value to process. + * @returns {number} Returns the number. + */ +function baseToNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + return +value; +} + +module.exports = baseToNumber; diff --git a/node_modules/lodash/_baseToPairs.js b/node_modules/lodash/_baseToPairs.js new file mode 100644 index 00000000..bff19912 --- /dev/null +++ b/node_modules/lodash/_baseToPairs.js @@ -0,0 +1,18 @@ +var arrayMap = require('./_arrayMap'); + +/** + * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array + * of key-value pairs for `object` corresponding to the property names of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the key-value pairs. + */ +function baseToPairs(object, props) { + return arrayMap(props, function(key) { + return [key, object[key]]; + }); +} + +module.exports = baseToPairs; diff --git a/node_modules/lodash/_baseToString.js b/node_modules/lodash/_baseToString.js new file mode 100644 index 00000000..ada6ad29 --- /dev/null +++ b/node_modules/lodash/_baseToString.js @@ -0,0 +1,37 @@ +var Symbol = require('./_Symbol'), + arrayMap = require('./_arrayMap'), + isArray = require('./isArray'), + isSymbol = require('./isSymbol'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +module.exports = baseToString; diff --git a/node_modules/lodash/_baseUnary.js b/node_modules/lodash/_baseUnary.js new file mode 100644 index 00000000..98639e92 --- /dev/null +++ b/node_modules/lodash/_baseUnary.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ +function baseUnary(func) { + return function(value) { + return func(value); + }; +} + +module.exports = baseUnary; diff --git a/node_modules/lodash/_baseUniq.js b/node_modules/lodash/_baseUniq.js new file mode 100644 index 00000000..aea459dc --- /dev/null +++ b/node_modules/lodash/_baseUniq.js @@ -0,0 +1,72 @@ +var SetCache = require('./_SetCache'), + arrayIncludes = require('./_arrayIncludes'), + arrayIncludesWith = require('./_arrayIncludesWith'), + cacheHas = require('./_cacheHas'), + createSet = require('./_createSet'), + setToArray = require('./_setToArray'); + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ +function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} + +module.exports = baseUniq; diff --git a/node_modules/lodash/_baseUnset.js b/node_modules/lodash/_baseUnset.js new file mode 100644 index 00000000..eefc6e37 --- /dev/null +++ b/node_modules/lodash/_baseUnset.js @@ -0,0 +1,20 @@ +var castPath = require('./_castPath'), + last = require('./last'), + parent = require('./_parent'), + toKey = require('./_toKey'); + +/** + * The base implementation of `_.unset`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The property path to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + */ +function baseUnset(object, path) { + path = castPath(path, object); + object = parent(object, path); + return object == null || delete object[toKey(last(path))]; +} + +module.exports = baseUnset; diff --git a/node_modules/lodash/_baseUpdate.js b/node_modules/lodash/_baseUpdate.js new file mode 100644 index 00000000..92a62377 --- /dev/null +++ b/node_modules/lodash/_baseUpdate.js @@ -0,0 +1,18 @@ +var baseGet = require('./_baseGet'), + baseSet = require('./_baseSet'); + +/** + * The base implementation of `_.update`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to update. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ +function baseUpdate(object, path, updater, customizer) { + return baseSet(object, path, updater(baseGet(object, path)), customizer); +} + +module.exports = baseUpdate; diff --git a/node_modules/lodash/_baseValues.js b/node_modules/lodash/_baseValues.js new file mode 100644 index 00000000..b95faadc --- /dev/null +++ b/node_modules/lodash/_baseValues.js @@ -0,0 +1,19 @@ +var arrayMap = require('./_arrayMap'); + +/** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ +function baseValues(object, props) { + return arrayMap(props, function(key) { + return object[key]; + }); +} + +module.exports = baseValues; diff --git a/node_modules/lodash/_baseWhile.js b/node_modules/lodash/_baseWhile.js new file mode 100644 index 00000000..07eac61b --- /dev/null +++ b/node_modules/lodash/_baseWhile.js @@ -0,0 +1,26 @@ +var baseSlice = require('./_baseSlice'); + +/** + * The base implementation of methods like `_.dropWhile` and `_.takeWhile` + * without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to query. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [isDrop] Specify dropping elements instead of taking them. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the slice of `array`. + */ +function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length) && + predicate(array[index], index, array)) {} + + return isDrop + ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) + : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); +} + +module.exports = baseWhile; diff --git a/node_modules/lodash/_baseWrapperValue.js b/node_modules/lodash/_baseWrapperValue.js new file mode 100644 index 00000000..443e0df5 --- /dev/null +++ b/node_modules/lodash/_baseWrapperValue.js @@ -0,0 +1,25 @@ +var LazyWrapper = require('./_LazyWrapper'), + arrayPush = require('./_arrayPush'), + arrayReduce = require('./_arrayReduce'); + +/** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to perform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ +function baseWrapperValue(value, actions) { + var result = value; + if (result instanceof LazyWrapper) { + result = result.value(); + } + return arrayReduce(actions, function(result, action) { + return action.func.apply(action.thisArg, arrayPush([result], action.args)); + }, result); +} + +module.exports = baseWrapperValue; diff --git a/node_modules/lodash/_baseXor.js b/node_modules/lodash/_baseXor.js new file mode 100644 index 00000000..8e69338b --- /dev/null +++ b/node_modules/lodash/_baseXor.js @@ -0,0 +1,36 @@ +var baseDifference = require('./_baseDifference'), + baseFlatten = require('./_baseFlatten'), + baseUniq = require('./_baseUniq'); + +/** + * The base implementation of methods like `_.xor`, without support for + * iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of values. + */ +function baseXor(arrays, iteratee, comparator) { + var length = arrays.length; + if (length < 2) { + return length ? baseUniq(arrays[0]) : []; + } + var index = -1, + result = Array(length); + + while (++index < length) { + var array = arrays[index], + othIndex = -1; + + while (++othIndex < length) { + if (othIndex != index) { + result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); + } + } + } + return baseUniq(baseFlatten(result, 1), iteratee, comparator); +} + +module.exports = baseXor; diff --git a/node_modules/lodash/_baseZipObject.js b/node_modules/lodash/_baseZipObject.js new file mode 100644 index 00000000..401f85be --- /dev/null +++ b/node_modules/lodash/_baseZipObject.js @@ -0,0 +1,23 @@ +/** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ +function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; +} + +module.exports = baseZipObject; diff --git a/node_modules/lodash/_cacheHas.js b/node_modules/lodash/_cacheHas.js new file mode 100644 index 00000000..2dec8926 --- /dev/null +++ b/node_modules/lodash/_cacheHas.js @@ -0,0 +1,13 @@ +/** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function cacheHas(cache, key) { + return cache.has(key); +} + +module.exports = cacheHas; diff --git a/node_modules/lodash/_castArrayLikeObject.js b/node_modules/lodash/_castArrayLikeObject.js new file mode 100644 index 00000000..92c75fa1 --- /dev/null +++ b/node_modules/lodash/_castArrayLikeObject.js @@ -0,0 +1,14 @@ +var isArrayLikeObject = require('./isArrayLikeObject'); + +/** + * Casts `value` to an empty array if it's not an array like object. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array|Object} Returns the cast array-like object. + */ +function castArrayLikeObject(value) { + return isArrayLikeObject(value) ? value : []; +} + +module.exports = castArrayLikeObject; diff --git a/node_modules/lodash/_castFunction.js b/node_modules/lodash/_castFunction.js new file mode 100644 index 00000000..98c91ae6 --- /dev/null +++ b/node_modules/lodash/_castFunction.js @@ -0,0 +1,14 @@ +var identity = require('./identity'); + +/** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ +function castFunction(value) { + return typeof value == 'function' ? value : identity; +} + +module.exports = castFunction; diff --git a/node_modules/lodash/_castPath.js b/node_modules/lodash/_castPath.js new file mode 100644 index 00000000..017e4c1b --- /dev/null +++ b/node_modules/lodash/_castPath.js @@ -0,0 +1,21 @@ +var isArray = require('./isArray'), + isKey = require('./_isKey'), + stringToPath = require('./_stringToPath'), + toString = require('./toString'); + +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); +} + +module.exports = castPath; diff --git a/node_modules/lodash/_castRest.js b/node_modules/lodash/_castRest.js new file mode 100644 index 00000000..213c66f1 --- /dev/null +++ b/node_modules/lodash/_castRest.js @@ -0,0 +1,14 @@ +var baseRest = require('./_baseRest'); + +/** + * A `baseRest` alias which can be replaced with `identity` by module + * replacement plugins. + * + * @private + * @type {Function} + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ +var castRest = baseRest; + +module.exports = castRest; diff --git a/node_modules/lodash/_castSlice.js b/node_modules/lodash/_castSlice.js new file mode 100644 index 00000000..071faeba --- /dev/null +++ b/node_modules/lodash/_castSlice.js @@ -0,0 +1,18 @@ +var baseSlice = require('./_baseSlice'); + +/** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ +function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); +} + +module.exports = castSlice; diff --git a/node_modules/lodash/_charsEndIndex.js b/node_modules/lodash/_charsEndIndex.js new file mode 100644 index 00000000..07908ff3 --- /dev/null +++ b/node_modules/lodash/_charsEndIndex.js @@ -0,0 +1,19 @@ +var baseIndexOf = require('./_baseIndexOf'); + +/** + * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the last unmatched string symbol. + */ +function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; + + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; +} + +module.exports = charsEndIndex; diff --git a/node_modules/lodash/_charsStartIndex.js b/node_modules/lodash/_charsStartIndex.js new file mode 100644 index 00000000..b17afd25 --- /dev/null +++ b/node_modules/lodash/_charsStartIndex.js @@ -0,0 +1,20 @@ +var baseIndexOf = require('./_baseIndexOf'); + +/** + * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the first unmatched string symbol. + */ +function charsStartIndex(strSymbols, chrSymbols) { + var index = -1, + length = strSymbols.length; + + while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; +} + +module.exports = charsStartIndex; diff --git a/node_modules/lodash/_cloneArrayBuffer.js b/node_modules/lodash/_cloneArrayBuffer.js new file mode 100644 index 00000000..c3d8f6e3 --- /dev/null +++ b/node_modules/lodash/_cloneArrayBuffer.js @@ -0,0 +1,16 @@ +var Uint8Array = require('./_Uint8Array'); + +/** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ +function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; +} + +module.exports = cloneArrayBuffer; diff --git a/node_modules/lodash/_cloneBuffer.js b/node_modules/lodash/_cloneBuffer.js new file mode 100644 index 00000000..27c48109 --- /dev/null +++ b/node_modules/lodash/_cloneBuffer.js @@ -0,0 +1,35 @@ +var root = require('./_root'); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; + +/** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ +function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; +} + +module.exports = cloneBuffer; diff --git a/node_modules/lodash/_cloneDataView.js b/node_modules/lodash/_cloneDataView.js new file mode 100644 index 00000000..9c9b7b05 --- /dev/null +++ b/node_modules/lodash/_cloneDataView.js @@ -0,0 +1,16 @@ +var cloneArrayBuffer = require('./_cloneArrayBuffer'); + +/** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ +function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); +} + +module.exports = cloneDataView; diff --git a/node_modules/lodash/_cloneRegExp.js b/node_modules/lodash/_cloneRegExp.js new file mode 100644 index 00000000..64a30dfb --- /dev/null +++ b/node_modules/lodash/_cloneRegExp.js @@ -0,0 +1,17 @@ +/** Used to match `RegExp` flags from their coerced string values. */ +var reFlags = /\w*$/; + +/** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ +function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; +} + +module.exports = cloneRegExp; diff --git a/node_modules/lodash/_cloneSymbol.js b/node_modules/lodash/_cloneSymbol.js new file mode 100644 index 00000000..bede39f5 --- /dev/null +++ b/node_modules/lodash/_cloneSymbol.js @@ -0,0 +1,18 @@ +var Symbol = require('./_Symbol'); + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ +function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; +} + +module.exports = cloneSymbol; diff --git a/node_modules/lodash/_cloneTypedArray.js b/node_modules/lodash/_cloneTypedArray.js new file mode 100644 index 00000000..7aad84d4 --- /dev/null +++ b/node_modules/lodash/_cloneTypedArray.js @@ -0,0 +1,16 @@ +var cloneArrayBuffer = require('./_cloneArrayBuffer'); + +/** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ +function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); +} + +module.exports = cloneTypedArray; diff --git a/node_modules/lodash/_compareAscending.js b/node_modules/lodash/_compareAscending.js new file mode 100644 index 00000000..8dc27910 --- /dev/null +++ b/node_modules/lodash/_compareAscending.js @@ -0,0 +1,41 @@ +var isSymbol = require('./isSymbol'); + +/** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ +function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = isSymbol(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = isSymbol(other); + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; +} + +module.exports = compareAscending; diff --git a/node_modules/lodash/_compareMultiple.js b/node_modules/lodash/_compareMultiple.js new file mode 100644 index 00000000..ad61f0fb --- /dev/null +++ b/node_modules/lodash/_compareMultiple.js @@ -0,0 +1,44 @@ +var compareAscending = require('./_compareAscending'); + +/** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ +function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; +} + +module.exports = compareMultiple; diff --git a/node_modules/lodash/_composeArgs.js b/node_modules/lodash/_composeArgs.js new file mode 100644 index 00000000..1ce40f4f --- /dev/null +++ b/node_modules/lodash/_composeArgs.js @@ -0,0 +1,39 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates an array that is the composition of partially applied arguments, + * placeholders, and provided arguments into a single array of arguments. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to prepend to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ +function composeArgs(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersLength = holders.length, + leftIndex = -1, + leftLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(leftLength + rangeLength), + isUncurried = !isCurried; + + while (++leftIndex < leftLength) { + result[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[holders[argsIndex]] = args[argsIndex]; + } + } + while (rangeLength--) { + result[leftIndex++] = args[argsIndex++]; + } + return result; +} + +module.exports = composeArgs; diff --git a/node_modules/lodash/_composeArgsRight.js b/node_modules/lodash/_composeArgsRight.js new file mode 100644 index 00000000..8dc588d0 --- /dev/null +++ b/node_modules/lodash/_composeArgsRight.js @@ -0,0 +1,41 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * This function is like `composeArgs` except that the arguments composition + * is tailored for `_.partialRight`. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to append to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ +function composeArgsRight(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersIndex = -1, + holdersLength = holders.length, + rightIndex = -1, + rightLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(rangeLength + rightLength), + isUncurried = !isCurried; + + while (++argsIndex < rangeLength) { + result[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[offset + holders[holdersIndex]] = args[argsIndex++]; + } + } + return result; +} + +module.exports = composeArgsRight; diff --git a/node_modules/lodash/_copyArray.js b/node_modules/lodash/_copyArray.js new file mode 100644 index 00000000..cd94d5d0 --- /dev/null +++ b/node_modules/lodash/_copyArray.js @@ -0,0 +1,20 @@ +/** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ +function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; +} + +module.exports = copyArray; diff --git a/node_modules/lodash/_copyObject.js b/node_modules/lodash/_copyObject.js new file mode 100644 index 00000000..2f2a5c23 --- /dev/null +++ b/node_modules/lodash/_copyObject.js @@ -0,0 +1,40 @@ +var assignValue = require('./_assignValue'), + baseAssignValue = require('./_baseAssignValue'); + +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ +function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; +} + +module.exports = copyObject; diff --git a/node_modules/lodash/_copySymbols.js b/node_modules/lodash/_copySymbols.js new file mode 100644 index 00000000..c35944ab --- /dev/null +++ b/node_modules/lodash/_copySymbols.js @@ -0,0 +1,16 @@ +var copyObject = require('./_copyObject'), + getSymbols = require('./_getSymbols'); + +/** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); +} + +module.exports = copySymbols; diff --git a/node_modules/lodash/_copySymbolsIn.js b/node_modules/lodash/_copySymbolsIn.js new file mode 100644 index 00000000..fdf20a73 --- /dev/null +++ b/node_modules/lodash/_copySymbolsIn.js @@ -0,0 +1,16 @@ +var copyObject = require('./_copyObject'), + getSymbolsIn = require('./_getSymbolsIn'); + +/** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); +} + +module.exports = copySymbolsIn; diff --git a/node_modules/lodash/_coreJsData.js b/node_modules/lodash/_coreJsData.js new file mode 100644 index 00000000..f8e5b4e3 --- /dev/null +++ b/node_modules/lodash/_coreJsData.js @@ -0,0 +1,6 @@ +var root = require('./_root'); + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +module.exports = coreJsData; diff --git a/node_modules/lodash/_countHolders.js b/node_modules/lodash/_countHolders.js new file mode 100644 index 00000000..718fcdaa --- /dev/null +++ b/node_modules/lodash/_countHolders.js @@ -0,0 +1,21 @@ +/** + * Gets the number of `placeholder` occurrences in `array`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} placeholder The placeholder to search for. + * @returns {number} Returns the placeholder count. + */ +function countHolders(array, placeholder) { + var length = array.length, + result = 0; + + while (length--) { + if (array[length] === placeholder) { + ++result; + } + } + return result; +} + +module.exports = countHolders; diff --git a/node_modules/lodash/_createAggregator.js b/node_modules/lodash/_createAggregator.js new file mode 100644 index 00000000..0be42c41 --- /dev/null +++ b/node_modules/lodash/_createAggregator.js @@ -0,0 +1,23 @@ +var arrayAggregator = require('./_arrayAggregator'), + baseAggregator = require('./_baseAggregator'), + baseIteratee = require('./_baseIteratee'), + isArray = require('./isArray'); + +/** + * Creates a function like `_.groupBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} [initializer] The accumulator object initializer. + * @returns {Function} Returns the new aggregator function. + */ +function createAggregator(setter, initializer) { + return function(collection, iteratee) { + var func = isArray(collection) ? arrayAggregator : baseAggregator, + accumulator = initializer ? initializer() : {}; + + return func(collection, setter, baseIteratee(iteratee, 2), accumulator); + }; +} + +module.exports = createAggregator; diff --git a/node_modules/lodash/_createAssigner.js b/node_modules/lodash/_createAssigner.js new file mode 100644 index 00000000..1f904c51 --- /dev/null +++ b/node_modules/lodash/_createAssigner.js @@ -0,0 +1,37 @@ +var baseRest = require('./_baseRest'), + isIterateeCall = require('./_isIterateeCall'); + +/** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ +function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); +} + +module.exports = createAssigner; diff --git a/node_modules/lodash/_createBaseEach.js b/node_modules/lodash/_createBaseEach.js new file mode 100644 index 00000000..d24fdd1b --- /dev/null +++ b/node_modules/lodash/_createBaseEach.js @@ -0,0 +1,32 @@ +var isArrayLike = require('./isArrayLike'); + +/** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; +} + +module.exports = createBaseEach; diff --git a/node_modules/lodash/_createBaseFor.js b/node_modules/lodash/_createBaseFor.js new file mode 100644 index 00000000..94cbf297 --- /dev/null +++ b/node_modules/lodash/_createBaseFor.js @@ -0,0 +1,25 @@ +/** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; +} + +module.exports = createBaseFor; diff --git a/node_modules/lodash/_createBind.js b/node_modules/lodash/_createBind.js new file mode 100644 index 00000000..07cb99f4 --- /dev/null +++ b/node_modules/lodash/_createBind.js @@ -0,0 +1,28 @@ +var createCtor = require('./_createCtor'), + root = require('./_root'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1; + +/** + * Creates a function that wraps `func` to invoke it with the optional `this` + * binding of `thisArg`. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createBind(func, bitmask, thisArg) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(isBind ? thisArg : this, arguments); + } + return wrapper; +} + +module.exports = createBind; diff --git a/node_modules/lodash/_createCaseFirst.js b/node_modules/lodash/_createCaseFirst.js new file mode 100644 index 00000000..fe8ea483 --- /dev/null +++ b/node_modules/lodash/_createCaseFirst.js @@ -0,0 +1,33 @@ +var castSlice = require('./_castSlice'), + hasUnicode = require('./_hasUnicode'), + stringToArray = require('./_stringToArray'), + toString = require('./toString'); + +/** + * Creates a function like `_.lowerFirst`. + * + * @private + * @param {string} methodName The name of the `String` case method to use. + * @returns {Function} Returns the new case function. + */ +function createCaseFirst(methodName) { + return function(string) { + string = toString(string); + + var strSymbols = hasUnicode(string) + ? stringToArray(string) + : undefined; + + var chr = strSymbols + ? strSymbols[0] + : string.charAt(0); + + var trailing = strSymbols + ? castSlice(strSymbols, 1).join('') + : string.slice(1); + + return chr[methodName]() + trailing; + }; +} + +module.exports = createCaseFirst; diff --git a/node_modules/lodash/_createCompounder.js b/node_modules/lodash/_createCompounder.js new file mode 100644 index 00000000..8d4cee2c --- /dev/null +++ b/node_modules/lodash/_createCompounder.js @@ -0,0 +1,24 @@ +var arrayReduce = require('./_arrayReduce'), + deburr = require('./deburr'), + words = require('./words'); + +/** Used to compose unicode capture groups. */ +var rsApos = "['\u2019]"; + +/** Used to match apostrophes. */ +var reApos = RegExp(rsApos, 'g'); + +/** + * Creates a function like `_.camelCase`. + * + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. + */ +function createCompounder(callback) { + return function(string) { + return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); + }; +} + +module.exports = createCompounder; diff --git a/node_modules/lodash/_createCtor.js b/node_modules/lodash/_createCtor.js new file mode 100644 index 00000000..9047aa5f --- /dev/null +++ b/node_modules/lodash/_createCtor.js @@ -0,0 +1,37 @@ +var baseCreate = require('./_baseCreate'), + isObject = require('./isObject'); + +/** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ +function createCtor(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: return new Ctor; + case 1: return new Ctor(args[0]); + case 2: return new Ctor(args[0], args[1]); + case 3: return new Ctor(args[0], args[1], args[2]); + case 4: return new Ctor(args[0], args[1], args[2], args[3]); + case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; +} + +module.exports = createCtor; diff --git a/node_modules/lodash/_createCurry.js b/node_modules/lodash/_createCurry.js new file mode 100644 index 00000000..f06c2cdd --- /dev/null +++ b/node_modules/lodash/_createCurry.js @@ -0,0 +1,46 @@ +var apply = require('./_apply'), + createCtor = require('./_createCtor'), + createHybrid = require('./_createHybrid'), + createRecurry = require('./_createRecurry'), + getHolder = require('./_getHolder'), + replaceHolders = require('./_replaceHolders'), + root = require('./_root'); + +/** + * Creates a function that wraps `func` to enable currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {number} arity The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length, + placeholder = getHolder(wrapper); + + while (index--) { + args[index] = arguments[index]; + } + var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) + ? [] + : replaceHolders(args, placeholder); + + length -= holders.length; + if (length < arity) { + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, undefined, + args, holders, undefined, undefined, arity - length); + } + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return apply(fn, this, args); + } + return wrapper; +} + +module.exports = createCurry; diff --git a/node_modules/lodash/_createFind.js b/node_modules/lodash/_createFind.js new file mode 100644 index 00000000..8859ff89 --- /dev/null +++ b/node_modules/lodash/_createFind.js @@ -0,0 +1,25 @@ +var baseIteratee = require('./_baseIteratee'), + isArrayLike = require('./isArrayLike'), + keys = require('./keys'); + +/** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ +function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = baseIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; +} + +module.exports = createFind; diff --git a/node_modules/lodash/_createFlow.js b/node_modules/lodash/_createFlow.js new file mode 100644 index 00000000..baaddbf5 --- /dev/null +++ b/node_modules/lodash/_createFlow.js @@ -0,0 +1,78 @@ +var LodashWrapper = require('./_LodashWrapper'), + flatRest = require('./_flatRest'), + getData = require('./_getData'), + getFuncName = require('./_getFuncName'), + isArray = require('./isArray'), + isLaziable = require('./_isLaziable'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** Used to compose bitmasks for function metadata. */ +var WRAP_CURRY_FLAG = 8, + WRAP_PARTIAL_FLAG = 32, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256; + +/** + * Creates a `_.flow` or `_.flowRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. + */ +function createFlow(fromRight) { + return flatRest(function(funcs) { + var length = funcs.length, + index = length, + prereq = LodashWrapper.prototype.thru; + + if (fromRight) { + funcs.reverse(); + } + while (index--) { + var func = funcs[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (prereq && !wrapper && getFuncName(func) == 'wrapper') { + var wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? index : length; + while (++index < length) { + func = funcs[index]; + + var funcName = getFuncName(func), + data = funcName == 'wrapper' ? getData(func) : undefined; + + if (data && isLaziable(data[0]) && + data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && + !data[4].length && data[9] == 1 + ) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = (func.length == 1 && isLaziable(func)) + ? wrapper[funcName]() + : wrapper.thru(func); + } + } + return function() { + var args = arguments, + value = args[0]; + + if (wrapper && args.length == 1 && isArray(value)) { + return wrapper.plant(value).value(); + } + var index = 0, + result = length ? funcs[index].apply(this, args) : value; + + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; + }); +} + +module.exports = createFlow; diff --git a/node_modules/lodash/_createHybrid.js b/node_modules/lodash/_createHybrid.js new file mode 100644 index 00000000..b671bd11 --- /dev/null +++ b/node_modules/lodash/_createHybrid.js @@ -0,0 +1,92 @@ +var composeArgs = require('./_composeArgs'), + composeArgsRight = require('./_composeArgsRight'), + countHolders = require('./_countHolders'), + createCtor = require('./_createCtor'), + createRecurry = require('./_createRecurry'), + getHolder = require('./_getHolder'), + reorder = require('./_reorder'), + replaceHolders = require('./_replaceHolders'), + root = require('./_root'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_ARY_FLAG = 128, + WRAP_FLIP_FLAG = 512; + +/** + * Creates a function that wraps `func` to invoke it with optional `this` + * binding of `thisArg`, partial application, and currying. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided + * to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { + var isAry = bitmask & WRAP_ARY_FLAG, + isBind = bitmask & WRAP_BIND_FLAG, + isBindKey = bitmask & WRAP_BIND_KEY_FLAG, + isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), + isFlip = bitmask & WRAP_FLIP_FLAG, + Ctor = isBindKey ? undefined : createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length; + + while (index--) { + args[index] = arguments[index]; + } + if (isCurried) { + var placeholder = getHolder(wrapper), + holdersCount = countHolders(args, placeholder); + } + if (partials) { + args = composeArgs(args, partials, holders, isCurried); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight, isCurried); + } + length -= holdersCount; + if (isCurried && length < arity) { + var newHolders = replaceHolders(args, placeholder); + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, thisArg, + args, newHolders, argPos, ary, arity - length + ); + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; + + length = args.length; + if (argPos) { + args = reorder(args, argPos); + } else if (isFlip && length > 1) { + args.reverse(); + } + if (isAry && ary < length) { + args.length = ary; + } + if (this && this !== root && this instanceof wrapper) { + fn = Ctor || createCtor(fn); + } + return fn.apply(thisBinding, args); + } + return wrapper; +} + +module.exports = createHybrid; diff --git a/node_modules/lodash/_createInverter.js b/node_modules/lodash/_createInverter.js new file mode 100644 index 00000000..6c0c5629 --- /dev/null +++ b/node_modules/lodash/_createInverter.js @@ -0,0 +1,17 @@ +var baseInverter = require('./_baseInverter'); + +/** + * Creates a function like `_.invertBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} toIteratee The function to resolve iteratees. + * @returns {Function} Returns the new inverter function. + */ +function createInverter(setter, toIteratee) { + return function(object, iteratee) { + return baseInverter(object, setter, toIteratee(iteratee), {}); + }; +} + +module.exports = createInverter; diff --git a/node_modules/lodash/_createMathOperation.js b/node_modules/lodash/_createMathOperation.js new file mode 100644 index 00000000..f1e238ac --- /dev/null +++ b/node_modules/lodash/_createMathOperation.js @@ -0,0 +1,38 @@ +var baseToNumber = require('./_baseToNumber'), + baseToString = require('./_baseToString'); + +/** + * Creates a function that performs a mathematical operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. + * @returns {Function} Returns the new mathematical operation function. + */ +function createMathOperation(operator, defaultValue) { + return function(value, other) { + var result; + if (value === undefined && other === undefined) { + return defaultValue; + } + if (value !== undefined) { + result = value; + } + if (other !== undefined) { + if (result === undefined) { + return other; + } + if (typeof value == 'string' || typeof other == 'string') { + value = baseToString(value); + other = baseToString(other); + } else { + value = baseToNumber(value); + other = baseToNumber(other); + } + result = operator(value, other); + } + return result; + }; +} + +module.exports = createMathOperation; diff --git a/node_modules/lodash/_createOver.js b/node_modules/lodash/_createOver.js new file mode 100644 index 00000000..3b945516 --- /dev/null +++ b/node_modules/lodash/_createOver.js @@ -0,0 +1,27 @@ +var apply = require('./_apply'), + arrayMap = require('./_arrayMap'), + baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), + baseUnary = require('./_baseUnary'), + flatRest = require('./_flatRest'); + +/** + * Creates a function like `_.over`. + * + * @private + * @param {Function} arrayFunc The function to iterate over iteratees. + * @returns {Function} Returns the new over function. + */ +function createOver(arrayFunc) { + return flatRest(function(iteratees) { + iteratees = arrayMap(iteratees, baseUnary(baseIteratee)); + return baseRest(function(args) { + var thisArg = this; + return arrayFunc(iteratees, function(iteratee) { + return apply(iteratee, thisArg, args); + }); + }); + }); +} + +module.exports = createOver; diff --git a/node_modules/lodash/_createPadding.js b/node_modules/lodash/_createPadding.js new file mode 100644 index 00000000..2124612b --- /dev/null +++ b/node_modules/lodash/_createPadding.js @@ -0,0 +1,33 @@ +var baseRepeat = require('./_baseRepeat'), + baseToString = require('./_baseToString'), + castSlice = require('./_castSlice'), + hasUnicode = require('./_hasUnicode'), + stringSize = require('./_stringSize'), + stringToArray = require('./_stringToArray'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil; + +/** + * Creates the padding for `string` based on `length`. The `chars` string + * is truncated if the number of characters exceeds `length`. + * + * @private + * @param {number} length The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padding for `string`. + */ +function createPadding(length, chars) { + chars = chars === undefined ? ' ' : baseToString(chars); + + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; + } + var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); + return hasUnicode(chars) + ? castSlice(stringToArray(result), 0, length).join('') + : result.slice(0, length); +} + +module.exports = createPadding; diff --git a/node_modules/lodash/_createPartial.js b/node_modules/lodash/_createPartial.js new file mode 100644 index 00000000..e16c248b --- /dev/null +++ b/node_modules/lodash/_createPartial.js @@ -0,0 +1,43 @@ +var apply = require('./_apply'), + createCtor = require('./_createCtor'), + root = require('./_root'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1; + +/** + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to + * the new function. + * @returns {Function} Returns the new wrapped function. + */ +function createPartial(func, bitmask, thisArg, partials) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength), + fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return apply(fn, isBind ? thisArg : this, args); + } + return wrapper; +} + +module.exports = createPartial; diff --git a/node_modules/lodash/_createRange.js b/node_modules/lodash/_createRange.js new file mode 100644 index 00000000..9f52c779 --- /dev/null +++ b/node_modules/lodash/_createRange.js @@ -0,0 +1,30 @@ +var baseRange = require('./_baseRange'), + isIterateeCall = require('./_isIterateeCall'), + toFinite = require('./toFinite'); + +/** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ +function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); + return baseRange(start, end, step, fromRight); + }; +} + +module.exports = createRange; diff --git a/node_modules/lodash/_createRecurry.js b/node_modules/lodash/_createRecurry.js new file mode 100644 index 00000000..eb29fb24 --- /dev/null +++ b/node_modules/lodash/_createRecurry.js @@ -0,0 +1,56 @@ +var isLaziable = require('./_isLaziable'), + setData = require('./_setData'), + setWrapToString = require('./_setWrapToString'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64; + +/** + * Creates a function that wraps `func` to continue currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {Function} wrapFunc The function to create the `func` wrapper. + * @param {*} placeholder The placeholder value. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { + var isCurry = bitmask & WRAP_CURRY_FLAG, + newHolders = isCurry ? holders : undefined, + newHoldersRight = isCurry ? undefined : holders, + newPartials = isCurry ? partials : undefined, + newPartialsRight = isCurry ? undefined : partials; + + bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); + bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); + + if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { + bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); + } + var newData = [ + func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, + newHoldersRight, argPos, ary, arity + ]; + + var result = wrapFunc.apply(undefined, newData); + if (isLaziable(func)) { + setData(result, newData); + } + result.placeholder = placeholder; + return setWrapToString(result, func, bitmask); +} + +module.exports = createRecurry; diff --git a/node_modules/lodash/_createRelationalOperation.js b/node_modules/lodash/_createRelationalOperation.js new file mode 100644 index 00000000..a17c6b5e --- /dev/null +++ b/node_modules/lodash/_createRelationalOperation.js @@ -0,0 +1,20 @@ +var toNumber = require('./toNumber'); + +/** + * Creates a function that performs a relational operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @returns {Function} Returns the new relational operation function. + */ +function createRelationalOperation(operator) { + return function(value, other) { + if (!(typeof value == 'string' && typeof other == 'string')) { + value = toNumber(value); + other = toNumber(other); + } + return operator(value, other); + }; +} + +module.exports = createRelationalOperation; diff --git a/node_modules/lodash/_createRound.js b/node_modules/lodash/_createRound.js new file mode 100644 index 00000000..88be5df3 --- /dev/null +++ b/node_modules/lodash/_createRound.js @@ -0,0 +1,35 @@ +var root = require('./_root'), + toInteger = require('./toInteger'), + toNumber = require('./toNumber'), + toString = require('./toString'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsFinite = root.isFinite, + nativeMin = Math.min; + +/** + * Creates a function like `_.round`. + * + * @private + * @param {string} methodName The name of the `Math` method to use when rounding. + * @returns {Function} Returns the new round function. + */ +function createRound(methodName) { + var func = Math[methodName]; + return function(number, precision) { + number = toNumber(number); + precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); + if (precision && nativeIsFinite(number)) { + // Shift with exponential notation to avoid floating-point issues. + // See [MDN](https://mdn.io/round#Examples) for more details. + var pair = (toString(number) + 'e').split('e'), + value = func(pair[0] + 'e' + (+pair[1] + precision)); + + pair = (toString(value) + 'e').split('e'); + return +(pair[0] + 'e' + (+pair[1] - precision)); + } + return func(number); + }; +} + +module.exports = createRound; diff --git a/node_modules/lodash/_createSet.js b/node_modules/lodash/_createSet.js new file mode 100644 index 00000000..0f644eea --- /dev/null +++ b/node_modules/lodash/_createSet.js @@ -0,0 +1,19 @@ +var Set = require('./_Set'), + noop = require('./noop'), + setToArray = require('./_setToArray'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ +var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { + return new Set(values); +}; + +module.exports = createSet; diff --git a/node_modules/lodash/_createToPairs.js b/node_modules/lodash/_createToPairs.js new file mode 100644 index 00000000..568417af --- /dev/null +++ b/node_modules/lodash/_createToPairs.js @@ -0,0 +1,30 @@ +var baseToPairs = require('./_baseToPairs'), + getTag = require('./_getTag'), + mapToArray = require('./_mapToArray'), + setToPairs = require('./_setToPairs'); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + setTag = '[object Set]'; + +/** + * Creates a `_.toPairs` or `_.toPairsIn` function. + * + * @private + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. + */ +function createToPairs(keysFunc) { + return function(object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; +} + +module.exports = createToPairs; diff --git a/node_modules/lodash/_createWrap.js b/node_modules/lodash/_createWrap.js new file mode 100644 index 00000000..33f0633e --- /dev/null +++ b/node_modules/lodash/_createWrap.js @@ -0,0 +1,106 @@ +var baseSetData = require('./_baseSetData'), + createBind = require('./_createBind'), + createCurry = require('./_createCurry'), + createHybrid = require('./_createHybrid'), + createPartial = require('./_createPartial'), + getData = require('./_getData'), + mergeData = require('./_mergeData'), + setData = require('./_setData'), + setWrapToString = require('./_setWrapToString'), + toInteger = require('./toInteger'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * 512 - `_.flip` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); + arity = arity === undefined ? arity : toInteger(arity); + length -= holders ? holders.length : 0; + + if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; + + partials = holders = undefined; + } + var data = isBindKey ? undefined : getData(func); + + var newData = [ + func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, + argPos, ary, arity + ]; + + if (data) { + mergeData(newData, data); + } + func = newData[0]; + bitmask = newData[1]; + thisArg = newData[2]; + partials = newData[3]; + holders = newData[4]; + arity = newData[9] = newData[9] === undefined + ? (isBindKey ? 0 : func.length) + : nativeMax(newData[9] - length, 0); + + if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { + bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); + } + if (!bitmask || bitmask == WRAP_BIND_FLAG) { + var result = createBind(func, bitmask, thisArg); + } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { + result = createCurry(func, bitmask, arity); + } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { + result = createPartial(func, bitmask, thisArg, partials); + } else { + result = createHybrid.apply(undefined, newData); + } + var setter = data ? baseSetData : setData; + return setWrapToString(setter(result, newData), func, bitmask); +} + +module.exports = createWrap; diff --git a/node_modules/lodash/_customDefaultsAssignIn.js b/node_modules/lodash/_customDefaultsAssignIn.js new file mode 100644 index 00000000..1f49e6fc --- /dev/null +++ b/node_modules/lodash/_customDefaultsAssignIn.js @@ -0,0 +1,29 @@ +var eq = require('./eq'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used by `_.defaults` to customize its `_.assignIn` use to assign properties + * of source objects to the destination object for all destination properties + * that resolve to `undefined`. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to assign. + * @param {Object} object The parent object of `objValue`. + * @returns {*} Returns the value to assign. + */ +function customDefaultsAssignIn(objValue, srcValue, key, object) { + if (objValue === undefined || + (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { + return srcValue; + } + return objValue; +} + +module.exports = customDefaultsAssignIn; diff --git a/node_modules/lodash/_customDefaultsMerge.js b/node_modules/lodash/_customDefaultsMerge.js new file mode 100644 index 00000000..4cab3175 --- /dev/null +++ b/node_modules/lodash/_customDefaultsMerge.js @@ -0,0 +1,28 @@ +var baseMerge = require('./_baseMerge'), + isObject = require('./isObject'); + +/** + * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source + * objects into destination objects that are passed thru. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to merge. + * @param {Object} object The parent object of `objValue`. + * @param {Object} source The parent object of `srcValue`. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + * @returns {*} Returns the value to assign. + */ +function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { + if (isObject(objValue) && isObject(srcValue)) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); + stack['delete'](srcValue); + } + return objValue; +} + +module.exports = customDefaultsMerge; diff --git a/node_modules/lodash/_customOmitClone.js b/node_modules/lodash/_customOmitClone.js new file mode 100644 index 00000000..968db2ef --- /dev/null +++ b/node_modules/lodash/_customOmitClone.js @@ -0,0 +1,16 @@ +var isPlainObject = require('./isPlainObject'); + +/** + * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain + * objects. + * + * @private + * @param {*} value The value to inspect. + * @param {string} key The key of the property to inspect. + * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. + */ +function customOmitClone(value) { + return isPlainObject(value) ? undefined : value; +} + +module.exports = customOmitClone; diff --git a/node_modules/lodash/_deburrLetter.js b/node_modules/lodash/_deburrLetter.js new file mode 100644 index 00000000..3e531edc --- /dev/null +++ b/node_modules/lodash/_deburrLetter.js @@ -0,0 +1,71 @@ +var basePropertyOf = require('./_basePropertyOf'); + +/** Used to map Latin Unicode letters to basic Latin letters. */ +var deburredLetters = { + // Latin-1 Supplement block. + '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', + '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', + '\xc7': 'C', '\xe7': 'c', + '\xd0': 'D', '\xf0': 'd', + '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', + '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', + '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', + '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', + '\xd1': 'N', '\xf1': 'n', + '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', + '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', + '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', + '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', + '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', + '\xc6': 'Ae', '\xe6': 'ae', + '\xde': 'Th', '\xfe': 'th', + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', + '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', + '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', + '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', + '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', + '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', + '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', + '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', + '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', + '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', + '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', + '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', + '\u0134': 'J', '\u0135': 'j', + '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', + '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', + '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', + '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', + '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', + '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', + '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', + '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', + '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', + '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', + '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', + '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', + '\u0163': 't', '\u0165': 't', '\u0167': 't', + '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', + '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', + '\u0174': 'W', '\u0175': 'w', + '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', + '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', + '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', + '\u0132': 'IJ', '\u0133': 'ij', + '\u0152': 'Oe', '\u0153': 'oe', + '\u0149': "'n", '\u017f': 's' +}; + +/** + * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A + * letters to basic Latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ +var deburrLetter = basePropertyOf(deburredLetters); + +module.exports = deburrLetter; diff --git a/node_modules/lodash/_defineProperty.js b/node_modules/lodash/_defineProperty.js new file mode 100644 index 00000000..b6116d92 --- /dev/null +++ b/node_modules/lodash/_defineProperty.js @@ -0,0 +1,11 @@ +var getNative = require('./_getNative'); + +var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} +}()); + +module.exports = defineProperty; diff --git a/node_modules/lodash/_equalArrays.js b/node_modules/lodash/_equalArrays.js new file mode 100644 index 00000000..f6a3b7c9 --- /dev/null +++ b/node_modules/lodash/_equalArrays.js @@ -0,0 +1,83 @@ +var SetCache = require('./_SetCache'), + arraySome = require('./_arraySome'), + cacheHas = require('./_cacheHas'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ +function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; +} + +module.exports = equalArrays; diff --git a/node_modules/lodash/_equalByTag.js b/node_modules/lodash/_equalByTag.js new file mode 100644 index 00000000..71919e86 --- /dev/null +++ b/node_modules/lodash/_equalByTag.js @@ -0,0 +1,112 @@ +var Symbol = require('./_Symbol'), + Uint8Array = require('./_Uint8Array'), + eq = require('./eq'), + equalArrays = require('./_equalArrays'), + mapToArray = require('./_mapToArray'), + setToArray = require('./_setToArray'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]'; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; +} + +module.exports = equalByTag; diff --git a/node_modules/lodash/_equalObjects.js b/node_modules/lodash/_equalObjects.js new file mode 100644 index 00000000..17421f37 --- /dev/null +++ b/node_modules/lodash/_equalObjects.js @@ -0,0 +1,89 @@ +var getAllKeys = require('./_getAllKeys'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked && stack.get(other)) { + return stacked == other; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; +} + +module.exports = equalObjects; diff --git a/node_modules/lodash/_escapeHtmlChar.js b/node_modules/lodash/_escapeHtmlChar.js new file mode 100644 index 00000000..7ca68ee6 --- /dev/null +++ b/node_modules/lodash/_escapeHtmlChar.js @@ -0,0 +1,21 @@ +var basePropertyOf = require('./_basePropertyOf'); + +/** Used to map characters to HTML entities. */ +var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' +}; + +/** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ +var escapeHtmlChar = basePropertyOf(htmlEscapes); + +module.exports = escapeHtmlChar; diff --git a/node_modules/lodash/_escapeStringChar.js b/node_modules/lodash/_escapeStringChar.js new file mode 100644 index 00000000..44eca96c --- /dev/null +++ b/node_modules/lodash/_escapeStringChar.js @@ -0,0 +1,22 @@ +/** Used to escape characters for inclusion in compiled string literals. */ +var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029' +}; + +/** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ +function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; +} + +module.exports = escapeStringChar; diff --git a/node_modules/lodash/_flatRest.js b/node_modules/lodash/_flatRest.js new file mode 100644 index 00000000..94ab6cca --- /dev/null +++ b/node_modules/lodash/_flatRest.js @@ -0,0 +1,16 @@ +var flatten = require('./flatten'), + overRest = require('./_overRest'), + setToString = require('./_setToString'); + +/** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ +function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); +} + +module.exports = flatRest; diff --git a/node_modules/lodash/_freeGlobal.js b/node_modules/lodash/_freeGlobal.js new file mode 100644 index 00000000..bbec998f --- /dev/null +++ b/node_modules/lodash/_freeGlobal.js @@ -0,0 +1,4 @@ +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +module.exports = freeGlobal; diff --git a/node_modules/lodash/_getAllKeys.js b/node_modules/lodash/_getAllKeys.js new file mode 100644 index 00000000..a9ce6995 --- /dev/null +++ b/node_modules/lodash/_getAllKeys.js @@ -0,0 +1,16 @@ +var baseGetAllKeys = require('./_baseGetAllKeys'), + getSymbols = require('./_getSymbols'), + keys = require('./keys'); + +/** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); +} + +module.exports = getAllKeys; diff --git a/node_modules/lodash/_getAllKeysIn.js b/node_modules/lodash/_getAllKeysIn.js new file mode 100644 index 00000000..1b466784 --- /dev/null +++ b/node_modules/lodash/_getAllKeysIn.js @@ -0,0 +1,17 @@ +var baseGetAllKeys = require('./_baseGetAllKeys'), + getSymbolsIn = require('./_getSymbolsIn'), + keysIn = require('./keysIn'); + +/** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); +} + +module.exports = getAllKeysIn; diff --git a/node_modules/lodash/_getData.js b/node_modules/lodash/_getData.js new file mode 100644 index 00000000..a1fe7b77 --- /dev/null +++ b/node_modules/lodash/_getData.js @@ -0,0 +1,15 @@ +var metaMap = require('./_metaMap'), + noop = require('./noop'); + +/** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ +var getData = !metaMap ? noop : function(func) { + return metaMap.get(func); +}; + +module.exports = getData; diff --git a/node_modules/lodash/_getFuncName.js b/node_modules/lodash/_getFuncName.js new file mode 100644 index 00000000..21e15b33 --- /dev/null +++ b/node_modules/lodash/_getFuncName.js @@ -0,0 +1,31 @@ +var realNames = require('./_realNames'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Gets the name of `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {string} Returns the function name. + */ +function getFuncName(func) { + var result = (func.name + ''), + array = realNames[result], + length = hasOwnProperty.call(realNames, result) ? array.length : 0; + + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result; +} + +module.exports = getFuncName; diff --git a/node_modules/lodash/_getHolder.js b/node_modules/lodash/_getHolder.js new file mode 100644 index 00000000..65e94b5c --- /dev/null +++ b/node_modules/lodash/_getHolder.js @@ -0,0 +1,13 @@ +/** + * Gets the argument placeholder value for `func`. + * + * @private + * @param {Function} func The function to inspect. + * @returns {*} Returns the placeholder value. + */ +function getHolder(func) { + var object = func; + return object.placeholder; +} + +module.exports = getHolder; diff --git a/node_modules/lodash/_getMapData.js b/node_modules/lodash/_getMapData.js new file mode 100644 index 00000000..17f63032 --- /dev/null +++ b/node_modules/lodash/_getMapData.js @@ -0,0 +1,18 @@ +var isKeyable = require('./_isKeyable'); + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +module.exports = getMapData; diff --git a/node_modules/lodash/_getMatchData.js b/node_modules/lodash/_getMatchData.js new file mode 100644 index 00000000..2cc70f91 --- /dev/null +++ b/node_modules/lodash/_getMatchData.js @@ -0,0 +1,24 @@ +var isStrictComparable = require('./_isStrictComparable'), + keys = require('./keys'); + +/** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ +function getMatchData(object) { + var result = keys(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; + } + return result; +} + +module.exports = getMatchData; diff --git a/node_modules/lodash/_getNative.js b/node_modules/lodash/_getNative.js new file mode 100644 index 00000000..97a622b8 --- /dev/null +++ b/node_modules/lodash/_getNative.js @@ -0,0 +1,17 @@ +var baseIsNative = require('./_baseIsNative'), + getValue = require('./_getValue'); + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +module.exports = getNative; diff --git a/node_modules/lodash/_getPrototype.js b/node_modules/lodash/_getPrototype.js new file mode 100644 index 00000000..e8086121 --- /dev/null +++ b/node_modules/lodash/_getPrototype.js @@ -0,0 +1,6 @@ +var overArg = require('./_overArg'); + +/** Built-in value references. */ +var getPrototype = overArg(Object.getPrototypeOf, Object); + +module.exports = getPrototype; diff --git a/node_modules/lodash/_getRawTag.js b/node_modules/lodash/_getRawTag.js new file mode 100644 index 00000000..49a95c9c --- /dev/null +++ b/node_modules/lodash/_getRawTag.js @@ -0,0 +1,46 @@ +var Symbol = require('./_Symbol'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ +function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; +} + +module.exports = getRawTag; diff --git a/node_modules/lodash/_getSymbols.js b/node_modules/lodash/_getSymbols.js new file mode 100644 index 00000000..7d6eafeb --- /dev/null +++ b/node_modules/lodash/_getSymbols.js @@ -0,0 +1,30 @@ +var arrayFilter = require('./_arrayFilter'), + stubArray = require('./stubArray'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); +}; + +module.exports = getSymbols; diff --git a/node_modules/lodash/_getSymbolsIn.js b/node_modules/lodash/_getSymbolsIn.js new file mode 100644 index 00000000..cec0855a --- /dev/null +++ b/node_modules/lodash/_getSymbolsIn.js @@ -0,0 +1,25 @@ +var arrayPush = require('./_arrayPush'), + getPrototype = require('./_getPrototype'), + getSymbols = require('./_getSymbols'), + stubArray = require('./stubArray'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); + } + return result; +}; + +module.exports = getSymbolsIn; diff --git a/node_modules/lodash/_getTag.js b/node_modules/lodash/_getTag.js new file mode 100644 index 00000000..deaf89d5 --- /dev/null +++ b/node_modules/lodash/_getTag.js @@ -0,0 +1,58 @@ +var DataView = require('./_DataView'), + Map = require('./_Map'), + Promise = require('./_Promise'), + Set = require('./_Set'), + WeakMap = require('./_WeakMap'), + baseGetTag = require('./_baseGetTag'), + toSource = require('./_toSource'); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + setTag = '[object Set]', + weakMapTag = '[object WeakMap]'; + +var dataViewTag = '[object DataView]'; + +/** Used to detect maps, sets, and weakmaps. */ +var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + +/** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +var getTag = baseGetTag; + +// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. +if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; +} + +module.exports = getTag; diff --git a/node_modules/lodash/_getValue.js b/node_modules/lodash/_getValue.js new file mode 100644 index 00000000..5f7d7736 --- /dev/null +++ b/node_modules/lodash/_getValue.js @@ -0,0 +1,13 @@ +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +module.exports = getValue; diff --git a/node_modules/lodash/_getView.js b/node_modules/lodash/_getView.js new file mode 100644 index 00000000..df1e5d44 --- /dev/null +++ b/node_modules/lodash/_getView.js @@ -0,0 +1,33 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Gets the view, applying any `transforms` to the `start` and `end` positions. + * + * @private + * @param {number} start The start of the view. + * @param {number} end The end of the view. + * @param {Array} transforms The transformations to apply to the view. + * @returns {Object} Returns an object containing the `start` and `end` + * positions of the view. + */ +function getView(start, end, transforms) { + var index = -1, + length = transforms.length; + + while (++index < length) { + var data = transforms[index], + size = data.size; + + switch (data.type) { + case 'drop': start += size; break; + case 'dropRight': end -= size; break; + case 'take': end = nativeMin(end, start + size); break; + case 'takeRight': start = nativeMax(start, end - size); break; + } + } + return { 'start': start, 'end': end }; +} + +module.exports = getView; diff --git a/node_modules/lodash/_getWrapDetails.js b/node_modules/lodash/_getWrapDetails.js new file mode 100644 index 00000000..3bcc6e48 --- /dev/null +++ b/node_modules/lodash/_getWrapDetails.js @@ -0,0 +1,17 @@ +/** Used to match wrap detail comments. */ +var reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, + reSplitDetails = /,? & /; + +/** + * Extracts wrapper details from the `source` body comment. + * + * @private + * @param {string} source The source to inspect. + * @returns {Array} Returns the wrapper details. + */ +function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; +} + +module.exports = getWrapDetails; diff --git a/node_modules/lodash/_hasPath.js b/node_modules/lodash/_hasPath.js new file mode 100644 index 00000000..93dbde15 --- /dev/null +++ b/node_modules/lodash/_hasPath.js @@ -0,0 +1,39 @@ +var castPath = require('./_castPath'), + isArguments = require('./isArguments'), + isArray = require('./isArray'), + isIndex = require('./_isIndex'), + isLength = require('./isLength'), + toKey = require('./_toKey'); + +/** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ +function hasPath(object, path, hasFunc) { + path = castPath(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && + (isArray(object) || isArguments(object)); +} + +module.exports = hasPath; diff --git a/node_modules/lodash/_hasUnicode.js b/node_modules/lodash/_hasUnicode.js new file mode 100644 index 00000000..cb6ca15f --- /dev/null +++ b/node_modules/lodash/_hasUnicode.js @@ -0,0 +1,26 @@ +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsZWJ = '\\u200d'; + +/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ +var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + +/** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ +function hasUnicode(string) { + return reHasUnicode.test(string); +} + +module.exports = hasUnicode; diff --git a/node_modules/lodash/_hasUnicodeWord.js b/node_modules/lodash/_hasUnicodeWord.js new file mode 100644 index 00000000..95d52c44 --- /dev/null +++ b/node_modules/lodash/_hasUnicodeWord.js @@ -0,0 +1,15 @@ +/** Used to detect strings that need a more robust regexp to match words. */ +var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + +/** + * Checks if `string` contains a word composed of Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a word is found, else `false`. + */ +function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); +} + +module.exports = hasUnicodeWord; diff --git a/node_modules/lodash/_hashClear.js b/node_modules/lodash/_hashClear.js new file mode 100644 index 00000000..5d4b70cc --- /dev/null +++ b/node_modules/lodash/_hashClear.js @@ -0,0 +1,15 @@ +var nativeCreate = require('./_nativeCreate'); + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; +} + +module.exports = hashClear; diff --git a/node_modules/lodash/_hashDelete.js b/node_modules/lodash/_hashDelete.js new file mode 100644 index 00000000..ea9dabf1 --- /dev/null +++ b/node_modules/lodash/_hashDelete.js @@ -0,0 +1,17 @@ +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; +} + +module.exports = hashDelete; diff --git a/node_modules/lodash/_hashGet.js b/node_modules/lodash/_hashGet.js new file mode 100644 index 00000000..1fc2f34b --- /dev/null +++ b/node_modules/lodash/_hashGet.js @@ -0,0 +1,30 @@ +var nativeCreate = require('./_nativeCreate'); + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +module.exports = hashGet; diff --git a/node_modules/lodash/_hashHas.js b/node_modules/lodash/_hashHas.js new file mode 100644 index 00000000..281a5517 --- /dev/null +++ b/node_modules/lodash/_hashHas.js @@ -0,0 +1,23 @@ +var nativeCreate = require('./_nativeCreate'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); +} + +module.exports = hashHas; diff --git a/node_modules/lodash/_hashSet.js b/node_modules/lodash/_hashSet.js new file mode 100644 index 00000000..e1055283 --- /dev/null +++ b/node_modules/lodash/_hashSet.js @@ -0,0 +1,23 @@ +var nativeCreate = require('./_nativeCreate'); + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +module.exports = hashSet; diff --git a/node_modules/lodash/_initCloneArray.js b/node_modules/lodash/_initCloneArray.js new file mode 100644 index 00000000..078c15af --- /dev/null +++ b/node_modules/lodash/_initCloneArray.js @@ -0,0 +1,26 @@ +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ +function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; +} + +module.exports = initCloneArray; diff --git a/node_modules/lodash/_initCloneByTag.js b/node_modules/lodash/_initCloneByTag.js new file mode 100644 index 00000000..f69a008c --- /dev/null +++ b/node_modules/lodash/_initCloneByTag.js @@ -0,0 +1,77 @@ +var cloneArrayBuffer = require('./_cloneArrayBuffer'), + cloneDataView = require('./_cloneDataView'), + cloneRegExp = require('./_cloneRegExp'), + cloneSymbol = require('./_cloneSymbol'), + cloneTypedArray = require('./_cloneTypedArray'); + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return new Ctor; + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return new Ctor; + + case symbolTag: + return cloneSymbol(object); + } +} + +module.exports = initCloneByTag; diff --git a/node_modules/lodash/_initCloneObject.js b/node_modules/lodash/_initCloneObject.js new file mode 100644 index 00000000..5a13e64a --- /dev/null +++ b/node_modules/lodash/_initCloneObject.js @@ -0,0 +1,18 @@ +var baseCreate = require('./_baseCreate'), + getPrototype = require('./_getPrototype'), + isPrototype = require('./_isPrototype'); + +/** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; +} + +module.exports = initCloneObject; diff --git a/node_modules/lodash/_insertWrapDetails.js b/node_modules/lodash/_insertWrapDetails.js new file mode 100644 index 00000000..e7908086 --- /dev/null +++ b/node_modules/lodash/_insertWrapDetails.js @@ -0,0 +1,23 @@ +/** Used to match wrap detail comments. */ +var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/; + +/** + * Inserts wrapper `details` in a comment at the top of the `source` body. + * + * @private + * @param {string} source The source to modify. + * @returns {Array} details The details to insert. + * @returns {string} Returns the modified source. + */ +function insertWrapDetails(source, details) { + var length = details.length; + if (!length) { + return source; + } + var lastIndex = length - 1; + details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; + details = details.join(length > 2 ? ', ' : ' '); + return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); +} + +module.exports = insertWrapDetails; diff --git a/node_modules/lodash/_isFlattenable.js b/node_modules/lodash/_isFlattenable.js new file mode 100644 index 00000000..4cc2c249 --- /dev/null +++ b/node_modules/lodash/_isFlattenable.js @@ -0,0 +1,20 @@ +var Symbol = require('./_Symbol'), + isArguments = require('./isArguments'), + isArray = require('./isArray'); + +/** Built-in value references. */ +var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; + +/** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ +function isFlattenable(value) { + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); +} + +module.exports = isFlattenable; diff --git a/node_modules/lodash/_isIndex.js b/node_modules/lodash/_isIndex.js new file mode 100644 index 00000000..061cd390 --- /dev/null +++ b/node_modules/lodash/_isIndex.js @@ -0,0 +1,25 @@ +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); +} + +module.exports = isIndex; diff --git a/node_modules/lodash/_isIterateeCall.js b/node_modules/lodash/_isIterateeCall.js new file mode 100644 index 00000000..a0bb5a9c --- /dev/null +++ b/node_modules/lodash/_isIterateeCall.js @@ -0,0 +1,30 @@ +var eq = require('./eq'), + isArrayLike = require('./isArrayLike'), + isIndex = require('./_isIndex'), + isObject = require('./isObject'); + +/** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ +function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; +} + +module.exports = isIterateeCall; diff --git a/node_modules/lodash/_isKey.js b/node_modules/lodash/_isKey.js new file mode 100644 index 00000000..ff08b068 --- /dev/null +++ b/node_modules/lodash/_isKey.js @@ -0,0 +1,29 @@ +var isArray = require('./isArray'), + isSymbol = require('./isSymbol'); + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); +} + +module.exports = isKey; diff --git a/node_modules/lodash/_isKeyable.js b/node_modules/lodash/_isKeyable.js new file mode 100644 index 00000000..39f1828d --- /dev/null +++ b/node_modules/lodash/_isKeyable.js @@ -0,0 +1,15 @@ +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +module.exports = isKeyable; diff --git a/node_modules/lodash/_isLaziable.js b/node_modules/lodash/_isLaziable.js new file mode 100644 index 00000000..a57c4f2d --- /dev/null +++ b/node_modules/lodash/_isLaziable.js @@ -0,0 +1,28 @@ +var LazyWrapper = require('./_LazyWrapper'), + getData = require('./_getData'), + getFuncName = require('./_getFuncName'), + lodash = require('./wrapperLodash'); + +/** + * Checks if `func` has a lazy counterpart. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, + * else `false`. + */ +function isLaziable(func) { + var funcName = getFuncName(func), + other = lodash[funcName]; + + if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { + return false; + } + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; +} + +module.exports = isLaziable; diff --git a/node_modules/lodash/_isMaskable.js b/node_modules/lodash/_isMaskable.js new file mode 100644 index 00000000..eb98d09f --- /dev/null +++ b/node_modules/lodash/_isMaskable.js @@ -0,0 +1,14 @@ +var coreJsData = require('./_coreJsData'), + isFunction = require('./isFunction'), + stubFalse = require('./stubFalse'); + +/** + * Checks if `func` is capable of being masked. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `func` is maskable, else `false`. + */ +var isMaskable = coreJsData ? isFunction : stubFalse; + +module.exports = isMaskable; diff --git a/node_modules/lodash/_isMasked.js b/node_modules/lodash/_isMasked.js new file mode 100644 index 00000000..4b0f21ba --- /dev/null +++ b/node_modules/lodash/_isMasked.js @@ -0,0 +1,20 @@ +var coreJsData = require('./_coreJsData'); + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +module.exports = isMasked; diff --git a/node_modules/lodash/_isPrototype.js b/node_modules/lodash/_isPrototype.js new file mode 100644 index 00000000..0f29498d --- /dev/null +++ b/node_modules/lodash/_isPrototype.js @@ -0,0 +1,18 @@ +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; +} + +module.exports = isPrototype; diff --git a/node_modules/lodash/_isStrictComparable.js b/node_modules/lodash/_isStrictComparable.js new file mode 100644 index 00000000..b59f40b8 --- /dev/null +++ b/node_modules/lodash/_isStrictComparable.js @@ -0,0 +1,15 @@ +var isObject = require('./isObject'); + +/** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ +function isStrictComparable(value) { + return value === value && !isObject(value); +} + +module.exports = isStrictComparable; diff --git a/node_modules/lodash/_iteratorToArray.js b/node_modules/lodash/_iteratorToArray.js new file mode 100644 index 00000000..47685664 --- /dev/null +++ b/node_modules/lodash/_iteratorToArray.js @@ -0,0 +1,18 @@ +/** + * Converts `iterator` to an array. + * + * @private + * @param {Object} iterator The iterator to convert. + * @returns {Array} Returns the converted array. + */ +function iteratorToArray(iterator) { + var data, + result = []; + + while (!(data = iterator.next()).done) { + result.push(data.value); + } + return result; +} + +module.exports = iteratorToArray; diff --git a/node_modules/lodash/_lazyClone.js b/node_modules/lodash/_lazyClone.js new file mode 100644 index 00000000..d8a51f87 --- /dev/null +++ b/node_modules/lodash/_lazyClone.js @@ -0,0 +1,23 @@ +var LazyWrapper = require('./_LazyWrapper'), + copyArray = require('./_copyArray'); + +/** + * Creates a clone of the lazy wrapper object. + * + * @private + * @name clone + * @memberOf LazyWrapper + * @returns {Object} Returns the cloned `LazyWrapper` object. + */ +function lazyClone() { + var result = new LazyWrapper(this.__wrapped__); + result.__actions__ = copyArray(this.__actions__); + result.__dir__ = this.__dir__; + result.__filtered__ = this.__filtered__; + result.__iteratees__ = copyArray(this.__iteratees__); + result.__takeCount__ = this.__takeCount__; + result.__views__ = copyArray(this.__views__); + return result; +} + +module.exports = lazyClone; diff --git a/node_modules/lodash/_lazyReverse.js b/node_modules/lodash/_lazyReverse.js new file mode 100644 index 00000000..c5b52190 --- /dev/null +++ b/node_modules/lodash/_lazyReverse.js @@ -0,0 +1,23 @@ +var LazyWrapper = require('./_LazyWrapper'); + +/** + * Reverses the direction of lazy iteration. + * + * @private + * @name reverse + * @memberOf LazyWrapper + * @returns {Object} Returns the new reversed `LazyWrapper` object. + */ +function lazyReverse() { + if (this.__filtered__) { + var result = new LazyWrapper(this); + result.__dir__ = -1; + result.__filtered__ = true; + } else { + result = this.clone(); + result.__dir__ *= -1; + } + return result; +} + +module.exports = lazyReverse; diff --git a/node_modules/lodash/_lazyValue.js b/node_modules/lodash/_lazyValue.js new file mode 100644 index 00000000..371ca8d2 --- /dev/null +++ b/node_modules/lodash/_lazyValue.js @@ -0,0 +1,69 @@ +var baseWrapperValue = require('./_baseWrapperValue'), + getView = require('./_getView'), + isArray = require('./isArray'); + +/** Used to indicate the type of lazy iteratees. */ +var LAZY_FILTER_FLAG = 1, + LAZY_MAP_FLAG = 2; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * Extracts the unwrapped value from its lazy wrapper. + * + * @private + * @name value + * @memberOf LazyWrapper + * @returns {*} Returns the unwrapped value. + */ +function lazyValue() { + var array = this.__wrapped__.value(), + dir = this.__dir__, + isArr = isArray(array), + isRight = dir < 0, + arrLength = isArr ? array.length : 0, + view = getView(0, arrLength, this.__views__), + start = view.start, + end = view.end, + length = end - start, + index = isRight ? end : (start - 1), + iteratees = this.__iteratees__, + iterLength = iteratees.length, + resIndex = 0, + takeCount = nativeMin(length, this.__takeCount__); + + if (!isArr || (!isRight && arrLength == length && takeCount == length)) { + return baseWrapperValue(array, this.__actions__); + } + var result = []; + + outer: + while (length-- && resIndex < takeCount) { + index += dir; + + var iterIndex = -1, + value = array[index]; + + while (++iterIndex < iterLength) { + var data = iteratees[iterIndex], + iteratee = data.iteratee, + type = data.type, + computed = iteratee(value); + + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } + } + } + result[resIndex++] = value; + } + return result; +} + +module.exports = lazyValue; diff --git a/node_modules/lodash/_listCacheClear.js b/node_modules/lodash/_listCacheClear.js new file mode 100644 index 00000000..acbe39a5 --- /dev/null +++ b/node_modules/lodash/_listCacheClear.js @@ -0,0 +1,13 @@ +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; + this.size = 0; +} + +module.exports = listCacheClear; diff --git a/node_modules/lodash/_listCacheDelete.js b/node_modules/lodash/_listCacheDelete.js new file mode 100644 index 00000000..b1384ade --- /dev/null +++ b/node_modules/lodash/_listCacheDelete.js @@ -0,0 +1,35 @@ +var assocIndexOf = require('./_assocIndexOf'); + +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/** Built-in value references. */ +var splice = arrayProto.splice; + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; +} + +module.exports = listCacheDelete; diff --git a/node_modules/lodash/_listCacheGet.js b/node_modules/lodash/_listCacheGet.js new file mode 100644 index 00000000..f8192fc3 --- /dev/null +++ b/node_modules/lodash/_listCacheGet.js @@ -0,0 +1,19 @@ +var assocIndexOf = require('./_assocIndexOf'); + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +module.exports = listCacheGet; diff --git a/node_modules/lodash/_listCacheHas.js b/node_modules/lodash/_listCacheHas.js new file mode 100644 index 00000000..2adf6714 --- /dev/null +++ b/node_modules/lodash/_listCacheHas.js @@ -0,0 +1,16 @@ +var assocIndexOf = require('./_assocIndexOf'); + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +module.exports = listCacheHas; diff --git a/node_modules/lodash/_listCacheSet.js b/node_modules/lodash/_listCacheSet.js new file mode 100644 index 00000000..5855c95e --- /dev/null +++ b/node_modules/lodash/_listCacheSet.js @@ -0,0 +1,26 @@ +var assocIndexOf = require('./_assocIndexOf'); + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +module.exports = listCacheSet; diff --git a/node_modules/lodash/_mapCacheClear.js b/node_modules/lodash/_mapCacheClear.js new file mode 100644 index 00000000..bc9ca204 --- /dev/null +++ b/node_modules/lodash/_mapCacheClear.js @@ -0,0 +1,21 @@ +var Hash = require('./_Hash'), + ListCache = require('./_ListCache'), + Map = require('./_Map'); + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +module.exports = mapCacheClear; diff --git a/node_modules/lodash/_mapCacheDelete.js b/node_modules/lodash/_mapCacheDelete.js new file mode 100644 index 00000000..946ca3c9 --- /dev/null +++ b/node_modules/lodash/_mapCacheDelete.js @@ -0,0 +1,18 @@ +var getMapData = require('./_getMapData'); + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; +} + +module.exports = mapCacheDelete; diff --git a/node_modules/lodash/_mapCacheGet.js b/node_modules/lodash/_mapCacheGet.js new file mode 100644 index 00000000..f29f55cf --- /dev/null +++ b/node_modules/lodash/_mapCacheGet.js @@ -0,0 +1,16 @@ +var getMapData = require('./_getMapData'); + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +module.exports = mapCacheGet; diff --git a/node_modules/lodash/_mapCacheHas.js b/node_modules/lodash/_mapCacheHas.js new file mode 100644 index 00000000..a1214c02 --- /dev/null +++ b/node_modules/lodash/_mapCacheHas.js @@ -0,0 +1,16 @@ +var getMapData = require('./_getMapData'); + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +module.exports = mapCacheHas; diff --git a/node_modules/lodash/_mapCacheSet.js b/node_modules/lodash/_mapCacheSet.js new file mode 100644 index 00000000..73468492 --- /dev/null +++ b/node_modules/lodash/_mapCacheSet.js @@ -0,0 +1,22 @@ +var getMapData = require('./_getMapData'); + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; +} + +module.exports = mapCacheSet; diff --git a/node_modules/lodash/_mapToArray.js b/node_modules/lodash/_mapToArray.js new file mode 100644 index 00000000..fe3dd531 --- /dev/null +++ b/node_modules/lodash/_mapToArray.js @@ -0,0 +1,18 @@ +/** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ +function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} + +module.exports = mapToArray; diff --git a/node_modules/lodash/_matchesStrictComparable.js b/node_modules/lodash/_matchesStrictComparable.js new file mode 100644 index 00000000..f608af9e --- /dev/null +++ b/node_modules/lodash/_matchesStrictComparable.js @@ -0,0 +1,20 @@ +/** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; +} + +module.exports = matchesStrictComparable; diff --git a/node_modules/lodash/_memoizeCapped.js b/node_modules/lodash/_memoizeCapped.js new file mode 100644 index 00000000..7f71c8fb --- /dev/null +++ b/node_modules/lodash/_memoizeCapped.js @@ -0,0 +1,26 @@ +var memoize = require('./memoize'); + +/** Used as the maximum memoize cache size. */ +var MAX_MEMOIZE_SIZE = 500; + +/** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ +function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; +} + +module.exports = memoizeCapped; diff --git a/node_modules/lodash/_mergeData.js b/node_modules/lodash/_mergeData.js new file mode 100644 index 00000000..cb570f97 --- /dev/null +++ b/node_modules/lodash/_mergeData.js @@ -0,0 +1,90 @@ +var composeArgs = require('./_composeArgs'), + composeArgsRight = require('./_composeArgsRight'), + replaceHolders = require('./_replaceHolders'); + +/** Used as the internal argument placeholder. */ +var PLACEHOLDER = '__lodash_placeholder__'; + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * Merges the function metadata of `source` into `data`. + * + * Merging metadata reduces the number of wrappers used to invoke a function. + * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` + * may be applied regardless of execution order. Methods like `_.ary` and + * `_.rearg` modify function arguments, making the order in which they are + * executed important, preventing the merging of metadata. However, we make + * an exception for a safe combined case where curried functions have `_.ary` + * and or `_.rearg` applied. + * + * @private + * @param {Array} data The destination metadata. + * @param {Array} source The source metadata. + * @returns {Array} Returns `data`. + */ +function mergeData(data, source) { + var bitmask = data[1], + srcBitmask = source[1], + newBitmask = bitmask | srcBitmask, + isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); + + var isCombo = + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || + ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); + + // Exit early if metadata can't be merged. + if (!(isCommon || isCombo)) { + return data; + } + // Use source `thisArg` if available. + if (srcBitmask & WRAP_BIND_FLAG) { + data[2] = source[2]; + // Set when currying a bound function. + newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; + } + // Compose partial arguments. + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : value; + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; + } + // Compose partial right arguments. + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; + } + // Use source `argPos` if available. + value = source[7]; + if (value) { + data[7] = value; + } + // Use source `ary` if it's smaller. + if (srcBitmask & WRAP_ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + // Use source `arity` if one is not provided. + if (data[9] == null) { + data[9] = source[9]; + } + // Use source `func` and merge bitmasks. + data[0] = source[0]; + data[1] = newBitmask; + + return data; +} + +module.exports = mergeData; diff --git a/node_modules/lodash/_metaMap.js b/node_modules/lodash/_metaMap.js new file mode 100644 index 00000000..0157a0b0 --- /dev/null +++ b/node_modules/lodash/_metaMap.js @@ -0,0 +1,6 @@ +var WeakMap = require('./_WeakMap'); + +/** Used to store function metadata. */ +var metaMap = WeakMap && new WeakMap; + +module.exports = metaMap; diff --git a/node_modules/lodash/_nativeCreate.js b/node_modules/lodash/_nativeCreate.js new file mode 100644 index 00000000..c7aede85 --- /dev/null +++ b/node_modules/lodash/_nativeCreate.js @@ -0,0 +1,6 @@ +var getNative = require('./_getNative'); + +/* Built-in method references that are verified to be native. */ +var nativeCreate = getNative(Object, 'create'); + +module.exports = nativeCreate; diff --git a/node_modules/lodash/_nativeKeys.js b/node_modules/lodash/_nativeKeys.js new file mode 100644 index 00000000..479a104a --- /dev/null +++ b/node_modules/lodash/_nativeKeys.js @@ -0,0 +1,6 @@ +var overArg = require('./_overArg'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeKeys = overArg(Object.keys, Object); + +module.exports = nativeKeys; diff --git a/node_modules/lodash/_nativeKeysIn.js b/node_modules/lodash/_nativeKeysIn.js new file mode 100644 index 00000000..00ee5059 --- /dev/null +++ b/node_modules/lodash/_nativeKeysIn.js @@ -0,0 +1,20 @@ +/** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; +} + +module.exports = nativeKeysIn; diff --git a/node_modules/lodash/_nodeUtil.js b/node_modules/lodash/_nodeUtil.js new file mode 100644 index 00000000..983d78f7 --- /dev/null +++ b/node_modules/lodash/_nodeUtil.js @@ -0,0 +1,30 @@ +var freeGlobal = require('./_freeGlobal'); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports && freeGlobal.process; + +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; + + if (types) { + return types; + } + + // Legacy `process.binding('util')` for Node.js < 10. + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} +}()); + +module.exports = nodeUtil; diff --git a/node_modules/lodash/_objectToString.js b/node_modules/lodash/_objectToString.js new file mode 100644 index 00000000..c614ec09 --- /dev/null +++ b/node_modules/lodash/_objectToString.js @@ -0,0 +1,22 @@ +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ +function objectToString(value) { + return nativeObjectToString.call(value); +} + +module.exports = objectToString; diff --git a/node_modules/lodash/_overArg.js b/node_modules/lodash/_overArg.js new file mode 100644 index 00000000..651c5c55 --- /dev/null +++ b/node_modules/lodash/_overArg.js @@ -0,0 +1,15 @@ +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +module.exports = overArg; diff --git a/node_modules/lodash/_overRest.js b/node_modules/lodash/_overRest.js new file mode 100644 index 00000000..c7cdef33 --- /dev/null +++ b/node_modules/lodash/_overRest.js @@ -0,0 +1,36 @@ +var apply = require('./_apply'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ +function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; +} + +module.exports = overRest; diff --git a/node_modules/lodash/_parent.js b/node_modules/lodash/_parent.js new file mode 100644 index 00000000..f174328f --- /dev/null +++ b/node_modules/lodash/_parent.js @@ -0,0 +1,16 @@ +var baseGet = require('./_baseGet'), + baseSlice = require('./_baseSlice'); + +/** + * Gets the parent value at `path` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path to get the parent value of. + * @returns {*} Returns the parent value. + */ +function parent(object, path) { + return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); +} + +module.exports = parent; diff --git a/node_modules/lodash/_reEscape.js b/node_modules/lodash/_reEscape.js new file mode 100644 index 00000000..7f47eda6 --- /dev/null +++ b/node_modules/lodash/_reEscape.js @@ -0,0 +1,4 @@ +/** Used to match template delimiters. */ +var reEscape = /<%-([\s\S]+?)%>/g; + +module.exports = reEscape; diff --git a/node_modules/lodash/_reEvaluate.js b/node_modules/lodash/_reEvaluate.js new file mode 100644 index 00000000..6adfc312 --- /dev/null +++ b/node_modules/lodash/_reEvaluate.js @@ -0,0 +1,4 @@ +/** Used to match template delimiters. */ +var reEvaluate = /<%([\s\S]+?)%>/g; + +module.exports = reEvaluate; diff --git a/node_modules/lodash/_reInterpolate.js b/node_modules/lodash/_reInterpolate.js new file mode 100644 index 00000000..d02ff0b2 --- /dev/null +++ b/node_modules/lodash/_reInterpolate.js @@ -0,0 +1,4 @@ +/** Used to match template delimiters. */ +var reInterpolate = /<%=([\s\S]+?)%>/g; + +module.exports = reInterpolate; diff --git a/node_modules/lodash/_realNames.js b/node_modules/lodash/_realNames.js new file mode 100644 index 00000000..aa0d5292 --- /dev/null +++ b/node_modules/lodash/_realNames.js @@ -0,0 +1,4 @@ +/** Used to lookup unminified function names. */ +var realNames = {}; + +module.exports = realNames; diff --git a/node_modules/lodash/_reorder.js b/node_modules/lodash/_reorder.js new file mode 100644 index 00000000..a3502b05 --- /dev/null +++ b/node_modules/lodash/_reorder.js @@ -0,0 +1,29 @@ +var copyArray = require('./_copyArray'), + isIndex = require('./_isIndex'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * Reorder `array` according to the specified indexes where the element at + * the first index is assigned as the first element, the element at + * the second index is assigned as the second element, and so on. + * + * @private + * @param {Array} array The array to reorder. + * @param {Array} indexes The arranged array indexes. + * @returns {Array} Returns `array`. + */ +function reorder(array, indexes) { + var arrLength = array.length, + length = nativeMin(indexes.length, arrLength), + oldArray = copyArray(array); + + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; + } + return array; +} + +module.exports = reorder; diff --git a/node_modules/lodash/_replaceHolders.js b/node_modules/lodash/_replaceHolders.js new file mode 100644 index 00000000..74360ec4 --- /dev/null +++ b/node_modules/lodash/_replaceHolders.js @@ -0,0 +1,29 @@ +/** Used as the internal argument placeholder. */ +var PLACEHOLDER = '__lodash_placeholder__'; + +/** + * Replaces all `placeholder` elements in `array` with an internal placeholder + * and returns an array of their indexes. + * + * @private + * @param {Array} array The array to modify. + * @param {*} placeholder The placeholder to replace. + * @returns {Array} Returns the new array of placeholder indexes. + */ +function replaceHolders(array, placeholder) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value === placeholder || value === PLACEHOLDER) { + array[index] = PLACEHOLDER; + result[resIndex++] = index; + } + } + return result; +} + +module.exports = replaceHolders; diff --git a/node_modules/lodash/_root.js b/node_modules/lodash/_root.js new file mode 100644 index 00000000..d2852bed --- /dev/null +++ b/node_modules/lodash/_root.js @@ -0,0 +1,9 @@ +var freeGlobal = require('./_freeGlobal'); + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +module.exports = root; diff --git a/node_modules/lodash/_safeGet.js b/node_modules/lodash/_safeGet.js new file mode 100644 index 00000000..b070897d --- /dev/null +++ b/node_modules/lodash/_safeGet.js @@ -0,0 +1,21 @@ +/** + * Gets the value at `key`, unless `key` is "__proto__" or "constructor". + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function safeGet(object, key) { + if (key === 'constructor' && typeof object[key] === 'function') { + return; + } + + if (key == '__proto__') { + return; + } + + return object[key]; +} + +module.exports = safeGet; diff --git a/node_modules/lodash/_setCacheAdd.js b/node_modules/lodash/_setCacheAdd.js new file mode 100644 index 00000000..1081a744 --- /dev/null +++ b/node_modules/lodash/_setCacheAdd.js @@ -0,0 +1,19 @@ +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; +} + +module.exports = setCacheAdd; diff --git a/node_modules/lodash/_setCacheHas.js b/node_modules/lodash/_setCacheHas.js new file mode 100644 index 00000000..9a492556 --- /dev/null +++ b/node_modules/lodash/_setCacheHas.js @@ -0,0 +1,14 @@ +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); +} + +module.exports = setCacheHas; diff --git a/node_modules/lodash/_setData.js b/node_modules/lodash/_setData.js new file mode 100644 index 00000000..e5cf3eb9 --- /dev/null +++ b/node_modules/lodash/_setData.js @@ -0,0 +1,20 @@ +var baseSetData = require('./_baseSetData'), + shortOut = require('./_shortOut'); + +/** + * Sets metadata for `func`. + * + * **Note:** If this function becomes hot, i.e. is invoked a lot in a short + * period of time, it will trip its breaker and transition to an identity + * function to avoid garbage collection pauses in V8. See + * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) + * for more details. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ +var setData = shortOut(baseSetData); + +module.exports = setData; diff --git a/node_modules/lodash/_setToArray.js b/node_modules/lodash/_setToArray.js new file mode 100644 index 00000000..b87f0741 --- /dev/null +++ b/node_modules/lodash/_setToArray.js @@ -0,0 +1,18 @@ +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +module.exports = setToArray; diff --git a/node_modules/lodash/_setToPairs.js b/node_modules/lodash/_setToPairs.js new file mode 100644 index 00000000..36ad37a0 --- /dev/null +++ b/node_modules/lodash/_setToPairs.js @@ -0,0 +1,18 @@ +/** + * Converts `set` to its value-value pairs. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the value-value pairs. + */ +function setToPairs(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = [value, value]; + }); + return result; +} + +module.exports = setToPairs; diff --git a/node_modules/lodash/_setToString.js b/node_modules/lodash/_setToString.js new file mode 100644 index 00000000..6ca84196 --- /dev/null +++ b/node_modules/lodash/_setToString.js @@ -0,0 +1,14 @@ +var baseSetToString = require('./_baseSetToString'), + shortOut = require('./_shortOut'); + +/** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var setToString = shortOut(baseSetToString); + +module.exports = setToString; diff --git a/node_modules/lodash/_setWrapToString.js b/node_modules/lodash/_setWrapToString.js new file mode 100644 index 00000000..decdc449 --- /dev/null +++ b/node_modules/lodash/_setWrapToString.js @@ -0,0 +1,21 @@ +var getWrapDetails = require('./_getWrapDetails'), + insertWrapDetails = require('./_insertWrapDetails'), + setToString = require('./_setToString'), + updateWrapDetails = require('./_updateWrapDetails'); + +/** + * Sets the `toString` method of `wrapper` to mimic the source of `reference` + * with wrapper details in a comment at the top of the source body. + * + * @private + * @param {Function} wrapper The function to modify. + * @param {Function} reference The reference function. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Function} Returns `wrapper`. + */ +function setWrapToString(wrapper, reference, bitmask) { + var source = (reference + ''); + return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); +} + +module.exports = setWrapToString; diff --git a/node_modules/lodash/_shortOut.js b/node_modules/lodash/_shortOut.js new file mode 100644 index 00000000..3300a079 --- /dev/null +++ b/node_modules/lodash/_shortOut.js @@ -0,0 +1,37 @@ +/** Used to detect hot functions by number of calls within a span of milliseconds. */ +var HOT_COUNT = 800, + HOT_SPAN = 16; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeNow = Date.now; + +/** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ +function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; +} + +module.exports = shortOut; diff --git a/node_modules/lodash/_shuffleSelf.js b/node_modules/lodash/_shuffleSelf.js new file mode 100644 index 00000000..8bcc4f5c --- /dev/null +++ b/node_modules/lodash/_shuffleSelf.js @@ -0,0 +1,28 @@ +var baseRandom = require('./_baseRandom'); + +/** + * A specialized version of `_.shuffle` which mutates and sets the size of `array`. + * + * @private + * @param {Array} array The array to shuffle. + * @param {number} [size=array.length] The size of `array`. + * @returns {Array} Returns `array`. + */ +function shuffleSelf(array, size) { + var index = -1, + length = array.length, + lastIndex = length - 1; + + size = size === undefined ? length : size; + while (++index < size) { + var rand = baseRandom(index, lastIndex), + value = array[rand]; + + array[rand] = array[index]; + array[index] = value; + } + array.length = size; + return array; +} + +module.exports = shuffleSelf; diff --git a/node_modules/lodash/_stackClear.js b/node_modules/lodash/_stackClear.js new file mode 100644 index 00000000..ce8e5a92 --- /dev/null +++ b/node_modules/lodash/_stackClear.js @@ -0,0 +1,15 @@ +var ListCache = require('./_ListCache'); + +/** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ +function stackClear() { + this.__data__ = new ListCache; + this.size = 0; +} + +module.exports = stackClear; diff --git a/node_modules/lodash/_stackDelete.js b/node_modules/lodash/_stackDelete.js new file mode 100644 index 00000000..ff9887ab --- /dev/null +++ b/node_modules/lodash/_stackDelete.js @@ -0,0 +1,18 @@ +/** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; +} + +module.exports = stackDelete; diff --git a/node_modules/lodash/_stackGet.js b/node_modules/lodash/_stackGet.js new file mode 100644 index 00000000..1cdf0040 --- /dev/null +++ b/node_modules/lodash/_stackGet.js @@ -0,0 +1,14 @@ +/** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function stackGet(key) { + return this.__data__.get(key); +} + +module.exports = stackGet; diff --git a/node_modules/lodash/_stackHas.js b/node_modules/lodash/_stackHas.js new file mode 100644 index 00000000..16a3ad11 --- /dev/null +++ b/node_modules/lodash/_stackHas.js @@ -0,0 +1,14 @@ +/** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function stackHas(key) { + return this.__data__.has(key); +} + +module.exports = stackHas; diff --git a/node_modules/lodash/_stackSet.js b/node_modules/lodash/_stackSet.js new file mode 100644 index 00000000..b790ac5f --- /dev/null +++ b/node_modules/lodash/_stackSet.js @@ -0,0 +1,34 @@ +var ListCache = require('./_ListCache'), + Map = require('./_Map'), + MapCache = require('./_MapCache'); + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ +function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; +} + +module.exports = stackSet; diff --git a/node_modules/lodash/_strictIndexOf.js b/node_modules/lodash/_strictIndexOf.js new file mode 100644 index 00000000..0486a495 --- /dev/null +++ b/node_modules/lodash/_strictIndexOf.js @@ -0,0 +1,23 @@ +/** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +module.exports = strictIndexOf; diff --git a/node_modules/lodash/_strictLastIndexOf.js b/node_modules/lodash/_strictLastIndexOf.js new file mode 100644 index 00000000..d7310dcc --- /dev/null +++ b/node_modules/lodash/_strictLastIndexOf.js @@ -0,0 +1,21 @@ +/** + * A specialized version of `_.lastIndexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; +} + +module.exports = strictLastIndexOf; diff --git a/node_modules/lodash/_stringSize.js b/node_modules/lodash/_stringSize.js new file mode 100644 index 00000000..17ef462a --- /dev/null +++ b/node_modules/lodash/_stringSize.js @@ -0,0 +1,18 @@ +var asciiSize = require('./_asciiSize'), + hasUnicode = require('./_hasUnicode'), + unicodeSize = require('./_unicodeSize'); + +/** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ +function stringSize(string) { + return hasUnicode(string) + ? unicodeSize(string) + : asciiSize(string); +} + +module.exports = stringSize; diff --git a/node_modules/lodash/_stringToArray.js b/node_modules/lodash/_stringToArray.js new file mode 100644 index 00000000..d161158c --- /dev/null +++ b/node_modules/lodash/_stringToArray.js @@ -0,0 +1,18 @@ +var asciiToArray = require('./_asciiToArray'), + hasUnicode = require('./_hasUnicode'), + unicodeToArray = require('./_unicodeToArray'); + +/** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function stringToArray(string) { + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); +} + +module.exports = stringToArray; diff --git a/node_modules/lodash/_stringToPath.js b/node_modules/lodash/_stringToPath.js new file mode 100644 index 00000000..8f39f8a2 --- /dev/null +++ b/node_modules/lodash/_stringToPath.js @@ -0,0 +1,27 @@ +var memoizeCapped = require('./_memoizeCapped'); + +/** Used to match property names within property paths. */ +var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ +var stringToPath = memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); + +module.exports = stringToPath; diff --git a/node_modules/lodash/_toKey.js b/node_modules/lodash/_toKey.js new file mode 100644 index 00000000..c6d645c4 --- /dev/null +++ b/node_modules/lodash/_toKey.js @@ -0,0 +1,21 @@ +var isSymbol = require('./isSymbol'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +module.exports = toKey; diff --git a/node_modules/lodash/_toSource.js b/node_modules/lodash/_toSource.js new file mode 100644 index 00000000..a020b386 --- /dev/null +++ b/node_modules/lodash/_toSource.js @@ -0,0 +1,26 @@ +/** Used for built-in method references. */ +var funcProto = Function.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +module.exports = toSource; diff --git a/node_modules/lodash/_unescapeHtmlChar.js b/node_modules/lodash/_unescapeHtmlChar.js new file mode 100644 index 00000000..a71fecb3 --- /dev/null +++ b/node_modules/lodash/_unescapeHtmlChar.js @@ -0,0 +1,21 @@ +var basePropertyOf = require('./_basePropertyOf'); + +/** Used to map HTML entities to characters. */ +var htmlUnescapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" +}; + +/** + * Used by `_.unescape` to convert HTML entities to characters. + * + * @private + * @param {string} chr The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ +var unescapeHtmlChar = basePropertyOf(htmlUnescapes); + +module.exports = unescapeHtmlChar; diff --git a/node_modules/lodash/_unicodeSize.js b/node_modules/lodash/_unicodeSize.js new file mode 100644 index 00000000..68137ec2 --- /dev/null +++ b/node_modules/lodash/_unicodeSize.js @@ -0,0 +1,44 @@ +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsAstral = '[' + rsAstralRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + +/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + +/** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; +} + +module.exports = unicodeSize; diff --git a/node_modules/lodash/_unicodeToArray.js b/node_modules/lodash/_unicodeToArray.js new file mode 100644 index 00000000..2a725c06 --- /dev/null +++ b/node_modules/lodash/_unicodeToArray.js @@ -0,0 +1,40 @@ +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsAstral = '[' + rsAstralRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + +/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + +/** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function unicodeToArray(string) { + return string.match(reUnicode) || []; +} + +module.exports = unicodeToArray; diff --git a/node_modules/lodash/_unicodeWords.js b/node_modules/lodash/_unicodeWords.js new file mode 100644 index 00000000..e72e6e0f --- /dev/null +++ b/node_modules/lodash/_unicodeWords.js @@ -0,0 +1,69 @@ +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsDingbatRange = '\\u2700-\\u27bf', + rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', + rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', + rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', + rsPunctuationRange = '\\u2000-\\u206f', + rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', + rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', + rsVarRange = '\\ufe0e\\ufe0f', + rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; + +/** Used to compose unicode capture groups. */ +var rsApos = "['\u2019]", + rsBreak = '[' + rsBreakRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsDigits = '\\d+', + rsDingbat = '[' + rsDingbatRange + ']', + rsLower = '[' + rsLowerRange + ']', + rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsUpper = '[' + rsUpperRange + ']', + rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', + rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', + reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', + rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq; + +/** Used to match complex or compound words. */ +var reUnicodeWord = RegExp([ + rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', + rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', + rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, + rsUpper + '+' + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, + rsDigits, + rsEmoji +].join('|'), 'g'); + +/** + * Splits a Unicode `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ +function unicodeWords(string) { + return string.match(reUnicodeWord) || []; +} + +module.exports = unicodeWords; diff --git a/node_modules/lodash/_updateWrapDetails.js b/node_modules/lodash/_updateWrapDetails.js new file mode 100644 index 00000000..8759fbdf --- /dev/null +++ b/node_modules/lodash/_updateWrapDetails.js @@ -0,0 +1,46 @@ +var arrayEach = require('./_arrayEach'), + arrayIncludes = require('./_arrayIncludes'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256, + WRAP_FLIP_FLAG = 512; + +/** Used to associate wrap methods with their bit flags. */ +var wrapFlags = [ + ['ary', WRAP_ARY_FLAG], + ['bind', WRAP_BIND_FLAG], + ['bindKey', WRAP_BIND_KEY_FLAG], + ['curry', WRAP_CURRY_FLAG], + ['curryRight', WRAP_CURRY_RIGHT_FLAG], + ['flip', WRAP_FLIP_FLAG], + ['partial', WRAP_PARTIAL_FLAG], + ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], + ['rearg', WRAP_REARG_FLAG] +]; + +/** + * Updates wrapper `details` based on `bitmask` flags. + * + * @private + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. + */ +function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function(pair) { + var value = '_.' + pair[0]; + if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); +} + +module.exports = updateWrapDetails; diff --git a/node_modules/lodash/_wrapperClone.js b/node_modules/lodash/_wrapperClone.js new file mode 100644 index 00000000..7bb58a2e --- /dev/null +++ b/node_modules/lodash/_wrapperClone.js @@ -0,0 +1,23 @@ +var LazyWrapper = require('./_LazyWrapper'), + LodashWrapper = require('./_LodashWrapper'), + copyArray = require('./_copyArray'); + +/** + * Creates a clone of `wrapper`. + * + * @private + * @param {Object} wrapper The wrapper to clone. + * @returns {Object} Returns the cloned wrapper. + */ +function wrapperClone(wrapper) { + if (wrapper instanceof LazyWrapper) { + return wrapper.clone(); + } + var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); + result.__actions__ = copyArray(wrapper.__actions__); + result.__index__ = wrapper.__index__; + result.__values__ = wrapper.__values__; + return result; +} + +module.exports = wrapperClone; diff --git a/node_modules/lodash/add.js b/node_modules/lodash/add.js new file mode 100644 index 00000000..f0695156 --- /dev/null +++ b/node_modules/lodash/add.js @@ -0,0 +1,22 @@ +var createMathOperation = require('./_createMathOperation'); + +/** + * Adds two numbers. + * + * @static + * @memberOf _ + * @since 3.4.0 + * @category Math + * @param {number} augend The first number in an addition. + * @param {number} addend The second number in an addition. + * @returns {number} Returns the total. + * @example + * + * _.add(6, 4); + * // => 10 + */ +var add = createMathOperation(function(augend, addend) { + return augend + addend; +}, 0); + +module.exports = add; diff --git a/node_modules/lodash/after.js b/node_modules/lodash/after.js new file mode 100644 index 00000000..3900c979 --- /dev/null +++ b/node_modules/lodash/after.js @@ -0,0 +1,42 @@ +var toInteger = require('./toInteger'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it's called `n` or more times. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => Logs 'done saving!' after the two async saves have completed. + */ +function after(n, func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; +} + +module.exports = after; diff --git a/node_modules/lodash/array.js b/node_modules/lodash/array.js new file mode 100644 index 00000000..af688d3e --- /dev/null +++ b/node_modules/lodash/array.js @@ -0,0 +1,67 @@ +module.exports = { + 'chunk': require('./chunk'), + 'compact': require('./compact'), + 'concat': require('./concat'), + 'difference': require('./difference'), + 'differenceBy': require('./differenceBy'), + 'differenceWith': require('./differenceWith'), + 'drop': require('./drop'), + 'dropRight': require('./dropRight'), + 'dropRightWhile': require('./dropRightWhile'), + 'dropWhile': require('./dropWhile'), + 'fill': require('./fill'), + 'findIndex': require('./findIndex'), + 'findLastIndex': require('./findLastIndex'), + 'first': require('./first'), + 'flatten': require('./flatten'), + 'flattenDeep': require('./flattenDeep'), + 'flattenDepth': require('./flattenDepth'), + 'fromPairs': require('./fromPairs'), + 'head': require('./head'), + 'indexOf': require('./indexOf'), + 'initial': require('./initial'), + 'intersection': require('./intersection'), + 'intersectionBy': require('./intersectionBy'), + 'intersectionWith': require('./intersectionWith'), + 'join': require('./join'), + 'last': require('./last'), + 'lastIndexOf': require('./lastIndexOf'), + 'nth': require('./nth'), + 'pull': require('./pull'), + 'pullAll': require('./pullAll'), + 'pullAllBy': require('./pullAllBy'), + 'pullAllWith': require('./pullAllWith'), + 'pullAt': require('./pullAt'), + 'remove': require('./remove'), + 'reverse': require('./reverse'), + 'slice': require('./slice'), + 'sortedIndex': require('./sortedIndex'), + 'sortedIndexBy': require('./sortedIndexBy'), + 'sortedIndexOf': require('./sortedIndexOf'), + 'sortedLastIndex': require('./sortedLastIndex'), + 'sortedLastIndexBy': require('./sortedLastIndexBy'), + 'sortedLastIndexOf': require('./sortedLastIndexOf'), + 'sortedUniq': require('./sortedUniq'), + 'sortedUniqBy': require('./sortedUniqBy'), + 'tail': require('./tail'), + 'take': require('./take'), + 'takeRight': require('./takeRight'), + 'takeRightWhile': require('./takeRightWhile'), + 'takeWhile': require('./takeWhile'), + 'union': require('./union'), + 'unionBy': require('./unionBy'), + 'unionWith': require('./unionWith'), + 'uniq': require('./uniq'), + 'uniqBy': require('./uniqBy'), + 'uniqWith': require('./uniqWith'), + 'unzip': require('./unzip'), + 'unzipWith': require('./unzipWith'), + 'without': require('./without'), + 'xor': require('./xor'), + 'xorBy': require('./xorBy'), + 'xorWith': require('./xorWith'), + 'zip': require('./zip'), + 'zipObject': require('./zipObject'), + 'zipObjectDeep': require('./zipObjectDeep'), + 'zipWith': require('./zipWith') +}; diff --git a/node_modules/lodash/ary.js b/node_modules/lodash/ary.js new file mode 100644 index 00000000..70c87d09 --- /dev/null +++ b/node_modules/lodash/ary.js @@ -0,0 +1,29 @@ +var createWrap = require('./_createWrap'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_ARY_FLAG = 128; + +/** + * Creates a function that invokes `func`, with up to `n` arguments, + * ignoring any additional arguments. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ +function ary(func, n, guard) { + n = guard ? undefined : n; + n = (func && n == null) ? func.length : n; + return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); +} + +module.exports = ary; diff --git a/node_modules/lodash/assign.js b/node_modules/lodash/assign.js new file mode 100644 index 00000000..909db26a --- /dev/null +++ b/node_modules/lodash/assign.js @@ -0,0 +1,58 @@ +var assignValue = require('./_assignValue'), + copyObject = require('./_copyObject'), + createAssigner = require('./_createAssigner'), + isArrayLike = require('./isArrayLike'), + isPrototype = require('./_isPrototype'), + keys = require('./keys'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ +var assign = createAssigner(function(object, source) { + if (isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); + } + } +}); + +module.exports = assign; diff --git a/node_modules/lodash/assignIn.js b/node_modules/lodash/assignIn.js new file mode 100644 index 00000000..e663473a --- /dev/null +++ b/node_modules/lodash/assignIn.js @@ -0,0 +1,40 @@ +var copyObject = require('./_copyObject'), + createAssigner = require('./_createAssigner'), + keysIn = require('./keysIn'); + +/** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assign + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + */ +var assignIn = createAssigner(function(object, source) { + copyObject(source, keysIn(source), object); +}); + +module.exports = assignIn; diff --git a/node_modules/lodash/assignInWith.js b/node_modules/lodash/assignInWith.js new file mode 100644 index 00000000..68fcc0b0 --- /dev/null +++ b/node_modules/lodash/assignInWith.js @@ -0,0 +1,38 @@ +var copyObject = require('./_copyObject'), + createAssigner = require('./_createAssigner'), + keysIn = require('./keysIn'); + +/** + * This method is like `_.assignIn` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extendWith + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignInWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); +}); + +module.exports = assignInWith; diff --git a/node_modules/lodash/assignWith.js b/node_modules/lodash/assignWith.js new file mode 100644 index 00000000..7dc6c761 --- /dev/null +++ b/node_modules/lodash/assignWith.js @@ -0,0 +1,37 @@ +var copyObject = require('./_copyObject'), + createAssigner = require('./_createAssigner'), + keys = require('./keys'); + +/** + * This method is like `_.assign` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignInWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var assignWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keys(source), object, customizer); +}); + +module.exports = assignWith; diff --git a/node_modules/lodash/at.js b/node_modules/lodash/at.js new file mode 100644 index 00000000..781ee9e5 --- /dev/null +++ b/node_modules/lodash/at.js @@ -0,0 +1,23 @@ +var baseAt = require('./_baseAt'), + flatRest = require('./_flatRest'); + +/** + * Creates an array of values corresponding to `paths` of `object`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Array} Returns the picked values. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _.at(object, ['a[0].b.c', 'a[1]']); + * // => [3, 4] + */ +var at = flatRest(baseAt); + +module.exports = at; diff --git a/node_modules/lodash/attempt.js b/node_modules/lodash/attempt.js new file mode 100644 index 00000000..624d0152 --- /dev/null +++ b/node_modules/lodash/attempt.js @@ -0,0 +1,35 @@ +var apply = require('./_apply'), + baseRest = require('./_baseRest'), + isError = require('./isError'); + +/** + * Attempts to invoke `func`, returning either the result or the caught error + * object. Any additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Function} func The function to attempt. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {*} Returns the `func` result or error object. + * @example + * + * // Avoid throwing errors for invalid selectors. + * var elements = _.attempt(function(selector) { + * return document.querySelectorAll(selector); + * }, '>_>'); + * + * if (_.isError(elements)) { + * elements = []; + * } + */ +var attempt = baseRest(function(func, args) { + try { + return apply(func, undefined, args); + } catch (e) { + return isError(e) ? e : new Error(e); + } +}); + +module.exports = attempt; diff --git a/node_modules/lodash/before.js b/node_modules/lodash/before.js new file mode 100644 index 00000000..a3e0a16c --- /dev/null +++ b/node_modules/lodash/before.js @@ -0,0 +1,40 @@ +var toInteger = require('./toInteger'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. + */ +function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; +} + +module.exports = before; diff --git a/node_modules/lodash/bind.js b/node_modules/lodash/bind.js new file mode 100644 index 00000000..b1076e93 --- /dev/null +++ b/node_modules/lodash/bind.js @@ -0,0 +1,57 @@ +var baseRest = require('./_baseRest'), + createWrap = require('./_createWrap'), + getHolder = require('./_getHolder'), + replaceHolders = require('./_replaceHolders'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_PARTIAL_FLAG = 32; + +/** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and `partials` prepended to the arguments it receives. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ +var bind = baseRest(function(func, thisArg, partials) { + var bitmask = WRAP_BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bind)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(func, bitmask, thisArg, partials, holders); +}); + +// Assign default placeholders. +bind.placeholder = {}; + +module.exports = bind; diff --git a/node_modules/lodash/bindAll.js b/node_modules/lodash/bindAll.js new file mode 100644 index 00000000..a35706de --- /dev/null +++ b/node_modules/lodash/bindAll.js @@ -0,0 +1,41 @@ +var arrayEach = require('./_arrayEach'), + baseAssignValue = require('./_baseAssignValue'), + bind = require('./bind'), + flatRest = require('./_flatRest'), + toKey = require('./_toKey'); + +/** + * Binds methods of an object to the object itself, overwriting the existing + * method. + * + * **Note:** This method doesn't set the "length" property of bound functions. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {Object} object The object to bind and assign the bound methods to. + * @param {...(string|string[])} methodNames The object method names to bind. + * @returns {Object} Returns `object`. + * @example + * + * var view = { + * 'label': 'docs', + * 'click': function() { + * console.log('clicked ' + this.label); + * } + * }; + * + * _.bindAll(view, ['click']); + * jQuery(element).on('click', view.click); + * // => Logs 'clicked docs' when clicked. + */ +var bindAll = flatRest(function(object, methodNames) { + arrayEach(methodNames, function(key) { + key = toKey(key); + baseAssignValue(object, key, bind(object[key], object)); + }); + return object; +}); + +module.exports = bindAll; diff --git a/node_modules/lodash/bindKey.js b/node_modules/lodash/bindKey.js new file mode 100644 index 00000000..f7fd64cd --- /dev/null +++ b/node_modules/lodash/bindKey.js @@ -0,0 +1,68 @@ +var baseRest = require('./_baseRest'), + createWrap = require('./_createWrap'), + getHolder = require('./_getHolder'), + replaceHolders = require('./_replaceHolders'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_PARTIAL_FLAG = 32; + +/** + * Creates a function that invokes the method at `object[key]` with `partials` + * prepended to the arguments it receives. + * + * This method differs from `_.bind` by allowing bound functions to reference + * methods that may be redefined or don't yet exist. See + * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Function + * @param {Object} object The object to invoke the method on. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; + * + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // Bound with placeholders. + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' + */ +var bindKey = baseRest(function(object, key, partials) { + var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bindKey)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(key, bitmask, object, partials, holders); +}); + +// Assign default placeholders. +bindKey.placeholder = {}; + +module.exports = bindKey; diff --git a/node_modules/lodash/camelCase.js b/node_modules/lodash/camelCase.js new file mode 100644 index 00000000..d7390def --- /dev/null +++ b/node_modules/lodash/camelCase.js @@ -0,0 +1,29 @@ +var capitalize = require('./capitalize'), + createCompounder = require('./_createCompounder'); + +/** + * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the camel cased string. + * @example + * + * _.camelCase('Foo Bar'); + * // => 'fooBar' + * + * _.camelCase('--foo-bar--'); + * // => 'fooBar' + * + * _.camelCase('__FOO_BAR__'); + * // => 'fooBar' + */ +var camelCase = createCompounder(function(result, word, index) { + word = word.toLowerCase(); + return result + (index ? capitalize(word) : word); +}); + +module.exports = camelCase; diff --git a/node_modules/lodash/capitalize.js b/node_modules/lodash/capitalize.js new file mode 100644 index 00000000..3e1600e7 --- /dev/null +++ b/node_modules/lodash/capitalize.js @@ -0,0 +1,23 @@ +var toString = require('./toString'), + upperFirst = require('./upperFirst'); + +/** + * Converts the first character of `string` to upper case and the remaining + * to lower case. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. + * @example + * + * _.capitalize('FRED'); + * // => 'Fred' + */ +function capitalize(string) { + return upperFirst(toString(string).toLowerCase()); +} + +module.exports = capitalize; diff --git a/node_modules/lodash/castArray.js b/node_modules/lodash/castArray.js new file mode 100644 index 00000000..e470bdb9 --- /dev/null +++ b/node_modules/lodash/castArray.js @@ -0,0 +1,44 @@ +var isArray = require('./isArray'); + +/** + * Casts `value` as an array if it's not one. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Lang + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast array. + * @example + * + * _.castArray(1); + * // => [1] + * + * _.castArray({ 'a': 1 }); + * // => [{ 'a': 1 }] + * + * _.castArray('abc'); + * // => ['abc'] + * + * _.castArray(null); + * // => [null] + * + * _.castArray(undefined); + * // => [undefined] + * + * _.castArray(); + * // => [] + * + * var array = [1, 2, 3]; + * console.log(_.castArray(array) === array); + * // => true + */ +function castArray() { + if (!arguments.length) { + return []; + } + var value = arguments[0]; + return isArray(value) ? value : [value]; +} + +module.exports = castArray; diff --git a/node_modules/lodash/ceil.js b/node_modules/lodash/ceil.js new file mode 100644 index 00000000..56c8722c --- /dev/null +++ b/node_modules/lodash/ceil.js @@ -0,0 +1,26 @@ +var createRound = require('./_createRound'); + +/** + * Computes `number` rounded up to `precision`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Math + * @param {number} number The number to round up. + * @param {number} [precision=0] The precision to round up to. + * @returns {number} Returns the rounded up number. + * @example + * + * _.ceil(4.006); + * // => 5 + * + * _.ceil(6.004, 2); + * // => 6.01 + * + * _.ceil(6040, -2); + * // => 6100 + */ +var ceil = createRound('ceil'); + +module.exports = ceil; diff --git a/node_modules/lodash/chain.js b/node_modules/lodash/chain.js new file mode 100644 index 00000000..f6cd6475 --- /dev/null +++ b/node_modules/lodash/chain.js @@ -0,0 +1,38 @@ +var lodash = require('./wrapperLodash'); + +/** + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' + */ +function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; +} + +module.exports = chain; diff --git a/node_modules/lodash/chunk.js b/node_modules/lodash/chunk.js new file mode 100644 index 00000000..5b562fef --- /dev/null +++ b/node_modules/lodash/chunk.js @@ -0,0 +1,50 @@ +var baseSlice = require('./_baseSlice'), + isIterateeCall = require('./_isIterateeCall'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil, + nativeMax = Math.max; + +/** + * Creates an array of elements split into groups the length of `size`. + * If `array` can't be split evenly, the final chunk will be the remaining + * elements. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the new array of chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ +function chunk(array, size, guard) { + if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { + size = 1; + } else { + size = nativeMax(toInteger(size), 0); + } + var length = array == null ? 0 : array.length; + if (!length || size < 1) { + return []; + } + var index = 0, + resIndex = 0, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[resIndex++] = baseSlice(array, index, (index += size)); + } + return result; +} + +module.exports = chunk; diff --git a/node_modules/lodash/clamp.js b/node_modules/lodash/clamp.js new file mode 100644 index 00000000..91a72c97 --- /dev/null +++ b/node_modules/lodash/clamp.js @@ -0,0 +1,39 @@ +var baseClamp = require('./_baseClamp'), + toNumber = require('./toNumber'); + +/** + * Clamps `number` within the inclusive `lower` and `upper` bounds. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Number + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + * @example + * + * _.clamp(-10, -5, 5); + * // => -5 + * + * _.clamp(10, -5, 5); + * // => 5 + */ +function clamp(number, lower, upper) { + if (upper === undefined) { + upper = lower; + lower = undefined; + } + if (upper !== undefined) { + upper = toNumber(upper); + upper = upper === upper ? upper : 0; + } + if (lower !== undefined) { + lower = toNumber(lower); + lower = lower === lower ? lower : 0; + } + return baseClamp(toNumber(number), lower, upper); +} + +module.exports = clamp; diff --git a/node_modules/lodash/clone.js b/node_modules/lodash/clone.js new file mode 100644 index 00000000..dd439d63 --- /dev/null +++ b/node_modules/lodash/clone.js @@ -0,0 +1,36 @@ +var baseClone = require('./_baseClone'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_SYMBOLS_FLAG = 4; + +/** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ +function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); +} + +module.exports = clone; diff --git a/node_modules/lodash/cloneDeep.js b/node_modules/lodash/cloneDeep.js new file mode 100644 index 00000000..4425fbe8 --- /dev/null +++ b/node_modules/lodash/cloneDeep.js @@ -0,0 +1,29 @@ +var baseClone = require('./_baseClone'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_SYMBOLS_FLAG = 4; + +/** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ +function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); +} + +module.exports = cloneDeep; diff --git a/node_modules/lodash/cloneDeepWith.js b/node_modules/lodash/cloneDeepWith.js new file mode 100644 index 00000000..fd9c6c05 --- /dev/null +++ b/node_modules/lodash/cloneDeepWith.js @@ -0,0 +1,40 @@ +var baseClone = require('./_baseClone'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_SYMBOLS_FLAG = 4; + +/** + * This method is like `_.cloneWith` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the deep cloned value. + * @see _.cloneWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(true); + * } + * } + * + * var el = _.cloneDeepWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 20 + */ +function cloneDeepWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); +} + +module.exports = cloneDeepWith; diff --git a/node_modules/lodash/cloneWith.js b/node_modules/lodash/cloneWith.js new file mode 100644 index 00000000..d2f4e756 --- /dev/null +++ b/node_modules/lodash/cloneWith.js @@ -0,0 +1,42 @@ +var baseClone = require('./_baseClone'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_SYMBOLS_FLAG = 4; + +/** + * This method is like `_.clone` except that it accepts `customizer` which + * is invoked to produce the cloned value. If `customizer` returns `undefined`, + * cloning is handled by the method instead. The `customizer` is invoked with + * up to four arguments; (value [, index|key, object, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the cloned value. + * @see _.cloneDeepWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(false); + * } + * } + * + * var el = _.cloneWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 0 + */ +function cloneWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); +} + +module.exports = cloneWith; diff --git a/node_modules/lodash/collection.js b/node_modules/lodash/collection.js new file mode 100644 index 00000000..77fe837f --- /dev/null +++ b/node_modules/lodash/collection.js @@ -0,0 +1,30 @@ +module.exports = { + 'countBy': require('./countBy'), + 'each': require('./each'), + 'eachRight': require('./eachRight'), + 'every': require('./every'), + 'filter': require('./filter'), + 'find': require('./find'), + 'findLast': require('./findLast'), + 'flatMap': require('./flatMap'), + 'flatMapDeep': require('./flatMapDeep'), + 'flatMapDepth': require('./flatMapDepth'), + 'forEach': require('./forEach'), + 'forEachRight': require('./forEachRight'), + 'groupBy': require('./groupBy'), + 'includes': require('./includes'), + 'invokeMap': require('./invokeMap'), + 'keyBy': require('./keyBy'), + 'map': require('./map'), + 'orderBy': require('./orderBy'), + 'partition': require('./partition'), + 'reduce': require('./reduce'), + 'reduceRight': require('./reduceRight'), + 'reject': require('./reject'), + 'sample': require('./sample'), + 'sampleSize': require('./sampleSize'), + 'shuffle': require('./shuffle'), + 'size': require('./size'), + 'some': require('./some'), + 'sortBy': require('./sortBy') +}; diff --git a/node_modules/lodash/commit.js b/node_modules/lodash/commit.js new file mode 100644 index 00000000..fe4db717 --- /dev/null +++ b/node_modules/lodash/commit.js @@ -0,0 +1,33 @@ +var LodashWrapper = require('./_LodashWrapper'); + +/** + * Executes the chain sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ +function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); +} + +module.exports = wrapperCommit; diff --git a/node_modules/lodash/compact.js b/node_modules/lodash/compact.js new file mode 100644 index 00000000..031fab4e --- /dev/null +++ b/node_modules/lodash/compact.js @@ -0,0 +1,31 @@ +/** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ +function compact(array) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[resIndex++] = value; + } + } + return result; +} + +module.exports = compact; diff --git a/node_modules/lodash/concat.js b/node_modules/lodash/concat.js new file mode 100644 index 00000000..1da48a4f --- /dev/null +++ b/node_modules/lodash/concat.js @@ -0,0 +1,43 @@ +var arrayPush = require('./_arrayPush'), + baseFlatten = require('./_baseFlatten'), + copyArray = require('./_copyArray'), + isArray = require('./isArray'); + +/** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ +function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); +} + +module.exports = concat; diff --git a/node_modules/lodash/cond.js b/node_modules/lodash/cond.js new file mode 100644 index 00000000..64555986 --- /dev/null +++ b/node_modules/lodash/cond.js @@ -0,0 +1,60 @@ +var apply = require('./_apply'), + arrayMap = require('./_arrayMap'), + baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that iterates over `pairs` and invokes the corresponding + * function of the first predicate to return truthy. The predicate-function + * pairs are invoked with the `this` binding and arguments of the created + * function. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {Array} pairs The predicate-function pairs. + * @returns {Function} Returns the new composite function. + * @example + * + * var func = _.cond([ + * [_.matches({ 'a': 1 }), _.constant('matches A')], + * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')], + * [_.stubTrue, _.constant('no match')] + * ]); + * + * func({ 'a': 1, 'b': 2 }); + * // => 'matches A' + * + * func({ 'a': 0, 'b': 1 }); + * // => 'matches B' + * + * func({ 'a': '1', 'b': '2' }); + * // => 'no match' + */ +function cond(pairs) { + var length = pairs == null ? 0 : pairs.length, + toIteratee = baseIteratee; + + pairs = !length ? [] : arrayMap(pairs, function(pair) { + if (typeof pair[1] != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return [toIteratee(pair[0]), pair[1]]; + }); + + return baseRest(function(args) { + var index = -1; + while (++index < length) { + var pair = pairs[index]; + if (apply(pair[0], this, args)) { + return apply(pair[1], this, args); + } + } + }); +} + +module.exports = cond; diff --git a/node_modules/lodash/conforms.js b/node_modules/lodash/conforms.js new file mode 100644 index 00000000..5501a949 --- /dev/null +++ b/node_modules/lodash/conforms.js @@ -0,0 +1,35 @@ +var baseClone = require('./_baseClone'), + baseConforms = require('./_baseConforms'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1; + +/** + * Creates a function that invokes the predicate properties of `source` with + * the corresponding property values of a given object, returning `true` if + * all predicates return truthy, else `false`. + * + * **Note:** The created function is equivalent to `_.conformsTo` with + * `source` partially applied. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 2, 'b': 1 }, + * { 'a': 1, 'b': 2 } + * ]; + * + * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } })); + * // => [{ 'a': 1, 'b': 2 }] + */ +function conforms(source) { + return baseConforms(baseClone(source, CLONE_DEEP_FLAG)); +} + +module.exports = conforms; diff --git a/node_modules/lodash/conformsTo.js b/node_modules/lodash/conformsTo.js new file mode 100644 index 00000000..b8a93ebf --- /dev/null +++ b/node_modules/lodash/conformsTo.js @@ -0,0 +1,32 @@ +var baseConformsTo = require('./_baseConformsTo'), + keys = require('./keys'); + +/** + * Checks if `object` conforms to `source` by invoking the predicate + * properties of `source` with the corresponding property values of `object`. + * + * **Note:** This method is equivalent to `_.conforms` when `source` is + * partially applied. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false + */ +function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); +} + +module.exports = conformsTo; diff --git a/node_modules/lodash/constant.js b/node_modules/lodash/constant.js new file mode 100644 index 00000000..655ece3f --- /dev/null +++ b/node_modules/lodash/constant.js @@ -0,0 +1,26 @@ +/** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new constant function. + * @example + * + * var objects = _.times(2, _.constant({ 'a': 1 })); + * + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); + * // => true + */ +function constant(value) { + return function() { + return value; + }; +} + +module.exports = constant; diff --git a/node_modules/lodash/core.js b/node_modules/lodash/core.js new file mode 100644 index 00000000..89c77ded --- /dev/null +++ b/node_modules/lodash/core.js @@ -0,0 +1,3854 @@ +/** + * @license + * Lodash (Custom Build) + * Build: `lodash core -o ./dist/lodash.core.js` + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ +;(function() { + + /** Used as a safe reference for `undefined` in pre-ES5 environments. */ + var undefined; + + /** Used as the semantic version number. */ + var VERSION = '4.17.15'; + + /** Error message constants. */ + var FUNC_ERROR_TEXT = 'Expected a function'; + + /** Used to compose bitmasks for value comparisons. */ + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + + /** Used to compose bitmasks for function metadata. */ + var WRAP_BIND_FLAG = 1, + WRAP_PARTIAL_FLAG = 32; + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + numberTag = '[object Number]', + objectTag = '[object Object]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + stringTag = '[object String]'; + + /** Used to match HTML entities and HTML characters. */ + var reUnescapedHtml = /[&<>"']/g, + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** Used to map characters to HTML entities. */ + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + + /** Detect free variable `exports`. */ + var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + + /*--------------------------------------------------------------------------*/ + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + array.push.apply(array, values); + return array; + } + + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ + function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ + function baseValues(object, props) { + return baseMap(props, function(key) { + return object[key]; + }); + } + + /** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + var escapeHtmlChar = basePropertyOf(htmlEscapes); + + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + + /*--------------------------------------------------------------------------*/ + + /** Used for built-in method references. */ + var arrayProto = Array.prototype, + objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to generate unique IDs. */ + var idCounter = 0; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Used to restore the original `_` reference in `_.noConflict`. */ + var oldDash = root._; + + /** Built-in value references. */ + var objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeIsFinite = root.isFinite, + nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps `value` to enable implicit method + * chain sequences. Methods that operate on and return arrays, collections, + * and functions can be chained together. Methods that retrieve a single value + * or may return a primitive value will automatically end the chain sequence + * and return the unwrapped value. Otherwise, the value must be unwrapped + * with `_#value`. + * + * Explicit chain sequences, which must be unwrapped with `_#value`, may be + * enabled using `_.chain`. + * + * The execution of chained methods is lazy, that is, it's deferred until + * `_#value` is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. + * Shortcut fusion is an optimization to merge iteratee calls; this avoids + * the creation of intermediate arrays and can greatly reduce the number of + * iteratee executions. Sections of a chain sequence qualify for shortcut + * fusion if the section is applied to an array and iteratees accept only + * one argument. The heuristic for whether a section qualifies for shortcut + * fusion is subject to change. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, + * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, + * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, + * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, + * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, + * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, + * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, + * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, + * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, + * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, + * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, + * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, + * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, + * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, + * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, + * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, + * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, + * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, + * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, + * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, + * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, + * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, + * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, + * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, + * `zipObject`, `zipObjectDeep`, and `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` + * + * @name _ + * @constructor + * @category Seq + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2, 3]); + * + * // Returns an unwrapped value. + * wrapped.reduce(_.add); + * // => 6 + * + * // Returns a wrapped value. + * var squares = wrapped.map(square); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + return value instanceof LodashWrapper + ? value + : new LodashWrapper(value); + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; + }()); + + /** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ + function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + } + + LodashWrapper.prototype = baseCreate(lodash.prototype); + LodashWrapper.prototype.constructor = LodashWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } + + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + object[key] = value; + } + + /** + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. + */ + function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function() { func.apply(undefined, args); }, wait); + } + + /** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEach = createBaseEach(baseForOwn); + + /** + * The base implementation of `_.every` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ + function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; + } + + /** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ + function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !false) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; + } + + /** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; + } + + /** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + + /** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + /** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + + /** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ + function baseFunctions(object, props) { + return baseFilter(props, function(key) { + return isFunction(object[key]); + }); + } + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + return objectToString(value); + } + + /** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ + function baseGt(value, other) { + return value > other; + } + + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + var baseIsArguments = noop; + + /** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ + function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; + } + + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : baseGetTag(object), + othTag = othIsArr ? arrayTag : baseGetTag(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + stack || (stack = []); + var objStack = find(stack, function(entry) { + return entry[0] == object; + }); + var othStack = find(stack, function(entry) { + return entry[0] == other; + }); + if (objStack && othStack) { + return objStack[1] == other; + } + stack.push([object, other]); + stack.push([other, object]); + if (isSameTag && !objIsObj) { + var result = (objIsArr) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + stack.pop(); + return result; + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + var result = equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + stack.pop(); + return result; + } + } + if (!isSameTag) { + return false; + } + var result = equalObjects(object, other, bitmask, customizer, equalFunc, stack); + stack.pop(); + return result; + } + + /** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } + + /** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ + function baseIteratee(func) { + if (typeof func == 'function') { + return func; + } + if (func == null) { + return identity; + } + return (typeof func == 'object' ? baseMatches : baseProperty)(func); + } + + /** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ + function baseLt(value, other) { + return value < other; + } + + /** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; + } + + /** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatches(source) { + var props = nativeKeys(source); + return function(object) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length]; + if (!(key in object && + baseIsEqual(source[key], object[key], COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG) + )) { + return false; + } + } + return true; + }; + } + + /** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ + function basePick(object, props) { + object = Object(object); + return reduce(props, function(result, key) { + if (key in object) { + result[key] = object[key]; + } + return result; + }, {}); + } + + /** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); + } + + /** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function copyArray(source) { + return baseSlice(source, 0, source.length); + } + + /** + * The base implementation of `_.some` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function baseSome(collection, predicate) { + var result; + + baseEach(collection, function(value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; + } + + /** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to perform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ + function baseWrapperValue(value, actions) { + var result = value; + return reduce(actions, function(result, action) { + return action.func.apply(action.thisArg, arrayPush([result], action.args)); + }, result); + } + + /** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ + function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = false; + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = false; + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; + } + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; + } + + /** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + + /** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + + /** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + /** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ + function createCtor(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; + } + + /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ + function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = baseIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; + } + + /** + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to + * the new function. + * @returns {Function} Returns the new wrapped function. + */ + function createPartial(func, bitmask, thisArg, partials) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength), + fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return fn.apply(isBind ? thisArg : this, args); + } + return wrapper; + } + + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? [] : undefined; + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + var compared; + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!baseSome(other, function(othValue, othIndex) { + if (!indexOf(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + return result; + } + + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + } + return false; + } + + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = keys(object), + objLength = objProps.length, + othProps = keys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + var result = true; + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + var compared; + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + return result; + } + + /** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); + } + + /** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ + function isFlattenable(value) { + return isArray(value) || isArguments(value); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); + } + + /** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; + } + + /** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + /** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ + function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return func.apply(this, otherArgs); + }; + } + + /** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var setToString = identity; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + return baseFilter(array, Boolean); + } + + /** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ + function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, baseIteratee(predicate, 3), index); + } + + /** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ + function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; + } + + /** + * Recursively flattens `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] + */ + function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; + } + + /** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined + */ + function head(array) { + return (array && array.length) ? array[0] : undefined; + } + + /** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ + function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (typeof fromIndex == 'number') { + fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex; + } else { + fromIndex = 0; + } + var index = (fromIndex || 0) - 1, + isReflexive = value === value; + + while (++index < length) { + var other = array[index]; + if ((isReflexive ? other === value : other !== other)) { + return index; + } + } + return -1; + } + + /** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ + function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; + } + + /** + * Creates a slice of `array` from `start` up to, but not including, `end`. + * + * **Note:** This method is used instead of + * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are + * returned. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function slice(array, start, end) { + var length = array == null ? 0 : array.length; + start = start == null ? 0 : +start; + end = end === undefined ? length : +end; + return length ? baseSlice(array, start, end) : []; + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' + */ + function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; + } + + /** + * This method invokes `interceptor` and returns `value`. The interceptor + * is invoked with one argument; (value). The purpose of this method is to + * "tap into" a method chain sequence in order to modify intermediate results. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3]) + * .tap(function(array) { + * // Mutate input array. + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] + */ + function tap(value, interceptor) { + interceptor(value); + return value; + } + + /** + * This method is like `_.tap` except that it returns the result of `interceptor`. + * The purpose of this method is to "pass thru" values replacing intermediate + * results in a method chain sequence. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] + */ + function thru(value, interceptor) { + return interceptor(value); + } + + /** + * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. + * + * @name chain + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // A sequence without explicit chaining. + * _(users).head(); + * // => { 'user': 'barney', 'age': 36 } + * + * // A sequence with explicit chaining. + * _(users) + * .chain() + * .head() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } + */ + function wrapperChain() { + return chain(this); + } + + /** + * Executes the chain sequence to resolve the unwrapped value. + * + * @name value + * @memberOf _ + * @since 0.1.0 + * @alias toJSON, valueOf + * @category Seq + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] + */ + function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); + } + + /*------------------------------------------------------------------------*/ + + /** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false + */ + function every(collection, predicate, guard) { + predicate = guard ? undefined : predicate; + return baseEvery(collection, baseIteratee(predicate)); + } + + /** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + */ + function filter(collection, predicate) { + return baseFilter(collection, baseIteratee(predicate)); + } + + /** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ + var find = createFind(findIndex); + + /** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forEach(collection, iteratee) { + return baseEach(collection, baseIteratee(iteratee)); + } + + /** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ + function map(collection, iteratee) { + return baseMap(collection, baseIteratee(iteratee)); + } + + /** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ + function reduce(collection, iteratee, accumulator) { + return baseReduce(collection, baseIteratee(iteratee), accumulator, arguments.length < 3, baseEach); + } + + /** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + if (collection == null) { + return 0; + } + collection = isArrayLike(collection) ? collection : nativeKeys(collection); + return collection.length; + } + + /** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * Iteration is stopped once `predicate` returns truthy. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.some(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.some(users, 'active'); + * // => true + */ + function some(collection, predicate, guard) { + predicate = guard ? undefined : predicate; + return baseSome(collection, baseIteratee(predicate)); + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] + */ + function sortBy(collection, iteratee) { + var index = 0; + iteratee = baseIteratee(iteratee); + + return baseMap(baseMap(collection, function(value, key, collection) { + return { 'value': value, 'index': index++, 'criteria': iteratee(value, key, collection) }; + }).sort(function(object, other) { + return compareAscending(object.criteria, other.criteria) || (object.index - other.index); + }), baseProperty('value')); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. + */ + function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; + } + + /** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and `partials` prepended to the arguments it receives. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ + var bind = baseRest(function(func, thisArg, partials) { + return createPartial(func, WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG, thisArg, partials); + }); + + /** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. + */ + var defer = baseRest(function(func, args) { + return baseDelay(func, 1, args); + }); + + /** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. + */ + var delay = baseRest(function(func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); + }); + + /** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new negated function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ + function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function() { + var args = arguments; + return !predicate.apply(this, args); + }; + } + + /** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first invocation. The `func` is + * invoked with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // => `createApplication` is invoked once + */ + function once(func) { + return before(2, func); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ + function clone(value) { + if (!isObject(value)) { + return value; + } + return isArray(value) ? copyArray(value) : copyObject(value, nativeKeys(value)); + } + + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); + }; + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + + /** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return value === true || value === false || + (isObjectLike(value) && baseGetTag(value) == boolTag); + } + + /** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ + var isDate = baseIsDate; + + /** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ + function isEmpty(value) { + if (isArrayLike(value) && + (isArray(value) || isString(value) || + isFunction(value.splice) || isArguments(value))) { + return !value.length; + } + return !nativeKeys(value).length; + } + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ + function isEqual(value, other) { + return baseIsEqual(value, other); + } + + /** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on + * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(3); + * // => true + * + * _.isFinite(Number.MIN_VALUE); + * // => true + * + * _.isFinite(Infinity); + * // => false + * + * _.isFinite('3'); + * // => false + */ + function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + /** + * Checks if `value` is `NaN`. + * + * **Note:** This method is based on + * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as + * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for + * `undefined` and other non-number values. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some + // ActiveX objects in IE. + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ + function isNull(value) { + return value === null; + } + + /** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @example + * + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false + */ + function isNumber(value) { + return typeof value == 'number' || + (isObjectLike(value) && baseGetTag(value) == numberTag); + } + + /** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ + var isRegExp = baseIsRegExp; + + /** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ + function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); + } + + /** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ + function isUndefined(value) { + return value === undefined; + } + + /** + * Converts `value` to an array. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Array} Returns the converted array. + * @example + * + * _.toArray({ 'a': 1, 'b': 2 }); + * // => [1, 2] + * + * _.toArray('abc'); + * // => ['a', 'b', 'c'] + * + * _.toArray(1); + * // => [] + * + * _.toArray(null); + * // => [] + */ + function toArray(value) { + if (!isArrayLike(value)) { + return values(value); + } + return value.length ? copyArray(value) : []; + } + + /** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ + var toInteger = Number; + + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ + var toNumber = Number; + + /** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + function toString(value) { + if (typeof value == 'string') { + return value; + } + return value == null ? '' : (value + ''); + } + + /*------------------------------------------------------------------------*/ + + /** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ + var assign = createAssigner(function(object, source) { + copyObject(source, nativeKeys(source), object); + }); + + /** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assign + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + */ + var assignIn = createAssigner(function(object, source) { + copyObject(source, nativeKeysIn(source), object); + }); + + /** + * Creates an object that inherits from the `prototype` object. If a + * `properties` object is given, its own enumerable string keyed properties + * are assigned to the created object. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties) { + var result = baseCreate(prototype); + return properties == null ? result : assign(result, properties); + } + + /** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var defaults = baseRest(function(object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if (value === undefined || + (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } + } + + return object; + }); + + /** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ + function has(object, path) { + return object != null && hasOwnProperty.call(object, path); + } + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + var keys = nativeKeys; + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + var keysIn = nativeKeysIn; + + /** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ + var pick = flatRest(function(object, paths) { + return object == null ? {} : basePick(object, paths); + }); + + /** + * This method is like `_.get` except that if the resolved value is a + * function it's invoked with the `this` binding of its parent object and + * its result is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to resolve. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; + * + * _.result(object, 'a[0].b.c1'); + * // => 3 + * + * _.result(object, 'a[0].b.c2'); + * // => 4 + * + * _.result(object, 'a[0].b.c3', 'default'); + * // => 'default' + * + * _.result(object, 'a[0].b.c3', _.constant('default')); + * // => 'default' + */ + function result(object, path, defaultValue) { + var value = object == null ? undefined : object[path]; + if (value === undefined) { + value = defaultValue; + } + return isFunction(value) ? value.call(object) : value; + } + + /** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ + function values(object) { + return object == null ? [] : baseValues(object, keys(object)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional + * characters use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. See + * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * When working with HTML you should always + * [quote attribute values](http://wonko.com/post/html-escaping) to reduce + * XSS vectors. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function escape(string) { + string = toString(string); + return (string && reHasUnescapedHtml.test(string)) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; + } + + /*------------------------------------------------------------------------*/ + + /** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ + function identity(value) { + return value; + } + + /** + * Creates a function that invokes `func` with the arguments of the created + * function. If `func` is a property name, the created function returns the + * property value for a given element. If `func` is an array or object, the + * created function returns `true` for elements that contain the equivalent + * source properties, otherwise it returns `false`. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Util + * @param {*} [func=_.identity] The value to convert to a callback. + * @returns {Function} Returns the callback. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true })); + * // => [{ 'user': 'barney', 'age': 36, 'active': true }] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, _.iteratee(['user', 'fred'])); + * // => [{ 'user': 'fred', 'age': 40 }] + * + * // The `_.property` iteratee shorthand. + * _.map(users, _.iteratee('user')); + * // => ['barney', 'fred'] + * + * // Create custom iteratee shorthands. + * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) { + * return !_.isRegExp(func) ? iteratee(func) : function(string) { + * return func.test(string); + * }; + * }); + * + * _.filter(['abc', 'def'], /ef/); + * // => ['def'] + */ + var iteratee = baseIteratee; + + /** + * Creates a function that performs a partial deep comparison between a given + * object and `source`, returning `true` if the given object has equivalent + * property values, else `false`. + * + * **Note:** The created function is equivalent to `_.isMatch` with `source` + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } + * ]; + * + * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); + * // => [{ 'a': 4, 'b': 5, 'c': 6 }] + */ + function matches(source) { + return baseMatches(assign({}, source)); + } + + /** + * Adds all own enumerable string keyed function properties of a source + * object to the destination object. If `object` is a function, then methods + * are added to its prototype as well. + * + * **Note:** Use `_.runInContext` to create a pristine `lodash` function to + * avoid conflicts caused by modifying the original. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {Function|Object} [object=lodash] The destination object. + * @param {Object} source The object of functions to add. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.chain=true] Specify whether mixins are chainable. + * @returns {Function|Object} Returns `object`. + * @example + * + * function vowels(string) { + * return _.filter(string, function(v) { + * return /[aeiou]/i.test(v); + * }); + * } + * + * _.mixin({ 'vowels': vowels }); + * _.vowels('fred'); + * // => ['e'] + * + * _('fred').vowels().value(); + * // => ['e'] + * + * _.mixin({ 'vowels': vowels }, { 'chain': false }); + * _('fred').vowels(); + * // => ['e'] + */ + function mixin(object, source, options) { + var props = keys(source), + methodNames = baseFunctions(source, props); + + if (options == null && + !(isObject(source) && (methodNames.length || !props.length))) { + options = source; + source = object; + object = this; + methodNames = baseFunctions(source, keys(source)); + } + var chain = !(isObject(options) && 'chain' in options) || !!options.chain, + isFunc = isFunction(object); + + baseEach(methodNames, function(methodName) { + var func = source[methodName]; + object[methodName] = func; + if (isFunc) { + object.prototype[methodName] = function() { + var chainAll = this.__chain__; + if (chain || chainAll) { + var result = object(this.__wrapped__), + actions = result.__actions__ = copyArray(this.__actions__); + + actions.push({ 'func': func, 'args': arguments, 'thisArg': object }); + result.__chain__ = chainAll; + return result; + } + return func.apply(object, arrayPush([this.value()], arguments)); + }; + } + }); + + return object; + } + + /** + * Reverts the `_` variable to its previous value and returns a reference to + * the `lodash` function. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @returns {Function} Returns the `lodash` function. + * @example + * + * var lodash = _.noConflict(); + */ + function noConflict() { + if (root._ === this) { + root._ = oldDash; + } + return this; + } + + /** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ + function noop() { + // No operation performed. + } + + /** + * Generates a unique ID. If `prefix` is given, the ID is appended to it. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {string} [prefix=''] The value to prefix the ID with. + * @returns {string} Returns the unique ID. + * @example + * + * _.uniqueId('contact_'); + * // => 'contact_104' + * + * _.uniqueId(); + * // => '105' + */ + function uniqueId(prefix) { + var id = ++idCounter; + return toString(prefix) + id; + } + + /*------------------------------------------------------------------------*/ + + /** + * Computes the maximum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the maximum value. + * @example + * + * _.max([4, 2, 8, 6]); + * // => 8 + * + * _.max([]); + * // => undefined + */ + function max(array) { + return (array && array.length) + ? baseExtremum(array, identity, baseGt) + : undefined; + } + + /** + * Computes the minimum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the minimum value. + * @example + * + * _.min([4, 2, 8, 6]); + * // => 2 + * + * _.min([]); + * // => undefined + */ + function min(array) { + return (array && array.length) + ? baseExtremum(array, identity, baseLt) + : undefined; + } + + /*------------------------------------------------------------------------*/ + + // Add methods that return wrapped values in chain sequences. + lodash.assignIn = assignIn; + lodash.before = before; + lodash.bind = bind; + lodash.chain = chain; + lodash.compact = compact; + lodash.concat = concat; + lodash.create = create; + lodash.defaults = defaults; + lodash.defer = defer; + lodash.delay = delay; + lodash.filter = filter; + lodash.flatten = flatten; + lodash.flattenDeep = flattenDeep; + lodash.iteratee = iteratee; + lodash.keys = keys; + lodash.map = map; + lodash.matches = matches; + lodash.mixin = mixin; + lodash.negate = negate; + lodash.once = once; + lodash.pick = pick; + lodash.slice = slice; + lodash.sortBy = sortBy; + lodash.tap = tap; + lodash.thru = thru; + lodash.toArray = toArray; + lodash.values = values; + + // Add aliases. + lodash.extend = assignIn; + + // Add methods to `lodash.prototype`. + mixin(lodash, lodash); + + /*------------------------------------------------------------------------*/ + + // Add methods that return unwrapped values in chain sequences. + lodash.clone = clone; + lodash.escape = escape; + lodash.every = every; + lodash.find = find; + lodash.forEach = forEach; + lodash.has = has; + lodash.head = head; + lodash.identity = identity; + lodash.indexOf = indexOf; + lodash.isArguments = isArguments; + lodash.isArray = isArray; + lodash.isBoolean = isBoolean; + lodash.isDate = isDate; + lodash.isEmpty = isEmpty; + lodash.isEqual = isEqual; + lodash.isFinite = isFinite; + lodash.isFunction = isFunction; + lodash.isNaN = isNaN; + lodash.isNull = isNull; + lodash.isNumber = isNumber; + lodash.isObject = isObject; + lodash.isRegExp = isRegExp; + lodash.isString = isString; + lodash.isUndefined = isUndefined; + lodash.last = last; + lodash.max = max; + lodash.min = min; + lodash.noConflict = noConflict; + lodash.noop = noop; + lodash.reduce = reduce; + lodash.result = result; + lodash.size = size; + lodash.some = some; + lodash.uniqueId = uniqueId; + + // Add aliases. + lodash.each = forEach; + lodash.first = head; + + mixin(lodash, (function() { + var source = {}; + baseForOwn(lodash, function(func, methodName) { + if (!hasOwnProperty.call(lodash.prototype, methodName)) { + source[methodName] = func; + } + }); + return source; + }()), { 'chain': false }); + + /*------------------------------------------------------------------------*/ + + /** + * The semantic version number. + * + * @static + * @memberOf _ + * @type {string} + */ + lodash.VERSION = VERSION; + + // Add `Array` methods to `lodash.prototype`. + baseEach(['pop', 'join', 'replace', 'reverse', 'split', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) { + var func = (/^(?:replace|split)$/.test(methodName) ? String.prototype : arrayProto)[methodName], + chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru', + retUnwrapped = /^(?:pop|join|replace|shift)$/.test(methodName); + + lodash.prototype[methodName] = function() { + var args = arguments; + if (retUnwrapped && !this.__chain__) { + var value = this.value(); + return func.apply(isArray(value) ? value : [], args); + } + return this[chainName](function(value) { + return func.apply(isArray(value) ? value : [], args); + }); + }; + }); + + // Add chain sequence methods to the `lodash` wrapper. + lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue; + + /*--------------------------------------------------------------------------*/ + + // Some AMD build optimizers, like r.js, check for condition patterns like: + if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { + // Expose Lodash on the global object to prevent errors when Lodash is + // loaded by a script tag in the presence of an AMD loader. + // See http://requirejs.org/docs/errors.html#mismatch for more details. + // Use `_.noConflict` to remove Lodash from the global object. + root._ = lodash; + + // Define as an anonymous module so, through path mapping, it can be + // referenced as the "underscore" module. + define(function() { + return lodash; + }); + } + // Check for `exports` after `define` in case a build optimizer adds it. + else if (freeModule) { + // Export for Node.js. + (freeModule.exports = lodash)._ = lodash; + // Export for CommonJS support. + freeExports._ = lodash; + } + else { + // Export to the global object. + root._ = lodash; + } +}.call(this)); diff --git a/node_modules/lodash/core.min.js b/node_modules/lodash/core.min.js new file mode 100644 index 00000000..bb543ff5 --- /dev/null +++ b/node_modules/lodash/core.min.js @@ -0,0 +1,29 @@ +/** + * @license + * Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE + * Build: `lodash core -o ./dist/lodash.core.js` + */ +;(function(){function n(n){return H(n)&&pn.call(n,"callee")&&!yn.call(n,"callee")}function t(n,t){return n.push.apply(n,t),n}function r(n){return function(t){return null==t?Z:t[n]}}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return j(t,function(t){return n[t]})}function o(n){return n instanceof i?n:new i(n)}function i(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function c(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function"); +return setTimeout(function(){n.apply(Z,r)},t)}function f(n,t){var r=true;return mn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function a(n,t,r){for(var e=-1,u=n.length;++et}function b(n,t,r,e,u){return n===t||(null==n||null==t||!H(n)&&!H(t)?n!==n&&t!==t:y(n,t,r,e,b,u))}function y(n,t,r,e,u,o){var i=Nn(n),c=Nn(t),f=i?"[object Array]":hn.call(n),a=c?"[object Array]":hn.call(t),f="[object Arguments]"==f?"[object Object]":f,a="[object Arguments]"==a?"[object Object]":a,l="[object Object]"==f,c="[object Object]"==a,a=f==a;o||(o=[]);var p=An(o,function(t){return t[0]==n}),s=An(o,function(n){ +return n[0]==t});if(p&&s)return p[1]==t;if(o.push([n,t]),o.push([t,n]),a&&!l){if(i)r=T(n,t,r,e,u,o);else n:{switch(f){case"[object Boolean]":case"[object Date]":case"[object Number]":r=J(+n,+t);break n;case"[object Error]":r=n.name==t.name&&n.message==t.message;break n;case"[object RegExp]":case"[object String]":r=n==t+"";break n}r=false}return o.pop(),r}return 1&r||(i=l&&pn.call(n,"__wrapped__"),f=c&&pn.call(t,"__wrapped__"),!i&&!f)?!!a&&(r=B(n,t,r,e,u,o),o.pop(),r):(i=i?n.value():n,f=f?t.value():t, +r=u(i,f,r,e,o),o.pop(),r)}function g(n){return typeof n=="function"?n:null==n?X:(typeof n=="object"?d:r)(n)}function _(n,t){return nt&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++ei))return false;for(var c=-1,f=true,a=2&r?[]:Z;++cr?jn(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++rarguments.length,mn)}function G(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Fn(n), +function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=Z),r}}function J(n,t){return n===t||n!==n&&t!==t}function M(n){var t;return(t=null!=n)&&(t=n.length,t=typeof t=="number"&&-1=t),t&&!U(n)}function U(n){return!!V(n)&&(n=hn.call(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function V(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function H(n){return null!=n&&typeof n=="object"}function K(n){ +return typeof n=="number"||H(n)&&"[object Number]"==hn.call(n)}function L(n){return typeof n=="string"||!Nn(n)&&H(n)&&"[object String]"==hn.call(n)}function Q(n){return typeof n=="string"?n:null==n?"":n+""}function W(n){return null==n?[]:u(n,Dn(n))}function X(n){return n}function Y(n,r,e){var u=Dn(r),o=h(r,u);null!=e||V(r)&&(o.length||!u.length)||(e=r,r=n,n=this,o=h(r,Dn(r)));var i=!(V(e)&&"chain"in e&&!e.chain),c=U(n);return mn(o,function(e){var u=r[e];n[e]=u,c&&(n.prototype[e]=function(){var r=this.__chain__; +if(i||r){var e=n(this.__wrapped__);return(e.__actions__=A(this.__actions__)).push({func:u,args:arguments,thisArg:n}),e.__chain__=r,e}return u.apply(n,t([this.value()],arguments))})}),n}var Z,nn=1/0,tn=/[&<>"']/g,rn=RegExp(tn.source),en=/^(?:0|[1-9]\d*)$/,un=typeof self=="object"&&self&&self.Object===Object&&self,on=typeof global=="object"&&global&&global.Object===Object&&global||un||Function("return this")(),cn=(un=typeof exports=="object"&&exports&&!exports.nodeType&&exports)&&typeof module=="object"&&module&&!module.nodeType&&module,fn=function(n){ +return function(t){return null==n?Z:n[t]}}({"&":"&","<":"<",">":">",'"':""","'":"'"}),an=Array.prototype,ln=Object.prototype,pn=ln.hasOwnProperty,sn=0,hn=ln.toString,vn=on._,bn=Object.create,yn=ln.propertyIsEnumerable,gn=on.isFinite,_n=function(n,t){return function(r){return n(t(r))}}(Object.keys,Object),jn=Math.max,dn=function(){function n(){}return function(t){return V(t)?bn?bn(t):(n.prototype=t,t=new n,n.prototype=Z,t):{}}}();i.prototype=dn(o.prototype),i.prototype.constructor=i; +var mn=function(n,t){return function(r,e){if(null==r)return r;if(!M(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++or&&(r=jn(e+r,0));n:{for(t=g(t),e=n.length,r+=-1;++re||o&&c&&a||!u&&a||!i){r=1;break n}if(!o&&r { '4': 1, '6': 2 } + * + * // The `_.property` iteratee shorthand. + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ +var countBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + ++result[key]; + } else { + baseAssignValue(result, key, 1); + } +}); + +module.exports = countBy; diff --git a/node_modules/lodash/create.js b/node_modules/lodash/create.js new file mode 100644 index 00000000..919edb85 --- /dev/null +++ b/node_modules/lodash/create.js @@ -0,0 +1,43 @@ +var baseAssign = require('./_baseAssign'), + baseCreate = require('./_baseCreate'); + +/** + * Creates an object that inherits from the `prototype` object. If a + * `properties` object is given, its own enumerable string keyed properties + * are assigned to the created object. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ +function create(prototype, properties) { + var result = baseCreate(prototype); + return properties == null ? result : baseAssign(result, properties); +} + +module.exports = create; diff --git a/node_modules/lodash/curry.js b/node_modules/lodash/curry.js new file mode 100644 index 00000000..918db1a4 --- /dev/null +++ b/node_modules/lodash/curry.js @@ -0,0 +1,57 @@ +var createWrap = require('./_createWrap'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_CURRY_FLAG = 8; + +/** + * Creates a function that accepts arguments of `func` and either invokes + * `func` returning its result, if at least `arity` number of arguments have + * been provided, or returns a function that accepts the remaining `func` + * arguments, and so on. The arity of `func` may be specified if `func.length` + * is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(1)(_, 3)(2); + * // => [1, 2, 3] + */ +function curry(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curry.placeholder; + return result; +} + +// Assign default placeholders. +curry.placeholder = {}; + +module.exports = curry; diff --git a/node_modules/lodash/curryRight.js b/node_modules/lodash/curryRight.js new file mode 100644 index 00000000..c85b6f33 --- /dev/null +++ b/node_modules/lodash/curryRight.js @@ -0,0 +1,54 @@ +var createWrap = require('./_createWrap'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_CURRY_RIGHT_FLAG = 16; + +/** + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curryRight(abc); + * + * curried(3)(2)(1); + * // => [1, 2, 3] + * + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(3)(1, _)(2); + * // => [1, 2, 3] + */ +function curryRight(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curryRight.placeholder; + return result; +} + +// Assign default placeholders. +curryRight.placeholder = {}; + +module.exports = curryRight; diff --git a/node_modules/lodash/date.js b/node_modules/lodash/date.js new file mode 100644 index 00000000..cbf5b410 --- /dev/null +++ b/node_modules/lodash/date.js @@ -0,0 +1,3 @@ +module.exports = { + 'now': require('./now') +}; diff --git a/node_modules/lodash/debounce.js b/node_modules/lodash/debounce.js new file mode 100644 index 00000000..8f751d53 --- /dev/null +++ b/node_modules/lodash/debounce.js @@ -0,0 +1,191 @@ +var isObject = require('./isObject'), + now = require('./now'), + toNumber = require('./toNumber'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ +function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + timeWaiting = wait - timeSinceLastCall; + + return maxing + ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) + : timeWaiting; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + clearTimeout(timerId); + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; +} + +module.exports = debounce; diff --git a/node_modules/lodash/deburr.js b/node_modules/lodash/deburr.js new file mode 100644 index 00000000..f85e314a --- /dev/null +++ b/node_modules/lodash/deburr.js @@ -0,0 +1,45 @@ +var deburrLetter = require('./_deburrLetter'), + toString = require('./toString'); + +/** Used to match Latin Unicode letters (excluding mathematical operators). */ +var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + +/** Used to compose unicode character classes. */ +var rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange; + +/** Used to compose unicode capture groups. */ +var rsCombo = '[' + rsComboRange + ']'; + +/** + * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and + * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). + */ +var reComboMark = RegExp(rsCombo, 'g'); + +/** + * Deburrs `string` by converting + * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) + * letters to basic Latin letters and removing + * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to deburr. + * @returns {string} Returns the deburred string. + * @example + * + * _.deburr('déjà vu'); + * // => 'deja vu' + */ +function deburr(string) { + string = toString(string); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); +} + +module.exports = deburr; diff --git a/node_modules/lodash/defaultTo.js b/node_modules/lodash/defaultTo.js new file mode 100644 index 00000000..5b333592 --- /dev/null +++ b/node_modules/lodash/defaultTo.js @@ -0,0 +1,25 @@ +/** + * Checks `value` to determine whether a default value should be returned in + * its place. The `defaultValue` is returned if `value` is `NaN`, `null`, + * or `undefined`. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Util + * @param {*} value The value to check. + * @param {*} defaultValue The default value. + * @returns {*} Returns the resolved value. + * @example + * + * _.defaultTo(1, 10); + * // => 1 + * + * _.defaultTo(undefined, 10); + * // => 10 + */ +function defaultTo(value, defaultValue) { + return (value == null || value !== value) ? defaultValue : value; +} + +module.exports = defaultTo; diff --git a/node_modules/lodash/defaults.js b/node_modules/lodash/defaults.js new file mode 100644 index 00000000..c74df044 --- /dev/null +++ b/node_modules/lodash/defaults.js @@ -0,0 +1,64 @@ +var baseRest = require('./_baseRest'), + eq = require('./eq'), + isIterateeCall = require('./_isIterateeCall'), + keysIn = require('./keysIn'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var defaults = baseRest(function(object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if (value === undefined || + (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } + } + + return object; +}); + +module.exports = defaults; diff --git a/node_modules/lodash/defaultsDeep.js b/node_modules/lodash/defaultsDeep.js new file mode 100644 index 00000000..9b5fa3ee --- /dev/null +++ b/node_modules/lodash/defaultsDeep.js @@ -0,0 +1,30 @@ +var apply = require('./_apply'), + baseRest = require('./_baseRest'), + customDefaultsMerge = require('./_customDefaultsMerge'), + mergeWith = require('./mergeWith'); + +/** + * This method is like `_.defaults` except that it recursively assigns + * default properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaults + * @example + * + * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); + * // => { 'a': { 'b': 2, 'c': 3 } } + */ +var defaultsDeep = baseRest(function(args) { + args.push(undefined, customDefaultsMerge); + return apply(mergeWith, undefined, args); +}); + +module.exports = defaultsDeep; diff --git a/node_modules/lodash/defer.js b/node_modules/lodash/defer.js new file mode 100644 index 00000000..f6d6c6fa --- /dev/null +++ b/node_modules/lodash/defer.js @@ -0,0 +1,26 @@ +var baseDelay = require('./_baseDelay'), + baseRest = require('./_baseRest'); + +/** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. + */ +var defer = baseRest(function(func, args) { + return baseDelay(func, 1, args); +}); + +module.exports = defer; diff --git a/node_modules/lodash/delay.js b/node_modules/lodash/delay.js new file mode 100644 index 00000000..bd554796 --- /dev/null +++ b/node_modules/lodash/delay.js @@ -0,0 +1,28 @@ +var baseDelay = require('./_baseDelay'), + baseRest = require('./_baseRest'), + toNumber = require('./toNumber'); + +/** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. + */ +var delay = baseRest(function(func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); +}); + +module.exports = delay; diff --git a/node_modules/lodash/difference.js b/node_modules/lodash/difference.js new file mode 100644 index 00000000..fa28bb30 --- /dev/null +++ b/node_modules/lodash/difference.js @@ -0,0 +1,33 @@ +var baseDifference = require('./_baseDifference'), + baseFlatten = require('./_baseFlatten'), + baseRest = require('./_baseRest'), + isArrayLikeObject = require('./isArrayLikeObject'); + +/** + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * **Note:** Unlike `_.pullAll`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.without, _.xor + * @example + * + * _.difference([2, 1], [2, 3]); + * // => [1] + */ +var difference = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) + : []; +}); + +module.exports = difference; diff --git a/node_modules/lodash/differenceBy.js b/node_modules/lodash/differenceBy.js new file mode 100644 index 00000000..2cd63e7e --- /dev/null +++ b/node_modules/lodash/differenceBy.js @@ -0,0 +1,44 @@ +var baseDifference = require('./_baseDifference'), + baseFlatten = require('./_baseFlatten'), + baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), + isArrayLikeObject = require('./isArrayLikeObject'), + last = require('./last'); + +/** + * This method is like `_.difference` except that it accepts `iteratee` which + * is invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] + * + * // The `_.property` iteratee shorthand. + * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ +var differenceBy = baseRest(function(array, values) { + var iteratee = last(values); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), baseIteratee(iteratee, 2)) + : []; +}); + +module.exports = differenceBy; diff --git a/node_modules/lodash/differenceWith.js b/node_modules/lodash/differenceWith.js new file mode 100644 index 00000000..c0233f4b --- /dev/null +++ b/node_modules/lodash/differenceWith.js @@ -0,0 +1,40 @@ +var baseDifference = require('./_baseDifference'), + baseFlatten = require('./_baseFlatten'), + baseRest = require('./_baseRest'), + isArrayLikeObject = require('./isArrayLikeObject'), + last = require('./last'); + +/** + * This method is like `_.difference` except that it accepts `comparator` + * which is invoked to compare elements of `array` to `values`. The order and + * references of result values are determined by the first array. The comparator + * is invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * + * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); + * // => [{ 'x': 2, 'y': 1 }] + */ +var differenceWith = baseRest(function(array, values) { + var comparator = last(values); + if (isArrayLikeObject(comparator)) { + comparator = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) + : []; +}); + +module.exports = differenceWith; diff --git a/node_modules/lodash/divide.js b/node_modules/lodash/divide.js new file mode 100644 index 00000000..8cae0cd1 --- /dev/null +++ b/node_modules/lodash/divide.js @@ -0,0 +1,22 @@ +var createMathOperation = require('./_createMathOperation'); + +/** + * Divide two numbers. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Math + * @param {number} dividend The first number in a division. + * @param {number} divisor The second number in a division. + * @returns {number} Returns the quotient. + * @example + * + * _.divide(6, 4); + * // => 1.5 + */ +var divide = createMathOperation(function(dividend, divisor) { + return dividend / divisor; +}, 1); + +module.exports = divide; diff --git a/node_modules/lodash/drop.js b/node_modules/lodash/drop.js new file mode 100644 index 00000000..d5c3cbaa --- /dev/null +++ b/node_modules/lodash/drop.js @@ -0,0 +1,38 @@ +var baseSlice = require('./_baseSlice'), + toInteger = require('./toInteger'); + +/** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ +function drop(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, n < 0 ? 0 : n, length); +} + +module.exports = drop; diff --git a/node_modules/lodash/dropRight.js b/node_modules/lodash/dropRight.js new file mode 100644 index 00000000..441fe996 --- /dev/null +++ b/node_modules/lodash/dropRight.js @@ -0,0 +1,39 @@ +var baseSlice = require('./_baseSlice'), + toInteger = require('./toInteger'); + +/** + * Creates a slice of `array` with `n` elements dropped from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] + */ +function dropRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, 0, n < 0 ? 0 : n); +} + +module.exports = dropRight; diff --git a/node_modules/lodash/dropRightWhile.js b/node_modules/lodash/dropRightWhile.js new file mode 100644 index 00000000..9ad36a04 --- /dev/null +++ b/node_modules/lodash/dropRightWhile.js @@ -0,0 +1,45 @@ +var baseIteratee = require('./_baseIteratee'), + baseWhile = require('./_baseWhile'); + +/** + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.dropRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney'] + * + * // The `_.matches` iteratee shorthand. + * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropRightWhile(users, ['active', false]); + * // => objects for ['barney'] + * + * // The `_.property` iteratee shorthand. + * _.dropRightWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ +function dropRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, baseIteratee(predicate, 3), true, true) + : []; +} + +module.exports = dropRightWhile; diff --git a/node_modules/lodash/dropWhile.js b/node_modules/lodash/dropWhile.js new file mode 100644 index 00000000..903ef568 --- /dev/null +++ b/node_modules/lodash/dropWhile.js @@ -0,0 +1,45 @@ +var baseIteratee = require('./_baseIteratee'), + baseWhile = require('./_baseWhile'); + +/** + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.dropWhile(users, function(o) { return !o.active; }); + * // => objects for ['pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.dropWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropWhile(users, ['active', false]); + * // => objects for ['pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.dropWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ +function dropWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, baseIteratee(predicate, 3), true) + : []; +} + +module.exports = dropWhile; diff --git a/node_modules/lodash/each.js b/node_modules/lodash/each.js new file mode 100644 index 00000000..8800f420 --- /dev/null +++ b/node_modules/lodash/each.js @@ -0,0 +1 @@ +module.exports = require('./forEach'); diff --git a/node_modules/lodash/eachRight.js b/node_modules/lodash/eachRight.js new file mode 100644 index 00000000..3252b2ab --- /dev/null +++ b/node_modules/lodash/eachRight.js @@ -0,0 +1 @@ +module.exports = require('./forEachRight'); diff --git a/node_modules/lodash/endsWith.js b/node_modules/lodash/endsWith.js new file mode 100644 index 00000000..76fc866e --- /dev/null +++ b/node_modules/lodash/endsWith.js @@ -0,0 +1,43 @@ +var baseClamp = require('./_baseClamp'), + baseToString = require('./_baseToString'), + toInteger = require('./toInteger'), + toString = require('./toString'); + +/** + * Checks if `string` ends with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=string.length] The position to search up to. + * @returns {boolean} Returns `true` if `string` ends with `target`, + * else `false`. + * @example + * + * _.endsWith('abc', 'c'); + * // => true + * + * _.endsWith('abc', 'b'); + * // => false + * + * _.endsWith('abc', 'b', 2); + * // => true + */ +function endsWith(string, target, position) { + string = toString(string); + target = baseToString(target); + + var length = string.length; + position = position === undefined + ? length + : baseClamp(toInteger(position), 0, length); + + var end = position; + position -= target.length; + return position >= 0 && string.slice(position, end) == target; +} + +module.exports = endsWith; diff --git a/node_modules/lodash/entries.js b/node_modules/lodash/entries.js new file mode 100644 index 00000000..7a88df20 --- /dev/null +++ b/node_modules/lodash/entries.js @@ -0,0 +1 @@ +module.exports = require('./toPairs'); diff --git a/node_modules/lodash/entriesIn.js b/node_modules/lodash/entriesIn.js new file mode 100644 index 00000000..f6c6331c --- /dev/null +++ b/node_modules/lodash/entriesIn.js @@ -0,0 +1 @@ +module.exports = require('./toPairsIn'); diff --git a/node_modules/lodash/eq.js b/node_modules/lodash/eq.js new file mode 100644 index 00000000..a9406880 --- /dev/null +++ b/node_modules/lodash/eq.js @@ -0,0 +1,37 @@ +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +module.exports = eq; diff --git a/node_modules/lodash/escape.js b/node_modules/lodash/escape.js new file mode 100644 index 00000000..9247e002 --- /dev/null +++ b/node_modules/lodash/escape.js @@ -0,0 +1,43 @@ +var escapeHtmlChar = require('./_escapeHtmlChar'), + toString = require('./toString'); + +/** Used to match HTML entities and HTML characters. */ +var reUnescapedHtml = /[&<>"']/g, + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + +/** + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional + * characters use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. See + * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * When working with HTML you should always + * [quote attribute values](http://wonko.com/post/html-escaping) to reduce + * XSS vectors. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ +function escape(string) { + string = toString(string); + return (string && reHasUnescapedHtml.test(string)) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; +} + +module.exports = escape; diff --git a/node_modules/lodash/escapeRegExp.js b/node_modules/lodash/escapeRegExp.js new file mode 100644 index 00000000..0a58c69f --- /dev/null +++ b/node_modules/lodash/escapeRegExp.js @@ -0,0 +1,32 @@ +var toString = require('./toString'); + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, + reHasRegExpChar = RegExp(reRegExpChar.source); + +/** + * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", + * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escapeRegExp('[lodash](https://lodash.com/)'); + * // => '\[lodash\]\(https://lodash\.com/\)' + */ +function escapeRegExp(string) { + string = toString(string); + return (string && reHasRegExpChar.test(string)) + ? string.replace(reRegExpChar, '\\$&') + : string; +} + +module.exports = escapeRegExp; diff --git a/node_modules/lodash/every.js b/node_modules/lodash/every.js new file mode 100644 index 00000000..25080dac --- /dev/null +++ b/node_modules/lodash/every.js @@ -0,0 +1,56 @@ +var arrayEvery = require('./_arrayEvery'), + baseEvery = require('./_baseEvery'), + baseIteratee = require('./_baseIteratee'), + isArray = require('./isArray'), + isIterateeCall = require('./_isIterateeCall'); + +/** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false + */ +function every(collection, predicate, guard) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, baseIteratee(predicate, 3)); +} + +module.exports = every; diff --git a/node_modules/lodash/extend.js b/node_modules/lodash/extend.js new file mode 100644 index 00000000..e00166c2 --- /dev/null +++ b/node_modules/lodash/extend.js @@ -0,0 +1 @@ +module.exports = require('./assignIn'); diff --git a/node_modules/lodash/extendWith.js b/node_modules/lodash/extendWith.js new file mode 100644 index 00000000..dbdcb3b4 --- /dev/null +++ b/node_modules/lodash/extendWith.js @@ -0,0 +1 @@ +module.exports = require('./assignInWith'); diff --git a/node_modules/lodash/fill.js b/node_modules/lodash/fill.js new file mode 100644 index 00000000..ae13aa1c --- /dev/null +++ b/node_modules/lodash/fill.js @@ -0,0 +1,45 @@ +var baseFill = require('./_baseFill'), + isIterateeCall = require('./_isIterateeCall'); + +/** + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. + * + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] + */ +function fill(array, value, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); +} + +module.exports = fill; diff --git a/node_modules/lodash/filter.js b/node_modules/lodash/filter.js new file mode 100644 index 00000000..52616be8 --- /dev/null +++ b/node_modules/lodash/filter.js @@ -0,0 +1,48 @@ +var arrayFilter = require('./_arrayFilter'), + baseFilter = require('./_baseFilter'), + baseIteratee = require('./_baseIteratee'), + isArray = require('./isArray'); + +/** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + */ +function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, baseIteratee(predicate, 3)); +} + +module.exports = filter; diff --git a/node_modules/lodash/find.js b/node_modules/lodash/find.js new file mode 100644 index 00000000..de732ccb --- /dev/null +++ b/node_modules/lodash/find.js @@ -0,0 +1,42 @@ +var createFind = require('./_createFind'), + findIndex = require('./findIndex'); + +/** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ +var find = createFind(findIndex); + +module.exports = find; diff --git a/node_modules/lodash/findIndex.js b/node_modules/lodash/findIndex.js new file mode 100644 index 00000000..4689069f --- /dev/null +++ b/node_modules/lodash/findIndex.js @@ -0,0 +1,55 @@ +var baseFindIndex = require('./_baseFindIndex'), + baseIteratee = require('./_baseIteratee'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ +function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, baseIteratee(predicate, 3), index); +} + +module.exports = findIndex; diff --git a/node_modules/lodash/findKey.js b/node_modules/lodash/findKey.js new file mode 100644 index 00000000..cac0248a --- /dev/null +++ b/node_modules/lodash/findKey.js @@ -0,0 +1,44 @@ +var baseFindKey = require('./_baseFindKey'), + baseForOwn = require('./_baseForOwn'), + baseIteratee = require('./_baseIteratee'); + +/** + * This method is like `_.find` except that it returns the key of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findKey(users, function(o) { return o.age < 40; }); + * // => 'barney' (iteration order is not guaranteed) + * + * // The `_.matches` iteratee shorthand. + * _.findKey(users, { 'age': 1, 'active': true }); + * // => 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findKey(users, 'active'); + * // => 'barney' + */ +function findKey(object, predicate) { + return baseFindKey(object, baseIteratee(predicate, 3), baseForOwn); +} + +module.exports = findKey; diff --git a/node_modules/lodash/findLast.js b/node_modules/lodash/findLast.js new file mode 100644 index 00000000..70b4271d --- /dev/null +++ b/node_modules/lodash/findLast.js @@ -0,0 +1,25 @@ +var createFind = require('./_createFind'), + findLastIndex = require('./findLastIndex'); + +/** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=collection.length-1] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ +var findLast = createFind(findLastIndex); + +module.exports = findLast; diff --git a/node_modules/lodash/findLastIndex.js b/node_modules/lodash/findLastIndex.js new file mode 100644 index 00000000..7da3431f --- /dev/null +++ b/node_modules/lodash/findLastIndex.js @@ -0,0 +1,59 @@ +var baseFindIndex = require('./_baseFindIndex'), + baseIteratee = require('./_baseIteratee'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); + * // => 2 + * + * // The `_.matches` iteratee shorthand. + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastIndex(users, ['active', false]); + * // => 2 + * + * // The `_.property` iteratee shorthand. + * _.findLastIndex(users, 'active'); + * // => 0 + */ +function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = fromIndex < 0 + ? nativeMax(length + index, 0) + : nativeMin(index, length - 1); + } + return baseFindIndex(array, baseIteratee(predicate, 3), index, true); +} + +module.exports = findLastIndex; diff --git a/node_modules/lodash/findLastKey.js b/node_modules/lodash/findLastKey.js new file mode 100644 index 00000000..66fb9fbc --- /dev/null +++ b/node_modules/lodash/findLastKey.js @@ -0,0 +1,44 @@ +var baseFindKey = require('./_baseFindKey'), + baseForOwnRight = require('./_baseForOwnRight'), + baseIteratee = require('./_baseIteratee'); + +/** + * This method is like `_.findKey` except that it iterates over elements of + * a collection in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findLastKey(users, function(o) { return o.age < 40; }); + * // => returns 'pebbles' assuming `_.findKey` returns 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.findLastKey(users, { 'age': 36, 'active': true }); + * // => 'barney' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findLastKey(users, 'active'); + * // => 'pebbles' + */ +function findLastKey(object, predicate) { + return baseFindKey(object, baseIteratee(predicate, 3), baseForOwnRight); +} + +module.exports = findLastKey; diff --git a/node_modules/lodash/first.js b/node_modules/lodash/first.js new file mode 100644 index 00000000..53f4ad13 --- /dev/null +++ b/node_modules/lodash/first.js @@ -0,0 +1 @@ +module.exports = require('./head'); diff --git a/node_modules/lodash/flatMap.js b/node_modules/lodash/flatMap.js new file mode 100644 index 00000000..e6685068 --- /dev/null +++ b/node_modules/lodash/flatMap.js @@ -0,0 +1,29 @@ +var baseFlatten = require('./_baseFlatten'), + map = require('./map'); + +/** + * Creates a flattened array of values by running each element in `collection` + * thru `iteratee` and flattening the mapped results. The iteratee is invoked + * with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [n, n]; + * } + * + * _.flatMap([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ +function flatMap(collection, iteratee) { + return baseFlatten(map(collection, iteratee), 1); +} + +module.exports = flatMap; diff --git a/node_modules/lodash/flatMapDeep.js b/node_modules/lodash/flatMapDeep.js new file mode 100644 index 00000000..4653d603 --- /dev/null +++ b/node_modules/lodash/flatMapDeep.js @@ -0,0 +1,31 @@ +var baseFlatten = require('./_baseFlatten'), + map = require('./map'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDeep([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ +function flatMapDeep(collection, iteratee) { + return baseFlatten(map(collection, iteratee), INFINITY); +} + +module.exports = flatMapDeep; diff --git a/node_modules/lodash/flatMapDepth.js b/node_modules/lodash/flatMapDepth.js new file mode 100644 index 00000000..6d72005c --- /dev/null +++ b/node_modules/lodash/flatMapDepth.js @@ -0,0 +1,31 @@ +var baseFlatten = require('./_baseFlatten'), + map = require('./map'), + toInteger = require('./toInteger'); + +/** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDepth([1, 2], duplicate, 2); + * // => [[1, 1], [2, 2]] + */ +function flatMapDepth(collection, iteratee, depth) { + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(map(collection, iteratee), depth); +} + +module.exports = flatMapDepth; diff --git a/node_modules/lodash/flatten.js b/node_modules/lodash/flatten.js new file mode 100644 index 00000000..3f09f7f7 --- /dev/null +++ b/node_modules/lodash/flatten.js @@ -0,0 +1,22 @@ +var baseFlatten = require('./_baseFlatten'); + +/** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ +function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; +} + +module.exports = flatten; diff --git a/node_modules/lodash/flattenDeep.js b/node_modules/lodash/flattenDeep.js new file mode 100644 index 00000000..8ad585cf --- /dev/null +++ b/node_modules/lodash/flattenDeep.js @@ -0,0 +1,25 @@ +var baseFlatten = require('./_baseFlatten'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Recursively flattens `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] + */ +function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; +} + +module.exports = flattenDeep; diff --git a/node_modules/lodash/flattenDepth.js b/node_modules/lodash/flattenDepth.js new file mode 100644 index 00000000..441fdcc2 --- /dev/null +++ b/node_modules/lodash/flattenDepth.js @@ -0,0 +1,33 @@ +var baseFlatten = require('./_baseFlatten'), + toInteger = require('./toInteger'); + +/** + * Recursively flatten `array` up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Array + * @param {Array} array The array to flatten. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * var array = [1, [2, [3, [4]], 5]]; + * + * _.flattenDepth(array, 1); + * // => [1, 2, [3, [4]], 5] + * + * _.flattenDepth(array, 2); + * // => [1, 2, 3, [4], 5] + */ +function flattenDepth(array, depth) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(array, depth); +} + +module.exports = flattenDepth; diff --git a/node_modules/lodash/flip.js b/node_modules/lodash/flip.js new file mode 100644 index 00000000..c28dd789 --- /dev/null +++ b/node_modules/lodash/flip.js @@ -0,0 +1,28 @@ +var createWrap = require('./_createWrap'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_FLIP_FLAG = 512; + +/** + * Creates a function that invokes `func` with arguments reversed. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to flip arguments for. + * @returns {Function} Returns the new flipped function. + * @example + * + * var flipped = _.flip(function() { + * return _.toArray(arguments); + * }); + * + * flipped('a', 'b', 'c', 'd'); + * // => ['d', 'c', 'b', 'a'] + */ +function flip(func) { + return createWrap(func, WRAP_FLIP_FLAG); +} + +module.exports = flip; diff --git a/node_modules/lodash/floor.js b/node_modules/lodash/floor.js new file mode 100644 index 00000000..ab6dfa28 --- /dev/null +++ b/node_modules/lodash/floor.js @@ -0,0 +1,26 @@ +var createRound = require('./_createRound'); + +/** + * Computes `number` rounded down to `precision`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Math + * @param {number} number The number to round down. + * @param {number} [precision=0] The precision to round down to. + * @returns {number} Returns the rounded down number. + * @example + * + * _.floor(4.006); + * // => 4 + * + * _.floor(0.046, 2); + * // => 0.04 + * + * _.floor(4060, -2); + * // => 4000 + */ +var floor = createRound('floor'); + +module.exports = floor; diff --git a/node_modules/lodash/flow.js b/node_modules/lodash/flow.js new file mode 100644 index 00000000..74b6b62d --- /dev/null +++ b/node_modules/lodash/flow.js @@ -0,0 +1,27 @@ +var createFlow = require('./_createFlow'); + +/** + * Creates a function that returns the result of invoking the given functions + * with the `this` binding of the created function, where each successive + * invocation is supplied the return value of the previous. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. + * @see _.flowRight + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flow([_.add, square]); + * addSquare(1, 2); + * // => 9 + */ +var flow = createFlow(); + +module.exports = flow; diff --git a/node_modules/lodash/flowRight.js b/node_modules/lodash/flowRight.js new file mode 100644 index 00000000..11461410 --- /dev/null +++ b/node_modules/lodash/flowRight.js @@ -0,0 +1,26 @@ +var createFlow = require('./_createFlow'); + +/** + * This method is like `_.flow` except that it creates a function that + * invokes the given functions from right to left. + * + * @static + * @since 3.0.0 + * @memberOf _ + * @category Util + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. + * @see _.flow + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flowRight([square, _.add]); + * addSquare(1, 2); + * // => 9 + */ +var flowRight = createFlow(true); + +module.exports = flowRight; diff --git a/node_modules/lodash/forEach.js b/node_modules/lodash/forEach.js new file mode 100644 index 00000000..c64eaa73 --- /dev/null +++ b/node_modules/lodash/forEach.js @@ -0,0 +1,41 @@ +var arrayEach = require('./_arrayEach'), + baseEach = require('./_baseEach'), + castFunction = require('./_castFunction'), + isArray = require('./isArray'); + +/** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, castFunction(iteratee)); +} + +module.exports = forEach; diff --git a/node_modules/lodash/forEachRight.js b/node_modules/lodash/forEachRight.js new file mode 100644 index 00000000..7390ebaf --- /dev/null +++ b/node_modules/lodash/forEachRight.js @@ -0,0 +1,31 @@ +var arrayEachRight = require('./_arrayEachRight'), + baseEachRight = require('./_baseEachRight'), + castFunction = require('./_castFunction'), + isArray = require('./isArray'); + +/** + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @alias eachRight + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEach + * @example + * + * _.forEachRight([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `2` then `1`. + */ +function forEachRight(collection, iteratee) { + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, castFunction(iteratee)); +} + +module.exports = forEachRight; diff --git a/node_modules/lodash/forIn.js b/node_modules/lodash/forIn.js new file mode 100644 index 00000000..583a5963 --- /dev/null +++ b/node_modules/lodash/forIn.js @@ -0,0 +1,39 @@ +var baseFor = require('./_baseFor'), + castFunction = require('./_castFunction'), + keysIn = require('./keysIn'); + +/** + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + */ +function forIn(object, iteratee) { + return object == null + ? object + : baseFor(object, castFunction(iteratee), keysIn); +} + +module.exports = forIn; diff --git a/node_modules/lodash/forInRight.js b/node_modules/lodash/forInRight.js new file mode 100644 index 00000000..4aedf58a --- /dev/null +++ b/node_modules/lodash/forInRight.js @@ -0,0 +1,37 @@ +var baseForRight = require('./_baseForRight'), + castFunction = require('./_castFunction'), + keysIn = require('./keysIn'); + +/** + * This method is like `_.forIn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forIn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forInRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. + */ +function forInRight(object, iteratee) { + return object == null + ? object + : baseForRight(object, castFunction(iteratee), keysIn); +} + +module.exports = forInRight; diff --git a/node_modules/lodash/forOwn.js b/node_modules/lodash/forOwn.js new file mode 100644 index 00000000..94eed840 --- /dev/null +++ b/node_modules/lodash/forOwn.js @@ -0,0 +1,36 @@ +var baseForOwn = require('./_baseForOwn'), + castFunction = require('./_castFunction'); + +/** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forOwn(object, iteratee) { + return object && baseForOwn(object, castFunction(iteratee)); +} + +module.exports = forOwn; diff --git a/node_modules/lodash/forOwnRight.js b/node_modules/lodash/forOwnRight.js new file mode 100644 index 00000000..86f338f0 --- /dev/null +++ b/node_modules/lodash/forOwnRight.js @@ -0,0 +1,34 @@ +var baseForOwnRight = require('./_baseForOwnRight'), + castFunction = require('./_castFunction'); + +/** + * This method is like `_.forOwn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwnRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. + */ +function forOwnRight(object, iteratee) { + return object && baseForOwnRight(object, castFunction(iteratee)); +} + +module.exports = forOwnRight; diff --git a/node_modules/lodash/fp.js b/node_modules/lodash/fp.js new file mode 100644 index 00000000..e372dbbd --- /dev/null +++ b/node_modules/lodash/fp.js @@ -0,0 +1,2 @@ +var _ = require('./lodash.min').runInContext(); +module.exports = require('./fp/_baseConvert')(_, _); diff --git a/node_modules/lodash/fp/F.js b/node_modules/lodash/fp/F.js new file mode 100644 index 00000000..a05a63ad --- /dev/null +++ b/node_modules/lodash/fp/F.js @@ -0,0 +1 @@ +module.exports = require('./stubFalse'); diff --git a/node_modules/lodash/fp/T.js b/node_modules/lodash/fp/T.js new file mode 100644 index 00000000..e2ba8ea5 --- /dev/null +++ b/node_modules/lodash/fp/T.js @@ -0,0 +1 @@ +module.exports = require('./stubTrue'); diff --git a/node_modules/lodash/fp/__.js b/node_modules/lodash/fp/__.js new file mode 100644 index 00000000..4af98deb --- /dev/null +++ b/node_modules/lodash/fp/__.js @@ -0,0 +1 @@ +module.exports = require('./placeholder'); diff --git a/node_modules/lodash/fp/_baseConvert.js b/node_modules/lodash/fp/_baseConvert.js new file mode 100644 index 00000000..9baf8e19 --- /dev/null +++ b/node_modules/lodash/fp/_baseConvert.js @@ -0,0 +1,569 @@ +var mapping = require('./_mapping'), + fallbackHolder = require('./placeholder'); + +/** Built-in value reference. */ +var push = Array.prototype.push; + +/** + * Creates a function, with an arity of `n`, that invokes `func` with the + * arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} n The arity of the new function. + * @returns {Function} Returns the new function. + */ +function baseArity(func, n) { + return n == 2 + ? function(a, b) { return func.apply(undefined, arguments); } + : function(a) { return func.apply(undefined, arguments); }; +} + +/** + * Creates a function that invokes `func`, with up to `n` arguments, ignoring + * any additional arguments. + * + * @private + * @param {Function} func The function to cap arguments for. + * @param {number} n The arity cap. + * @returns {Function} Returns the new function. + */ +function baseAry(func, n) { + return n == 2 + ? function(a, b) { return func(a, b); } + : function(a) { return func(a); }; +} + +/** + * Creates a clone of `array`. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the cloned array. + */ +function cloneArray(array) { + var length = array ? array.length : 0, + result = Array(length); + + while (length--) { + result[length] = array[length]; + } + return result; +} + +/** + * Creates a function that clones a given object using the assignment `func`. + * + * @private + * @param {Function} func The assignment function. + * @returns {Function} Returns the new cloner function. + */ +function createCloner(func) { + return function(object) { + return func({}, object); + }; +} + +/** + * A specialized version of `_.spread` which flattens the spread array into + * the arguments of the invoked `func`. + * + * @private + * @param {Function} func The function to spread arguments over. + * @param {number} start The start position of the spread. + * @returns {Function} Returns the new function. + */ +function flatSpread(func, start) { + return function() { + var length = arguments.length, + lastIndex = length - 1, + args = Array(length); + + while (length--) { + args[length] = arguments[length]; + } + var array = args[start], + otherArgs = args.slice(0, start); + + if (array) { + push.apply(otherArgs, array); + } + if (start != lastIndex) { + push.apply(otherArgs, args.slice(start + 1)); + } + return func.apply(this, otherArgs); + }; +} + +/** + * Creates a function that wraps `func` and uses `cloner` to clone the first + * argument it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} cloner The function to clone arguments. + * @returns {Function} Returns the new immutable function. + */ +function wrapImmutable(func, cloner) { + return function() { + var length = arguments.length; + if (!length) { + return; + } + var args = Array(length); + while (length--) { + args[length] = arguments[length]; + } + var result = args[0] = cloner.apply(undefined, args); + func.apply(undefined, args); + return result; + }; +} + +/** + * The base implementation of `convert` which accepts a `util` object of methods + * required to perform conversions. + * + * @param {Object} util The util object. + * @param {string} name The name of the function to convert. + * @param {Function} func The function to convert. + * @param {Object} [options] The options object. + * @param {boolean} [options.cap=true] Specify capping iteratee arguments. + * @param {boolean} [options.curry=true] Specify currying. + * @param {boolean} [options.fixed=true] Specify fixed arity. + * @param {boolean} [options.immutable=true] Specify immutable operations. + * @param {boolean} [options.rearg=true] Specify rearranging arguments. + * @returns {Function|Object} Returns the converted function or object. + */ +function baseConvert(util, name, func, options) { + var isLib = typeof name == 'function', + isObj = name === Object(name); + + if (isObj) { + options = func; + func = name; + name = undefined; + } + if (func == null) { + throw new TypeError; + } + options || (options = {}); + + var config = { + 'cap': 'cap' in options ? options.cap : true, + 'curry': 'curry' in options ? options.curry : true, + 'fixed': 'fixed' in options ? options.fixed : true, + 'immutable': 'immutable' in options ? options.immutable : true, + 'rearg': 'rearg' in options ? options.rearg : true + }; + + var defaultHolder = isLib ? func : fallbackHolder, + forceCurry = ('curry' in options) && options.curry, + forceFixed = ('fixed' in options) && options.fixed, + forceRearg = ('rearg' in options) && options.rearg, + pristine = isLib ? func.runInContext() : undefined; + + var helpers = isLib ? func : { + 'ary': util.ary, + 'assign': util.assign, + 'clone': util.clone, + 'curry': util.curry, + 'forEach': util.forEach, + 'isArray': util.isArray, + 'isError': util.isError, + 'isFunction': util.isFunction, + 'isWeakMap': util.isWeakMap, + 'iteratee': util.iteratee, + 'keys': util.keys, + 'rearg': util.rearg, + 'toInteger': util.toInteger, + 'toPath': util.toPath + }; + + var ary = helpers.ary, + assign = helpers.assign, + clone = helpers.clone, + curry = helpers.curry, + each = helpers.forEach, + isArray = helpers.isArray, + isError = helpers.isError, + isFunction = helpers.isFunction, + isWeakMap = helpers.isWeakMap, + keys = helpers.keys, + rearg = helpers.rearg, + toInteger = helpers.toInteger, + toPath = helpers.toPath; + + var aryMethodKeys = keys(mapping.aryMethod); + + var wrappers = { + 'castArray': function(castArray) { + return function() { + var value = arguments[0]; + return isArray(value) + ? castArray(cloneArray(value)) + : castArray.apply(undefined, arguments); + }; + }, + 'iteratee': function(iteratee) { + return function() { + var func = arguments[0], + arity = arguments[1], + result = iteratee(func, arity), + length = result.length; + + if (config.cap && typeof arity == 'number') { + arity = arity > 2 ? (arity - 2) : 1; + return (length && length <= arity) ? result : baseAry(result, arity); + } + return result; + }; + }, + 'mixin': function(mixin) { + return function(source) { + var func = this; + if (!isFunction(func)) { + return mixin(func, Object(source)); + } + var pairs = []; + each(keys(source), function(key) { + if (isFunction(source[key])) { + pairs.push([key, func.prototype[key]]); + } + }); + + mixin(func, Object(source)); + + each(pairs, function(pair) { + var value = pair[1]; + if (isFunction(value)) { + func.prototype[pair[0]] = value; + } else { + delete func.prototype[pair[0]]; + } + }); + return func; + }; + }, + 'nthArg': function(nthArg) { + return function(n) { + var arity = n < 0 ? 1 : (toInteger(n) + 1); + return curry(nthArg(n), arity); + }; + }, + 'rearg': function(rearg) { + return function(func, indexes) { + var arity = indexes ? indexes.length : 0; + return curry(rearg(func, indexes), arity); + }; + }, + 'runInContext': function(runInContext) { + return function(context) { + return baseConvert(util, runInContext(context), options); + }; + } + }; + + /*--------------------------------------------------------------------------*/ + + /** + * Casts `func` to a function with an arity capped iteratee if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @returns {Function} Returns the cast function. + */ + function castCap(name, func) { + if (config.cap) { + var indexes = mapping.iterateeRearg[name]; + if (indexes) { + return iterateeRearg(func, indexes); + } + var n = !isLib && mapping.iterateeAry[name]; + if (n) { + return iterateeAry(func, n); + } + } + return func; + } + + /** + * Casts `func` to a curried function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity of `func`. + * @returns {Function} Returns the cast function. + */ + function castCurry(name, func, n) { + return (forceCurry || (config.curry && n > 1)) + ? curry(func, n) + : func; + } + + /** + * Casts `func` to a fixed arity function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity cap. + * @returns {Function} Returns the cast function. + */ + function castFixed(name, func, n) { + if (config.fixed && (forceFixed || !mapping.skipFixed[name])) { + var data = mapping.methodSpread[name], + start = data && data.start; + + return start === undefined ? ary(func, n) : flatSpread(func, start); + } + return func; + } + + /** + * Casts `func` to an rearged function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity of `func`. + * @returns {Function} Returns the cast function. + */ + function castRearg(name, func, n) { + return (config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name])) + ? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n]) + : func; + } + + /** + * Creates a clone of `object` by `path`. + * + * @private + * @param {Object} object The object to clone. + * @param {Array|string} path The path to clone by. + * @returns {Object} Returns the cloned object. + */ + function cloneByPath(object, path) { + path = toPath(path); + + var index = -1, + length = path.length, + lastIndex = length - 1, + result = clone(Object(object)), + nested = result; + + while (nested != null && ++index < length) { + var key = path[index], + value = nested[key]; + + if (value != null && + !(isFunction(value) || isError(value) || isWeakMap(value))) { + nested[key] = clone(index == lastIndex ? value : Object(value)); + } + nested = nested[key]; + } + return result; + } + + /** + * Converts `lodash` to an immutable auto-curried iteratee-first data-last + * version with conversion `options` applied. + * + * @param {Object} [options] The options object. See `baseConvert` for more details. + * @returns {Function} Returns the converted `lodash`. + */ + function convertLib(options) { + return _.runInContext.convert(options)(undefined); + } + + /** + * Create a converter function for `func` of `name`. + * + * @param {string} name The name of the function to convert. + * @param {Function} func The function to convert. + * @returns {Function} Returns the new converter function. + */ + function createConverter(name, func) { + var realName = mapping.aliasToReal[name] || name, + methodName = mapping.remap[realName] || realName, + oldOptions = options; + + return function(options) { + var newUtil = isLib ? pristine : helpers, + newFunc = isLib ? pristine[methodName] : func, + newOptions = assign(assign({}, oldOptions), options); + + return baseConvert(newUtil, realName, newFunc, newOptions); + }; + } + + /** + * Creates a function that wraps `func` to invoke its iteratee, with up to `n` + * arguments, ignoring any additional arguments. + * + * @private + * @param {Function} func The function to cap iteratee arguments for. + * @param {number} n The arity cap. + * @returns {Function} Returns the new function. + */ + function iterateeAry(func, n) { + return overArg(func, function(func) { + return typeof func == 'function' ? baseAry(func, n) : func; + }); + } + + /** + * Creates a function that wraps `func` to invoke its iteratee with arguments + * arranged according to the specified `indexes` where the argument value at + * the first index is provided as the first argument, the argument value at + * the second index is provided as the second argument, and so on. + * + * @private + * @param {Function} func The function to rearrange iteratee arguments for. + * @param {number[]} indexes The arranged argument indexes. + * @returns {Function} Returns the new function. + */ + function iterateeRearg(func, indexes) { + return overArg(func, function(func) { + var n = indexes.length; + return baseArity(rearg(baseAry(func, n), indexes), n); + }); + } + + /** + * Creates a function that invokes `func` with its first argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function() { + var length = arguments.length; + if (!length) { + return func(); + } + var args = Array(length); + while (length--) { + args[length] = arguments[length]; + } + var index = config.rearg ? 0 : (length - 1); + args[index] = transform(args[index]); + return func.apply(undefined, args); + }; + } + + /** + * Creates a function that wraps `func` and applys the conversions + * rules by `name`. + * + * @private + * @param {string} name The name of the function to wrap. + * @param {Function} func The function to wrap. + * @returns {Function} Returns the converted function. + */ + function wrap(name, func, placeholder) { + var result, + realName = mapping.aliasToReal[name] || name, + wrapped = func, + wrapper = wrappers[realName]; + + if (wrapper) { + wrapped = wrapper(func); + } + else if (config.immutable) { + if (mapping.mutate.array[realName]) { + wrapped = wrapImmutable(func, cloneArray); + } + else if (mapping.mutate.object[realName]) { + wrapped = wrapImmutable(func, createCloner(func)); + } + else if (mapping.mutate.set[realName]) { + wrapped = wrapImmutable(func, cloneByPath); + } + } + each(aryMethodKeys, function(aryKey) { + each(mapping.aryMethod[aryKey], function(otherName) { + if (realName == otherName) { + var data = mapping.methodSpread[realName], + afterRearg = data && data.afterRearg; + + result = afterRearg + ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey) + : castRearg(realName, castFixed(realName, wrapped, aryKey), aryKey); + + result = castCap(realName, result); + result = castCurry(realName, result, aryKey); + return false; + } + }); + return !result; + }); + + result || (result = wrapped); + if (result == func) { + result = forceCurry ? curry(result, 1) : function() { + return func.apply(this, arguments); + }; + } + result.convert = createConverter(realName, func); + result.placeholder = func.placeholder = placeholder; + + return result; + } + + /*--------------------------------------------------------------------------*/ + + if (!isObj) { + return wrap(name, func, defaultHolder); + } + var _ = func; + + // Convert methods by ary cap. + var pairs = []; + each(aryMethodKeys, function(aryKey) { + each(mapping.aryMethod[aryKey], function(key) { + var func = _[mapping.remap[key] || key]; + if (func) { + pairs.push([key, wrap(key, func, _)]); + } + }); + }); + + // Convert remaining methods. + each(keys(_), function(key) { + var func = _[key]; + if (typeof func == 'function') { + var length = pairs.length; + while (length--) { + if (pairs[length][0] == key) { + return; + } + } + func.convert = createConverter(key, func); + pairs.push([key, func]); + } + }); + + // Assign to `_` leaving `_.prototype` unchanged to allow chaining. + each(pairs, function(pair) { + _[pair[0]] = pair[1]; + }); + + _.convert = convertLib; + _.placeholder = _; + + // Assign aliases. + each(keys(_), function(key) { + each(mapping.realToAlias[key] || [], function(alias) { + _[alias] = _[key]; + }); + }); + + return _; +} + +module.exports = baseConvert; diff --git a/node_modules/lodash/fp/_convertBrowser.js b/node_modules/lodash/fp/_convertBrowser.js new file mode 100644 index 00000000..bde030dc --- /dev/null +++ b/node_modules/lodash/fp/_convertBrowser.js @@ -0,0 +1,18 @@ +var baseConvert = require('./_baseConvert'); + +/** + * Converts `lodash` to an immutable auto-curried iteratee-first data-last + * version with conversion `options` applied. + * + * @param {Function} lodash The lodash function to convert. + * @param {Object} [options] The options object. See `baseConvert` for more details. + * @returns {Function} Returns the converted `lodash`. + */ +function browserConvert(lodash, options) { + return baseConvert(lodash, lodash, options); +} + +if (typeof _ == 'function' && typeof _.runInContext == 'function') { + _ = browserConvert(_.runInContext()); +} +module.exports = browserConvert; diff --git a/node_modules/lodash/fp/_falseOptions.js b/node_modules/lodash/fp/_falseOptions.js new file mode 100644 index 00000000..773235e3 --- /dev/null +++ b/node_modules/lodash/fp/_falseOptions.js @@ -0,0 +1,7 @@ +module.exports = { + 'cap': false, + 'curry': false, + 'fixed': false, + 'immutable': false, + 'rearg': false +}; diff --git a/node_modules/lodash/fp/_mapping.js b/node_modules/lodash/fp/_mapping.js new file mode 100644 index 00000000..a642ec05 --- /dev/null +++ b/node_modules/lodash/fp/_mapping.js @@ -0,0 +1,358 @@ +/** Used to map aliases to their real names. */ +exports.aliasToReal = { + + // Lodash aliases. + 'each': 'forEach', + 'eachRight': 'forEachRight', + 'entries': 'toPairs', + 'entriesIn': 'toPairsIn', + 'extend': 'assignIn', + 'extendAll': 'assignInAll', + 'extendAllWith': 'assignInAllWith', + 'extendWith': 'assignInWith', + 'first': 'head', + + // Methods that are curried variants of others. + 'conforms': 'conformsTo', + 'matches': 'isMatch', + 'property': 'get', + + // Ramda aliases. + '__': 'placeholder', + 'F': 'stubFalse', + 'T': 'stubTrue', + 'all': 'every', + 'allPass': 'overEvery', + 'always': 'constant', + 'any': 'some', + 'anyPass': 'overSome', + 'apply': 'spread', + 'assoc': 'set', + 'assocPath': 'set', + 'complement': 'negate', + 'compose': 'flowRight', + 'contains': 'includes', + 'dissoc': 'unset', + 'dissocPath': 'unset', + 'dropLast': 'dropRight', + 'dropLastWhile': 'dropRightWhile', + 'equals': 'isEqual', + 'identical': 'eq', + 'indexBy': 'keyBy', + 'init': 'initial', + 'invertObj': 'invert', + 'juxt': 'over', + 'omitAll': 'omit', + 'nAry': 'ary', + 'path': 'get', + 'pathEq': 'matchesProperty', + 'pathOr': 'getOr', + 'paths': 'at', + 'pickAll': 'pick', + 'pipe': 'flow', + 'pluck': 'map', + 'prop': 'get', + 'propEq': 'matchesProperty', + 'propOr': 'getOr', + 'props': 'at', + 'symmetricDifference': 'xor', + 'symmetricDifferenceBy': 'xorBy', + 'symmetricDifferenceWith': 'xorWith', + 'takeLast': 'takeRight', + 'takeLastWhile': 'takeRightWhile', + 'unapply': 'rest', + 'unnest': 'flatten', + 'useWith': 'overArgs', + 'where': 'conformsTo', + 'whereEq': 'isMatch', + 'zipObj': 'zipObject' +}; + +/** Used to map ary to method names. */ +exports.aryMethod = { + '1': [ + 'assignAll', 'assignInAll', 'attempt', 'castArray', 'ceil', 'create', + 'curry', 'curryRight', 'defaultsAll', 'defaultsDeepAll', 'floor', 'flow', + 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'mergeAll', + 'methodOf', 'mixin', 'nthArg', 'over', 'overEvery', 'overSome','rest', 'reverse', + 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart', + 'uniqueId', 'words', 'zipAll' + ], + '2': [ + 'add', 'after', 'ary', 'assign', 'assignAllWith', 'assignIn', 'assignInAllWith', + 'at', 'before', 'bind', 'bindAll', 'bindKey', 'chunk', 'cloneDeepWith', + 'cloneWith', 'concat', 'conformsTo', 'countBy', 'curryN', 'curryRightN', + 'debounce', 'defaults', 'defaultsDeep', 'defaultTo', 'delay', 'difference', + 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq', + 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex', + 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth', 'forEach', + 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'get', + 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', 'intersection', + 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy', + 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty', + 'maxBy', 'meanBy', 'merge', 'mergeAllWith', 'minBy', 'multiply', 'nth', 'omit', + 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial', + 'partialRight', 'partition', 'pick', 'pickBy', 'propertyOf', 'pull', 'pullAll', + 'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove', + 'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex', + 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy', + 'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight', + 'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars', + 'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith', + 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject', + 'zipObjectDeep' + ], + '3': [ + 'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith', + 'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr', + 'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith', + 'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth', + 'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd', + 'padCharsStart', 'pullAllBy', 'pullAllWith', 'rangeStep', 'rangeStepRight', + 'reduce', 'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy', + 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith', 'update', 'xorBy', + 'xorWith', 'zipWith' + ], + '4': [ + 'fill', 'setWith', 'updateWith' + ] +}; + +/** Used to map ary to rearg configs. */ +exports.aryRearg = { + '2': [1, 0], + '3': [2, 0, 1], + '4': [3, 2, 0, 1] +}; + +/** Used to map method names to their iteratee ary. */ +exports.iterateeAry = { + 'dropRightWhile': 1, + 'dropWhile': 1, + 'every': 1, + 'filter': 1, + 'find': 1, + 'findFrom': 1, + 'findIndex': 1, + 'findIndexFrom': 1, + 'findKey': 1, + 'findLast': 1, + 'findLastFrom': 1, + 'findLastIndex': 1, + 'findLastIndexFrom': 1, + 'findLastKey': 1, + 'flatMap': 1, + 'flatMapDeep': 1, + 'flatMapDepth': 1, + 'forEach': 1, + 'forEachRight': 1, + 'forIn': 1, + 'forInRight': 1, + 'forOwn': 1, + 'forOwnRight': 1, + 'map': 1, + 'mapKeys': 1, + 'mapValues': 1, + 'partition': 1, + 'reduce': 2, + 'reduceRight': 2, + 'reject': 1, + 'remove': 1, + 'some': 1, + 'takeRightWhile': 1, + 'takeWhile': 1, + 'times': 1, + 'transform': 2 +}; + +/** Used to map method names to iteratee rearg configs. */ +exports.iterateeRearg = { + 'mapKeys': [1], + 'reduceRight': [1, 0] +}; + +/** Used to map method names to rearg configs. */ +exports.methodRearg = { + 'assignInAllWith': [1, 0], + 'assignInWith': [1, 2, 0], + 'assignAllWith': [1, 0], + 'assignWith': [1, 2, 0], + 'differenceBy': [1, 2, 0], + 'differenceWith': [1, 2, 0], + 'getOr': [2, 1, 0], + 'intersectionBy': [1, 2, 0], + 'intersectionWith': [1, 2, 0], + 'isEqualWith': [1, 2, 0], + 'isMatchWith': [2, 1, 0], + 'mergeAllWith': [1, 0], + 'mergeWith': [1, 2, 0], + 'padChars': [2, 1, 0], + 'padCharsEnd': [2, 1, 0], + 'padCharsStart': [2, 1, 0], + 'pullAllBy': [2, 1, 0], + 'pullAllWith': [2, 1, 0], + 'rangeStep': [1, 2, 0], + 'rangeStepRight': [1, 2, 0], + 'setWith': [3, 1, 2, 0], + 'sortedIndexBy': [2, 1, 0], + 'sortedLastIndexBy': [2, 1, 0], + 'unionBy': [1, 2, 0], + 'unionWith': [1, 2, 0], + 'updateWith': [3, 1, 2, 0], + 'xorBy': [1, 2, 0], + 'xorWith': [1, 2, 0], + 'zipWith': [1, 2, 0] +}; + +/** Used to map method names to spread configs. */ +exports.methodSpread = { + 'assignAll': { 'start': 0 }, + 'assignAllWith': { 'start': 0 }, + 'assignInAll': { 'start': 0 }, + 'assignInAllWith': { 'start': 0 }, + 'defaultsAll': { 'start': 0 }, + 'defaultsDeepAll': { 'start': 0 }, + 'invokeArgs': { 'start': 2 }, + 'invokeArgsMap': { 'start': 2 }, + 'mergeAll': { 'start': 0 }, + 'mergeAllWith': { 'start': 0 }, + 'partial': { 'start': 1 }, + 'partialRight': { 'start': 1 }, + 'without': { 'start': 1 }, + 'zipAll': { 'start': 0 } +}; + +/** Used to identify methods which mutate arrays or objects. */ +exports.mutate = { + 'array': { + 'fill': true, + 'pull': true, + 'pullAll': true, + 'pullAllBy': true, + 'pullAllWith': true, + 'pullAt': true, + 'remove': true, + 'reverse': true + }, + 'object': { + 'assign': true, + 'assignAll': true, + 'assignAllWith': true, + 'assignIn': true, + 'assignInAll': true, + 'assignInAllWith': true, + 'assignInWith': true, + 'assignWith': true, + 'defaults': true, + 'defaultsAll': true, + 'defaultsDeep': true, + 'defaultsDeepAll': true, + 'merge': true, + 'mergeAll': true, + 'mergeAllWith': true, + 'mergeWith': true, + }, + 'set': { + 'set': true, + 'setWith': true, + 'unset': true, + 'update': true, + 'updateWith': true + } +}; + +/** Used to map real names to their aliases. */ +exports.realToAlias = (function() { + var hasOwnProperty = Object.prototype.hasOwnProperty, + object = exports.aliasToReal, + result = {}; + + for (var key in object) { + var value = object[key]; + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + } + return result; +}()); + +/** Used to map method names to other names. */ +exports.remap = { + 'assignAll': 'assign', + 'assignAllWith': 'assignWith', + 'assignInAll': 'assignIn', + 'assignInAllWith': 'assignInWith', + 'curryN': 'curry', + 'curryRightN': 'curryRight', + 'defaultsAll': 'defaults', + 'defaultsDeepAll': 'defaultsDeep', + 'findFrom': 'find', + 'findIndexFrom': 'findIndex', + 'findLastFrom': 'findLast', + 'findLastIndexFrom': 'findLastIndex', + 'getOr': 'get', + 'includesFrom': 'includes', + 'indexOfFrom': 'indexOf', + 'invokeArgs': 'invoke', + 'invokeArgsMap': 'invokeMap', + 'lastIndexOfFrom': 'lastIndexOf', + 'mergeAll': 'merge', + 'mergeAllWith': 'mergeWith', + 'padChars': 'pad', + 'padCharsEnd': 'padEnd', + 'padCharsStart': 'padStart', + 'propertyOf': 'get', + 'rangeStep': 'range', + 'rangeStepRight': 'rangeRight', + 'restFrom': 'rest', + 'spreadFrom': 'spread', + 'trimChars': 'trim', + 'trimCharsEnd': 'trimEnd', + 'trimCharsStart': 'trimStart', + 'zipAll': 'zip' +}; + +/** Used to track methods that skip fixing their arity. */ +exports.skipFixed = { + 'castArray': true, + 'flow': true, + 'flowRight': true, + 'iteratee': true, + 'mixin': true, + 'rearg': true, + 'runInContext': true +}; + +/** Used to track methods that skip rearranging arguments. */ +exports.skipRearg = { + 'add': true, + 'assign': true, + 'assignIn': true, + 'bind': true, + 'bindKey': true, + 'concat': true, + 'difference': true, + 'divide': true, + 'eq': true, + 'gt': true, + 'gte': true, + 'isEqual': true, + 'lt': true, + 'lte': true, + 'matchesProperty': true, + 'merge': true, + 'multiply': true, + 'overArgs': true, + 'partial': true, + 'partialRight': true, + 'propertyOf': true, + 'random': true, + 'range': true, + 'rangeRight': true, + 'subtract': true, + 'zip': true, + 'zipObject': true, + 'zipObjectDeep': true +}; diff --git a/node_modules/lodash/fp/_util.js b/node_modules/lodash/fp/_util.js new file mode 100644 index 00000000..1dbf36f5 --- /dev/null +++ b/node_modules/lodash/fp/_util.js @@ -0,0 +1,16 @@ +module.exports = { + 'ary': require('../ary'), + 'assign': require('../_baseAssign'), + 'clone': require('../clone'), + 'curry': require('../curry'), + 'forEach': require('../_arrayEach'), + 'isArray': require('../isArray'), + 'isError': require('../isError'), + 'isFunction': require('../isFunction'), + 'isWeakMap': require('../isWeakMap'), + 'iteratee': require('../iteratee'), + 'keys': require('../_baseKeys'), + 'rearg': require('../rearg'), + 'toInteger': require('../toInteger'), + 'toPath': require('../toPath') +}; diff --git a/node_modules/lodash/fp/add.js b/node_modules/lodash/fp/add.js new file mode 100644 index 00000000..816eeece --- /dev/null +++ b/node_modules/lodash/fp/add.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('add', require('../add')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/after.js b/node_modules/lodash/fp/after.js new file mode 100644 index 00000000..21a0167a --- /dev/null +++ b/node_modules/lodash/fp/after.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('after', require('../after')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/all.js b/node_modules/lodash/fp/all.js new file mode 100644 index 00000000..d0839f77 --- /dev/null +++ b/node_modules/lodash/fp/all.js @@ -0,0 +1 @@ +module.exports = require('./every'); diff --git a/node_modules/lodash/fp/allPass.js b/node_modules/lodash/fp/allPass.js new file mode 100644 index 00000000..79b73ef8 --- /dev/null +++ b/node_modules/lodash/fp/allPass.js @@ -0,0 +1 @@ +module.exports = require('./overEvery'); diff --git a/node_modules/lodash/fp/always.js b/node_modules/lodash/fp/always.js new file mode 100644 index 00000000..98877030 --- /dev/null +++ b/node_modules/lodash/fp/always.js @@ -0,0 +1 @@ +module.exports = require('./constant'); diff --git a/node_modules/lodash/fp/any.js b/node_modules/lodash/fp/any.js new file mode 100644 index 00000000..900ac25e --- /dev/null +++ b/node_modules/lodash/fp/any.js @@ -0,0 +1 @@ +module.exports = require('./some'); diff --git a/node_modules/lodash/fp/anyPass.js b/node_modules/lodash/fp/anyPass.js new file mode 100644 index 00000000..2774ab37 --- /dev/null +++ b/node_modules/lodash/fp/anyPass.js @@ -0,0 +1 @@ +module.exports = require('./overSome'); diff --git a/node_modules/lodash/fp/apply.js b/node_modules/lodash/fp/apply.js new file mode 100644 index 00000000..2b757129 --- /dev/null +++ b/node_modules/lodash/fp/apply.js @@ -0,0 +1 @@ +module.exports = require('./spread'); diff --git a/node_modules/lodash/fp/array.js b/node_modules/lodash/fp/array.js new file mode 100644 index 00000000..fe939c2c --- /dev/null +++ b/node_modules/lodash/fp/array.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../array')); diff --git a/node_modules/lodash/fp/ary.js b/node_modules/lodash/fp/ary.js new file mode 100644 index 00000000..8edf1877 --- /dev/null +++ b/node_modules/lodash/fp/ary.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('ary', require('../ary')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/assign.js b/node_modules/lodash/fp/assign.js new file mode 100644 index 00000000..23f47af1 --- /dev/null +++ b/node_modules/lodash/fp/assign.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assign', require('../assign')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/assignAll.js b/node_modules/lodash/fp/assignAll.js new file mode 100644 index 00000000..b1d36c7e --- /dev/null +++ b/node_modules/lodash/fp/assignAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignAll', require('../assign')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/assignAllWith.js b/node_modules/lodash/fp/assignAllWith.js new file mode 100644 index 00000000..21e836e6 --- /dev/null +++ b/node_modules/lodash/fp/assignAllWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignAllWith', require('../assignWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/assignIn.js b/node_modules/lodash/fp/assignIn.js new file mode 100644 index 00000000..6e7c65fa --- /dev/null +++ b/node_modules/lodash/fp/assignIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignIn', require('../assignIn')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/assignInAll.js b/node_modules/lodash/fp/assignInAll.js new file mode 100644 index 00000000..7ba75dba --- /dev/null +++ b/node_modules/lodash/fp/assignInAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignInAll', require('../assignIn')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/assignInAllWith.js b/node_modules/lodash/fp/assignInAllWith.js new file mode 100644 index 00000000..e766903d --- /dev/null +++ b/node_modules/lodash/fp/assignInAllWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignInAllWith', require('../assignInWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/assignInWith.js b/node_modules/lodash/fp/assignInWith.js new file mode 100644 index 00000000..acb59236 --- /dev/null +++ b/node_modules/lodash/fp/assignInWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignInWith', require('../assignInWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/assignWith.js b/node_modules/lodash/fp/assignWith.js new file mode 100644 index 00000000..eb925212 --- /dev/null +++ b/node_modules/lodash/fp/assignWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignWith', require('../assignWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/assoc.js b/node_modules/lodash/fp/assoc.js new file mode 100644 index 00000000..7648820c --- /dev/null +++ b/node_modules/lodash/fp/assoc.js @@ -0,0 +1 @@ +module.exports = require('./set'); diff --git a/node_modules/lodash/fp/assocPath.js b/node_modules/lodash/fp/assocPath.js new file mode 100644 index 00000000..7648820c --- /dev/null +++ b/node_modules/lodash/fp/assocPath.js @@ -0,0 +1 @@ +module.exports = require('./set'); diff --git a/node_modules/lodash/fp/at.js b/node_modules/lodash/fp/at.js new file mode 100644 index 00000000..cc39d257 --- /dev/null +++ b/node_modules/lodash/fp/at.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('at', require('../at')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/attempt.js b/node_modules/lodash/fp/attempt.js new file mode 100644 index 00000000..26ca42ea --- /dev/null +++ b/node_modules/lodash/fp/attempt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('attempt', require('../attempt')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/before.js b/node_modules/lodash/fp/before.js new file mode 100644 index 00000000..7a2de65d --- /dev/null +++ b/node_modules/lodash/fp/before.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('before', require('../before')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/bind.js b/node_modules/lodash/fp/bind.js new file mode 100644 index 00000000..5cbe4f30 --- /dev/null +++ b/node_modules/lodash/fp/bind.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('bind', require('../bind')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/bindAll.js b/node_modules/lodash/fp/bindAll.js new file mode 100644 index 00000000..6b4a4a0f --- /dev/null +++ b/node_modules/lodash/fp/bindAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('bindAll', require('../bindAll')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/bindKey.js b/node_modules/lodash/fp/bindKey.js new file mode 100644 index 00000000..6a46c6b1 --- /dev/null +++ b/node_modules/lodash/fp/bindKey.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('bindKey', require('../bindKey')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/camelCase.js b/node_modules/lodash/fp/camelCase.js new file mode 100644 index 00000000..87b77b49 --- /dev/null +++ b/node_modules/lodash/fp/camelCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('camelCase', require('../camelCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/capitalize.js b/node_modules/lodash/fp/capitalize.js new file mode 100644 index 00000000..cac74e14 --- /dev/null +++ b/node_modules/lodash/fp/capitalize.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('capitalize', require('../capitalize'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/castArray.js b/node_modules/lodash/fp/castArray.js new file mode 100644 index 00000000..8681c099 --- /dev/null +++ b/node_modules/lodash/fp/castArray.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('castArray', require('../castArray')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/ceil.js b/node_modules/lodash/fp/ceil.js new file mode 100644 index 00000000..f416b729 --- /dev/null +++ b/node_modules/lodash/fp/ceil.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('ceil', require('../ceil')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/chain.js b/node_modules/lodash/fp/chain.js new file mode 100644 index 00000000..604fe398 --- /dev/null +++ b/node_modules/lodash/fp/chain.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('chain', require('../chain'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/chunk.js b/node_modules/lodash/fp/chunk.js new file mode 100644 index 00000000..871ab085 --- /dev/null +++ b/node_modules/lodash/fp/chunk.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('chunk', require('../chunk')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/clamp.js b/node_modules/lodash/fp/clamp.js new file mode 100644 index 00000000..3b06c01c --- /dev/null +++ b/node_modules/lodash/fp/clamp.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('clamp', require('../clamp')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/clone.js b/node_modules/lodash/fp/clone.js new file mode 100644 index 00000000..cadb59c9 --- /dev/null +++ b/node_modules/lodash/fp/clone.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('clone', require('../clone'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/cloneDeep.js b/node_modules/lodash/fp/cloneDeep.js new file mode 100644 index 00000000..a6107aac --- /dev/null +++ b/node_modules/lodash/fp/cloneDeep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('cloneDeep', require('../cloneDeep'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/cloneDeepWith.js b/node_modules/lodash/fp/cloneDeepWith.js new file mode 100644 index 00000000..6f01e44a --- /dev/null +++ b/node_modules/lodash/fp/cloneDeepWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('cloneDeepWith', require('../cloneDeepWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/cloneWith.js b/node_modules/lodash/fp/cloneWith.js new file mode 100644 index 00000000..aa885781 --- /dev/null +++ b/node_modules/lodash/fp/cloneWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('cloneWith', require('../cloneWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/collection.js b/node_modules/lodash/fp/collection.js new file mode 100644 index 00000000..fc8b328a --- /dev/null +++ b/node_modules/lodash/fp/collection.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../collection')); diff --git a/node_modules/lodash/fp/commit.js b/node_modules/lodash/fp/commit.js new file mode 100644 index 00000000..130a894f --- /dev/null +++ b/node_modules/lodash/fp/commit.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('commit', require('../commit'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/compact.js b/node_modules/lodash/fp/compact.js new file mode 100644 index 00000000..ce8f7a1a --- /dev/null +++ b/node_modules/lodash/fp/compact.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('compact', require('../compact'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/complement.js b/node_modules/lodash/fp/complement.js new file mode 100644 index 00000000..93eb462b --- /dev/null +++ b/node_modules/lodash/fp/complement.js @@ -0,0 +1 @@ +module.exports = require('./negate'); diff --git a/node_modules/lodash/fp/compose.js b/node_modules/lodash/fp/compose.js new file mode 100644 index 00000000..1954e942 --- /dev/null +++ b/node_modules/lodash/fp/compose.js @@ -0,0 +1 @@ +module.exports = require('./flowRight'); diff --git a/node_modules/lodash/fp/concat.js b/node_modules/lodash/fp/concat.js new file mode 100644 index 00000000..e59346ad --- /dev/null +++ b/node_modules/lodash/fp/concat.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('concat', require('../concat')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/cond.js b/node_modules/lodash/fp/cond.js new file mode 100644 index 00000000..6a0120ef --- /dev/null +++ b/node_modules/lodash/fp/cond.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('cond', require('../cond'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/conforms.js b/node_modules/lodash/fp/conforms.js new file mode 100644 index 00000000..3247f64a --- /dev/null +++ b/node_modules/lodash/fp/conforms.js @@ -0,0 +1 @@ +module.exports = require('./conformsTo'); diff --git a/node_modules/lodash/fp/conformsTo.js b/node_modules/lodash/fp/conformsTo.js new file mode 100644 index 00000000..aa7f41ec --- /dev/null +++ b/node_modules/lodash/fp/conformsTo.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('conformsTo', require('../conformsTo')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/constant.js b/node_modules/lodash/fp/constant.js new file mode 100644 index 00000000..9e406fc0 --- /dev/null +++ b/node_modules/lodash/fp/constant.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('constant', require('../constant'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/contains.js b/node_modules/lodash/fp/contains.js new file mode 100644 index 00000000..594722af --- /dev/null +++ b/node_modules/lodash/fp/contains.js @@ -0,0 +1 @@ +module.exports = require('./includes'); diff --git a/node_modules/lodash/fp/convert.js b/node_modules/lodash/fp/convert.js new file mode 100644 index 00000000..4795dc42 --- /dev/null +++ b/node_modules/lodash/fp/convert.js @@ -0,0 +1,18 @@ +var baseConvert = require('./_baseConvert'), + util = require('./_util'); + +/** + * Converts `func` of `name` to an immutable auto-curried iteratee-first data-last + * version with conversion `options` applied. If `name` is an object its methods + * will be converted. + * + * @param {string} name The name of the function to wrap. + * @param {Function} [func] The function to wrap. + * @param {Object} [options] The options object. See `baseConvert` for more details. + * @returns {Function|Object} Returns the converted function or object. + */ +function convert(name, func, options) { + return baseConvert(util, name, func, options); +} + +module.exports = convert; diff --git a/node_modules/lodash/fp/countBy.js b/node_modules/lodash/fp/countBy.js new file mode 100644 index 00000000..dfa46432 --- /dev/null +++ b/node_modules/lodash/fp/countBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('countBy', require('../countBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/create.js b/node_modules/lodash/fp/create.js new file mode 100644 index 00000000..752025fb --- /dev/null +++ b/node_modules/lodash/fp/create.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('create', require('../create')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/curry.js b/node_modules/lodash/fp/curry.js new file mode 100644 index 00000000..b0b4168c --- /dev/null +++ b/node_modules/lodash/fp/curry.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('curry', require('../curry')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/curryN.js b/node_modules/lodash/fp/curryN.js new file mode 100644 index 00000000..2ae7d00a --- /dev/null +++ b/node_modules/lodash/fp/curryN.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('curryN', require('../curry')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/curryRight.js b/node_modules/lodash/fp/curryRight.js new file mode 100644 index 00000000..cb619eb5 --- /dev/null +++ b/node_modules/lodash/fp/curryRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('curryRight', require('../curryRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/curryRightN.js b/node_modules/lodash/fp/curryRightN.js new file mode 100644 index 00000000..2495afc8 --- /dev/null +++ b/node_modules/lodash/fp/curryRightN.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('curryRightN', require('../curryRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/date.js b/node_modules/lodash/fp/date.js new file mode 100644 index 00000000..82cb952b --- /dev/null +++ b/node_modules/lodash/fp/date.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../date')); diff --git a/node_modules/lodash/fp/debounce.js b/node_modules/lodash/fp/debounce.js new file mode 100644 index 00000000..26122293 --- /dev/null +++ b/node_modules/lodash/fp/debounce.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('debounce', require('../debounce')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/deburr.js b/node_modules/lodash/fp/deburr.js new file mode 100644 index 00000000..96463ab8 --- /dev/null +++ b/node_modules/lodash/fp/deburr.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('deburr', require('../deburr'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/defaultTo.js b/node_modules/lodash/fp/defaultTo.js new file mode 100644 index 00000000..d6b52a44 --- /dev/null +++ b/node_modules/lodash/fp/defaultTo.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaultTo', require('../defaultTo')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/defaults.js b/node_modules/lodash/fp/defaults.js new file mode 100644 index 00000000..e1a8e6e7 --- /dev/null +++ b/node_modules/lodash/fp/defaults.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaults', require('../defaults')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/defaultsAll.js b/node_modules/lodash/fp/defaultsAll.js new file mode 100644 index 00000000..238fcc3c --- /dev/null +++ b/node_modules/lodash/fp/defaultsAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaultsAll', require('../defaults')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/defaultsDeep.js b/node_modules/lodash/fp/defaultsDeep.js new file mode 100644 index 00000000..1f172ff9 --- /dev/null +++ b/node_modules/lodash/fp/defaultsDeep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaultsDeep', require('../defaultsDeep')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/defaultsDeepAll.js b/node_modules/lodash/fp/defaultsDeepAll.js new file mode 100644 index 00000000..6835f2f0 --- /dev/null +++ b/node_modules/lodash/fp/defaultsDeepAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaultsDeepAll', require('../defaultsDeep')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/defer.js b/node_modules/lodash/fp/defer.js new file mode 100644 index 00000000..ec7990fe --- /dev/null +++ b/node_modules/lodash/fp/defer.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defer', require('../defer'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/delay.js b/node_modules/lodash/fp/delay.js new file mode 100644 index 00000000..556dbd56 --- /dev/null +++ b/node_modules/lodash/fp/delay.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('delay', require('../delay')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/difference.js b/node_modules/lodash/fp/difference.js new file mode 100644 index 00000000..2d037654 --- /dev/null +++ b/node_modules/lodash/fp/difference.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('difference', require('../difference')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/differenceBy.js b/node_modules/lodash/fp/differenceBy.js new file mode 100644 index 00000000..2f914910 --- /dev/null +++ b/node_modules/lodash/fp/differenceBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('differenceBy', require('../differenceBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/differenceWith.js b/node_modules/lodash/fp/differenceWith.js new file mode 100644 index 00000000..bcf5ad2e --- /dev/null +++ b/node_modules/lodash/fp/differenceWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('differenceWith', require('../differenceWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/dissoc.js b/node_modules/lodash/fp/dissoc.js new file mode 100644 index 00000000..7ec7be19 --- /dev/null +++ b/node_modules/lodash/fp/dissoc.js @@ -0,0 +1 @@ +module.exports = require('./unset'); diff --git a/node_modules/lodash/fp/dissocPath.js b/node_modules/lodash/fp/dissocPath.js new file mode 100644 index 00000000..7ec7be19 --- /dev/null +++ b/node_modules/lodash/fp/dissocPath.js @@ -0,0 +1 @@ +module.exports = require('./unset'); diff --git a/node_modules/lodash/fp/divide.js b/node_modules/lodash/fp/divide.js new file mode 100644 index 00000000..82048c5e --- /dev/null +++ b/node_modules/lodash/fp/divide.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('divide', require('../divide')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/drop.js b/node_modules/lodash/fp/drop.js new file mode 100644 index 00000000..2fa9b4fa --- /dev/null +++ b/node_modules/lodash/fp/drop.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('drop', require('../drop')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/dropLast.js b/node_modules/lodash/fp/dropLast.js new file mode 100644 index 00000000..174e5255 --- /dev/null +++ b/node_modules/lodash/fp/dropLast.js @@ -0,0 +1 @@ +module.exports = require('./dropRight'); diff --git a/node_modules/lodash/fp/dropLastWhile.js b/node_modules/lodash/fp/dropLastWhile.js new file mode 100644 index 00000000..be2a9d24 --- /dev/null +++ b/node_modules/lodash/fp/dropLastWhile.js @@ -0,0 +1 @@ +module.exports = require('./dropRightWhile'); diff --git a/node_modules/lodash/fp/dropRight.js b/node_modules/lodash/fp/dropRight.js new file mode 100644 index 00000000..e98881fc --- /dev/null +++ b/node_modules/lodash/fp/dropRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('dropRight', require('../dropRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/dropRightWhile.js b/node_modules/lodash/fp/dropRightWhile.js new file mode 100644 index 00000000..cacaa701 --- /dev/null +++ b/node_modules/lodash/fp/dropRightWhile.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('dropRightWhile', require('../dropRightWhile')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/dropWhile.js b/node_modules/lodash/fp/dropWhile.js new file mode 100644 index 00000000..285f864d --- /dev/null +++ b/node_modules/lodash/fp/dropWhile.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('dropWhile', require('../dropWhile')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/each.js b/node_modules/lodash/fp/each.js new file mode 100644 index 00000000..8800f420 --- /dev/null +++ b/node_modules/lodash/fp/each.js @@ -0,0 +1 @@ +module.exports = require('./forEach'); diff --git a/node_modules/lodash/fp/eachRight.js b/node_modules/lodash/fp/eachRight.js new file mode 100644 index 00000000..3252b2ab --- /dev/null +++ b/node_modules/lodash/fp/eachRight.js @@ -0,0 +1 @@ +module.exports = require('./forEachRight'); diff --git a/node_modules/lodash/fp/endsWith.js b/node_modules/lodash/fp/endsWith.js new file mode 100644 index 00000000..17dc2a49 --- /dev/null +++ b/node_modules/lodash/fp/endsWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('endsWith', require('../endsWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/entries.js b/node_modules/lodash/fp/entries.js new file mode 100644 index 00000000..7a88df20 --- /dev/null +++ b/node_modules/lodash/fp/entries.js @@ -0,0 +1 @@ +module.exports = require('./toPairs'); diff --git a/node_modules/lodash/fp/entriesIn.js b/node_modules/lodash/fp/entriesIn.js new file mode 100644 index 00000000..f6c6331c --- /dev/null +++ b/node_modules/lodash/fp/entriesIn.js @@ -0,0 +1 @@ +module.exports = require('./toPairsIn'); diff --git a/node_modules/lodash/fp/eq.js b/node_modules/lodash/fp/eq.js new file mode 100644 index 00000000..9a3d21bf --- /dev/null +++ b/node_modules/lodash/fp/eq.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('eq', require('../eq')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/equals.js b/node_modules/lodash/fp/equals.js new file mode 100644 index 00000000..e6a5ce0c --- /dev/null +++ b/node_modules/lodash/fp/equals.js @@ -0,0 +1 @@ +module.exports = require('./isEqual'); diff --git a/node_modules/lodash/fp/escape.js b/node_modules/lodash/fp/escape.js new file mode 100644 index 00000000..52c1fbba --- /dev/null +++ b/node_modules/lodash/fp/escape.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('escape', require('../escape'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/escapeRegExp.js b/node_modules/lodash/fp/escapeRegExp.js new file mode 100644 index 00000000..369b2eff --- /dev/null +++ b/node_modules/lodash/fp/escapeRegExp.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('escapeRegExp', require('../escapeRegExp'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/every.js b/node_modules/lodash/fp/every.js new file mode 100644 index 00000000..95c2776c --- /dev/null +++ b/node_modules/lodash/fp/every.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('every', require('../every')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/extend.js b/node_modules/lodash/fp/extend.js new file mode 100644 index 00000000..e00166c2 --- /dev/null +++ b/node_modules/lodash/fp/extend.js @@ -0,0 +1 @@ +module.exports = require('./assignIn'); diff --git a/node_modules/lodash/fp/extendAll.js b/node_modules/lodash/fp/extendAll.js new file mode 100644 index 00000000..cc55b64f --- /dev/null +++ b/node_modules/lodash/fp/extendAll.js @@ -0,0 +1 @@ +module.exports = require('./assignInAll'); diff --git a/node_modules/lodash/fp/extendAllWith.js b/node_modules/lodash/fp/extendAllWith.js new file mode 100644 index 00000000..6679d208 --- /dev/null +++ b/node_modules/lodash/fp/extendAllWith.js @@ -0,0 +1 @@ +module.exports = require('./assignInAllWith'); diff --git a/node_modules/lodash/fp/extendWith.js b/node_modules/lodash/fp/extendWith.js new file mode 100644 index 00000000..dbdcb3b4 --- /dev/null +++ b/node_modules/lodash/fp/extendWith.js @@ -0,0 +1 @@ +module.exports = require('./assignInWith'); diff --git a/node_modules/lodash/fp/fill.js b/node_modules/lodash/fp/fill.js new file mode 100644 index 00000000..b2d47e84 --- /dev/null +++ b/node_modules/lodash/fp/fill.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('fill', require('../fill')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/filter.js b/node_modules/lodash/fp/filter.js new file mode 100644 index 00000000..796d501c --- /dev/null +++ b/node_modules/lodash/fp/filter.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('filter', require('../filter')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/find.js b/node_modules/lodash/fp/find.js new file mode 100644 index 00000000..f805d336 --- /dev/null +++ b/node_modules/lodash/fp/find.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('find', require('../find')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/findFrom.js b/node_modules/lodash/fp/findFrom.js new file mode 100644 index 00000000..da8275e8 --- /dev/null +++ b/node_modules/lodash/fp/findFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findFrom', require('../find')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/findIndex.js b/node_modules/lodash/fp/findIndex.js new file mode 100644 index 00000000..8c15fd11 --- /dev/null +++ b/node_modules/lodash/fp/findIndex.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findIndex', require('../findIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/findIndexFrom.js b/node_modules/lodash/fp/findIndexFrom.js new file mode 100644 index 00000000..32e98cb9 --- /dev/null +++ b/node_modules/lodash/fp/findIndexFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findIndexFrom', require('../findIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/findKey.js b/node_modules/lodash/fp/findKey.js new file mode 100644 index 00000000..475bcfa8 --- /dev/null +++ b/node_modules/lodash/fp/findKey.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findKey', require('../findKey')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/findLast.js b/node_modules/lodash/fp/findLast.js new file mode 100644 index 00000000..093fe94e --- /dev/null +++ b/node_modules/lodash/fp/findLast.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLast', require('../findLast')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/findLastFrom.js b/node_modules/lodash/fp/findLastFrom.js new file mode 100644 index 00000000..76c38fba --- /dev/null +++ b/node_modules/lodash/fp/findLastFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLastFrom', require('../findLast')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/findLastIndex.js b/node_modules/lodash/fp/findLastIndex.js new file mode 100644 index 00000000..36986df0 --- /dev/null +++ b/node_modules/lodash/fp/findLastIndex.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLastIndex', require('../findLastIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/findLastIndexFrom.js b/node_modules/lodash/fp/findLastIndexFrom.js new file mode 100644 index 00000000..34c8176c --- /dev/null +++ b/node_modules/lodash/fp/findLastIndexFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLastIndexFrom', require('../findLastIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/findLastKey.js b/node_modules/lodash/fp/findLastKey.js new file mode 100644 index 00000000..5f81b604 --- /dev/null +++ b/node_modules/lodash/fp/findLastKey.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLastKey', require('../findLastKey')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/first.js b/node_modules/lodash/fp/first.js new file mode 100644 index 00000000..53f4ad13 --- /dev/null +++ b/node_modules/lodash/fp/first.js @@ -0,0 +1 @@ +module.exports = require('./head'); diff --git a/node_modules/lodash/fp/flatMap.js b/node_modules/lodash/fp/flatMap.js new file mode 100644 index 00000000..d01dc4d0 --- /dev/null +++ b/node_modules/lodash/fp/flatMap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flatMap', require('../flatMap')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/flatMapDeep.js b/node_modules/lodash/fp/flatMapDeep.js new file mode 100644 index 00000000..569c42eb --- /dev/null +++ b/node_modules/lodash/fp/flatMapDeep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flatMapDeep', require('../flatMapDeep')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/flatMapDepth.js b/node_modules/lodash/fp/flatMapDepth.js new file mode 100644 index 00000000..6eb68fde --- /dev/null +++ b/node_modules/lodash/fp/flatMapDepth.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flatMapDepth', require('../flatMapDepth')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/flatten.js b/node_modules/lodash/fp/flatten.js new file mode 100644 index 00000000..30425d89 --- /dev/null +++ b/node_modules/lodash/fp/flatten.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flatten', require('../flatten'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/flattenDeep.js b/node_modules/lodash/fp/flattenDeep.js new file mode 100644 index 00000000..aed5db27 --- /dev/null +++ b/node_modules/lodash/fp/flattenDeep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flattenDeep', require('../flattenDeep'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/flattenDepth.js b/node_modules/lodash/fp/flattenDepth.js new file mode 100644 index 00000000..ad65e378 --- /dev/null +++ b/node_modules/lodash/fp/flattenDepth.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flattenDepth', require('../flattenDepth')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/flip.js b/node_modules/lodash/fp/flip.js new file mode 100644 index 00000000..0547e7b4 --- /dev/null +++ b/node_modules/lodash/fp/flip.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flip', require('../flip'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/floor.js b/node_modules/lodash/fp/floor.js new file mode 100644 index 00000000..a6cf3358 --- /dev/null +++ b/node_modules/lodash/fp/floor.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('floor', require('../floor')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/flow.js b/node_modules/lodash/fp/flow.js new file mode 100644 index 00000000..cd83677a --- /dev/null +++ b/node_modules/lodash/fp/flow.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flow', require('../flow')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/flowRight.js b/node_modules/lodash/fp/flowRight.js new file mode 100644 index 00000000..972a5b9b --- /dev/null +++ b/node_modules/lodash/fp/flowRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flowRight', require('../flowRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/forEach.js b/node_modules/lodash/fp/forEach.js new file mode 100644 index 00000000..2f494521 --- /dev/null +++ b/node_modules/lodash/fp/forEach.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forEach', require('../forEach')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/forEachRight.js b/node_modules/lodash/fp/forEachRight.js new file mode 100644 index 00000000..3ff97336 --- /dev/null +++ b/node_modules/lodash/fp/forEachRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forEachRight', require('../forEachRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/forIn.js b/node_modules/lodash/fp/forIn.js new file mode 100644 index 00000000..9341749b --- /dev/null +++ b/node_modules/lodash/fp/forIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forIn', require('../forIn')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/forInRight.js b/node_modules/lodash/fp/forInRight.js new file mode 100644 index 00000000..cecf8bbf --- /dev/null +++ b/node_modules/lodash/fp/forInRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forInRight', require('../forInRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/forOwn.js b/node_modules/lodash/fp/forOwn.js new file mode 100644 index 00000000..246449e9 --- /dev/null +++ b/node_modules/lodash/fp/forOwn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forOwn', require('../forOwn')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/forOwnRight.js b/node_modules/lodash/fp/forOwnRight.js new file mode 100644 index 00000000..c5e826e0 --- /dev/null +++ b/node_modules/lodash/fp/forOwnRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forOwnRight', require('../forOwnRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/fromPairs.js b/node_modules/lodash/fp/fromPairs.js new file mode 100644 index 00000000..f8cc5968 --- /dev/null +++ b/node_modules/lodash/fp/fromPairs.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('fromPairs', require('../fromPairs')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/function.js b/node_modules/lodash/fp/function.js new file mode 100644 index 00000000..dfe69b1f --- /dev/null +++ b/node_modules/lodash/fp/function.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../function')); diff --git a/node_modules/lodash/fp/functions.js b/node_modules/lodash/fp/functions.js new file mode 100644 index 00000000..09d1bb1b --- /dev/null +++ b/node_modules/lodash/fp/functions.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('functions', require('../functions'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/functionsIn.js b/node_modules/lodash/fp/functionsIn.js new file mode 100644 index 00000000..2cfeb83e --- /dev/null +++ b/node_modules/lodash/fp/functionsIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('functionsIn', require('../functionsIn'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/get.js b/node_modules/lodash/fp/get.js new file mode 100644 index 00000000..6d3a3286 --- /dev/null +++ b/node_modules/lodash/fp/get.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('get', require('../get')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/getOr.js b/node_modules/lodash/fp/getOr.js new file mode 100644 index 00000000..7dbf771f --- /dev/null +++ b/node_modules/lodash/fp/getOr.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('getOr', require('../get')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/groupBy.js b/node_modules/lodash/fp/groupBy.js new file mode 100644 index 00000000..fc0bc78a --- /dev/null +++ b/node_modules/lodash/fp/groupBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('groupBy', require('../groupBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/gt.js b/node_modules/lodash/fp/gt.js new file mode 100644 index 00000000..9e57c808 --- /dev/null +++ b/node_modules/lodash/fp/gt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('gt', require('../gt')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/gte.js b/node_modules/lodash/fp/gte.js new file mode 100644 index 00000000..45847863 --- /dev/null +++ b/node_modules/lodash/fp/gte.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('gte', require('../gte')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/has.js b/node_modules/lodash/fp/has.js new file mode 100644 index 00000000..b9012983 --- /dev/null +++ b/node_modules/lodash/fp/has.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('has', require('../has')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/hasIn.js b/node_modules/lodash/fp/hasIn.js new file mode 100644 index 00000000..b3c3d1a3 --- /dev/null +++ b/node_modules/lodash/fp/hasIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('hasIn', require('../hasIn')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/head.js b/node_modules/lodash/fp/head.js new file mode 100644 index 00000000..2694f0a2 --- /dev/null +++ b/node_modules/lodash/fp/head.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('head', require('../head'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/identical.js b/node_modules/lodash/fp/identical.js new file mode 100644 index 00000000..85563f4a --- /dev/null +++ b/node_modules/lodash/fp/identical.js @@ -0,0 +1 @@ +module.exports = require('./eq'); diff --git a/node_modules/lodash/fp/identity.js b/node_modules/lodash/fp/identity.js new file mode 100644 index 00000000..096415a5 --- /dev/null +++ b/node_modules/lodash/fp/identity.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('identity', require('../identity'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/inRange.js b/node_modules/lodash/fp/inRange.js new file mode 100644 index 00000000..202d940b --- /dev/null +++ b/node_modules/lodash/fp/inRange.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('inRange', require('../inRange')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/includes.js b/node_modules/lodash/fp/includes.js new file mode 100644 index 00000000..11467805 --- /dev/null +++ b/node_modules/lodash/fp/includes.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('includes', require('../includes')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/includesFrom.js b/node_modules/lodash/fp/includesFrom.js new file mode 100644 index 00000000..683afdb4 --- /dev/null +++ b/node_modules/lodash/fp/includesFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('includesFrom', require('../includes')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/indexBy.js b/node_modules/lodash/fp/indexBy.js new file mode 100644 index 00000000..7e64bc0f --- /dev/null +++ b/node_modules/lodash/fp/indexBy.js @@ -0,0 +1 @@ +module.exports = require('./keyBy'); diff --git a/node_modules/lodash/fp/indexOf.js b/node_modules/lodash/fp/indexOf.js new file mode 100644 index 00000000..524658eb --- /dev/null +++ b/node_modules/lodash/fp/indexOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('indexOf', require('../indexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/indexOfFrom.js b/node_modules/lodash/fp/indexOfFrom.js new file mode 100644 index 00000000..d99c822f --- /dev/null +++ b/node_modules/lodash/fp/indexOfFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('indexOfFrom', require('../indexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/init.js b/node_modules/lodash/fp/init.js new file mode 100644 index 00000000..2f88d8b0 --- /dev/null +++ b/node_modules/lodash/fp/init.js @@ -0,0 +1 @@ +module.exports = require('./initial'); diff --git a/node_modules/lodash/fp/initial.js b/node_modules/lodash/fp/initial.js new file mode 100644 index 00000000..b732ba0b --- /dev/null +++ b/node_modules/lodash/fp/initial.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('initial', require('../initial'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/intersection.js b/node_modules/lodash/fp/intersection.js new file mode 100644 index 00000000..52936d56 --- /dev/null +++ b/node_modules/lodash/fp/intersection.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('intersection', require('../intersection')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/intersectionBy.js b/node_modules/lodash/fp/intersectionBy.js new file mode 100644 index 00000000..72629f27 --- /dev/null +++ b/node_modules/lodash/fp/intersectionBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('intersectionBy', require('../intersectionBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/intersectionWith.js b/node_modules/lodash/fp/intersectionWith.js new file mode 100644 index 00000000..e064f400 --- /dev/null +++ b/node_modules/lodash/fp/intersectionWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('intersectionWith', require('../intersectionWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/invert.js b/node_modules/lodash/fp/invert.js new file mode 100644 index 00000000..2d5d1f0d --- /dev/null +++ b/node_modules/lodash/fp/invert.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invert', require('../invert')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/invertBy.js b/node_modules/lodash/fp/invertBy.js new file mode 100644 index 00000000..63ca97ec --- /dev/null +++ b/node_modules/lodash/fp/invertBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invertBy', require('../invertBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/invertObj.js b/node_modules/lodash/fp/invertObj.js new file mode 100644 index 00000000..f1d842e4 --- /dev/null +++ b/node_modules/lodash/fp/invertObj.js @@ -0,0 +1 @@ +module.exports = require('./invert'); diff --git a/node_modules/lodash/fp/invoke.js b/node_modules/lodash/fp/invoke.js new file mode 100644 index 00000000..fcf17f0d --- /dev/null +++ b/node_modules/lodash/fp/invoke.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invoke', require('../invoke')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/invokeArgs.js b/node_modules/lodash/fp/invokeArgs.js new file mode 100644 index 00000000..d3f2953f --- /dev/null +++ b/node_modules/lodash/fp/invokeArgs.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invokeArgs', require('../invoke')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/invokeArgsMap.js b/node_modules/lodash/fp/invokeArgsMap.js new file mode 100644 index 00000000..eaa9f84f --- /dev/null +++ b/node_modules/lodash/fp/invokeArgsMap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invokeArgsMap', require('../invokeMap')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/invokeMap.js b/node_modules/lodash/fp/invokeMap.js new file mode 100644 index 00000000..6515fd73 --- /dev/null +++ b/node_modules/lodash/fp/invokeMap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invokeMap', require('../invokeMap')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isArguments.js b/node_modules/lodash/fp/isArguments.js new file mode 100644 index 00000000..1d93c9e5 --- /dev/null +++ b/node_modules/lodash/fp/isArguments.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isArguments', require('../isArguments'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isArray.js b/node_modules/lodash/fp/isArray.js new file mode 100644 index 00000000..ba7ade8d --- /dev/null +++ b/node_modules/lodash/fp/isArray.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isArray', require('../isArray'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isArrayBuffer.js b/node_modules/lodash/fp/isArrayBuffer.js new file mode 100644 index 00000000..5088513f --- /dev/null +++ b/node_modules/lodash/fp/isArrayBuffer.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isArrayBuffer', require('../isArrayBuffer'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isArrayLike.js b/node_modules/lodash/fp/isArrayLike.js new file mode 100644 index 00000000..8f1856bf --- /dev/null +++ b/node_modules/lodash/fp/isArrayLike.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isArrayLike', require('../isArrayLike'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isArrayLikeObject.js b/node_modules/lodash/fp/isArrayLikeObject.js new file mode 100644 index 00000000..21084984 --- /dev/null +++ b/node_modules/lodash/fp/isArrayLikeObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isArrayLikeObject', require('../isArrayLikeObject'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isBoolean.js b/node_modules/lodash/fp/isBoolean.js new file mode 100644 index 00000000..9339f75b --- /dev/null +++ b/node_modules/lodash/fp/isBoolean.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isBoolean', require('../isBoolean'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isBuffer.js b/node_modules/lodash/fp/isBuffer.js new file mode 100644 index 00000000..e60b1238 --- /dev/null +++ b/node_modules/lodash/fp/isBuffer.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isBuffer', require('../isBuffer'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isDate.js b/node_modules/lodash/fp/isDate.js new file mode 100644 index 00000000..dc41d089 --- /dev/null +++ b/node_modules/lodash/fp/isDate.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isDate', require('../isDate'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isElement.js b/node_modules/lodash/fp/isElement.js new file mode 100644 index 00000000..18ee039a --- /dev/null +++ b/node_modules/lodash/fp/isElement.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isElement', require('../isElement'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isEmpty.js b/node_modules/lodash/fp/isEmpty.js new file mode 100644 index 00000000..0f4ae841 --- /dev/null +++ b/node_modules/lodash/fp/isEmpty.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isEmpty', require('../isEmpty'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isEqual.js b/node_modules/lodash/fp/isEqual.js new file mode 100644 index 00000000..41383865 --- /dev/null +++ b/node_modules/lodash/fp/isEqual.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isEqual', require('../isEqual')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isEqualWith.js b/node_modules/lodash/fp/isEqualWith.js new file mode 100644 index 00000000..029ff5cd --- /dev/null +++ b/node_modules/lodash/fp/isEqualWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isEqualWith', require('../isEqualWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isError.js b/node_modules/lodash/fp/isError.js new file mode 100644 index 00000000..3dfd81cc --- /dev/null +++ b/node_modules/lodash/fp/isError.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isError', require('../isError'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isFinite.js b/node_modules/lodash/fp/isFinite.js new file mode 100644 index 00000000..0b647b84 --- /dev/null +++ b/node_modules/lodash/fp/isFinite.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isFinite', require('../isFinite'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isFunction.js b/node_modules/lodash/fp/isFunction.js new file mode 100644 index 00000000..ff8e5c45 --- /dev/null +++ b/node_modules/lodash/fp/isFunction.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isFunction', require('../isFunction'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isInteger.js b/node_modules/lodash/fp/isInteger.js new file mode 100644 index 00000000..67af4ff6 --- /dev/null +++ b/node_modules/lodash/fp/isInteger.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isInteger', require('../isInteger'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isLength.js b/node_modules/lodash/fp/isLength.js new file mode 100644 index 00000000..fc101c5a --- /dev/null +++ b/node_modules/lodash/fp/isLength.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isLength', require('../isLength'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isMap.js b/node_modules/lodash/fp/isMap.js new file mode 100644 index 00000000..a209aa66 --- /dev/null +++ b/node_modules/lodash/fp/isMap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isMap', require('../isMap'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isMatch.js b/node_modules/lodash/fp/isMatch.js new file mode 100644 index 00000000..6264ca17 --- /dev/null +++ b/node_modules/lodash/fp/isMatch.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isMatch', require('../isMatch')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isMatchWith.js b/node_modules/lodash/fp/isMatchWith.js new file mode 100644 index 00000000..d95f3193 --- /dev/null +++ b/node_modules/lodash/fp/isMatchWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isMatchWith', require('../isMatchWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isNaN.js b/node_modules/lodash/fp/isNaN.js new file mode 100644 index 00000000..66a978f1 --- /dev/null +++ b/node_modules/lodash/fp/isNaN.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isNaN', require('../isNaN'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isNative.js b/node_modules/lodash/fp/isNative.js new file mode 100644 index 00000000..3d775ba9 --- /dev/null +++ b/node_modules/lodash/fp/isNative.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isNative', require('../isNative'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isNil.js b/node_modules/lodash/fp/isNil.js new file mode 100644 index 00000000..5952c028 --- /dev/null +++ b/node_modules/lodash/fp/isNil.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isNil', require('../isNil'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isNull.js b/node_modules/lodash/fp/isNull.js new file mode 100644 index 00000000..f201a354 --- /dev/null +++ b/node_modules/lodash/fp/isNull.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isNull', require('../isNull'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isNumber.js b/node_modules/lodash/fp/isNumber.js new file mode 100644 index 00000000..a2b5fa04 --- /dev/null +++ b/node_modules/lodash/fp/isNumber.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isNumber', require('../isNumber'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isObject.js b/node_modules/lodash/fp/isObject.js new file mode 100644 index 00000000..231ace03 --- /dev/null +++ b/node_modules/lodash/fp/isObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isObject', require('../isObject'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isObjectLike.js b/node_modules/lodash/fp/isObjectLike.js new file mode 100644 index 00000000..f16082e6 --- /dev/null +++ b/node_modules/lodash/fp/isObjectLike.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isObjectLike', require('../isObjectLike'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isPlainObject.js b/node_modules/lodash/fp/isPlainObject.js new file mode 100644 index 00000000..b5bea90d --- /dev/null +++ b/node_modules/lodash/fp/isPlainObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isPlainObject', require('../isPlainObject'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isRegExp.js b/node_modules/lodash/fp/isRegExp.js new file mode 100644 index 00000000..12a1a3d7 --- /dev/null +++ b/node_modules/lodash/fp/isRegExp.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isRegExp', require('../isRegExp'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isSafeInteger.js b/node_modules/lodash/fp/isSafeInteger.js new file mode 100644 index 00000000..7230f552 --- /dev/null +++ b/node_modules/lodash/fp/isSafeInteger.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isSafeInteger', require('../isSafeInteger'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isSet.js b/node_modules/lodash/fp/isSet.js new file mode 100644 index 00000000..35c01f6f --- /dev/null +++ b/node_modules/lodash/fp/isSet.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isSet', require('../isSet'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isString.js b/node_modules/lodash/fp/isString.js new file mode 100644 index 00000000..1fd0679e --- /dev/null +++ b/node_modules/lodash/fp/isString.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isString', require('../isString'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isSymbol.js b/node_modules/lodash/fp/isSymbol.js new file mode 100644 index 00000000..38676956 --- /dev/null +++ b/node_modules/lodash/fp/isSymbol.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isSymbol', require('../isSymbol'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isTypedArray.js b/node_modules/lodash/fp/isTypedArray.js new file mode 100644 index 00000000..85679538 --- /dev/null +++ b/node_modules/lodash/fp/isTypedArray.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isTypedArray', require('../isTypedArray'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isUndefined.js b/node_modules/lodash/fp/isUndefined.js new file mode 100644 index 00000000..ddbca31c --- /dev/null +++ b/node_modules/lodash/fp/isUndefined.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isUndefined', require('../isUndefined'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isWeakMap.js b/node_modules/lodash/fp/isWeakMap.js new file mode 100644 index 00000000..ef60c613 --- /dev/null +++ b/node_modules/lodash/fp/isWeakMap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isWeakMap', require('../isWeakMap'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/isWeakSet.js b/node_modules/lodash/fp/isWeakSet.js new file mode 100644 index 00000000..c99bfaa6 --- /dev/null +++ b/node_modules/lodash/fp/isWeakSet.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isWeakSet', require('../isWeakSet'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/iteratee.js b/node_modules/lodash/fp/iteratee.js new file mode 100644 index 00000000..9f0f7173 --- /dev/null +++ b/node_modules/lodash/fp/iteratee.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('iteratee', require('../iteratee')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/join.js b/node_modules/lodash/fp/join.js new file mode 100644 index 00000000..a220e003 --- /dev/null +++ b/node_modules/lodash/fp/join.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('join', require('../join')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/juxt.js b/node_modules/lodash/fp/juxt.js new file mode 100644 index 00000000..f71e04e0 --- /dev/null +++ b/node_modules/lodash/fp/juxt.js @@ -0,0 +1 @@ +module.exports = require('./over'); diff --git a/node_modules/lodash/fp/kebabCase.js b/node_modules/lodash/fp/kebabCase.js new file mode 100644 index 00000000..60737f17 --- /dev/null +++ b/node_modules/lodash/fp/kebabCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('kebabCase', require('../kebabCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/keyBy.js b/node_modules/lodash/fp/keyBy.js new file mode 100644 index 00000000..9a6a85d4 --- /dev/null +++ b/node_modules/lodash/fp/keyBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('keyBy', require('../keyBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/keys.js b/node_modules/lodash/fp/keys.js new file mode 100644 index 00000000..e12bb07f --- /dev/null +++ b/node_modules/lodash/fp/keys.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('keys', require('../keys'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/keysIn.js b/node_modules/lodash/fp/keysIn.js new file mode 100644 index 00000000..f3eb36a8 --- /dev/null +++ b/node_modules/lodash/fp/keysIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('keysIn', require('../keysIn'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/lang.js b/node_modules/lodash/fp/lang.js new file mode 100644 index 00000000..08cc9c14 --- /dev/null +++ b/node_modules/lodash/fp/lang.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../lang')); diff --git a/node_modules/lodash/fp/last.js b/node_modules/lodash/fp/last.js new file mode 100644 index 00000000..0f716993 --- /dev/null +++ b/node_modules/lodash/fp/last.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('last', require('../last'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/lastIndexOf.js b/node_modules/lodash/fp/lastIndexOf.js new file mode 100644 index 00000000..ddf39c30 --- /dev/null +++ b/node_modules/lodash/fp/lastIndexOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lastIndexOf', require('../lastIndexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/lastIndexOfFrom.js b/node_modules/lodash/fp/lastIndexOfFrom.js new file mode 100644 index 00000000..1ff6a0b5 --- /dev/null +++ b/node_modules/lodash/fp/lastIndexOfFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lastIndexOfFrom', require('../lastIndexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/lowerCase.js b/node_modules/lodash/fp/lowerCase.js new file mode 100644 index 00000000..ea64bc15 --- /dev/null +++ b/node_modules/lodash/fp/lowerCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lowerCase', require('../lowerCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/lowerFirst.js b/node_modules/lodash/fp/lowerFirst.js new file mode 100644 index 00000000..539720a3 --- /dev/null +++ b/node_modules/lodash/fp/lowerFirst.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lowerFirst', require('../lowerFirst'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/lt.js b/node_modules/lodash/fp/lt.js new file mode 100644 index 00000000..a31d21ec --- /dev/null +++ b/node_modules/lodash/fp/lt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lt', require('../lt')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/lte.js b/node_modules/lodash/fp/lte.js new file mode 100644 index 00000000..d795d10e --- /dev/null +++ b/node_modules/lodash/fp/lte.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lte', require('../lte')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/map.js b/node_modules/lodash/fp/map.js new file mode 100644 index 00000000..cf987943 --- /dev/null +++ b/node_modules/lodash/fp/map.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('map', require('../map')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/mapKeys.js b/node_modules/lodash/fp/mapKeys.js new file mode 100644 index 00000000..16845870 --- /dev/null +++ b/node_modules/lodash/fp/mapKeys.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mapKeys', require('../mapKeys')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/mapValues.js b/node_modules/lodash/fp/mapValues.js new file mode 100644 index 00000000..40049727 --- /dev/null +++ b/node_modules/lodash/fp/mapValues.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mapValues', require('../mapValues')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/matches.js b/node_modules/lodash/fp/matches.js new file mode 100644 index 00000000..29d1e1e4 --- /dev/null +++ b/node_modules/lodash/fp/matches.js @@ -0,0 +1 @@ +module.exports = require('./isMatch'); diff --git a/node_modules/lodash/fp/matchesProperty.js b/node_modules/lodash/fp/matchesProperty.js new file mode 100644 index 00000000..4575bd24 --- /dev/null +++ b/node_modules/lodash/fp/matchesProperty.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('matchesProperty', require('../matchesProperty')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/math.js b/node_modules/lodash/fp/math.js new file mode 100644 index 00000000..e8f50f79 --- /dev/null +++ b/node_modules/lodash/fp/math.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../math')); diff --git a/node_modules/lodash/fp/max.js b/node_modules/lodash/fp/max.js new file mode 100644 index 00000000..a66acac2 --- /dev/null +++ b/node_modules/lodash/fp/max.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('max', require('../max'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/maxBy.js b/node_modules/lodash/fp/maxBy.js new file mode 100644 index 00000000..d083fd64 --- /dev/null +++ b/node_modules/lodash/fp/maxBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('maxBy', require('../maxBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/mean.js b/node_modules/lodash/fp/mean.js new file mode 100644 index 00000000..31172460 --- /dev/null +++ b/node_modules/lodash/fp/mean.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mean', require('../mean'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/meanBy.js b/node_modules/lodash/fp/meanBy.js new file mode 100644 index 00000000..556f25ed --- /dev/null +++ b/node_modules/lodash/fp/meanBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('meanBy', require('../meanBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/memoize.js b/node_modules/lodash/fp/memoize.js new file mode 100644 index 00000000..638eec63 --- /dev/null +++ b/node_modules/lodash/fp/memoize.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('memoize', require('../memoize')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/merge.js b/node_modules/lodash/fp/merge.js new file mode 100644 index 00000000..ac66adde --- /dev/null +++ b/node_modules/lodash/fp/merge.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('merge', require('../merge')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/mergeAll.js b/node_modules/lodash/fp/mergeAll.js new file mode 100644 index 00000000..a3674d67 --- /dev/null +++ b/node_modules/lodash/fp/mergeAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mergeAll', require('../merge')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/mergeAllWith.js b/node_modules/lodash/fp/mergeAllWith.js new file mode 100644 index 00000000..4bd4206d --- /dev/null +++ b/node_modules/lodash/fp/mergeAllWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mergeAllWith', require('../mergeWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/mergeWith.js b/node_modules/lodash/fp/mergeWith.js new file mode 100644 index 00000000..00d44d5e --- /dev/null +++ b/node_modules/lodash/fp/mergeWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mergeWith', require('../mergeWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/method.js b/node_modules/lodash/fp/method.js new file mode 100644 index 00000000..f4060c68 --- /dev/null +++ b/node_modules/lodash/fp/method.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('method', require('../method')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/methodOf.js b/node_modules/lodash/fp/methodOf.js new file mode 100644 index 00000000..61399056 --- /dev/null +++ b/node_modules/lodash/fp/methodOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('methodOf', require('../methodOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/min.js b/node_modules/lodash/fp/min.js new file mode 100644 index 00000000..d12c6b40 --- /dev/null +++ b/node_modules/lodash/fp/min.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('min', require('../min'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/minBy.js b/node_modules/lodash/fp/minBy.js new file mode 100644 index 00000000..fdb9e24d --- /dev/null +++ b/node_modules/lodash/fp/minBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('minBy', require('../minBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/mixin.js b/node_modules/lodash/fp/mixin.js new file mode 100644 index 00000000..332e6fbf --- /dev/null +++ b/node_modules/lodash/fp/mixin.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mixin', require('../mixin')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/multiply.js b/node_modules/lodash/fp/multiply.js new file mode 100644 index 00000000..4dcf0b0d --- /dev/null +++ b/node_modules/lodash/fp/multiply.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('multiply', require('../multiply')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/nAry.js b/node_modules/lodash/fp/nAry.js new file mode 100644 index 00000000..f262a76c --- /dev/null +++ b/node_modules/lodash/fp/nAry.js @@ -0,0 +1 @@ +module.exports = require('./ary'); diff --git a/node_modules/lodash/fp/negate.js b/node_modules/lodash/fp/negate.js new file mode 100644 index 00000000..8b6dc7c5 --- /dev/null +++ b/node_modules/lodash/fp/negate.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('negate', require('../negate'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/next.js b/node_modules/lodash/fp/next.js new file mode 100644 index 00000000..140155e2 --- /dev/null +++ b/node_modules/lodash/fp/next.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('next', require('../next'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/noop.js b/node_modules/lodash/fp/noop.js new file mode 100644 index 00000000..b9e32cc8 --- /dev/null +++ b/node_modules/lodash/fp/noop.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('noop', require('../noop'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/now.js b/node_modules/lodash/fp/now.js new file mode 100644 index 00000000..6de2068a --- /dev/null +++ b/node_modules/lodash/fp/now.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('now', require('../now'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/nth.js b/node_modules/lodash/fp/nth.js new file mode 100644 index 00000000..da4fda74 --- /dev/null +++ b/node_modules/lodash/fp/nth.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('nth', require('../nth')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/nthArg.js b/node_modules/lodash/fp/nthArg.js new file mode 100644 index 00000000..fce31659 --- /dev/null +++ b/node_modules/lodash/fp/nthArg.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('nthArg', require('../nthArg')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/number.js b/node_modules/lodash/fp/number.js new file mode 100644 index 00000000..5c10b884 --- /dev/null +++ b/node_modules/lodash/fp/number.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../number')); diff --git a/node_modules/lodash/fp/object.js b/node_modules/lodash/fp/object.js new file mode 100644 index 00000000..ae39a134 --- /dev/null +++ b/node_modules/lodash/fp/object.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../object')); diff --git a/node_modules/lodash/fp/omit.js b/node_modules/lodash/fp/omit.js new file mode 100644 index 00000000..fd685291 --- /dev/null +++ b/node_modules/lodash/fp/omit.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('omit', require('../omit')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/omitAll.js b/node_modules/lodash/fp/omitAll.js new file mode 100644 index 00000000..144cf4b9 --- /dev/null +++ b/node_modules/lodash/fp/omitAll.js @@ -0,0 +1 @@ +module.exports = require('./omit'); diff --git a/node_modules/lodash/fp/omitBy.js b/node_modules/lodash/fp/omitBy.js new file mode 100644 index 00000000..90df7380 --- /dev/null +++ b/node_modules/lodash/fp/omitBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('omitBy', require('../omitBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/once.js b/node_modules/lodash/fp/once.js new file mode 100644 index 00000000..f8f0a5c7 --- /dev/null +++ b/node_modules/lodash/fp/once.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('once', require('../once'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/orderBy.js b/node_modules/lodash/fp/orderBy.js new file mode 100644 index 00000000..848e2107 --- /dev/null +++ b/node_modules/lodash/fp/orderBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('orderBy', require('../orderBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/over.js b/node_modules/lodash/fp/over.js new file mode 100644 index 00000000..01eba7b9 --- /dev/null +++ b/node_modules/lodash/fp/over.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('over', require('../over')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/overArgs.js b/node_modules/lodash/fp/overArgs.js new file mode 100644 index 00000000..738556f0 --- /dev/null +++ b/node_modules/lodash/fp/overArgs.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('overArgs', require('../overArgs')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/overEvery.js b/node_modules/lodash/fp/overEvery.js new file mode 100644 index 00000000..9f5a032d --- /dev/null +++ b/node_modules/lodash/fp/overEvery.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('overEvery', require('../overEvery')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/overSome.js b/node_modules/lodash/fp/overSome.js new file mode 100644 index 00000000..15939d58 --- /dev/null +++ b/node_modules/lodash/fp/overSome.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('overSome', require('../overSome')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/pad.js b/node_modules/lodash/fp/pad.js new file mode 100644 index 00000000..f1dea4a9 --- /dev/null +++ b/node_modules/lodash/fp/pad.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pad', require('../pad')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/padChars.js b/node_modules/lodash/fp/padChars.js new file mode 100644 index 00000000..d6e0804c --- /dev/null +++ b/node_modules/lodash/fp/padChars.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('padChars', require('../pad')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/padCharsEnd.js b/node_modules/lodash/fp/padCharsEnd.js new file mode 100644 index 00000000..d4ab79ad --- /dev/null +++ b/node_modules/lodash/fp/padCharsEnd.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('padCharsEnd', require('../padEnd')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/padCharsStart.js b/node_modules/lodash/fp/padCharsStart.js new file mode 100644 index 00000000..a08a3000 --- /dev/null +++ b/node_modules/lodash/fp/padCharsStart.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('padCharsStart', require('../padStart')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/padEnd.js b/node_modules/lodash/fp/padEnd.js new file mode 100644 index 00000000..a8522ec3 --- /dev/null +++ b/node_modules/lodash/fp/padEnd.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('padEnd', require('../padEnd')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/padStart.js b/node_modules/lodash/fp/padStart.js new file mode 100644 index 00000000..f4ca79d4 --- /dev/null +++ b/node_modules/lodash/fp/padStart.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('padStart', require('../padStart')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/parseInt.js b/node_modules/lodash/fp/parseInt.js new file mode 100644 index 00000000..27314ccb --- /dev/null +++ b/node_modules/lodash/fp/parseInt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('parseInt', require('../parseInt')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/partial.js b/node_modules/lodash/fp/partial.js new file mode 100644 index 00000000..5d460159 --- /dev/null +++ b/node_modules/lodash/fp/partial.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('partial', require('../partial')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/partialRight.js b/node_modules/lodash/fp/partialRight.js new file mode 100644 index 00000000..7f05fed0 --- /dev/null +++ b/node_modules/lodash/fp/partialRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('partialRight', require('../partialRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/partition.js b/node_modules/lodash/fp/partition.js new file mode 100644 index 00000000..2ebcacc1 --- /dev/null +++ b/node_modules/lodash/fp/partition.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('partition', require('../partition')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/path.js b/node_modules/lodash/fp/path.js new file mode 100644 index 00000000..b29cfb21 --- /dev/null +++ b/node_modules/lodash/fp/path.js @@ -0,0 +1 @@ +module.exports = require('./get'); diff --git a/node_modules/lodash/fp/pathEq.js b/node_modules/lodash/fp/pathEq.js new file mode 100644 index 00000000..36c027a3 --- /dev/null +++ b/node_modules/lodash/fp/pathEq.js @@ -0,0 +1 @@ +module.exports = require('./matchesProperty'); diff --git a/node_modules/lodash/fp/pathOr.js b/node_modules/lodash/fp/pathOr.js new file mode 100644 index 00000000..4ab58209 --- /dev/null +++ b/node_modules/lodash/fp/pathOr.js @@ -0,0 +1 @@ +module.exports = require('./getOr'); diff --git a/node_modules/lodash/fp/paths.js b/node_modules/lodash/fp/paths.js new file mode 100644 index 00000000..1eb7950a --- /dev/null +++ b/node_modules/lodash/fp/paths.js @@ -0,0 +1 @@ +module.exports = require('./at'); diff --git a/node_modules/lodash/fp/pick.js b/node_modules/lodash/fp/pick.js new file mode 100644 index 00000000..197393de --- /dev/null +++ b/node_modules/lodash/fp/pick.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pick', require('../pick')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/pickAll.js b/node_modules/lodash/fp/pickAll.js new file mode 100644 index 00000000..a8ecd461 --- /dev/null +++ b/node_modules/lodash/fp/pickAll.js @@ -0,0 +1 @@ +module.exports = require('./pick'); diff --git a/node_modules/lodash/fp/pickBy.js b/node_modules/lodash/fp/pickBy.js new file mode 100644 index 00000000..d832d16b --- /dev/null +++ b/node_modules/lodash/fp/pickBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pickBy', require('../pickBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/pipe.js b/node_modules/lodash/fp/pipe.js new file mode 100644 index 00000000..b2e1e2cc --- /dev/null +++ b/node_modules/lodash/fp/pipe.js @@ -0,0 +1 @@ +module.exports = require('./flow'); diff --git a/node_modules/lodash/fp/placeholder.js b/node_modules/lodash/fp/placeholder.js new file mode 100644 index 00000000..1ce17393 --- /dev/null +++ b/node_modules/lodash/fp/placeholder.js @@ -0,0 +1,6 @@ +/** + * The default argument placeholder value for methods. + * + * @type {Object} + */ +module.exports = {}; diff --git a/node_modules/lodash/fp/plant.js b/node_modules/lodash/fp/plant.js new file mode 100644 index 00000000..eca8f32b --- /dev/null +++ b/node_modules/lodash/fp/plant.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('plant', require('../plant'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/pluck.js b/node_modules/lodash/fp/pluck.js new file mode 100644 index 00000000..0d1e1abf --- /dev/null +++ b/node_modules/lodash/fp/pluck.js @@ -0,0 +1 @@ +module.exports = require('./map'); diff --git a/node_modules/lodash/fp/prop.js b/node_modules/lodash/fp/prop.js new file mode 100644 index 00000000..b29cfb21 --- /dev/null +++ b/node_modules/lodash/fp/prop.js @@ -0,0 +1 @@ +module.exports = require('./get'); diff --git a/node_modules/lodash/fp/propEq.js b/node_modules/lodash/fp/propEq.js new file mode 100644 index 00000000..36c027a3 --- /dev/null +++ b/node_modules/lodash/fp/propEq.js @@ -0,0 +1 @@ +module.exports = require('./matchesProperty'); diff --git a/node_modules/lodash/fp/propOr.js b/node_modules/lodash/fp/propOr.js new file mode 100644 index 00000000..4ab58209 --- /dev/null +++ b/node_modules/lodash/fp/propOr.js @@ -0,0 +1 @@ +module.exports = require('./getOr'); diff --git a/node_modules/lodash/fp/property.js b/node_modules/lodash/fp/property.js new file mode 100644 index 00000000..b29cfb21 --- /dev/null +++ b/node_modules/lodash/fp/property.js @@ -0,0 +1 @@ +module.exports = require('./get'); diff --git a/node_modules/lodash/fp/propertyOf.js b/node_modules/lodash/fp/propertyOf.js new file mode 100644 index 00000000..f6273ee4 --- /dev/null +++ b/node_modules/lodash/fp/propertyOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('propertyOf', require('../get')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/props.js b/node_modules/lodash/fp/props.js new file mode 100644 index 00000000..1eb7950a --- /dev/null +++ b/node_modules/lodash/fp/props.js @@ -0,0 +1 @@ +module.exports = require('./at'); diff --git a/node_modules/lodash/fp/pull.js b/node_modules/lodash/fp/pull.js new file mode 100644 index 00000000..8d7084f0 --- /dev/null +++ b/node_modules/lodash/fp/pull.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pull', require('../pull')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/pullAll.js b/node_modules/lodash/fp/pullAll.js new file mode 100644 index 00000000..98d5c9a7 --- /dev/null +++ b/node_modules/lodash/fp/pullAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pullAll', require('../pullAll')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/pullAllBy.js b/node_modules/lodash/fp/pullAllBy.js new file mode 100644 index 00000000..876bc3bf --- /dev/null +++ b/node_modules/lodash/fp/pullAllBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pullAllBy', require('../pullAllBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/pullAllWith.js b/node_modules/lodash/fp/pullAllWith.js new file mode 100644 index 00000000..f71ba4d7 --- /dev/null +++ b/node_modules/lodash/fp/pullAllWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pullAllWith', require('../pullAllWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/pullAt.js b/node_modules/lodash/fp/pullAt.js new file mode 100644 index 00000000..e8b3bb61 --- /dev/null +++ b/node_modules/lodash/fp/pullAt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pullAt', require('../pullAt')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/random.js b/node_modules/lodash/fp/random.js new file mode 100644 index 00000000..99d852e4 --- /dev/null +++ b/node_modules/lodash/fp/random.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('random', require('../random')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/range.js b/node_modules/lodash/fp/range.js new file mode 100644 index 00000000..a6bb5911 --- /dev/null +++ b/node_modules/lodash/fp/range.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('range', require('../range')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/rangeRight.js b/node_modules/lodash/fp/rangeRight.js new file mode 100644 index 00000000..fdb712f9 --- /dev/null +++ b/node_modules/lodash/fp/rangeRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rangeRight', require('../rangeRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/rangeStep.js b/node_modules/lodash/fp/rangeStep.js new file mode 100644 index 00000000..d72dfc20 --- /dev/null +++ b/node_modules/lodash/fp/rangeStep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rangeStep', require('../range')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/rangeStepRight.js b/node_modules/lodash/fp/rangeStepRight.js new file mode 100644 index 00000000..8b2a67bc --- /dev/null +++ b/node_modules/lodash/fp/rangeStepRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rangeStepRight', require('../rangeRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/rearg.js b/node_modules/lodash/fp/rearg.js new file mode 100644 index 00000000..678e02a3 --- /dev/null +++ b/node_modules/lodash/fp/rearg.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rearg', require('../rearg')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/reduce.js b/node_modules/lodash/fp/reduce.js new file mode 100644 index 00000000..4cef0a00 --- /dev/null +++ b/node_modules/lodash/fp/reduce.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('reduce', require('../reduce')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/reduceRight.js b/node_modules/lodash/fp/reduceRight.js new file mode 100644 index 00000000..caf5bb51 --- /dev/null +++ b/node_modules/lodash/fp/reduceRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('reduceRight', require('../reduceRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/reject.js b/node_modules/lodash/fp/reject.js new file mode 100644 index 00000000..c1632738 --- /dev/null +++ b/node_modules/lodash/fp/reject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('reject', require('../reject')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/remove.js b/node_modules/lodash/fp/remove.js new file mode 100644 index 00000000..e9d13273 --- /dev/null +++ b/node_modules/lodash/fp/remove.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('remove', require('../remove')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/repeat.js b/node_modules/lodash/fp/repeat.js new file mode 100644 index 00000000..08470f24 --- /dev/null +++ b/node_modules/lodash/fp/repeat.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('repeat', require('../repeat')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/replace.js b/node_modules/lodash/fp/replace.js new file mode 100644 index 00000000..2227db62 --- /dev/null +++ b/node_modules/lodash/fp/replace.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('replace', require('../replace')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/rest.js b/node_modules/lodash/fp/rest.js new file mode 100644 index 00000000..c1f3d64b --- /dev/null +++ b/node_modules/lodash/fp/rest.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rest', require('../rest')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/restFrom.js b/node_modules/lodash/fp/restFrom.js new file mode 100644 index 00000000..714e42b5 --- /dev/null +++ b/node_modules/lodash/fp/restFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('restFrom', require('../rest')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/result.js b/node_modules/lodash/fp/result.js new file mode 100644 index 00000000..f86ce071 --- /dev/null +++ b/node_modules/lodash/fp/result.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('result', require('../result')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/reverse.js b/node_modules/lodash/fp/reverse.js new file mode 100644 index 00000000..07c9f5e4 --- /dev/null +++ b/node_modules/lodash/fp/reverse.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('reverse', require('../reverse')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/round.js b/node_modules/lodash/fp/round.js new file mode 100644 index 00000000..4c0e5c82 --- /dev/null +++ b/node_modules/lodash/fp/round.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('round', require('../round')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/sample.js b/node_modules/lodash/fp/sample.js new file mode 100644 index 00000000..6bea1254 --- /dev/null +++ b/node_modules/lodash/fp/sample.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sample', require('../sample'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/sampleSize.js b/node_modules/lodash/fp/sampleSize.js new file mode 100644 index 00000000..359ed6fc --- /dev/null +++ b/node_modules/lodash/fp/sampleSize.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sampleSize', require('../sampleSize')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/seq.js b/node_modules/lodash/fp/seq.js new file mode 100644 index 00000000..d8f42b0a --- /dev/null +++ b/node_modules/lodash/fp/seq.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../seq')); diff --git a/node_modules/lodash/fp/set.js b/node_modules/lodash/fp/set.js new file mode 100644 index 00000000..0b56a56c --- /dev/null +++ b/node_modules/lodash/fp/set.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('set', require('../set')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/setWith.js b/node_modules/lodash/fp/setWith.js new file mode 100644 index 00000000..0b584952 --- /dev/null +++ b/node_modules/lodash/fp/setWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('setWith', require('../setWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/shuffle.js b/node_modules/lodash/fp/shuffle.js new file mode 100644 index 00000000..aa3a1ca5 --- /dev/null +++ b/node_modules/lodash/fp/shuffle.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('shuffle', require('../shuffle'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/size.js b/node_modules/lodash/fp/size.js new file mode 100644 index 00000000..7490136e --- /dev/null +++ b/node_modules/lodash/fp/size.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('size', require('../size'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/slice.js b/node_modules/lodash/fp/slice.js new file mode 100644 index 00000000..15945d32 --- /dev/null +++ b/node_modules/lodash/fp/slice.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('slice', require('../slice')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/snakeCase.js b/node_modules/lodash/fp/snakeCase.js new file mode 100644 index 00000000..a0ff7808 --- /dev/null +++ b/node_modules/lodash/fp/snakeCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('snakeCase', require('../snakeCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/some.js b/node_modules/lodash/fp/some.js new file mode 100644 index 00000000..a4fa2d00 --- /dev/null +++ b/node_modules/lodash/fp/some.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('some', require('../some')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/sortBy.js b/node_modules/lodash/fp/sortBy.js new file mode 100644 index 00000000..e0790ad5 --- /dev/null +++ b/node_modules/lodash/fp/sortBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortBy', require('../sortBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/sortedIndex.js b/node_modules/lodash/fp/sortedIndex.js new file mode 100644 index 00000000..364a0543 --- /dev/null +++ b/node_modules/lodash/fp/sortedIndex.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedIndex', require('../sortedIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/sortedIndexBy.js b/node_modules/lodash/fp/sortedIndexBy.js new file mode 100644 index 00000000..9593dbd1 --- /dev/null +++ b/node_modules/lodash/fp/sortedIndexBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedIndexBy', require('../sortedIndexBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/sortedIndexOf.js b/node_modules/lodash/fp/sortedIndexOf.js new file mode 100644 index 00000000..c9084cab --- /dev/null +++ b/node_modules/lodash/fp/sortedIndexOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedIndexOf', require('../sortedIndexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/sortedLastIndex.js b/node_modules/lodash/fp/sortedLastIndex.js new file mode 100644 index 00000000..47fe241a --- /dev/null +++ b/node_modules/lodash/fp/sortedLastIndex.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedLastIndex', require('../sortedLastIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/sortedLastIndexBy.js b/node_modules/lodash/fp/sortedLastIndexBy.js new file mode 100644 index 00000000..0f9a3473 --- /dev/null +++ b/node_modules/lodash/fp/sortedLastIndexBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedLastIndexBy', require('../sortedLastIndexBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/sortedLastIndexOf.js b/node_modules/lodash/fp/sortedLastIndexOf.js new file mode 100644 index 00000000..0d4d9327 --- /dev/null +++ b/node_modules/lodash/fp/sortedLastIndexOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedLastIndexOf', require('../sortedLastIndexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/sortedUniq.js b/node_modules/lodash/fp/sortedUniq.js new file mode 100644 index 00000000..882d2837 --- /dev/null +++ b/node_modules/lodash/fp/sortedUniq.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedUniq', require('../sortedUniq'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/sortedUniqBy.js b/node_modules/lodash/fp/sortedUniqBy.js new file mode 100644 index 00000000..033db91c --- /dev/null +++ b/node_modules/lodash/fp/sortedUniqBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedUniqBy', require('../sortedUniqBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/split.js b/node_modules/lodash/fp/split.js new file mode 100644 index 00000000..14de1a7e --- /dev/null +++ b/node_modules/lodash/fp/split.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('split', require('../split')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/spread.js b/node_modules/lodash/fp/spread.js new file mode 100644 index 00000000..2d11b707 --- /dev/null +++ b/node_modules/lodash/fp/spread.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('spread', require('../spread')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/spreadFrom.js b/node_modules/lodash/fp/spreadFrom.js new file mode 100644 index 00000000..0b630df1 --- /dev/null +++ b/node_modules/lodash/fp/spreadFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('spreadFrom', require('../spread')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/startCase.js b/node_modules/lodash/fp/startCase.js new file mode 100644 index 00000000..ada98c94 --- /dev/null +++ b/node_modules/lodash/fp/startCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('startCase', require('../startCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/startsWith.js b/node_modules/lodash/fp/startsWith.js new file mode 100644 index 00000000..985e2f29 --- /dev/null +++ b/node_modules/lodash/fp/startsWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('startsWith', require('../startsWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/string.js b/node_modules/lodash/fp/string.js new file mode 100644 index 00000000..773b0370 --- /dev/null +++ b/node_modules/lodash/fp/string.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../string')); diff --git a/node_modules/lodash/fp/stubArray.js b/node_modules/lodash/fp/stubArray.js new file mode 100644 index 00000000..cd604cb4 --- /dev/null +++ b/node_modules/lodash/fp/stubArray.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubArray', require('../stubArray'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/stubFalse.js b/node_modules/lodash/fp/stubFalse.js new file mode 100644 index 00000000..32966645 --- /dev/null +++ b/node_modules/lodash/fp/stubFalse.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubFalse', require('../stubFalse'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/stubObject.js b/node_modules/lodash/fp/stubObject.js new file mode 100644 index 00000000..c6c8ec47 --- /dev/null +++ b/node_modules/lodash/fp/stubObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubObject', require('../stubObject'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/stubString.js b/node_modules/lodash/fp/stubString.js new file mode 100644 index 00000000..701051e8 --- /dev/null +++ b/node_modules/lodash/fp/stubString.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubString', require('../stubString'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/stubTrue.js b/node_modules/lodash/fp/stubTrue.js new file mode 100644 index 00000000..9249082c --- /dev/null +++ b/node_modules/lodash/fp/stubTrue.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubTrue', require('../stubTrue'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/subtract.js b/node_modules/lodash/fp/subtract.js new file mode 100644 index 00000000..d32b16d4 --- /dev/null +++ b/node_modules/lodash/fp/subtract.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('subtract', require('../subtract')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/sum.js b/node_modules/lodash/fp/sum.js new file mode 100644 index 00000000..5cce12b3 --- /dev/null +++ b/node_modules/lodash/fp/sum.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sum', require('../sum'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/sumBy.js b/node_modules/lodash/fp/sumBy.js new file mode 100644 index 00000000..c8826565 --- /dev/null +++ b/node_modules/lodash/fp/sumBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sumBy', require('../sumBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/symmetricDifference.js b/node_modules/lodash/fp/symmetricDifference.js new file mode 100644 index 00000000..78c16add --- /dev/null +++ b/node_modules/lodash/fp/symmetricDifference.js @@ -0,0 +1 @@ +module.exports = require('./xor'); diff --git a/node_modules/lodash/fp/symmetricDifferenceBy.js b/node_modules/lodash/fp/symmetricDifferenceBy.js new file mode 100644 index 00000000..298fc7ff --- /dev/null +++ b/node_modules/lodash/fp/symmetricDifferenceBy.js @@ -0,0 +1 @@ +module.exports = require('./xorBy'); diff --git a/node_modules/lodash/fp/symmetricDifferenceWith.js b/node_modules/lodash/fp/symmetricDifferenceWith.js new file mode 100644 index 00000000..70bc6faf --- /dev/null +++ b/node_modules/lodash/fp/symmetricDifferenceWith.js @@ -0,0 +1 @@ +module.exports = require('./xorWith'); diff --git a/node_modules/lodash/fp/tail.js b/node_modules/lodash/fp/tail.js new file mode 100644 index 00000000..f122f0ac --- /dev/null +++ b/node_modules/lodash/fp/tail.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('tail', require('../tail'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/take.js b/node_modules/lodash/fp/take.js new file mode 100644 index 00000000..9af98a7b --- /dev/null +++ b/node_modules/lodash/fp/take.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('take', require('../take')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/takeLast.js b/node_modules/lodash/fp/takeLast.js new file mode 100644 index 00000000..e98c84a1 --- /dev/null +++ b/node_modules/lodash/fp/takeLast.js @@ -0,0 +1 @@ +module.exports = require('./takeRight'); diff --git a/node_modules/lodash/fp/takeLastWhile.js b/node_modules/lodash/fp/takeLastWhile.js new file mode 100644 index 00000000..5367968a --- /dev/null +++ b/node_modules/lodash/fp/takeLastWhile.js @@ -0,0 +1 @@ +module.exports = require('./takeRightWhile'); diff --git a/node_modules/lodash/fp/takeRight.js b/node_modules/lodash/fp/takeRight.js new file mode 100644 index 00000000..b82950a6 --- /dev/null +++ b/node_modules/lodash/fp/takeRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('takeRight', require('../takeRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/takeRightWhile.js b/node_modules/lodash/fp/takeRightWhile.js new file mode 100644 index 00000000..8ffb0a28 --- /dev/null +++ b/node_modules/lodash/fp/takeRightWhile.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('takeRightWhile', require('../takeRightWhile')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/takeWhile.js b/node_modules/lodash/fp/takeWhile.js new file mode 100644 index 00000000..28136644 --- /dev/null +++ b/node_modules/lodash/fp/takeWhile.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('takeWhile', require('../takeWhile')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/tap.js b/node_modules/lodash/fp/tap.js new file mode 100644 index 00000000..d33ad6ec --- /dev/null +++ b/node_modules/lodash/fp/tap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('tap', require('../tap')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/template.js b/node_modules/lodash/fp/template.js new file mode 100644 index 00000000..74857e1c --- /dev/null +++ b/node_modules/lodash/fp/template.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('template', require('../template')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/templateSettings.js b/node_modules/lodash/fp/templateSettings.js new file mode 100644 index 00000000..7bcc0a82 --- /dev/null +++ b/node_modules/lodash/fp/templateSettings.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('templateSettings', require('../templateSettings'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/throttle.js b/node_modules/lodash/fp/throttle.js new file mode 100644 index 00000000..77fff142 --- /dev/null +++ b/node_modules/lodash/fp/throttle.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('throttle', require('../throttle')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/thru.js b/node_modules/lodash/fp/thru.js new file mode 100644 index 00000000..d42b3b1d --- /dev/null +++ b/node_modules/lodash/fp/thru.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('thru', require('../thru')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/times.js b/node_modules/lodash/fp/times.js new file mode 100644 index 00000000..0dab06da --- /dev/null +++ b/node_modules/lodash/fp/times.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('times', require('../times')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/toArray.js b/node_modules/lodash/fp/toArray.js new file mode 100644 index 00000000..f0c360ac --- /dev/null +++ b/node_modules/lodash/fp/toArray.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toArray', require('../toArray'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/toFinite.js b/node_modules/lodash/fp/toFinite.js new file mode 100644 index 00000000..3a47687d --- /dev/null +++ b/node_modules/lodash/fp/toFinite.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toFinite', require('../toFinite'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/toInteger.js b/node_modules/lodash/fp/toInteger.js new file mode 100644 index 00000000..e0af6a75 --- /dev/null +++ b/node_modules/lodash/fp/toInteger.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toInteger', require('../toInteger'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/toIterator.js b/node_modules/lodash/fp/toIterator.js new file mode 100644 index 00000000..65e6baa9 --- /dev/null +++ b/node_modules/lodash/fp/toIterator.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toIterator', require('../toIterator'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/toJSON.js b/node_modules/lodash/fp/toJSON.js new file mode 100644 index 00000000..2d718d0b --- /dev/null +++ b/node_modules/lodash/fp/toJSON.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toJSON', require('../toJSON'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/toLength.js b/node_modules/lodash/fp/toLength.js new file mode 100644 index 00000000..b97cdd93 --- /dev/null +++ b/node_modules/lodash/fp/toLength.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toLength', require('../toLength'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/toLower.js b/node_modules/lodash/fp/toLower.js new file mode 100644 index 00000000..616ef36a --- /dev/null +++ b/node_modules/lodash/fp/toLower.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toLower', require('../toLower'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/toNumber.js b/node_modules/lodash/fp/toNumber.js new file mode 100644 index 00000000..d0c6f4d3 --- /dev/null +++ b/node_modules/lodash/fp/toNumber.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toNumber', require('../toNumber'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/toPairs.js b/node_modules/lodash/fp/toPairs.js new file mode 100644 index 00000000..af783786 --- /dev/null +++ b/node_modules/lodash/fp/toPairs.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toPairs', require('../toPairs'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/toPairsIn.js b/node_modules/lodash/fp/toPairsIn.js new file mode 100644 index 00000000..66504abf --- /dev/null +++ b/node_modules/lodash/fp/toPairsIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toPairsIn', require('../toPairsIn'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/toPath.js b/node_modules/lodash/fp/toPath.js new file mode 100644 index 00000000..b4d5e50f --- /dev/null +++ b/node_modules/lodash/fp/toPath.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toPath', require('../toPath'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/toPlainObject.js b/node_modules/lodash/fp/toPlainObject.js new file mode 100644 index 00000000..278bb863 --- /dev/null +++ b/node_modules/lodash/fp/toPlainObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toPlainObject', require('../toPlainObject'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/toSafeInteger.js b/node_modules/lodash/fp/toSafeInteger.js new file mode 100644 index 00000000..367a26fd --- /dev/null +++ b/node_modules/lodash/fp/toSafeInteger.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toSafeInteger', require('../toSafeInteger'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/toString.js b/node_modules/lodash/fp/toString.js new file mode 100644 index 00000000..cec4f8e2 --- /dev/null +++ b/node_modules/lodash/fp/toString.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toString', require('../toString'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/toUpper.js b/node_modules/lodash/fp/toUpper.js new file mode 100644 index 00000000..54f9a560 --- /dev/null +++ b/node_modules/lodash/fp/toUpper.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toUpper', require('../toUpper'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/transform.js b/node_modules/lodash/fp/transform.js new file mode 100644 index 00000000..759d088f --- /dev/null +++ b/node_modules/lodash/fp/transform.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('transform', require('../transform')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/trim.js b/node_modules/lodash/fp/trim.js new file mode 100644 index 00000000..e6319a74 --- /dev/null +++ b/node_modules/lodash/fp/trim.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trim', require('../trim')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/trimChars.js b/node_modules/lodash/fp/trimChars.js new file mode 100644 index 00000000..c9294de4 --- /dev/null +++ b/node_modules/lodash/fp/trimChars.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trimChars', require('../trim')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/trimCharsEnd.js b/node_modules/lodash/fp/trimCharsEnd.js new file mode 100644 index 00000000..284bc2f8 --- /dev/null +++ b/node_modules/lodash/fp/trimCharsEnd.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trimCharsEnd', require('../trimEnd')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/trimCharsStart.js b/node_modules/lodash/fp/trimCharsStart.js new file mode 100644 index 00000000..ff0ee65d --- /dev/null +++ b/node_modules/lodash/fp/trimCharsStart.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trimCharsStart', require('../trimStart')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/trimEnd.js b/node_modules/lodash/fp/trimEnd.js new file mode 100644 index 00000000..71908805 --- /dev/null +++ b/node_modules/lodash/fp/trimEnd.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trimEnd', require('../trimEnd')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/trimStart.js b/node_modules/lodash/fp/trimStart.js new file mode 100644 index 00000000..fda902c3 --- /dev/null +++ b/node_modules/lodash/fp/trimStart.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trimStart', require('../trimStart')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/truncate.js b/node_modules/lodash/fp/truncate.js new file mode 100644 index 00000000..d265c1de --- /dev/null +++ b/node_modules/lodash/fp/truncate.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('truncate', require('../truncate')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/unapply.js b/node_modules/lodash/fp/unapply.js new file mode 100644 index 00000000..c5dfe779 --- /dev/null +++ b/node_modules/lodash/fp/unapply.js @@ -0,0 +1 @@ +module.exports = require('./rest'); diff --git a/node_modules/lodash/fp/unary.js b/node_modules/lodash/fp/unary.js new file mode 100644 index 00000000..286c945f --- /dev/null +++ b/node_modules/lodash/fp/unary.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unary', require('../unary'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/unescape.js b/node_modules/lodash/fp/unescape.js new file mode 100644 index 00000000..fddcb46e --- /dev/null +++ b/node_modules/lodash/fp/unescape.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unescape', require('../unescape'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/union.js b/node_modules/lodash/fp/union.js new file mode 100644 index 00000000..ef8228d7 --- /dev/null +++ b/node_modules/lodash/fp/union.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('union', require('../union')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/unionBy.js b/node_modules/lodash/fp/unionBy.js new file mode 100644 index 00000000..603687a1 --- /dev/null +++ b/node_modules/lodash/fp/unionBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unionBy', require('../unionBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/unionWith.js b/node_modules/lodash/fp/unionWith.js new file mode 100644 index 00000000..65bb3a79 --- /dev/null +++ b/node_modules/lodash/fp/unionWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unionWith', require('../unionWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/uniq.js b/node_modules/lodash/fp/uniq.js new file mode 100644 index 00000000..bc185249 --- /dev/null +++ b/node_modules/lodash/fp/uniq.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('uniq', require('../uniq'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/uniqBy.js b/node_modules/lodash/fp/uniqBy.js new file mode 100644 index 00000000..634c6a8b --- /dev/null +++ b/node_modules/lodash/fp/uniqBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('uniqBy', require('../uniqBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/uniqWith.js b/node_modules/lodash/fp/uniqWith.js new file mode 100644 index 00000000..0ec601a9 --- /dev/null +++ b/node_modules/lodash/fp/uniqWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('uniqWith', require('../uniqWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/uniqueId.js b/node_modules/lodash/fp/uniqueId.js new file mode 100644 index 00000000..aa8fc2f7 --- /dev/null +++ b/node_modules/lodash/fp/uniqueId.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('uniqueId', require('../uniqueId')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/unnest.js b/node_modules/lodash/fp/unnest.js new file mode 100644 index 00000000..5d34060a --- /dev/null +++ b/node_modules/lodash/fp/unnest.js @@ -0,0 +1 @@ +module.exports = require('./flatten'); diff --git a/node_modules/lodash/fp/unset.js b/node_modules/lodash/fp/unset.js new file mode 100644 index 00000000..ea203a0f --- /dev/null +++ b/node_modules/lodash/fp/unset.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unset', require('../unset')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/unzip.js b/node_modules/lodash/fp/unzip.js new file mode 100644 index 00000000..cc364b3c --- /dev/null +++ b/node_modules/lodash/fp/unzip.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unzip', require('../unzip'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/unzipWith.js b/node_modules/lodash/fp/unzipWith.js new file mode 100644 index 00000000..182eaa10 --- /dev/null +++ b/node_modules/lodash/fp/unzipWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unzipWith', require('../unzipWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/update.js b/node_modules/lodash/fp/update.js new file mode 100644 index 00000000..b8ce2cc9 --- /dev/null +++ b/node_modules/lodash/fp/update.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('update', require('../update')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/updateWith.js b/node_modules/lodash/fp/updateWith.js new file mode 100644 index 00000000..d5e8282d --- /dev/null +++ b/node_modules/lodash/fp/updateWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('updateWith', require('../updateWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/upperCase.js b/node_modules/lodash/fp/upperCase.js new file mode 100644 index 00000000..c886f202 --- /dev/null +++ b/node_modules/lodash/fp/upperCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('upperCase', require('../upperCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/upperFirst.js b/node_modules/lodash/fp/upperFirst.js new file mode 100644 index 00000000..d8c04df5 --- /dev/null +++ b/node_modules/lodash/fp/upperFirst.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('upperFirst', require('../upperFirst'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/useWith.js b/node_modules/lodash/fp/useWith.js new file mode 100644 index 00000000..d8b3df5a --- /dev/null +++ b/node_modules/lodash/fp/useWith.js @@ -0,0 +1 @@ +module.exports = require('./overArgs'); diff --git a/node_modules/lodash/fp/util.js b/node_modules/lodash/fp/util.js new file mode 100644 index 00000000..18c00bae --- /dev/null +++ b/node_modules/lodash/fp/util.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../util')); diff --git a/node_modules/lodash/fp/value.js b/node_modules/lodash/fp/value.js new file mode 100644 index 00000000..555eec7a --- /dev/null +++ b/node_modules/lodash/fp/value.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('value', require('../value'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/valueOf.js b/node_modules/lodash/fp/valueOf.js new file mode 100644 index 00000000..f968807d --- /dev/null +++ b/node_modules/lodash/fp/valueOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('valueOf', require('../valueOf'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/values.js b/node_modules/lodash/fp/values.js new file mode 100644 index 00000000..2dfc5613 --- /dev/null +++ b/node_modules/lodash/fp/values.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('values', require('../values'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/valuesIn.js b/node_modules/lodash/fp/valuesIn.js new file mode 100644 index 00000000..a1b2bb87 --- /dev/null +++ b/node_modules/lodash/fp/valuesIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('valuesIn', require('../valuesIn'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/where.js b/node_modules/lodash/fp/where.js new file mode 100644 index 00000000..3247f64a --- /dev/null +++ b/node_modules/lodash/fp/where.js @@ -0,0 +1 @@ +module.exports = require('./conformsTo'); diff --git a/node_modules/lodash/fp/whereEq.js b/node_modules/lodash/fp/whereEq.js new file mode 100644 index 00000000..29d1e1e4 --- /dev/null +++ b/node_modules/lodash/fp/whereEq.js @@ -0,0 +1 @@ +module.exports = require('./isMatch'); diff --git a/node_modules/lodash/fp/without.js b/node_modules/lodash/fp/without.js new file mode 100644 index 00000000..bad9e125 --- /dev/null +++ b/node_modules/lodash/fp/without.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('without', require('../without')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/words.js b/node_modules/lodash/fp/words.js new file mode 100644 index 00000000..4a901414 --- /dev/null +++ b/node_modules/lodash/fp/words.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('words', require('../words')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/wrap.js b/node_modules/lodash/fp/wrap.js new file mode 100644 index 00000000..e93bd8a1 --- /dev/null +++ b/node_modules/lodash/fp/wrap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrap', require('../wrap')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/wrapperAt.js b/node_modules/lodash/fp/wrapperAt.js new file mode 100644 index 00000000..8f0a310f --- /dev/null +++ b/node_modules/lodash/fp/wrapperAt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrapperAt', require('../wrapperAt'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/wrapperChain.js b/node_modules/lodash/fp/wrapperChain.js new file mode 100644 index 00000000..2a48ea2b --- /dev/null +++ b/node_modules/lodash/fp/wrapperChain.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrapperChain', require('../wrapperChain'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/wrapperLodash.js b/node_modules/lodash/fp/wrapperLodash.js new file mode 100644 index 00000000..a7162d08 --- /dev/null +++ b/node_modules/lodash/fp/wrapperLodash.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrapperLodash', require('../wrapperLodash'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/wrapperReverse.js b/node_modules/lodash/fp/wrapperReverse.js new file mode 100644 index 00000000..e1481aab --- /dev/null +++ b/node_modules/lodash/fp/wrapperReverse.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrapperReverse', require('../wrapperReverse'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/wrapperValue.js b/node_modules/lodash/fp/wrapperValue.js new file mode 100644 index 00000000..8eb9112f --- /dev/null +++ b/node_modules/lodash/fp/wrapperValue.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrapperValue', require('../wrapperValue'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/xor.js b/node_modules/lodash/fp/xor.js new file mode 100644 index 00000000..29e28194 --- /dev/null +++ b/node_modules/lodash/fp/xor.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('xor', require('../xor')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/xorBy.js b/node_modules/lodash/fp/xorBy.js new file mode 100644 index 00000000..b355686d --- /dev/null +++ b/node_modules/lodash/fp/xorBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('xorBy', require('../xorBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/xorWith.js b/node_modules/lodash/fp/xorWith.js new file mode 100644 index 00000000..8e05739a --- /dev/null +++ b/node_modules/lodash/fp/xorWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('xorWith', require('../xorWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/zip.js b/node_modules/lodash/fp/zip.js new file mode 100644 index 00000000..69e147a4 --- /dev/null +++ b/node_modules/lodash/fp/zip.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('zip', require('../zip')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/zipAll.js b/node_modules/lodash/fp/zipAll.js new file mode 100644 index 00000000..efa8ccbf --- /dev/null +++ b/node_modules/lodash/fp/zipAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('zipAll', require('../zip')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/zipObj.js b/node_modules/lodash/fp/zipObj.js new file mode 100644 index 00000000..f4a34531 --- /dev/null +++ b/node_modules/lodash/fp/zipObj.js @@ -0,0 +1 @@ +module.exports = require('./zipObject'); diff --git a/node_modules/lodash/fp/zipObject.js b/node_modules/lodash/fp/zipObject.js new file mode 100644 index 00000000..462dbb68 --- /dev/null +++ b/node_modules/lodash/fp/zipObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('zipObject', require('../zipObject')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/zipObjectDeep.js b/node_modules/lodash/fp/zipObjectDeep.js new file mode 100644 index 00000000..53a5d338 --- /dev/null +++ b/node_modules/lodash/fp/zipObjectDeep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('zipObjectDeep', require('../zipObjectDeep')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fp/zipWith.js b/node_modules/lodash/fp/zipWith.js new file mode 100644 index 00000000..c5cf9e21 --- /dev/null +++ b/node_modules/lodash/fp/zipWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('zipWith', require('../zipWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/node_modules/lodash/fromPairs.js b/node_modules/lodash/fromPairs.js new file mode 100644 index 00000000..ee7940d2 --- /dev/null +++ b/node_modules/lodash/fromPairs.js @@ -0,0 +1,28 @@ +/** + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } + */ +function fromPairs(pairs) { + var index = -1, + length = pairs == null ? 0 : pairs.length, + result = {}; + + while (++index < length) { + var pair = pairs[index]; + result[pair[0]] = pair[1]; + } + return result; +} + +module.exports = fromPairs; diff --git a/node_modules/lodash/function.js b/node_modules/lodash/function.js new file mode 100644 index 00000000..b0fc6d93 --- /dev/null +++ b/node_modules/lodash/function.js @@ -0,0 +1,25 @@ +module.exports = { + 'after': require('./after'), + 'ary': require('./ary'), + 'before': require('./before'), + 'bind': require('./bind'), + 'bindKey': require('./bindKey'), + 'curry': require('./curry'), + 'curryRight': require('./curryRight'), + 'debounce': require('./debounce'), + 'defer': require('./defer'), + 'delay': require('./delay'), + 'flip': require('./flip'), + 'memoize': require('./memoize'), + 'negate': require('./negate'), + 'once': require('./once'), + 'overArgs': require('./overArgs'), + 'partial': require('./partial'), + 'partialRight': require('./partialRight'), + 'rearg': require('./rearg'), + 'rest': require('./rest'), + 'spread': require('./spread'), + 'throttle': require('./throttle'), + 'unary': require('./unary'), + 'wrap': require('./wrap') +}; diff --git a/node_modules/lodash/functions.js b/node_modules/lodash/functions.js new file mode 100644 index 00000000..9722928f --- /dev/null +++ b/node_modules/lodash/functions.js @@ -0,0 +1,31 @@ +var baseFunctions = require('./_baseFunctions'), + keys = require('./keys'); + +/** + * Creates an array of function property names from own enumerable properties + * of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functionsIn + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functions(new Foo); + * // => ['a', 'b'] + */ +function functions(object) { + return object == null ? [] : baseFunctions(object, keys(object)); +} + +module.exports = functions; diff --git a/node_modules/lodash/functionsIn.js b/node_modules/lodash/functionsIn.js new file mode 100644 index 00000000..f00345d0 --- /dev/null +++ b/node_modules/lodash/functionsIn.js @@ -0,0 +1,31 @@ +var baseFunctions = require('./_baseFunctions'), + keysIn = require('./keysIn'); + +/** + * Creates an array of function property names from own and inherited + * enumerable properties of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functions + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functionsIn(new Foo); + * // => ['a', 'b', 'c'] + */ +function functionsIn(object) { + return object == null ? [] : baseFunctions(object, keysIn(object)); +} + +module.exports = functionsIn; diff --git a/node_modules/lodash/get.js b/node_modules/lodash/get.js new file mode 100644 index 00000000..8805ff92 --- /dev/null +++ b/node_modules/lodash/get.js @@ -0,0 +1,33 @@ +var baseGet = require('./_baseGet'); + +/** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ +function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; +} + +module.exports = get; diff --git a/node_modules/lodash/groupBy.js b/node_modules/lodash/groupBy.js new file mode 100644 index 00000000..babf4f6b --- /dev/null +++ b/node_modules/lodash/groupBy.js @@ -0,0 +1,41 @@ +var baseAssignValue = require('./_baseAssignValue'), + createAggregator = require('./_createAggregator'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The order of grouped values + * is determined by the order they occur in `collection`. The corresponding + * value of each key is an array of elements responsible for generating the + * key. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': [4.2], '6': [6.1, 6.3] } + * + * // The `_.property` iteratee shorthand. + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ +var groupBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + baseAssignValue(result, key, [value]); + } +}); + +module.exports = groupBy; diff --git a/node_modules/lodash/gt.js b/node_modules/lodash/gt.js new file mode 100644 index 00000000..3a662828 --- /dev/null +++ b/node_modules/lodash/gt.js @@ -0,0 +1,29 @@ +var baseGt = require('./_baseGt'), + createRelationalOperation = require('./_createRelationalOperation'); + +/** + * Checks if `value` is greater than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + * @see _.lt + * @example + * + * _.gt(3, 1); + * // => true + * + * _.gt(3, 3); + * // => false + * + * _.gt(1, 3); + * // => false + */ +var gt = createRelationalOperation(baseGt); + +module.exports = gt; diff --git a/node_modules/lodash/gte.js b/node_modules/lodash/gte.js new file mode 100644 index 00000000..4180a687 --- /dev/null +++ b/node_modules/lodash/gte.js @@ -0,0 +1,30 @@ +var createRelationalOperation = require('./_createRelationalOperation'); + +/** + * Checks if `value` is greater than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than or equal to + * `other`, else `false`. + * @see _.lte + * @example + * + * _.gte(3, 1); + * // => true + * + * _.gte(3, 3); + * // => true + * + * _.gte(1, 3); + * // => false + */ +var gte = createRelationalOperation(function(value, other) { + return value >= other; +}); + +module.exports = gte; diff --git a/node_modules/lodash/has.js b/node_modules/lodash/has.js new file mode 100644 index 00000000..34df55e8 --- /dev/null +++ b/node_modules/lodash/has.js @@ -0,0 +1,35 @@ +var baseHas = require('./_baseHas'), + hasPath = require('./_hasPath'); + +/** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ +function has(object, path) { + return object != null && hasPath(object, path, baseHas); +} + +module.exports = has; diff --git a/node_modules/lodash/hasIn.js b/node_modules/lodash/hasIn.js new file mode 100644 index 00000000..06a36865 --- /dev/null +++ b/node_modules/lodash/hasIn.js @@ -0,0 +1,34 @@ +var baseHasIn = require('./_baseHasIn'), + hasPath = require('./_hasPath'); + +/** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ +function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); +} + +module.exports = hasIn; diff --git a/node_modules/lodash/head.js b/node_modules/lodash/head.js new file mode 100644 index 00000000..dee9d1f1 --- /dev/null +++ b/node_modules/lodash/head.js @@ -0,0 +1,23 @@ +/** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined + */ +function head(array) { + return (array && array.length) ? array[0] : undefined; +} + +module.exports = head; diff --git a/node_modules/lodash/identity.js b/node_modules/lodash/identity.js new file mode 100644 index 00000000..2d5d963c --- /dev/null +++ b/node_modules/lodash/identity.js @@ -0,0 +1,21 @@ +/** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ +function identity(value) { + return value; +} + +module.exports = identity; diff --git a/node_modules/lodash/inRange.js b/node_modules/lodash/inRange.js new file mode 100644 index 00000000..f20728d9 --- /dev/null +++ b/node_modules/lodash/inRange.js @@ -0,0 +1,55 @@ +var baseInRange = require('./_baseInRange'), + toFinite = require('./toFinite'), + toNumber = require('./toNumber'); + +/** + * Checks if `n` is between `start` and up to, but not including, `end`. If + * `end` is not specified, it's set to `start` with `start` then set to `0`. + * If `start` is greater than `end` the params are swapped to support + * negative ranges. + * + * @static + * @memberOf _ + * @since 3.3.0 + * @category Number + * @param {number} number The number to check. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + * @see _.range, _.rangeRight + * @example + * + * _.inRange(3, 2, 4); + * // => true + * + * _.inRange(4, 8); + * // => true + * + * _.inRange(4, 2); + * // => false + * + * _.inRange(2, 2); + * // => false + * + * _.inRange(1.2, 2); + * // => true + * + * _.inRange(5.2, 4); + * // => false + * + * _.inRange(-3, -2, -6); + * // => true + */ +function inRange(number, start, end) { + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + number = toNumber(number); + return baseInRange(number, start, end); +} + +module.exports = inRange; diff --git a/node_modules/lodash/includes.js b/node_modules/lodash/includes.js new file mode 100644 index 00000000..ae0deedc --- /dev/null +++ b/node_modules/lodash/includes.js @@ -0,0 +1,53 @@ +var baseIndexOf = require('./_baseIndexOf'), + isArrayLike = require('./isArrayLike'), + isString = require('./isString'), + toInteger = require('./toInteger'), + values = require('./values'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Checks if `value` is in `collection`. If `collection` is a string, it's + * checked for a substring of `value`, otherwise + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * is used for equality comparisons. If `fromIndex` is negative, it's used as + * the offset from the end of `collection`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {boolean} Returns `true` if `value` is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'a': 1, 'b': 2 }, 1); + * // => true + * + * _.includes('abcd', 'bc'); + * // => true + */ +function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; + + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + return isString(collection) + ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) + : (!!length && baseIndexOf(collection, value, fromIndex) > -1); +} + +module.exports = includes; diff --git a/node_modules/lodash/index.js b/node_modules/lodash/index.js new file mode 100644 index 00000000..5d063e21 --- /dev/null +++ b/node_modules/lodash/index.js @@ -0,0 +1 @@ +module.exports = require('./lodash'); \ No newline at end of file diff --git a/node_modules/lodash/indexOf.js b/node_modules/lodash/indexOf.js new file mode 100644 index 00000000..3c644af2 --- /dev/null +++ b/node_modules/lodash/indexOf.js @@ -0,0 +1,42 @@ +var baseIndexOf = require('./_baseIndexOf'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ +function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseIndexOf(array, value, index); +} + +module.exports = indexOf; diff --git a/node_modules/lodash/initial.js b/node_modules/lodash/initial.js new file mode 100644 index 00000000..f47fc509 --- /dev/null +++ b/node_modules/lodash/initial.js @@ -0,0 +1,22 @@ +var baseSlice = require('./_baseSlice'); + +/** + * Gets all but the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + */ +function initial(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 0, -1) : []; +} + +module.exports = initial; diff --git a/node_modules/lodash/intersection.js b/node_modules/lodash/intersection.js new file mode 100644 index 00000000..a94c1351 --- /dev/null +++ b/node_modules/lodash/intersection.js @@ -0,0 +1,30 @@ +var arrayMap = require('./_arrayMap'), + baseIntersection = require('./_baseIntersection'), + baseRest = require('./_baseRest'), + castArrayLikeObject = require('./_castArrayLikeObject'); + +/** + * Creates an array of unique values that are included in all given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersection([2, 1], [2, 3]); + * // => [2] + */ +var intersection = baseRest(function(arrays) { + var mapped = arrayMap(arrays, castArrayLikeObject); + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped) + : []; +}); + +module.exports = intersection; diff --git a/node_modules/lodash/intersectionBy.js b/node_modules/lodash/intersectionBy.js new file mode 100644 index 00000000..31461aae --- /dev/null +++ b/node_modules/lodash/intersectionBy.js @@ -0,0 +1,45 @@ +var arrayMap = require('./_arrayMap'), + baseIntersection = require('./_baseIntersection'), + baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), + castArrayLikeObject = require('./_castArrayLikeObject'), + last = require('./last'); + +/** + * This method is like `_.intersection` except that it accepts `iteratee` + * which is invoked for each element of each `arrays` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [2.1] + * + * // The `_.property` iteratee shorthand. + * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }] + */ +var intersectionBy = baseRest(function(arrays) { + var iteratee = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + if (iteratee === last(mapped)) { + iteratee = undefined; + } else { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, baseIteratee(iteratee, 2)) + : []; +}); + +module.exports = intersectionBy; diff --git a/node_modules/lodash/intersectionWith.js b/node_modules/lodash/intersectionWith.js new file mode 100644 index 00000000..63cabfaa --- /dev/null +++ b/node_modules/lodash/intersectionWith.js @@ -0,0 +1,41 @@ +var arrayMap = require('./_arrayMap'), + baseIntersection = require('./_baseIntersection'), + baseRest = require('./_baseRest'), + castArrayLikeObject = require('./_castArrayLikeObject'), + last = require('./last'); + +/** + * This method is like `_.intersection` except that it accepts `comparator` + * which is invoked to compare elements of `arrays`. The order and references + * of result values are determined by the first array. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.intersectionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }] + */ +var intersectionWith = baseRest(function(arrays) { + var comparator = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + comparator = typeof comparator == 'function' ? comparator : undefined; + if (comparator) { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, undefined, comparator) + : []; +}); + +module.exports = intersectionWith; diff --git a/node_modules/lodash/invert.js b/node_modules/lodash/invert.js new file mode 100644 index 00000000..8c479509 --- /dev/null +++ b/node_modules/lodash/invert.js @@ -0,0 +1,42 @@ +var constant = require('./constant'), + createInverter = require('./_createInverter'), + identity = require('./identity'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** + * Creates an object composed of the inverted keys and values of `object`. + * If `object` contains duplicate values, subsequent values overwrite + * property assignments of previous values. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Object + * @param {Object} object The object to invert. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invert(object); + * // => { '1': 'c', '2': 'b' } + */ +var invert = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + result[value] = key; +}, constant(identity)); + +module.exports = invert; diff --git a/node_modules/lodash/invertBy.js b/node_modules/lodash/invertBy.js new file mode 100644 index 00000000..3f4f7e53 --- /dev/null +++ b/node_modules/lodash/invertBy.js @@ -0,0 +1,56 @@ +var baseIteratee = require('./_baseIteratee'), + createInverter = require('./_createInverter'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** + * This method is like `_.invert` except that the inverted object is generated + * from the results of running each element of `object` thru `iteratee`. The + * corresponding inverted value of each inverted key is an array of keys + * responsible for generating the inverted value. The iteratee is invoked + * with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Object + * @param {Object} object The object to invert. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invertBy(object); + * // => { '1': ['a', 'c'], '2': ['b'] } + * + * _.invertBy(object, function(value) { + * return 'group' + value; + * }); + * // => { 'group1': ['a', 'c'], 'group2': ['b'] } + */ +var invertBy = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } +}, baseIteratee); + +module.exports = invertBy; diff --git a/node_modules/lodash/invoke.js b/node_modules/lodash/invoke.js new file mode 100644 index 00000000..97d51eb5 --- /dev/null +++ b/node_modules/lodash/invoke.js @@ -0,0 +1,24 @@ +var baseInvoke = require('./_baseInvoke'), + baseRest = require('./_baseRest'); + +/** + * Invokes the method at `path` of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + * @example + * + * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; + * + * _.invoke(object, 'a[0].b.c.slice', 1, 3); + * // => [2, 3] + */ +var invoke = baseRest(baseInvoke); + +module.exports = invoke; diff --git a/node_modules/lodash/invokeMap.js b/node_modules/lodash/invokeMap.js new file mode 100644 index 00000000..8da5126c --- /dev/null +++ b/node_modules/lodash/invokeMap.js @@ -0,0 +1,41 @@ +var apply = require('./_apply'), + baseEach = require('./_baseEach'), + baseInvoke = require('./_baseInvoke'), + baseRest = require('./_baseRest'), + isArrayLike = require('./isArrayLike'); + +/** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke each method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invokeMap([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ +var invokeMap = baseRest(function(collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value) { + result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); + }); + return result; +}); + +module.exports = invokeMap; diff --git a/node_modules/lodash/isArguments.js b/node_modules/lodash/isArguments.js new file mode 100644 index 00000000..8b9ed66c --- /dev/null +++ b/node_modules/lodash/isArguments.js @@ -0,0 +1,36 @@ +var baseIsArguments = require('./_baseIsArguments'), + isObjectLike = require('./isObjectLike'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); +}; + +module.exports = isArguments; diff --git a/node_modules/lodash/isArray.js b/node_modules/lodash/isArray.js new file mode 100644 index 00000000..88ab55fd --- /dev/null +++ b/node_modules/lodash/isArray.js @@ -0,0 +1,26 @@ +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +module.exports = isArray; diff --git a/node_modules/lodash/isArrayBuffer.js b/node_modules/lodash/isArrayBuffer.js new file mode 100644 index 00000000..12904a64 --- /dev/null +++ b/node_modules/lodash/isArrayBuffer.js @@ -0,0 +1,27 @@ +var baseIsArrayBuffer = require('./_baseIsArrayBuffer'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer; + +/** + * Checks if `value` is classified as an `ArrayBuffer` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + * @example + * + * _.isArrayBuffer(new ArrayBuffer(2)); + * // => true + * + * _.isArrayBuffer(new Array(2)); + * // => false + */ +var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; + +module.exports = isArrayBuffer; diff --git a/node_modules/lodash/isArrayLike.js b/node_modules/lodash/isArrayLike.js new file mode 100644 index 00000000..0f966805 --- /dev/null +++ b/node_modules/lodash/isArrayLike.js @@ -0,0 +1,33 @@ +var isFunction = require('./isFunction'), + isLength = require('./isLength'); + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} + +module.exports = isArrayLike; diff --git a/node_modules/lodash/isArrayLikeObject.js b/node_modules/lodash/isArrayLikeObject.js new file mode 100644 index 00000000..6c4812a8 --- /dev/null +++ b/node_modules/lodash/isArrayLikeObject.js @@ -0,0 +1,33 @@ +var isArrayLike = require('./isArrayLike'), + isObjectLike = require('./isObjectLike'); + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); +} + +module.exports = isArrayLikeObject; diff --git a/node_modules/lodash/isBoolean.js b/node_modules/lodash/isBoolean.js new file mode 100644 index 00000000..a43ed4b8 --- /dev/null +++ b/node_modules/lodash/isBoolean.js @@ -0,0 +1,29 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]'; + +/** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ +function isBoolean(value) { + return value === true || value === false || + (isObjectLike(value) && baseGetTag(value) == boolTag); +} + +module.exports = isBoolean; diff --git a/node_modules/lodash/isBuffer.js b/node_modules/lodash/isBuffer.js new file mode 100644 index 00000000..c103cc74 --- /dev/null +++ b/node_modules/lodash/isBuffer.js @@ -0,0 +1,38 @@ +var root = require('./_root'), + stubFalse = require('./stubFalse'); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; + +/** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ +var isBuffer = nativeIsBuffer || stubFalse; + +module.exports = isBuffer; diff --git a/node_modules/lodash/isDate.js b/node_modules/lodash/isDate.js new file mode 100644 index 00000000..7f0209fc --- /dev/null +++ b/node_modules/lodash/isDate.js @@ -0,0 +1,27 @@ +var baseIsDate = require('./_baseIsDate'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsDate = nodeUtil && nodeUtil.isDate; + +/** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ +var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; + +module.exports = isDate; diff --git a/node_modules/lodash/isElement.js b/node_modules/lodash/isElement.js new file mode 100644 index 00000000..76ae29c3 --- /dev/null +++ b/node_modules/lodash/isElement.js @@ -0,0 +1,25 @@ +var isObjectLike = require('./isObjectLike'), + isPlainObject = require('./isPlainObject'); + +/** + * Checks if `value` is likely a DOM element. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + * + * _.isElement(''); + * // => false + */ +function isElement(value) { + return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); +} + +module.exports = isElement; diff --git a/node_modules/lodash/isEmpty.js b/node_modules/lodash/isEmpty.js new file mode 100644 index 00000000..3597294a --- /dev/null +++ b/node_modules/lodash/isEmpty.js @@ -0,0 +1,77 @@ +var baseKeys = require('./_baseKeys'), + getTag = require('./_getTag'), + isArguments = require('./isArguments'), + isArray = require('./isArray'), + isArrayLike = require('./isArrayLike'), + isBuffer = require('./isBuffer'), + isPrototype = require('./_isPrototype'), + isTypedArray = require('./isTypedArray'); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + setTag = '[object Set]'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ +function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && + (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || + isBuffer(value) || isTypedArray(value) || isArguments(value))) { + return !value.length; + } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; +} + +module.exports = isEmpty; diff --git a/node_modules/lodash/isEqual.js b/node_modules/lodash/isEqual.js new file mode 100644 index 00000000..5e23e76c --- /dev/null +++ b/node_modules/lodash/isEqual.js @@ -0,0 +1,35 @@ +var baseIsEqual = require('./_baseIsEqual'); + +/** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ +function isEqual(value, other) { + return baseIsEqual(value, other); +} + +module.exports = isEqual; diff --git a/node_modules/lodash/isEqualWith.js b/node_modules/lodash/isEqualWith.js new file mode 100644 index 00000000..21bdc7ff --- /dev/null +++ b/node_modules/lodash/isEqualWith.js @@ -0,0 +1,41 @@ +var baseIsEqual = require('./_baseIsEqual'); + +/** + * This method is like `_.isEqual` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with up to + * six arguments: (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ +function isEqualWith(value, other, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; +} + +module.exports = isEqualWith; diff --git a/node_modules/lodash/isError.js b/node_modules/lodash/isError.js new file mode 100644 index 00000000..b4f41e00 --- /dev/null +++ b/node_modules/lodash/isError.js @@ -0,0 +1,36 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'), + isPlainObject = require('./isPlainObject'); + +/** `Object#toString` result references. */ +var domExcTag = '[object DOMException]', + errorTag = '[object Error]'; + +/** + * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, + * `SyntaxError`, `TypeError`, or `URIError` object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. + * @example + * + * _.isError(new Error); + * // => true + * + * _.isError(Error); + * // => false + */ +function isError(value) { + if (!isObjectLike(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == errorTag || tag == domExcTag || + (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); +} + +module.exports = isError; diff --git a/node_modules/lodash/isFinite.js b/node_modules/lodash/isFinite.js new file mode 100644 index 00000000..601842bc --- /dev/null +++ b/node_modules/lodash/isFinite.js @@ -0,0 +1,36 @@ +var root = require('./_root'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsFinite = root.isFinite; + +/** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on + * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(3); + * // => true + * + * _.isFinite(Number.MIN_VALUE); + * // => true + * + * _.isFinite(Infinity); + * // => false + * + * _.isFinite('3'); + * // => false + */ +function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); +} + +module.exports = isFinite; diff --git a/node_modules/lodash/isFunction.js b/node_modules/lodash/isFunction.js new file mode 100644 index 00000000..907a8cd8 --- /dev/null +++ b/node_modules/lodash/isFunction.js @@ -0,0 +1,37 @@ +var baseGetTag = require('./_baseGetTag'), + isObject = require('./isObject'); + +/** `Object#toString` result references. */ +var asyncTag = '[object AsyncFunction]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + proxyTag = '[object Proxy]'; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; +} + +module.exports = isFunction; diff --git a/node_modules/lodash/isInteger.js b/node_modules/lodash/isInteger.js new file mode 100644 index 00000000..66aa87d5 --- /dev/null +++ b/node_modules/lodash/isInteger.js @@ -0,0 +1,33 @@ +var toInteger = require('./toInteger'); + +/** + * Checks if `value` is an integer. + * + * **Note:** This method is based on + * [`Number.isInteger`](https://mdn.io/Number/isInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an integer, else `false`. + * @example + * + * _.isInteger(3); + * // => true + * + * _.isInteger(Number.MIN_VALUE); + * // => false + * + * _.isInteger(Infinity); + * // => false + * + * _.isInteger('3'); + * // => false + */ +function isInteger(value) { + return typeof value == 'number' && value == toInteger(value); +} + +module.exports = isInteger; diff --git a/node_modules/lodash/isLength.js b/node_modules/lodash/isLength.js new file mode 100644 index 00000000..3a95caa9 --- /dev/null +++ b/node_modules/lodash/isLength.js @@ -0,0 +1,35 @@ +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +module.exports = isLength; diff --git a/node_modules/lodash/isMap.js b/node_modules/lodash/isMap.js new file mode 100644 index 00000000..44f8517e --- /dev/null +++ b/node_modules/lodash/isMap.js @@ -0,0 +1,27 @@ +var baseIsMap = require('./_baseIsMap'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsMap = nodeUtil && nodeUtil.isMap; + +/** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ +var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; + +module.exports = isMap; diff --git a/node_modules/lodash/isMatch.js b/node_modules/lodash/isMatch.js new file mode 100644 index 00000000..9773a18c --- /dev/null +++ b/node_modules/lodash/isMatch.js @@ -0,0 +1,36 @@ +var baseIsMatch = require('./_baseIsMatch'), + getMatchData = require('./_getMatchData'); + +/** + * Performs a partial deep comparison between `object` and `source` to + * determine if `object` contains equivalent property values. + * + * **Note:** This method is equivalent to `_.matches` when `source` is + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.isMatch(object, { 'b': 2 }); + * // => true + * + * _.isMatch(object, { 'b': 1 }); + * // => false + */ +function isMatch(object, source) { + return object === source || baseIsMatch(object, source, getMatchData(source)); +} + +module.exports = isMatch; diff --git a/node_modules/lodash/isMatchWith.js b/node_modules/lodash/isMatchWith.js new file mode 100644 index 00000000..187b6a61 --- /dev/null +++ b/node_modules/lodash/isMatchWith.js @@ -0,0 +1,41 @@ +var baseIsMatch = require('./_baseIsMatch'), + getMatchData = require('./_getMatchData'); + +/** + * This method is like `_.isMatch` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with five + * arguments: (objValue, srcValue, index|key, object, source). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, srcValue) { + * if (isGreeting(objValue) && isGreeting(srcValue)) { + * return true; + * } + * } + * + * var object = { 'greeting': 'hello' }; + * var source = { 'greeting': 'hi' }; + * + * _.isMatchWith(object, source, customizer); + * // => true + */ +function isMatchWith(object, source, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseIsMatch(object, source, getMatchData(source), customizer); +} + +module.exports = isMatchWith; diff --git a/node_modules/lodash/isNaN.js b/node_modules/lodash/isNaN.js new file mode 100644 index 00000000..7d0d783b --- /dev/null +++ b/node_modules/lodash/isNaN.js @@ -0,0 +1,38 @@ +var isNumber = require('./isNumber'); + +/** + * Checks if `value` is `NaN`. + * + * **Note:** This method is based on + * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as + * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for + * `undefined` and other non-number values. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ +function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some + // ActiveX objects in IE. + return isNumber(value) && value != +value; +} + +module.exports = isNaN; diff --git a/node_modules/lodash/isNative.js b/node_modules/lodash/isNative.js new file mode 100644 index 00000000..f0cb8d58 --- /dev/null +++ b/node_modules/lodash/isNative.js @@ -0,0 +1,40 @@ +var baseIsNative = require('./_baseIsNative'), + isMaskable = require('./_isMaskable'); + +/** Error message constants. */ +var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.'; + +/** + * Checks if `value` is a pristine native function. + * + * **Note:** This method can't reliably detect native functions in the presence + * of the core-js package because core-js circumvents this kind of detection. + * Despite multiple requests, the core-js maintainer has made it clear: any + * attempt to fix the detection will be obstructed. As a result, we're left + * with little choice but to throw an error. Unfortunately, this also affects + * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on core-js. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ +function isNative(value) { + if (isMaskable(value)) { + throw new Error(CORE_ERROR_TEXT); + } + return baseIsNative(value); +} + +module.exports = isNative; diff --git a/node_modules/lodash/isNil.js b/node_modules/lodash/isNil.js new file mode 100644 index 00000000..79f05052 --- /dev/null +++ b/node_modules/lodash/isNil.js @@ -0,0 +1,25 @@ +/** + * Checks if `value` is `null` or `undefined`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is nullish, else `false`. + * @example + * + * _.isNil(null); + * // => true + * + * _.isNil(void 0); + * // => true + * + * _.isNil(NaN); + * // => false + */ +function isNil(value) { + return value == null; +} + +module.exports = isNil; diff --git a/node_modules/lodash/isNull.js b/node_modules/lodash/isNull.js new file mode 100644 index 00000000..c0a374d7 --- /dev/null +++ b/node_modules/lodash/isNull.js @@ -0,0 +1,22 @@ +/** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ +function isNull(value) { + return value === null; +} + +module.exports = isNull; diff --git a/node_modules/lodash/isNumber.js b/node_modules/lodash/isNumber.js new file mode 100644 index 00000000..cd34ee46 --- /dev/null +++ b/node_modules/lodash/isNumber.js @@ -0,0 +1,38 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var numberTag = '[object Number]'; + +/** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @example + * + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false + */ +function isNumber(value) { + return typeof value == 'number' || + (isObjectLike(value) && baseGetTag(value) == numberTag); +} + +module.exports = isNumber; diff --git a/node_modules/lodash/isObject.js b/node_modules/lodash/isObject.js new file mode 100644 index 00000000..1dc89391 --- /dev/null +++ b/node_modules/lodash/isObject.js @@ -0,0 +1,31 @@ +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); +} + +module.exports = isObject; diff --git a/node_modules/lodash/isObjectLike.js b/node_modules/lodash/isObjectLike.js new file mode 100644 index 00000000..301716b5 --- /dev/null +++ b/node_modules/lodash/isObjectLike.js @@ -0,0 +1,29 @@ +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return value != null && typeof value == 'object'; +} + +module.exports = isObjectLike; diff --git a/node_modules/lodash/isPlainObject.js b/node_modules/lodash/isPlainObject.js new file mode 100644 index 00000000..23873731 --- /dev/null +++ b/node_modules/lodash/isPlainObject.js @@ -0,0 +1,62 @@ +var baseGetTag = require('./_baseGetTag'), + getPrototype = require('./_getPrototype'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to infer the `Object` constructor. */ +var objectCtorString = funcToString.call(Object); + +/** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ +function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; +} + +module.exports = isPlainObject; diff --git a/node_modules/lodash/isRegExp.js b/node_modules/lodash/isRegExp.js new file mode 100644 index 00000000..76c9b6e9 --- /dev/null +++ b/node_modules/lodash/isRegExp.js @@ -0,0 +1,27 @@ +var baseIsRegExp = require('./_baseIsRegExp'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsRegExp = nodeUtil && nodeUtil.isRegExp; + +/** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ +var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; + +module.exports = isRegExp; diff --git a/node_modules/lodash/isSafeInteger.js b/node_modules/lodash/isSafeInteger.js new file mode 100644 index 00000000..2a48526e --- /dev/null +++ b/node_modules/lodash/isSafeInteger.js @@ -0,0 +1,37 @@ +var isInteger = require('./isInteger'); + +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 + * double precision number which isn't the result of a rounded unsafe integer. + * + * **Note:** This method is based on + * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. + * @example + * + * _.isSafeInteger(3); + * // => true + * + * _.isSafeInteger(Number.MIN_VALUE); + * // => false + * + * _.isSafeInteger(Infinity); + * // => false + * + * _.isSafeInteger('3'); + * // => false + */ +function isSafeInteger(value) { + return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; +} + +module.exports = isSafeInteger; diff --git a/node_modules/lodash/isSet.js b/node_modules/lodash/isSet.js new file mode 100644 index 00000000..ab88bdf8 --- /dev/null +++ b/node_modules/lodash/isSet.js @@ -0,0 +1,27 @@ +var baseIsSet = require('./_baseIsSet'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsSet = nodeUtil && nodeUtil.isSet; + +/** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ +var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; + +module.exports = isSet; diff --git a/node_modules/lodash/isString.js b/node_modules/lodash/isString.js new file mode 100644 index 00000000..627eb9c3 --- /dev/null +++ b/node_modules/lodash/isString.js @@ -0,0 +1,30 @@ +var baseGetTag = require('./_baseGetTag'), + isArray = require('./isArray'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var stringTag = '[object String]'; + +/** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ +function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); +} + +module.exports = isString; diff --git a/node_modules/lodash/isSymbol.js b/node_modules/lodash/isSymbol.js new file mode 100644 index 00000000..dfb60b97 --- /dev/null +++ b/node_modules/lodash/isSymbol.js @@ -0,0 +1,29 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && baseGetTag(value) == symbolTag); +} + +module.exports = isSymbol; diff --git a/node_modules/lodash/isTypedArray.js b/node_modules/lodash/isTypedArray.js new file mode 100644 index 00000000..da3f8dd1 --- /dev/null +++ b/node_modules/lodash/isTypedArray.js @@ -0,0 +1,27 @@ +var baseIsTypedArray = require('./_baseIsTypedArray'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + +module.exports = isTypedArray; diff --git a/node_modules/lodash/isUndefined.js b/node_modules/lodash/isUndefined.js new file mode 100644 index 00000000..377d121a --- /dev/null +++ b/node_modules/lodash/isUndefined.js @@ -0,0 +1,22 @@ +/** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ +function isUndefined(value) { + return value === undefined; +} + +module.exports = isUndefined; diff --git a/node_modules/lodash/isWeakMap.js b/node_modules/lodash/isWeakMap.js new file mode 100644 index 00000000..8d36f663 --- /dev/null +++ b/node_modules/lodash/isWeakMap.js @@ -0,0 +1,28 @@ +var getTag = require('./_getTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var weakMapTag = '[object WeakMap]'; + +/** + * Checks if `value` is classified as a `WeakMap` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. + * @example + * + * _.isWeakMap(new WeakMap); + * // => true + * + * _.isWeakMap(new Map); + * // => false + */ +function isWeakMap(value) { + return isObjectLike(value) && getTag(value) == weakMapTag; +} + +module.exports = isWeakMap; diff --git a/node_modules/lodash/isWeakSet.js b/node_modules/lodash/isWeakSet.js new file mode 100644 index 00000000..e628b261 --- /dev/null +++ b/node_modules/lodash/isWeakSet.js @@ -0,0 +1,28 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var weakSetTag = '[object WeakSet]'; + +/** + * Checks if `value` is classified as a `WeakSet` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. + * @example + * + * _.isWeakSet(new WeakSet); + * // => true + * + * _.isWeakSet(new Set); + * // => false + */ +function isWeakSet(value) { + return isObjectLike(value) && baseGetTag(value) == weakSetTag; +} + +module.exports = isWeakSet; diff --git a/node_modules/lodash/iteratee.js b/node_modules/lodash/iteratee.js new file mode 100644 index 00000000..61b73a8c --- /dev/null +++ b/node_modules/lodash/iteratee.js @@ -0,0 +1,53 @@ +var baseClone = require('./_baseClone'), + baseIteratee = require('./_baseIteratee'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1; + +/** + * Creates a function that invokes `func` with the arguments of the created + * function. If `func` is a property name, the created function returns the + * property value for a given element. If `func` is an array or object, the + * created function returns `true` for elements that contain the equivalent + * source properties, otherwise it returns `false`. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Util + * @param {*} [func=_.identity] The value to convert to a callback. + * @returns {Function} Returns the callback. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true })); + * // => [{ 'user': 'barney', 'age': 36, 'active': true }] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, _.iteratee(['user', 'fred'])); + * // => [{ 'user': 'fred', 'age': 40 }] + * + * // The `_.property` iteratee shorthand. + * _.map(users, _.iteratee('user')); + * // => ['barney', 'fred'] + * + * // Create custom iteratee shorthands. + * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) { + * return !_.isRegExp(func) ? iteratee(func) : function(string) { + * return func.test(string); + * }; + * }); + * + * _.filter(['abc', 'def'], /ef/); + * // => ['def'] + */ +function iteratee(func) { + return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG)); +} + +module.exports = iteratee; diff --git a/node_modules/lodash/join.js b/node_modules/lodash/join.js new file mode 100644 index 00000000..45de079f --- /dev/null +++ b/node_modules/lodash/join.js @@ -0,0 +1,26 @@ +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeJoin = arrayProto.join; + +/** + * Converts all elements in `array` into a string separated by `separator`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to convert. + * @param {string} [separator=','] The element separator. + * @returns {string} Returns the joined string. + * @example + * + * _.join(['a', 'b', 'c'], '~'); + * // => 'a~b~c' + */ +function join(array, separator) { + return array == null ? '' : nativeJoin.call(array, separator); +} + +module.exports = join; diff --git a/node_modules/lodash/kebabCase.js b/node_modules/lodash/kebabCase.js new file mode 100644 index 00000000..8a52be64 --- /dev/null +++ b/node_modules/lodash/kebabCase.js @@ -0,0 +1,28 @@ +var createCompounder = require('./_createCompounder'); + +/** + * Converts `string` to + * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the kebab cased string. + * @example + * + * _.kebabCase('Foo Bar'); + * // => 'foo-bar' + * + * _.kebabCase('fooBar'); + * // => 'foo-bar' + * + * _.kebabCase('__FOO_BAR__'); + * // => 'foo-bar' + */ +var kebabCase = createCompounder(function(result, word, index) { + return result + (index ? '-' : '') + word.toLowerCase(); +}); + +module.exports = kebabCase; diff --git a/node_modules/lodash/keyBy.js b/node_modules/lodash/keyBy.js new file mode 100644 index 00000000..acc007a0 --- /dev/null +++ b/node_modules/lodash/keyBy.js @@ -0,0 +1,36 @@ +var baseAssignValue = require('./_baseAssignValue'), + createAggregator = require('./_createAggregator'); + +/** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the last element responsible for generating the key. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var array = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.keyBy(array, function(o) { + * return String.fromCharCode(o.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.keyBy(array, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + */ +var keyBy = createAggregator(function(result, value, key) { + baseAssignValue(result, key, value); +}); + +module.exports = keyBy; diff --git a/node_modules/lodash/keys.js b/node_modules/lodash/keys.js new file mode 100644 index 00000000..d143c718 --- /dev/null +++ b/node_modules/lodash/keys.js @@ -0,0 +1,37 @@ +var arrayLikeKeys = require('./_arrayLikeKeys'), + baseKeys = require('./_baseKeys'), + isArrayLike = require('./isArrayLike'); + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); +} + +module.exports = keys; diff --git a/node_modules/lodash/keysIn.js b/node_modules/lodash/keysIn.js new file mode 100644 index 00000000..a62308f2 --- /dev/null +++ b/node_modules/lodash/keysIn.js @@ -0,0 +1,32 @@ +var arrayLikeKeys = require('./_arrayLikeKeys'), + baseKeysIn = require('./_baseKeysIn'), + isArrayLike = require('./isArrayLike'); + +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ +function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); +} + +module.exports = keysIn; diff --git a/node_modules/lodash/lang.js b/node_modules/lodash/lang.js new file mode 100644 index 00000000..a3962169 --- /dev/null +++ b/node_modules/lodash/lang.js @@ -0,0 +1,58 @@ +module.exports = { + 'castArray': require('./castArray'), + 'clone': require('./clone'), + 'cloneDeep': require('./cloneDeep'), + 'cloneDeepWith': require('./cloneDeepWith'), + 'cloneWith': require('./cloneWith'), + 'conformsTo': require('./conformsTo'), + 'eq': require('./eq'), + 'gt': require('./gt'), + 'gte': require('./gte'), + 'isArguments': require('./isArguments'), + 'isArray': require('./isArray'), + 'isArrayBuffer': require('./isArrayBuffer'), + 'isArrayLike': require('./isArrayLike'), + 'isArrayLikeObject': require('./isArrayLikeObject'), + 'isBoolean': require('./isBoolean'), + 'isBuffer': require('./isBuffer'), + 'isDate': require('./isDate'), + 'isElement': require('./isElement'), + 'isEmpty': require('./isEmpty'), + 'isEqual': require('./isEqual'), + 'isEqualWith': require('./isEqualWith'), + 'isError': require('./isError'), + 'isFinite': require('./isFinite'), + 'isFunction': require('./isFunction'), + 'isInteger': require('./isInteger'), + 'isLength': require('./isLength'), + 'isMap': require('./isMap'), + 'isMatch': require('./isMatch'), + 'isMatchWith': require('./isMatchWith'), + 'isNaN': require('./isNaN'), + 'isNative': require('./isNative'), + 'isNil': require('./isNil'), + 'isNull': require('./isNull'), + 'isNumber': require('./isNumber'), + 'isObject': require('./isObject'), + 'isObjectLike': require('./isObjectLike'), + 'isPlainObject': require('./isPlainObject'), + 'isRegExp': require('./isRegExp'), + 'isSafeInteger': require('./isSafeInteger'), + 'isSet': require('./isSet'), + 'isString': require('./isString'), + 'isSymbol': require('./isSymbol'), + 'isTypedArray': require('./isTypedArray'), + 'isUndefined': require('./isUndefined'), + 'isWeakMap': require('./isWeakMap'), + 'isWeakSet': require('./isWeakSet'), + 'lt': require('./lt'), + 'lte': require('./lte'), + 'toArray': require('./toArray'), + 'toFinite': require('./toFinite'), + 'toInteger': require('./toInteger'), + 'toLength': require('./toLength'), + 'toNumber': require('./toNumber'), + 'toPlainObject': require('./toPlainObject'), + 'toSafeInteger': require('./toSafeInteger'), + 'toString': require('./toString') +}; diff --git a/node_modules/lodash/last.js b/node_modules/lodash/last.js new file mode 100644 index 00000000..cad1eafa --- /dev/null +++ b/node_modules/lodash/last.js @@ -0,0 +1,20 @@ +/** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ +function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; +} + +module.exports = last; diff --git a/node_modules/lodash/lastIndexOf.js b/node_modules/lodash/lastIndexOf.js new file mode 100644 index 00000000..dabfb613 --- /dev/null +++ b/node_modules/lodash/lastIndexOf.js @@ -0,0 +1,46 @@ +var baseFindIndex = require('./_baseFindIndex'), + baseIsNaN = require('./_baseIsNaN'), + strictLastIndexOf = require('./_strictLastIndexOf'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // Search from the `fromIndex`. + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 + */ +function lastIndexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return value === value + ? strictLastIndexOf(array, value, index) + : baseFindIndex(array, baseIsNaN, index, true); +} + +module.exports = lastIndexOf; diff --git a/node_modules/lodash/lodash.js b/node_modules/lodash/lodash.js new file mode 100644 index 00000000..9b95dfef --- /dev/null +++ b/node_modules/lodash/lodash.js @@ -0,0 +1,17112 @@ +/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ +;(function() { + + /** Used as a safe reference for `undefined` in pre-ES5 environments. */ + var undefined; + + /** Used as the semantic version number. */ + var VERSION = '4.17.15'; + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + + /** Error message constants. */ + var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.', + FUNC_ERROR_TEXT = 'Expected a function'; + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + + /** Used as the maximum memoize cache size. */ + var MAX_MEMOIZE_SIZE = 500; + + /** Used as the internal argument placeholder. */ + var PLACEHOLDER = '__lodash_placeholder__'; + + /** Used to compose bitmasks for cloning. */ + var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + + /** Used to compose bitmasks for value comparisons. */ + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + + /** Used to compose bitmasks for function metadata. */ + var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256, + WRAP_FLIP_FLAG = 512; + + /** Used as default options for `_.truncate`. */ + var DEFAULT_TRUNC_LENGTH = 30, + DEFAULT_TRUNC_OMISSION = '...'; + + /** Used to detect hot functions by number of calls within a span of milliseconds. */ + var HOT_COUNT = 800, + HOT_SPAN = 16; + + /** Used to indicate the type of lazy iteratees. */ + var LAZY_FILTER_FLAG = 1, + LAZY_MAP_FLAG = 2, + LAZY_WHILE_FLAG = 3; + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991, + MAX_INTEGER = 1.7976931348623157e+308, + NAN = 0 / 0; + + /** Used as references for the maximum length and index of an array. */ + var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + + /** Used to associate wrap methods with their bit flags. */ + var wrapFlags = [ + ['ary', WRAP_ARY_FLAG], + ['bind', WRAP_BIND_FLAG], + ['bindKey', WRAP_BIND_KEY_FLAG], + ['curry', WRAP_CURRY_FLAG], + ['curryRight', WRAP_CURRY_RIGHT_FLAG], + ['flip', WRAP_FLIP_FLAG], + ['partial', WRAP_PARTIAL_FLAG], + ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], + ['rearg', WRAP_REARG_FLAG] + ]; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + domExcTag = '[object DOMException]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + nullTag = '[object Null]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + undefinedTag = '[object Undefined]', + weakMapTag = '[object WeakMap]', + weakSetTag = '[object WeakSet]'; + + var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + + /** Used to match empty string literals in compiled template source. */ + var reEmptyStringLeading = /\b__p \+= '';/g, + reEmptyStringMiddle = /\b(__p \+=) '' \+/g, + reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; + + /** Used to match HTML entities and HTML characters. */ + var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, + reUnescapedHtml = /[&<>"']/g, + reHasEscapedHtml = RegExp(reEscapedHtml.source), + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + + /** Used to match template delimiters. */ + var reEscape = /<%-([\s\S]+?)%>/g, + reEvaluate = /<%([\s\S]+?)%>/g, + reInterpolate = /<%=([\s\S]+?)%>/g; + + /** Used to match property names within property paths. */ + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, + reHasRegExpChar = RegExp(reRegExpChar.source); + + /** Used to match leading and trailing whitespace. */ + var reTrim = /^\s+|\s+$/g, + reTrimStart = /^\s+/, + reTrimEnd = /\s+$/; + + /** Used to match wrap detail comments. */ + var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, + reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, + reSplitDetails = /,? & /; + + /** Used to match words composed of alphanumeric characters. */ + var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; + + /** Used to match backslashes in property paths. */ + var reEscapeChar = /\\(\\)?/g; + + /** + * Used to match + * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). + */ + var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + + /** Used to match `RegExp` flags from their coerced string values. */ + var reFlags = /\w*$/; + + /** Used to detect bad signed hexadecimal string values. */ + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + + /** Used to detect binary string values. */ + var reIsBinary = /^0b[01]+$/i; + + /** Used to detect host constructors (Safari). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** Used to detect octal string values. */ + var reIsOctal = /^0o[0-7]+$/i; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** Used to match Latin Unicode letters (excluding mathematical operators). */ + var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + + /** Used to ensure capturing order of template delimiters. */ + var reNoMatch = /($^)/; + + /** Used to match unescaped characters in compiled string literals. */ + var reUnescapedString = /['\n\r\u2028\u2029\\]/g; + + /** Used to compose unicode character classes. */ + var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsDingbatRange = '\\u2700-\\u27bf', + rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', + rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', + rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', + rsPunctuationRange = '\\u2000-\\u206f', + rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', + rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', + rsVarRange = '\\ufe0e\\ufe0f', + rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; + + /** Used to compose unicode capture groups. */ + var rsApos = "['\u2019]", + rsAstral = '[' + rsAstralRange + ']', + rsBreak = '[' + rsBreakRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsDigits = '\\d+', + rsDingbat = '[' + rsDingbatRange + ']', + rsLower = '[' + rsLowerRange + ']', + rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsUpper = '[' + rsUpperRange + ']', + rsZWJ = '\\u200d'; + + /** Used to compose unicode regexes. */ + var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', + rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', + reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', + rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + + /** Used to match apostrophes. */ + var reApos = RegExp(rsApos, 'g'); + + /** + * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and + * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). + */ + var reComboMark = RegExp(rsCombo, 'g'); + + /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ + var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + + /** Used to match complex or compound words. */ + var reUnicodeWord = RegExp([ + rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', + rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', + rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, + rsUpper + '+' + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, + rsDigits, + rsEmoji + ].join('|'), 'g'); + + /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ + var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + + /** Used to detect strings that need a more robust regexp to match words. */ + var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + + /** Used to assign default `context` object properties. */ + var contextProps = [ + 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array', + 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object', + 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array', + 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', + '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout' + ]; + + /** Used to make template sourceURLs easier to identify. */ + var templateCounter = -1; + + /** Used to identify `toStringTag` values of typed arrays. */ + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = + typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = + typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = + typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = + typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = + typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = + typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = + typedArrayTags[errorTag] = typedArrayTags[funcTag] = + typedArrayTags[mapTag] = typedArrayTags[numberTag] = + typedArrayTags[objectTag] = typedArrayTags[regexpTag] = + typedArrayTags[setTag] = typedArrayTags[stringTag] = + typedArrayTags[weakMapTag] = false; + + /** Used to identify `toStringTag` values supported by `_.clone`. */ + var cloneableTags = {}; + cloneableTags[argsTag] = cloneableTags[arrayTag] = + cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = + cloneableTags[boolTag] = cloneableTags[dateTag] = + cloneableTags[float32Tag] = cloneableTags[float64Tag] = + cloneableTags[int8Tag] = cloneableTags[int16Tag] = + cloneableTags[int32Tag] = cloneableTags[mapTag] = + cloneableTags[numberTag] = cloneableTags[objectTag] = + cloneableTags[regexpTag] = cloneableTags[setTag] = + cloneableTags[stringTag] = cloneableTags[symbolTag] = + cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = + cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; + cloneableTags[errorTag] = cloneableTags[funcTag] = + cloneableTags[weakMapTag] = false; + + /** Used to map Latin Unicode letters to basic Latin letters. */ + var deburredLetters = { + // Latin-1 Supplement block. + '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', + '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', + '\xc7': 'C', '\xe7': 'c', + '\xd0': 'D', '\xf0': 'd', + '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', + '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', + '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', + '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', + '\xd1': 'N', '\xf1': 'n', + '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', + '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', + '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', + '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', + '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', + '\xc6': 'Ae', '\xe6': 'ae', + '\xde': 'Th', '\xfe': 'th', + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', + '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', + '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', + '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', + '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', + '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', + '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', + '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', + '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', + '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', + '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', + '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', + '\u0134': 'J', '\u0135': 'j', + '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', + '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', + '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', + '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', + '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', + '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', + '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', + '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', + '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', + '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', + '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', + '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', + '\u0163': 't', '\u0165': 't', '\u0167': 't', + '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', + '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', + '\u0174': 'W', '\u0175': 'w', + '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', + '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', + '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', + '\u0132': 'IJ', '\u0133': 'ij', + '\u0152': 'Oe', '\u0153': 'oe', + '\u0149': "'n", '\u017f': 's' + }; + + /** Used to map characters to HTML entities. */ + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; + + /** Used to map HTML entities to characters. */ + var htmlUnescapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" + }; + + /** Used to escape characters for inclusion in compiled string literals. */ + var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029' + }; + + /** Built-in method references without a dependency on `root`. */ + var freeParseFloat = parseFloat, + freeParseInt = parseInt; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + + /** Detect free variable `exports`. */ + var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; + + /** Detect free variable `process` from Node.js. */ + var freeProcess = moduleExports && freeGlobal.process; + + /** Used to access faster Node.js helpers. */ + var nodeUtil = (function() { + try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; + + if (types) { + return types; + } + + // Legacy `process.binding('util')` for Node.js < 10. + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} + }()); + + /* Node.js helper references. */ + var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, + nodeIsDate = nodeUtil && nodeUtil.isDate, + nodeIsMap = nodeUtil && nodeUtil.isMap, + nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, + nodeIsSet = nodeUtil && nodeUtil.isSet, + nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + + /*--------------------------------------------------------------------------*/ + + /** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ + function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + + /** + * A specialized version of `baseAggregator` for arrays. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); + } + return accumulator; + } + + /** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.forEachRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEachRight(array, iteratee) { + var length = array == null ? 0 : array.length; + + while (length--) { + if (iteratee(array[length], length, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.every` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ + function arrayEvery(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; + } + + /** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; + } + + /** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; + } + + /** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + + /** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; + } + + /** + * A specialized version of `_.reduceRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the last element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduceRight(array, iteratee, accumulator, initAccum) { + var length = array == null ? 0 : array.length; + if (initAccum && length) { + accumulator = array[--length]; + } + while (length--) { + accumulator = iteratee(accumulator, array[length], length, array); + } + return accumulator; + } + + /** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + + /** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + var asciiSize = baseProperty('length'); + + /** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function asciiToArray(string) { + return string.split(''); + } + + /** + * Splits an ASCII `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function asciiWords(string) { + return string.match(reAsciiWord) || []; + } + + /** + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the found element or its key, else `undefined`. + */ + function baseFindKey(collection, predicate, eachFunc) { + var result; + eachFunc(collection, function(value, key, collection) { + if (predicate(value, key, collection)) { + result = key; + return false; + } + }); + return result; + } + + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); + } + + /** + * This function is like `baseIndexOf` except that it accepts a comparator. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @param {Function} comparator The comparator invoked per element. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOfWith(array, value, fromIndex, comparator) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (comparator(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ + function baseIsNaN(value) { + return value !== value; + } + + /** + * The base implementation of `_.mean` and `_.meanBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the mean. + */ + function baseMean(array, iteratee) { + var length = array == null ? 0 : array.length; + return length ? (baseSum(array, iteratee) / length) : NAN; + } + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ + function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ + function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; + } + + /** + * The base implementation of `_.sum` and `_.sumBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ + function baseSum(array, iteratee) { + var result, + index = -1, + length = array.length; + + while (++index < length) { + var current = iteratee(array[index]); + if (current !== undefined) { + result = result === undefined ? current : (result + current); + } + } + return result; + } + + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + + /** + * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array + * of key-value pairs for `object` corresponding to the property names of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the key-value pairs. + */ + function baseToPairs(object, props) { + return arrayMap(props, function(key) { + return [key, object[key]]; + }); + } + + /** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ + function baseUnary(func) { + return function(value) { + return func(value); + }; + } + + /** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ + function baseValues(object, props) { + return arrayMap(props, function(key) { + return object[key]; + }); + } + + /** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function cacheHas(cache, key) { + return cache.has(key); + } + + /** + * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the first unmatched string symbol. + */ + function charsStartIndex(strSymbols, chrSymbols) { + var index = -1, + length = strSymbols.length; + + while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the last unmatched string symbol. + */ + function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; + + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Gets the number of `placeholder` occurrences in `array`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} placeholder The placeholder to search for. + * @returns {number} Returns the placeholder count. + */ + function countHolders(array, placeholder) { + var length = array.length, + result = 0; + + while (length--) { + if (array[length] === placeholder) { + ++result; + } + } + return result; + } + + /** + * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A + * letters to basic Latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ + var deburrLetter = basePropertyOf(deburredLetters); + + /** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + var escapeHtmlChar = basePropertyOf(htmlEscapes); + + /** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; + } + + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function getValue(object, key) { + return object == null ? undefined : object[key]; + } + + /** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ + function hasUnicode(string) { + return reHasUnicode.test(string); + } + + /** + * Checks if `string` contains a word composed of Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a word is found, else `false`. + */ + function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); + } + + /** + * Converts `iterator` to an array. + * + * @private + * @param {Object} iterator The iterator to convert. + * @returns {Array} Returns the converted array. + */ + function iteratorToArray(iterator) { + var data, + result = []; + + while (!(data = iterator.next()).done) { + result.push(data.value); + } + return result; + } + + /** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ + function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; + } + + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + + /** + * Replaces all `placeholder` elements in `array` with an internal placeholder + * and returns an array of their indexes. + * + * @private + * @param {Array} array The array to modify. + * @param {*} placeholder The placeholder to replace. + * @returns {Array} Returns the new array of placeholder indexes. + */ + function replaceHolders(array, placeholder) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value === placeholder || value === PLACEHOLDER) { + array[index] = PLACEHOLDER; + result[resIndex++] = index; + } + } + return result; + } + + /** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ + function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + + /** + * Converts `set` to its value-value pairs. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the value-value pairs. + */ + function setToPairs(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = [value, value]; + }); + return result; + } + + /** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * A specialized version of `_.lastIndexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; + } + + /** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ + function stringSize(string) { + return hasUnicode(string) + ? unicodeSize(string) + : asciiSize(string); + } + + /** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function stringToArray(string) { + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); + } + + /** + * Used by `_.unescape` to convert HTML entities to characters. + * + * @private + * @param {string} chr The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ + var unescapeHtmlChar = basePropertyOf(htmlUnescapes); + + /** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; + } + + /** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function unicodeToArray(string) { + return string.match(reUnicode) || []; + } + + /** + * Splits a Unicode `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function unicodeWords(string) { + return string.match(reUnicodeWord) || []; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Create a new pristine `lodash` function using the `context` object. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Util + * @param {Object} [context=root] The context object. + * @returns {Function} Returns a new `lodash` function. + * @example + * + * _.mixin({ 'foo': _.constant('foo') }); + * + * var lodash = _.runInContext(); + * lodash.mixin({ 'bar': lodash.constant('bar') }); + * + * _.isFunction(_.foo); + * // => true + * _.isFunction(_.bar); + * // => false + * + * lodash.isFunction(lodash.foo); + * // => false + * lodash.isFunction(lodash.bar); + * // => true + * + * // Create a suped-up `defer` in Node.js. + * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; + */ + var runInContext = (function runInContext(context) { + context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps)); + + /** Built-in constructor references. */ + var Array = context.Array, + Date = context.Date, + Error = context.Error, + Function = context.Function, + Math = context.Math, + Object = context.Object, + RegExp = context.RegExp, + String = context.String, + TypeError = context.TypeError; + + /** Used for built-in method references. */ + var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + + /** Used to detect overreaching core-js shims. */ + var coreJsData = context['__core-js_shared__']; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to generate unique IDs. */ + var idCounter = 0; + + /** Used to detect methods masquerading as native. */ + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; + }()); + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); + + /** Used to restore the original `_` reference in `_.noConflict`. */ + var oldDash = root._; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /** Built-in value references. */ + var Buffer = moduleExports ? context.Buffer : undefined, + Symbol = context.Symbol, + Uint8Array = context.Uint8Array, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, + getPrototype = overArg(Object.getPrototypeOf, Object), + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice, + spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, + symIterator = Symbol ? Symbol.iterator : undefined, + symToStringTag = Symbol ? Symbol.toStringTag : undefined; + + var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} + }()); + + /** Mocked built-ins. */ + var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, + ctxNow = Date && Date.now !== root.Date.now && Date.now, + ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeCeil = Math.ceil, + nativeFloor = Math.floor, + nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeIsFinite = context.isFinite, + nativeJoin = arrayProto.join, + nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max, + nativeMin = Math.min, + nativeNow = Date.now, + nativeParseInt = context.parseInt, + nativeRandom = Math.random, + nativeReverse = arrayProto.reverse; + + /* Built-in method references that are verified to be native. */ + var DataView = getNative(context, 'DataView'), + Map = getNative(context, 'Map'), + Promise = getNative(context, 'Promise'), + Set = getNative(context, 'Set'), + WeakMap = getNative(context, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + + /** Used to store function metadata. */ + var metaMap = WeakMap && new WeakMap; + + /** Used to lookup unminified function names. */ + var realNames = {}; + + /** Used to detect maps, sets, and weakmaps. */ + var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + + /** Used to convert symbols to primitives and strings. */ + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps `value` to enable implicit method + * chain sequences. Methods that operate on and return arrays, collections, + * and functions can be chained together. Methods that retrieve a single value + * or may return a primitive value will automatically end the chain sequence + * and return the unwrapped value. Otherwise, the value must be unwrapped + * with `_#value`. + * + * Explicit chain sequences, which must be unwrapped with `_#value`, may be + * enabled using `_.chain`. + * + * The execution of chained methods is lazy, that is, it's deferred until + * `_#value` is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. + * Shortcut fusion is an optimization to merge iteratee calls; this avoids + * the creation of intermediate arrays and can greatly reduce the number of + * iteratee executions. Sections of a chain sequence qualify for shortcut + * fusion if the section is applied to an array and iteratees accept only + * one argument. The heuristic for whether a section qualifies for shortcut + * fusion is subject to change. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, + * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, + * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, + * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, + * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, + * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, + * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, + * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, + * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, + * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, + * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, + * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, + * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, + * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, + * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, + * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, + * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, + * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, + * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, + * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, + * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, + * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, + * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, + * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, + * `zipObject`, `zipObjectDeep`, and `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` + * + * @name _ + * @constructor + * @category Seq + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2, 3]); + * + * // Returns an unwrapped value. + * wrapped.reduce(_.add); + * // => 6 + * + * // Returns a wrapped value. + * var squares = wrapped.map(square); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { + if (value instanceof LodashWrapper) { + return value; + } + if (hasOwnProperty.call(value, '__wrapped__')) { + return wrapperClone(value); + } + } + return new LodashWrapper(value); + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; + }()); + + /** + * The function whose prototype chain sequence wrappers inherit from. + * + * @private + */ + function baseLodash() { + // No operation performed. + } + + /** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ + function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + this.__index__ = 0; + this.__values__ = undefined; + } + + /** + * By default, the template delimiters used by lodash are like those in + * embedded Ruby (ERB) as well as ES2015 template strings. Change the + * following template settings to use alternative delimiters. + * + * @static + * @memberOf _ + * @type {Object} + */ + lodash.templateSettings = { + + /** + * Used to detect `data` property values to be HTML-escaped. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'escape': reEscape, + + /** + * Used to detect code to be evaluated. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'evaluate': reEvaluate, + + /** + * Used to detect `data` property values to inject. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'interpolate': reInterpolate, + + /** + * Used to reference the data object in the template text. + * + * @memberOf _.templateSettings + * @type {string} + */ + 'variable': '', + + /** + * Used to import variables into the compiled template. + * + * @memberOf _.templateSettings + * @type {Object} + */ + 'imports': { + + /** + * A reference to the `lodash` function. + * + * @memberOf _.templateSettings.imports + * @type {Function} + */ + '_': lodash + } + }; + + // Ensure wrappers are instances of `baseLodash`. + lodash.prototype = baseLodash.prototype; + lodash.prototype.constructor = lodash; + + LodashWrapper.prototype = baseCreate(baseLodash.prototype); + LodashWrapper.prototype.constructor = LodashWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * + * @private + * @constructor + * @param {*} value The value to wrap. + */ + function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = MAX_ARRAY_LENGTH; + this.__views__ = []; + } + + /** + * Creates a clone of the lazy wrapper object. + * + * @private + * @name clone + * @memberOf LazyWrapper + * @returns {Object} Returns the cloned `LazyWrapper` object. + */ + function lazyClone() { + var result = new LazyWrapper(this.__wrapped__); + result.__actions__ = copyArray(this.__actions__); + result.__dir__ = this.__dir__; + result.__filtered__ = this.__filtered__; + result.__iteratees__ = copyArray(this.__iteratees__); + result.__takeCount__ = this.__takeCount__; + result.__views__ = copyArray(this.__views__); + return result; + } + + /** + * Reverses the direction of lazy iteration. + * + * @private + * @name reverse + * @memberOf LazyWrapper + * @returns {Object} Returns the new reversed `LazyWrapper` object. + */ + function lazyReverse() { + if (this.__filtered__) { + var result = new LazyWrapper(this); + result.__dir__ = -1; + result.__filtered__ = true; + } else { + result = this.clone(); + result.__dir__ *= -1; + } + return result; + } + + /** + * Extracts the unwrapped value from its lazy wrapper. + * + * @private + * @name value + * @memberOf LazyWrapper + * @returns {*} Returns the unwrapped value. + */ + function lazyValue() { + var array = this.__wrapped__.value(), + dir = this.__dir__, + isArr = isArray(array), + isRight = dir < 0, + arrLength = isArr ? array.length : 0, + view = getView(0, arrLength, this.__views__), + start = view.start, + end = view.end, + length = end - start, + index = isRight ? end : (start - 1), + iteratees = this.__iteratees__, + iterLength = iteratees.length, + resIndex = 0, + takeCount = nativeMin(length, this.__takeCount__); + + if (!isArr || (!isRight && arrLength == length && takeCount == length)) { + return baseWrapperValue(array, this.__actions__); + } + var result = []; + + outer: + while (length-- && resIndex < takeCount) { + index += dir; + + var iterIndex = -1, + value = array[index]; + + while (++iterIndex < iterLength) { + var data = iteratees[iterIndex], + iteratee = data.iteratee, + type = data.type, + computed = iteratee(value); + + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } + } + } + result[resIndex++] = value; + } + return result; + } + + // Ensure `LazyWrapper` is an instance of `baseLodash`. + LazyWrapper.prototype = baseCreate(baseLodash.prototype); + LazyWrapper.prototype.constructor = LazyWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + + /** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; + } + + /** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); + } + + /** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; + } + + // Add methods to `Hash`. + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; + } + + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; + } + + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + + // Add methods to `ListCache`. + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; + } + + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ + function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } + + // Add methods to `MapCache`. + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ + function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } + } + + /** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + + /** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ + function setCacheHas(value) { + return this.__data__.has(value); + } + + // Add methods to `SetCache`. + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; + } + + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + function stackClear() { + this.__data__ = new ListCache; + this.size = 0; + } + + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; + } + + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function stackGet(key) { + return this.__data__.get(key); + } + + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function stackHas(key) { + return this.__data__.has(key); + } + + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ + function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; + } + + // Add methods to `Stack`. + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; + } + + /** + * A specialized version of `_.sample` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @returns {*} Returns the random element. + */ + function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined; + } + + /** + * A specialized version of `_.sampleSize` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function arraySampleSize(array, n) { + return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); + } + + /** + * A specialized version of `_.shuffle` for arrays. + * + * @private + * @param {Array} array The array to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); + } + + /** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignMergeValue(object, key, value) { + if ((value !== undefined && !eq(object[key], value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } + + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } + + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + + /** + * Aggregates elements of `collection` on `accumulator` with keys transformed + * by `iteratee` and values set by `setter`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function baseAggregator(collection, setter, iteratee, accumulator) { + baseEach(collection, function(value, key, collection) { + setter(accumulator, value, iteratee(value), collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); + } + + /** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); + } + + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } + } + + /** + * The base implementation of `_.at` without support for individual paths. + * + * @private + * @param {Object} object The object to iterate over. + * @param {string[]} paths The property paths to pick. + * @returns {Array} Returns the picked elements. + */ + function baseAt(object, paths) { + var index = -1, + length = paths.length, + result = Array(length), + skip = object == null; + + while (++index < length) { + result[index] = skip ? undefined : get(object, paths[index]); + } + return result; + } + + /** + * The base implementation of `_.clamp` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + */ + function baseClamp(number, lower, upper) { + if (number === number) { + if (upper !== undefined) { + number = number <= upper ? number : upper; + } + if (lower !== undefined) { + number = number >= lower ? number : lower; + } + } + return number; + } + + /** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat + ? copySymbolsIn(value, baseAssignIn(result, value)) + : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (isMap(value)) { + value.forEach(function(subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + } + + var keysFunc = isFull + ? (isFlat ? getAllKeysIn : getAllKeys) + : (isFlat ? keysIn : keys); + + var props = isArr ? undefined : keysFunc(value); + arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; + } + + /** + * The base implementation of `_.conforms` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + */ + function baseConforms(source) { + var props = keys(source); + return function(object) { + return baseConformsTo(object, source, props); + }; + } + + /** + * The base implementation of `_.conformsTo` which accepts `props` to check. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + */ + function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length], + predicate = source[key], + value = object[key]; + + if ((value === undefined && !(key in object)) || !predicate(value)) { + return false; + } + } + return true; + } + + /** + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. + */ + function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function() { func.apply(undefined, args); }, wait); + } + + /** + * The base implementation of methods like `_.difference` without support + * for excluding multiple arrays or iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + */ + function baseDifference(array, values, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + isCommon = true, + length = array.length, + result = [], + valuesLength = values.length; + + if (!length) { + return result; + } + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)); + } + if (comparator) { + includes = arrayIncludesWith; + isCommon = false; + } + else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas; + isCommon = false; + values = new SetCache(values); + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee == null ? value : iteratee(value); + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } + } + result.push(value); + } + else if (!includes(values, computed, comparator)) { + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEach = createBaseEach(baseForOwn); + + /** + * The base implementation of `_.forEachRight` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEachRight = createBaseEach(baseForOwnRight, true); + + /** + * The base implementation of `_.every` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ + function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; + } + + /** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ + function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !isSymbol(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; + } + + /** + * The base implementation of `_.fill` without an iteratee call guard. + * + * @private + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + */ + function baseFill(array, value, start, end) { + var length = array.length; + + start = toInteger(start); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : toInteger(end); + if (end < 0) { + end += length; + } + end = start > end ? 0 : toLength(end); + while (start < end) { + array[start++] = value; + } + return array; + } + + /** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; + } + + /** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + + /** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + /** + * This function is like `baseFor` except that it iterates over properties + * in the opposite order. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseForRight = createBaseFor(true); + + /** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + + /** + * The base implementation of `_.forOwnRight` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwnRight(object, iteratee) { + return object && baseForRight(object, iteratee, keys); + } + + /** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ + function baseFunctions(object, props) { + return arrayFilter(props, function(key) { + return isFunction(object[key]); + }); + } + + /** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ + function baseGet(object, path) { + path = castPath(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return (index && index == length) ? object : undefined; + } + + /** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); + } + + /** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ + function baseGt(value, other) { + return value > other; + } + + /** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); + } + + /** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHasIn(object, key) { + return object != null && key in Object(object); + } + + /** + * The base implementation of `_.inRange` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to check. + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + */ + function baseInRange(number, start, end) { + return number >= nativeMin(start, end) && number < nativeMax(start, end); + } + + /** + * The base implementation of methods like `_.intersection`, without support + * for iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of shared values. + */ + function baseIntersection(arrays, iteratee, comparator) { + var includes = comparator ? arrayIncludesWith : arrayIncludes, + length = arrays[0].length, + othLength = arrays.length, + othIndex = othLength, + caches = Array(othLength), + maxLength = Infinity, + result = []; + + while (othIndex--) { + var array = arrays[othIndex]; + if (othIndex && iteratee) { + array = arrayMap(array, baseUnary(iteratee)); + } + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) + ? new SetCache(othIndex && array) + : undefined; + } + array = arrays[0]; + + var index = -1, + seen = caches[0]; + + outer: + while (++index < length && result.length < maxLength) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (!(seen + ? cacheHas(seen, computed) + : includes(result, computed, comparator) + )) { + othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if (!(cache + ? cacheHas(cache, computed) + : includes(arrays[othIndex], computed, comparator)) + ) { + continue outer; + } + } + if (seen) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.invert` and `_.invertBy` which inverts + * `object` with values transformed by `iteratee` and set by `setter`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform values. + * @param {Object} accumulator The initial inverted object. + * @returns {Function} Returns `accumulator`. + */ + function baseInverter(object, setter, iteratee, accumulator) { + baseForOwn(object, function(value, key, object) { + setter(accumulator, iteratee(value), key, object); + }); + return accumulator; + } + + /** + * The base implementation of `_.invoke` without support for individual + * method arguments. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {Array} args The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + */ + function baseInvoke(object, path, args) { + path = castPath(path, object); + object = parent(object, path); + var func = object == null ? object : object[toKey(last(path))]; + return func == null ? undefined : apply(func, object, args); + } + + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + + /** + * The base implementation of `_.isArrayBuffer` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + */ + function baseIsArrayBuffer(value) { + return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; + } + + /** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ + function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; + } + + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack); + return (objIsArr || isTypedArray(object)) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new Stack); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); + } + + /** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ + function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; + } + + /** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; + } + + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + + /** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } + + /** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ + function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; + } + + /** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ + function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + + /** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ + function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == 'object') { + return isArray(value) + ? baseMatchesProperty(value[0], value[1]) + : baseMatches(value); + } + return property(value); + } + + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ + function baseLt(value, other) { + return value < other; + } + + /** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; + } + + /** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; + } + + /** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function(object) { + var objValue = get(object, path); + return (objValue === undefined && objValue === srcValue) + ? hasIn(object, path) + : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; + } + + /** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor(source, function(srcValue, key) { + stack || (stack = new Stack); + if (isObject(srcValue)) { + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, keysIn); + } + + /** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object, key), + srcValue = safeGet(source, key), + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } + else { + newValue = []; + } + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || isFunction(objValue)) { + newValue = initCloneObject(srcValue); + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); + } + + /** + * The base implementation of `_.nth` which doesn't coerce arguments. + * + * @private + * @param {Array} array The array to query. + * @param {number} n The index of the element to return. + * @returns {*} Returns the nth element of `array`. + */ + function baseNth(array, n) { + var length = array.length; + if (!length) { + return; + } + n += n < 0 ? length : 0; + return isIndex(n, length) ? array[n] : undefined; + } + + /** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ + function baseOrderBy(collection, iteratees, orders) { + var index = -1; + iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee())); + + var result = baseMap(collection, function(value, key, collection) { + var criteria = arrayMap(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); + } + + /** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ + function basePick(object, paths) { + return basePickBy(object, paths, function(value, path) { + return hasIn(object, path); + }); + } + + /** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ + function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = baseGet(object, path); + + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); + } + } + return result; + } + + /** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; + } + + /** + * The base implementation of `_.pullAllBy` without support for iteratee + * shorthands. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + */ + function basePullAll(array, values, iteratee, comparator) { + var indexOf = comparator ? baseIndexOfWith : baseIndexOf, + index = -1, + length = values.length, + seen = array; + + if (array === values) { + values = copyArray(values); + } + if (iteratee) { + seen = arrayMap(array, baseUnary(iteratee)); + } + while (++index < length) { + var fromIndex = 0, + value = values[index], + computed = iteratee ? iteratee(value) : value; + + while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { + if (seen !== array) { + splice.call(seen, fromIndex, 1); + } + splice.call(array, fromIndex, 1); + } + } + return array; + } + + /** + * The base implementation of `_.pullAt` without support for individual + * indexes or capturing the removed elements. + * + * @private + * @param {Array} array The array to modify. + * @param {number[]} indexes The indexes of elements to remove. + * @returns {Array} Returns `array`. + */ + function basePullAt(array, indexes) { + var length = array ? indexes.length : 0, + lastIndex = length - 1; + + while (length--) { + var index = indexes[length]; + if (length == lastIndex || index !== previous) { + var previous = index; + if (isIndex(index)) { + splice.call(array, index, 1); + } else { + baseUnset(array, index); + } + } + } + return array; + } + + /** + * The base implementation of `_.random` without support for returning + * floating-point numbers. + * + * @private + * @param {number} lower The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the random number. + */ + function baseRandom(lower, upper) { + return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); + } + + /** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ + function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; + } + + /** + * The base implementation of `_.repeat` which doesn't coerce arguments. + * + * @private + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. + */ + function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + + return result; + } + + /** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); + } + + /** + * The base implementation of `_.sample`. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + */ + function baseSample(collection) { + return arraySample(values(collection)); + } + + /** + * The base implementation of `_.sampleSize` without param guards. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function baseSampleSize(collection, n) { + var array = values(collection); + return shuffleSelf(array, baseClamp(n, 0, array.length)); + } + + /** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = castPath(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; + } + + /** + * The base implementation of `setData` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var baseSetData = !metaMap ? identity : function(func, data) { + metaMap.set(func, data); + return func; + }; + + /** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); + }; + + /** + * The base implementation of `_.shuffle`. + * + * @private + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function baseShuffle(collection) { + return shuffleSelf(values(collection)); + } + + /** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } + + /** + * The base implementation of `_.some` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function baseSome(collection, predicate) { + var result; + + baseEach(collection, function(value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; + } + + /** + * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which + * performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndex(array, value, retHighest) { + var low = 0, + high = array == null ? low : array.length; + + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; + + if (computed !== null && !isSymbol(computed) && + (retHighest ? (computed <= value) : (computed < value))) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return baseSortedIndexBy(array, value, identity, retHighest); + } + + /** + * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` + * which invokes `iteratee` for `value` and each element of `array` to compute + * their sort ranking. The iteratee is invoked with one argument; (value). + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The iteratee invoked per element. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndexBy(array, value, iteratee, retHighest) { + value = iteratee(value); + + var low = 0, + high = array == null ? 0 : array.length, + valIsNaN = value !== value, + valIsNull = value === null, + valIsSymbol = isSymbol(value), + valIsUndefined = value === undefined; + + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + othIsDefined = computed !== undefined, + othIsNull = computed === null, + othIsReflexive = computed === computed, + othIsSymbol = isSymbol(computed); + + if (valIsNaN) { + var setLow = retHighest || othIsReflexive; + } else if (valIsUndefined) { + setLow = othIsReflexive && (retHighest || othIsDefined); + } else if (valIsNull) { + setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); + } else if (valIsSymbol) { + setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); + } else if (othIsNull || othIsSymbol) { + setLow = false; + } else { + setLow = retHighest ? (computed <= value) : (computed < value); + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); + } + + /** + * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseSortedUniq(array, iteratee) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + if (!index || !eq(computed, seen)) { + var seen = computed; + result[resIndex++] = value === 0 ? 0 : value; + } + } + return result; + } + + /** + * The base implementation of `_.toNumber` which doesn't ensure correct + * conversions of binary, hexadecimal, or octal string values. + * + * @private + * @param {*} value The value to process. + * @returns {number} Returns the number. + */ + function baseToNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + return +value; + } + + /** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ + function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + /** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.unset`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The property path to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + */ + function baseUnset(object, path) { + path = castPath(path, object); + object = parent(object, path); + return object == null || delete object[toKey(last(path))]; + } + + /** + * The base implementation of `_.update`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to update. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseUpdate(object, path, updater, customizer) { + return baseSet(object, path, updater(baseGet(object, path)), customizer); + } + + /** + * The base implementation of methods like `_.dropWhile` and `_.takeWhile` + * without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to query. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [isDrop] Specify dropping elements instead of taking them. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the slice of `array`. + */ + function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length) && + predicate(array[index], index, array)) {} + + return isDrop + ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) + : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); + } + + /** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to perform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ + function baseWrapperValue(value, actions) { + var result = value; + if (result instanceof LazyWrapper) { + result = result.value(); + } + return arrayReduce(actions, function(result, action) { + return action.func.apply(action.thisArg, arrayPush([result], action.args)); + }, result); + } + + /** + * The base implementation of methods like `_.xor`, without support for + * iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of values. + */ + function baseXor(arrays, iteratee, comparator) { + var length = arrays.length; + if (length < 2) { + return length ? baseUniq(arrays[0]) : []; + } + var index = -1, + result = Array(length); + + while (++index < length) { + var array = arrays[index], + othIndex = -1; + + while (++othIndex < length) { + if (othIndex != index) { + result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); + } + } + } + return baseUniq(baseFlatten(result, 1), iteratee, comparator); + } + + /** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ + function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; + } + + /** + * Casts `value` to an empty array if it's not an array like object. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array|Object} Returns the cast array-like object. + */ + function castArrayLikeObject(value) { + return isArrayLikeObject(value) ? value : []; + } + + /** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ + function castFunction(value) { + return typeof value == 'function' ? value : identity; + } + + /** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ + function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); + } + + /** + * A `baseRest` alias which can be replaced with `identity` by module + * replacement plugins. + * + * @private + * @type {Function} + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + var castRest = baseRest; + + /** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ + function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); + } + + /** + * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout). + * + * @private + * @param {number|Object} id The timer id or timeout object of the timer to clear. + */ + var clearTimeout = ctxClearTimeout || function(id) { + return root.clearTimeout(id); + }; + + /** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ + function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; + } + + /** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ + function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; + } + + /** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ + function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + } + + /** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ + function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; + } + + /** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ + function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; + } + + /** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ + function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); + } + + /** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ + function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = isSymbol(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = isSymbol(other); + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; + } + + /** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ + function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; + } + + /** + * Creates an array that is the composition of partially applied arguments, + * placeholders, and provided arguments into a single array of arguments. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to prepend to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgs(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersLength = holders.length, + leftIndex = -1, + leftLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(leftLength + rangeLength), + isUncurried = !isCurried; + + while (++leftIndex < leftLength) { + result[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[holders[argsIndex]] = args[argsIndex]; + } + } + while (rangeLength--) { + result[leftIndex++] = args[argsIndex++]; + } + return result; + } + + /** + * This function is like `composeArgs` except that the arguments composition + * is tailored for `_.partialRight`. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to append to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgsRight(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersIndex = -1, + holdersLength = holders.length, + rightIndex = -1, + rightLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(rangeLength + rightLength), + isUncurried = !isCurried; + + while (++argsIndex < rangeLength) { + result[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[offset + holders[holdersIndex]] = args[argsIndex++]; + } + } + return result; + } + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; + } + + /** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); + } + + /** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); + } + + /** + * Creates a function like `_.groupBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} [initializer] The accumulator object initializer. + * @returns {Function} Returns the new aggregator function. + */ + function createAggregator(setter, initializer) { + return function(collection, iteratee) { + var func = isArray(collection) ? arrayAggregator : baseAggregator, + accumulator = initializer ? initializer() : {}; + + return func(collection, setter, getIteratee(iteratee, 2), accumulator); + }; + } + + /** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + + /** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + + /** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + /** + * Creates a function that wraps `func` to invoke it with the optional `this` + * binding of `thisArg`. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createBind(func, bitmask, thisArg) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(isBind ? thisArg : this, arguments); + } + return wrapper; + } + + /** + * Creates a function like `_.lowerFirst`. + * + * @private + * @param {string} methodName The name of the `String` case method to use. + * @returns {Function} Returns the new case function. + */ + function createCaseFirst(methodName) { + return function(string) { + string = toString(string); + + var strSymbols = hasUnicode(string) + ? stringToArray(string) + : undefined; + + var chr = strSymbols + ? strSymbols[0] + : string.charAt(0); + + var trailing = strSymbols + ? castSlice(strSymbols, 1).join('') + : string.slice(1); + + return chr[methodName]() + trailing; + }; + } + + /** + * Creates a function like `_.camelCase`. + * + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. + */ + function createCompounder(callback) { + return function(string) { + return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); + }; + } + + /** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ + function createCtor(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: return new Ctor; + case 1: return new Ctor(args[0]); + case 2: return new Ctor(args[0], args[1]); + case 3: return new Ctor(args[0], args[1], args[2]); + case 4: return new Ctor(args[0], args[1], args[2], args[3]); + case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; + } + + /** + * Creates a function that wraps `func` to enable currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {number} arity The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length, + placeholder = getHolder(wrapper); + + while (index--) { + args[index] = arguments[index]; + } + var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) + ? [] + : replaceHolders(args, placeholder); + + length -= holders.length; + if (length < arity) { + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, undefined, + args, holders, undefined, undefined, arity - length); + } + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return apply(fn, this, args); + } + return wrapper; + } + + /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ + function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = getIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; + } + + /** + * Creates a `_.flow` or `_.flowRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. + */ + function createFlow(fromRight) { + return flatRest(function(funcs) { + var length = funcs.length, + index = length, + prereq = LodashWrapper.prototype.thru; + + if (fromRight) { + funcs.reverse(); + } + while (index--) { + var func = funcs[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (prereq && !wrapper && getFuncName(func) == 'wrapper') { + var wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? index : length; + while (++index < length) { + func = funcs[index]; + + var funcName = getFuncName(func), + data = funcName == 'wrapper' ? getData(func) : undefined; + + if (data && isLaziable(data[0]) && + data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && + !data[4].length && data[9] == 1 + ) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = (func.length == 1 && isLaziable(func)) + ? wrapper[funcName]() + : wrapper.thru(func); + } + } + return function() { + var args = arguments, + value = args[0]; + + if (wrapper && args.length == 1 && isArray(value)) { + return wrapper.plant(value).value(); + } + var index = 0, + result = length ? funcs[index].apply(this, args) : value; + + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; + }); + } + + /** + * Creates a function that wraps `func` to invoke it with optional `this` + * binding of `thisArg`, partial application, and currying. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided + * to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { + var isAry = bitmask & WRAP_ARY_FLAG, + isBind = bitmask & WRAP_BIND_FLAG, + isBindKey = bitmask & WRAP_BIND_KEY_FLAG, + isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), + isFlip = bitmask & WRAP_FLIP_FLAG, + Ctor = isBindKey ? undefined : createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length; + + while (index--) { + args[index] = arguments[index]; + } + if (isCurried) { + var placeholder = getHolder(wrapper), + holdersCount = countHolders(args, placeholder); + } + if (partials) { + args = composeArgs(args, partials, holders, isCurried); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight, isCurried); + } + length -= holdersCount; + if (isCurried && length < arity) { + var newHolders = replaceHolders(args, placeholder); + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, thisArg, + args, newHolders, argPos, ary, arity - length + ); + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; + + length = args.length; + if (argPos) { + args = reorder(args, argPos); + } else if (isFlip && length > 1) { + args.reverse(); + } + if (isAry && ary < length) { + args.length = ary; + } + if (this && this !== root && this instanceof wrapper) { + fn = Ctor || createCtor(fn); + } + return fn.apply(thisBinding, args); + } + return wrapper; + } + + /** + * Creates a function like `_.invertBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} toIteratee The function to resolve iteratees. + * @returns {Function} Returns the new inverter function. + */ + function createInverter(setter, toIteratee) { + return function(object, iteratee) { + return baseInverter(object, setter, toIteratee(iteratee), {}); + }; + } + + /** + * Creates a function that performs a mathematical operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. + * @returns {Function} Returns the new mathematical operation function. + */ + function createMathOperation(operator, defaultValue) { + return function(value, other) { + var result; + if (value === undefined && other === undefined) { + return defaultValue; + } + if (value !== undefined) { + result = value; + } + if (other !== undefined) { + if (result === undefined) { + return other; + } + if (typeof value == 'string' || typeof other == 'string') { + value = baseToString(value); + other = baseToString(other); + } else { + value = baseToNumber(value); + other = baseToNumber(other); + } + result = operator(value, other); + } + return result; + }; + } + + /** + * Creates a function like `_.over`. + * + * @private + * @param {Function} arrayFunc The function to iterate over iteratees. + * @returns {Function} Returns the new over function. + */ + function createOver(arrayFunc) { + return flatRest(function(iteratees) { + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); + return baseRest(function(args) { + var thisArg = this; + return arrayFunc(iteratees, function(iteratee) { + return apply(iteratee, thisArg, args); + }); + }); + }); + } + + /** + * Creates the padding for `string` based on `length`. The `chars` string + * is truncated if the number of characters exceeds `length`. + * + * @private + * @param {number} length The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padding for `string`. + */ + function createPadding(length, chars) { + chars = chars === undefined ? ' ' : baseToString(chars); + + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; + } + var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); + return hasUnicode(chars) + ? castSlice(stringToArray(result), 0, length).join('') + : result.slice(0, length); + } + + /** + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to + * the new function. + * @returns {Function} Returns the new wrapped function. + */ + function createPartial(func, bitmask, thisArg, partials) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength), + fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return apply(fn, isBind ? thisArg : this, args); + } + return wrapper; + } + + /** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ + function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); + return baseRange(start, end, step, fromRight); + }; + } + + /** + * Creates a function that performs a relational operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @returns {Function} Returns the new relational operation function. + */ + function createRelationalOperation(operator) { + return function(value, other) { + if (!(typeof value == 'string' && typeof other == 'string')) { + value = toNumber(value); + other = toNumber(other); + } + return operator(value, other); + }; + } + + /** + * Creates a function that wraps `func` to continue currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {Function} wrapFunc The function to create the `func` wrapper. + * @param {*} placeholder The placeholder value. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { + var isCurry = bitmask & WRAP_CURRY_FLAG, + newHolders = isCurry ? holders : undefined, + newHoldersRight = isCurry ? undefined : holders, + newPartials = isCurry ? partials : undefined, + newPartialsRight = isCurry ? undefined : partials; + + bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); + bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); + + if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { + bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); + } + var newData = [ + func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, + newHoldersRight, argPos, ary, arity + ]; + + var result = wrapFunc.apply(undefined, newData); + if (isLaziable(func)) { + setData(result, newData); + } + result.placeholder = placeholder; + return setWrapToString(result, func, bitmask); + } + + /** + * Creates a function like `_.round`. + * + * @private + * @param {string} methodName The name of the `Math` method to use when rounding. + * @returns {Function} Returns the new round function. + */ + function createRound(methodName) { + var func = Math[methodName]; + return function(number, precision) { + number = toNumber(number); + precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); + if (precision && nativeIsFinite(number)) { + // Shift with exponential notation to avoid floating-point issues. + // See [MDN](https://mdn.io/round#Examples) for more details. + var pair = (toString(number) + 'e').split('e'), + value = func(pair[0] + 'e' + (+pair[1] + precision)); + + pair = (toString(value) + 'e').split('e'); + return +(pair[0] + 'e' + (+pair[1] - precision)); + } + return func(number); + }; + } + + /** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ + var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { + return new Set(values); + }; + + /** + * Creates a `_.toPairs` or `_.toPairsIn` function. + * + * @private + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. + */ + function createToPairs(keysFunc) { + return function(object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; + } + + /** + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * 512 - `_.flip` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); + arity = arity === undefined ? arity : toInteger(arity); + length -= holders ? holders.length : 0; + + if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; + + partials = holders = undefined; + } + var data = isBindKey ? undefined : getData(func); + + var newData = [ + func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, + argPos, ary, arity + ]; + + if (data) { + mergeData(newData, data); + } + func = newData[0]; + bitmask = newData[1]; + thisArg = newData[2]; + partials = newData[3]; + holders = newData[4]; + arity = newData[9] = newData[9] === undefined + ? (isBindKey ? 0 : func.length) + : nativeMax(newData[9] - length, 0); + + if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { + bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); + } + if (!bitmask || bitmask == WRAP_BIND_FLAG) { + var result = createBind(func, bitmask, thisArg); + } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { + result = createCurry(func, bitmask, arity); + } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { + result = createPartial(func, bitmask, thisArg, partials); + } else { + result = createHybrid.apply(undefined, newData); + } + var setter = data ? baseSetData : setData; + return setWrapToString(setter(result, newData), func, bitmask); + } + + /** + * Used by `_.defaults` to customize its `_.assignIn` use to assign properties + * of source objects to the destination object for all destination properties + * that resolve to `undefined`. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to assign. + * @param {Object} object The parent object of `objValue`. + * @returns {*} Returns the value to assign. + */ + function customDefaultsAssignIn(objValue, srcValue, key, object) { + if (objValue === undefined || + (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { + return srcValue; + } + return objValue; + } + + /** + * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source + * objects into destination objects that are passed thru. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to merge. + * @param {Object} object The parent object of `objValue`. + * @param {Object} source The parent object of `srcValue`. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + * @returns {*} Returns the value to assign. + */ + function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { + if (isObject(objValue) && isObject(srcValue)) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); + stack['delete'](srcValue); + } + return objValue; + } + + /** + * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain + * objects. + * + * @private + * @param {*} value The value to inspect. + * @param {string} key The key of the property to inspect. + * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. + */ + function customOmitClone(value) { + return isPlainObject(value) ? undefined : value; + } + + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; + } + + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked && stack.get(other)) { + return stacked == other; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); + } + + /** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + + /** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); + } + + /** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ + var getData = !metaMap ? noop : function(func) { + return metaMap.get(func); + }; + + /** + * Gets the name of `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {string} Returns the function name. + */ + function getFuncName(func) { + var result = (func.name + ''), + array = realNames[result], + length = hasOwnProperty.call(realNames, result) ? array.length : 0; + + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result; + } + + /** + * Gets the argument placeholder value for `func`. + * + * @private + * @param {Function} func The function to inspect. + * @returns {*} Returns the placeholder value. + */ + function getHolder(func) { + var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; + return object.placeholder; + } + + /** + * Gets the appropriate "iteratee" function. If `_.iteratee` is customized, + * this function returns the custom method, otherwise it returns `baseIteratee`. + * If arguments are provided, the chosen function is invoked with them and + * its result is returned. + * + * @private + * @param {*} [value] The value to convert to an iteratee. + * @param {number} [arity] The arity of the created iteratee. + * @returns {Function} Returns the chosen function or its result. + */ + function getIteratee() { + var result = lodash.iteratee || iteratee; + result = result === iteratee ? baseIteratee : result; + return arguments.length ? result(arguments[0], arguments[1]) : result; + } + + /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; + } + + /** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ + function getMatchData(object) { + var result = keys(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; + } + return result; + } + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; + } + + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + + /** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; + + /** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); + } + return result; + }; + + /** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + var getTag = baseGetTag; + + // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. + if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; + } + + /** + * Gets the view, applying any `transforms` to the `start` and `end` positions. + * + * @private + * @param {number} start The start of the view. + * @param {number} end The end of the view. + * @param {Array} transforms The transformations to apply to the view. + * @returns {Object} Returns an object containing the `start` and `end` + * positions of the view. + */ + function getView(start, end, transforms) { + var index = -1, + length = transforms.length; + + while (++index < length) { + var data = transforms[index], + size = data.size; + + switch (data.type) { + case 'drop': start += size; break; + case 'dropRight': end -= size; break; + case 'take': end = nativeMin(end, start + size); break; + case 'takeRight': start = nativeMax(start, end - size); break; + } + } + return { 'start': start, 'end': end }; + } + + /** + * Extracts wrapper details from the `source` body comment. + * + * @private + * @param {string} source The source to inspect. + * @returns {Array} Returns the wrapper details. + */ + function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; + } + + /** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ + function hasPath(object, path, hasFunc) { + path = castPath(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && + (isArray(object) || isArguments(object)); + } + + /** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ + function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; + } + + /** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; + } + + /** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return new Ctor; + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return new Ctor; + + case symbolTag: + return cloneSymbol(object); + } + } + + /** + * Inserts wrapper `details` in a comment at the top of the `source` body. + * + * @private + * @param {string} source The source to modify. + * @returns {Array} details The details to insert. + * @returns {string} Returns the modified source. + */ + function insertWrapDetails(source, details) { + var length = details.length; + if (!length) { + return source; + } + var lastIndex = length - 1; + details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; + details = details.join(length > 2 ? ', ' : ' '); + return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); + } + + /** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ + function isFlattenable(value) { + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); + } + + /** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; + } + + /** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ + function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); + } + + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); + } + + /** + * Checks if `func` has a lazy counterpart. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, + * else `false`. + */ + function isLaziable(func) { + var funcName = getFuncName(func), + other = lodash[funcName]; + + if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { + return false; + } + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; + } + + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); + } + + /** + * Checks if `func` is capable of being masked. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `func` is maskable, else `false`. + */ + var isMaskable = coreJsData ? isFunction : stubFalse; + + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; + } + + /** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ + function isStrictComparable(value) { + return value === value && !isObject(value); + } + + /** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; + } + + /** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ + function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; + } + + /** + * Merges the function metadata of `source` into `data`. + * + * Merging metadata reduces the number of wrappers used to invoke a function. + * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` + * may be applied regardless of execution order. Methods like `_.ary` and + * `_.rearg` modify function arguments, making the order in which they are + * executed important, preventing the merging of metadata. However, we make + * an exception for a safe combined case where curried functions have `_.ary` + * and or `_.rearg` applied. + * + * @private + * @param {Array} data The destination metadata. + * @param {Array} source The source metadata. + * @returns {Array} Returns `data`. + */ + function mergeData(data, source) { + var bitmask = data[1], + srcBitmask = source[1], + newBitmask = bitmask | srcBitmask, + isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); + + var isCombo = + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || + ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); + + // Exit early if metadata can't be merged. + if (!(isCommon || isCombo)) { + return data; + } + // Use source `thisArg` if available. + if (srcBitmask & WRAP_BIND_FLAG) { + data[2] = source[2]; + // Set when currying a bound function. + newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; + } + // Compose partial arguments. + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : value; + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; + } + // Compose partial right arguments. + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; + } + // Use source `argPos` if available. + value = source[7]; + if (value) { + data[7] = value; + } + // Use source `ary` if it's smaller. + if (srcBitmask & WRAP_ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + // Use source `arity` if one is not provided. + if (data[9] == null) { + data[9] = source[9]; + } + // Use source `func` and merge bitmasks. + data[0] = source[0]; + data[1] = newBitmask; + + return data; + } + + /** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + /** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ + function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; + } + + /** + * Gets the parent value at `path` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path to get the parent value of. + * @returns {*} Returns the parent value. + */ + function parent(object, path) { + return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); + } + + /** + * Reorder `array` according to the specified indexes where the element at + * the first index is assigned as the first element, the element at + * the second index is assigned as the second element, and so on. + * + * @private + * @param {Array} array The array to reorder. + * @param {Array} indexes The arranged array indexes. + * @returns {Array} Returns `array`. + */ + function reorder(array, indexes) { + var arrLength = array.length, + length = nativeMin(indexes.length, arrLength), + oldArray = copyArray(array); + + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; + } + return array; + } + + /** + * Gets the value at `key`, unless `key` is "__proto__" or "constructor". + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function safeGet(object, key) { + if (key === 'constructor' && typeof object[key] === 'function') { + return; + } + + if (key == '__proto__') { + return; + } + + return object[key]; + } + + /** + * Sets metadata for `func`. + * + * **Note:** If this function becomes hot, i.e. is invoked a lot in a short + * period of time, it will trip its breaker and transition to an identity + * function to avoid garbage collection pauses in V8. See + * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) + * for more details. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var setData = shortOut(baseSetData); + + /** + * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout). + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @returns {number|Object} Returns the timer id or timeout object. + */ + var setTimeout = ctxSetTimeout || function(func, wait) { + return root.setTimeout(func, wait); + }; + + /** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var setToString = shortOut(baseSetToString); + + /** + * Sets the `toString` method of `wrapper` to mimic the source of `reference` + * with wrapper details in a comment at the top of the source body. + * + * @private + * @param {Function} wrapper The function to modify. + * @param {Function} reference The reference function. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Function} Returns `wrapper`. + */ + function setWrapToString(wrapper, reference, bitmask) { + var source = (reference + ''); + return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); + } + + /** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ + function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; + } + + /** + * A specialized version of `_.shuffle` which mutates and sets the size of `array`. + * + * @private + * @param {Array} array The array to shuffle. + * @param {number} [size=array.length] The size of `array`. + * @returns {Array} Returns `array`. + */ + function shuffleSelf(array, size) { + var index = -1, + length = array.length, + lastIndex = length - 1; + + size = size === undefined ? length : size; + while (++index < size) { + var rand = baseRandom(index, lastIndex), + value = array[rand]; + + array[rand] = array[index]; + array[index] = value; + } + array.length = size; + return array; + } + + /** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ + var stringToPath = memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; + }); + + /** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ + function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; + } + + /** + * Updates wrapper `details` based on `bitmask` flags. + * + * @private + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. + */ + function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function(pair) { + var value = '_.' + pair[0]; + if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); + } + + /** + * Creates a clone of `wrapper`. + * + * @private + * @param {Object} wrapper The wrapper to clone. + * @returns {Object} Returns the cloned wrapper. + */ + function wrapperClone(wrapper) { + if (wrapper instanceof LazyWrapper) { + return wrapper.clone(); + } + var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); + result.__actions__ = copyArray(wrapper.__actions__); + result.__index__ = wrapper.__index__; + result.__values__ = wrapper.__values__; + return result; + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of elements split into groups the length of `size`. + * If `array` can't be split evenly, the final chunk will be the remaining + * elements. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the new array of chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ + function chunk(array, size, guard) { + if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { + size = 1; + } else { + size = nativeMax(toInteger(size), 0); + } + var length = array == null ? 0 : array.length; + if (!length || size < 1) { + return []; + } + var index = 0, + resIndex = 0, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[resIndex++] = baseSlice(array, index, (index += size)); + } + return result; + } + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ + function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); + } + + /** + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * **Note:** Unlike `_.pullAll`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.without, _.xor + * @example + * + * _.difference([2, 1], [2, 3]); + * // => [1] + */ + var difference = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `iteratee` which + * is invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] + * + * // The `_.property` iteratee shorthand. + * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var differenceBy = baseRest(function(array, values) { + var iteratee = last(values); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `comparator` + * which is invoked to compare elements of `array` to `values`. The order and + * references of result values are determined by the first array. The comparator + * is invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * + * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); + * // => [{ 'x': 2, 'y': 1 }] + */ + var differenceWith = baseRest(function(array, values) { + var comparator = last(values); + if (isArrayLikeObject(comparator)) { + comparator = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) + : []; + }); + + /** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function drop(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with `n` elements dropped from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function dropRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.dropRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney'] + * + * // The `_.matches` iteratee shorthand. + * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropRightWhile(users, ['active', false]); + * // => objects for ['barney'] + * + * // The `_.property` iteratee shorthand. + * _.dropRightWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), true, true) + : []; + } + + /** + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.dropWhile(users, function(o) { return !o.active; }); + * // => objects for ['pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.dropWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropWhile(users, ['active', false]); + * // => objects for ['pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.dropWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), true) + : []; + } + + /** + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. + * + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] + */ + function fill(array, value, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, getIteratee(predicate, 3), index); + } + + /** + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); + * // => 2 + * + * // The `_.matches` iteratee shorthand. + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastIndex(users, ['active', false]); + * // => 2 + * + * // The `_.property` iteratee shorthand. + * _.findLastIndex(users, 'active'); + * // => 0 + */ + function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = fromIndex < 0 + ? nativeMax(length + index, 0) + : nativeMin(index, length - 1); + } + return baseFindIndex(array, getIteratee(predicate, 3), index, true); + } + + /** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ + function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; + } + + /** + * Recursively flattens `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] + */ + function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; + } + + /** + * Recursively flatten `array` up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Array + * @param {Array} array The array to flatten. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * var array = [1, [2, [3, [4]], 5]]; + * + * _.flattenDepth(array, 1); + * // => [1, 2, [3, [4]], 5] + * + * _.flattenDepth(array, 2); + * // => [1, 2, 3, [4], 5] + */ + function flattenDepth(array, depth) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(array, depth); + } + + /** + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } + */ + function fromPairs(pairs) { + var index = -1, + length = pairs == null ? 0 : pairs.length, + result = {}; + + while (++index < length) { + var pair = pairs[index]; + result[pair[0]] = pair[1]; + } + return result; + } + + /** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined + */ + function head(array) { + return (array && array.length) ? array[0] : undefined; + } + + /** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ + function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseIndexOf(array, value, index); + } + + /** + * Gets all but the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + */ + function initial(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 0, -1) : []; + } + + /** + * Creates an array of unique values that are included in all given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersection([2, 1], [2, 3]); + * // => [2] + */ + var intersection = baseRest(function(arrays) { + var mapped = arrayMap(arrays, castArrayLikeObject); + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped) + : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `iteratee` + * which is invoked for each element of each `arrays` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [2.1] + * + * // The `_.property` iteratee shorthand. + * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }] + */ + var intersectionBy = baseRest(function(arrays) { + var iteratee = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + if (iteratee === last(mapped)) { + iteratee = undefined; + } else { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, getIteratee(iteratee, 2)) + : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `comparator` + * which is invoked to compare elements of `arrays`. The order and references + * of result values are determined by the first array. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.intersectionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }] + */ + var intersectionWith = baseRest(function(arrays) { + var comparator = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + comparator = typeof comparator == 'function' ? comparator : undefined; + if (comparator) { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, undefined, comparator) + : []; + }); + + /** + * Converts all elements in `array` into a string separated by `separator`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to convert. + * @param {string} [separator=','] The element separator. + * @returns {string} Returns the joined string. + * @example + * + * _.join(['a', 'b', 'c'], '~'); + * // => 'a~b~c' + */ + function join(array, separator) { + return array == null ? '' : nativeJoin.call(array, separator); + } + + /** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ + function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; + } + + /** + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // Search from the `fromIndex`. + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 + */ + function lastIndexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return value === value + ? strictLastIndexOf(array, value, index) + : baseFindIndex(array, baseIsNaN, index, true); + } + + /** + * Gets the element at index `n` of `array`. If `n` is negative, the nth + * element from the end is returned. + * + * @static + * @memberOf _ + * @since 4.11.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=0] The index of the element to return. + * @returns {*} Returns the nth element of `array`. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * + * _.nth(array, 1); + * // => 'b' + * + * _.nth(array, -2); + * // => 'c'; + */ + function nth(array, n) { + return (array && array.length) ? baseNth(array, toInteger(n)) : undefined; + } + + /** + * Removes all given values from `array` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` + * to remove elements from an array by predicate. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...*} [values] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pull(array, 'a', 'c'); + * console.log(array); + * // => ['b', 'b'] + */ + var pull = baseRest(pullAll); + + /** + * This method is like `_.pull` except that it accepts an array of values to remove. + * + * **Note:** Unlike `_.difference`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pullAll(array, ['a', 'c']); + * console.log(array); + * // => ['b', 'b'] + */ + function pullAll(array, values) { + return (array && array.length && values && values.length) + ? basePullAll(array, values) + : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `iteratee` which is + * invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The iteratee is invoked with one argument: (value). + * + * **Note:** Unlike `_.differenceBy`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; + * + * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); + * console.log(array); + * // => [{ 'x': 2 }] + */ + function pullAllBy(array, values, iteratee) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, getIteratee(iteratee, 2)) + : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `comparator` which + * is invoked to compare elements of `array` to `values`. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.differenceWith`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; + * + * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); + * console.log(array); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] + */ + function pullAllWith(array, values, comparator) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, undefined, comparator) + : array; + } + + /** + * Removes elements from `array` corresponding to `indexes` and returns an + * array of removed elements. + * + * **Note:** Unlike `_.at`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...(number|number[])} [indexes] The indexes of elements to remove. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * var pulled = _.pullAt(array, [1, 3]); + * + * console.log(array); + * // => ['a', 'c'] + * + * console.log(pulled); + * // => ['b', 'd'] + */ + var pullAt = flatRest(function(array, indexes) { + var length = array == null ? 0 : array.length, + result = baseAt(array, indexes); + + basePullAt(array, arrayMap(indexes, function(index) { + return isIndex(index, length) ? +index : index; + }).sort(compareAscending)); + + return result; + }); + + /** + * Removes all elements from `array` that `predicate` returns truthy for + * and returns an array of the removed elements. The predicate is invoked + * with three arguments: (value, index, array). + * + * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull` + * to pull elements from an array by value. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4]; + * var evens = _.remove(array, function(n) { + * return n % 2 == 0; + * }); + * + * console.log(array); + * // => [1, 3] + * + * console.log(evens); + * // => [2, 4] + */ + function remove(array, predicate) { + var result = []; + if (!(array && array.length)) { + return result; + } + var index = -1, + indexes = [], + length = array.length; + + predicate = getIteratee(predicate, 3); + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result.push(value); + indexes.push(index); + } + } + basePullAt(array, indexes); + return result; + } + + /** + * Reverses `array` so that the first element becomes the last, the second + * element becomes the second to last, and so on. + * + * **Note:** This method mutates `array` and is based on + * [`Array#reverse`](https://mdn.io/Array/reverse). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.reverse(array); + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function reverse(array) { + return array == null ? array : nativeReverse.call(array); + } + + /** + * Creates a slice of `array` from `start` up to, but not including, `end`. + * + * **Note:** This method is used instead of + * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are + * returned. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function slice(array, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { + start = 0; + end = length; + } + else { + start = start == null ? 0 : toInteger(start); + end = end === undefined ? length : toInteger(end); + } + return baseSlice(array, start, end); + } + + /** + * Uses a binary search to determine the lowest index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([30, 50], 40); + * // => 1 + */ + function sortedIndex(array, value) { + return baseSortedIndex(array, value); + } + + /** + * This method is like `_.sortedIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); + * // => 0 + */ + function sortedIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2)); + } + + /** + * This method is like `_.indexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedIndexOf([4, 5, 5, 5, 6], 5); + * // => 1 + */ + function sortedIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value); + if (index < length && eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.sortedIndex` except that it returns the highest + * index at which `value` should be inserted into `array` in order to + * maintain its sort order. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedLastIndex([4, 5, 5, 5, 6], 5); + * // => 4 + */ + function sortedLastIndex(array, value) { + return baseSortedIndex(array, value, true); + } + + /** + * This method is like `_.sortedLastIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 1 + * + * // The `_.property` iteratee shorthand. + * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); + * // => 1 + */ + function sortedLastIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true); + } + + /** + * This method is like `_.lastIndexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); + * // => 3 + */ + function sortedLastIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value, true) - 1; + if (eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.uniq` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniq([1, 1, 2]); + * // => [1, 2] + */ + function sortedUniq(array) { + return (array && array.length) + ? baseSortedUniq(array) + : []; + } + + /** + * This method is like `_.uniqBy` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); + * // => [1.1, 2.3] + */ + function sortedUniqBy(array, iteratee) { + return (array && array.length) + ? baseSortedUniq(array, getIteratee(iteratee, 2)) + : []; + } + + /** + * Gets all but the first element of `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.tail([1, 2, 3]); + * // => [2, 3] + */ + function tail(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 1, length) : []; + } + + /** + * Creates a slice of `array` with `n` elements taken from the beginning. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.take([1, 2, 3]); + * // => [1] + * + * _.take([1, 2, 3], 2); + * // => [1, 2] + * + * _.take([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.take([1, 2, 3], 0); + * // => [] + */ + function take(array, n, guard) { + if (!(array && array.length)) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` with `n` elements taken from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRight([1, 2, 3]); + * // => [3] + * + * _.takeRight([1, 2, 3], 2); + * // => [2, 3] + * + * _.takeRight([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.takeRight([1, 2, 3], 0); + * // => [] + */ + function takeRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with elements taken from the end. Elements are + * taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.takeRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeRightWhile(users, ['active', false]); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.takeRightWhile(users, 'active'); + * // => [] + */ + function takeRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), false, true) + : []; + } + + /** + * Creates a slice of `array` with elements taken from the beginning. Elements + * are taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.takeWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matches` iteratee shorthand. + * _.takeWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeWhile(users, ['active', false]); + * // => objects for ['barney', 'fred'] + * + * // The `_.property` iteratee shorthand. + * _.takeWhile(users, 'active'); + * // => [] + */ + function takeWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3)) + : []; + } + + /** + * Creates an array of unique values, in order, from all given arrays using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([2], [1, 2]); + * // => [2, 1] + */ + var union = baseRest(function(arrays) { + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); + }); + + /** + * This method is like `_.union` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which uniqueness is computed. Result values are chosen from the first + * array in which the value occurs. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.unionBy([2.1], [1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + var unionBy = baseRest(function(arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.union` except that it accepts `comparator` which + * is invoked to compare elements of `arrays`. Result values are chosen from + * the first array in which the value occurs. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.unionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var unionWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); + }); + + /** + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each element + * is kept. The order of result values is determined by the order they occur + * in the array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + */ + function uniq(array) { + return (array && array.length) ? baseUniq(array) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * uniqueness is computed. The order of result values is determined by the + * order they occur in the array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniqBy([2.1, 1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + function uniqBy(array, iteratee) { + return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `comparator` which + * is invoked to compare elements of `array`. The order of result values is + * determined by the order they occur in the array.The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.uniqWith(objects, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] + */ + function uniqWith(array, comparator) { + comparator = typeof comparator == 'function' ? comparator : undefined; + return (array && array.length) ? baseUniq(array, undefined, comparator) : []; + } + + /** + * This method is like `_.zip` except that it accepts an array of grouped + * elements and creates an array regrouping the elements to their pre-zip + * configuration. + * + * @static + * @memberOf _ + * @since 1.2.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + * + * _.unzip(zipped); + * // => [['a', 'b'], [1, 2], [true, false]] + */ + function unzip(array) { + if (!(array && array.length)) { + return []; + } + var length = 0; + array = arrayFilter(array, function(group) { + if (isArrayLikeObject(group)) { + length = nativeMax(group.length, length); + return true; + } + }); + return baseTimes(length, function(index) { + return arrayMap(array, baseProperty(index)); + }); + } + + /** + * This method is like `_.unzip` except that it accepts `iteratee` to specify + * how regrouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @param {Function} [iteratee=_.identity] The function to combine + * regrouped values. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip([1, 2], [10, 20], [100, 200]); + * // => [[1, 10, 100], [2, 20, 200]] + * + * _.unzipWith(zipped, _.add); + * // => [3, 30, 300] + */ + function unzipWith(array, iteratee) { + if (!(array && array.length)) { + return []; + } + var result = unzip(array); + if (iteratee == null) { + return result; + } + return arrayMap(result, function(group) { + return apply(iteratee, undefined, group); + }); + } + + /** + * Creates an array excluding all given values using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.pull`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...*} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.xor + * @example + * + * _.without([2, 1, 2, 3], 1, 2); + * // => [3] + */ + var without = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, values) + : []; + }); + + /** + * Creates an array of unique values that is the + * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) + * of the given arrays. The order of result values is determined by the order + * they occur in the arrays. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.without + * @example + * + * _.xor([2, 1], [2, 3]); + * // => [1, 3] + */ + var xor = baseRest(function(arrays) { + return baseXor(arrayFilter(arrays, isArrayLikeObject)); + }); + + /** + * This method is like `_.xor` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which by which they're compared. The order of result values is determined + * by the order they occur in the arrays. The iteratee is invoked with one + * argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2, 3.4] + * + * // The `_.property` iteratee shorthand. + * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var xorBy = baseRest(function(arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.xor` except that it accepts `comparator` which is + * invoked to compare elements of `arrays`. The order of result values is + * determined by the order they occur in the arrays. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.xorWith(objects, others, _.isEqual); + * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var xorWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator); + }); + + /** + * Creates an array of grouped elements, the first of which contains the + * first elements of the given arrays, the second of which contains the + * second elements of the given arrays, and so on. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + */ + var zip = baseRest(unzip); + + /** + * This method is like `_.fromPairs` except that it accepts two arrays, + * one of property identifiers and one of corresponding values. + * + * @static + * @memberOf _ + * @since 0.4.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } + */ + function zipObject(props, values) { + return baseZipObject(props || [], values || [], assignValue); + } + + /** + * This method is like `_.zipObject` except that it supports property paths. + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); + * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } } + */ + function zipObjectDeep(props, values) { + return baseZipObject(props || [], values || [], baseSet); + } + + /** + * This method is like `_.zip` except that it accepts `iteratee` to specify + * how grouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @param {Function} [iteratee=_.identity] The function to combine + * grouped values. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) { + * return a + b + c; + * }); + * // => [111, 222] + */ + var zipWith = baseRest(function(arrays) { + var length = arrays.length, + iteratee = length > 1 ? arrays[length - 1] : undefined; + + iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined; + return unzipWith(arrays, iteratee); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' + */ + function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; + } + + /** + * This method invokes `interceptor` and returns `value`. The interceptor + * is invoked with one argument; (value). The purpose of this method is to + * "tap into" a method chain sequence in order to modify intermediate results. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3]) + * .tap(function(array) { + * // Mutate input array. + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] + */ + function tap(value, interceptor) { + interceptor(value); + return value; + } + + /** + * This method is like `_.tap` except that it returns the result of `interceptor`. + * The purpose of this method is to "pass thru" values replacing intermediate + * results in a method chain sequence. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] + */ + function thru(value, interceptor) { + return interceptor(value); + } + + /** + * This method is the wrapper version of `_.at`. + * + * @name at + * @memberOf _ + * @since 1.0.0 + * @category Seq + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _(object).at(['a[0].b.c', 'a[1]']).value(); + * // => [3, 4] + */ + var wrapperAt = flatRest(function(paths) { + var length = paths.length, + start = length ? paths[0] : 0, + value = this.__wrapped__, + interceptor = function(object) { return baseAt(object, paths); }; + + if (length > 1 || this.__actions__.length || + !(value instanceof LazyWrapper) || !isIndex(start)) { + return this.thru(interceptor); + } + value = value.slice(start, +start + (length ? 1 : 0)); + value.__actions__.push({ + 'func': thru, + 'args': [interceptor], + 'thisArg': undefined + }); + return new LodashWrapper(value, this.__chain__).thru(function(array) { + if (length && !array.length) { + array.push(undefined); + } + return array; + }); + }); + + /** + * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. + * + * @name chain + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // A sequence without explicit chaining. + * _(users).head(); + * // => { 'user': 'barney', 'age': 36 } + * + * // A sequence with explicit chaining. + * _(users) + * .chain() + * .head() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } + */ + function wrapperChain() { + return chain(this); + } + + /** + * Executes the chain sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ + function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); + } + + /** + * Gets the next value on a wrapped object following the + * [iterator protocol](https://mdn.io/iteration_protocols#iterator). + * + * @name next + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the next iterator value. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped.next(); + * // => { 'done': false, 'value': 1 } + * + * wrapped.next(); + * // => { 'done': false, 'value': 2 } + * + * wrapped.next(); + * // => { 'done': true, 'value': undefined } + */ + function wrapperNext() { + if (this.__values__ === undefined) { + this.__values__ = toArray(this.value()); + } + var done = this.__index__ >= this.__values__.length, + value = done ? undefined : this.__values__[this.__index__++]; + + return { 'done': done, 'value': value }; + } + + /** + * Enables the wrapper to be iterable. + * + * @name Symbol.iterator + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the wrapper object. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped[Symbol.iterator]() === wrapped; + * // => true + * + * Array.from(wrapped); + * // => [1, 2] + */ + function wrapperToIterator() { + return this; + } + + /** + * Creates a clone of the chain sequence planting `value` as the wrapped value. + * + * @name plant + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @param {*} value The value to plant. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2]).map(square); + * var other = wrapped.plant([3, 4]); + * + * other.value(); + * // => [9, 16] + * + * wrapped.value(); + * // => [1, 4] + */ + function wrapperPlant(value) { + var result, + parent = this; + + while (parent instanceof baseLodash) { + var clone = wrapperClone(parent); + clone.__index__ = 0; + clone.__values__ = undefined; + if (result) { + previous.__wrapped__ = clone; + } else { + result = clone; + } + var previous = clone; + parent = parent.__wrapped__; + } + previous.__wrapped__ = value; + return result; + } + + /** + * This method is the wrapper version of `_.reverse`. + * + * **Note:** This method mutates the wrapped array. + * + * @name reverse + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2, 3]; + * + * _(array).reverse().value() + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function wrapperReverse() { + var value = this.__wrapped__; + if (value instanceof LazyWrapper) { + var wrapped = value; + if (this.__actions__.length) { + wrapped = new LazyWrapper(this); + } + wrapped = wrapped.reverse(); + wrapped.__actions__.push({ + 'func': thru, + 'args': [reverse], + 'thisArg': undefined + }); + return new LodashWrapper(wrapped, this.__chain__); + } + return this.thru(reverse); + } + + /** + * Executes the chain sequence to resolve the unwrapped value. + * + * @name value + * @memberOf _ + * @since 0.1.0 + * @alias toJSON, valueOf + * @category Seq + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] + */ + function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the number of times the key was returned by `iteratee`. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': 1, '6': 2 } + * + * // The `_.property` iteratee shorthand. + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ + var countBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + ++result[key]; + } else { + baseAssignValue(result, key, 1); + } + }); + + /** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false + */ + function every(collection, predicate, guard) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + */ + function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ + var find = createFind(findIndex); + + /** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=collection.length-1] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ + var findLast = createFind(findLastIndex); + + /** + * Creates a flattened array of values by running each element in `collection` + * thru `iteratee` and flattening the mapped results. The iteratee is invoked + * with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [n, n]; + * } + * + * _.flatMap([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMap(collection, iteratee) { + return baseFlatten(map(collection, iteratee), 1); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDeep([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMapDeep(collection, iteratee) { + return baseFlatten(map(collection, iteratee), INFINITY); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDepth([1, 2], duplicate, 2); + * // => [[1, 1], [2, 2]] + */ + function flatMapDepth(collection, iteratee, depth) { + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(map(collection, iteratee), depth); + } + + /** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @alias eachRight + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEach + * @example + * + * _.forEachRight([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `2` then `1`. + */ + function forEachRight(collection, iteratee) { + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The order of grouped values + * is determined by the order they occur in `collection`. The corresponding + * value of each key is an array of elements responsible for generating the + * key. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': [4.2], '6': [6.1, 6.3] } + * + * // The `_.property` iteratee shorthand. + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ + var groupBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + baseAssignValue(result, key, [value]); + } + }); + + /** + * Checks if `value` is in `collection`. If `collection` is a string, it's + * checked for a substring of `value`, otherwise + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * is used for equality comparisons. If `fromIndex` is negative, it's used as + * the offset from the end of `collection`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {boolean} Returns `true` if `value` is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'a': 1, 'b': 2 }, 1); + * // => true + * + * _.includes('abcd', 'bc'); + * // => true + */ + function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; + + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + return isString(collection) + ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) + : (!!length && baseIndexOf(collection, value, fromIndex) > -1); + } + + /** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke each method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invokeMap([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ + var invokeMap = baseRest(function(collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value) { + result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); + }); + return result; + }); + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the last element responsible for generating the key. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var array = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.keyBy(array, function(o) { + * return String.fromCharCode(o.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.keyBy(array, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + */ + var keyBy = createAggregator(function(result, value, key) { + baseAssignValue(result, key, value); + }); + + /** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ + function map(collection, iteratee) { + var func = isArray(collection) ? arrayMap : baseMap; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.sortBy` except that it allows specifying the sort + * orders of the iteratees to sort by. If `orders` is unspecified, all values + * are sorted in ascending order. Otherwise, specify an order of "desc" for + * descending or "asc" for ascending sort order of corresponding values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] + * The iteratees to sort by. + * @param {string[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 36 } + * ]; + * + * // Sort by `user` in ascending order and by `age` in descending order. + * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + */ + function orderBy(collection, iteratees, orders, guard) { + if (collection == null) { + return []; + } + if (!isArray(iteratees)) { + iteratees = iteratees == null ? [] : [iteratees]; + } + orders = guard ? undefined : orders; + if (!isArray(orders)) { + orders = orders == null ? [] : [orders]; + } + return baseOrderBy(collection, iteratees, orders); + } + + /** + * Creates an array of elements split into two groups, the first of which + * contains elements `predicate` returns truthy for, the second of which + * contains elements `predicate` returns falsey for. The predicate is + * invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the array of grouped elements. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true }, + * { 'user': 'pebbles', 'age': 1, 'active': false } + * ]; + * + * _.partition(users, function(o) { return o.active; }); + * // => objects for [['fred'], ['barney', 'pebbles']] + * + * // The `_.matches` iteratee shorthand. + * _.partition(users, { 'age': 1, 'active': false }); + * // => objects for [['pebbles'], ['barney', 'fred']] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.partition(users, ['active', false]); + * // => objects for [['barney', 'pebbles'], ['fred']] + * + * // The `_.property` iteratee shorthand. + * _.partition(users, 'active'); + * // => objects for [['fred'], ['barney', 'pebbles']] + */ + var partition = createAggregator(function(result, value, key) { + result[key ? 0 : 1].push(value); + }, function() { return [[], []]; }); + + /** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ + function reduce(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduce : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach); + } + + /** + * This method is like `_.reduce` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduce + * @example + * + * var array = [[0, 1], [2, 3], [4, 5]]; + * + * _.reduceRight(array, function(flattened, other) { + * return flattened.concat(other); + * }, []); + * // => [4, 5, 2, 3, 0, 1] + */ + function reduceRight(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduceRight : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight); + } + + /** + * The opposite of `_.filter`; this method returns the elements of `collection` + * that `predicate` does **not** return truthy for. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.filter + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true } + * ]; + * + * _.reject(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.reject(users, { 'age': 40, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.reject(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.reject(users, 'active'); + * // => objects for ['barney'] + */ + function reject(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, negate(getIteratee(predicate, 3))); + } + + /** + * Gets a random element from `collection`. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + */ + function sample(collection) { + var func = isArray(collection) ? arraySample : baseSample; + return func(collection); + } + + /** + * Gets `n` random elements at unique keys from `collection` up to the + * size of `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @param {number} [n=1] The number of elements to sample. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the random elements. + * @example + * + * _.sampleSize([1, 2, 3], 2); + * // => [3, 1] + * + * _.sampleSize([1, 2, 3], 4); + * // => [2, 3, 1] + */ + function sampleSize(collection, n, guard) { + if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) { + n = 1; + } else { + n = toInteger(n); + } + var func = isArray(collection) ? arraySampleSize : baseSampleSize; + return func(collection, n); + } + + /** + * Creates an array of shuffled values, using a version of the + * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + * @example + * + * _.shuffle([1, 2, 3, 4]); + * // => [4, 1, 3, 2] + */ + function shuffle(collection) { + var func = isArray(collection) ? arrayShuffle : baseShuffle; + return func(collection); + } + + /** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + if (collection == null) { + return 0; + } + if (isArrayLike(collection)) { + return isString(collection) ? stringSize(collection) : collection.length; + } + var tag = getTag(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return baseKeys(collection).length; + } + + /** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * Iteration is stopped once `predicate` returns truthy. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.some(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.some(users, 'active'); + * // => true + */ + function some(collection, predicate, guard) { + var func = isArray(collection) ? arraySome : baseSome; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] + */ + var sortBy = baseRest(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ + var now = ctxNow || function() { + return root.Date.now(); + }; + + /*------------------------------------------------------------------------*/ + + /** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it's called `n` or more times. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => Logs 'done saving!' after the two async saves have completed. + */ + function after(n, func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; + } + + /** + * Creates a function that invokes `func`, with up to `n` arguments, + * ignoring any additional arguments. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ + function ary(func, n, guard) { + n = guard ? undefined : n; + n = (func && n == null) ? func.length : n; + return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); + } + + /** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. + */ + function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; + } + + /** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and `partials` prepended to the arguments it receives. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ + var bind = baseRest(function(func, thisArg, partials) { + var bitmask = WRAP_BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bind)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(func, bitmask, thisArg, partials, holders); + }); + + /** + * Creates a function that invokes the method at `object[key]` with `partials` + * prepended to the arguments it receives. + * + * This method differs from `_.bind` by allowing bound functions to reference + * methods that may be redefined or don't yet exist. See + * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Function + * @param {Object} object The object to invoke the method on. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; + * + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // Bound with placeholders. + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' + */ + var bindKey = baseRest(function(object, key, partials) { + var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bindKey)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(key, bitmask, object, partials, holders); + }); + + /** + * Creates a function that accepts arguments of `func` and either invokes + * `func` returning its result, if at least `arity` number of arguments have + * been provided, or returns a function that accepts the remaining `func` + * arguments, and so on. The arity of `func` may be specified if `func.length` + * is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(1)(_, 3)(2); + * // => [1, 2, 3] + */ + function curry(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curry.placeholder; + return result; + } + + /** + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curryRight(abc); + * + * curried(3)(2)(1); + * // => [1, 2, 3] + * + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(3)(1, _)(2); + * // => [1, 2, 3] + */ + function curryRight(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curryRight.placeholder; + return result; + } + + /** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ + function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + timeWaiting = wait - timeSinceLastCall; + + return maxing + ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) + : timeWaiting; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + clearTimeout(timerId); + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; + } + + /** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. + */ + var defer = baseRest(function(func, args) { + return baseDelay(func, 1, args); + }); + + /** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. + */ + var delay = baseRest(function(func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); + }); + + /** + * Creates a function that invokes `func` with arguments reversed. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to flip arguments for. + * @returns {Function} Returns the new flipped function. + * @example + * + * var flipped = _.flip(function() { + * return _.toArray(arguments); + * }); + * + * flipped('a', 'b', 'c', 'd'); + * // => ['d', 'c', 'b', 'a'] + */ + function flip(func) { + return createWrap(func, WRAP_FLIP_FLAG); + } + + /** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ + function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; + } + + // Expose `MapCache`. + memoize.Cache = MapCache; + + /** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new negated function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ + function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function() { + var args = arguments; + switch (args.length) { + case 0: return !predicate.call(this); + case 1: return !predicate.call(this, args[0]); + case 2: return !predicate.call(this, args[0], args[1]); + case 3: return !predicate.call(this, args[0], args[1], args[2]); + } + return !predicate.apply(this, args); + }; + } + + /** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first invocation. The `func` is + * invoked with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // => `createApplication` is invoked once + */ + function once(func) { + return before(2, func); + } + + /** + * Creates a function that invokes `func` with its arguments transformed. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Function + * @param {Function} func The function to wrap. + * @param {...(Function|Function[])} [transforms=[_.identity]] + * The argument transforms. + * @returns {Function} Returns the new function. + * @example + * + * function doubled(n) { + * return n * 2; + * } + * + * function square(n) { + * return n * n; + * } + * + * var func = _.overArgs(function(x, y) { + * return [x, y]; + * }, [square, doubled]); + * + * func(9, 3); + * // => [81, 6] + * + * func(10, 5); + * // => [100, 10] + */ + var overArgs = castRest(function(func, transforms) { + transforms = (transforms.length == 1 && isArray(transforms[0])) + ? arrayMap(transforms[0], baseUnary(getIteratee())) + : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); + + var funcsLength = transforms.length; + return baseRest(function(args) { + var index = -1, + length = nativeMin(args.length, funcsLength); + + while (++index < length) { + args[index] = transforms[index].call(this, args[index]); + } + return apply(func, this, args); + }); + }); + + /** + * Creates a function that invokes `func` with `partials` prepended to the + * arguments it receives. This method is like `_.bind` except it does **not** + * alter the `this` binding. + * + * The `_.partial.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 0.2.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var sayHelloTo = _.partial(greet, 'hello'); + * sayHelloTo('fred'); + * // => 'hello fred' + * + * // Partially applied with placeholders. + * var greetFred = _.partial(greet, _, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + */ + var partial = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partial)); + return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); + }); + + /** + * This method is like `_.partial` except that partially applied arguments + * are appended to the arguments it receives. + * + * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var greetFred = _.partialRight(greet, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + * + * // Partially applied with placeholders. + * var sayHelloTo = _.partialRight(greet, 'hello', _); + * sayHelloTo('fred'); + * // => 'hello fred' + */ + var partialRight = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partialRight)); + return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); + }); + + /** + * Creates a function that invokes `func` with arguments arranged according + * to the specified `indexes` where the argument value at the first index is + * provided as the first argument, the argument value at the second index is + * provided as the second argument, and so on. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to rearrange arguments for. + * @param {...(number|number[])} indexes The arranged argument indexes. + * @returns {Function} Returns the new function. + * @example + * + * var rearged = _.rearg(function(a, b, c) { + * return [a, b, c]; + * }, [2, 0, 1]); + * + * rearged('b', 'c', 'a') + * // => ['a', 'b', 'c'] + */ + var rearg = flatRest(function(func, indexes) { + return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); + }); + + /** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as + * an array. + * + * **Note:** This method is based on the + * [rest parameter](https://mdn.io/rest_parameters). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.rest(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ + function rest(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start === undefined ? start : toInteger(start); + return baseRest(func, start); + } + + /** + * Creates a function that invokes `func` with the `this` binding of the + * create function and an array of arguments much like + * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). + * + * **Note:** This method is based on the + * [spread operator](https://mdn.io/spread_operator). + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Function + * @param {Function} func The function to spread arguments over. + * @param {number} [start=0] The start position of the spread. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.spread(function(who, what) { + * return who + ' says ' + what; + * }); + * + * say(['fred', 'hello']); + * // => 'fred says hello' + * + * var numbers = Promise.all([ + * Promise.resolve(40), + * Promise.resolve(36) + * ]); + * + * numbers.then(_.spread(function(x, y) { + * return x + y; + * })); + * // => a Promise of 76 + */ + function spread(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start == null ? 0 : nativeMax(toInteger(start), 0); + return baseRest(function(args) { + var array = args[start], + otherArgs = castSlice(args, 0, start); + + if (array) { + arrayPush(otherArgs, array); + } + return apply(func, this, otherArgs); + }); + } + + /** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed `func` invocations and a `flush` method to + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` + * timeout. The `func` is invoked with the last arguments provided to the + * throttled function. Subsequent calls to the throttled function return the + * result of the last `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the throttled function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=true] + * Specify invoking on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // Avoid excessively updating the position while scrolling. + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. + * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); + * jQuery(element).on('click', throttled); + * + * // Cancel the trailing throttled invocation. + * jQuery(window).on('popstate', throttled.cancel); + */ + function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { + 'leading': leading, + 'maxWait': wait, + 'trailing': trailing + }); + } + + /** + * Creates a function that accepts up to one argument, ignoring any + * additional arguments. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.unary(parseInt)); + * // => [6, 8, 10] + */ + function unary(func) { + return ary(func, 1); + } + + /** + * Creates a function that provides `value` to `wrapper` as its first + * argument. Any additional arguments provided to the function are appended + * to those provided to the `wrapper`. The wrapper is invoked with the `this` + * binding of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {*} value The value to wrap. + * @param {Function} [wrapper=identity] The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '

' + func(text) + '

'; + * }); + * + * p('fred, barney, & pebbles'); + * // => '

fred, barney, & pebbles

' + */ + function wrap(value, wrapper) { + return partial(castFunction(wrapper), value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Casts `value` as an array if it's not one. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Lang + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast array. + * @example + * + * _.castArray(1); + * // => [1] + * + * _.castArray({ 'a': 1 }); + * // => [{ 'a': 1 }] + * + * _.castArray('abc'); + * // => ['abc'] + * + * _.castArray(null); + * // => [null] + * + * _.castArray(undefined); + * // => [undefined] + * + * _.castArray(); + * // => [] + * + * var array = [1, 2, 3]; + * console.log(_.castArray(array) === array); + * // => true + */ + function castArray() { + if (!arguments.length) { + return []; + } + var value = arguments[0]; + return isArray(value) ? value : [value]; + } + + /** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ + function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); + } + + /** + * This method is like `_.clone` except that it accepts `customizer` which + * is invoked to produce the cloned value. If `customizer` returns `undefined`, + * cloning is handled by the method instead. The `customizer` is invoked with + * up to four arguments; (value [, index|key, object, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the cloned value. + * @see _.cloneDeepWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(false); + * } + * } + * + * var el = _.cloneWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 0 + */ + function cloneWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ + function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); + } + + /** + * This method is like `_.cloneWith` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the deep cloned value. + * @see _.cloneWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(true); + * } + * } + * + * var el = _.cloneDeepWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 20 + */ + function cloneDeepWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * Checks if `object` conforms to `source` by invoking the predicate + * properties of `source` with the corresponding property values of `object`. + * + * **Note:** This method is equivalent to `_.conforms` when `source` is + * partially applied. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false + */ + function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); + } + + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + /** + * Checks if `value` is greater than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + * @see _.lt + * @example + * + * _.gt(3, 1); + * // => true + * + * _.gt(3, 3); + * // => false + * + * _.gt(1, 3); + * // => false + */ + var gt = createRelationalOperation(baseGt); + + /** + * Checks if `value` is greater than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than or equal to + * `other`, else `false`. + * @see _.lte + * @example + * + * _.gte(3, 1); + * // => true + * + * _.gte(3, 3); + * // => true + * + * _.gte(1, 3); + * // => false + */ + var gte = createRelationalOperation(function(value, other) { + return value >= other; + }); + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); + }; + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + /** + * Checks if `value` is classified as an `ArrayBuffer` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + * @example + * + * _.isArrayBuffer(new ArrayBuffer(2)); + * // => true + * + * _.isArrayBuffer(new Array(2)); + * // => false + */ + var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + + /** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return value === true || value === false || + (isObjectLike(value) && baseGetTag(value) == boolTag); + } + + /** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ + var isBuffer = nativeIsBuffer || stubFalse; + + /** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ + var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; + + /** + * Checks if `value` is likely a DOM element. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + * + * _.isElement(''); + * // => false + */ + function isElement(value) { + return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); + } + + /** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ + function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && + (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || + isBuffer(value) || isTypedArray(value) || isArguments(value))) { + return !value.length; + } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; + } + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ + function isEqual(value, other) { + return baseIsEqual(value, other); + } + + /** + * This method is like `_.isEqual` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with up to + * six arguments: (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ + function isEqualWith(value, other, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; + } + + /** + * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, + * `SyntaxError`, `TypeError`, or `URIError` object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. + * @example + * + * _.isError(new Error); + * // => true + * + * _.isError(Error); + * // => false + */ + function isError(value) { + if (!isObjectLike(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == errorTag || tag == domExcTag || + (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); + } + + /** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on + * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(3); + * // => true + * + * _.isFinite(Number.MIN_VALUE); + * // => true + * + * _.isFinite(Infinity); + * // => false + * + * _.isFinite('3'); + * // => false + */ + function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + + /** + * Checks if `value` is an integer. + * + * **Note:** This method is based on + * [`Number.isInteger`](https://mdn.io/Number/isInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an integer, else `false`. + * @example + * + * _.isInteger(3); + * // => true + * + * _.isInteger(Number.MIN_VALUE); + * // => false + * + * _.isInteger(Infinity); + * // => false + * + * _.isInteger('3'); + * // => false + */ + function isInteger(value) { + return typeof value == 'number' && value == toInteger(value); + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + /** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ + var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; + + /** + * Performs a partial deep comparison between `object` and `source` to + * determine if `object` contains equivalent property values. + * + * **Note:** This method is equivalent to `_.matches` when `source` is + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.isMatch(object, { 'b': 2 }); + * // => true + * + * _.isMatch(object, { 'b': 1 }); + * // => false + */ + function isMatch(object, source) { + return object === source || baseIsMatch(object, source, getMatchData(source)); + } + + /** + * This method is like `_.isMatch` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with five + * arguments: (objValue, srcValue, index|key, object, source). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, srcValue) { + * if (isGreeting(objValue) && isGreeting(srcValue)) { + * return true; + * } + * } + * + * var object = { 'greeting': 'hello' }; + * var source = { 'greeting': 'hi' }; + * + * _.isMatchWith(object, source, customizer); + * // => true + */ + function isMatchWith(object, source, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseIsMatch(object, source, getMatchData(source), customizer); + } + + /** + * Checks if `value` is `NaN`. + * + * **Note:** This method is based on + * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as + * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for + * `undefined` and other non-number values. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some + // ActiveX objects in IE. + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is a pristine native function. + * + * **Note:** This method can't reliably detect native functions in the presence + * of the core-js package because core-js circumvents this kind of detection. + * Despite multiple requests, the core-js maintainer has made it clear: any + * attempt to fix the detection will be obstructed. As a result, we're left + * with little choice but to throw an error. Unfortunately, this also affects + * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on core-js. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (isMaskable(value)) { + throw new Error(CORE_ERROR_TEXT); + } + return baseIsNative(value); + } + + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ + function isNull(value) { + return value === null; + } + + /** + * Checks if `value` is `null` or `undefined`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is nullish, else `false`. + * @example + * + * _.isNil(null); + * // => true + * + * _.isNil(void 0); + * // => true + * + * _.isNil(NaN); + * // => false + */ + function isNil(value) { + return value == null; + } + + /** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @example + * + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false + */ + function isNumber(value) { + return typeof value == 'number' || + (isObjectLike(value) && baseGetTag(value) == numberTag); + } + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; + } + + /** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ + var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; + + /** + * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 + * double precision number which isn't the result of a rounded unsafe integer. + * + * **Note:** This method is based on + * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. + * @example + * + * _.isSafeInteger(3); + * // => true + * + * _.isSafeInteger(Number.MIN_VALUE); + * // => false + * + * _.isSafeInteger(Infinity); + * // => false + * + * _.isSafeInteger('3'); + * // => false + */ + function isSafeInteger(value) { + return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ + var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; + + /** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ + function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); + } + + /** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ + function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && baseGetTag(value) == symbolTag); + } + + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + + /** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ + function isUndefined(value) { + return value === undefined; + } + + /** + * Checks if `value` is classified as a `WeakMap` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. + * @example + * + * _.isWeakMap(new WeakMap); + * // => true + * + * _.isWeakMap(new Map); + * // => false + */ + function isWeakMap(value) { + return isObjectLike(value) && getTag(value) == weakMapTag; + } + + /** + * Checks if `value` is classified as a `WeakSet` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. + * @example + * + * _.isWeakSet(new WeakSet); + * // => true + * + * _.isWeakSet(new Set); + * // => false + */ + function isWeakSet(value) { + return isObjectLike(value) && baseGetTag(value) == weakSetTag; + } + + /** + * Checks if `value` is less than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + * @see _.gt + * @example + * + * _.lt(1, 3); + * // => true + * + * _.lt(3, 3); + * // => false + * + * _.lt(3, 1); + * // => false + */ + var lt = createRelationalOperation(baseLt); + + /** + * Checks if `value` is less than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than or equal to + * `other`, else `false`. + * @see _.gte + * @example + * + * _.lte(1, 3); + * // => true + * + * _.lte(3, 3); + * // => true + * + * _.lte(3, 1); + * // => false + */ + var lte = createRelationalOperation(function(value, other) { + return value <= other; + }); + + /** + * Converts `value` to an array. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Array} Returns the converted array. + * @example + * + * _.toArray({ 'a': 1, 'b': 2 }); + * // => [1, 2] + * + * _.toArray('abc'); + * // => ['a', 'b', 'c'] + * + * _.toArray(1); + * // => [] + * + * _.toArray(null); + * // => [] + */ + function toArray(value) { + if (!value) { + return []; + } + if (isArrayLike(value)) { + return isString(value) ? stringToArray(value) : copyArray(value); + } + if (symIterator && value[symIterator]) { + return iteratorToArray(value[symIterator]()); + } + var tag = getTag(value), + func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values); + + return func(value); + } + + /** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ + function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; + } + return value === value ? value : 0; + } + + /** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ + function toInteger(value) { + var result = toFinite(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; + } + + /** + * Converts `value` to an integer suitable for use as the length of an + * array-like object. + * + * **Note:** This method is based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toLength(3.2); + * // => 3 + * + * _.toLength(Number.MIN_VALUE); + * // => 0 + * + * _.toLength(Infinity); + * // => 4294967295 + * + * _.toLength('3.2'); + * // => 3 + */ + function toLength(value) { + return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0; + } + + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ + function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); + } + + /** + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ + function toPlainObject(value) { + return copyObject(value, keysIn(value)); + } + + /** + * Converts `value` to a safe integer. A safe integer can be compared and + * represented correctly. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toSafeInteger(3.2); + * // => 3 + * + * _.toSafeInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toSafeInteger(Infinity); + * // => 9007199254740991 + * + * _.toSafeInteger('3.2'); + * // => 3 + */ + function toSafeInteger(value) { + return value + ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) + : (value === 0 ? value : 0); + } + + /** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + function toString(value) { + return value == null ? '' : baseToString(value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ + var assign = createAssigner(function(object, source) { + if (isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); + } + } + }); + + /** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assign + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + */ + var assignIn = createAssigner(function(object, source) { + copyObject(source, keysIn(source), object); + }); + + /** + * This method is like `_.assignIn` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extendWith + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignInWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); + }); + + /** + * This method is like `_.assign` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignInWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keys(source), object, customizer); + }); + + /** + * Creates an array of values corresponding to `paths` of `object`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Array} Returns the picked values. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _.at(object, ['a[0].b.c', 'a[1]']); + * // => [3, 4] + */ + var at = flatRest(baseAt); + + /** + * Creates an object that inherits from the `prototype` object. If a + * `properties` object is given, its own enumerable string keyed properties + * are assigned to the created object. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties) { + var result = baseCreate(prototype); + return properties == null ? result : baseAssign(result, properties); + } + + /** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var defaults = baseRest(function(object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if (value === undefined || + (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } + } + + return object; + }); + + /** + * This method is like `_.defaults` except that it recursively assigns + * default properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaults + * @example + * + * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); + * // => { 'a': { 'b': 2, 'c': 3 } } + */ + var defaultsDeep = baseRest(function(args) { + args.push(undefined, customDefaultsMerge); + return apply(mergeWith, undefined, args); + }); + + /** + * This method is like `_.find` except that it returns the key of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findKey(users, function(o) { return o.age < 40; }); + * // => 'barney' (iteration order is not guaranteed) + * + * // The `_.matches` iteratee shorthand. + * _.findKey(users, { 'age': 1, 'active': true }); + * // => 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findKey(users, 'active'); + * // => 'barney' + */ + function findKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwn); + } + + /** + * This method is like `_.findKey` except that it iterates over elements of + * a collection in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findLastKey(users, function(o) { return o.age < 40; }); + * // => returns 'pebbles' assuming `_.findKey` returns 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.findLastKey(users, { 'age': 36, 'active': true }); + * // => 'barney' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findLastKey(users, 'active'); + * // => 'pebbles' + */ + function findLastKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight); + } + + /** + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + */ + function forIn(object, iteratee) { + return object == null + ? object + : baseFor(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * This method is like `_.forIn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forIn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forInRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. + */ + function forInRight(object, iteratee) { + return object == null + ? object + : baseForRight(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forOwn(object, iteratee) { + return object && baseForOwn(object, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forOwn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwnRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. + */ + function forOwnRight(object, iteratee) { + return object && baseForOwnRight(object, getIteratee(iteratee, 3)); + } + + /** + * Creates an array of function property names from own enumerable properties + * of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functionsIn + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functions(new Foo); + * // => ['a', 'b'] + */ + function functions(object) { + return object == null ? [] : baseFunctions(object, keys(object)); + } + + /** + * Creates an array of function property names from own and inherited + * enumerable properties of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functions + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functionsIn(new Foo); + * // => ['a', 'b', 'c'] + */ + function functionsIn(object) { + return object == null ? [] : baseFunctions(object, keysIn(object)); + } + + /** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ + function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; + } + + /** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ + function has(object, path) { + return object != null && hasPath(object, path, baseHas); + } + + /** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ + function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); + } + + /** + * Creates an object composed of the inverted keys and values of `object`. + * If `object` contains duplicate values, subsequent values overwrite + * property assignments of previous values. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Object + * @param {Object} object The object to invert. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invert(object); + * // => { '1': 'c', '2': 'b' } + */ + var invert = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + result[value] = key; + }, constant(identity)); + + /** + * This method is like `_.invert` except that the inverted object is generated + * from the results of running each element of `object` thru `iteratee`. The + * corresponding inverted value of each inverted key is an array of keys + * responsible for generating the inverted value. The iteratee is invoked + * with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Object + * @param {Object} object The object to invert. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invertBy(object); + * // => { '1': ['a', 'c'], '2': ['b'] } + * + * _.invertBy(object, function(value) { + * return 'group' + value; + * }); + * // => { 'group1': ['a', 'c'], 'group2': ['b'] } + */ + var invertBy = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + }, getIteratee); + + /** + * Invokes the method at `path` of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + * @example + * + * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; + * + * _.invoke(object, 'a[0].b.c.slice', 1, 3); + * // => [2, 3] + */ + var invoke = baseRest(baseInvoke); + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); + } + + /** + * The opposite of `_.mapValues`; this method creates an object with the + * same values as `object` and keys generated by running each own enumerable + * string keyed property of `object` thru `iteratee`. The iteratee is invoked + * with three arguments: (value, key, object). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapValues + * @example + * + * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { + * return key + value; + * }); + * // => { 'a1': 1, 'b2': 2 } + */ + function mapKeys(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function(value, key, object) { + baseAssignValue(result, iteratee(value, key, object), value); + }); + return result; + } + + /** + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, key, object). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ + function mapValues(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function(value, key, object) { + baseAssignValue(result, key, iteratee(value, key, object)); + }); + return result; + } + + /** + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + */ + var merge = createAssigner(function(object, source, srcIndex) { + baseMerge(object, source, srcIndex); + }); + + /** + * This method is like `_.merge` except that it accepts `customizer` which + * is invoked to produce the merged values of the destination and source + * properties. If `customizer` returns `undefined`, merging is handled by the + * method instead. The `customizer` is invoked with six arguments: + * (objValue, srcValue, key, object, source, stack). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * function customizer(objValue, srcValue) { + * if (_.isArray(objValue)) { + * return objValue.concat(srcValue); + * } + * } + * + * var object = { 'a': [1], 'b': [2] }; + * var other = { 'a': [3], 'b': [4] }; + * + * _.mergeWith(object, other, customizer); + * // => { 'a': [1, 3], 'b': [2, 4] } + */ + var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { + baseMerge(object, source, srcIndex, customizer); + }); + + /** + * The opposite of `_.pick`; this method creates an object composed of the + * own and inherited enumerable property paths of `object` that are not omitted. + * + * **Note:** This method is considerably slower than `_.pick`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to omit. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omit(object, ['a', 'c']); + * // => { 'b': '2' } + */ + var omit = flatRest(function(object, paths) { + var result = {}; + if (object == null) { + return result; + } + var isDeep = false; + paths = arrayMap(paths, function(path) { + path = castPath(path, object); + isDeep || (isDeep = path.length > 1); + return path; + }); + copyObject(object, getAllKeysIn(object), result); + if (isDeep) { + result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone); + } + var length = paths.length; + while (length--) { + baseUnset(result, paths[length]); + } + return result; + }); + + /** + * The opposite of `_.pickBy`; this method creates an object composed of + * the own and inherited enumerable string keyed properties of `object` that + * `predicate` doesn't return truthy for. The predicate is invoked with two + * arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omitBy(object, _.isNumber); + * // => { 'b': '2' } + */ + function omitBy(object, predicate) { + return pickBy(object, negate(getIteratee(predicate))); + } + + /** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ + var pick = flatRest(function(object, paths) { + return object == null ? {} : basePick(object, paths); + }); + + /** + * Creates an object composed of the `object` properties `predicate` returns + * truthy for. The predicate is invoked with two arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pickBy(object, _.isNumber); + * // => { 'a': 1, 'c': 3 } + */ + function pickBy(object, predicate) { + if (object == null) { + return {}; + } + var props = arrayMap(getAllKeysIn(object), function(prop) { + return [prop]; + }); + predicate = getIteratee(predicate); + return basePickBy(object, props, function(value, path) { + return predicate(value, path[0]); + }); + } + + /** + * This method is like `_.get` except that if the resolved value is a + * function it's invoked with the `this` binding of its parent object and + * its result is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to resolve. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; + * + * _.result(object, 'a[0].b.c1'); + * // => 3 + * + * _.result(object, 'a[0].b.c2'); + * // => 4 + * + * _.result(object, 'a[0].b.c3', 'default'); + * // => 'default' + * + * _.result(object, 'a[0].b.c3', _.constant('default')); + * // => 'default' + */ + function result(object, path, defaultValue) { + path = castPath(path, object); + + var index = -1, + length = path.length; + + // Ensure the loop is entered when path is empty. + if (!length) { + length = 1; + object = undefined; + } + while (++index < length) { + var value = object == null ? undefined : object[toKey(path[index])]; + if (value === undefined) { + index = length; + value = defaultValue; + } + object = isFunction(value) ? value.call(object) : value; + } + return object; + } + + /** + * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, + * it's created. Arrays are created for missing index properties while objects + * are created for all other missing properties. Use `_.setWith` to customize + * `path` creation. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, ['x', '0', 'y', 'z'], 5); + * console.log(object.x[0].y.z); + * // => 5 + */ + function set(object, path, value) { + return object == null ? object : baseSet(object, path, value); + } + + /** + * This method is like `_.set` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.setWith(object, '[0][1]', 'a', Object); + * // => { '0': { '1': 'a' } } + */ + function setWith(object, path, value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseSet(object, path, value, customizer); + } + + /** + * Creates an array of own enumerable string keyed-value pairs for `object` + * which can be consumed by `_.fromPairs`. If `object` is a map or set, its + * entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entries + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairs(new Foo); + * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) + */ + var toPairs = createToPairs(keys); + + /** + * Creates an array of own and inherited enumerable string keyed-value pairs + * for `object` which can be consumed by `_.fromPairs`. If `object` is a map + * or set, its entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entriesIn + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairsIn(new Foo); + * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) + */ + var toPairsIn = createToPairs(keysIn); + + /** + * An alternative to `_.reduce`; this method transforms `object` to a new + * `accumulator` object which is the result of running each of its own + * enumerable string keyed properties thru `iteratee`, with each invocation + * potentially mutating the `accumulator` object. If `accumulator` is not + * provided, a new object with the same `[[Prototype]]` will be used. The + * iteratee is invoked with four arguments: (accumulator, value, key, object). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @returns {*} Returns the accumulated value. + * @example + * + * _.transform([2, 3, 4], function(result, n) { + * result.push(n *= n); + * return n % 2 == 0; + * }, []); + * // => [4, 9] + * + * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } + */ + function transform(object, iteratee, accumulator) { + var isArr = isArray(object), + isArrLike = isArr || isBuffer(object) || isTypedArray(object); + + iteratee = getIteratee(iteratee, 4); + if (accumulator == null) { + var Ctor = object && object.constructor; + if (isArrLike) { + accumulator = isArr ? new Ctor : []; + } + else if (isObject(object)) { + accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; + } + else { + accumulator = {}; + } + } + (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) { + return iteratee(accumulator, value, index, object); + }); + return accumulator; + } + + /** + * Removes the property at `path` of `object`. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 7 } }] }; + * _.unset(object, 'a[0].b.c'); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + * + * _.unset(object, ['a', '0', 'b', 'c']); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + */ + function unset(object, path) { + return object == null ? true : baseUnset(object, path); + } + + /** + * This method is like `_.set` except that accepts `updater` to produce the + * value to set. Use `_.updateWith` to customize `path` creation. The `updater` + * is invoked with one argument: (value). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.update(object, 'a[0].b.c', function(n) { return n * n; }); + * console.log(object.a[0].b.c); + * // => 9 + * + * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; }); + * console.log(object.x[0].y.z); + * // => 0 + */ + function update(object, path, updater) { + return object == null ? object : baseUpdate(object, path, castFunction(updater)); + } + + /** + * This method is like `_.update` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.updateWith(object, '[0][1]', _.constant('a'), Object); + * // => { '0': { '1': 'a' } } + */ + function updateWith(object, path, updater, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer); + } + + /** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ + function values(object) { + return object == null ? [] : baseValues(object, keys(object)); + } + + /** + * Creates an array of the own and inherited enumerable string keyed property + * values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.valuesIn(new Foo); + * // => [1, 2, 3] (iteration order is not guaranteed) + */ + function valuesIn(object) { + return object == null ? [] : baseValues(object, keysIn(object)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Clamps `number` within the inclusive `lower` and `upper` bounds. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Number + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + * @example + * + * _.clamp(-10, -5, 5); + * // => -5 + * + * _.clamp(10, -5, 5); + * // => 5 + */ + function clamp(number, lower, upper) { + if (upper === undefined) { + upper = lower; + lower = undefined; + } + if (upper !== undefined) { + upper = toNumber(upper); + upper = upper === upper ? upper : 0; + } + if (lower !== undefined) { + lower = toNumber(lower); + lower = lower === lower ? lower : 0; + } + return baseClamp(toNumber(number), lower, upper); + } + + /** + * Checks if `n` is between `start` and up to, but not including, `end`. If + * `end` is not specified, it's set to `start` with `start` then set to `0`. + * If `start` is greater than `end` the params are swapped to support + * negative ranges. + * + * @static + * @memberOf _ + * @since 3.3.0 + * @category Number + * @param {number} number The number to check. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + * @see _.range, _.rangeRight + * @example + * + * _.inRange(3, 2, 4); + * // => true + * + * _.inRange(4, 8); + * // => true + * + * _.inRange(4, 2); + * // => false + * + * _.inRange(2, 2); + * // => false + * + * _.inRange(1.2, 2); + * // => true + * + * _.inRange(5.2, 4); + * // => false + * + * _.inRange(-3, -2, -6); + * // => true + */ + function inRange(number, start, end) { + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + number = toNumber(number); + return baseInRange(number, start, end); + } + + /** + * Produces a random number between the inclusive `lower` and `upper` bounds. + * If only one argument is provided a number between `0` and the given number + * is returned. If `floating` is `true`, or either `lower` or `upper` are + * floats, a floating-point number is returned instead of an integer. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Number + * @param {number} [lower=0] The lower bound. + * @param {number} [upper=1] The upper bound. + * @param {boolean} [floating] Specify returning a floating-point number. + * @returns {number} Returns the random number. + * @example + * + * _.random(0, 5); + * // => an integer between 0 and 5 + * + * _.random(5); + * // => also an integer between 0 and 5 + * + * _.random(5, true); + * // => a floating-point number between 0 and 5 + * + * _.random(1.2, 5.2); + * // => a floating-point number between 1.2 and 5.2 + */ + function random(lower, upper, floating) { + if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) { + upper = floating = undefined; + } + if (floating === undefined) { + if (typeof upper == 'boolean') { + floating = upper; + upper = undefined; + } + else if (typeof lower == 'boolean') { + floating = lower; + lower = undefined; + } + } + if (lower === undefined && upper === undefined) { + lower = 0; + upper = 1; + } + else { + lower = toFinite(lower); + if (upper === undefined) { + upper = lower; + lower = 0; + } else { + upper = toFinite(upper); + } + } + if (lower > upper) { + var temp = lower; + lower = upper; + upper = temp; + } + if (floating || lower % 1 || upper % 1) { + var rand = nativeRandom(); + return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper); + } + return baseRandom(lower, upper); + } + + /*------------------------------------------------------------------------*/ + + /** + * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the camel cased string. + * @example + * + * _.camelCase('Foo Bar'); + * // => 'fooBar' + * + * _.camelCase('--foo-bar--'); + * // => 'fooBar' + * + * _.camelCase('__FOO_BAR__'); + * // => 'fooBar' + */ + var camelCase = createCompounder(function(result, word, index) { + word = word.toLowerCase(); + return result + (index ? capitalize(word) : word); + }); + + /** + * Converts the first character of `string` to upper case and the remaining + * to lower case. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. + * @example + * + * _.capitalize('FRED'); + * // => 'Fred' + */ + function capitalize(string) { + return upperFirst(toString(string).toLowerCase()); + } + + /** + * Deburrs `string` by converting + * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) + * letters to basic Latin letters and removing + * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to deburr. + * @returns {string} Returns the deburred string. + * @example + * + * _.deburr('déjà vu'); + * // => 'deja vu' + */ + function deburr(string) { + string = toString(string); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); + } + + /** + * Checks if `string` ends with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=string.length] The position to search up to. + * @returns {boolean} Returns `true` if `string` ends with `target`, + * else `false`. + * @example + * + * _.endsWith('abc', 'c'); + * // => true + * + * _.endsWith('abc', 'b'); + * // => false + * + * _.endsWith('abc', 'b', 2); + * // => true + */ + function endsWith(string, target, position) { + string = toString(string); + target = baseToString(target); + + var length = string.length; + position = position === undefined + ? length + : baseClamp(toInteger(position), 0, length); + + var end = position; + position -= target.length; + return position >= 0 && string.slice(position, end) == target; + } + + /** + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional + * characters use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. See + * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * When working with HTML you should always + * [quote attribute values](http://wonko.com/post/html-escaping) to reduce + * XSS vectors. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function escape(string) { + string = toString(string); + return (string && reHasUnescapedHtml.test(string)) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; + } + + /** + * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", + * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escapeRegExp('[lodash](https://lodash.com/)'); + * // => '\[lodash\]\(https://lodash\.com/\)' + */ + function escapeRegExp(string) { + string = toString(string); + return (string && reHasRegExpChar.test(string)) + ? string.replace(reRegExpChar, '\\$&') + : string; + } + + /** + * Converts `string` to + * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the kebab cased string. + * @example + * + * _.kebabCase('Foo Bar'); + * // => 'foo-bar' + * + * _.kebabCase('fooBar'); + * // => 'foo-bar' + * + * _.kebabCase('__FOO_BAR__'); + * // => 'foo-bar' + */ + var kebabCase = createCompounder(function(result, word, index) { + return result + (index ? '-' : '') + word.toLowerCase(); + }); + + /** + * Converts `string`, as space separated words, to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the lower cased string. + * @example + * + * _.lowerCase('--Foo-Bar--'); + * // => 'foo bar' + * + * _.lowerCase('fooBar'); + * // => 'foo bar' + * + * _.lowerCase('__FOO_BAR__'); + * // => 'foo bar' + */ + var lowerCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + word.toLowerCase(); + }); + + /** + * Converts the first character of `string` to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.lowerFirst('Fred'); + * // => 'fred' + * + * _.lowerFirst('FRED'); + * // => 'fRED' + */ + var lowerFirst = createCaseFirst('toLowerCase'); + + /** + * Pads `string` on the left and right sides if it's shorter than `length`. + * Padding characters are truncated if they can't be evenly divided by `length`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.pad('abc', 8); + * // => ' abc ' + * + * _.pad('abc', 8, '_-'); + * // => '_-abc_-_' + * + * _.pad('abc', 3); + * // => 'abc' + */ + function pad(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + if (!length || strLength >= length) { + return string; + } + var mid = (length - strLength) / 2; + return ( + createPadding(nativeFloor(mid), chars) + + string + + createPadding(nativeCeil(mid), chars) + ); + } + + /** + * Pads `string` on the right side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padEnd('abc', 6); + * // => 'abc ' + * + * _.padEnd('abc', 6, '_-'); + * // => 'abc_-_' + * + * _.padEnd('abc', 3); + * // => 'abc' + */ + function padEnd(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return (length && strLength < length) + ? (string + createPadding(length - strLength, chars)) + : string; + } + + /** + * Pads `string` on the left side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padStart('abc', 6); + * // => ' abc' + * + * _.padStart('abc', 6, '_-'); + * // => '_-_abc' + * + * _.padStart('abc', 3); + * // => 'abc' + */ + function padStart(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return (length && strLength < length) + ? (createPadding(length - strLength, chars) + string) + : string; + } + + /** + * Converts `string` to an integer of the specified radix. If `radix` is + * `undefined` or `0`, a `radix` of `10` is used unless `value` is a + * hexadecimal, in which case a `radix` of `16` is used. + * + * **Note:** This method aligns with the + * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category String + * @param {string} string The string to convert. + * @param {number} [radix=10] The radix to interpret `value` by. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {number} Returns the converted integer. + * @example + * + * _.parseInt('08'); + * // => 8 + * + * _.map(['6', '08', '10'], _.parseInt); + * // => [6, 8, 10] + */ + function parseInt(string, radix, guard) { + if (guard || radix == null) { + radix = 0; + } else if (radix) { + radix = +radix; + } + return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0); + } + + /** + * Repeats the given string `n` times. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to repeat. + * @param {number} [n=1] The number of times to repeat the string. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the repeated string. + * @example + * + * _.repeat('*', 3); + * // => '***' + * + * _.repeat('abc', 2); + * // => 'abcabc' + * + * _.repeat('abc', 0); + * // => '' + */ + function repeat(string, n, guard) { + if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) { + n = 1; + } else { + n = toInteger(n); + } + return baseRepeat(toString(string), n); + } + + /** + * Replaces matches for `pattern` in `string` with `replacement`. + * + * **Note:** This method is based on + * [`String#replace`](https://mdn.io/String/replace). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to modify. + * @param {RegExp|string} pattern The pattern to replace. + * @param {Function|string} replacement The match replacement. + * @returns {string} Returns the modified string. + * @example + * + * _.replace('Hi Fred', 'Fred', 'Barney'); + * // => 'Hi Barney' + */ + function replace() { + var args = arguments, + string = toString(args[0]); + + return args.length < 3 ? string : string.replace(args[1], args[2]); + } + + /** + * Converts `string` to + * [snake case](https://en.wikipedia.org/wiki/Snake_case). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the snake cased string. + * @example + * + * _.snakeCase('Foo Bar'); + * // => 'foo_bar' + * + * _.snakeCase('fooBar'); + * // => 'foo_bar' + * + * _.snakeCase('--FOO-BAR--'); + * // => 'foo_bar' + */ + var snakeCase = createCompounder(function(result, word, index) { + return result + (index ? '_' : '') + word.toLowerCase(); + }); + + /** + * Splits `string` by `separator`. + * + * **Note:** This method is based on + * [`String#split`](https://mdn.io/String/split). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to split. + * @param {RegExp|string} separator The separator pattern to split by. + * @param {number} [limit] The length to truncate results to. + * @returns {Array} Returns the string segments. + * @example + * + * _.split('a-b-c', '-', 2); + * // => ['a', 'b'] + */ + function split(string, separator, limit) { + if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) { + separator = limit = undefined; + } + limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0; + if (!limit) { + return []; + } + string = toString(string); + if (string && ( + typeof separator == 'string' || + (separator != null && !isRegExp(separator)) + )) { + separator = baseToString(separator); + if (!separator && hasUnicode(string)) { + return castSlice(stringToArray(string), 0, limit); + } + } + return string.split(separator, limit); + } + + /** + * Converts `string` to + * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). + * + * @static + * @memberOf _ + * @since 3.1.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the start cased string. + * @example + * + * _.startCase('--foo-bar--'); + * // => 'Foo Bar' + * + * _.startCase('fooBar'); + * // => 'Foo Bar' + * + * _.startCase('__FOO_BAR__'); + * // => 'FOO BAR' + */ + var startCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + upperFirst(word); + }); + + /** + * Checks if `string` starts with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=0] The position to search from. + * @returns {boolean} Returns `true` if `string` starts with `target`, + * else `false`. + * @example + * + * _.startsWith('abc', 'a'); + * // => true + * + * _.startsWith('abc', 'b'); + * // => false + * + * _.startsWith('abc', 'b', 1); + * // => true + */ + function startsWith(string, target, position) { + string = toString(string); + position = position == null + ? 0 + : baseClamp(toInteger(position), 0, string.length); + + target = baseToString(target); + return string.slice(position, position + target.length) == target; + } + + /** + * Creates a compiled template function that can interpolate data properties + * in "interpolate" delimiters, HTML-escape interpolated data properties in + * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data + * properties may be accessed as free variables in the template. If a setting + * object is given, it takes precedence over `_.templateSettings` values. + * + * **Note:** In the development build `_.template` utilizes + * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) + * for easier debugging. + * + * For more information on precompiling templates see + * [lodash's custom builds documentation](https://lodash.com/custom-builds). + * + * For more information on Chrome extension sandboxes see + * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The template string. + * @param {Object} [options={}] The options object. + * @param {RegExp} [options.escape=_.templateSettings.escape] + * The HTML "escape" delimiter. + * @param {RegExp} [options.evaluate=_.templateSettings.evaluate] + * The "evaluate" delimiter. + * @param {Object} [options.imports=_.templateSettings.imports] + * An object to import into the template as free variables. + * @param {RegExp} [options.interpolate=_.templateSettings.interpolate] + * The "interpolate" delimiter. + * @param {string} [options.sourceURL='lodash.templateSources[n]'] + * The sourceURL of the compiled template. + * @param {string} [options.variable='obj'] + * The data object variable name. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the compiled template function. + * @example + * + * // Use the "interpolate" delimiter to create a compiled template. + * var compiled = _.template('hello <%= user %>!'); + * compiled({ 'user': 'fred' }); + * // => 'hello fred!' + * + * // Use the HTML "escape" delimiter to escape data property values. + * var compiled = _.template('<%- value %>'); + * compiled({ 'value': ' +``` + +## Usage + +The primary export of `pathval` is an object which has the following methods: + +* `hasProperty(object, name)` - Checks whether an `object` has `name`d property or numeric array index. +* `getPathInfo(object, path)` - Returns an object with info indicating the value of the `parent` of that path, the `name ` of the property we're retrieving and its `value`. +* `getPathValue(object, path)` - Retrieves the value of a property at a given `path` inside an `object`'. +* `setPathValue(object, path, value)` - Sets the `value` of a property at a given `path` inside an `object`'. + +```js +var pathval = require('pathval'); +``` + +#### .hasProperty(object, name) + +```js +var pathval = require('pathval'); + +var obj = { prop: 'a value' }; +pathval.hasProperty(obj, 'prop'); // true +``` + +#### .getPathInfo(object, path) + +```js +var pathval = require('pathval'); + +var obj = { earth: { country: 'Brazil' } }; +pathval.getPathInfo(obj, 'earth.country'); // { parent: { country: 'Brazil' }, name: 'country', value: 'Brazil', exists: true } +``` + +#### .getPathValue(object, path) + +```js +var pathval = require('pathval'); + +var obj = { earth: { country: 'Brazil' } }; +pathval.getPathValue(obj, 'earth.country'); // 'Brazil' +``` + +#### .setPathValue(object, path, value) + +```js +var pathval = require('pathval'); + +var obj = { earth: { country: 'Brazil' } }; +pathval.setPathValue(obj, 'earth.country', 'USA'); + +obj.earth.country; // 'USA' +``` diff --git a/node_modules/pathval/index.js b/node_modules/pathval/index.js new file mode 100644 index 00000000..1ec2148a --- /dev/null +++ b/node_modules/pathval/index.js @@ -0,0 +1,291 @@ +'use strict'; + +/* ! + * Chai - pathval utility + * Copyright(c) 2012-2014 Jake Luer + * @see https://github.com/logicalparadox/filtr + * MIT Licensed + */ + +/** + * ### .hasProperty(object, name) + * + * This allows checking whether an object has own + * or inherited from prototype chain named property. + * + * Basically does the same thing as the `in` + * operator but works properly with null/undefined values + * and other primitives. + * + * var obj = { + * arr: ['a', 'b', 'c'] + * , str: 'Hello' + * } + * + * The following would be the results. + * + * hasProperty(obj, 'str'); // true + * hasProperty(obj, 'constructor'); // true + * hasProperty(obj, 'bar'); // false + * + * hasProperty(obj.str, 'length'); // true + * hasProperty(obj.str, 1); // true + * hasProperty(obj.str, 5); // false + * + * hasProperty(obj.arr, 'length'); // true + * hasProperty(obj.arr, 2); // true + * hasProperty(obj.arr, 3); // false + * + * @param {Object} object + * @param {String|Symbol} name + * @returns {Boolean} whether it exists + * @namespace Utils + * @name hasProperty + * @api public + */ + +function hasProperty(obj, name) { + if (typeof obj === 'undefined' || obj === null) { + return false; + } + + // The `in` operator does not work with primitives. + return name in Object(obj); +} + +/* ! + * ## parsePath(path) + * + * Helper function used to parse string object + * paths. Use in conjunction with `internalGetPathValue`. + * + * var parsed = parsePath('myobject.property.subprop'); + * + * ### Paths: + * + * * Can be infinitely deep and nested. + * * Arrays are also valid using the formal `myobject.document[3].property`. + * * Literal dots and brackets (not delimiter) must be backslash-escaped. + * + * @param {String} path + * @returns {Object} parsed + * @api private + */ + +function parsePath(path) { + var str = path.replace(/([^\\])\[/g, '$1.['); + var parts = str.match(/(\\\.|[^.]+?)+/g); + return parts.map(function mapMatches(value) { + var regexp = /^\[(\d+)\]$/; + var mArr = regexp.exec(value); + var parsed = null; + if (mArr) { + parsed = { i: parseFloat(mArr[1]) }; + } else { + parsed = { p: value.replace(/\\([.\[\]])/g, '$1') }; + } + + return parsed; + }); +} + +/* ! + * ## internalGetPathValue(obj, parsed[, pathDepth]) + * + * Helper companion function for `.parsePath` that returns + * the value located at the parsed address. + * + * var value = getPathValue(obj, parsed); + * + * @param {Object} object to search against + * @param {Object} parsed definition from `parsePath`. + * @param {Number} depth (nesting level) of the property we want to retrieve + * @returns {Object|Undefined} value + * @api private + */ + +function internalGetPathValue(obj, parsed, pathDepth) { + var temporaryValue = obj; + var res = null; + pathDepth = (typeof pathDepth === 'undefined' ? parsed.length : pathDepth); + + for (var i = 0; i < pathDepth; i++) { + var part = parsed[i]; + if (temporaryValue) { + if (typeof part.p === 'undefined') { + temporaryValue = temporaryValue[part.i]; + } else { + temporaryValue = temporaryValue[part.p]; + } + + if (i === (pathDepth - 1)) { + res = temporaryValue; + } + } + } + + return res; +} + +/* ! + * ## internalSetPathValue(obj, value, parsed) + * + * Companion function for `parsePath` that sets + * the value located at a parsed address. + * + * internalSetPathValue(obj, 'value', parsed); + * + * @param {Object} object to search and define on + * @param {*} value to use upon set + * @param {Object} parsed definition from `parsePath` + * @api private + */ + +function internalSetPathValue(obj, val, parsed) { + var tempObj = obj; + var pathDepth = parsed.length; + var part = null; + // Here we iterate through every part of the path + for (var i = 0; i < pathDepth; i++) { + var propName = null; + var propVal = null; + part = parsed[i]; + + // If it's the last part of the path, we set the 'propName' value with the property name + if (i === (pathDepth - 1)) { + propName = typeof part.p === 'undefined' ? part.i : part.p; + // Now we set the property with the name held by 'propName' on object with the desired val + tempObj[propName] = val; + } else if (typeof part.p !== 'undefined' && tempObj[part.p]) { + tempObj = tempObj[part.p]; + } else if (typeof part.i !== 'undefined' && tempObj[part.i]) { + tempObj = tempObj[part.i]; + } else { + // If the obj doesn't have the property we create one with that name to define it + var next = parsed[i + 1]; + // Here we set the name of the property which will be defined + propName = typeof part.p === 'undefined' ? part.i : part.p; + // Here we decide if this property will be an array or a new object + propVal = typeof next.p === 'undefined' ? [] : {}; + tempObj[propName] = propVal; + tempObj = tempObj[propName]; + } + } +} + +/** + * ### .getPathInfo(object, path) + * + * This allows the retrieval of property info in an + * object given a string path. + * + * The path info consists of an object with the + * following properties: + * + * * parent - The parent object of the property referenced by `path` + * * name - The name of the final property, a number if it was an array indexer + * * value - The value of the property, if it exists, otherwise `undefined` + * * exists - Whether the property exists or not + * + * @param {Object} object + * @param {String} path + * @returns {Object} info + * @namespace Utils + * @name getPathInfo + * @api public + */ + +function getPathInfo(obj, path) { + var parsed = parsePath(path); + var last = parsed[parsed.length - 1]; + var info = { + parent: parsed.length > 1 ? internalGetPathValue(obj, parsed, parsed.length - 1) : obj, + name: last.p || last.i, + value: internalGetPathValue(obj, parsed), + }; + info.exists = hasProperty(info.parent, info.name); + + return info; +} + +/** + * ### .getPathValue(object, path) + * + * This allows the retrieval of values in an + * object given a string path. + * + * var obj = { + * prop1: { + * arr: ['a', 'b', 'c'] + * , str: 'Hello' + * } + * , prop2: { + * arr: [ { nested: 'Universe' } ] + * , str: 'Hello again!' + * } + * } + * + * The following would be the results. + * + * getPathValue(obj, 'prop1.str'); // Hello + * getPathValue(obj, 'prop1.att[2]'); // b + * getPathValue(obj, 'prop2.arr[0].nested'); // Universe + * + * @param {Object} object + * @param {String} path + * @returns {Object} value or `undefined` + * @namespace Utils + * @name getPathValue + * @api public + */ + +function getPathValue(obj, path) { + var info = getPathInfo(obj, path); + return info.value; +} + +/** + * ### .setPathValue(object, path, value) + * + * Define the value in an object at a given string path. + * + * ```js + * var obj = { + * prop1: { + * arr: ['a', 'b', 'c'] + * , str: 'Hello' + * } + * , prop2: { + * arr: [ { nested: 'Universe' } ] + * , str: 'Hello again!' + * } + * }; + * ``` + * + * The following would be acceptable. + * + * ```js + * var properties = require('tea-properties'); + * properties.set(obj, 'prop1.str', 'Hello Universe!'); + * properties.set(obj, 'prop1.arr[2]', 'B'); + * properties.set(obj, 'prop2.arr[0].nested.value', { hello: 'universe' }); + * ``` + * + * @param {Object} object + * @param {String} path + * @param {Mixed} value + * @api private + */ + +function setPathValue(obj, path, val) { + var parsed = parsePath(path); + internalSetPathValue(obj, val, parsed); + return obj; +} + +module.exports = { + hasProperty: hasProperty, + getPathInfo: getPathInfo, + getPathValue: getPathValue, + setPathValue: setPathValue, +}; diff --git a/node_modules/pathval/package.json b/node_modules/pathval/package.json new file mode 100644 index 00000000..b6dfe967 --- /dev/null +++ b/node_modules/pathval/package.json @@ -0,0 +1,113 @@ +{ + "_args": [ + [ + "pathval@1.1.0", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "pathval@1.1.0", + "_id": "pathval@1.1.0", + "_inBundle": false, + "_integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", + "_location": "/pathval", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "pathval@1.1.0", + "name": "pathval", + "escapedName": "pathval", + "rawSpec": "1.1.0", + "saveSpec": null, + "fetchSpec": "1.1.0" + }, + "_requiredBy": [ + "/chai" + ], + "_resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", + "_spec": "1.1.0", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "Veselin Todorov", + "email": "hi@vesln.com" + }, + "bugs": { + "url": "https://github.com/chaijs/pathval/issues" + }, + "config": { + "ghooks": { + "commit-msg": "validate-commit-msg" + } + }, + "description": "Object value retrieval given a string path", + "devDependencies": { + "browserify": "^13.0.0", + "browserify-istanbul": "^1.0.0", + "coveralls": "2.11.9", + "eslint": "^2.4.0", + "eslint-config-strict": "^8.5.0", + "eslint-plugin-filenames": "^0.2.0", + "ghooks": "^1.0.1", + "istanbul": "^0.4.2", + "karma": "^0.13.22", + "karma-browserify": "^5.0.2", + "karma-coverage": "^0.5.5", + "karma-mocha": "^0.2.2", + "karma-phantomjs-launcher": "^1.0.0", + "karma-sauce-launcher": "^0.3.1", + "lcov-result-merger": "^1.0.2", + "mocha": "^3.1.2", + "phantomjs-prebuilt": "^2.1.5", + "semantic-release": "^4.3.5", + "simple-assert": "^1.0.0", + "travis-after-all": "^1.4.4", + "validate-commit-msg": "^2.3.1" + }, + "engines": { + "node": "*" + }, + "eslintConfig": { + "extends": [ + "strict/es5" + ], + "env": { + "es6": true + }, + "globals": { + "HTMLElement": false + }, + "rules": { + "complexity": 0, + "max-statements": 0 + } + }, + "files": [ + "index.js", + "pathval.js" + ], + "homepage": "https://github.com/chaijs/pathval", + "keywords": [ + "pathval", + "value retrieval", + "chai util" + ], + "license": "MIT", + "main": "./index.js", + "name": "pathval", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/chaijs/pathval.git" + }, + "scripts": { + "build": "browserify --bare $npm_package_main --standalone pathval -o pathval.js", + "lint": "eslint --ignore-path .gitignore .", + "prepublish": "npm run build", + "pretest": "npm run lint", + "semantic-release": "semantic-release pre && npm publish && semantic-release post", + "test": "npm run test:node && npm run test:browser && npm run upload-coverage", + "test:browser": "karma start --singleRun=true", + "test:node": "istanbul cover _mocha", + "upload-coverage": "lcov-result-merger 'coverage/**/lcov.info' | coveralls; exit 0" + }, + "version": "1.1.0" +} diff --git a/node_modules/pathval/pathval.js b/node_modules/pathval/pathval.js new file mode 100644 index 00000000..77086363 --- /dev/null +++ b/node_modules/pathval/pathval.js @@ -0,0 +1,295 @@ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.pathval = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o + * @see https://github.com/logicalparadox/filtr + * MIT Licensed + */ + +/** + * ### .hasProperty(object, name) + * + * This allows checking whether an object has own + * or inherited from prototype chain named property. + * + * Basically does the same thing as the `in` + * operator but works properly with null/undefined values + * and other primitives. + * + * var obj = { + * arr: ['a', 'b', 'c'] + * , str: 'Hello' + * } + * + * The following would be the results. + * + * hasProperty(obj, 'str'); // true + * hasProperty(obj, 'constructor'); // true + * hasProperty(obj, 'bar'); // false + * + * hasProperty(obj.str, 'length'); // true + * hasProperty(obj.str, 1); // true + * hasProperty(obj.str, 5); // false + * + * hasProperty(obj.arr, 'length'); // true + * hasProperty(obj.arr, 2); // true + * hasProperty(obj.arr, 3); // false + * + * @param {Object} object + * @param {String|Symbol} name + * @returns {Boolean} whether it exists + * @namespace Utils + * @name hasProperty + * @api public + */ + +function hasProperty(obj, name) { + if (typeof obj === 'undefined' || obj === null) { + return false; + } + + // The `in` operator does not work with primitives. + return name in Object(obj); +} + +/* ! + * ## parsePath(path) + * + * Helper function used to parse string object + * paths. Use in conjunction with `internalGetPathValue`. + * + * var parsed = parsePath('myobject.property.subprop'); + * + * ### Paths: + * + * * Can be infinitely deep and nested. + * * Arrays are also valid using the formal `myobject.document[3].property`. + * * Literal dots and brackets (not delimiter) must be backslash-escaped. + * + * @param {String} path + * @returns {Object} parsed + * @api private + */ + +function parsePath(path) { + var str = path.replace(/([^\\])\[/g, '$1.['); + var parts = str.match(/(\\\.|[^.]+?)+/g); + return parts.map(function mapMatches(value) { + var regexp = /^\[(\d+)\]$/; + var mArr = regexp.exec(value); + var parsed = null; + if (mArr) { + parsed = { i: parseFloat(mArr[1]) }; + } else { + parsed = { p: value.replace(/\\([.\[\]])/g, '$1') }; + } + + return parsed; + }); +} + +/* ! + * ## internalGetPathValue(obj, parsed[, pathDepth]) + * + * Helper companion function for `.parsePath` that returns + * the value located at the parsed address. + * + * var value = getPathValue(obj, parsed); + * + * @param {Object} object to search against + * @param {Object} parsed definition from `parsePath`. + * @param {Number} depth (nesting level) of the property we want to retrieve + * @returns {Object|Undefined} value + * @api private + */ + +function internalGetPathValue(obj, parsed, pathDepth) { + var temporaryValue = obj; + var res = null; + pathDepth = (typeof pathDepth === 'undefined' ? parsed.length : pathDepth); + + for (var i = 0; i < pathDepth; i++) { + var part = parsed[i]; + if (temporaryValue) { + if (typeof part.p === 'undefined') { + temporaryValue = temporaryValue[part.i]; + } else { + temporaryValue = temporaryValue[part.p]; + } + + if (i === (pathDepth - 1)) { + res = temporaryValue; + } + } + } + + return res; +} + +/* ! + * ## internalSetPathValue(obj, value, parsed) + * + * Companion function for `parsePath` that sets + * the value located at a parsed address. + * + * internalSetPathValue(obj, 'value', parsed); + * + * @param {Object} object to search and define on + * @param {*} value to use upon set + * @param {Object} parsed definition from `parsePath` + * @api private + */ + +function internalSetPathValue(obj, val, parsed) { + var tempObj = obj; + var pathDepth = parsed.length; + var part = null; + // Here we iterate through every part of the path + for (var i = 0; i < pathDepth; i++) { + var propName = null; + var propVal = null; + part = parsed[i]; + + // If it's the last part of the path, we set the 'propName' value with the property name + if (i === (pathDepth - 1)) { + propName = typeof part.p === 'undefined' ? part.i : part.p; + // Now we set the property with the name held by 'propName' on object with the desired val + tempObj[propName] = val; + } else if (typeof part.p !== 'undefined' && tempObj[part.p]) { + tempObj = tempObj[part.p]; + } else if (typeof part.i !== 'undefined' && tempObj[part.i]) { + tempObj = tempObj[part.i]; + } else { + // If the obj doesn't have the property we create one with that name to define it + var next = parsed[i + 1]; + // Here we set the name of the property which will be defined + propName = typeof part.p === 'undefined' ? part.i : part.p; + // Here we decide if this property will be an array or a new object + propVal = typeof next.p === 'undefined' ? [] : {}; + tempObj[propName] = propVal; + tempObj = tempObj[propName]; + } + } +} + +/** + * ### .getPathInfo(object, path) + * + * This allows the retrieval of property info in an + * object given a string path. + * + * The path info consists of an object with the + * following properties: + * + * * parent - The parent object of the property referenced by `path` + * * name - The name of the final property, a number if it was an array indexer + * * value - The value of the property, if it exists, otherwise `undefined` + * * exists - Whether the property exists or not + * + * @param {Object} object + * @param {String} path + * @returns {Object} info + * @namespace Utils + * @name getPathInfo + * @api public + */ + +function getPathInfo(obj, path) { + var parsed = parsePath(path); + var last = parsed[parsed.length - 1]; + var info = { + parent: parsed.length > 1 ? internalGetPathValue(obj, parsed, parsed.length - 1) : obj, + name: last.p || last.i, + value: internalGetPathValue(obj, parsed), + }; + info.exists = hasProperty(info.parent, info.name); + + return info; +} + +/** + * ### .getPathValue(object, path) + * + * This allows the retrieval of values in an + * object given a string path. + * + * var obj = { + * prop1: { + * arr: ['a', 'b', 'c'] + * , str: 'Hello' + * } + * , prop2: { + * arr: [ { nested: 'Universe' } ] + * , str: 'Hello again!' + * } + * } + * + * The following would be the results. + * + * getPathValue(obj, 'prop1.str'); // Hello + * getPathValue(obj, 'prop1.att[2]'); // b + * getPathValue(obj, 'prop2.arr[0].nested'); // Universe + * + * @param {Object} object + * @param {String} path + * @returns {Object} value or `undefined` + * @namespace Utils + * @name getPathValue + * @api public + */ + +function getPathValue(obj, path) { + var info = getPathInfo(obj, path); + return info.value; +} + +/** + * ### .setPathValue(object, path, value) + * + * Define the value in an object at a given string path. + * + * ```js + * var obj = { + * prop1: { + * arr: ['a', 'b', 'c'] + * , str: 'Hello' + * } + * , prop2: { + * arr: [ { nested: 'Universe' } ] + * , str: 'Hello again!' + * } + * }; + * ``` + * + * The following would be acceptable. + * + * ```js + * var properties = require('tea-properties'); + * properties.set(obj, 'prop1.str', 'Hello Universe!'); + * properties.set(obj, 'prop1.arr[2]', 'B'); + * properties.set(obj, 'prop2.arr[0].nested.value', { hello: 'universe' }); + * ``` + * + * @param {Object} object + * @param {String} path + * @param {Mixed} value + * @api private + */ + +function setPathValue(obj, path, val) { + var parsed = parsePath(path); + internalSetPathValue(obj, val, parsed); + return obj; +} + +module.exports = { + hasProperty: hasProperty, + getPathInfo: getPathInfo, + getPathValue: getPathValue, + setPathValue: setPathValue, +}; + +},{}]},{},[1])(1) +}); \ No newline at end of file diff --git a/node_modules/propagate/.eslintignore b/node_modules/propagate/.eslintignore new file mode 100644 index 00000000..ccc29308 --- /dev/null +++ b/node_modules/propagate/.eslintignore @@ -0,0 +1,2 @@ +/coverage +/node_modules diff --git a/node_modules/propagate/.eslintrc.yml b/node_modules/propagate/.eslintrc.yml new file mode 100644 index 00000000..ad4168bb --- /dev/null +++ b/node_modules/propagate/.eslintrc.yml @@ -0,0 +1,35 @@ +env: + node: true + +parserOptions: + ecmaVersion: 9 + # Override eslint-config-standard, which incorrectly sets this to "module", + # though that setting is only for ES6 modules, not CommonJS modules. + sourceType: 'script' + +extends: + - 'eslint:recommended' + - standard + - prettier + +rules: + # Override some recommended rules. + no-unused-vars: ['error', { 'args': 'none' }] + no-empty: ['error', { 'allowEmptyCatch': true }] + + # Nock additions. + strict: ['error', 'safe'] + no-loop-func: 'error' + no-var: 'error' + prefer-const: 'error' + object-shorthand: ['error', 'properties'] + prefer-template: 'error' + arrow-body-style: ['error', 'as-needed'] + prefer-destructuring: + [ + 'error', + { + 'VariableDeclarator': { 'array': false, 'object': true }, + 'AssignmentExpression': { 'array': false, 'object': false }, + }, + ] diff --git a/node_modules/propagate/.prettierignore b/node_modules/propagate/.prettierignore new file mode 100644 index 00000000..59590966 --- /dev/null +++ b/node_modules/propagate/.prettierignore @@ -0,0 +1,4 @@ +package.json +package-lock.json +/.nyc_output +/coverage diff --git a/node_modules/propagate/.prettierrc.yml b/node_modules/propagate/.prettierrc.yml new file mode 100644 index 00000000..d894f630 --- /dev/null +++ b/node_modules/propagate/.prettierrc.yml @@ -0,0 +1,5 @@ +semi: false +singleQuote: true +trailingComma: es5 +bracketSpacing: true +endOfLine: lf diff --git a/node_modules/propagate/.travis.yml b/node_modules/propagate/.travis.yml new file mode 100644 index 00000000..4e2fc033 --- /dev/null +++ b/node_modules/propagate/.travis.yml @@ -0,0 +1,27 @@ +language: node_js +cache: npm + +# Trigger a push build on master and greenkeeper branches + PRs build on every branches +# Avoid double build on PRs (See https://github.com/travis-ci/travis-ci/issues/1147) +branches: + only: + - master + - /^greenkeeper.*$/ + - beta # semantic-release preview releases + - next # semantic-release @next releases + - /^\d+\.x$/ # semantic-release maintenance releases + +stages: + - test + - name: release + if: branch =~ /^(\d+\.x|master|next|beta)$/ AND type IN (push) + +jobs: + include: + - stage: test + node_js: 10 + - node_js: 8 + - stage: release + node_js: lts/* + env: semantic-release + script: npx semantic-release diff --git a/node_modules/propagate/LICENSE.md b/node_modules/propagate/LICENSE.md new file mode 100644 index 00000000..ebb06d4e --- /dev/null +++ b/node_modules/propagate/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2015-2019 Pedro Teixeira and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/propagate/README.md b/node_modules/propagate/README.md new file mode 100644 index 00000000..dbe46900 --- /dev/null +++ b/node_modules/propagate/README.md @@ -0,0 +1,72 @@ +# propagate + +[![npm](https://img.shields.io/npm/v/nock.svg?style=flat-square)][npmjs] +[![Build Status](https://img.shields.io/travis/nock/propagate/master.svg?style=flat-square)][build] +[![Coverage](https://img.shields.io/coveralls/github/nock/propagate.svg?style=flat-square)][coverage] + +[npmjs]: https://www.npmjs.com/package/propagate +[build]: https://travis-ci.org/nock/propagate +[coverage]: https://coveralls.io/github/nock/propagate + +Propagate events from one event emitter into another. + +## Install + +```bash +$ npm install propagate +``` + +## Propagate + +```javascript +var ee1 = new EventEmitter() +var ee2 = new EventEmitter() +propagate(ee1, ee2) + +ee2.on('event', function(a, b) { + console.log('got propagated event', a, b) +}) + +ee1.emit('event', 'a', 'b') +``` + +## Unpropagate + +You can unpropagate by ending the propagation like this: + +```javascript +var ee1 = new EventEmitter() +var ee2 = new EventEmitter() +var p = propagate(ee1, ee2) + +// ... + +p.end() +``` + +## Only propagate certain events: + +```javascript +var ee1 = new EventEmitter() +var ee2 = new EventEmitter() +var p = propagate(['event1', 'event2'], ee1, ee2) +``` + +## Propagate certain events as other events: + +```javascript +var ee1 = new EventEmitter() +var ee2 = new EventEmitter() +var p = propagate( + { + event1: 'other-event1', + event2: 'other-event2', + }, + ee1, + ee2 +) +``` + +# License + +MIT diff --git a/node_modules/propagate/index.js b/node_modules/propagate/index.js new file mode 100644 index 00000000..ea464349 --- /dev/null +++ b/node_modules/propagate/index.js @@ -0,0 +1,85 @@ +'use strict' + +function propagate(events, source, dest) { + if (arguments.length < 3) { + dest = source + source = events + events = undefined + } + + // events should be an array or object + const eventsIsObject = typeof events === 'object' + if (events && !eventsIsObject) events = [events] + + if (eventsIsObject) { + return explicitPropagate(events, source, dest) + } + + const shouldPropagate = eventName => + events === undefined || events.includes(eventName) + + const oldEmit = source.emit + + // Returns true if the event had listeners, false otherwise. + // https://nodejs.org/api/events.html#events_emitter_emit_eventname_args + source.emit = (eventName, ...args) => { + const oldEmitHadListeners = oldEmit.call(source, eventName, ...args) + + let destEmitHadListeners = false + if (shouldPropagate(eventName)) { + destEmitHadListeners = dest.emit(eventName, ...args) + } + + return oldEmitHadListeners || destEmitHadListeners + } + + function end() { + source.emit = oldEmit + } + + return { + end, + } +} + +module.exports = propagate + +function explicitPropagate(events, source, dest) { + let eventsIn + let eventsOut + if (Array.isArray(events)) { + eventsIn = events + eventsOut = events + } else { + eventsIn = Object.keys(events) + eventsOut = eventsIn.map(function(key) { + return events[key] + }) + } + + const listeners = eventsOut.map(function(event) { + return function() { + const args = Array.prototype.slice.call(arguments) + args.unshift(event) + dest.emit.apply(dest, args) + } + }) + + listeners.forEach(register) + + return { + end, + } + + function register(listener, i) { + source.on(eventsIn[i], listener) + } + + function unregister(listener, i) { + source.removeListener(eventsIn[i], listener) + } + + function end() { + listeners.forEach(unregister) + } +} diff --git a/node_modules/propagate/package.json b/node_modules/propagate/package.json new file mode 100644 index 00000000..2e7705ab --- /dev/null +++ b/node_modules/propagate/package.json @@ -0,0 +1,89 @@ +{ + "_args": [ + [ + "propagate@2.0.1", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "propagate@2.0.1", + "_id": "propagate@2.0.1", + "_inBundle": false, + "_integrity": "sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag==", + "_location": "/propagate", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "propagate@2.0.1", + "name": "propagate", + "escapedName": "propagate", + "rawSpec": "2.0.1", + "saveSpec": null, + "fetchSpec": "2.0.1" + }, + "_requiredBy": [ + "/nock" + ], + "_resolved": "https://registry.npmjs.org/propagate/-/propagate-2.0.1.tgz", + "_spec": "2.0.1", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "Pedro Teixeira", + "email": "pedro.teixeira@gmail.com" + }, + "bugs": { + "url": "http://github.com/nock/propagate/issues" + }, + "contributors": [ + { + "name": "Pedro Teixeira" + } + ], + "dependencies": {}, + "description": "Propagate events from one event emitter into another", + "devDependencies": { + "eslint": "^5.16.0", + "eslint-config-prettier": "^4.1.0", + "eslint-config-standard": "^12.0.0", + "eslint-plugin-import": "^2.16.0", + "eslint-plugin-node": "^8.0.1", + "eslint-plugin-promise": "^4.1.1", + "eslint-plugin-standard": "^4.0.0", + "prettier": "^1.16.4", + "semantic-release": "16.0.0-beta.18", + "tap": "^12.6.1" + }, + "engines": { + "node": ">= 8" + }, + "homepage": "http://github.com/nock/propagate#readme", + "keywords": [ + "event", + "events", + "emitter", + "eventemitter", + "propagation" + ], + "license": "MIT", + "name": "propagate", + "nyc": { + "exclude": [ + "tests/" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/nock/propagate.git" + }, + "scripts": { + "coverage": "tap --coverage-report=html && open coverage/lcov-report/index.html", + "lint": "eslint \"**/*.js\"", + "posttest": "npm run -s prettier:check", + "pretest": "npm run lint", + "prettier": "prettier --write \"**/*.@(js|md|yml|json)\"", + "prettier:check": "prettier --check \"**/*.@(js|md|yml|json)\"", + "test": "npm run -s unit", + "unit": "tap tests/index.js" + }, + "version": "2.0.1" +} diff --git a/node_modules/propagate/tests/index.js b/node_modules/propagate/tests/index.js new file mode 100644 index 00000000..6612a682 --- /dev/null +++ b/node_modules/propagate/tests/index.js @@ -0,0 +1,168 @@ +'use strict' + +const { test } = require('tap') +const { EventEmitter } = require('events') +const propagate = require('..') + +test('propagates events', t => { + t.plan(16) + const ee1 = new EventEmitter() + const ee2 = new EventEmitter() + propagate(ee1, ee2) + + ee2.on('event-1', (a, b, c) => { + t.equal(a, 'a') + t.equal(b, 'b') + t.equal(c, undefined) + }) + + ee2.on('event-2', (a, b, c) => { + t.equal(a, 'c') + t.equal(b, 'd') + t.equal(c, undefined) + }) + + t.true(ee1.emit('event-1', 'a', 'b')) + t.true(ee1.emit('event-1', 'a', 'b')) + t.true(ee1.emit('event-2', 'c', 'd')) + t.true(ee1.emit('event-2', 'c', 'd')) +}) + +test('propagates can end', t => { + t.plan(3) + + const ee1 = new EventEmitter() + const ee2 = new EventEmitter() + const prop = propagate(ee1, ee2) + + ee2.on('event', () => { + t.ok('true', 'propagated') + }) + + t.true(ee1.emit('event')) + prop.end() + t.false(ee1.emit('event')) +}) + +test('after propagation old one still emits', t => { + t.plan(4) + + const ee1 = new EventEmitter() + const ee2 = new EventEmitter() + const prop = propagate(ee1, ee2) + + ee1.on('event', () => { + t.ok('true', 'propagated') + }) + + t.true(ee1.emit('event')) + prop.end() + t.true(ee1.emit('event')) +}) + +test('emit on source before destination', t => { + t.plan(2) + + const source = new EventEmitter() + const dest = new EventEmitter() + + // Set up test case for "propagate all" + // `count` should have been incremented by handler on source when handler on dest is invoked + let count = 0 + propagate(source, dest) + source.on('event', () => { + count++ + }) + dest.on('event', () => { + t.equal(count, 1, 'emit on source first') + }) + + // Emit the events for assertion + t.true(source.emit('event')) +}) + +test('is able to propagate only certain events', t => { + t.plan(6) + const ee1 = new EventEmitter() + const ee2 = new EventEmitter() + // propagate only event-1 and event-2, leaving out + const p = propagate(['event-1', 'event-2'], ee1, ee2) + + ee2.on('event-1', () => { + t.ok(true, 'event 1 received') + }) + + ee2.on('event-2', (a, b, c) => { + t.ok(true, 'event 2 received') + }) + + ee2.on('event-3', (a, b, c) => { + t.fail('event 3 should not have been received') + }) + + t.true(ee1.emit('event-1')) + t.true(ee1.emit('event-2')) + t.false(ee1.emit('event-3')) + + p.end() + + t.false(ee1.emit('event-1')) +}) + +test('is able to propagate and map certain events', t => { + t.plan(6) + const ee1 = new EventEmitter() + const ee2 = new EventEmitter() + // propagate only event-1 and event-2, leaving out + const p = propagate( + { + 'event-1': 'other-event-1', + 'event-2': 'other-event-2', + }, + ee1, + ee2 + ) + + ee2.on('other-event-1', () => { + t.ok(true, 'event 1 received') + }) + + ee2.on('other-event-2', (a, b, c) => { + t.ok(true, 'event 2 received') + }) + + ee2.on('event-3', (a, b, c) => { + t.fail('event 3 should not have been received') + }) + + t.true(ee1.emit('event-1')) + t.true(ee1.emit('event-2')) + t.false(ee1.emit('event-3')) + + p.end() + + t.false(ee1.emit('event-1')) +}) + +test('is able to propagate a single event', t => { + t.plan(5) + const ee1 = new EventEmitter() + const ee2 = new EventEmitter() + const p = propagate('event-1', ee1, ee2) + + ee2.on('event-1', () => { + t.ok(true, 'event 1 received') + }) + + ee2.on('event-2', (a, b, c) => { + t.fail('event 3 should not have been received') + }) + + t.true(ee1.emit('event-1')) + t.false(ee1.emit('event-2')) + + p.end() + + t.false(ee1.emit('event-1')) + t.false(ee1.emit('event-2')) +}) diff --git a/node_modules/pump/.travis.yml b/node_modules/pump/.travis.yml new file mode 100644 index 00000000..17f94330 --- /dev/null +++ b/node_modules/pump/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - "0.10" + +script: "npm test" diff --git a/node_modules/pump/LICENSE b/node_modules/pump/LICENSE new file mode 100644 index 00000000..757562ec --- /dev/null +++ b/node_modules/pump/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Mathias Buus + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/pump/README.md b/node_modules/pump/README.md new file mode 100644 index 00000000..4c81471a --- /dev/null +++ b/node_modules/pump/README.md @@ -0,0 +1,65 @@ +# pump + +pump is a small node module that pipes streams together and destroys all of them if one of them closes. + +``` +npm install pump +``` + +[![build status](http://img.shields.io/travis/mafintosh/pump.svg?style=flat)](http://travis-ci.org/mafintosh/pump) + +## What problem does it solve? + +When using standard `source.pipe(dest)` source will _not_ be destroyed if dest emits close or an error. +You are also not able to provide a callback to tell when then pipe has finished. + +pump does these two things for you + +## Usage + +Simply pass the streams you want to pipe together to pump and add an optional callback + +``` js +var pump = require('pump') +var fs = require('fs') + +var source = fs.createReadStream('/dev/random') +var dest = fs.createWriteStream('/dev/null') + +pump(source, dest, function(err) { + console.log('pipe finished', err) +}) + +setTimeout(function() { + dest.destroy() // when dest is closed pump will destroy source +}, 1000) +``` + +You can use pump to pipe more than two streams together as well + +``` js +var transform = someTransformStream() + +pump(source, transform, anotherTransform, dest, function(err) { + console.log('pipe finished', err) +}) +``` + +If `source`, `transform`, `anotherTransform` or `dest` closes all of them will be destroyed. + +Similarly to `stream.pipe()`, `pump()` returns the last stream passed in, so you can do: + +``` +return pump(s1, s2) // returns s2 +``` + +If you want to return a stream that combines *both* s1 and s2 to a single stream use +[pumpify](https://github.com/mafintosh/pumpify) instead. + +## License + +MIT + +## Related + +`pump` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one. diff --git a/node_modules/pump/index.js b/node_modules/pump/index.js new file mode 100644 index 00000000..c15059f1 --- /dev/null +++ b/node_modules/pump/index.js @@ -0,0 +1,82 @@ +var once = require('once') +var eos = require('end-of-stream') +var fs = require('fs') // we only need fs to get the ReadStream and WriteStream prototypes + +var noop = function () {} +var ancient = /^v?\.0/.test(process.version) + +var isFn = function (fn) { + return typeof fn === 'function' +} + +var isFS = function (stream) { + if (!ancient) return false // newer node version do not need to care about fs is a special way + if (!fs) return false // browser + return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close) +} + +var isRequest = function (stream) { + return stream.setHeader && isFn(stream.abort) +} + +var destroyer = function (stream, reading, writing, callback) { + callback = once(callback) + + var closed = false + stream.on('close', function () { + closed = true + }) + + eos(stream, {readable: reading, writable: writing}, function (err) { + if (err) return callback(err) + closed = true + callback() + }) + + var destroyed = false + return function (err) { + if (closed) return + if (destroyed) return + destroyed = true + + if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks + if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want + + if (isFn(stream.destroy)) return stream.destroy() + + callback(err || new Error('stream was destroyed')) + } +} + +var call = function (fn) { + fn() +} + +var pipe = function (from, to) { + return from.pipe(to) +} + +var pump = function () { + var streams = Array.prototype.slice.call(arguments) + var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop + + if (Array.isArray(streams[0])) streams = streams[0] + if (streams.length < 2) throw new Error('pump requires two streams per minimum') + + var error + var destroys = streams.map(function (stream, i) { + var reading = i < streams.length - 1 + var writing = i > 0 + return destroyer(stream, reading, writing, function (err) { + if (!error) error = err + if (err) destroys.forEach(call) + if (reading) return + destroys.forEach(call) + callback(error) + }) + }) + + return streams.reduce(pipe) +} + +module.exports = pump diff --git a/node_modules/pump/package.json b/node_modules/pump/package.json new file mode 100644 index 00000000..7bf9f907 --- /dev/null +++ b/node_modules/pump/package.json @@ -0,0 +1,62 @@ +{ + "_args": [ + [ + "pump@3.0.0", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "pump@3.0.0", + "_id": "pump@3.0.0", + "_inBundle": false, + "_integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "_location": "/pump", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "pump@3.0.0", + "name": "pump", + "escapedName": "pump", + "rawSpec": "3.0.0", + "saveSpec": null, + "fetchSpec": "3.0.0" + }, + "_requiredBy": [ + "/get-stream" + ], + "_resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "_spec": "3.0.0", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "Mathias Buus Madsen", + "email": "mathiasbuus@gmail.com" + }, + "browser": { + "fs": false + }, + "bugs": { + "url": "https://github.com/mafintosh/pump/issues" + }, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + }, + "description": "pipe streams together and close all of them if one of them closes", + "homepage": "https://github.com/mafintosh/pump#readme", + "keywords": [ + "streams", + "pipe", + "destroy", + "callback" + ], + "license": "MIT", + "name": "pump", + "repository": { + "type": "git", + "url": "git://github.com/mafintosh/pump.git" + }, + "scripts": { + "test": "node test-browser.js && node test-node.js" + }, + "version": "3.0.0" +} diff --git a/node_modules/pump/test-browser.js b/node_modules/pump/test-browser.js new file mode 100644 index 00000000..9a06c8a4 --- /dev/null +++ b/node_modules/pump/test-browser.js @@ -0,0 +1,66 @@ +var stream = require('stream') +var pump = require('./index') + +var rs = new stream.Readable() +var ws = new stream.Writable() + +rs._read = function (size) { + this.push(Buffer(size).fill('abc')) +} + +ws._write = function (chunk, encoding, cb) { + setTimeout(function () { + cb() + }, 100) +} + +var toHex = function () { + var reverse = new (require('stream').Transform)() + + reverse._transform = function (chunk, enc, callback) { + reverse.push(chunk.toString('hex')) + callback() + } + + return reverse +} + +var wsClosed = false +var rsClosed = false +var callbackCalled = false + +var check = function () { + if (wsClosed && rsClosed && callbackCalled) { + console.log('test-browser.js passes') + clearTimeout(timeout) + } +} + +ws.on('finish', function () { + wsClosed = true + check() +}) + +rs.on('end', function () { + rsClosed = true + check() +}) + +var res = pump(rs, toHex(), toHex(), toHex(), ws, function () { + callbackCalled = true + check() +}) + +if (res !== ws) { + throw new Error('should return last stream') +} + +setTimeout(function () { + rs.push(null) + rs.emit('close') +}, 1000) + +var timeout = setTimeout(function () { + check() + throw new Error('timeout') +}, 5000) diff --git a/node_modules/pump/test-node.js b/node_modules/pump/test-node.js new file mode 100644 index 00000000..561251a0 --- /dev/null +++ b/node_modules/pump/test-node.js @@ -0,0 +1,53 @@ +var pump = require('./index') + +var rs = require('fs').createReadStream('/dev/random') +var ws = require('fs').createWriteStream('/dev/null') + +var toHex = function () { + var reverse = new (require('stream').Transform)() + + reverse._transform = function (chunk, enc, callback) { + reverse.push(chunk.toString('hex')) + callback() + } + + return reverse +} + +var wsClosed = false +var rsClosed = false +var callbackCalled = false + +var check = function () { + if (wsClosed && rsClosed && callbackCalled) { + console.log('test-node.js passes') + clearTimeout(timeout) + } +} + +ws.on('close', function () { + wsClosed = true + check() +}) + +rs.on('close', function () { + rsClosed = true + check() +}) + +var res = pump(rs, toHex(), toHex(), toHex(), ws, function () { + callbackCalled = true + check() +}) + +if (res !== ws) { + throw new Error('should return last stream') +} + +setTimeout(function () { + rs.destroy() +}, 1000) + +var timeout = setTimeout(function () { + throw new Error('timeout') +}, 5000) diff --git a/node_modules/shebang-command/index.js b/node_modules/shebang-command/index.js new file mode 100644 index 00000000..2de70b07 --- /dev/null +++ b/node_modules/shebang-command/index.js @@ -0,0 +1,19 @@ +'use strict'; +var shebangRegex = require('shebang-regex'); + +module.exports = function (str) { + var match = str.match(shebangRegex); + + if (!match) { + return null; + } + + var arr = match[0].replace(/#! ?/, '').split(' '); + var bin = arr[0].split('/').pop(); + var arg = arr[1]; + + return (bin === 'env' ? + arg : + bin + (arg ? ' ' + arg : '') + ); +}; diff --git a/node_modules/shebang-command/license b/node_modules/shebang-command/license new file mode 100644 index 00000000..0f8cf79c --- /dev/null +++ b/node_modules/shebang-command/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Kevin Martensson (github.com/kevva) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/shebang-command/package.json b/node_modules/shebang-command/package.json new file mode 100644 index 00000000..3bf9880b --- /dev/null +++ b/node_modules/shebang-command/package.json @@ -0,0 +1,74 @@ +{ + "_args": [ + [ + "shebang-command@1.2.0", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "shebang-command@1.2.0", + "_id": "shebang-command@1.2.0", + "_inBundle": false, + "_integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "_location": "/shebang-command", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "shebang-command@1.2.0", + "name": "shebang-command", + "escapedName": "shebang-command", + "rawSpec": "1.2.0", + "saveSpec": null, + "fetchSpec": "1.2.0" + }, + "_requiredBy": [ + "/cross-spawn" + ], + "_resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "_spec": "1.2.0", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "Kevin Martensson", + "email": "kevinmartensson@gmail.com", + "url": "github.com/kevva" + }, + "bugs": { + "url": "https://github.com/kevva/shebang-command/issues" + }, + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "description": "Get the command from a shebang", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/kevva/shebang-command#readme", + "keywords": [ + "cmd", + "command", + "parse", + "shebang" + ], + "license": "MIT", + "name": "shebang-command", + "repository": { + "type": "git", + "url": "git+https://github.com/kevva/shebang-command.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.2.0", + "xo": { + "ignores": [ + "test.js" + ] + } +} diff --git a/node_modules/shebang-command/readme.md b/node_modules/shebang-command/readme.md new file mode 100644 index 00000000..16b0be4d --- /dev/null +++ b/node_modules/shebang-command/readme.md @@ -0,0 +1,39 @@ +# shebang-command [![Build Status](https://travis-ci.org/kevva/shebang-command.svg?branch=master)](https://travis-ci.org/kevva/shebang-command) + +> Get the command from a shebang + + +## Install + +``` +$ npm install --save shebang-command +``` + + +## Usage + +```js +const shebangCommand = require('shebang-command'); + +shebangCommand('#!/usr/bin/env node'); +//=> 'node' + +shebangCommand('#!/bin/bash'); +//=> 'bash' +``` + + +## API + +### shebangCommand(string) + +#### string + +Type: `string` + +String containing a shebang. + + +## License + +MIT © [Kevin Martensson](http://github.com/kevva) diff --git a/node_modules/shebang-regex/index.js b/node_modules/shebang-regex/index.js new file mode 100644 index 00000000..d052d2e0 --- /dev/null +++ b/node_modules/shebang-regex/index.js @@ -0,0 +1,2 @@ +'use strict'; +module.exports = /^#!.*/; diff --git a/node_modules/shebang-regex/license b/node_modules/shebang-regex/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/node_modules/shebang-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/node_modules/shebang-regex/package.json b/node_modules/shebang-regex/package.json new file mode 100644 index 00000000..af990c41 --- /dev/null +++ b/node_modules/shebang-regex/package.json @@ -0,0 +1,67 @@ +{ + "_args": [ + [ + "shebang-regex@1.0.0", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "shebang-regex@1.0.0", + "_id": "shebang-regex@1.0.0", + "_inBundle": false, + "_integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "_location": "/shebang-regex", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "shebang-regex@1.0.0", + "name": "shebang-regex", + "escapedName": "shebang-regex", + "rawSpec": "1.0.0", + "saveSpec": null, + "fetchSpec": "1.0.0" + }, + "_requiredBy": [ + "/shebang-command" + ], + "_resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "_spec": "1.0.0", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/shebang-regex/issues" + }, + "description": "Regular expression for matching a shebang", + "devDependencies": { + "ava": "0.0.4" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/shebang-regex#readme", + "keywords": [ + "re", + "regex", + "regexp", + "shebang", + "match", + "test" + ], + "license": "MIT", + "name": "shebang-regex", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/shebang-regex.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.0" +} diff --git a/node_modules/shebang-regex/readme.md b/node_modules/shebang-regex/readme.md new file mode 100644 index 00000000..ef75e51b --- /dev/null +++ b/node_modules/shebang-regex/readme.md @@ -0,0 +1,29 @@ +# shebang-regex [![Build Status](https://travis-ci.org/sindresorhus/shebang-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/shebang-regex) + +> Regular expression for matching a [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) + + +## Install + +``` +$ npm install --save shebang-regex +``` + + +## Usage + +```js +var shebangRegex = require('shebang-regex'); +var str = '#!/usr/bin/env node\nconsole.log("unicorns");'; + +shebangRegex.test(str); +//=> true + +shebangRegex.exec(str)[0]; +//=> '#!/usr/bin/env node' +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/signal-exit/CHANGELOG.md b/node_modules/signal-exit/CHANGELOG.md new file mode 100644 index 00000000..e2f70d22 --- /dev/null +++ b/node_modules/signal-exit/CHANGELOG.md @@ -0,0 +1,27 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +## [3.0.1](https://github.com/tapjs/signal-exit/compare/v3.0.0...v3.0.1) (2016-09-08) + + +### Bug Fixes + +* do not listen on SIGBUS, SIGFPE, SIGSEGV and SIGILL ([#40](https://github.com/tapjs/signal-exit/issues/40)) ([5b105fb](https://github.com/tapjs/signal-exit/commit/5b105fb)) + + + + +# [3.0.0](https://github.com/tapjs/signal-exit/compare/v2.1.2...v3.0.0) (2016-06-13) + + +### Bug Fixes + +* get our test suite running on Windows ([#23](https://github.com/tapjs/signal-exit/issues/23)) ([6f3eda8](https://github.com/tapjs/signal-exit/commit/6f3eda8)) +* hooking SIGPROF was interfering with profilers see [#21](https://github.com/tapjs/signal-exit/issues/21) ([#24](https://github.com/tapjs/signal-exit/issues/24)) ([1248a4c](https://github.com/tapjs/signal-exit/commit/1248a4c)) + + +### BREAKING CHANGES + +* signal-exit no longer wires into SIGPROF diff --git a/node_modules/signal-exit/LICENSE.txt b/node_modules/signal-exit/LICENSE.txt new file mode 100644 index 00000000..eead04a1 --- /dev/null +++ b/node_modules/signal-exit/LICENSE.txt @@ -0,0 +1,16 @@ +The ISC License + +Copyright (c) 2015, Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/signal-exit/README.md b/node_modules/signal-exit/README.md new file mode 100644 index 00000000..8ebccabe --- /dev/null +++ b/node_modules/signal-exit/README.md @@ -0,0 +1,40 @@ +# signal-exit + +[![Build Status](https://travis-ci.org/tapjs/signal-exit.png)](https://travis-ci.org/tapjs/signal-exit) +[![Coverage](https://coveralls.io/repos/tapjs/signal-exit/badge.svg?branch=master)](https://coveralls.io/r/tapjs/signal-exit?branch=master) +[![NPM version](https://img.shields.io/npm/v/signal-exit.svg)](https://www.npmjs.com/package/signal-exit) +[![Windows Tests](https://img.shields.io/appveyor/ci/bcoe/signal-exit/master.svg?label=Windows%20Tests)](https://ci.appveyor.com/project/bcoe/signal-exit) +[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) + +When you want to fire an event no matter how a process exits: + +* reaching the end of execution. +* explicitly having `process.exit(code)` called. +* having `process.kill(pid, sig)` called. +* receiving a fatal signal from outside the process + +Use `signal-exit`. + +```js +var onExit = require('signal-exit') + +onExit(function (code, signal) { + console.log('process exited!') +}) +``` + +## API + +`var remove = onExit(function (code, signal) {}, options)` + +The return value of the function is a function that will remove the +handler. + +Note that the function *only* fires for signals if the signal would +cause the proces to exit. That is, there are no other listeners, and +it is a fatal signal. + +## Options + +* `alwaysLast`: Run this handler after any other signal or exit + handlers. This causes `process.emit` to be monkeypatched. diff --git a/node_modules/signal-exit/index.js b/node_modules/signal-exit/index.js new file mode 100644 index 00000000..337f691e --- /dev/null +++ b/node_modules/signal-exit/index.js @@ -0,0 +1,157 @@ +// Note: since nyc uses this module to output coverage, any lines +// that are in the direct sync flow of nyc's outputCoverage are +// ignored, since we can never get coverage for them. +var assert = require('assert') +var signals = require('./signals.js') + +var EE = require('events') +/* istanbul ignore if */ +if (typeof EE !== 'function') { + EE = EE.EventEmitter +} + +var emitter +if (process.__signal_exit_emitter__) { + emitter = process.__signal_exit_emitter__ +} else { + emitter = process.__signal_exit_emitter__ = new EE() + emitter.count = 0 + emitter.emitted = {} +} + +// Because this emitter is a global, we have to check to see if a +// previous version of this library failed to enable infinite listeners. +// I know what you're about to say. But literally everything about +// signal-exit is a compromise with evil. Get used to it. +if (!emitter.infinite) { + emitter.setMaxListeners(Infinity) + emitter.infinite = true +} + +module.exports = function (cb, opts) { + assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler') + + if (loaded === false) { + load() + } + + var ev = 'exit' + if (opts && opts.alwaysLast) { + ev = 'afterexit' + } + + var remove = function () { + emitter.removeListener(ev, cb) + if (emitter.listeners('exit').length === 0 && + emitter.listeners('afterexit').length === 0) { + unload() + } + } + emitter.on(ev, cb) + + return remove +} + +module.exports.unload = unload +function unload () { + if (!loaded) { + return + } + loaded = false + + signals.forEach(function (sig) { + try { + process.removeListener(sig, sigListeners[sig]) + } catch (er) {} + }) + process.emit = originalProcessEmit + process.reallyExit = originalProcessReallyExit + emitter.count -= 1 +} + +function emit (event, code, signal) { + if (emitter.emitted[event]) { + return + } + emitter.emitted[event] = true + emitter.emit(event, code, signal) +} + +// { : , ... } +var sigListeners = {} +signals.forEach(function (sig) { + sigListeners[sig] = function listener () { + // If there are no other listeners, an exit is coming! + // Simplest way: remove us and then re-send the signal. + // We know that this will kill the process, so we can + // safely emit now. + var listeners = process.listeners(sig) + if (listeners.length === emitter.count) { + unload() + emit('exit', null, sig) + /* istanbul ignore next */ + emit('afterexit', null, sig) + /* istanbul ignore next */ + process.kill(process.pid, sig) + } + } +}) + +module.exports.signals = function () { + return signals +} + +module.exports.load = load + +var loaded = false + +function load () { + if (loaded) { + return + } + loaded = true + + // This is the number of onSignalExit's that are in play. + // It's important so that we can count the correct number of + // listeners on signals, and don't wait for the other one to + // handle it instead of us. + emitter.count += 1 + + signals = signals.filter(function (sig) { + try { + process.on(sig, sigListeners[sig]) + return true + } catch (er) { + return false + } + }) + + process.emit = processEmit + process.reallyExit = processReallyExit +} + +var originalProcessReallyExit = process.reallyExit +function processReallyExit (code) { + process.exitCode = code || 0 + emit('exit', process.exitCode, null) + /* istanbul ignore next */ + emit('afterexit', process.exitCode, null) + /* istanbul ignore next */ + originalProcessReallyExit.call(process, process.exitCode) +} + +var originalProcessEmit = process.emit +function processEmit (ev, arg) { + if (ev === 'exit') { + if (arg !== undefined) { + process.exitCode = arg + } + var ret = originalProcessEmit.apply(this, arguments) + emit('exit', process.exitCode, null) + /* istanbul ignore next */ + emit('afterexit', process.exitCode, null) + return ret + } else { + return originalProcessEmit.apply(this, arguments) + } +} diff --git a/node_modules/signal-exit/package.json b/node_modules/signal-exit/package.json new file mode 100644 index 00000000..efaf846b --- /dev/null +++ b/node_modules/signal-exit/package.json @@ -0,0 +1,70 @@ +{ + "_args": [ + [ + "signal-exit@3.0.2", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "signal-exit@3.0.2", + "_id": "signal-exit@3.0.2", + "_inBundle": false, + "_integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "_location": "/signal-exit", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "signal-exit@3.0.2", + "name": "signal-exit", + "escapedName": "signal-exit", + "rawSpec": "3.0.2", + "saveSpec": null, + "fetchSpec": "3.0.2" + }, + "_requiredBy": [ + "/execa", + "/write-file-atomic" + ], + "_resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "_spec": "3.0.2", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "Ben Coe", + "email": "ben@npmjs.com" + }, + "bugs": { + "url": "https://github.com/tapjs/signal-exit/issues" + }, + "description": "when you want to fire an event no matter how a process exits.", + "devDependencies": { + "chai": "^3.5.0", + "coveralls": "^2.11.10", + "nyc": "^8.1.0", + "standard": "^7.1.2", + "standard-version": "^2.3.0", + "tap": "^8.0.1" + }, + "files": [ + "index.js", + "signals.js" + ], + "homepage": "https://github.com/tapjs/signal-exit", + "keywords": [ + "signal", + "exit" + ], + "license": "ISC", + "main": "index.js", + "name": "signal-exit", + "repository": { + "type": "git", + "url": "git+https://github.com/tapjs/signal-exit.git" + }, + "scripts": { + "coverage": "nyc report --reporter=text-lcov | coveralls", + "pretest": "standard", + "release": "standard-version", + "test": "tap --timeout=240 ./test/*.js --cov" + }, + "version": "3.0.2" +} diff --git a/node_modules/signal-exit/signals.js b/node_modules/signal-exit/signals.js new file mode 100644 index 00000000..3bd67a8a --- /dev/null +++ b/node_modules/signal-exit/signals.js @@ -0,0 +1,53 @@ +// This is not the set of all possible signals. +// +// It IS, however, the set of all signals that trigger +// an exit on either Linux or BSD systems. Linux is a +// superset of the signal names supported on BSD, and +// the unknown signals just fail to register, so we can +// catch that easily enough. +// +// Don't bother with SIGKILL. It's uncatchable, which +// means that we can't fire any callbacks anyway. +// +// If a user does happen to register a handler on a non- +// fatal signal like SIGWINCH or something, and then +// exit, it'll end up firing `process.emit('exit')`, so +// the handler will be fired anyway. +// +// SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised +// artificially, inherently leave the process in a +// state from which it is not safe to try and enter JS +// listeners. +module.exports = [ + 'SIGABRT', + 'SIGALRM', + 'SIGHUP', + 'SIGINT', + 'SIGTERM' +] + +if (process.platform !== 'win32') { + module.exports.push( + 'SIGVTALRM', + 'SIGXCPU', + 'SIGXFSZ', + 'SIGUSR2', + 'SIGTRAP', + 'SIGSYS', + 'SIGQUIT', + 'SIGIOT' + // should detect profiler and enable/disable accordingly. + // see #21 + // 'SIGPROF' + ) +} + +if (process.platform === 'linux') { + module.exports.push( + 'SIGIO', + 'SIGPOLL', + 'SIGPWR', + 'SIGSTKFLT', + 'SIGUNUSED' + ) +} diff --git a/node_modules/strip-eof/index.js b/node_modules/strip-eof/index.js new file mode 100644 index 00000000..a17d0afd --- /dev/null +++ b/node_modules/strip-eof/index.js @@ -0,0 +1,15 @@ +'use strict'; +module.exports = function (x) { + var lf = typeof x === 'string' ? '\n' : '\n'.charCodeAt(); + var cr = typeof x === 'string' ? '\r' : '\r'.charCodeAt(); + + if (x[x.length - 1] === lf) { + x = x.slice(0, x.length - 1); + } + + if (x[x.length - 1] === cr) { + x = x.slice(0, x.length - 1); + } + + return x; +}; diff --git a/node_modules/strip-eof/license b/node_modules/strip-eof/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/node_modules/strip-eof/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/strip-eof/package.json b/node_modules/strip-eof/package.json new file mode 100644 index 00000000..4c21605c --- /dev/null +++ b/node_modules/strip-eof/package.json @@ -0,0 +1,74 @@ +{ + "_args": [ + [ + "strip-eof@1.0.0", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "strip-eof@1.0.0", + "_id": "strip-eof@1.0.0", + "_inBundle": false, + "_integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "_location": "/strip-eof", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "strip-eof@1.0.0", + "name": "strip-eof", + "escapedName": "strip-eof", + "rawSpec": "1.0.0", + "saveSpec": null, + "fetchSpec": "1.0.0" + }, + "_requiredBy": [ + "/execa" + ], + "_resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "_spec": "1.0.0", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/strip-eof/issues" + }, + "description": "Strip the End-Of-File (EOF) character from a string/buffer", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/strip-eof#readme", + "keywords": [ + "strip", + "trim", + "remove", + "delete", + "eof", + "end", + "file", + "newline", + "linebreak", + "character", + "string", + "buffer" + ], + "license": "MIT", + "name": "strip-eof", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/strip-eof.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.0" +} diff --git a/node_modules/strip-eof/readme.md b/node_modules/strip-eof/readme.md new file mode 100644 index 00000000..45ffe043 --- /dev/null +++ b/node_modules/strip-eof/readme.md @@ -0,0 +1,28 @@ +# strip-eof [![Build Status](https://travis-ci.org/sindresorhus/strip-eof.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-eof) + +> Strip the [End-Of-File](https://en.wikipedia.org/wiki/End-of-file) (EOF) character from a string/buffer + + +## Install + +``` +$ npm install --save strip-eof +``` + + +## Usage + +```js +const stripEof = require('strip-eof'); + +stripEof('foo\nbar\n\n'); +//=> 'foo\nbar\n' + +stripEof(new Buffer('foo\nbar\n\n')).toString(); +//=> 'foo\nbar\n' +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/type-detect/LICENSE b/node_modules/type-detect/LICENSE new file mode 100644 index 00000000..7ea799f0 --- /dev/null +++ b/node_modules/type-detect/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2013 Jake Luer (http://alogicalparadox.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/type-detect/README.md b/node_modules/type-detect/README.md new file mode 100644 index 00000000..d2c4cb7e --- /dev/null +++ b/node_modules/type-detect/README.md @@ -0,0 +1,228 @@ +

+ + ChaiJS type-detect + +

+
+

+ Improved typeof detection for node and the browser. +

+ +

+ + license:mit + + + tag:? + + + build:? + + + coverage:? + + + npm:? + + + dependencies:? + + + devDependencies:? + +
+ + + + + + + + + + + + + + +
Supported Browsers
Chrome Edge Firefox Safari IE
9, 10, 11
+
+ + Join the Slack chat + + + Join the Gitter chat + +

+ +## What is Type-Detect? + +Type Detect is a module which you can use to detect the type of a given object. It returns a string representation of the object's type, either using [`typeof`](http://www.ecma-international.org/ecma-262/6.0/index.html#sec-typeof-operator) or [`@@toStringTag`](http://www.ecma-international.org/ecma-262/6.0/index.html#sec-symbol.tostringtag). It also normalizes some object names for consistency among browsers. + +## Why? + +The `typeof` operator will only specify primitive values; everything else is `"object"` (including `null`, arrays, regexps, etc). Many developers use `Object.prototype.toString()` - which is a fine alternative and returns many more types (null returns `[object Null]`, Arrays as `[object Array]`, regexps as `[object RegExp]` etc). + +Sadly, `Object.prototype.toString` is slow, and buggy. By slow - we mean it is slower than `typeof`. By buggy - we mean that some values (like Promises, the global object, iterators, dataviews, a bunch of HTML elements) all report different things in different browsers. + +`type-detect` fixes all of the shortcomings with `Object.prototype.toString`. We have extra code to speed up checks of JS and DOM objects, as much as 20-30x faster for some values. `type-detect` also fixes any consistencies with these objects. + +## Installation + +### Node.js + +`type-detect` is available on [npm](http://npmjs.org). To install it, type: + + $ npm install type-detect + +### Browsers + +You can also use it within the browser; install via npm and use the `type-detect.js` file found within the download. For example: + +```html + +``` + +## Usage + +The primary export of `type-detect` is function that can serve as a replacement for `typeof`. The results of this function will be more specific than that of native `typeof`. + +```js +var type = require('type-detect'); +``` + +#### array + +```js +assert(type([]) === 'Array'); +assert(type(new Array()) === 'Array'); +``` + +#### regexp + +```js +assert(type(/a-z/gi) === 'RegExp'); +assert(type(new RegExp('a-z')) === 'RegExp'); +``` + +#### function + +```js +assert(type(function () {}) === 'function'); +``` + +#### arguments + +```js +(function () { + assert(type(arguments) === 'Arguments'); +})(); +``` + +#### date + +```js +assert(type(new Date) === 'Date'); +``` + +#### number + +```js +assert(type(1) === 'number'); +assert(type(1.234) === 'number'); +assert(type(-1) === 'number'); +assert(type(-1.234) === 'number'); +assert(type(Infinity) === 'number'); +assert(type(NaN) === 'number'); +assert(type(new Number(1)) === 'Number'); // note - the object version has a capital N +``` + +#### string + +```js +assert(type('hello world') === 'string'); +assert(type(new String('hello')) === 'String'); // note - the object version has a capital S +``` + +#### null + +```js +assert(type(null) === 'null'); +assert(type(undefined) !== 'null'); +``` + +#### undefined + +```js +assert(type(undefined) === 'undefined'); +assert(type(null) !== 'undefined'); +``` + +#### object + +```js +var Noop = function () {}; +assert(type({}) === 'Object'); +assert(type(Noop) !== 'Object'); +assert(type(new Noop) === 'Object'); +assert(type(new Object) === 'Object'); +``` + +#### ECMA6 Types + +All new ECMAScript 2015 objects are also supported, such as Promises and Symbols: + +```js +assert(type(new Map() === 'Map'); +assert(type(new WeakMap()) === 'WeakMap'); +assert(type(new Set()) === 'Set'); +assert(type(new WeakSet()) === 'WeakSet'); +assert(type(Symbol()) === 'symbol'); +assert(type(new Promise(callback) === 'Promise'); +assert(type(new Int8Array()) === 'Int8Array'); +assert(type(new Uint8Array()) === 'Uint8Array'); +assert(type(new UInt8ClampedArray()) === 'Uint8ClampedArray'); +assert(type(new Int16Array()) === 'Int16Array'); +assert(type(new Uint16Array()) === 'Uint16Array'); +assert(type(new Int32Array()) === 'Int32Array'); +assert(type(new UInt32Array()) === 'Uint32Array'); +assert(type(new Float32Array()) === 'Float32Array'); +assert(type(new Float64Array()) === 'Float64Array'); +assert(type(new ArrayBuffer()) === 'ArrayBuffer'); +assert(type(new DataView(arrayBuffer)) === 'DataView'); +``` + +Also, if you use `Symbol.toStringTag` to change an Objects return value of the `toString()` Method, `type()` will return this value, e.g: + +```js +var myObject = {}; +myObject[Symbol.toStringTag] = 'myCustomType'; +assert(type(myObject) === 'myCustomType'); +``` diff --git a/node_modules/type-detect/index.js b/node_modules/type-detect/index.js new file mode 100644 index 00000000..98a1e031 --- /dev/null +++ b/node_modules/type-detect/index.js @@ -0,0 +1,378 @@ +/* ! + * type-detect + * Copyright(c) 2013 jake luer + * MIT Licensed + */ +const promiseExists = typeof Promise === 'function'; + +/* eslint-disable no-undef */ +const globalObject = typeof self === 'object' ? self : global; // eslint-disable-line id-blacklist + +const symbolExists = typeof Symbol !== 'undefined'; +const mapExists = typeof Map !== 'undefined'; +const setExists = typeof Set !== 'undefined'; +const weakMapExists = typeof WeakMap !== 'undefined'; +const weakSetExists = typeof WeakSet !== 'undefined'; +const dataViewExists = typeof DataView !== 'undefined'; +const symbolIteratorExists = symbolExists && typeof Symbol.iterator !== 'undefined'; +const symbolToStringTagExists = symbolExists && typeof Symbol.toStringTag !== 'undefined'; +const setEntriesExists = setExists && typeof Set.prototype.entries === 'function'; +const mapEntriesExists = mapExists && typeof Map.prototype.entries === 'function'; +const setIteratorPrototype = setEntriesExists && Object.getPrototypeOf(new Set().entries()); +const mapIteratorPrototype = mapEntriesExists && Object.getPrototypeOf(new Map().entries()); +const arrayIteratorExists = symbolIteratorExists && typeof Array.prototype[Symbol.iterator] === 'function'; +const arrayIteratorPrototype = arrayIteratorExists && Object.getPrototypeOf([][Symbol.iterator]()); +const stringIteratorExists = symbolIteratorExists && typeof String.prototype[Symbol.iterator] === 'function'; +const stringIteratorPrototype = stringIteratorExists && Object.getPrototypeOf(''[Symbol.iterator]()); +const toStringLeftSliceLength = 8; +const toStringRightSliceLength = -1; +/** + * ### typeOf (obj) + * + * Uses `Object.prototype.toString` to determine the type of an object, + * normalising behaviour across engine versions & well optimised. + * + * @param {Mixed} object + * @return {String} object type + * @api public + */ +export default function typeDetect(obj) { + /* ! Speed optimisation + * Pre: + * string literal x 3,039,035 ops/sec ±1.62% (78 runs sampled) + * boolean literal x 1,424,138 ops/sec ±4.54% (75 runs sampled) + * number literal x 1,653,153 ops/sec ±1.91% (82 runs sampled) + * undefined x 9,978,660 ops/sec ±1.92% (75 runs sampled) + * function x 2,556,769 ops/sec ±1.73% (77 runs sampled) + * Post: + * string literal x 38,564,796 ops/sec ±1.15% (79 runs sampled) + * boolean literal x 31,148,940 ops/sec ±1.10% (79 runs sampled) + * number literal x 32,679,330 ops/sec ±1.90% (78 runs sampled) + * undefined x 32,363,368 ops/sec ±1.07% (82 runs sampled) + * function x 31,296,870 ops/sec ±0.96% (83 runs sampled) + */ + const typeofObj = typeof obj; + if (typeofObj !== 'object') { + return typeofObj; + } + + /* ! Speed optimisation + * Pre: + * null x 28,645,765 ops/sec ±1.17% (82 runs sampled) + * Post: + * null x 36,428,962 ops/sec ±1.37% (84 runs sampled) + */ + if (obj === null) { + return 'null'; + } + + /* ! Spec Conformance + * Test: `Object.prototype.toString.call(window)`` + * - Node === "[object global]" + * - Chrome === "[object global]" + * - Firefox === "[object Window]" + * - PhantomJS === "[object Window]" + * - Safari === "[object Window]" + * - IE 11 === "[object Window]" + * - IE Edge === "[object Window]" + * Test: `Object.prototype.toString.call(this)`` + * - Chrome Worker === "[object global]" + * - Firefox Worker === "[object DedicatedWorkerGlobalScope]" + * - Safari Worker === "[object DedicatedWorkerGlobalScope]" + * - IE 11 Worker === "[object WorkerGlobalScope]" + * - IE Edge Worker === "[object WorkerGlobalScope]" + */ + if (obj === globalObject) { + return 'global'; + } + + /* ! Speed optimisation + * Pre: + * array literal x 2,888,352 ops/sec ±0.67% (82 runs sampled) + * Post: + * array literal x 22,479,650 ops/sec ±0.96% (81 runs sampled) + */ + if ( + Array.isArray(obj) && + (symbolToStringTagExists === false || !(Symbol.toStringTag in obj)) + ) { + return 'Array'; + } + + // Not caching existence of `window` and related properties due to potential + // for `window` to be unset before tests in quasi-browser environments. + if (typeof window === 'object' && window !== null) { + /* ! Spec Conformance + * (https://html.spec.whatwg.org/multipage/browsers.html#location) + * WhatWG HTML$7.7.3 - The `Location` interface + * Test: `Object.prototype.toString.call(window.location)`` + * - IE <=11 === "[object Object]" + * - IE Edge <=13 === "[object Object]" + */ + if (typeof window.location === 'object' && obj === window.location) { + return 'Location'; + } + + /* ! Spec Conformance + * (https://html.spec.whatwg.org/#document) + * WhatWG HTML$3.1.1 - The `Document` object + * Note: Most browsers currently adher to the W3C DOM Level 2 spec + * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-26809268) + * which suggests that browsers should use HTMLTableCellElement for + * both TD and TH elements. WhatWG separates these. + * WhatWG HTML states: + * > For historical reasons, Window objects must also have a + * > writable, configurable, non-enumerable property named + * > HTMLDocument whose value is the Document interface object. + * Test: `Object.prototype.toString.call(document)`` + * - Chrome === "[object HTMLDocument]" + * - Firefox === "[object HTMLDocument]" + * - Safari === "[object HTMLDocument]" + * - IE <=10 === "[object Document]" + * - IE 11 === "[object HTMLDocument]" + * - IE Edge <=13 === "[object HTMLDocument]" + */ + if (typeof window.document === 'object' && obj === window.document) { + return 'Document'; + } + + if (typeof window.navigator === 'object') { + /* ! Spec Conformance + * (https://html.spec.whatwg.org/multipage/webappapis.html#mimetypearray) + * WhatWG HTML$8.6.1.5 - Plugins - Interface MimeTypeArray + * Test: `Object.prototype.toString.call(navigator.mimeTypes)`` + * - IE <=10 === "[object MSMimeTypesCollection]" + */ + if (typeof window.navigator.mimeTypes === 'object' && + obj === window.navigator.mimeTypes) { + return 'MimeTypeArray'; + } + + /* ! Spec Conformance + * (https://html.spec.whatwg.org/multipage/webappapis.html#pluginarray) + * WhatWG HTML$8.6.1.5 - Plugins - Interface PluginArray + * Test: `Object.prototype.toString.call(navigator.plugins)`` + * - IE <=10 === "[object MSPluginsCollection]" + */ + if (typeof window.navigator.plugins === 'object' && + obj === window.navigator.plugins) { + return 'PluginArray'; + } + } + + if ((typeof window.HTMLElement === 'function' || + typeof window.HTMLElement === 'object') && + obj instanceof window.HTMLElement) { + /* ! Spec Conformance + * (https://html.spec.whatwg.org/multipage/webappapis.html#pluginarray) + * WhatWG HTML$4.4.4 - The `blockquote` element - Interface `HTMLQuoteElement` + * Test: `Object.prototype.toString.call(document.createElement('blockquote'))`` + * - IE <=10 === "[object HTMLBlockElement]" + */ + if (obj.tagName === 'BLOCKQUOTE') { + return 'HTMLQuoteElement'; + } + + /* ! Spec Conformance + * (https://html.spec.whatwg.org/#htmltabledatacellelement) + * WhatWG HTML$4.9.9 - The `td` element - Interface `HTMLTableDataCellElement` + * Note: Most browsers currently adher to the W3C DOM Level 2 spec + * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-82915075) + * which suggests that browsers should use HTMLTableCellElement for + * both TD and TH elements. WhatWG separates these. + * Test: Object.prototype.toString.call(document.createElement('td')) + * - Chrome === "[object HTMLTableCellElement]" + * - Firefox === "[object HTMLTableCellElement]" + * - Safari === "[object HTMLTableCellElement]" + */ + if (obj.tagName === 'TD') { + return 'HTMLTableDataCellElement'; + } + + /* ! Spec Conformance + * (https://html.spec.whatwg.org/#htmltableheadercellelement) + * WhatWG HTML$4.9.9 - The `td` element - Interface `HTMLTableHeaderCellElement` + * Note: Most browsers currently adher to the W3C DOM Level 2 spec + * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-82915075) + * which suggests that browsers should use HTMLTableCellElement for + * both TD and TH elements. WhatWG separates these. + * Test: Object.prototype.toString.call(document.createElement('th')) + * - Chrome === "[object HTMLTableCellElement]" + * - Firefox === "[object HTMLTableCellElement]" + * - Safari === "[object HTMLTableCellElement]" + */ + if (obj.tagName === 'TH') { + return 'HTMLTableHeaderCellElement'; + } + } + } + + /* ! Speed optimisation + * Pre: + * Float64Array x 625,644 ops/sec ±1.58% (80 runs sampled) + * Float32Array x 1,279,852 ops/sec ±2.91% (77 runs sampled) + * Uint32Array x 1,178,185 ops/sec ±1.95% (83 runs sampled) + * Uint16Array x 1,008,380 ops/sec ±2.25% (80 runs sampled) + * Uint8Array x 1,128,040 ops/sec ±2.11% (81 runs sampled) + * Int32Array x 1,170,119 ops/sec ±2.88% (80 runs sampled) + * Int16Array x 1,176,348 ops/sec ±5.79% (86 runs sampled) + * Int8Array x 1,058,707 ops/sec ±4.94% (77 runs sampled) + * Uint8ClampedArray x 1,110,633 ops/sec ±4.20% (80 runs sampled) + * Post: + * Float64Array x 7,105,671 ops/sec ±13.47% (64 runs sampled) + * Float32Array x 5,887,912 ops/sec ±1.46% (82 runs sampled) + * Uint32Array x 6,491,661 ops/sec ±1.76% (79 runs sampled) + * Uint16Array x 6,559,795 ops/sec ±1.67% (82 runs sampled) + * Uint8Array x 6,463,966 ops/sec ±1.43% (85 runs sampled) + * Int32Array x 5,641,841 ops/sec ±3.49% (81 runs sampled) + * Int16Array x 6,583,511 ops/sec ±1.98% (80 runs sampled) + * Int8Array x 6,606,078 ops/sec ±1.74% (81 runs sampled) + * Uint8ClampedArray x 6,602,224 ops/sec ±1.77% (83 runs sampled) + */ + const stringTag = (symbolToStringTagExists && obj[Symbol.toStringTag]); + if (typeof stringTag === 'string') { + return stringTag; + } + + const objPrototype = Object.getPrototypeOf(obj); + /* ! Speed optimisation + * Pre: + * regex literal x 1,772,385 ops/sec ±1.85% (77 runs sampled) + * regex constructor x 2,143,634 ops/sec ±2.46% (78 runs sampled) + * Post: + * regex literal x 3,928,009 ops/sec ±0.65% (78 runs sampled) + * regex constructor x 3,931,108 ops/sec ±0.58% (84 runs sampled) + */ + if (objPrototype === RegExp.prototype) { + return 'RegExp'; + } + + /* ! Speed optimisation + * Pre: + * date x 2,130,074 ops/sec ±4.42% (68 runs sampled) + * Post: + * date x 3,953,779 ops/sec ±1.35% (77 runs sampled) + */ + if (objPrototype === Date.prototype) { + return 'Date'; + } + + /* ! Spec Conformance + * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-promise.prototype-@@tostringtag) + * ES6$25.4.5.4 - Promise.prototype[@@toStringTag] should be "Promise": + * Test: `Object.prototype.toString.call(Promise.resolve())`` + * - Chrome <=47 === "[object Object]" + * - Edge <=20 === "[object Object]" + * - Firefox 29-Latest === "[object Promise]" + * - Safari 7.1-Latest === "[object Promise]" + */ + if (promiseExists && objPrototype === Promise.prototype) { + return 'Promise'; + } + + /* ! Speed optimisation + * Pre: + * set x 2,222,186 ops/sec ±1.31% (82 runs sampled) + * Post: + * set x 4,545,879 ops/sec ±1.13% (83 runs sampled) + */ + if (setExists && objPrototype === Set.prototype) { + return 'Set'; + } + + /* ! Speed optimisation + * Pre: + * map x 2,396,842 ops/sec ±1.59% (81 runs sampled) + * Post: + * map x 4,183,945 ops/sec ±6.59% (82 runs sampled) + */ + if (mapExists && objPrototype === Map.prototype) { + return 'Map'; + } + + /* ! Speed optimisation + * Pre: + * weakset x 1,323,220 ops/sec ±2.17% (76 runs sampled) + * Post: + * weakset x 4,237,510 ops/sec ±2.01% (77 runs sampled) + */ + if (weakSetExists && objPrototype === WeakSet.prototype) { + return 'WeakSet'; + } + + /* ! Speed optimisation + * Pre: + * weakmap x 1,500,260 ops/sec ±2.02% (78 runs sampled) + * Post: + * weakmap x 3,881,384 ops/sec ±1.45% (82 runs sampled) + */ + if (weakMapExists && objPrototype === WeakMap.prototype) { + return 'WeakMap'; + } + + /* ! Spec Conformance + * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-dataview.prototype-@@tostringtag) + * ES6$24.2.4.21 - DataView.prototype[@@toStringTag] should be "DataView": + * Test: `Object.prototype.toString.call(new DataView(new ArrayBuffer(1)))`` + * - Edge <=13 === "[object Object]" + */ + if (dataViewExists && objPrototype === DataView.prototype) { + return 'DataView'; + } + + /* ! Spec Conformance + * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%mapiteratorprototype%-@@tostringtag) + * ES6$23.1.5.2.2 - %MapIteratorPrototype%[@@toStringTag] should be "Map Iterator": + * Test: `Object.prototype.toString.call(new Map().entries())`` + * - Edge <=13 === "[object Object]" + */ + if (mapExists && objPrototype === mapIteratorPrototype) { + return 'Map Iterator'; + } + + /* ! Spec Conformance + * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%setiteratorprototype%-@@tostringtag) + * ES6$23.2.5.2.2 - %SetIteratorPrototype%[@@toStringTag] should be "Set Iterator": + * Test: `Object.prototype.toString.call(new Set().entries())`` + * - Edge <=13 === "[object Object]" + */ + if (setExists && objPrototype === setIteratorPrototype) { + return 'Set Iterator'; + } + + /* ! Spec Conformance + * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%arrayiteratorprototype%-@@tostringtag) + * ES6$22.1.5.2.2 - %ArrayIteratorPrototype%[@@toStringTag] should be "Array Iterator": + * Test: `Object.prototype.toString.call([][Symbol.iterator]())`` + * - Edge <=13 === "[object Object]" + */ + if (arrayIteratorExists && objPrototype === arrayIteratorPrototype) { + return 'Array Iterator'; + } + + /* ! Spec Conformance + * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%stringiteratorprototype%-@@tostringtag) + * ES6$21.1.5.2.2 - %StringIteratorPrototype%[@@toStringTag] should be "String Iterator": + * Test: `Object.prototype.toString.call(''[Symbol.iterator]())`` + * - Edge <=13 === "[object Object]" + */ + if (stringIteratorExists && objPrototype === stringIteratorPrototype) { + return 'String Iterator'; + } + + /* ! Speed optimisation + * Pre: + * object from null x 2,424,320 ops/sec ±1.67% (76 runs sampled) + * Post: + * object from null x 5,838,000 ops/sec ±0.99% (84 runs sampled) + */ + if (objPrototype === null) { + return 'Object'; + } + + return Object + .prototype + .toString + .call(obj) + .slice(toStringLeftSliceLength, toStringRightSliceLength); +} diff --git a/node_modules/type-detect/package.json b/node_modules/type-detect/package.json new file mode 100644 index 00000000..bb9c0820 --- /dev/null +++ b/node_modules/type-detect/package.json @@ -0,0 +1,172 @@ +{ + "_args": [ + [ + "type-detect@4.0.8", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "type-detect@4.0.8", + "_id": "type-detect@4.0.8", + "_inBundle": false, + "_integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "_location": "/type-detect", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "type-detect@4.0.8", + "name": "type-detect", + "escapedName": "type-detect", + "rawSpec": "4.0.8", + "saveSpec": null, + "fetchSpec": "4.0.8" + }, + "_requiredBy": [ + "/chai", + "/deep-eql" + ], + "_resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "_spec": "4.0.8", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "Jake Luer", + "email": "jake@alogicalparadox.com", + "url": "http://alogicalparadox.com" + }, + "bugs": { + "url": "https://github.com/chaijs/type-detect/issues" + }, + "contributors": [ + { + "name": "Keith Cirkel", + "url": "https://github.com/keithamus" + }, + { + "name": "David Losert", + "url": "https://github.com/davelosert" + }, + { + "name": "Aleksey Shvayka", + "url": "https://github.com/shvaikalesh" + }, + { + "name": "Lucas Fernandes da Costa", + "url": "https://github.com/lucasfcosta" + }, + { + "name": "Grant Snodgrass", + "url": "https://github.com/meeber" + }, + { + "name": "Jeremy Tice", + "url": "https://github.com/jetpacmonkey" + }, + { + "name": "Edward Betts", + "url": "https://github.com/EdwardBetts" + }, + { + "name": "dvlsg", + "url": "https://github.com/dvlsg" + }, + { + "name": "Amila Welihinda", + "url": "https://github.com/amilajack" + }, + { + "name": "Jake Champion", + "url": "https://github.com/JakeChampion" + }, + { + "name": "Miroslav Bajtoš", + "url": "https://github.com/bajtos" + } + ], + "description": "Improved typeof detection for node.js and the browser.", + "devDependencies": { + "@commitlint/cli": "^4.2.2", + "benchmark": "^2.1.0", + "buble": "^0.16.0", + "codecov": "^3.0.0", + "commitlint-config-angular": "^4.2.1", + "cross-env": "^5.1.1", + "eslint": "^4.10.0", + "eslint-config-strict": "^14.0.0", + "eslint-plugin-filenames": "^1.2.0", + "husky": "^0.14.3", + "karma": "^1.7.1", + "karma-chrome-launcher": "^2.2.0", + "karma-coverage": "^1.1.1", + "karma-detect-browsers": "^2.2.5", + "karma-edge-launcher": "^0.4.2", + "karma-firefox-launcher": "^1.0.1", + "karma-ie-launcher": "^1.0.0", + "karma-mocha": "^1.3.0", + "karma-opera-launcher": "^1.0.0", + "karma-safari-launcher": "^1.0.0", + "karma-safaritechpreview-launcher": "0.0.6", + "karma-sauce-launcher": "^1.2.0", + "mocha": "^4.0.1", + "nyc": "^11.3.0", + "rollup": "^0.50.0", + "rollup-plugin-buble": "^0.16.0", + "rollup-plugin-commonjs": "^8.2.6", + "rollup-plugin-istanbul": "^1.1.0", + "rollup-plugin-node-resolve": "^3.0.0", + "semantic-release": "^8.2.0", + "simple-assert": "^1.0.0" + }, + "engines": { + "node": ">=4" + }, + "eslintConfig": { + "env": { + "es6": true + }, + "extends": [ + "strict/es6" + ], + "globals": { + "HTMLElement": false + }, + "rules": { + "complexity": 0, + "max-statements": 0, + "prefer-rest-params": 0 + } + }, + "files": [ + "index.js", + "type-detect.js" + ], + "homepage": "https://github.com/chaijs/type-detect#readme", + "keywords": [ + "type", + "typeof", + "types" + ], + "license": "MIT", + "main": "./type-detect.js", + "name": "type-detect", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/chaijs/type-detect.git" + }, + "scripts": { + "bench": "node bench", + "build": "rollup -c rollup.conf.js", + "commit-msg": "commitlint -x angular", + "lint": "eslint --ignore-path .gitignore .", + "posttest:browser": "npm run upload-coverage", + "posttest:node": "nyc report --report-dir \"coverage/node-$(node --version)\" --reporter=lcovonly && npm run upload-coverage", + "prepare": "cross-env NODE_ENV=production npm run build", + "pretest:browser": "cross-env NODE_ENV=test npm run build", + "pretest:node": "cross-env NODE_ENV=test npm run build", + "semantic-release": "semantic-release pre && npm publish && semantic-release post", + "test": "npm run test:node && npm run test:browser", + "test:browser": "karma start --singleRun=true", + "test:node": "nyc mocha type-detect.test.js", + "upload-coverage": "codecov" + }, + "version": "4.0.8" +} diff --git a/node_modules/type-detect/type-detect.js b/node_modules/type-detect/type-detect.js new file mode 100644 index 00000000..2f555252 --- /dev/null +++ b/node_modules/type-detect/type-detect.js @@ -0,0 +1,388 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global.typeDetect = factory()); +}(this, (function () { 'use strict'; + +/* ! + * type-detect + * Copyright(c) 2013 jake luer + * MIT Licensed + */ +var promiseExists = typeof Promise === 'function'; + +/* eslint-disable no-undef */ +var globalObject = typeof self === 'object' ? self : global; // eslint-disable-line id-blacklist + +var symbolExists = typeof Symbol !== 'undefined'; +var mapExists = typeof Map !== 'undefined'; +var setExists = typeof Set !== 'undefined'; +var weakMapExists = typeof WeakMap !== 'undefined'; +var weakSetExists = typeof WeakSet !== 'undefined'; +var dataViewExists = typeof DataView !== 'undefined'; +var symbolIteratorExists = symbolExists && typeof Symbol.iterator !== 'undefined'; +var symbolToStringTagExists = symbolExists && typeof Symbol.toStringTag !== 'undefined'; +var setEntriesExists = setExists && typeof Set.prototype.entries === 'function'; +var mapEntriesExists = mapExists && typeof Map.prototype.entries === 'function'; +var setIteratorPrototype = setEntriesExists && Object.getPrototypeOf(new Set().entries()); +var mapIteratorPrototype = mapEntriesExists && Object.getPrototypeOf(new Map().entries()); +var arrayIteratorExists = symbolIteratorExists && typeof Array.prototype[Symbol.iterator] === 'function'; +var arrayIteratorPrototype = arrayIteratorExists && Object.getPrototypeOf([][Symbol.iterator]()); +var stringIteratorExists = symbolIteratorExists && typeof String.prototype[Symbol.iterator] === 'function'; +var stringIteratorPrototype = stringIteratorExists && Object.getPrototypeOf(''[Symbol.iterator]()); +var toStringLeftSliceLength = 8; +var toStringRightSliceLength = -1; +/** + * ### typeOf (obj) + * + * Uses `Object.prototype.toString` to determine the type of an object, + * normalising behaviour across engine versions & well optimised. + * + * @param {Mixed} object + * @return {String} object type + * @api public + */ +function typeDetect(obj) { + /* ! Speed optimisation + * Pre: + * string literal x 3,039,035 ops/sec ±1.62% (78 runs sampled) + * boolean literal x 1,424,138 ops/sec ±4.54% (75 runs sampled) + * number literal x 1,653,153 ops/sec ±1.91% (82 runs sampled) + * undefined x 9,978,660 ops/sec ±1.92% (75 runs sampled) + * function x 2,556,769 ops/sec ±1.73% (77 runs sampled) + * Post: + * string literal x 38,564,796 ops/sec ±1.15% (79 runs sampled) + * boolean literal x 31,148,940 ops/sec ±1.10% (79 runs sampled) + * number literal x 32,679,330 ops/sec ±1.90% (78 runs sampled) + * undefined x 32,363,368 ops/sec ±1.07% (82 runs sampled) + * function x 31,296,870 ops/sec ±0.96% (83 runs sampled) + */ + var typeofObj = typeof obj; + if (typeofObj !== 'object') { + return typeofObj; + } + + /* ! Speed optimisation + * Pre: + * null x 28,645,765 ops/sec ±1.17% (82 runs sampled) + * Post: + * null x 36,428,962 ops/sec ±1.37% (84 runs sampled) + */ + if (obj === null) { + return 'null'; + } + + /* ! Spec Conformance + * Test: `Object.prototype.toString.call(window)`` + * - Node === "[object global]" + * - Chrome === "[object global]" + * - Firefox === "[object Window]" + * - PhantomJS === "[object Window]" + * - Safari === "[object Window]" + * - IE 11 === "[object Window]" + * - IE Edge === "[object Window]" + * Test: `Object.prototype.toString.call(this)`` + * - Chrome Worker === "[object global]" + * - Firefox Worker === "[object DedicatedWorkerGlobalScope]" + * - Safari Worker === "[object DedicatedWorkerGlobalScope]" + * - IE 11 Worker === "[object WorkerGlobalScope]" + * - IE Edge Worker === "[object WorkerGlobalScope]" + */ + if (obj === globalObject) { + return 'global'; + } + + /* ! Speed optimisation + * Pre: + * array literal x 2,888,352 ops/sec ±0.67% (82 runs sampled) + * Post: + * array literal x 22,479,650 ops/sec ±0.96% (81 runs sampled) + */ + if ( + Array.isArray(obj) && + (symbolToStringTagExists === false || !(Symbol.toStringTag in obj)) + ) { + return 'Array'; + } + + // Not caching existence of `window` and related properties due to potential + // for `window` to be unset before tests in quasi-browser environments. + if (typeof window === 'object' && window !== null) { + /* ! Spec Conformance + * (https://html.spec.whatwg.org/multipage/browsers.html#location) + * WhatWG HTML$7.7.3 - The `Location` interface + * Test: `Object.prototype.toString.call(window.location)`` + * - IE <=11 === "[object Object]" + * - IE Edge <=13 === "[object Object]" + */ + if (typeof window.location === 'object' && obj === window.location) { + return 'Location'; + } + + /* ! Spec Conformance + * (https://html.spec.whatwg.org/#document) + * WhatWG HTML$3.1.1 - The `Document` object + * Note: Most browsers currently adher to the W3C DOM Level 2 spec + * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-26809268) + * which suggests that browsers should use HTMLTableCellElement for + * both TD and TH elements. WhatWG separates these. + * WhatWG HTML states: + * > For historical reasons, Window objects must also have a + * > writable, configurable, non-enumerable property named + * > HTMLDocument whose value is the Document interface object. + * Test: `Object.prototype.toString.call(document)`` + * - Chrome === "[object HTMLDocument]" + * - Firefox === "[object HTMLDocument]" + * - Safari === "[object HTMLDocument]" + * - IE <=10 === "[object Document]" + * - IE 11 === "[object HTMLDocument]" + * - IE Edge <=13 === "[object HTMLDocument]" + */ + if (typeof window.document === 'object' && obj === window.document) { + return 'Document'; + } + + if (typeof window.navigator === 'object') { + /* ! Spec Conformance + * (https://html.spec.whatwg.org/multipage/webappapis.html#mimetypearray) + * WhatWG HTML$8.6.1.5 - Plugins - Interface MimeTypeArray + * Test: `Object.prototype.toString.call(navigator.mimeTypes)`` + * - IE <=10 === "[object MSMimeTypesCollection]" + */ + if (typeof window.navigator.mimeTypes === 'object' && + obj === window.navigator.mimeTypes) { + return 'MimeTypeArray'; + } + + /* ! Spec Conformance + * (https://html.spec.whatwg.org/multipage/webappapis.html#pluginarray) + * WhatWG HTML$8.6.1.5 - Plugins - Interface PluginArray + * Test: `Object.prototype.toString.call(navigator.plugins)`` + * - IE <=10 === "[object MSPluginsCollection]" + */ + if (typeof window.navigator.plugins === 'object' && + obj === window.navigator.plugins) { + return 'PluginArray'; + } + } + + if ((typeof window.HTMLElement === 'function' || + typeof window.HTMLElement === 'object') && + obj instanceof window.HTMLElement) { + /* ! Spec Conformance + * (https://html.spec.whatwg.org/multipage/webappapis.html#pluginarray) + * WhatWG HTML$4.4.4 - The `blockquote` element - Interface `HTMLQuoteElement` + * Test: `Object.prototype.toString.call(document.createElement('blockquote'))`` + * - IE <=10 === "[object HTMLBlockElement]" + */ + if (obj.tagName === 'BLOCKQUOTE') { + return 'HTMLQuoteElement'; + } + + /* ! Spec Conformance + * (https://html.spec.whatwg.org/#htmltabledatacellelement) + * WhatWG HTML$4.9.9 - The `td` element - Interface `HTMLTableDataCellElement` + * Note: Most browsers currently adher to the W3C DOM Level 2 spec + * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-82915075) + * which suggests that browsers should use HTMLTableCellElement for + * both TD and TH elements. WhatWG separates these. + * Test: Object.prototype.toString.call(document.createElement('td')) + * - Chrome === "[object HTMLTableCellElement]" + * - Firefox === "[object HTMLTableCellElement]" + * - Safari === "[object HTMLTableCellElement]" + */ + if (obj.tagName === 'TD') { + return 'HTMLTableDataCellElement'; + } + + /* ! Spec Conformance + * (https://html.spec.whatwg.org/#htmltableheadercellelement) + * WhatWG HTML$4.9.9 - The `td` element - Interface `HTMLTableHeaderCellElement` + * Note: Most browsers currently adher to the W3C DOM Level 2 spec + * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-82915075) + * which suggests that browsers should use HTMLTableCellElement for + * both TD and TH elements. WhatWG separates these. + * Test: Object.prototype.toString.call(document.createElement('th')) + * - Chrome === "[object HTMLTableCellElement]" + * - Firefox === "[object HTMLTableCellElement]" + * - Safari === "[object HTMLTableCellElement]" + */ + if (obj.tagName === 'TH') { + return 'HTMLTableHeaderCellElement'; + } + } + } + + /* ! Speed optimisation + * Pre: + * Float64Array x 625,644 ops/sec ±1.58% (80 runs sampled) + * Float32Array x 1,279,852 ops/sec ±2.91% (77 runs sampled) + * Uint32Array x 1,178,185 ops/sec ±1.95% (83 runs sampled) + * Uint16Array x 1,008,380 ops/sec ±2.25% (80 runs sampled) + * Uint8Array x 1,128,040 ops/sec ±2.11% (81 runs sampled) + * Int32Array x 1,170,119 ops/sec ±2.88% (80 runs sampled) + * Int16Array x 1,176,348 ops/sec ±5.79% (86 runs sampled) + * Int8Array x 1,058,707 ops/sec ±4.94% (77 runs sampled) + * Uint8ClampedArray x 1,110,633 ops/sec ±4.20% (80 runs sampled) + * Post: + * Float64Array x 7,105,671 ops/sec ±13.47% (64 runs sampled) + * Float32Array x 5,887,912 ops/sec ±1.46% (82 runs sampled) + * Uint32Array x 6,491,661 ops/sec ±1.76% (79 runs sampled) + * Uint16Array x 6,559,795 ops/sec ±1.67% (82 runs sampled) + * Uint8Array x 6,463,966 ops/sec ±1.43% (85 runs sampled) + * Int32Array x 5,641,841 ops/sec ±3.49% (81 runs sampled) + * Int16Array x 6,583,511 ops/sec ±1.98% (80 runs sampled) + * Int8Array x 6,606,078 ops/sec ±1.74% (81 runs sampled) + * Uint8ClampedArray x 6,602,224 ops/sec ±1.77% (83 runs sampled) + */ + var stringTag = (symbolToStringTagExists && obj[Symbol.toStringTag]); + if (typeof stringTag === 'string') { + return stringTag; + } + + var objPrototype = Object.getPrototypeOf(obj); + /* ! Speed optimisation + * Pre: + * regex literal x 1,772,385 ops/sec ±1.85% (77 runs sampled) + * regex constructor x 2,143,634 ops/sec ±2.46% (78 runs sampled) + * Post: + * regex literal x 3,928,009 ops/sec ±0.65% (78 runs sampled) + * regex constructor x 3,931,108 ops/sec ±0.58% (84 runs sampled) + */ + if (objPrototype === RegExp.prototype) { + return 'RegExp'; + } + + /* ! Speed optimisation + * Pre: + * date x 2,130,074 ops/sec ±4.42% (68 runs sampled) + * Post: + * date x 3,953,779 ops/sec ±1.35% (77 runs sampled) + */ + if (objPrototype === Date.prototype) { + return 'Date'; + } + + /* ! Spec Conformance + * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-promise.prototype-@@tostringtag) + * ES6$25.4.5.4 - Promise.prototype[@@toStringTag] should be "Promise": + * Test: `Object.prototype.toString.call(Promise.resolve())`` + * - Chrome <=47 === "[object Object]" + * - Edge <=20 === "[object Object]" + * - Firefox 29-Latest === "[object Promise]" + * - Safari 7.1-Latest === "[object Promise]" + */ + if (promiseExists && objPrototype === Promise.prototype) { + return 'Promise'; + } + + /* ! Speed optimisation + * Pre: + * set x 2,222,186 ops/sec ±1.31% (82 runs sampled) + * Post: + * set x 4,545,879 ops/sec ±1.13% (83 runs sampled) + */ + if (setExists && objPrototype === Set.prototype) { + return 'Set'; + } + + /* ! Speed optimisation + * Pre: + * map x 2,396,842 ops/sec ±1.59% (81 runs sampled) + * Post: + * map x 4,183,945 ops/sec ±6.59% (82 runs sampled) + */ + if (mapExists && objPrototype === Map.prototype) { + return 'Map'; + } + + /* ! Speed optimisation + * Pre: + * weakset x 1,323,220 ops/sec ±2.17% (76 runs sampled) + * Post: + * weakset x 4,237,510 ops/sec ±2.01% (77 runs sampled) + */ + if (weakSetExists && objPrototype === WeakSet.prototype) { + return 'WeakSet'; + } + + /* ! Speed optimisation + * Pre: + * weakmap x 1,500,260 ops/sec ±2.02% (78 runs sampled) + * Post: + * weakmap x 3,881,384 ops/sec ±1.45% (82 runs sampled) + */ + if (weakMapExists && objPrototype === WeakMap.prototype) { + return 'WeakMap'; + } + + /* ! Spec Conformance + * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-dataview.prototype-@@tostringtag) + * ES6$24.2.4.21 - DataView.prototype[@@toStringTag] should be "DataView": + * Test: `Object.prototype.toString.call(new DataView(new ArrayBuffer(1)))`` + * - Edge <=13 === "[object Object]" + */ + if (dataViewExists && objPrototype === DataView.prototype) { + return 'DataView'; + } + + /* ! Spec Conformance + * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%mapiteratorprototype%-@@tostringtag) + * ES6$23.1.5.2.2 - %MapIteratorPrototype%[@@toStringTag] should be "Map Iterator": + * Test: `Object.prototype.toString.call(new Map().entries())`` + * - Edge <=13 === "[object Object]" + */ + if (mapExists && objPrototype === mapIteratorPrototype) { + return 'Map Iterator'; + } + + /* ! Spec Conformance + * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%setiteratorprototype%-@@tostringtag) + * ES6$23.2.5.2.2 - %SetIteratorPrototype%[@@toStringTag] should be "Set Iterator": + * Test: `Object.prototype.toString.call(new Set().entries())`` + * - Edge <=13 === "[object Object]" + */ + if (setExists && objPrototype === setIteratorPrototype) { + return 'Set Iterator'; + } + + /* ! Spec Conformance + * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%arrayiteratorprototype%-@@tostringtag) + * ES6$22.1.5.2.2 - %ArrayIteratorPrototype%[@@toStringTag] should be "Array Iterator": + * Test: `Object.prototype.toString.call([][Symbol.iterator]())`` + * - Edge <=13 === "[object Object]" + */ + if (arrayIteratorExists && objPrototype === arrayIteratorPrototype) { + return 'Array Iterator'; + } + + /* ! Spec Conformance + * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%stringiteratorprototype%-@@tostringtag) + * ES6$21.1.5.2.2 - %StringIteratorPrototype%[@@toStringTag] should be "String Iterator": + * Test: `Object.prototype.toString.call(''[Symbol.iterator]())`` + * - Edge <=13 === "[object Object]" + */ + if (stringIteratorExists && objPrototype === stringIteratorPrototype) { + return 'String Iterator'; + } + + /* ! Speed optimisation + * Pre: + * object from null x 2,424,320 ops/sec ±1.67% (76 runs sampled) + * Post: + * object from null x 5,838,000 ops/sec ±0.99% (84 runs sampled) + */ + if (objPrototype === null) { + return 'Object'; + } + + return Object + .prototype + .toString + .call(obj) + .slice(toStringLeftSliceLength, toStringRightSliceLength); +} + +return typeDetect; + +}))); diff --git a/node_modules/universal-user-agent/.travis.yml b/node_modules/universal-user-agent/.travis.yml new file mode 100644 index 00000000..d5408957 --- /dev/null +++ b/node_modules/universal-user-agent/.travis.yml @@ -0,0 +1,38 @@ +language: node_js +cache: + directories: + - ~/.npm + - node_modules/cypress/dist + +# Trigger a push build on master and greenkeeper branches + PRs build on every branches +# Avoid double build on PRs (See https://github.com/travis-ci/travis-ci/issues/1147) +branches: + only: + - master + - /^greenkeeper.*$/ + +stages: + - test + - name: release + if: branch = master AND type IN (push) + +jobs: + include: + - stage: test + node_js: 6 + script: npm run test + - node_js: 8 + script: npm run test + - node_js: 10 + env: Node 10 & coverage upload + script: + - npm run test + - npm run coverage:upload + - node_js: lts/* + env: browser tests + script: npm run test:browser + + - stage: release + node_js: lts/* + env: semantic-release + script: npm run semantic-release diff --git a/node_modules/universal-user-agent/LICENSE.md b/node_modules/universal-user-agent/LICENSE.md new file mode 100644 index 00000000..f105ab0c --- /dev/null +++ b/node_modules/universal-user-agent/LICENSE.md @@ -0,0 +1,7 @@ +# [ISC License](https://spdx.org/licenses/ISC) + +Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m) + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/universal-user-agent/README.md b/node_modules/universal-user-agent/README.md new file mode 100644 index 00000000..59e809ed --- /dev/null +++ b/node_modules/universal-user-agent/README.md @@ -0,0 +1,25 @@ +# universal-user-agent + +> Get a user agent string in both browser and node + +[![@latest](https://img.shields.io/npm/v/universal-user-agent.svg)](https://www.npmjs.com/package/universal-user-agent) +[![Build Status](https://travis-ci.com/gr2m/universal-user-agent.svg?branch=master)](https://travis-ci.com/gr2m/universal-user-agent) +[![Coverage Status](https://coveralls.io/repos/github/gr2m/universal-user-agent/badge.svg)](https://coveralls.io/github/gr2m/universal-user-agent) +[![Greenkeeper](https://badges.greenkeeper.io/gr2m/universal-user-agent.svg)](https://greenkeeper.io/) + +```js +const getUserAgent = require('universal-user-agent') +const userAgent = getUserAgent() + +// userAgent will look like this +// in browser: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0" +// in node: Node.js/v8.9.4 (macOS High Sierra; x64) +``` + +## Credits + +The Node implementation was originally inspired by [default-user-agent](https://www.npmjs.com/package/default-user-agent). + +## License + +[ISC](LICENSE.md) diff --git a/node_modules/universal-user-agent/browser.js b/node_modules/universal-user-agent/browser.js new file mode 100644 index 00000000..eb127443 --- /dev/null +++ b/node_modules/universal-user-agent/browser.js @@ -0,0 +1,6 @@ +module.exports = getUserAgentBrowser + +function getUserAgentBrowser () { + /* global navigator */ + return navigator.userAgent +} diff --git a/node_modules/universal-user-agent/cypress.json b/node_modules/universal-user-agent/cypress.json new file mode 100644 index 00000000..a1ff4b85 --- /dev/null +++ b/node_modules/universal-user-agent/cypress.json @@ -0,0 +1,4 @@ +{ + "integrationFolder": "test", + "video": false +} diff --git a/node_modules/universal-user-agent/index.d.ts b/node_modules/universal-user-agent/index.d.ts new file mode 100644 index 00000000..04dfc043 --- /dev/null +++ b/node_modules/universal-user-agent/index.d.ts @@ -0,0 +1 @@ +export default function getUserAgentNode(): string; diff --git a/node_modules/universal-user-agent/index.js b/node_modules/universal-user-agent/index.js new file mode 100644 index 00000000..ef2d06b2 --- /dev/null +++ b/node_modules/universal-user-agent/index.js @@ -0,0 +1,15 @@ +module.exports = getUserAgentNode + +const osName = require('os-name') + +function getUserAgentNode () { + try { + return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})` + } catch (error) { + if (/wmic os get Caption/.test(error.message)) { + return 'Windows ' + } + + throw error + } +} diff --git a/node_modules/universal-user-agent/package.json b/node_modules/universal-user-agent/package.json new file mode 100644 index 00000000..f36abafe --- /dev/null +++ b/node_modules/universal-user-agent/package.json @@ -0,0 +1,85 @@ +{ + "_args": [ + [ + "universal-user-agent@2.1.0", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "universal-user-agent@2.1.0", + "_id": "universal-user-agent@2.1.0", + "_inBundle": false, + "_integrity": "sha512-8itiX7G05Tu3mGDTdNY2fB4KJ8MgZLS54RdG6PkkfwMAavrXu1mV/lls/GABx9O3Rw4PnTtasxrvbMQoBYY92Q==", + "_location": "/universal-user-agent", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "universal-user-agent@2.1.0", + "name": "universal-user-agent", + "escapedName": "universal-user-agent", + "rawSpec": "2.1.0", + "saveSpec": null, + "fetchSpec": "2.1.0" + }, + "_requiredBy": [ + "/@octokit/graphql" + ], + "_resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-2.1.0.tgz", + "_spec": "2.1.0", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "Gregor Martynus", + "url": "https://github.com/gr2m" + }, + "browser": "browser.js", + "bugs": { + "url": "https://github.com/gr2m/universal-user-agent/issues" + }, + "dependencies": { + "os-name": "^3.0.0" + }, + "description": "Get a user agent string in both browser and node", + "devDependencies": { + "chai": "^4.1.2", + "coveralls": "^3.0.2", + "cypress": "^3.1.0", + "mocha": "^6.0.0", + "nyc": "^14.0.0", + "proxyquire": "^2.1.0", + "semantic-release": "^15.9.15", + "sinon": "^7.2.4", + "sinon-chai": "^3.2.0", + "standard": "^12.0.1", + "test": "^0.6.0", + "travis-deploy-once": "^5.0.7" + }, + "homepage": "https://github.com/gr2m/universal-user-agent#readme", + "keywords": [], + "license": "ISC", + "main": "index.js", + "name": "universal-user-agent", + "repository": { + "type": "git", + "url": "git+https://github.com/gr2m/universal-user-agent.git" + }, + "scripts": { + "coverage": "nyc report --reporter=html && open coverage/index.html", + "coverage:upload": "nyc report --reporter=text-lcov | coveralls", + "pretest": "standard", + "semantic-release": "semantic-release", + "test": "nyc mocha \"test/*-test.js\"", + "test:browser": "cypress run --browser chrome", + "travis-deploy-once": "travis-deploy-once" + }, + "standard": { + "globals": [ + "describe", + "it", + "beforeEach", + "afterEach", + "expect" + ] + }, + "types": "index.d.ts", + "version": "2.1.0" +} diff --git a/node_modules/universal-user-agent/test/smoke-test.js b/node_modules/universal-user-agent/test/smoke-test.js new file mode 100644 index 00000000..d71b2d51 --- /dev/null +++ b/node_modules/universal-user-agent/test/smoke-test.js @@ -0,0 +1,57 @@ +// make tests run in both Node & Express +if (!global.cy) { + const chai = require('chai') + const sinon = require('sinon') + const sinonChai = require('sinon-chai') + chai.use(sinonChai) + global.expect = chai.expect + + let sandbox + beforeEach(() => { + sandbox = sinon.createSandbox() + global.cy = { + stub: function () { + return sandbox.stub.apply(sandbox, arguments) + }, + log () { + console.log.apply(console, arguments) + } + } + }) + + afterEach(() => { + sandbox.restore() + }) +} + +const getUserAgent = require('..') + +describe('smoke', () => { + it('works', () => { + expect(getUserAgent()).to.be.a('string') + expect(getUserAgent().length).to.be.above(10) + }) + + if (!process.browser) { // test on node only + const proxyquire = require('proxyquire').noCallThru() + it('works around wmic error on Windows (#5)', () => { + const getUserAgent = proxyquire('..', { + 'os-name': () => { + throw new Error('Command failed: wmic os get Caption') + } + }) + + expect(getUserAgent()).to.equal('Windows ') + }) + + it('does not swallow unexpected errors', () => { + const getUserAgent = proxyquire('..', { + 'os-name': () => { + throw new Error('oops') + } + }) + + expect(getUserAgent).to.throw('oops') + }) + } +}) diff --git a/node_modules/which/CHANGELOG.md b/node_modules/which/CHANGELOG.md new file mode 100644 index 00000000..3d83d269 --- /dev/null +++ b/node_modules/which/CHANGELOG.md @@ -0,0 +1,152 @@ +# Changes + + +## 1.3.1 + +* update deps +* update travis + +## v1.3.0 + +* Add nothrow option to which.sync +* update tap + +## v1.2.14 + +* appveyor: drop node 5 and 0.x +* travis-ci: add node 6, drop 0.x + +## v1.2.13 + +* test: Pass missing option to pass on windows +* update tap +* update isexe to 2.0.0 +* neveragain.tech pledge request + +## v1.2.12 + +* Removed unused require + +## v1.2.11 + +* Prevent changelog script from being included in package + +## v1.2.10 + +* Use env.PATH only, not env.Path + +## v1.2.9 + +* fix for paths starting with ../ +* Remove unused `is-absolute` module + +## v1.2.8 + +* bullet items in changelog that contain (but don't start with) # + +## v1.2.7 + +* strip 'update changelog' changelog entries out of changelog + +## v1.2.6 + +* make the changelog bulleted + +## v1.2.5 + +* make a changelog, and keep it up to date +* don't include tests in package +* Properly handle relative-path executables +* appveyor +* Attach error code to Not Found error +* Make tests pass on Windows + +## v1.2.4 + +* Fix typo + +## v1.2.3 + +* update isexe, fix regression in pathExt handling + +## v1.2.2 + +* update deps, use isexe module, test windows + +## v1.2.1 + +* Sometimes windows PATH entries are quoted +* Fixed a bug in the check for group and user mode bits. This bug was introduced during refactoring for supporting strict mode. +* doc cli + +## v1.2.0 + +* Add support for opt.all and -as cli flags +* test the bin +* update travis +* Allow checking for multiple programs in bin/which +* tap 2 + +## v1.1.2 + +* travis +* Refactored and fixed undefined error on Windows +* Support strict mode + +## v1.1.1 + +* test +g exes against secondary groups, if available +* Use windows exe semantics on cygwin & msys +* cwd should be first in path on win32, not last +* Handle lower-case 'env.Path' on Windows +* Update docs +* use single-quotes + +## v1.1.0 + +* Add tests, depend on is-absolute + +## v1.0.9 + +* which.js: root is allowed to execute files owned by anyone + +## v1.0.8 + +* don't use graceful-fs + +## v1.0.7 + +* add license to package.json + +## v1.0.6 + +* isc license + +## 1.0.5 + +* Awful typo + +## 1.0.4 + +* Test for path absoluteness properly +* win: Allow '' as a pathext if cmd has a . in it + +## 1.0.3 + +* Remove references to execPath +* Make `which.sync()` work on Windows by honoring the PATHEXT variable. +* Make `isExe()` always return true on Windows. +* MIT + +## 1.0.2 + +* Only files can be exes + +## 1.0.1 + +* Respect the PATHEXT env for win32 support +* should 0755 the bin +* binary +* guts +* package +* 1st diff --git a/node_modules/which/LICENSE b/node_modules/which/LICENSE new file mode 100644 index 00000000..19129e31 --- /dev/null +++ b/node_modules/which/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/which/README.md b/node_modules/which/README.md new file mode 100644 index 00000000..8c0b0cbf --- /dev/null +++ b/node_modules/which/README.md @@ -0,0 +1,51 @@ +# which + +Like the unix `which` utility. + +Finds the first instance of a specified executable in the PATH +environment variable. Does not cache the results, so `hash -r` is not +needed when the PATH changes. + +## USAGE + +```javascript +var which = require('which') + +// async usage +which('node', function (er, resolvedPath) { + // er is returned if no "node" is found on the PATH + // if it is found, then the absolute path to the exec is returned +}) + +// sync usage +// throws if not found +var resolved = which.sync('node') + +// if nothrow option is used, returns null if not found +resolved = which.sync('node', {nothrow: true}) + +// Pass options to override the PATH and PATHEXT environment vars. +which('node', { path: someOtherPath }, function (er, resolved) { + if (er) + throw er + console.log('found at %j', resolved) +}) +``` + +## CLI USAGE + +Same as the BSD `which(1)` binary. + +``` +usage: which [-as] program ... +``` + +## OPTIONS + +You may pass an options object as the second argument. + +- `path`: Use instead of the `PATH` environment variable. +- `pathExt`: Use instead of the `PATHEXT` environment variable. +- `all`: Return all matches, instead of just the first one. Note that + this means the function returns an array of strings instead of a + single string. diff --git a/node_modules/which/bin/which b/node_modules/which/bin/which new file mode 100755 index 00000000..7cee3729 --- /dev/null +++ b/node_modules/which/bin/which @@ -0,0 +1,52 @@ +#!/usr/bin/env node +var which = require("../") +if (process.argv.length < 3) + usage() + +function usage () { + console.error('usage: which [-as] program ...') + process.exit(1) +} + +var all = false +var silent = false +var dashdash = false +var args = process.argv.slice(2).filter(function (arg) { + if (dashdash || !/^-/.test(arg)) + return true + + if (arg === '--') { + dashdash = true + return false + } + + var flags = arg.substr(1).split('') + for (var f = 0; f < flags.length; f++) { + var flag = flags[f] + switch (flag) { + case 's': + silent = true + break + case 'a': + all = true + break + default: + console.error('which: illegal option -- ' + flag) + usage() + } + } + return false +}) + +process.exit(args.reduce(function (pv, current) { + try { + var f = which.sync(current, { all: all }) + if (all) + f = f.join('\n') + if (!silent) + console.log(f) + return pv; + } catch (e) { + return 1; + } +}, 0)) diff --git a/node_modules/which/package.json b/node_modules/which/package.json new file mode 100644 index 00000000..03a9f578 --- /dev/null +++ b/node_modules/which/package.json @@ -0,0 +1,69 @@ +{ + "_args": [ + [ + "which@1.3.1", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "which@1.3.1", + "_id": "which@1.3.1", + "_inBundle": false, + "_integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "_location": "/which", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "which@1.3.1", + "name": "which", + "escapedName": "which", + "rawSpec": "1.3.1", + "saveSpec": null, + "fetchSpec": "1.3.1" + }, + "_requiredBy": [ + "/cross-spawn", + "/node-notifier" + ], + "_resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "_spec": "1.3.1", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me" + }, + "bin": { + "which": "./bin/which" + }, + "bugs": { + "url": "https://github.com/isaacs/node-which/issues" + }, + "dependencies": { + "isexe": "^2.0.0" + }, + "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", + "devDependencies": { + "mkdirp": "^0.5.0", + "rimraf": "^2.6.2", + "tap": "^12.0.1" + }, + "files": [ + "which.js", + "bin/which" + ], + "homepage": "https://github.com/isaacs/node-which#readme", + "license": "ISC", + "main": "which.js", + "name": "which", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-which.git" + }, + "scripts": { + "changelog": "bash gen-changelog.sh", + "postversion": "npm run changelog && git add CHANGELOG.md && git commit -m 'update changelog - '${npm_package_version}", + "test": "tap test/*.js --cov" + }, + "version": "1.3.1" +} diff --git a/node_modules/which/which.js b/node_modules/which/which.js new file mode 100644 index 00000000..4347f91a --- /dev/null +++ b/node_modules/which/which.js @@ -0,0 +1,135 @@ +module.exports = which +which.sync = whichSync + +var isWindows = process.platform === 'win32' || + process.env.OSTYPE === 'cygwin' || + process.env.OSTYPE === 'msys' + +var path = require('path') +var COLON = isWindows ? ';' : ':' +var isexe = require('isexe') + +function getNotFoundError (cmd) { + var er = new Error('not found: ' + cmd) + er.code = 'ENOENT' + + return er +} + +function getPathInfo (cmd, opt) { + var colon = opt.colon || COLON + var pathEnv = opt.path || process.env.PATH || '' + var pathExt = [''] + + pathEnv = pathEnv.split(colon) + + var pathExtExe = '' + if (isWindows) { + pathEnv.unshift(process.cwd()) + pathExtExe = (opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM') + pathExt = pathExtExe.split(colon) + + + // Always test the cmd itself first. isexe will check to make sure + // it's found in the pathExt set. + if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') + pathExt.unshift('') + } + + // If it has a slash, then we don't bother searching the pathenv. + // just check the file itself, and that's it. + if (cmd.match(/\//) || isWindows && cmd.match(/\\/)) + pathEnv = [''] + + return { + env: pathEnv, + ext: pathExt, + extExe: pathExtExe + } +} + +function which (cmd, opt, cb) { + if (typeof opt === 'function') { + cb = opt + opt = {} + } + + var info = getPathInfo(cmd, opt) + var pathEnv = info.env + var pathExt = info.ext + var pathExtExe = info.extExe + var found = [] + + ;(function F (i, l) { + if (i === l) { + if (opt.all && found.length) + return cb(null, found) + else + return cb(getNotFoundError(cmd)) + } + + var pathPart = pathEnv[i] + if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') + pathPart = pathPart.slice(1, -1) + + var p = path.join(pathPart, cmd) + if (!pathPart && (/^\.[\\\/]/).test(cmd)) { + p = cmd.slice(0, 2) + p + } + ;(function E (ii, ll) { + if (ii === ll) return F(i + 1, l) + var ext = pathExt[ii] + isexe(p + ext, { pathExt: pathExtExe }, function (er, is) { + if (!er && is) { + if (opt.all) + found.push(p + ext) + else + return cb(null, p + ext) + } + return E(ii + 1, ll) + }) + })(0, pathExt.length) + })(0, pathEnv.length) +} + +function whichSync (cmd, opt) { + opt = opt || {} + + var info = getPathInfo(cmd, opt) + var pathEnv = info.env + var pathExt = info.ext + var pathExtExe = info.extExe + var found = [] + + for (var i = 0, l = pathEnv.length; i < l; i ++) { + var pathPart = pathEnv[i] + if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') + pathPart = pathPart.slice(1, -1) + + var p = path.join(pathPart, cmd) + if (!pathPart && /^\.[\\\/]/.test(cmd)) { + p = cmd.slice(0, 2) + p + } + for (var j = 0, ll = pathExt.length; j < ll; j ++) { + var cur = p + pathExt[j] + var is + try { + is = isexe.sync(cur, { pathExt: pathExtExe }) + if (is) { + if (opt.all) + found.push(cur) + else + return cur + } + } catch (ex) {} + } + } + + if (opt.all && found.length) + return found + + if (opt.nothrow) + return null + + throw getNotFoundError(cmd) +} diff --git a/node_modules/windows-release/index.d.ts b/node_modules/windows-release/index.d.ts new file mode 100644 index 00000000..6a9c44f6 --- /dev/null +++ b/node_modules/windows-release/index.d.ts @@ -0,0 +1,30 @@ +/** +Get the name of a Windows version from the release number: `5.1.2600` → `XP`. + +@param release - By default, the current OS is used, but you can supply a custom release number, which is the output of [`os.release()`](https://nodejs.org/api/os.html#os_os_release). + +Note: Most Windows Server versions cannot be detected based on the release number alone. There is runtime detection in place to work around this, but it will only be used if no argument is supplied, or the supplied argument matches `os.release()`. + +@example +``` +import * as os from 'os'; +import windowsRelease = require('windows-release'); + +// On a Windows XP system + +windowsRelease(); +//=> 'XP' + +os.release(); +//=> '5.1.2600' + +windowsRelease(os.release()); +//=> 'XP' + +windowsRelease('4.9.3000'); +//=> 'ME' +``` +*/ +declare function windowsRelease(release?: string): string; + +export = windowsRelease; diff --git a/node_modules/windows-release/index.js b/node_modules/windows-release/index.js new file mode 100644 index 00000000..cb9ea9f0 --- /dev/null +++ b/node_modules/windows-release/index.js @@ -0,0 +1,44 @@ +'use strict'; +const os = require('os'); +const execa = require('execa'); + +// Reference: https://www.gaijin.at/en/lstwinver.php +const names = new Map([ + ['10.0', '10'], + ['6.3', '8.1'], + ['6.2', '8'], + ['6.1', '7'], + ['6.0', 'Vista'], + ['5.2', 'Server 2003'], + ['5.1', 'XP'], + ['5.0', '2000'], + ['4.9', 'ME'], + ['4.1', '98'], + ['4.0', '95'] +]); + +const windowsRelease = release => { + const version = /\d+\.\d/.exec(release || os.release()); + + if (release && !version) { + throw new Error('`release` argument doesn\'t match `n.n`'); + } + + const ver = (version || [])[0]; + + // Server 2008, 2012 and 2016 versions are ambiguous with desktop versions and must be detected at runtime. + // If `release` is omitted or we're on a Windows system, and the version number is an ambiguous version + // then use `wmic` to get the OS caption: https://msdn.microsoft.com/en-us/library/aa394531(v=vs.85).aspx + // If the resulting caption contains the year 2008, 2012 or 2016, it is a server version, so return a server OS name. + if ((!release || release === os.release()) && ['6.1', '6.2', '6.3', '10.0'].includes(ver)) { + const stdout = execa.sync('wmic', ['os', 'get', 'Caption']).stdout || ''; + const year = (stdout.match(/2008|2012|2016/) || [])[0]; + if (year) { + return `Server ${year}`; + } + } + + return names.get(ver); +}; + +module.exports = windowsRelease; diff --git a/node_modules/windows-release/license b/node_modules/windows-release/license new file mode 100644 index 00000000..e7af2f77 --- /dev/null +++ b/node_modules/windows-release/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/windows-release/package.json b/node_modules/windows-release/package.json new file mode 100644 index 00000000..3a51f375 --- /dev/null +++ b/node_modules/windows-release/package.json @@ -0,0 +1,78 @@ +{ + "_args": [ + [ + "windows-release@3.2.0", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "windows-release@3.2.0", + "_id": "windows-release@3.2.0", + "_inBundle": false, + "_integrity": "sha512-QTlz2hKLrdqukrsapKsINzqMgOUpQW268eJ0OaOpJN32h272waxR9fkB9VoWRtK7uKHG5EHJcTXQBD8XZVJkFA==", + "_location": "/windows-release", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "windows-release@3.2.0", + "name": "windows-release", + "escapedName": "windows-release", + "rawSpec": "3.2.0", + "saveSpec": null, + "fetchSpec": "3.2.0" + }, + "_requiredBy": [ + "/os-name" + ], + "_resolved": "https://registry.npmjs.org/windows-release/-/windows-release-3.2.0.tgz", + "_spec": "3.2.0", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/windows-release/issues" + }, + "dependencies": { + "execa": "^1.0.0" + }, + "description": "Get the name of a Windows version from the release number: `5.1.2600` → `XP`", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "homepage": "https://github.com/sindresorhus/windows-release#readme", + "keywords": [ + "os", + "win", + "win32", + "windows", + "operating", + "system", + "platform", + "name", + "title", + "release", + "version" + ], + "license": "MIT", + "name": "windows-release", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/windows-release.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "3.2.0" +} diff --git a/node_modules/windows-release/readme.md b/node_modules/windows-release/readme.md new file mode 100644 index 00000000..66557eab --- /dev/null +++ b/node_modules/windows-release/readme.md @@ -0,0 +1,56 @@ +# windows-release [![Build Status](https://travis-ci.org/sindresorhus/windows-release.svg?branch=master)](https://travis-ci.org/sindresorhus/windows-release) + +> Get the name of a Windows version from the release number: `5.1.2600` → `XP` + + +## Install + +``` +$ npm install windows-release +``` + + +## Usage + +```js +const os = require('os'); +const windowsRelease = require('windows-release'); + +// On a Windows XP system + +windowsRelease(); +//=> 'XP' + +os.release(); +//=> '5.1.2600' + +windowsRelease(os.release()); +//=> 'XP' + +windowsRelease('4.9.3000'); +//=> 'ME' +``` + + +## API + +### windowsRelease([release]) + +#### release + +Type: `string` + +By default, the current OS is used, but you can supply a custom release number, which is the output of [`os.release()`](https://nodejs.org/api/os.html#os_os_release). + +Note: Most Windows Server versions cannot be detected based on the release number alone. There is runtime detection in place to work around this, but it will only be used if no argument is supplied, or the supplied argument matches `os.release()`. + + +## Related + +- [os-name](https://github.com/sindresorhus/os-name) - Get the name of the current operating system +- [macos-release](https://github.com/sindresorhus/macos-release) - Get the name and version of a macOS release from the Darwin version + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/wrappy/LICENSE b/node_modules/wrappy/LICENSE new file mode 100644 index 00000000..19129e31 --- /dev/null +++ b/node_modules/wrappy/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/wrappy/README.md b/node_modules/wrappy/README.md new file mode 100644 index 00000000..98eab252 --- /dev/null +++ b/node_modules/wrappy/README.md @@ -0,0 +1,36 @@ +# wrappy + +Callback wrapping utility + +## USAGE + +```javascript +var wrappy = require("wrappy") + +// var wrapper = wrappy(wrapperFunction) + +// make sure a cb is called only once +// See also: http://npm.im/once for this specific use case +var once = wrappy(function (cb) { + var called = false + return function () { + if (called) return + called = true + return cb.apply(this, arguments) + } +}) + +function printBoo () { + console.log('boo') +} +// has some rando property +printBoo.iAmBooPrinter = true + +var onlyPrintOnce = once(printBoo) + +onlyPrintOnce() // prints 'boo' +onlyPrintOnce() // does nothing + +// random property is retained! +assert.equal(onlyPrintOnce.iAmBooPrinter, true) +``` diff --git a/node_modules/wrappy/package.json b/node_modules/wrappy/package.json new file mode 100644 index 00000000..f860aaad --- /dev/null +++ b/node_modules/wrappy/package.json @@ -0,0 +1,62 @@ +{ + "_args": [ + [ + "wrappy@1.0.2", + "/Users/robertwiesner/git/misc/typescript-action" + ] + ], + "_from": "wrappy@1.0.2", + "_id": "wrappy@1.0.2", + "_inBundle": false, + "_integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "_location": "/wrappy", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "wrappy@1.0.2", + "name": "wrappy", + "escapedName": "wrappy", + "rawSpec": "1.0.2", + "saveSpec": null, + "fetchSpec": "1.0.2" + }, + "_requiredBy": [ + "/inflight", + "/once" + ], + "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "_spec": "1.0.2", + "_where": "/Users/robertwiesner/git/misc/typescript-action", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/npm/wrappy/issues" + }, + "dependencies": {}, + "description": "Callback wrapping utility", + "devDependencies": { + "tap": "^2.3.1" + }, + "directories": { + "test": "test" + }, + "files": [ + "wrappy.js" + ], + "homepage": "https://github.com/npm/wrappy", + "license": "ISC", + "main": "wrappy.js", + "name": "wrappy", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/wrappy.git" + }, + "scripts": { + "test": "tap --coverage test/*.js" + }, + "version": "1.0.2" +} diff --git a/node_modules/wrappy/wrappy.js b/node_modules/wrappy/wrappy.js new file mode 100644 index 00000000..bb7e7d6f --- /dev/null +++ b/node_modules/wrappy/wrappy.js @@ -0,0 +1,33 @@ +// Returns a wrapper function that returns a wrapped callback +// The wrapper function should do some stuff, and return a +// presumably different callback function. +// This makes sure that own properties are retained, so that +// decorations and such are not lost along the way. +module.exports = wrappy +function wrappy (fn, cb) { + if (fn && cb) return wrappy(fn)(cb) + + if (typeof fn !== 'function') + throw new TypeError('need wrapper function') + + Object.keys(fn).forEach(function (k) { + wrapper[k] = fn[k] + }) + + return wrapper + + function wrapper() { + var args = new Array(arguments.length) + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i] + } + var ret = fn.apply(this, args) + var cb = args[args.length-1] + if (typeof ret === 'function' && ret !== cb) { + Object.keys(cb).forEach(function (k) { + ret[k] = cb[k] + }) + } + return ret + } +} diff --git a/self.yml b/self.yml index 5ccfa2a3..23b0ffba 100644 --- a/self.yml +++ b/self.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/auto-assign-review-teams@v0.0.3 + - uses: actions/auto-assign-review-teams@v0.0.4 with: repo-token: ${{ secrets.GITHUB_TOKEN }} persons: "rowi1de"