mirror of
https://github.com/github/codeql-action.git
synced 2026-01-05 06:00:32 +08:00
Merge branch 'main' into henrymercer/bump-minimum-codeql-version
This commit is contained in:
105
node_modules/.package-lock.json
generated
vendored
105
node_modules/.package-lock.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "codeql",
|
||||
"version": "2.4.0",
|
||||
"version": "2.21.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
@@ -236,19 +236,6 @@
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/@azure/core-http/node_modules/tough-cookie": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz",
|
||||
"integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==",
|
||||
"dependencies": {
|
||||
"psl": "^1.1.33",
|
||||
"punycode": "^2.1.1",
|
||||
"universalify": "^0.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/@azure/core-http/node_modules/tslib": {
|
||||
"version": "2.4.0",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
|
||||
@@ -331,19 +318,18 @@
|
||||
"integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ=="
|
||||
},
|
||||
"node_modules/@azure/ms-rest-js": {
|
||||
"version": "2.6.2",
|
||||
"resolved": "https://registry.npmjs.org/@azure/ms-rest-js/-/ms-rest-js-2.6.2.tgz",
|
||||
"integrity": "sha512-0/8rOxAoR9M3qKUdbGOIYtHtQkm4m5jdoDNdxTU0DkOr84KwyAdJuW/RfjJinGyig4h73DNF0rdCl6XowgCYcg==",
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@azure/ms-rest-js/-/ms-rest-js-2.7.0.tgz",
|
||||
"integrity": "sha512-ngbzWbqF+NmztDOpLBVDxYM+XLcUj7nKhxGbSU9WtIsXfRB//cf2ZbAG5HkOrhU9/wd/ORRB6lM/d69RKVjiyA==",
|
||||
"dependencies": {
|
||||
"@azure/core-auth": "^1.1.4",
|
||||
"abort-controller": "^3.0.0",
|
||||
"form-data": "^2.5.0",
|
||||
"node-fetch": "^2.6.7",
|
||||
"tough-cookie": "^3.0.1",
|
||||
"tslib": "^1.10.0",
|
||||
"tunnel": "0.0.6",
|
||||
"uuid": "^8.3.2",
|
||||
"xml2js": "^0.4.19"
|
||||
"xml2js": "^0.5.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@azure/ms-rest-js/node_modules/uuid": {
|
||||
@@ -557,9 +543,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/openapi-types": {
|
||||
"version": "16.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-16.0.0.tgz",
|
||||
"integrity": "sha512-JbFWOqTJVLHZSUUoF4FzAZKYtqdxWu9Z5m2QQnOyEa04fOFljvyh7D3GYKbfuaSWisqehImiVIMG4eyJeP5VEA=="
|
||||
"version": "18.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.0.0.tgz",
|
||||
"integrity": "sha512-V8GImKs3TeQRxRtXFpG2wl19V7444NIOTDF24AWuIbmNaNYOQMWRbjcGDXV5B+0n887fgDcuMNOmlul+k+oJtw=="
|
||||
},
|
||||
"node_modules/@octokit/plugin-paginate-rest": {
|
||||
"version": "2.4.0",
|
||||
@@ -596,20 +582,28 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/plugin-retry": {
|
||||
"version": "4.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-4.0.4.tgz",
|
||||
"integrity": "sha512-d7qGFLR3AH+WbNEDUvBPgMc7wRCxU40FZyNXFFqs8ISw75ZYS5/P3ScggzU13dCoY0aywYDxKugGstQTwNgppA==",
|
||||
"version": "5.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-5.0.2.tgz",
|
||||
"integrity": "sha512-/Z7rWLCfjwmaVdyFuMkZoAnhfrvYgtvDrbO2d6lv7XrvJa8gFGB5tLUMngfuyMBfDCc5B9+EVu7IkQx5ebVlMg==",
|
||||
"dependencies": {
|
||||
"@octokit/types": "^9.0.0",
|
||||
"bottleneck": "^2.15.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 14"
|
||||
"node": ">= 18"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@octokit/core": ">=3"
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/plugin-retry/node_modules/@octokit/types": {
|
||||
"version": "9.3.2",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.3.2.tgz",
|
||||
"integrity": "sha512-D4iHGTdAnEEVsB8fl95m1hiz7D5YiRdQ9b/OEb3BYRVwbLsGHcRVPz+u+BgRLNk0Q0/4iZCBqDN96j2XNxfXrA==",
|
||||
"dependencies": {
|
||||
"@octokit/openapi-types": "^18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/request": {
|
||||
"version": "5.4.9",
|
||||
"integrity": "sha512-CzwVvRyimIM1h2n9pLVYfTDmX9m+KHSgCpqPsY8F1NdEK8IaWqXhSBXsdjOBFZSpEcxNEeg4p0UO9cQ8EnOCLA==",
|
||||
@@ -650,11 +644,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/types": {
|
||||
"version": "9.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.0.0.tgz",
|
||||
"integrity": "sha512-LUewfj94xCMH2rbD5YJ+6AQ4AVjFYTgpp6rboWM5T7N3IsIF65SBEOVcYMGAEzO/kKNiNaW4LoWtoThOhH06gw==",
|
||||
"version": "10.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-10.0.0.tgz",
|
||||
"integrity": "sha512-Vm8IddVmhCgU1fxC1eyinpwqzXPEYu0NrYzD3YZjlGjyftdLBTeqNblRC0jmJmgxbJIsQlyogVeGnrNaaMVzIg==",
|
||||
"dependencies": {
|
||||
"@octokit/openapi-types": "^16.0.0"
|
||||
"@octokit/openapi-types": "^18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@opentelemetry/api": {
|
||||
@@ -3673,14 +3667,6 @@
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/ip-regex": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz",
|
||||
"integrity": "sha512-58yWmlHpp7VYfcdTwMTvwMmqx/Elfxjd9RXTDyMsbL7lLWmhMylLEqiYVLKuLzOZqVgiWXD9MfR62Vv89VRxkw==",
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/irregular-plurals": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-3.3.0.tgz",
|
||||
@@ -4998,6 +4984,11 @@
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/querystringify": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz",
|
||||
"integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ=="
|
||||
},
|
||||
"node_modules/queue-microtask": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
|
||||
@@ -5093,6 +5084,11 @@
|
||||
"node": ">=0.10.5"
|
||||
}
|
||||
},
|
||||
"node_modules/requires-port": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
|
||||
"integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ=="
|
||||
},
|
||||
"node_modules/resolve": {
|
||||
"version": "1.22.1",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",
|
||||
@@ -5213,9 +5209,9 @@
|
||||
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "7.3.8",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
|
||||
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
|
||||
"version": "7.5.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz",
|
||||
"integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==",
|
||||
"dependencies": {
|
||||
"lru-cache": "^6.0.0"
|
||||
},
|
||||
@@ -5708,13 +5704,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/tough-cookie": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-3.0.1.tgz",
|
||||
"integrity": "sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg==",
|
||||
"version": "4.1.3",
|
||||
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz",
|
||||
"integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==",
|
||||
"dependencies": {
|
||||
"ip-regex": "^2.1.0",
|
||||
"psl": "^1.1.28",
|
||||
"punycode": "^2.1.1"
|
||||
"psl": "^1.1.33",
|
||||
"punycode": "^2.1.1",
|
||||
"universalify": "^0.2.0",
|
||||
"url-parse": "^1.5.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
@@ -5843,8 +5840,9 @@
|
||||
"integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w=="
|
||||
},
|
||||
"node_modules/universalify": {
|
||||
"version": "0.1.2",
|
||||
"integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz",
|
||||
"integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==",
|
||||
"engines": {
|
||||
"node": ">= 4.0.0"
|
||||
}
|
||||
@@ -5884,6 +5882,15 @@
|
||||
"punycode": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/url-parse": {
|
||||
"version": "1.5.10",
|
||||
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz",
|
||||
"integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==",
|
||||
"dependencies": {
|
||||
"querystringify": "^2.1.1",
|
||||
"requires-port": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/util": {
|
||||
"version": "0.10.4",
|
||||
"integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==",
|
||||
|
||||
12
node_modules/@azure/core-http/node_modules/tough-cookie/LICENSE
generated
vendored
12
node_modules/@azure/core-http/node_modules/tough-cookie/LICENSE
generated
vendored
@@ -1,12 +0,0 @@
|
||||
Copyright (c) 2015, Salesforce.com, Inc.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
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. Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
582
node_modules/@azure/core-http/node_modules/tough-cookie/README.md
generated
vendored
582
node_modules/@azure/core-http/node_modules/tough-cookie/README.md
generated
vendored
@@ -1,582 +0,0 @@
|
||||
[RFC6265](https://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js
|
||||
|
||||
[](https://nodei.co/npm/tough-cookie/)
|
||||
|
||||
[](https://travis-ci.org/salesforce/tough-cookie)
|
||||
|
||||
# Synopsis
|
||||
|
||||
``` javascript
|
||||
var tough = require('tough-cookie');
|
||||
var Cookie = tough.Cookie;
|
||||
var cookie = Cookie.parse(header);
|
||||
cookie.value = 'somethingdifferent';
|
||||
header = cookie.toString();
|
||||
|
||||
var cookiejar = new tough.CookieJar();
|
||||
cookiejar.setCookie(cookie, 'http://currentdomain.example.com/path', cb);
|
||||
// ...
|
||||
cookiejar.getCookies('http://example.com/otherpath',function(err,cookies) {
|
||||
res.headers['cookie'] = cookies.join('; ');
|
||||
});
|
||||
```
|
||||
|
||||
# Installation
|
||||
|
||||
It's _so_ easy!
|
||||
|
||||
`npm install tough-cookie`
|
||||
|
||||
Why the name? NPM modules `cookie`, `cookies` and `cookiejar` were already taken.
|
||||
|
||||
## Version Support
|
||||
|
||||
Support for versions of node.js will follow that of the [request](https://www.npmjs.com/package/request) module.
|
||||
|
||||
# API
|
||||
|
||||
## tough
|
||||
|
||||
Functions on the module you get from `require('tough-cookie')`. All can be used as pure functions and don't need to be "bound".
|
||||
|
||||
**Note**: prior to 1.0.x, several of these functions took a `strict` parameter. This has since been removed from the API as it was no longer necessary.
|
||||
|
||||
### `parseDate(string)`
|
||||
|
||||
Parse a cookie date string into a `Date`. Parses according to RFC6265 Section 5.1.1, not `Date.parse()`.
|
||||
|
||||
### `formatDate(date)`
|
||||
|
||||
Format a Date into a RFC1123 string (the RFC6265-recommended format).
|
||||
|
||||
### `canonicalDomain(str)`
|
||||
|
||||
Transforms a domain-name into a canonical domain-name. The canonical domain-name is a trimmed, lowercased, stripped-of-leading-dot and optionally punycode-encoded domain-name (Section 5.1.2 of RFC6265). For the most part, this function is idempotent (can be run again on its output without ill effects).
|
||||
|
||||
### `domainMatch(str,domStr[,canonicalize=true])`
|
||||
|
||||
Answers "does this real domain match the domain in a cookie?". The `str` is the "current" domain-name and the `domStr` is the "cookie" domain-name. Matches according to RFC6265 Section 5.1.3, but it helps to think of it as a "suffix match".
|
||||
|
||||
The `canonicalize` parameter will run the other two parameters through `canonicalDomain` or not.
|
||||
|
||||
### `defaultPath(path)`
|
||||
|
||||
Given a current request/response path, gives the Path apropriate for storing in a cookie. This is basically the "directory" of a "file" in the path, but is specified by Section 5.1.4 of the RFC.
|
||||
|
||||
The `path` parameter MUST be _only_ the pathname part of a URI (i.e. excludes the hostname, query, fragment, etc.). This is the `.pathname` property of node's `uri.parse()` output.
|
||||
|
||||
### `pathMatch(reqPath,cookiePath)`
|
||||
|
||||
Answers "does the request-path path-match a given cookie-path?" as per RFC6265 Section 5.1.4. Returns a boolean.
|
||||
|
||||
This is essentially a prefix-match where `cookiePath` is a prefix of `reqPath`.
|
||||
|
||||
### `parse(cookieString[, options])`
|
||||
|
||||
alias for `Cookie.parse(cookieString[, options])`
|
||||
|
||||
### `fromJSON(string)`
|
||||
|
||||
alias for `Cookie.fromJSON(string)`
|
||||
|
||||
### `getPublicSuffix(hostname)`
|
||||
|
||||
Returns the public suffix of this hostname. The public suffix is the shortest domain-name upon which a cookie can be set. Returns `null` if the hostname cannot have cookies set for it.
|
||||
|
||||
For example: `www.example.com` and `www.subdomain.example.com` both have public suffix `example.com`.
|
||||
|
||||
For further information, see http://publicsuffix.org/. This module derives its list from that site. This call is currently a wrapper around [`psl`](https://www.npmjs.com/package/psl)'s [get() method](https://www.npmjs.com/package/psl#pslgetdomain).
|
||||
|
||||
### `cookieCompare(a,b)`
|
||||
|
||||
For use with `.sort()`, sorts a list of cookies into the recommended order given in the RFC (Section 5.4 step 2). The sort algorithm is, in order of precedence:
|
||||
|
||||
* Longest `.path`
|
||||
* oldest `.creation` (which has a 1ms precision, same as `Date`)
|
||||
* lowest `.creationIndex` (to get beyond the 1ms precision)
|
||||
|
||||
``` javascript
|
||||
var cookies = [ /* unsorted array of Cookie objects */ ];
|
||||
cookies = cookies.sort(cookieCompare);
|
||||
```
|
||||
|
||||
**Note**: Since JavaScript's `Date` is limited to a 1ms precision, cookies within the same milisecond are entirely possible. This is especially true when using the `now` option to `.setCookie()`. The `.creationIndex` property is a per-process global counter, assigned during construction with `new Cookie()`. This preserves the spirit of the RFC sorting: older cookies go first. This works great for `MemoryCookieStore`, since `Set-Cookie` headers are parsed in order, but may not be so great for distributed systems. Sophisticated `Store`s may wish to set this to some other _logical clock_ such that if cookies A and B are created in the same millisecond, but cookie A is created before cookie B, then `A.creationIndex < B.creationIndex`. If you want to alter the global counter, which you probably _shouldn't_ do, it's stored in `Cookie.cookiesCreated`.
|
||||
|
||||
### `permuteDomain(domain)`
|
||||
|
||||
Generates a list of all possible domains that `domainMatch()` the parameter. May be handy for implementing cookie stores.
|
||||
|
||||
### `permutePath(path)`
|
||||
|
||||
Generates a list of all possible paths that `pathMatch()` the parameter. May be handy for implementing cookie stores.
|
||||
|
||||
|
||||
## Cookie
|
||||
|
||||
Exported via `tough.Cookie`.
|
||||
|
||||
### `Cookie.parse(cookieString[, options])`
|
||||
|
||||
Parses a single Cookie or Set-Cookie HTTP header into a `Cookie` object. Returns `undefined` if the string can't be parsed.
|
||||
|
||||
The options parameter is not required and currently has only one property:
|
||||
|
||||
* _loose_ - boolean - if `true` enable parsing of key-less cookies like `=abc` and `=`, which are not RFC-compliant.
|
||||
|
||||
If options is not an object, it is ignored, which means you can use `Array#map` with it.
|
||||
|
||||
Here's how to process the Set-Cookie header(s) on a node HTTP/HTTPS response:
|
||||
|
||||
``` javascript
|
||||
if (res.headers['set-cookie'] instanceof Array)
|
||||
cookies = res.headers['set-cookie'].map(Cookie.parse);
|
||||
else
|
||||
cookies = [Cookie.parse(res.headers['set-cookie'])];
|
||||
```
|
||||
|
||||
_Note:_ in version 2.3.3, tough-cookie limited the number of spaces before the `=` to 256 characters. This limitation has since been removed.
|
||||
See [Issue 92](https://github.com/salesforce/tough-cookie/issues/92)
|
||||
|
||||
### Properties
|
||||
|
||||
Cookie object properties:
|
||||
|
||||
* _key_ - string - the name or key of the cookie (default "")
|
||||
* _value_ - string - the value of the cookie (default "")
|
||||
* _expires_ - `Date` - if set, the `Expires=` attribute of the cookie (defaults to the string `"Infinity"`). See `setExpires()`
|
||||
* _maxAge_ - seconds - if set, the `Max-Age=` attribute _in seconds_ of the cookie. May also be set to strings `"Infinity"` and `"-Infinity"` for non-expiry and immediate-expiry, respectively. See `setMaxAge()`
|
||||
* _domain_ - string - the `Domain=` attribute of the cookie
|
||||
* _path_ - string - the `Path=` of the cookie
|
||||
* _secure_ - boolean - the `Secure` cookie flag
|
||||
* _httpOnly_ - boolean - the `HttpOnly` cookie flag
|
||||
* _sameSite_ - string - the `SameSite` cookie attribute (from [RFC6265bis]); must be one of `none`, `lax`, or `strict`
|
||||
* _extensions_ - `Array` - any unrecognized cookie attributes as strings (even if equal-signs inside)
|
||||
* _creation_ - `Date` - when this cookie was constructed
|
||||
* _creationIndex_ - number - set at construction, used to provide greater sort precision (please see `cookieCompare(a,b)` for a full explanation)
|
||||
|
||||
After a cookie has been passed through `CookieJar.setCookie()` it will have the following additional attributes:
|
||||
|
||||
* _hostOnly_ - boolean - is this a host-only cookie (i.e. no Domain field was set, but was instead implied)
|
||||
* _pathIsDefault_ - boolean - if true, there was no Path field on the cookie and `defaultPath()` was used to derive one.
|
||||
* _creation_ - `Date` - **modified** from construction to when the cookie was added to the jar
|
||||
* _lastAccessed_ - `Date` - last time the cookie got accessed. Will affect cookie cleaning once implemented. Using `cookiejar.getCookies(...)` will update this attribute.
|
||||
|
||||
### `Cookie([{properties}])`
|
||||
|
||||
Receives an options object that can contain any of the above Cookie properties, uses the default for unspecified properties.
|
||||
|
||||
### `.toString()`
|
||||
|
||||
encode to a Set-Cookie header value. The Expires cookie field is set using `formatDate()`, but is omitted entirely if `.expires` is `Infinity`.
|
||||
|
||||
### `.cookieString()`
|
||||
|
||||
encode to a Cookie header value (i.e. the `.key` and `.value` properties joined with '=').
|
||||
|
||||
### `.setExpires(String)`
|
||||
|
||||
sets the expiry based on a date-string passed through `parseDate()`. If parseDate returns `null` (i.e. can't parse this date string), `.expires` is set to `"Infinity"` (a string) is set.
|
||||
|
||||
### `.setMaxAge(number)`
|
||||
|
||||
sets the maxAge in seconds. Coerces `-Infinity` to `"-Infinity"` and `Infinity` to `"Infinity"` so it JSON serializes correctly.
|
||||
|
||||
### `.expiryTime([now=Date.now()])`
|
||||
|
||||
### `.expiryDate([now=Date.now()])`
|
||||
|
||||
expiryTime() Computes the absolute unix-epoch milliseconds that this cookie expires. expiryDate() works similarly, except it returns a `Date` object. Note that in both cases the `now` parameter should be milliseconds.
|
||||
|
||||
Max-Age takes precedence over Expires (as per the RFC). The `.creation` attribute -- or, by default, the `now` parameter -- is used to offset the `.maxAge` attribute.
|
||||
|
||||
If Expires (`.expires`) is set, that's returned.
|
||||
|
||||
Otherwise, `expiryTime()` returns `Infinity` and `expiryDate()` returns a `Date` object for "Tue, 19 Jan 2038 03:14:07 GMT" (latest date that can be expressed by a 32-bit `time_t`; the common limit for most user-agents).
|
||||
|
||||
### `.TTL([now=Date.now()])`
|
||||
|
||||
compute the TTL relative to `now` (milliseconds). The same precedence rules as for `expiryTime`/`expiryDate` apply.
|
||||
|
||||
The "number" `Infinity` is returned for cookies without an explicit expiry and `0` is returned if the cookie is expired. Otherwise a time-to-live in milliseconds is returned.
|
||||
|
||||
### `.canonicalizedDomain()`
|
||||
|
||||
### `.cdomain()`
|
||||
|
||||
return the canonicalized `.domain` field. This is lower-cased and punycode (RFC3490) encoded if the domain has any non-ASCII characters.
|
||||
|
||||
### `.toJSON()`
|
||||
|
||||
For convenience in using `JSON.serialize(cookie)`. Returns a plain-old `Object` that can be JSON-serialized.
|
||||
|
||||
Any `Date` properties (i.e., `.expires`, `.creation`, and `.lastAccessed`) are exported in ISO format (`.toISOString()`).
|
||||
|
||||
**NOTE**: Custom `Cookie` properties will be discarded. In tough-cookie 1.x, since there was no `.toJSON` method explicitly defined, all enumerable properties were captured. If you want a property to be serialized, add the property name to the `Cookie.serializableProperties` Array.
|
||||
|
||||
### `Cookie.fromJSON(strOrObj)`
|
||||
|
||||
Does the reverse of `cookie.toJSON()`. If passed a string, will `JSON.parse()` that first.
|
||||
|
||||
Any `Date` properties (i.e., `.expires`, `.creation`, and `.lastAccessed`) are parsed via `Date.parse()`, not the tough-cookie `parseDate`, since it's JavaScript/JSON-y timestamps being handled at this layer.
|
||||
|
||||
Returns `null` upon JSON parsing error.
|
||||
|
||||
### `.clone()`
|
||||
|
||||
Does a deep clone of this cookie, exactly implemented as `Cookie.fromJSON(cookie.toJSON())`.
|
||||
|
||||
### `.validate()`
|
||||
|
||||
Status: *IN PROGRESS*. Works for a few things, but is by no means comprehensive.
|
||||
|
||||
validates cookie attributes for semantic correctness. Useful for "lint" checking any Set-Cookie headers you generate. For now, it returns a boolean, but eventually could return a reason string -- you can future-proof with this construct:
|
||||
|
||||
``` javascript
|
||||
if (cookie.validate() === true) {
|
||||
// it's tasty
|
||||
} else {
|
||||
// yuck!
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## CookieJar
|
||||
|
||||
Exported via `tough.CookieJar`.
|
||||
|
||||
### `CookieJar([store],[options])`
|
||||
|
||||
Simply use `new CookieJar()`. If you'd like to use a custom store, pass that to the constructor otherwise a `MemoryCookieStore` will be created and used.
|
||||
|
||||
The `options` object can be omitted and can have the following properties:
|
||||
|
||||
* _rejectPublicSuffixes_ - boolean - default `true` - reject cookies with domains like "com" and "co.uk"
|
||||
* _looseMode_ - boolean - default `false` - accept malformed cookies like `bar` and `=bar`, which have an implied empty name.
|
||||
* _prefixSecurity_ - string - default `silent` - set to `'unsafe-disabled'`, `'silent'`, or `'strict'`. See [Cookie Prefixes] below.
|
||||
* _allowSpecialUseDomain_ - boolean - default `false` - accepts special-use domain suffixes, such as `local`. Useful for testing purposes.
|
||||
This is not in the standard, but is used sometimes on the web and is accepted by (most) browsers.
|
||||
|
||||
Since eventually this module would like to support database/remote/etc. CookieJars, continuation passing style is used for CookieJar methods.
|
||||
|
||||
### `.setCookie(cookieOrString, currentUrl, [{options},] cb(err,cookie))`
|
||||
|
||||
Attempt to set the cookie in the cookie jar. If the operation fails, an error will be given to the callback `cb`, otherwise the cookie is passed through. The cookie will have updated `.creation`, `.lastAccessed` and `.hostOnly` properties.
|
||||
|
||||
The `options` object can be omitted and can have the following properties:
|
||||
|
||||
* _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies.
|
||||
* _secure_ - boolean - autodetect from url - indicates if this is a "Secure" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`.
|
||||
* _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies
|
||||
* _ignoreError_ - boolean - default `false` - silently ignore things like parse errors and invalid domains. `Store` errors aren't ignored by this option.
|
||||
* _sameSiteContext_ - string - default unset - set to `'none'`, `'lax'`, or `'strict'` See [SameSite Cookies] below.
|
||||
|
||||
As per the RFC, the `.hostOnly` property is set if there was no "Domain=" parameter in the cookie string (or `.domain` was null on the Cookie object). The `.domain` property is set to the fully-qualified hostname of `currentUrl` in this case. Matching this cookie requires an exact hostname match (not a `domainMatch` as per usual).
|
||||
|
||||
### `.setCookieSync(cookieOrString, currentUrl, [{options}])`
|
||||
|
||||
Synchronous version of `setCookie`; only works with synchronous stores (e.g. the default `MemoryCookieStore`).
|
||||
|
||||
### `.getCookies(currentUrl, [{options},] cb(err,cookies))`
|
||||
|
||||
Retrieve the list of cookies that can be sent in a Cookie header for the current url.
|
||||
|
||||
If an error is encountered, that's passed as `err` to the callback, otherwise an `Array` of `Cookie` objects is passed. The array is sorted with `cookieCompare()` unless the `{sort:false}` option is given.
|
||||
|
||||
The `options` object can be omitted and can have the following properties:
|
||||
|
||||
* _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies.
|
||||
* _secure_ - boolean - autodetect from url - indicates if this is a "Secure" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`.
|
||||
* _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies
|
||||
* _expire_ - boolean - default `true` - perform expiry-time checking of cookies and asynchronously remove expired cookies from the store. Using `false` will return expired cookies and **not** remove them from the store (which is useful for replaying Set-Cookie headers, potentially).
|
||||
* _allPaths_ - boolean - default `false` - if `true`, do not scope cookies by path. The default uses RFC-compliant path scoping. **Note**: may not be supported by the underlying store (the default `MemoryCookieStore` supports it).
|
||||
* _sameSiteContext_ - string - default unset - Set this to `'none'`, `'lax'` or `'strict'` to enforce SameSite cookies upon retrival. See [SameSite Cookies] below.
|
||||
|
||||
The `.lastAccessed` property of the returned cookies will have been updated.
|
||||
|
||||
### `.getCookiesSync(currentUrl, [{options}])`
|
||||
|
||||
Synchronous version of `getCookies`; only works with synchronous stores (e.g. the default `MemoryCookieStore`).
|
||||
|
||||
### `.getCookieString(...)`
|
||||
|
||||
Accepts the same options as `.getCookies()` but passes a string suitable for a Cookie header rather than an array to the callback. Simply maps the `Cookie` array via `.cookieString()`.
|
||||
|
||||
### `.getCookieStringSync(...)`
|
||||
|
||||
Synchronous version of `getCookieString`; only works with synchronous stores (e.g. the default `MemoryCookieStore`).
|
||||
|
||||
### `.getSetCookieStrings(...)`
|
||||
|
||||
Returns an array of strings suitable for **Set-Cookie** headers. Accepts the same options as `.getCookies()`. Simply maps the cookie array via `.toString()`.
|
||||
|
||||
### `.getSetCookieStringsSync(...)`
|
||||
|
||||
Synchronous version of `getSetCookieStrings`; only works with synchronous stores (e.g. the default `MemoryCookieStore`).
|
||||
|
||||
### `.serialize(cb(err,serializedObject))`
|
||||
|
||||
Serialize the Jar if the underlying store supports `.getAllCookies`.
|
||||
|
||||
**NOTE**: Custom `Cookie` properties will be discarded. If you want a property to be serialized, add the property name to the `Cookie.serializableProperties` Array.
|
||||
|
||||
See [Serialization Format].
|
||||
|
||||
### `.serializeSync()`
|
||||
|
||||
Sync version of .serialize
|
||||
|
||||
### `.toJSON()`
|
||||
|
||||
Alias of .serializeSync() for the convenience of `JSON.stringify(cookiejar)`.
|
||||
|
||||
### `CookieJar.deserialize(serialized, [store], cb(err,object))`
|
||||
|
||||
A new Jar is created and the serialized Cookies are added to the underlying store. Each `Cookie` is added via `store.putCookie` in the order in which they appear in the serialization.
|
||||
|
||||
The `store` argument is optional, but should be an instance of `Store`. By default, a new instance of `MemoryCookieStore` is created.
|
||||
|
||||
As a convenience, if `serialized` is a string, it is passed through `JSON.parse` first. If that throws an error, this is passed to the callback.
|
||||
|
||||
### `CookieJar.deserializeSync(serialized, [store])`
|
||||
|
||||
Sync version of `.deserialize`. _Note_ that the `store` must be synchronous for this to work.
|
||||
|
||||
### `CookieJar.fromJSON(string)`
|
||||
|
||||
Alias of `.deserializeSync` to provide consistency with `Cookie.fromJSON()`.
|
||||
|
||||
### `.clone([store,]cb(err,newJar))`
|
||||
|
||||
Produces a deep clone of this jar. Modifications to the original won't affect the clone, and vice versa.
|
||||
|
||||
The `store` argument is optional, but should be an instance of `Store`. By default, a new instance of `MemoryCookieStore` is created. Transferring between store types is supported so long as the source implements `.getAllCookies()` and the destination implements `.putCookie()`.
|
||||
|
||||
### `.cloneSync([store])`
|
||||
|
||||
Synchronous version of `.clone`, returning a new `CookieJar` instance.
|
||||
|
||||
The `store` argument is optional, but must be a _synchronous_ `Store` instance if specified. If not passed, a new instance of `MemoryCookieStore` is used.
|
||||
|
||||
The _source_ and _destination_ must both be synchronous `Store`s. If one or both stores are asynchronous, use `.clone` instead. Recall that `MemoryCookieStore` supports both synchronous and asynchronous API calls.
|
||||
|
||||
### `.removeAllCookies(cb(err))`
|
||||
|
||||
Removes all cookies from the jar.
|
||||
|
||||
This is a new backwards-compatible feature of `tough-cookie` version 2.5, so not all Stores will implement it efficiently. For Stores that do not implement `removeAllCookies`, the fallback is to call `removeCookie` after `getAllCookies`. If `getAllCookies` fails or isn't implemented in the Store, that error is returned. If one or more of the `removeCookie` calls fail, only the first error is returned.
|
||||
|
||||
### `.removeAllCookiesSync()`
|
||||
|
||||
Sync version of `.removeAllCookies()`
|
||||
|
||||
## Store
|
||||
|
||||
Base class for CookieJar stores. Available as `tough.Store`.
|
||||
|
||||
## Store API
|
||||
|
||||
The storage model for each `CookieJar` instance can be replaced with a custom implementation. The default is `MemoryCookieStore` which can be found in the `lib/memstore.js` file. The API uses continuation-passing-style to allow for asynchronous stores.
|
||||
|
||||
Stores should inherit from the base `Store` class, which is available as `require('tough-cookie').Store`.
|
||||
|
||||
Stores are asynchronous by default, but if `store.synchronous` is set to `true`, then the `*Sync` methods on the of the containing `CookieJar` can be used (however, the continuation-passing style
|
||||
|
||||
All `domain` parameters will have been normalized before calling.
|
||||
|
||||
The Cookie store must have all of the following methods.
|
||||
|
||||
### `store.findCookie(domain, path, key, cb(err,cookie))`
|
||||
|
||||
Retrieve a cookie with the given domain, path and key (a.k.a. name). The RFC maintains that exactly one of these cookies should exist in a store. If the store is using versioning, this means that the latest/newest such cookie should be returned.
|
||||
|
||||
Callback takes an error and the resulting `Cookie` object. If no cookie is found then `null` MUST be passed instead (i.e. not an error).
|
||||
|
||||
### `store.findCookies(domain, path, cb(err,cookies))`
|
||||
|
||||
Locates cookies matching the given domain and path. This is most often called in the context of `cookiejar.getCookies()` above.
|
||||
|
||||
If no cookies are found, the callback MUST be passed an empty array.
|
||||
|
||||
The resulting list will be checked for applicability to the current request according to the RFC (domain-match, path-match, http-only-flag, secure-flag, expiry, etc.), so it's OK to use an optimistic search algorithm when implementing this method. However, the search algorithm used SHOULD try to find cookies that `domainMatch()` the domain and `pathMatch()` the path in order to limit the amount of checking that needs to be done.
|
||||
|
||||
As of version 0.9.12, the `allPaths` option to `cookiejar.getCookies()` above will cause the path here to be `null`. If the path is `null`, path-matching MUST NOT be performed (i.e. domain-matching only).
|
||||
|
||||
### `store.putCookie(cookie, cb(err))`
|
||||
|
||||
Adds a new cookie to the store. The implementation SHOULD replace any existing cookie with the same `.domain`, `.path`, and `.key` properties -- depending on the nature of the implementation, it's possible that between the call to `fetchCookie` and `putCookie` that a duplicate `putCookie` can occur.
|
||||
|
||||
The `cookie` object MUST NOT be modified; the caller will have already updated the `.creation` and `.lastAccessed` properties.
|
||||
|
||||
Pass an error if the cookie cannot be stored.
|
||||
|
||||
### `store.updateCookie(oldCookie, newCookie, cb(err))`
|
||||
|
||||
Update an existing cookie. The implementation MUST update the `.value` for a cookie with the same `domain`, `.path` and `.key`. The implementation SHOULD check that the old value in the store is equivalent to `oldCookie` - how the conflict is resolved is up to the store.
|
||||
|
||||
The `.lastAccessed` property will always be different between the two objects (to the precision possible via JavaScript's clock). Both `.creation` and `.creationIndex` are guaranteed to be the same. Stores MAY ignore or defer the `.lastAccessed` change at the cost of affecting how cookies are selected for automatic deletion (e.g., least-recently-used, which is up to the store to implement).
|
||||
|
||||
Stores may wish to optimize changing the `.value` of the cookie in the store versus storing a new cookie. If the implementation doesn't define this method a stub that calls `putCookie(newCookie,cb)` will be added to the store object.
|
||||
|
||||
The `newCookie` and `oldCookie` objects MUST NOT be modified.
|
||||
|
||||
Pass an error if the newCookie cannot be stored.
|
||||
|
||||
### `store.removeCookie(domain, path, key, cb(err))`
|
||||
|
||||
Remove a cookie from the store (see notes on `findCookie` about the uniqueness constraint).
|
||||
|
||||
The implementation MUST NOT pass an error if the cookie doesn't exist; only pass an error due to the failure to remove an existing cookie.
|
||||
|
||||
### `store.removeCookies(domain, path, cb(err))`
|
||||
|
||||
Removes matching cookies from the store. The `path` parameter is optional, and if missing means all paths in a domain should be removed.
|
||||
|
||||
Pass an error ONLY if removing any existing cookies failed.
|
||||
|
||||
### `store.removeAllCookies(cb(err))`
|
||||
|
||||
_Optional_. Removes all cookies from the store.
|
||||
|
||||
Pass an error if one or more cookies can't be removed.
|
||||
|
||||
**Note**: New method as of `tough-cookie` version 2.5, so not all Stores will implement this, plus some stores may choose not to implement this.
|
||||
|
||||
### `store.getAllCookies(cb(err, cookies))`
|
||||
|
||||
_Optional_. Produces an `Array` of all cookies during `jar.serialize()`. The items in the array can be true `Cookie` objects or generic `Object`s with the [Serialization Format] data structure.
|
||||
|
||||
Cookies SHOULD be returned in creation order to preserve sorting via `compareCookies()`. For reference, `MemoryCookieStore` will sort by `.creationIndex` since it uses true `Cookie` objects internally. If you don't return the cookies in creation order, they'll still be sorted by creation time, but this only has a precision of 1ms. See `compareCookies` for more detail.
|
||||
|
||||
Pass an error if retrieval fails.
|
||||
|
||||
**Note**: not all Stores can implement this due to technical limitations, so it is optional.
|
||||
|
||||
## MemoryCookieStore
|
||||
|
||||
Inherits from `Store`.
|
||||
|
||||
A just-in-memory CookieJar synchronous store implementation, used by default. Despite being a synchronous implementation, it's usable with both the synchronous and asynchronous forms of the `CookieJar` API. Supports serialization, `getAllCookies`, and `removeAllCookies`.
|
||||
|
||||
## Community Cookie Stores
|
||||
|
||||
These are some Store implementations authored and maintained by the community. They aren't official and we don't vouch for them but you may be interested to have a look:
|
||||
|
||||
- [`db-cookie-store`](https://github.com/JSBizon/db-cookie-store): SQL including SQLite-based databases
|
||||
- [`file-cookie-store`](https://github.com/JSBizon/file-cookie-store): Netscape cookie file format on disk
|
||||
- [`redis-cookie-store`](https://github.com/benkroeger/redis-cookie-store): Redis
|
||||
- [`tough-cookie-filestore`](https://github.com/mitsuru/tough-cookie-filestore): JSON on disk
|
||||
- [`tough-cookie-web-storage-store`](https://github.com/exponentjs/tough-cookie-web-storage-store): DOM localStorage and sessionStorage
|
||||
|
||||
|
||||
# Serialization Format
|
||||
|
||||
**NOTE**: if you want to have custom `Cookie` properties serialized, add the property name to `Cookie.serializableProperties`.
|
||||
|
||||
```js
|
||||
{
|
||||
// The version of tough-cookie that serialized this jar.
|
||||
version: 'tough-cookie@1.x.y',
|
||||
|
||||
// add the store type, to make humans happy:
|
||||
storeType: 'MemoryCookieStore',
|
||||
|
||||
// CookieJar configuration:
|
||||
rejectPublicSuffixes: true,
|
||||
// ... future items go here
|
||||
|
||||
// Gets filled from jar.store.getAllCookies():
|
||||
cookies: [
|
||||
{
|
||||
key: 'string',
|
||||
value: 'string',
|
||||
// ...
|
||||
/* other Cookie.serializableProperties go here */
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
# RFC6265bis
|
||||
|
||||
Support for RFC6265bis revision 02 is being developed. Since this is a bit of an omnibus revision to the RFC6252, support is broken up into the functional areas.
|
||||
|
||||
## Leave Secure Cookies Alone
|
||||
|
||||
Not yet supported.
|
||||
|
||||
This change makes it so that if a cookie is sent from the server to the client with a `Secure` attribute, the channel must also be secure or the cookie is ignored.
|
||||
|
||||
## SameSite Cookies
|
||||
|
||||
Supported.
|
||||
|
||||
This change makes it possible for servers, and supporting clients, to mitigate certain types of CSRF attacks by disallowing `SameSite` cookies from being sent cross-origin.
|
||||
|
||||
On the Cookie object itself, you can get/set the `.sameSite` attribute, which will be serialized into the `SameSite=` cookie attribute. When unset or `undefined`, no `SameSite=` attribute will be serialized. The valid values of this attribute are `'none'`, `'lax'`, or `'strict'`. Other values will be serialized as-is.
|
||||
|
||||
When parsing cookies with a `SameSite` cookie attribute, values other than `'lax'` or `'strict'` are parsed as `'none'`. For example, `SomeCookie=SomeValue; SameSite=garbage` will parse so that `cookie.sameSite === 'none'`.
|
||||
|
||||
In order to support SameSite cookies, you must provide a `sameSiteContext` option to _both_ `setCookie` and `getCookies`. Valid values for this option are just like for the Cookie object, but have particular meanings:
|
||||
1. `'strict'` mode - If the request is on the same "site for cookies" (see the RFC draft for what this means), pass this option to add a layer of defense against CSRF.
|
||||
2. `'lax'` mode - If the request is from another site, _but_ is directly because of navigation by the user, e.g., `<link type=prefetch>` or `<a href="...">`, pass `sameSiteContext: 'lax'`.
|
||||
3. `'none'` - Otherwise, pass `sameSiteContext: 'none'` (this indicates a cross-origin request).
|
||||
4. unset/`undefined` - SameSite **will not** be enforced! This can be a valid use-case for when CSRF isn't in the threat model of the system being built.
|
||||
|
||||
It is highly recommended that you read RFC 6265bis for fine details on SameSite cookies. In particular [Section 8.8](https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-02#section-8.8) discusses security considerations and defense in depth.
|
||||
|
||||
## Cookie Prefixes
|
||||
|
||||
Supported.
|
||||
|
||||
Cookie prefixes are a way to indicate that a given cookie was set with a set of attributes simply by inspecting the first few characters of the cookie's name.
|
||||
|
||||
Cookie prefixes are defined in [Section 4.1.3 of 6265bis](https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-4.1.3). Two prefixes are defined:
|
||||
|
||||
1. `"__Secure-" Prefix`: If a cookie's name begins with a case-sensitive match for the string "__Secure-", then the cookie will have been set with a "Secure" attribute.
|
||||
2. `"__Host-" Prefix`: If a cookie's name begins with a case-sensitive match for the string "__Host-", then the cookie will have been set with a "Secure" attribute, a "Path" attribute with a value of "/", and no "Domain" attribute.
|
||||
|
||||
If `prefixSecurity` is enabled for `CookieJar`, then cookies that match the prefixes defined above but do not obey the attribute restrictions will not be added.
|
||||
|
||||
You can define this functionality by passing in `prefixSecurity` option to `CookieJar`. It can be one of 3 values:
|
||||
|
||||
1. `silent`: Enable cookie prefix checking but silently fail to add the cookie if conditions not met. Default.
|
||||
2. `strict`: Enable cookie prefix checking and error out if conditions not met.
|
||||
3. `unsafe-disabled`: Disable cookie prefix checking.
|
||||
|
||||
Note that if `ignoreError` is passed in as `true` then the error will be silent regardless of `prefixSecurity` option (assuming it's enabled).
|
||||
|
||||
|
||||
# Copyright and License
|
||||
|
||||
BSD-3-Clause:
|
||||
|
||||
```text
|
||||
Copyright (c) 2015, Salesforce.com, Inc.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
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. Neither the name of Salesforce.com nor the names of its contributors may
|
||||
be used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
```
|
||||
1671
node_modules/@azure/core-http/node_modules/tough-cookie/lib/cookie.js
generated
vendored
1671
node_modules/@azure/core-http/node_modules/tough-cookie/lib/cookie.js
generated
vendored
File diff suppressed because it is too large
Load Diff
190
node_modules/@azure/core-http/node_modules/tough-cookie/lib/memstore.js
generated
vendored
190
node_modules/@azure/core-http/node_modules/tough-cookie/lib/memstore.js
generated
vendored
@@ -1,190 +0,0 @@
|
||||
/*!
|
||||
* Copyright (c) 2015, Salesforce.com, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 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. Neither the name of Salesforce.com nor the names of its contributors may
|
||||
* be used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
"use strict";
|
||||
const { fromCallback } = require("universalify");
|
||||
const Store = require("./store").Store;
|
||||
const permuteDomain = require("./permuteDomain").permuteDomain;
|
||||
const pathMatch = require("./pathMatch").pathMatch;
|
||||
const util = require("util");
|
||||
|
||||
class MemoryCookieStore extends Store {
|
||||
constructor() {
|
||||
super();
|
||||
this.synchronous = true;
|
||||
this.idx = {};
|
||||
if (util.inspect.custom) {
|
||||
this[util.inspect.custom] = this.inspect;
|
||||
}
|
||||
}
|
||||
|
||||
inspect() {
|
||||
return `{ idx: ${util.inspect(this.idx, false, 2)} }`;
|
||||
}
|
||||
|
||||
findCookie(domain, path, key, cb) {
|
||||
if (!this.idx[domain]) {
|
||||
return cb(null, undefined);
|
||||
}
|
||||
if (!this.idx[domain][path]) {
|
||||
return cb(null, undefined);
|
||||
}
|
||||
return cb(null, this.idx[domain][path][key] || null);
|
||||
}
|
||||
findCookies(domain, path, allowSpecialUseDomain, cb) {
|
||||
const results = [];
|
||||
if (typeof allowSpecialUseDomain === "function") {
|
||||
cb = allowSpecialUseDomain;
|
||||
allowSpecialUseDomain = false;
|
||||
}
|
||||
if (!domain) {
|
||||
return cb(null, []);
|
||||
}
|
||||
|
||||
let pathMatcher;
|
||||
if (!path) {
|
||||
// null means "all paths"
|
||||
pathMatcher = function matchAll(domainIndex) {
|
||||
for (const curPath in domainIndex) {
|
||||
const pathIndex = domainIndex[curPath];
|
||||
for (const key in pathIndex) {
|
||||
results.push(pathIndex[key]);
|
||||
}
|
||||
}
|
||||
};
|
||||
} else {
|
||||
pathMatcher = function matchRFC(domainIndex) {
|
||||
//NOTE: we should use path-match algorithm from S5.1.4 here
|
||||
//(see : https://github.com/ChromiumWebApps/chromium/blob/b3d3b4da8bb94c1b2e061600df106d590fda3620/net/cookies/canonical_cookie.cc#L299)
|
||||
Object.keys(domainIndex).forEach(cookiePath => {
|
||||
if (pathMatch(path, cookiePath)) {
|
||||
const pathIndex = domainIndex[cookiePath];
|
||||
for (const key in pathIndex) {
|
||||
results.push(pathIndex[key]);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
const domains = permuteDomain(domain, allowSpecialUseDomain) || [domain];
|
||||
const idx = this.idx;
|
||||
domains.forEach(curDomain => {
|
||||
const domainIndex = idx[curDomain];
|
||||
if (!domainIndex) {
|
||||
return;
|
||||
}
|
||||
pathMatcher(domainIndex);
|
||||
});
|
||||
|
||||
cb(null, results);
|
||||
}
|
||||
|
||||
putCookie(cookie, cb) {
|
||||
if (!this.idx[cookie.domain]) {
|
||||
this.idx[cookie.domain] = {};
|
||||
}
|
||||
if (!this.idx[cookie.domain][cookie.path]) {
|
||||
this.idx[cookie.domain][cookie.path] = {};
|
||||
}
|
||||
this.idx[cookie.domain][cookie.path][cookie.key] = cookie;
|
||||
cb(null);
|
||||
}
|
||||
updateCookie(oldCookie, newCookie, cb) {
|
||||
// updateCookie() may avoid updating cookies that are identical. For example,
|
||||
// lastAccessed may not be important to some stores and an equality
|
||||
// comparison could exclude that field.
|
||||
this.putCookie(newCookie, cb);
|
||||
}
|
||||
removeCookie(domain, path, key, cb) {
|
||||
if (
|
||||
this.idx[domain] &&
|
||||
this.idx[domain][path] &&
|
||||
this.idx[domain][path][key]
|
||||
) {
|
||||
delete this.idx[domain][path][key];
|
||||
}
|
||||
cb(null);
|
||||
}
|
||||
removeCookies(domain, path, cb) {
|
||||
if (this.idx[domain]) {
|
||||
if (path) {
|
||||
delete this.idx[domain][path];
|
||||
} else {
|
||||
delete this.idx[domain];
|
||||
}
|
||||
}
|
||||
return cb(null);
|
||||
}
|
||||
removeAllCookies(cb) {
|
||||
this.idx = {};
|
||||
return cb(null);
|
||||
}
|
||||
getAllCookies(cb) {
|
||||
const cookies = [];
|
||||
const idx = this.idx;
|
||||
|
||||
const domains = Object.keys(idx);
|
||||
domains.forEach(domain => {
|
||||
const paths = Object.keys(idx[domain]);
|
||||
paths.forEach(path => {
|
||||
const keys = Object.keys(idx[domain][path]);
|
||||
keys.forEach(key => {
|
||||
if (key !== null) {
|
||||
cookies.push(idx[domain][path][key]);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// Sort by creationIndex so deserializing retains the creation order.
|
||||
// When implementing your own store, this SHOULD retain the order too
|
||||
cookies.sort((a, b) => {
|
||||
return (a.creationIndex || 0) - (b.creationIndex || 0);
|
||||
});
|
||||
|
||||
cb(null, cookies);
|
||||
}
|
||||
}
|
||||
|
||||
[
|
||||
"findCookie",
|
||||
"findCookies",
|
||||
"putCookie",
|
||||
"updateCookie",
|
||||
"removeCookie",
|
||||
"removeCookies",
|
||||
"removeAllCookies",
|
||||
"getAllCookies"
|
||||
].forEach(name => {
|
||||
MemoryCookieStore[name] = fromCallback(MemoryCookieStore.prototype[name]);
|
||||
});
|
||||
|
||||
exports.MemoryCookieStore = MemoryCookieStore;
|
||||
61
node_modules/@azure/core-http/node_modules/tough-cookie/lib/pathMatch.js
generated
vendored
61
node_modules/@azure/core-http/node_modules/tough-cookie/lib/pathMatch.js
generated
vendored
@@ -1,61 +0,0 @@
|
||||
/*!
|
||||
* Copyright (c) 2015, Salesforce.com, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 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. Neither the name of Salesforce.com nor the names of its contributors may
|
||||
* be used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
"use strict";
|
||||
/*
|
||||
* "A request-path path-matches a given cookie-path if at least one of the
|
||||
* following conditions holds:"
|
||||
*/
|
||||
function pathMatch(reqPath, cookiePath) {
|
||||
// "o The cookie-path and the request-path are identical."
|
||||
if (cookiePath === reqPath) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const idx = reqPath.indexOf(cookiePath);
|
||||
if (idx === 0) {
|
||||
// "o The cookie-path is a prefix of the request-path, and the last
|
||||
// character of the cookie-path is %x2F ("/")."
|
||||
if (cookiePath.substr(-1) === "/") {
|
||||
return true;
|
||||
}
|
||||
|
||||
// " o The cookie-path is a prefix of the request-path, and the first
|
||||
// character of the request-path that is not included in the cookie- path
|
||||
// is a %x2F ("/") character."
|
||||
if (reqPath.substr(cookiePath.length, 1) === "/") {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
exports.pathMatch = pathMatch;
|
||||
70
node_modules/@azure/core-http/node_modules/tough-cookie/lib/permuteDomain.js
generated
vendored
70
node_modules/@azure/core-http/node_modules/tough-cookie/lib/permuteDomain.js
generated
vendored
@@ -1,70 +0,0 @@
|
||||
/*!
|
||||
* Copyright (c) 2015, Salesforce.com, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 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. Neither the name of Salesforce.com nor the names of its contributors may
|
||||
* be used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
"use strict";
|
||||
const pubsuffix = require("./pubsuffix-psl");
|
||||
|
||||
// Gives the permutation of all possible domainMatch()es of a given domain. The
|
||||
// array is in shortest-to-longest order. Handy for indexing.
|
||||
const SPECIAL_USE_DOMAINS = ["local"]; // RFC 6761
|
||||
function permuteDomain(domain, allowSpecialUseDomain) {
|
||||
let pubSuf = null;
|
||||
if (allowSpecialUseDomain) {
|
||||
const domainParts = domain.split(".");
|
||||
if (SPECIAL_USE_DOMAINS.includes(domainParts[domainParts.length - 1])) {
|
||||
pubSuf = `${domainParts[domainParts.length - 2]}.${
|
||||
domainParts[domainParts.length - 1]
|
||||
}`;
|
||||
} else {
|
||||
pubSuf = pubsuffix.getPublicSuffix(domain);
|
||||
}
|
||||
} else {
|
||||
pubSuf = pubsuffix.getPublicSuffix(domain);
|
||||
}
|
||||
|
||||
if (!pubSuf) {
|
||||
return null;
|
||||
}
|
||||
if (pubSuf == domain) {
|
||||
return [domain];
|
||||
}
|
||||
|
||||
const prefix = domain.slice(0, -(pubSuf.length + 1)); // ".example.com"
|
||||
const parts = prefix.split(".").reverse();
|
||||
let cur = pubSuf;
|
||||
const permutations = [cur];
|
||||
while (parts.length) {
|
||||
cur = `${parts.shift()}.${cur}`;
|
||||
permutations.push(cur);
|
||||
}
|
||||
return permutations;
|
||||
}
|
||||
|
||||
exports.permuteDomain = permuteDomain;
|
||||
38
node_modules/@azure/core-http/node_modules/tough-cookie/lib/pubsuffix-psl.js
generated
vendored
38
node_modules/@azure/core-http/node_modules/tough-cookie/lib/pubsuffix-psl.js
generated
vendored
@@ -1,38 +0,0 @@
|
||||
/*!
|
||||
* Copyright (c) 2018, Salesforce.com, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 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. Neither the name of Salesforce.com nor the names of its contributors may
|
||||
* be used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
"use strict";
|
||||
const psl = require("psl");
|
||||
|
||||
function getPublicSuffix(domain) {
|
||||
return psl.get(domain);
|
||||
}
|
||||
|
||||
exports.getPublicSuffix = getPublicSuffix;
|
||||
76
node_modules/@azure/core-http/node_modules/tough-cookie/lib/store.js
generated
vendored
76
node_modules/@azure/core-http/node_modules/tough-cookie/lib/store.js
generated
vendored
@@ -1,76 +0,0 @@
|
||||
/*!
|
||||
* Copyright (c) 2015, Salesforce.com, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 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. Neither the name of Salesforce.com nor the names of its contributors may
|
||||
* be used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
"use strict";
|
||||
/*jshint unused:false */
|
||||
|
||||
class Store {
|
||||
constructor() {
|
||||
this.synchronous = false;
|
||||
}
|
||||
|
||||
findCookie(domain, path, key, cb) {
|
||||
throw new Error("findCookie is not implemented");
|
||||
}
|
||||
|
||||
findCookies(domain, path, allowSpecialUseDomain, cb) {
|
||||
throw new Error("findCookies is not implemented");
|
||||
}
|
||||
|
||||
putCookie(cookie, cb) {
|
||||
throw new Error("putCookie is not implemented");
|
||||
}
|
||||
|
||||
updateCookie(oldCookie, newCookie, cb) {
|
||||
// recommended default implementation:
|
||||
// return this.putCookie(newCookie, cb);
|
||||
throw new Error("updateCookie is not implemented");
|
||||
}
|
||||
|
||||
removeCookie(domain, path, key, cb) {
|
||||
throw new Error("removeCookie is not implemented");
|
||||
}
|
||||
|
||||
removeCookies(domain, path, cb) {
|
||||
throw new Error("removeCookies is not implemented");
|
||||
}
|
||||
|
||||
removeAllCookies(cb) {
|
||||
throw new Error("removeAllCookies is not implemented");
|
||||
}
|
||||
|
||||
getAllCookies(cb) {
|
||||
throw new Error(
|
||||
"getAllCookies is not implemented (therefore jar cannot be serialized)"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
exports.Store = Store;
|
||||
2
node_modules/@azure/core-http/node_modules/tough-cookie/lib/version.js
generated
vendored
2
node_modules/@azure/core-http/node_modules/tough-cookie/lib/version.js
generated
vendored
@@ -1,2 +0,0 @@
|
||||
// generated by genversion
|
||||
module.exports = '4.0.0'
|
||||
109
node_modules/@azure/core-http/node_modules/tough-cookie/package.json
generated
vendored
109
node_modules/@azure/core-http/node_modules/tough-cookie/package.json
generated
vendored
@@ -1,109 +0,0 @@
|
||||
{
|
||||
"author": {
|
||||
"name": "Jeremy Stashewsky",
|
||||
"email": "jstash@gmail.com",
|
||||
"website": "https://github.com/stash"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Ivan Nikulin",
|
||||
"website": "https://github.com/inikulin"
|
||||
},
|
||||
{
|
||||
"name": "Shivan Kaul Sahib",
|
||||
"website": "https://github.com/ShivanKaul"
|
||||
},
|
||||
{
|
||||
"name": "Clint Ruoho",
|
||||
"website": "https://github.com/ruoho"
|
||||
},
|
||||
{
|
||||
"name": "Ian Livingstone",
|
||||
"website": "https://github.com/ianlivingstone"
|
||||
},
|
||||
{
|
||||
"name": "Andrew Waterman",
|
||||
"website": "https://github.com/awaterma"
|
||||
},
|
||||
{
|
||||
"name": "Michael de Libero ",
|
||||
"website": "https://github.com/medelibero-sfdc"
|
||||
},
|
||||
{
|
||||
"name": "Jonathan Stewmon",
|
||||
"website": "https://github.com/jstewmon"
|
||||
},
|
||||
{
|
||||
"name": "Miguel Roncancio",
|
||||
"website": "https://github.com/miggs125"
|
||||
},
|
||||
{
|
||||
"name": "Sebastian Mayr",
|
||||
"website": "https://github.com/Sebmaster"
|
||||
},
|
||||
{
|
||||
"name": "Alexander Savin",
|
||||
"website": "https://github.com/apsavin"
|
||||
},
|
||||
{
|
||||
"name": "Lalit Kapoor",
|
||||
"website": "https://github.com/lalitkapoor"
|
||||
},
|
||||
{
|
||||
"name": "Sam Thompson",
|
||||
"website": "https://github.com/sambthompson"
|
||||
}
|
||||
],
|
||||
"license": "BSD-3-Clause",
|
||||
"name": "tough-cookie",
|
||||
"description": "RFC6265 Cookies and Cookie Jar for node.js",
|
||||
"keywords": [
|
||||
"HTTP",
|
||||
"cookie",
|
||||
"cookies",
|
||||
"set-cookie",
|
||||
"cookiejar",
|
||||
"jar",
|
||||
"RFC6265",
|
||||
"RFC2965"
|
||||
],
|
||||
"version": "4.0.0",
|
||||
"homepage": "https://github.com/salesforce/tough-cookie",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/salesforce/tough-cookie.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/salesforce/tough-cookie/issues"
|
||||
},
|
||||
"main": "./lib/cookie",
|
||||
"files": [
|
||||
"lib"
|
||||
],
|
||||
"scripts": {
|
||||
"version": "genversion lib/version.js && git add lib/version.js",
|
||||
"test": "vows test/*_test.js",
|
||||
"cover": "nyc --reporter=lcov --reporter=html vows test/*_test.js",
|
||||
"eslint": "eslint --env node --ext .js .",
|
||||
"prettier": "prettier '**/*.{json,ts,yaml,md}'",
|
||||
"format": "npm run eslint -- --fix"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"async": "^2.6.2",
|
||||
"eslint": "^5.16.0",
|
||||
"eslint-config-prettier": "^4.2.0",
|
||||
"eslint-plugin-prettier": "^3.0.1",
|
||||
"genversion": "^2.1.0",
|
||||
"nyc": "^14.0.0",
|
||||
"prettier": "^1.17.0",
|
||||
"vows": "^0.8.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"psl": "^1.1.33",
|
||||
"punycode": "^2.1.1",
|
||||
"universalify": "^0.1.2"
|
||||
}
|
||||
}
|
||||
15
node_modules/@azure/ms-rest-js/dist/msRest.browser.js
generated
vendored
15
node_modules/@azure/ms-rest-js/dist/msRest.browser.js
generated
vendored
@@ -262,7 +262,7 @@
|
||||
* @const
|
||||
* @type {string}
|
||||
*/
|
||||
msRestVersion: "2.6.2",
|
||||
msRestVersion: "2.7.0",
|
||||
/**
|
||||
* Specifies HTTP.
|
||||
*
|
||||
@@ -1906,10 +1906,15 @@
|
||||
// according to the spec. There are no HTML/XSS security concerns on the usage of
|
||||
// parseFromString() here.
|
||||
var ttPolicy;
|
||||
if (typeof self.trustedTypes !== "undefined") {
|
||||
ttPolicy = self.trustedTypes.createPolicy("@azure/ms-rest-js#xml.browser", {
|
||||
createHTML: function (s) { return s; },
|
||||
});
|
||||
try {
|
||||
if (typeof self.trustedTypes !== "undefined") {
|
||||
ttPolicy = self.trustedTypes.createPolicy("@azure/ms-rest-js#xml.browser", {
|
||||
createHTML: function (s) { return s; },
|
||||
});
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
console.warn('Could not create trusted types policy "@azure/ms-rest-js#xml.browser"');
|
||||
}
|
||||
function parseXML(str) {
|
||||
var _a;
|
||||
|
||||
2
node_modules/@azure/ms-rest-js/dist/msRest.browser.js.map
generated
vendored
2
node_modules/@azure/ms-rest-js/dist/msRest.browser.js.map
generated
vendored
File diff suppressed because one or more lines are too long
4
node_modules/@azure/ms-rest-js/dist/msRest.browser.min.js
generated
vendored
4
node_modules/@azure/ms-rest-js/dist/msRest.browser.min.js
generated
vendored
File diff suppressed because one or more lines are too long
2
node_modules/@azure/ms-rest-js/dist/msRest.browser.min.js.map
generated
vendored
2
node_modules/@azure/ms-rest-js/dist/msRest.browser.min.js.map
generated
vendored
File diff suppressed because one or more lines are too long
107
node_modules/@azure/ms-rest-js/dist/msRest.node.js
generated
vendored
107
node_modules/@azure/ms-rest-js/dist/msRest.node.js
generated
vendored
@@ -10,7 +10,6 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
|
||||
|
||||
var uuid = require('uuid');
|
||||
var tslib = require('tslib');
|
||||
var tough = require('tough-cookie');
|
||||
var http = require('http');
|
||||
var https = require('https');
|
||||
var node_fetch = _interopDefault(require('node-fetch'));
|
||||
@@ -194,7 +193,7 @@ var Constants = {
|
||||
* @const
|
||||
* @type {string}
|
||||
*/
|
||||
msRestVersion: "2.6.2",
|
||||
msRestVersion: "2.7.0",
|
||||
/**
|
||||
* Specifies HTTP.
|
||||
*
|
||||
@@ -3331,9 +3330,7 @@ function createTunnel(isRequestHttps, isProxyHttps, tunnelOptions) {
|
||||
var NodeFetchHttpClient = /** @class */ (function (_super) {
|
||||
tslib.__extends(NodeFetchHttpClient, _super);
|
||||
function NodeFetchHttpClient() {
|
||||
var _this = _super !== null && _super.apply(this, arguments) || this;
|
||||
_this.cookieJar = new tough.CookieJar(undefined, { looseMode: true });
|
||||
return _this;
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
NodeFetchHttpClient.prototype.fetch = function (input, init) {
|
||||
return tslib.__awaiter(this, void 0, void 0, function () {
|
||||
@@ -3344,83 +3341,43 @@ var NodeFetchHttpClient = /** @class */ (function (_super) {
|
||||
};
|
||||
NodeFetchHttpClient.prototype.prepareRequest = function (httpRequest) {
|
||||
return tslib.__awaiter(this, void 0, void 0, function () {
|
||||
var requestInit, cookieString, _a, httpAgent, httpsAgent, tunnel, options, agent;
|
||||
var _this = this;
|
||||
var requestInit, _a, httpAgent, httpsAgent, tunnel, options, agent;
|
||||
return tslib.__generator(this, function (_b) {
|
||||
switch (_b.label) {
|
||||
case 0:
|
||||
requestInit = {};
|
||||
if (!(this.cookieJar && !httpRequest.headers.get("Cookie"))) return [3 /*break*/, 2];
|
||||
return [4 /*yield*/, new Promise(function (resolve, reject) {
|
||||
_this.cookieJar.getCookieString(httpRequest.url, function (err, cookie) {
|
||||
if (err) {
|
||||
reject(err);
|
||||
}
|
||||
else {
|
||||
resolve(cookie);
|
||||
}
|
||||
});
|
||||
})];
|
||||
case 1:
|
||||
cookieString = _b.sent();
|
||||
httpRequest.headers.set("Cookie", cookieString);
|
||||
_b.label = 2;
|
||||
case 2:
|
||||
if (httpRequest.agentSettings) {
|
||||
_a = httpRequest.agentSettings, httpAgent = _a.http, httpsAgent = _a.https;
|
||||
if (httpsAgent && httpRequest.url.startsWith("https")) {
|
||||
requestInit.agent = httpsAgent;
|
||||
}
|
||||
else if (httpAgent) {
|
||||
requestInit.agent = httpAgent;
|
||||
}
|
||||
}
|
||||
else if (httpRequest.proxySettings) {
|
||||
tunnel = createProxyAgent(httpRequest.url, httpRequest.proxySettings, httpRequest.headers);
|
||||
requestInit.agent = tunnel.agent;
|
||||
}
|
||||
if (httpRequest.keepAlive === true) {
|
||||
if (requestInit.agent) {
|
||||
requestInit.agent.keepAlive = true;
|
||||
}
|
||||
else {
|
||||
options = { keepAlive: true };
|
||||
agent = httpRequest.url.startsWith("https")
|
||||
? new https.Agent(options)
|
||||
: new http.Agent(options);
|
||||
requestInit.agent = agent;
|
||||
}
|
||||
}
|
||||
return [2 /*return*/, requestInit];
|
||||
requestInit = {};
|
||||
if (httpRequest.agentSettings) {
|
||||
_a = httpRequest.agentSettings, httpAgent = _a.http, httpsAgent = _a.https;
|
||||
if (httpsAgent && httpRequest.url.startsWith("https")) {
|
||||
requestInit.agent = httpsAgent;
|
||||
}
|
||||
else if (httpAgent) {
|
||||
requestInit.agent = httpAgent;
|
||||
}
|
||||
}
|
||||
else if (httpRequest.proxySettings) {
|
||||
tunnel = createProxyAgent(httpRequest.url, httpRequest.proxySettings, httpRequest.headers);
|
||||
requestInit.agent = tunnel.agent;
|
||||
}
|
||||
if (httpRequest.keepAlive === true) {
|
||||
if (requestInit.agent) {
|
||||
requestInit.agent.keepAlive = true;
|
||||
}
|
||||
else {
|
||||
options = { keepAlive: true };
|
||||
agent = httpRequest.url.startsWith("https")
|
||||
? new https.Agent(options)
|
||||
: new http.Agent(options);
|
||||
requestInit.agent = agent;
|
||||
}
|
||||
}
|
||||
return [2 /*return*/, requestInit];
|
||||
});
|
||||
});
|
||||
};
|
||||
NodeFetchHttpClient.prototype.processRequest = function (operationResponse) {
|
||||
NodeFetchHttpClient.prototype.processRequest = function (_operationResponse) {
|
||||
return tslib.__awaiter(this, void 0, void 0, function () {
|
||||
var setCookieHeader_1;
|
||||
var _this = this;
|
||||
return tslib.__generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
if (!this.cookieJar) return [3 /*break*/, 2];
|
||||
setCookieHeader_1 = operationResponse.headers.get("Set-Cookie");
|
||||
if (!(setCookieHeader_1 != undefined)) return [3 /*break*/, 2];
|
||||
return [4 /*yield*/, new Promise(function (resolve, reject) {
|
||||
_this.cookieJar.setCookie(setCookieHeader_1, operationResponse.request.url, { ignoreError: true }, function (err) {
|
||||
if (err) {
|
||||
reject(err);
|
||||
}
|
||||
else {
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
})];
|
||||
case 1:
|
||||
_a.sent();
|
||||
_a.label = 2;
|
||||
case 2: return [2 /*return*/];
|
||||
}
|
||||
/* no_op */
|
||||
return [2 /*return*/];
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
2
node_modules/@azure/ms-rest-js/dist/msRest.node.js.map
generated
vendored
2
node_modules/@azure/ms-rest-js/dist/msRest.node.js.map
generated
vendored
File diff suppressed because one or more lines are too long
3
node_modules/@azure/ms-rest-js/es/lib/nodeFetchHttpClient.d.ts
generated
vendored
3
node_modules/@azure/ms-rest-js/es/lib/nodeFetchHttpClient.d.ts
generated
vendored
@@ -2,9 +2,8 @@ import { CommonRequestInfo, CommonRequestInit, CommonResponse, FetchHttpClient }
|
||||
import { HttpOperationResponse } from "./httpOperationResponse";
|
||||
import { WebResourceLike } from "./webResource";
|
||||
export declare class NodeFetchHttpClient extends FetchHttpClient {
|
||||
private readonly cookieJar;
|
||||
fetch(input: CommonRequestInfo, init?: CommonRequestInit): Promise<CommonResponse>;
|
||||
prepareRequest(httpRequest: WebResourceLike): Promise<Partial<RequestInit>>;
|
||||
processRequest(operationResponse: HttpOperationResponse): Promise<void>;
|
||||
processRequest(_operationResponse: HttpOperationResponse): Promise<void>;
|
||||
}
|
||||
//# sourceMappingURL=nodeFetchHttpClient.d.ts.map
|
||||
2
node_modules/@azure/ms-rest-js/es/lib/nodeFetchHttpClient.d.ts.map
generated
vendored
2
node_modules/@azure/ms-rest-js/es/lib/nodeFetchHttpClient.d.ts.map
generated
vendored
@@ -1 +1 @@
|
||||
{"version":3,"file":"nodeFetchHttpClient.d.ts","sourceRoot":"","sources":["../../lib/nodeFetchHttpClient.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGhD,qBAAa,mBAAoB,SAAQ,eAAe;IACtD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAuD;IAE3E,KAAK,CAAC,KAAK,EAAE,iBAAiB,EAAE,IAAI,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,cAAc,CAAC;IAIlF,cAAc,CAAC,WAAW,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAgD3E,cAAc,CAAC,iBAAiB,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;CAqB9E"}
|
||||
{"version":3,"file":"nodeFetchHttpClient.d.ts","sourceRoot":"","sources":["../../lib/nodeFetchHttpClient.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGhD,qBAAa,mBAAoB,SAAQ,eAAe;IAChD,KAAK,CAAC,KAAK,EAAE,iBAAiB,EAAE,IAAI,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,cAAc,CAAC;IAIlF,cAAc,CAAC,WAAW,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAkC3E,cAAc,CAAC,kBAAkB,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;CAI/E"}
|
||||
105
node_modules/@azure/ms-rest-js/es/lib/nodeFetchHttpClient.js
generated
vendored
105
node_modules/@azure/ms-rest-js/es/lib/nodeFetchHttpClient.js
generated
vendored
@@ -1,7 +1,6 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
import { __awaiter, __extends, __generator } from "tslib";
|
||||
import * as tough from "tough-cookie";
|
||||
import * as http from "http";
|
||||
import * as https from "https";
|
||||
import node_fetch from "node-fetch";
|
||||
@@ -10,9 +9,7 @@ import { createProxyAgent } from "./proxyAgent";
|
||||
var NodeFetchHttpClient = /** @class */ (function (_super) {
|
||||
__extends(NodeFetchHttpClient, _super);
|
||||
function NodeFetchHttpClient() {
|
||||
var _this = _super !== null && _super.apply(this, arguments) || this;
|
||||
_this.cookieJar = new tough.CookieJar(undefined, { looseMode: true });
|
||||
return _this;
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
NodeFetchHttpClient.prototype.fetch = function (input, init) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
@@ -23,83 +20,43 @@ var NodeFetchHttpClient = /** @class */ (function (_super) {
|
||||
};
|
||||
NodeFetchHttpClient.prototype.prepareRequest = function (httpRequest) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var requestInit, cookieString, _a, httpAgent, httpsAgent, tunnel, options, agent;
|
||||
var _this = this;
|
||||
var requestInit, _a, httpAgent, httpsAgent, tunnel, options, agent;
|
||||
return __generator(this, function (_b) {
|
||||
switch (_b.label) {
|
||||
case 0:
|
||||
requestInit = {};
|
||||
if (!(this.cookieJar && !httpRequest.headers.get("Cookie"))) return [3 /*break*/, 2];
|
||||
return [4 /*yield*/, new Promise(function (resolve, reject) {
|
||||
_this.cookieJar.getCookieString(httpRequest.url, function (err, cookie) {
|
||||
if (err) {
|
||||
reject(err);
|
||||
}
|
||||
else {
|
||||
resolve(cookie);
|
||||
}
|
||||
});
|
||||
})];
|
||||
case 1:
|
||||
cookieString = _b.sent();
|
||||
httpRequest.headers.set("Cookie", cookieString);
|
||||
_b.label = 2;
|
||||
case 2:
|
||||
if (httpRequest.agentSettings) {
|
||||
_a = httpRequest.agentSettings, httpAgent = _a.http, httpsAgent = _a.https;
|
||||
if (httpsAgent && httpRequest.url.startsWith("https")) {
|
||||
requestInit.agent = httpsAgent;
|
||||
}
|
||||
else if (httpAgent) {
|
||||
requestInit.agent = httpAgent;
|
||||
}
|
||||
}
|
||||
else if (httpRequest.proxySettings) {
|
||||
tunnel = createProxyAgent(httpRequest.url, httpRequest.proxySettings, httpRequest.headers);
|
||||
requestInit.agent = tunnel.agent;
|
||||
}
|
||||
if (httpRequest.keepAlive === true) {
|
||||
if (requestInit.agent) {
|
||||
requestInit.agent.keepAlive = true;
|
||||
}
|
||||
else {
|
||||
options = { keepAlive: true };
|
||||
agent = httpRequest.url.startsWith("https")
|
||||
? new https.Agent(options)
|
||||
: new http.Agent(options);
|
||||
requestInit.agent = agent;
|
||||
}
|
||||
}
|
||||
return [2 /*return*/, requestInit];
|
||||
requestInit = {};
|
||||
if (httpRequest.agentSettings) {
|
||||
_a = httpRequest.agentSettings, httpAgent = _a.http, httpsAgent = _a.https;
|
||||
if (httpsAgent && httpRequest.url.startsWith("https")) {
|
||||
requestInit.agent = httpsAgent;
|
||||
}
|
||||
else if (httpAgent) {
|
||||
requestInit.agent = httpAgent;
|
||||
}
|
||||
}
|
||||
else if (httpRequest.proxySettings) {
|
||||
tunnel = createProxyAgent(httpRequest.url, httpRequest.proxySettings, httpRequest.headers);
|
||||
requestInit.agent = tunnel.agent;
|
||||
}
|
||||
if (httpRequest.keepAlive === true) {
|
||||
if (requestInit.agent) {
|
||||
requestInit.agent.keepAlive = true;
|
||||
}
|
||||
else {
|
||||
options = { keepAlive: true };
|
||||
agent = httpRequest.url.startsWith("https")
|
||||
? new https.Agent(options)
|
||||
: new http.Agent(options);
|
||||
requestInit.agent = agent;
|
||||
}
|
||||
}
|
||||
return [2 /*return*/, requestInit];
|
||||
});
|
||||
});
|
||||
};
|
||||
NodeFetchHttpClient.prototype.processRequest = function (operationResponse) {
|
||||
NodeFetchHttpClient.prototype.processRequest = function (_operationResponse) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var setCookieHeader_1;
|
||||
var _this = this;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
if (!this.cookieJar) return [3 /*break*/, 2];
|
||||
setCookieHeader_1 = operationResponse.headers.get("Set-Cookie");
|
||||
if (!(setCookieHeader_1 != undefined)) return [3 /*break*/, 2];
|
||||
return [4 /*yield*/, new Promise(function (resolve, reject) {
|
||||
_this.cookieJar.setCookie(setCookieHeader_1, operationResponse.request.url, { ignoreError: true }, function (err) {
|
||||
if (err) {
|
||||
reject(err);
|
||||
}
|
||||
else {
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
})];
|
||||
case 1:
|
||||
_a.sent();
|
||||
_a.label = 2;
|
||||
case 2: return [2 /*return*/];
|
||||
}
|
||||
/* no_op */
|
||||
return [2 /*return*/];
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
2
node_modules/@azure/ms-rest-js/es/lib/nodeFetchHttpClient.js.map
generated
vendored
2
node_modules/@azure/ms-rest-js/es/lib/nodeFetchHttpClient.js.map
generated
vendored
@@ -1 +1 @@
|
||||
{"version":3,"file":"nodeFetchHttpClient.js","sourceRoot":"","sources":["../../lib/nodeFetchHttpClient.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;;AAE/F,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAIL,eAAe,GAChB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,gBAAgB,EAAc,MAAM,cAAc,CAAC;AAE5D;IAAyC,uCAAe;IAAxD;QAAA,qEA4EC;QA3EkB,eAAS,GAAG,IAAI,KAAK,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;;IA2EnF,CAAC;IAzEO,mCAAK,GAAX,UAAY,KAAwB,EAAE,IAAwB;;;gBAC5D,sBAAQ,UAAU,CAAC,KAAK,EAAE,IAAI,CAAwC,EAAC;;;KACxE;IAEK,4CAAc,GAApB,UAAqB,WAA4B;;;;;;;wBACzC,WAAW,GAA2C,EAAE,CAAC;6BAE3D,CAAA,IAAI,CAAC,SAAS,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA,EAApD,wBAAoD;wBACjC,qBAAM,IAAI,OAAO,CAAS,UAAC,OAAO,EAAE,MAAM;gCAC7D,KAAI,CAAC,SAAU,CAAC,eAAe,CAAC,WAAW,CAAC,GAAG,EAAE,UAAC,GAAG,EAAE,MAAM;oCAC3D,IAAI,GAAG,EAAE;wCACP,MAAM,CAAC,GAAG,CAAC,CAAC;qCACb;yCAAM;wCACL,OAAO,CAAC,MAAM,CAAC,CAAC;qCACjB;gCACH,CAAC,CAAC,CAAC;4BACL,CAAC,CAAC,EAAA;;wBARI,YAAY,GAAG,SAQnB;wBAEF,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;;;wBAGlD,IAAI,WAAW,CAAC,aAAa,EAAE;4BACvB,KAAyC,WAAW,CAAC,aAAa,EAA1D,SAAS,UAAA,EAAS,UAAU,WAAA,CAA+B;4BACzE,IAAI,UAAU,IAAI,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;gCACrD,WAAW,CAAC,KAAK,GAAG,UAAU,CAAC;6BAChC;iCAAM,IAAI,SAAS,EAAE;gCACpB,WAAW,CAAC,KAAK,GAAG,SAAS,CAAC;6BAC/B;yBACF;6BAAM,IAAI,WAAW,CAAC,aAAa,EAAE;4BAC9B,MAAM,GAAe,gBAAgB,CACzC,WAAW,CAAC,GAAG,EACf,WAAW,CAAC,aAAa,EACzB,WAAW,CAAC,OAAO,CACpB,CAAC;4BACF,WAAW,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;yBAClC;wBAED,IAAI,WAAW,CAAC,SAAS,KAAK,IAAI,EAAE;4BAClC,IAAI,WAAW,CAAC,KAAK,EAAE;gCACrB,WAAW,CAAC,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;6BACpC;iCAAM;gCACC,OAAO,GAA2C,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;gCACtE,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC;oCAC/C,CAAC,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC;oCAC1B,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;gCAC5B,WAAW,CAAC,KAAK,GAAG,KAAK,CAAC;6BAC3B;yBACF;wBAED,sBAAO,WAAW,EAAC;;;;KACpB;IAEK,4CAAc,GAApB,UAAqB,iBAAwC;;;;;;;6BACvD,IAAI,CAAC,SAAS,EAAd,wBAAc;wBACV,oBAAkB,iBAAiB,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;6BAChE,CAAA,iBAAe,IAAI,SAAS,CAAA,EAA5B,wBAA4B;wBAC9B,qBAAM,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;gCAChC,KAAI,CAAC,SAAU,CAAC,SAAS,CACvB,iBAAe,EACf,iBAAiB,CAAC,OAAO,CAAC,GAAG,EAC7B,EAAE,WAAW,EAAE,IAAI,EAAE,EACrB,UAAC,GAAG;oCACF,IAAI,GAAG,EAAE;wCACP,MAAM,CAAC,GAAG,CAAC,CAAC;qCACb;yCAAM;wCACL,OAAO,EAAE,CAAC;qCACX;gCACH,CAAC,CACF,CAAC;4BACJ,CAAC,CAAC,EAAA;;wBAbF,SAaE,CAAC;;;;;;KAGR;IACH,0BAAC;AAAD,CAAC,AA5ED,CAAyC,eAAe,GA4EvD"}
|
||||
{"version":3,"file":"nodeFetchHttpClient.js","sourceRoot":"","sources":["../../lib/nodeFetchHttpClient.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;;AAE/F,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAIL,eAAe,GAChB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,gBAAgB,EAAc,MAAM,cAAc,CAAC;AAE5D;IAAyC,uCAAe;IAAxD;;IA2CA,CAAC;IA1CO,mCAAK,GAAX,UAAY,KAAwB,EAAE,IAAwB;;;gBAC5D,sBAAQ,UAAU,CAAC,KAAK,EAAE,IAAI,CAAwC,EAAC;;;KACxE;IAEK,4CAAc,GAApB,UAAqB,WAA4B;;;;gBACzC,WAAW,GAA2C,EAAE,CAAC;gBAE/D,IAAI,WAAW,CAAC,aAAa,EAAE;oBACvB,KAAyC,WAAW,CAAC,aAAa,EAA1D,SAAS,UAAA,EAAS,UAAU,WAAA,CAA+B;oBACzE,IAAI,UAAU,IAAI,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;wBACrD,WAAW,CAAC,KAAK,GAAG,UAAU,CAAC;qBAChC;yBAAM,IAAI,SAAS,EAAE;wBACpB,WAAW,CAAC,KAAK,GAAG,SAAS,CAAC;qBAC/B;iBACF;qBAAM,IAAI,WAAW,CAAC,aAAa,EAAE;oBAC9B,MAAM,GAAe,gBAAgB,CACzC,WAAW,CAAC,GAAG,EACf,WAAW,CAAC,aAAa,EACzB,WAAW,CAAC,OAAO,CACpB,CAAC;oBACF,WAAW,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;iBAClC;gBAED,IAAI,WAAW,CAAC,SAAS,KAAK,IAAI,EAAE;oBAClC,IAAI,WAAW,CAAC,KAAK,EAAE;wBACrB,WAAW,CAAC,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;qBACpC;yBAAM;wBACC,OAAO,GAA2C,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;wBACtE,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC;4BAC/C,CAAC,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC;4BAC1B,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;wBAC5B,WAAW,CAAC,KAAK,GAAG,KAAK,CAAC;qBAC3B;iBACF;gBAED,sBAAO,WAAW,EAAC;;;KACpB;IAEK,4CAAc,GAApB,UAAqB,kBAAyC;;;gBAC5D,WAAW;gBACX,sBAAO;;;KACR;IACH,0BAAC;AAAD,CAAC,AA3CD,CAAyC,eAAe,GA2CvD"}
|
||||
2
node_modules/@azure/ms-rest-js/es/lib/util/constants.js
generated
vendored
2
node_modules/@azure/ms-rest-js/es/lib/util/constants.js
generated
vendored
@@ -6,7 +6,7 @@ export var Constants = {
|
||||
* @const
|
||||
* @type {string}
|
||||
*/
|
||||
msRestVersion: "2.6.2",
|
||||
msRestVersion: "2.7.0",
|
||||
/**
|
||||
* Specifies HTTP.
|
||||
*
|
||||
|
||||
2
node_modules/@azure/ms-rest-js/es/lib/util/xml.browser.d.ts.map
generated
vendored
2
node_modules/@azure/ms-rest-js/es/lib/util/xml.browser.d.ts.map
generated
vendored
@@ -1 +1 @@
|
||||
{"version":3,"file":"xml.browser.d.ts","sourceRoot":"","sources":["../../../lib/util/xml.browser.ts"],"names":[],"mappings":"AAkBA,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAUlD;AAwFD,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,UAMlE"}
|
||||
{"version":3,"file":"xml.browser.d.ts","sourceRoot":"","sources":["../../../lib/util/xml.browser.ts"],"names":[],"mappings":"AAsBA,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAUlD;AAwFD,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,UAMlE"}
|
||||
13
node_modules/@azure/ms-rest-js/es/lib/util/xml.browser.js
generated
vendored
13
node_modules/@azure/ms-rest-js/es/lib/util/xml.browser.js
generated
vendored
@@ -9,10 +9,15 @@ var parser = new DOMParser();
|
||||
// according to the spec. There are no HTML/XSS security concerns on the usage of
|
||||
// parseFromString() here.
|
||||
var ttPolicy;
|
||||
if (typeof self.trustedTypes !== "undefined") {
|
||||
ttPolicy = self.trustedTypes.createPolicy("@azure/ms-rest-js#xml.browser", {
|
||||
createHTML: function (s) { return s; },
|
||||
});
|
||||
try {
|
||||
if (typeof self.trustedTypes !== "undefined") {
|
||||
ttPolicy = self.trustedTypes.createPolicy("@azure/ms-rest-js#xml.browser", {
|
||||
createHTML: function (s) { return s; },
|
||||
});
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
console.warn('Could not create trusted types policy "@azure/ms-rest-js#xml.browser"');
|
||||
}
|
||||
export function parseXML(str) {
|
||||
var _a;
|
||||
|
||||
2
node_modules/@azure/ms-rest-js/es/lib/util/xml.browser.js.map
generated
vendored
2
node_modules/@azure/ms-rest-js/es/lib/util/xml.browser.js.map
generated
vendored
File diff suppressed because one or more lines are too long
40
node_modules/@azure/ms-rest-js/lib/nodeFetchHttpClient.ts
generated
vendored
40
node_modules/@azure/ms-rest-js/lib/nodeFetchHttpClient.ts
generated
vendored
@@ -1,7 +1,6 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
||||
import * as tough from "tough-cookie";
|
||||
import * as http from "http";
|
||||
import * as https from "https";
|
||||
import node_fetch from "node-fetch";
|
||||
@@ -17,8 +16,6 @@ import { WebResourceLike } from "./webResource";
|
||||
import { createProxyAgent, ProxyAgent } from "./proxyAgent";
|
||||
|
||||
export class NodeFetchHttpClient extends FetchHttpClient {
|
||||
private readonly cookieJar = new tough.CookieJar(undefined, { looseMode: true });
|
||||
|
||||
async fetch(input: CommonRequestInfo, init?: CommonRequestInit): Promise<CommonResponse> {
|
||||
return (node_fetch(input, init) as unknown) as Promise<CommonResponse>;
|
||||
}
|
||||
@@ -26,20 +23,6 @@ export class NodeFetchHttpClient extends FetchHttpClient {
|
||||
async prepareRequest(httpRequest: WebResourceLike): Promise<Partial<RequestInit>> {
|
||||
const requestInit: Partial<RequestInit & { agent?: any }> = {};
|
||||
|
||||
if (this.cookieJar && !httpRequest.headers.get("Cookie")) {
|
||||
const cookieString = await new Promise<string>((resolve, reject) => {
|
||||
this.cookieJar!.getCookieString(httpRequest.url, (err, cookie) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
} else {
|
||||
resolve(cookie);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
httpRequest.headers.set("Cookie", cookieString);
|
||||
}
|
||||
|
||||
if (httpRequest.agentSettings) {
|
||||
const { http: httpAgent, https: httpsAgent } = httpRequest.agentSettings;
|
||||
if (httpsAgent && httpRequest.url.startsWith("https")) {
|
||||
@@ -71,25 +54,8 @@ export class NodeFetchHttpClient extends FetchHttpClient {
|
||||
return requestInit;
|
||||
}
|
||||
|
||||
async processRequest(operationResponse: HttpOperationResponse): Promise<void> {
|
||||
if (this.cookieJar) {
|
||||
const setCookieHeader = operationResponse.headers.get("Set-Cookie");
|
||||
if (setCookieHeader != undefined) {
|
||||
await new Promise((resolve, reject) => {
|
||||
this.cookieJar!.setCookie(
|
||||
setCookieHeader,
|
||||
operationResponse.request.url,
|
||||
{ ignoreError: true },
|
||||
(err) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
} else {
|
||||
resolve();
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
async processRequest(_operationResponse: HttpOperationResponse): Promise<void> {
|
||||
/* no_op */
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
2
node_modules/@azure/ms-rest-js/lib/util/constants.ts
generated
vendored
2
node_modules/@azure/ms-rest-js/lib/util/constants.ts
generated
vendored
@@ -7,7 +7,7 @@ export const Constants = {
|
||||
* @const
|
||||
* @type {string}
|
||||
*/
|
||||
msRestVersion: "2.6.2",
|
||||
msRestVersion: "2.7.0",
|
||||
|
||||
/**
|
||||
* Specifies HTTP.
|
||||
|
||||
12
node_modules/@azure/ms-rest-js/lib/util/xml.browser.ts
generated
vendored
12
node_modules/@azure/ms-rest-js/lib/util/xml.browser.ts
generated
vendored
@@ -10,10 +10,14 @@ const parser = new DOMParser();
|
||||
// according to the spec. There are no HTML/XSS security concerns on the usage of
|
||||
// parseFromString() here.
|
||||
let ttPolicy: Pick<TrustedTypePolicy, "createHTML"> | undefined;
|
||||
if (typeof self.trustedTypes !== "undefined") {
|
||||
ttPolicy = self.trustedTypes.createPolicy("@azure/ms-rest-js#xml.browser", {
|
||||
createHTML: (s) => s,
|
||||
});
|
||||
try {
|
||||
if (typeof self.trustedTypes !== "undefined") {
|
||||
ttPolicy = self.trustedTypes.createPolicy("@azure/ms-rest-js#xml.browser", {
|
||||
createHTML: (s: any) => s,
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
console.warn('Could not create trusted types policy "@azure/ms-rest-js#xml.browser"');
|
||||
}
|
||||
|
||||
export function parseXML(str: string): Promise<any> {
|
||||
|
||||
10
node_modules/@azure/ms-rest-js/package.json
generated
vendored
10
node_modules/@azure/ms-rest-js/package.json
generated
vendored
@@ -5,7 +5,7 @@
|
||||
"email": "azsdkteam@microsoft.com",
|
||||
"url": "https://github.com/Azure/ms-rest-js"
|
||||
},
|
||||
"version": "2.6.2",
|
||||
"version": "2.7.0",
|
||||
"description": "Isomorphic client Runtime for Typescript/node.js/browser javascript client libraries generated using AutoRest",
|
||||
"tags": [
|
||||
"isomorphic",
|
||||
@@ -55,18 +55,19 @@
|
||||
"abort-controller": "^3.0.0",
|
||||
"form-data": "^2.5.0",
|
||||
"node-fetch": "^2.6.7",
|
||||
"tough-cookie": "^3.0.1",
|
||||
"tslib": "^1.10.0",
|
||||
"tunnel": "0.0.6",
|
||||
"uuid": "^8.3.2",
|
||||
"xml2js": "^0.4.19"
|
||||
"xml2js": "^0.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@azure/logger-js": "^1.1.0",
|
||||
"@microsoft/api-extractor": "^7.18.11",
|
||||
"@ts-common/azure-js-dev-tools": "^19.4.0",
|
||||
"@types/bluebird": "3.5.36",
|
||||
"@types/chai": "^4.1.7",
|
||||
"@types/express": "^4.17.0",
|
||||
"@types/express": "4.17.0",
|
||||
"@types/express-serve-static-core": "4.17.0",
|
||||
"@types/fetch-mock": "^7.3.1",
|
||||
"@types/form-data": "^2.2.1",
|
||||
"@types/glob": "^7.1.1",
|
||||
@@ -76,7 +77,6 @@
|
||||
"@types/node-fetch": "^2.3.7",
|
||||
"@types/semver": "^6.0.1",
|
||||
"@types/sinon": "^7.0.13",
|
||||
"@types/tough-cookie": "^2.3.5",
|
||||
"@types/trusted-types": "^2.0.0",
|
||||
"@types/tunnel": "0.0.1",
|
||||
"@types/uuid": "^8.3.2",
|
||||
|
||||
4
node_modules/@octokit/openapi-types/package.json
generated
vendored
4
node_modules/@octokit/openapi-types/package.json
generated
vendored
@@ -9,12 +9,12 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"version": "16.0.0",
|
||||
"version": "18.0.0",
|
||||
"main": "",
|
||||
"types": "types.d.ts",
|
||||
"author": "Gregor Martynus (https://twitter.com/gr2m)",
|
||||
"license": "MIT",
|
||||
"octokit": {
|
||||
"openapi-version": "10.0.0"
|
||||
"openapi-version": "12.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
39050
node_modules/@octokit/openapi-types/types.d.ts
generated
vendored
39050
node_modules/@octokit/openapi-types/types.d.ts
generated
vendored
File diff suppressed because it is too large
Load Diff
115
node_modules/@octokit/plugin-retry/dist-node/index.js
generated
vendored
115
node_modules/@octokit/plugin-retry/dist-node/index.js
generated
vendored
@@ -1,63 +1,107 @@
|
||||
'use strict';
|
||||
"use strict";
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
// pkg/dist-src/index.js
|
||||
var dist_src_exports = {};
|
||||
__export(dist_src_exports, {
|
||||
VERSION: () => VERSION,
|
||||
retry: () => retry
|
||||
});
|
||||
module.exports = __toCommonJS(dist_src_exports);
|
||||
|
||||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
||||
|
||||
var Bottleneck = _interopDefault(require('bottleneck/light'));
|
||||
|
||||
// @ts-ignore
|
||||
async function errorRequest(octokit, state, error, options) {
|
||||
// pkg/dist-src/error-request.js
|
||||
async function errorRequest(state, octokit, error, options) {
|
||||
if (!error.request || !error.request.request) {
|
||||
// address https://github.com/octokit/plugin-retry.js/issues/8
|
||||
throw error;
|
||||
}
|
||||
// retry all >= 400 && not doNotRetry
|
||||
if (error.status >= 400 && !state.doNotRetry.includes(error.status)) {
|
||||
const retries = options.request.retries != null ? options.request.retries : state.retries;
|
||||
const retryAfter = Math.pow((options.request.retryCount || 0) + 1, 2);
|
||||
throw octokit.retry.retryRequest(error, retries, retryAfter);
|
||||
}
|
||||
// Maybe eventually there will be more cases here
|
||||
throw error;
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
// @ts-ignore
|
||||
async function wrapRequest(state, request, options) {
|
||||
const limiter = new Bottleneck();
|
||||
// @ts-ignore
|
||||
limiter.on("failed", function (error, info) {
|
||||
// pkg/dist-src/wrap-request.js
|
||||
var import_light = __toESM(require("bottleneck/light"));
|
||||
var import_request_error = require("@octokit/request-error");
|
||||
async function wrapRequest(state, octokit, request, options) {
|
||||
const limiter = new import_light.default();
|
||||
limiter.on("failed", function(error, info) {
|
||||
const maxRetries = ~~error.request.request.retries;
|
||||
const after = ~~error.request.request.retryAfter;
|
||||
options.request.retryCount = info.retryCount + 1;
|
||||
if (maxRetries > info.retryCount) {
|
||||
// Returning a number instructs the limiter to retry
|
||||
// the request after that number of milliseconds have passed
|
||||
return after * state.retryAfterBaseValue;
|
||||
}
|
||||
});
|
||||
return limiter.schedule(request, options);
|
||||
return limiter.schedule(
|
||||
requestWithGraphqlErrorHandling.bind(null, state, octokit, request),
|
||||
options
|
||||
);
|
||||
}
|
||||
async function requestWithGraphqlErrorHandling(state, octokit, request, options) {
|
||||
const response = await request(request, options);
|
||||
if (response.data && response.data.errors && /Something went wrong while executing your query/.test(
|
||||
response.data.errors[0].message
|
||||
)) {
|
||||
const error = new import_request_error.RequestError(response.data.errors[0].message, 500, {
|
||||
request: options,
|
||||
response
|
||||
});
|
||||
return errorRequest(state, octokit, error, options);
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
const VERSION = "4.0.4";
|
||||
// pkg/dist-src/index.js
|
||||
var VERSION = "5.0.2";
|
||||
function retry(octokit, octokitOptions) {
|
||||
const state = Object.assign({
|
||||
enabled: true,
|
||||
retryAfterBaseValue: 1000,
|
||||
doNotRetry: [400, 401, 403, 404, 422],
|
||||
retries: 3
|
||||
}, octokitOptions.retry);
|
||||
const state = Object.assign(
|
||||
{
|
||||
enabled: true,
|
||||
retryAfterBaseValue: 1e3,
|
||||
doNotRetry: [400, 401, 403, 404, 422],
|
||||
retries: 3
|
||||
},
|
||||
octokitOptions.retry
|
||||
);
|
||||
if (state.enabled) {
|
||||
octokit.hook.error("request", errorRequest.bind(null, octokit, state));
|
||||
octokit.hook.wrap("request", wrapRequest.bind(null, state));
|
||||
octokit.hook.error("request", errorRequest.bind(null, state, octokit));
|
||||
octokit.hook.wrap("request", wrapRequest.bind(null, state, octokit));
|
||||
}
|
||||
return {
|
||||
retry: {
|
||||
retryRequest: (error, retries, retryAfter) => {
|
||||
error.request.request = Object.assign({}, error.request.request, {
|
||||
retries: retries,
|
||||
retryAfter: retryAfter
|
||||
retries,
|
||||
retryAfter
|
||||
});
|
||||
return error;
|
||||
}
|
||||
@@ -65,7 +109,8 @@ function retry(octokit, octokitOptions) {
|
||||
};
|
||||
}
|
||||
retry.VERSION = VERSION;
|
||||
|
||||
exports.VERSION = VERSION;
|
||||
exports.retry = retry;
|
||||
//# sourceMappingURL=index.js.map
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
VERSION,
|
||||
retry
|
||||
});
|
||||
|
||||
8
node_modules/@octokit/plugin-retry/dist-node/index.js.map
generated
vendored
8
node_modules/@octokit/plugin-retry/dist-node/index.js.map
generated
vendored
@@ -1 +1,7 @@
|
||||
{"version":3,"file":"index.js","sources":["../dist-src/error-request.js","../dist-src/wrap-request.js","../dist-src/index.js"],"sourcesContent":["// @ts-ignore\nexport async function errorRequest(octokit, state, error, options) {\n if (!error.request || !error.request.request) {\n // address https://github.com/octokit/plugin-retry.js/issues/8\n throw error;\n }\n // retry all >= 400 && not doNotRetry\n if (error.status >= 400 && !state.doNotRetry.includes(error.status)) {\n const retries = options.request.retries != null ? options.request.retries : state.retries;\n const retryAfter = Math.pow((options.request.retryCount || 0) + 1, 2);\n throw octokit.retry.retryRequest(error, retries, retryAfter);\n }\n // Maybe eventually there will be more cases here\n throw error;\n}\n","// @ts-ignore\nimport Bottleneck from \"bottleneck/light\";\n// @ts-ignore\nexport async function wrapRequest(state, request, options) {\n const limiter = new Bottleneck();\n // @ts-ignore\n limiter.on(\"failed\", function (error, info) {\n const maxRetries = ~~error.request.request.retries;\n const after = ~~error.request.request.retryAfter;\n options.request.retryCount = info.retryCount + 1;\n if (maxRetries > info.retryCount) {\n // Returning a number instructs the limiter to retry\n // the request after that number of milliseconds have passed\n return after * state.retryAfterBaseValue;\n }\n });\n return limiter.schedule(request, options);\n}\n","import { errorRequest } from \"./error-request\";\nimport { wrapRequest } from \"./wrap-request\";\nexport const VERSION = \"4.0.4\";\nexport function retry(octokit, octokitOptions) {\n const state = Object.assign({\n enabled: true,\n retryAfterBaseValue: 1000,\n doNotRetry: [400, 401, 403, 404, 422],\n retries: 3,\n }, octokitOptions.retry);\n if (state.enabled) {\n octokit.hook.error(\"request\", errorRequest.bind(null, octokit, state));\n octokit.hook.wrap(\"request\", wrapRequest.bind(null, state));\n }\n return {\n retry: {\n retryRequest: (error, retries, retryAfter) => {\n error.request.request = Object.assign({}, error.request.request, {\n retries: retries,\n retryAfter: retryAfter,\n });\n return error;\n },\n },\n };\n}\nretry.VERSION = VERSION;\n"],"names":["errorRequest","octokit","state","error","options","request","status","doNotRetry","includes","retries","retryAfter","Math","pow","retryCount","retry","retryRequest","wrapRequest","limiter","Bottleneck","on","info","maxRetries","after","retryAfterBaseValue","schedule","VERSION","octokitOptions","Object","assign","enabled","hook","bind","wrap"],"mappings":";;;;;;;;AAAA;AACO,eAAeA,YAAY,CAACC,OAAO,EAAEC,KAAK,EAAEC,KAAK,EAAEC,OAAO,EAAE;EAC/D,IAAI,CAACD,KAAK,CAACE,OAAO,IAAI,CAACF,KAAK,CAACE,OAAO,CAACA,OAAO,EAAE;;IAE1C,MAAMF,KAAK;;;EAGf,IAAIA,KAAK,CAACG,MAAM,IAAI,GAAG,IAAI,CAACJ,KAAK,CAACK,UAAU,CAACC,QAAQ,CAACL,KAAK,CAACG,MAAM,CAAC,EAAE;IACjE,MAAMG,OAAO,GAAGL,OAAO,CAACC,OAAO,CAACI,OAAO,IAAI,IAAI,GAAGL,OAAO,CAACC,OAAO,CAACI,OAAO,GAAGP,KAAK,CAACO,OAAO;IACzF,MAAMC,UAAU,GAAGC,IAAI,CAACC,GAAG,CAAC,CAACR,OAAO,CAACC,OAAO,CAACQ,UAAU,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACrE,MAAMZ,OAAO,CAACa,KAAK,CAACC,YAAY,CAACZ,KAAK,EAAEM,OAAO,EAAEC,UAAU,CAAC;;;EAGhE,MAAMP,KAAK;AACf;;ACdA;AACA,AACA;AACA,AAAO,eAAea,WAAW,CAACd,KAAK,EAAEG,OAAO,EAAED,OAAO,EAAE;EACvD,MAAMa,OAAO,GAAG,IAAIC,UAAU,EAAE;;EAEhCD,OAAO,CAACE,EAAE,CAAC,QAAQ,EAAE,UAAUhB,KAAK,EAAEiB,IAAI,EAAE;IACxC,MAAMC,UAAU,GAAG,CAAC,CAAClB,KAAK,CAACE,OAAO,CAACA,OAAO,CAACI,OAAO;IAClD,MAAMa,KAAK,GAAG,CAAC,CAACnB,KAAK,CAACE,OAAO,CAACA,OAAO,CAACK,UAAU;IAChDN,OAAO,CAACC,OAAO,CAACQ,UAAU,GAAGO,IAAI,CAACP,UAAU,GAAG,CAAC;IAChD,IAAIQ,UAAU,GAAGD,IAAI,CAACP,UAAU,EAAE;;;MAG9B,OAAOS,KAAK,GAAGpB,KAAK,CAACqB,mBAAmB;;GAE/C,CAAC;EACF,OAAON,OAAO,CAACO,QAAQ,CAACnB,OAAO,EAAED,OAAO,CAAC;AAC7C;;MCfaqB,OAAO,GAAG,mBAAmB;AAC1C,AAAO,SAASX,KAAK,CAACb,OAAO,EAAEyB,cAAc,EAAE;EAC3C,MAAMxB,KAAK,GAAGyB,MAAM,CAACC,MAAM,CAAC;IACxBC,OAAO,EAAE,IAAI;IACbN,mBAAmB,EAAE,IAAI;IACzBhB,UAAU,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IACrCE,OAAO,EAAE;GACZ,EAAEiB,cAAc,CAACZ,KAAK,CAAC;EACxB,IAAIZ,KAAK,CAAC2B,OAAO,EAAE;IACf5B,OAAO,CAAC6B,IAAI,CAAC3B,KAAK,CAAC,SAAS,EAAEH,YAAY,CAAC+B,IAAI,CAAC,IAAI,EAAE9B,OAAO,EAAEC,KAAK,CAAC,CAAC;IACtED,OAAO,CAAC6B,IAAI,CAACE,IAAI,CAAC,SAAS,EAAEhB,WAAW,CAACe,IAAI,CAAC,IAAI,EAAE7B,KAAK,CAAC,CAAC;;EAE/D,OAAO;IACHY,KAAK,EAAE;MACHC,YAAY,EAAE,CAACZ,KAAK,EAAEM,OAAO,EAAEC,UAAU,KAAK;QAC1CP,KAAK,CAACE,OAAO,CAACA,OAAO,GAAGsB,MAAM,CAACC,MAAM,CAAC,EAAE,EAAEzB,KAAK,CAACE,OAAO,CAACA,OAAO,EAAE;UAC7DI,OAAO,EAAEA,OAAO;UAChBC,UAAU,EAAEA;SACf,CAAC;QACF,OAAOP,KAAK;;;GAGvB;AACL;AACAW,KAAK,CAACW,OAAO,GAAGA,OAAO;;;;;"}
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../dist-src/index.js", "../dist-src/error-request.js", "../dist-src/wrap-request.js"],
|
||||
"sourcesContent": ["import { errorRequest } from \"./error-request\";\nimport { wrapRequest } from \"./wrap-request\";\nconst VERSION = \"5.0.2\";\nfunction retry(octokit, octokitOptions) {\n const state = Object.assign(\n {\n enabled: true,\n retryAfterBaseValue: 1e3,\n doNotRetry: [400, 401, 403, 404, 422],\n retries: 3\n },\n octokitOptions.retry\n );\n if (state.enabled) {\n octokit.hook.error(\"request\", errorRequest.bind(null, state, octokit));\n octokit.hook.wrap(\"request\", wrapRequest.bind(null, state, octokit));\n }\n return {\n retry: {\n retryRequest: (error, retries, retryAfter) => {\n error.request.request = Object.assign({}, error.request.request, {\n retries,\n retryAfter\n });\n return error;\n }\n }\n };\n}\nretry.VERSION = VERSION;\nexport {\n VERSION,\n retry\n};\n", "async function errorRequest(state, octokit, error, options) {\n if (!error.request || !error.request.request) {\n throw error;\n }\n if (error.status >= 400 && !state.doNotRetry.includes(error.status)) {\n const retries = options.request.retries != null ? options.request.retries : state.retries;\n const retryAfter = Math.pow((options.request.retryCount || 0) + 1, 2);\n throw octokit.retry.retryRequest(error, retries, retryAfter);\n }\n throw error;\n}\nexport {\n errorRequest\n};\n", "import Bottleneck from \"bottleneck/light\";\nimport { RequestError } from \"@octokit/request-error\";\nimport { errorRequest } from \"./error-request\";\nasync function wrapRequest(state, octokit, request, options) {\n const limiter = new Bottleneck();\n limiter.on(\"failed\", function(error, info) {\n const maxRetries = ~~error.request.request.retries;\n const after = ~~error.request.request.retryAfter;\n options.request.retryCount = info.retryCount + 1;\n if (maxRetries > info.retryCount) {\n return after * state.retryAfterBaseValue;\n }\n });\n return limiter.schedule(\n requestWithGraphqlErrorHandling.bind(null, state, octokit, request),\n options\n );\n}\nasync function requestWithGraphqlErrorHandling(state, octokit, request, options) {\n const response = await request(request, options);\n if (response.data && response.data.errors && /Something went wrong while executing your query/.test(\n response.data.errors[0].message\n )) {\n const error = new RequestError(response.data.errors[0].message, 500, {\n request: options,\n response\n });\n return errorRequest(state, octokit, error, options);\n }\n return response;\n}\nexport {\n wrapRequest\n};\n"],
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,eAAe,aAAa,OAAO,SAAS,OAAO,SAAS;AAC1D,MAAI,CAAC,MAAM,WAAW,CAAC,MAAM,QAAQ,SAAS;AAC5C,UAAM;AAAA,EACR;AACA,MAAI,MAAM,UAAU,OAAO,CAAC,MAAM,WAAW,SAAS,MAAM,MAAM,GAAG;AACnE,UAAM,UAAU,QAAQ,QAAQ,WAAW,OAAO,QAAQ,QAAQ,UAAU,MAAM;AAClF,UAAM,aAAa,KAAK,KAAK,QAAQ,QAAQ,cAAc,KAAK,GAAG,CAAC;AACpE,UAAM,QAAQ,MAAM,aAAa,OAAO,SAAS,UAAU;AAAA,EAC7D;AACA,QAAM;AACR;;;ACVA,mBAAuB;AACvB,2BAA6B;AAE7B,eAAe,YAAY,OAAO,SAAS,SAAS,SAAS;AAC3D,QAAM,UAAU,IAAI,aAAAA,QAAW;AAC/B,UAAQ,GAAG,UAAU,SAAS,OAAO,MAAM;AACzC,UAAM,aAAa,CAAC,CAAC,MAAM,QAAQ,QAAQ;AAC3C,UAAM,QAAQ,CAAC,CAAC,MAAM,QAAQ,QAAQ;AACtC,YAAQ,QAAQ,aAAa,KAAK,aAAa;AAC/C,QAAI,aAAa,KAAK,YAAY;AAChC,aAAO,QAAQ,MAAM;AAAA,IACvB;AAAA,EACF,CAAC;AACD,SAAO,QAAQ;AAAA,IACb,gCAAgC,KAAK,MAAM,OAAO,SAAS,OAAO;AAAA,IAClE;AAAA,EACF;AACF;AACA,eAAe,gCAAgC,OAAO,SAAS,SAAS,SAAS;AAC/E,QAAM,WAAW,MAAM,QAAQ,SAAS,OAAO;AAC/C,MAAI,SAAS,QAAQ,SAAS,KAAK,UAAU,kDAAkD;AAAA,IAC7F,SAAS,KAAK,OAAO,CAAC,EAAE;AAAA,EAC1B,GAAG;AACD,UAAM,QAAQ,IAAI,kCAAa,SAAS,KAAK,OAAO,CAAC,EAAE,SAAS,KAAK;AAAA,MACnE,SAAS;AAAA,MACT;AAAA,IACF,CAAC;AACD,WAAO,aAAa,OAAO,SAAS,OAAO,OAAO;AAAA,EACpD;AACA,SAAO;AACT;;;AF5BA,IAAM,UAAU;AAChB,SAAS,MAAM,SAAS,gBAAgB;AACtC,QAAM,QAAQ,OAAO;AAAA,IACnB;AAAA,MACE,SAAS;AAAA,MACT,qBAAqB;AAAA,MACrB,YAAY,CAAC,KAAK,KAAK,KAAK,KAAK,GAAG;AAAA,MACpC,SAAS;AAAA,IACX;AAAA,IACA,eAAe;AAAA,EACjB;AACA,MAAI,MAAM,SAAS;AACjB,YAAQ,KAAK,MAAM,WAAW,aAAa,KAAK,MAAM,OAAO,OAAO,CAAC;AACrE,YAAQ,KAAK,KAAK,WAAW,YAAY,KAAK,MAAM,OAAO,OAAO,CAAC;AAAA,EACrE;AACA,SAAO;AAAA,IACL,OAAO;AAAA,MACL,cAAc,CAAC,OAAO,SAAS,eAAe;AAC5C,cAAM,QAAQ,UAAU,OAAO,OAAO,CAAC,GAAG,MAAM,QAAQ,SAAS;AAAA,UAC/D;AAAA,UACA;AAAA,QACF,CAAC;AACD,eAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AACF;AACA,MAAM,UAAU;",
|
||||
"names": ["Bottleneck"]
|
||||
}
|
||||
|
||||
25
node_modules/@octokit/plugin-retry/dist-src/error-request.js
generated
vendored
25
node_modules/@octokit/plugin-retry/dist-src/error-request.js
generated
vendored
@@ -1,15 +1,14 @@
|
||||
// @ts-ignore
|
||||
export async function errorRequest(octokit, state, error, options) {
|
||||
if (!error.request || !error.request.request) {
|
||||
// address https://github.com/octokit/plugin-retry.js/issues/8
|
||||
throw error;
|
||||
}
|
||||
// retry all >= 400 && not doNotRetry
|
||||
if (error.status >= 400 && !state.doNotRetry.includes(error.status)) {
|
||||
const retries = options.request.retries != null ? options.request.retries : state.retries;
|
||||
const retryAfter = Math.pow((options.request.retryCount || 0) + 1, 2);
|
||||
throw octokit.retry.retryRequest(error, retries, retryAfter);
|
||||
}
|
||||
// Maybe eventually there will be more cases here
|
||||
async function errorRequest(state, octokit, error, options) {
|
||||
if (!error.request || !error.request.request) {
|
||||
throw error;
|
||||
}
|
||||
if (error.status >= 400 && !state.doNotRetry.includes(error.status)) {
|
||||
const retries = options.request.retries != null ? options.request.retries : state.retries;
|
||||
const retryAfter = Math.pow((options.request.retryCount || 0) + 1, 2);
|
||||
throw octokit.retry.retryRequest(error, retries, retryAfter);
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
export {
|
||||
errorRequest
|
||||
};
|
||||
|
||||
51
node_modules/@octokit/plugin-retry/dist-src/index.js
generated
vendored
51
node_modules/@octokit/plugin-retry/dist-src/index.js
generated
vendored
@@ -1,27 +1,34 @@
|
||||
import { errorRequest } from "./error-request";
|
||||
import { wrapRequest } from "./wrap-request";
|
||||
export const VERSION = "0.0.0-development";
|
||||
export function retry(octokit, octokitOptions) {
|
||||
const state = Object.assign({
|
||||
enabled: true,
|
||||
retryAfterBaseValue: 1000,
|
||||
doNotRetry: [400, 401, 403, 404, 422],
|
||||
retries: 3,
|
||||
}, octokitOptions.retry);
|
||||
if (state.enabled) {
|
||||
octokit.hook.error("request", errorRequest.bind(null, octokit, state));
|
||||
octokit.hook.wrap("request", wrapRequest.bind(null, state));
|
||||
const VERSION = "0.0.0-development";
|
||||
function retry(octokit, octokitOptions) {
|
||||
const state = Object.assign(
|
||||
{
|
||||
enabled: true,
|
||||
retryAfterBaseValue: 1e3,
|
||||
doNotRetry: [400, 401, 403, 404, 422],
|
||||
retries: 3
|
||||
},
|
||||
octokitOptions.retry
|
||||
);
|
||||
if (state.enabled) {
|
||||
octokit.hook.error("request", errorRequest.bind(null, state, octokit));
|
||||
octokit.hook.wrap("request", wrapRequest.bind(null, state, octokit));
|
||||
}
|
||||
return {
|
||||
retry: {
|
||||
retryRequest: (error, retries, retryAfter) => {
|
||||
error.request.request = Object.assign({}, error.request.request, {
|
||||
retries,
|
||||
retryAfter
|
||||
});
|
||||
return error;
|
||||
}
|
||||
}
|
||||
return {
|
||||
retry: {
|
||||
retryRequest: (error, retries, retryAfter) => {
|
||||
error.request.request = Object.assign({}, error.request.request, {
|
||||
retries: retries,
|
||||
retryAfter: retryAfter,
|
||||
});
|
||||
return error;
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
}
|
||||
retry.VERSION = VERSION;
|
||||
export {
|
||||
VERSION,
|
||||
retry
|
||||
};
|
||||
|
||||
5
node_modules/@octokit/plugin-retry/dist-src/version.js
generated
vendored
5
node_modules/@octokit/plugin-retry/dist-src/version.js
generated
vendored
@@ -1 +1,4 @@
|
||||
export const VERSION = "4.0.4";
|
||||
const VERSION = "5.0.2";
|
||||
export {
|
||||
VERSION
|
||||
};
|
||||
|
||||
48
node_modules/@octokit/plugin-retry/dist-src/wrap-request.js
generated
vendored
48
node_modules/@octokit/plugin-retry/dist-src/wrap-request.js
generated
vendored
@@ -1,18 +1,34 @@
|
||||
// @ts-ignore
|
||||
import Bottleneck from "bottleneck/light";
|
||||
// @ts-ignore
|
||||
export async function wrapRequest(state, request, options) {
|
||||
const limiter = new Bottleneck();
|
||||
// @ts-ignore
|
||||
limiter.on("failed", function (error, info) {
|
||||
const maxRetries = ~~error.request.request.retries;
|
||||
const after = ~~error.request.request.retryAfter;
|
||||
options.request.retryCount = info.retryCount + 1;
|
||||
if (maxRetries > info.retryCount) {
|
||||
// Returning a number instructs the limiter to retry
|
||||
// the request after that number of milliseconds have passed
|
||||
return after * state.retryAfterBaseValue;
|
||||
}
|
||||
});
|
||||
return limiter.schedule(request, options);
|
||||
import { RequestError } from "@octokit/request-error";
|
||||
import { errorRequest } from "./error-request";
|
||||
async function wrapRequest(state, octokit, request, options) {
|
||||
const limiter = new Bottleneck();
|
||||
limiter.on("failed", function(error, info) {
|
||||
const maxRetries = ~~error.request.request.retries;
|
||||
const after = ~~error.request.request.retryAfter;
|
||||
options.request.retryCount = info.retryCount + 1;
|
||||
if (maxRetries > info.retryCount) {
|
||||
return after * state.retryAfterBaseValue;
|
||||
}
|
||||
});
|
||||
return limiter.schedule(
|
||||
requestWithGraphqlErrorHandling.bind(null, state, octokit, request),
|
||||
options
|
||||
);
|
||||
}
|
||||
async function requestWithGraphqlErrorHandling(state, octokit, request, options) {
|
||||
const response = await request(request, options);
|
||||
if (response.data && response.data.errors && /Something went wrong while executing your query/.test(
|
||||
response.data.errors[0].message
|
||||
)) {
|
||||
const error = new RequestError(response.data.errors[0].message, 500, {
|
||||
request: options,
|
||||
response
|
||||
});
|
||||
return errorRequest(state, octokit, error, options);
|
||||
}
|
||||
return response;
|
||||
}
|
||||
export {
|
||||
wrapRequest
|
||||
};
|
||||
|
||||
2
node_modules/@octokit/plugin-retry/dist-types/error-request.d.ts
generated
vendored
2
node_modules/@octokit/plugin-retry/dist-types/error-request.d.ts
generated
vendored
@@ -1 +1 @@
|
||||
export declare function errorRequest(octokit: any, state: any, error: any, options: any): Promise<void>;
|
||||
export declare function errorRequest(state: any, octokit: any, error: any, options: any): Promise<void>;
|
||||
|
||||
2
node_modules/@octokit/plugin-retry/dist-types/index.d.ts
generated
vendored
2
node_modules/@octokit/plugin-retry/dist-types/index.d.ts
generated
vendored
@@ -1,5 +1,5 @@
|
||||
import { Octokit } from "@octokit/core";
|
||||
import { RequestError } from "@octokit/request-error";
|
||||
import type { RequestError } from "@octokit/request-error";
|
||||
export declare const VERSION = "0.0.0-development";
|
||||
export declare function retry(octokit: Octokit, octokitOptions: any): {
|
||||
retry: {
|
||||
|
||||
2
node_modules/@octokit/plugin-retry/dist-types/version.d.ts
generated
vendored
2
node_modules/@octokit/plugin-retry/dist-types/version.d.ts
generated
vendored
@@ -1 +1 @@
|
||||
export declare const VERSION = "4.0.4";
|
||||
export declare const VERSION = "5.0.2";
|
||||
|
||||
2
node_modules/@octokit/plugin-retry/dist-types/wrap-request.d.ts
generated
vendored
2
node_modules/@octokit/plugin-retry/dist-types/wrap-request.d.ts
generated
vendored
@@ -1 +1 @@
|
||||
export declare function wrapRequest(state: any, request: any, options: any): Promise<any>;
|
||||
export declare function wrapRequest(state: any, octokit: any, request: any, options: any): Promise<any>;
|
||||
|
||||
130
node_modules/@octokit/plugin-retry/dist-web/index.js
generated
vendored
130
node_modules/@octokit/plugin-retry/dist-web/index.js
generated
vendored
@@ -1,64 +1,78 @@
|
||||
import Bottleneck from 'bottleneck/light';
|
||||
|
||||
// @ts-ignore
|
||||
async function errorRequest(octokit, state, error, options) {
|
||||
if (!error.request || !error.request.request) {
|
||||
// address https://github.com/octokit/plugin-retry.js/issues/8
|
||||
throw error;
|
||||
}
|
||||
// retry all >= 400 && not doNotRetry
|
||||
if (error.status >= 400 && !state.doNotRetry.includes(error.status)) {
|
||||
const retries = options.request.retries != null ? options.request.retries : state.retries;
|
||||
const retryAfter = Math.pow((options.request.retryCount || 0) + 1, 2);
|
||||
throw octokit.retry.retryRequest(error, retries, retryAfter);
|
||||
}
|
||||
// Maybe eventually there will be more cases here
|
||||
// pkg/dist-src/error-request.js
|
||||
async function errorRequest(state, octokit, error, options) {
|
||||
if (!error.request || !error.request.request) {
|
||||
throw error;
|
||||
}
|
||||
if (error.status >= 400 && !state.doNotRetry.includes(error.status)) {
|
||||
const retries = options.request.retries != null ? options.request.retries : state.retries;
|
||||
const retryAfter = Math.pow((options.request.retryCount || 0) + 1, 2);
|
||||
throw octokit.retry.retryRequest(error, retries, retryAfter);
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
// @ts-ignore
|
||||
async function wrapRequest(state, request, options) {
|
||||
const limiter = new Bottleneck();
|
||||
// @ts-ignore
|
||||
limiter.on("failed", function (error, info) {
|
||||
const maxRetries = ~~error.request.request.retries;
|
||||
const after = ~~error.request.request.retryAfter;
|
||||
options.request.retryCount = info.retryCount + 1;
|
||||
if (maxRetries > info.retryCount) {
|
||||
// Returning a number instructs the limiter to retry
|
||||
// the request after that number of milliseconds have passed
|
||||
return after * state.retryAfterBaseValue;
|
||||
}
|
||||
});
|
||||
return limiter.schedule(request, options);
|
||||
}
|
||||
|
||||
const VERSION = "4.0.4";
|
||||
function retry(octokit, octokitOptions) {
|
||||
const state = Object.assign({
|
||||
enabled: true,
|
||||
retryAfterBaseValue: 1000,
|
||||
doNotRetry: [400, 401, 403, 404, 422],
|
||||
retries: 3,
|
||||
}, octokitOptions.retry);
|
||||
if (state.enabled) {
|
||||
octokit.hook.error("request", errorRequest.bind(null, octokit, state));
|
||||
octokit.hook.wrap("request", wrapRequest.bind(null, state));
|
||||
// pkg/dist-src/wrap-request.js
|
||||
import Bottleneck from "bottleneck/light";
|
||||
import { RequestError } from "@octokit/request-error";
|
||||
async function wrapRequest(state, octokit, request, options) {
|
||||
const limiter = new Bottleneck();
|
||||
limiter.on("failed", function(error, info) {
|
||||
const maxRetries = ~~error.request.request.retries;
|
||||
const after = ~~error.request.request.retryAfter;
|
||||
options.request.retryCount = info.retryCount + 1;
|
||||
if (maxRetries > info.retryCount) {
|
||||
return after * state.retryAfterBaseValue;
|
||||
}
|
||||
return {
|
||||
retry: {
|
||||
retryRequest: (error, retries, retryAfter) => {
|
||||
error.request.request = Object.assign({}, error.request.request, {
|
||||
retries: retries,
|
||||
retryAfter: retryAfter,
|
||||
});
|
||||
return error;
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
return limiter.schedule(
|
||||
requestWithGraphqlErrorHandling.bind(null, state, octokit, request),
|
||||
options
|
||||
);
|
||||
}
|
||||
async function requestWithGraphqlErrorHandling(state, octokit, request, options) {
|
||||
const response = await request(request, options);
|
||||
if (response.data && response.data.errors && /Something went wrong while executing your query/.test(
|
||||
response.data.errors[0].message
|
||||
)) {
|
||||
const error = new RequestError(response.data.errors[0].message, 500, {
|
||||
request: options,
|
||||
response
|
||||
});
|
||||
return errorRequest(state, octokit, error, options);
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
// pkg/dist-src/index.js
|
||||
var VERSION = "5.0.2";
|
||||
function retry(octokit, octokitOptions) {
|
||||
const state = Object.assign(
|
||||
{
|
||||
enabled: true,
|
||||
retryAfterBaseValue: 1e3,
|
||||
doNotRetry: [400, 401, 403, 404, 422],
|
||||
retries: 3
|
||||
},
|
||||
octokitOptions.retry
|
||||
);
|
||||
if (state.enabled) {
|
||||
octokit.hook.error("request", errorRequest.bind(null, state, octokit));
|
||||
octokit.hook.wrap("request", wrapRequest.bind(null, state, octokit));
|
||||
}
|
||||
return {
|
||||
retry: {
|
||||
retryRequest: (error, retries, retryAfter) => {
|
||||
error.request.request = Object.assign({}, error.request.request, {
|
||||
retries,
|
||||
retryAfter
|
||||
});
|
||||
return error;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
retry.VERSION = VERSION;
|
||||
|
||||
export { VERSION, retry };
|
||||
//# sourceMappingURL=index.js.map
|
||||
export {
|
||||
VERSION,
|
||||
retry
|
||||
};
|
||||
|
||||
8
node_modules/@octokit/plugin-retry/dist-web/index.js.map
generated
vendored
8
node_modules/@octokit/plugin-retry/dist-web/index.js.map
generated
vendored
@@ -1 +1,7 @@
|
||||
{"version":3,"file":"index.js","sources":["../dist-src/error-request.js","../dist-src/wrap-request.js","../dist-src/index.js"],"sourcesContent":["// @ts-ignore\nexport async function errorRequest(octokit, state, error, options) {\n if (!error.request || !error.request.request) {\n // address https://github.com/octokit/plugin-retry.js/issues/8\n throw error;\n }\n // retry all >= 400 && not doNotRetry\n if (error.status >= 400 && !state.doNotRetry.includes(error.status)) {\n const retries = options.request.retries != null ? options.request.retries : state.retries;\n const retryAfter = Math.pow((options.request.retryCount || 0) + 1, 2);\n throw octokit.retry.retryRequest(error, retries, retryAfter);\n }\n // Maybe eventually there will be more cases here\n throw error;\n}\n","// @ts-ignore\nimport Bottleneck from \"bottleneck/light\";\n// @ts-ignore\nexport async function wrapRequest(state, request, options) {\n const limiter = new Bottleneck();\n // @ts-ignore\n limiter.on(\"failed\", function (error, info) {\n const maxRetries = ~~error.request.request.retries;\n const after = ~~error.request.request.retryAfter;\n options.request.retryCount = info.retryCount + 1;\n if (maxRetries > info.retryCount) {\n // Returning a number instructs the limiter to retry\n // the request after that number of milliseconds have passed\n return after * state.retryAfterBaseValue;\n }\n });\n return limiter.schedule(request, options);\n}\n","import { errorRequest } from \"./error-request\";\nimport { wrapRequest } from \"./wrap-request\";\nexport const VERSION = \"4.0.4\";\nexport function retry(octokit, octokitOptions) {\n const state = Object.assign({\n enabled: true,\n retryAfterBaseValue: 1000,\n doNotRetry: [400, 401, 403, 404, 422],\n retries: 3,\n }, octokitOptions.retry);\n if (state.enabled) {\n octokit.hook.error(\"request\", errorRequest.bind(null, octokit, state));\n octokit.hook.wrap(\"request\", wrapRequest.bind(null, state));\n }\n return {\n retry: {\n retryRequest: (error, retries, retryAfter) => {\n error.request.request = Object.assign({}, error.request.request, {\n retries: retries,\n retryAfter: retryAfter,\n });\n return error;\n },\n },\n };\n}\nretry.VERSION = VERSION;\n"],"names":[],"mappings":";;AAAA;AACO,eAAe,YAAY,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE;AACnE,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE;AAClD;AACA,QAAQ,MAAM,KAAK,CAAC;AACpB,KAAK;AACL;AACA,IAAI,IAAI,KAAK,CAAC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;AACzE,QAAQ,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,IAAI,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;AAClG,QAAQ,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;AAC9E,QAAQ,MAAM,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;AACrE,KAAK;AACL;AACA,IAAI,MAAM,KAAK,CAAC;AAChB;;ACdA;AACA,AACA;AACA,AAAO,eAAe,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE;AAC3D,IAAI,MAAM,OAAO,GAAG,IAAI,UAAU,EAAE,CAAC;AACrC;AACA,IAAI,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,UAAU,KAAK,EAAE,IAAI,EAAE;AAChD,QAAQ,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC;AAC3D,QAAQ,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC;AACzD,QAAQ,OAAO,CAAC,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;AACzD,QAAQ,IAAI,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE;AAC1C;AACA;AACA,YAAY,OAAO,KAAK,GAAG,KAAK,CAAC,mBAAmB,CAAC;AACrD,SAAS;AACT,KAAK,CAAC,CAAC;AACP,IAAI,OAAO,OAAO,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAC9C,CAAC;;ACfW,MAAC,OAAO,GAAG,mBAAmB,CAAC;AAC3C,AAAO,SAAS,KAAK,CAAC,OAAO,EAAE,cAAc,EAAE;AAC/C,IAAI,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;AAChC,QAAQ,OAAO,EAAE,IAAI;AACrB,QAAQ,mBAAmB,EAAE,IAAI;AACjC,QAAQ,UAAU,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;AAC7C,QAAQ,OAAO,EAAE,CAAC;AAClB,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC;AAC7B,IAAI,IAAI,KAAK,CAAC,OAAO,EAAE;AACvB,QAAQ,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;AAC/E,QAAQ,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;AACpE,KAAK;AACL,IAAI,OAAO;AACX,QAAQ,KAAK,EAAE;AACf,YAAY,YAAY,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,KAAK;AAC1D,gBAAgB,KAAK,CAAC,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE;AACjF,oBAAoB,OAAO,EAAE,OAAO;AACpC,oBAAoB,UAAU,EAAE,UAAU;AAC1C,iBAAiB,CAAC,CAAC;AACnB,gBAAgB,OAAO,KAAK,CAAC;AAC7B,aAAa;AACb,SAAS;AACT,KAAK,CAAC;AACN,CAAC;AACD,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;;;;"}
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../dist-src/error-request.js", "../dist-src/wrap-request.js", "../dist-src/index.js"],
|
||||
"sourcesContent": ["async function errorRequest(state, octokit, error, options) {\n if (!error.request || !error.request.request) {\n throw error;\n }\n if (error.status >= 400 && !state.doNotRetry.includes(error.status)) {\n const retries = options.request.retries != null ? options.request.retries : state.retries;\n const retryAfter = Math.pow((options.request.retryCount || 0) + 1, 2);\n throw octokit.retry.retryRequest(error, retries, retryAfter);\n }\n throw error;\n}\nexport {\n errorRequest\n};\n", "import Bottleneck from \"bottleneck/light\";\nimport { RequestError } from \"@octokit/request-error\";\nimport { errorRequest } from \"./error-request\";\nasync function wrapRequest(state, octokit, request, options) {\n const limiter = new Bottleneck();\n limiter.on(\"failed\", function(error, info) {\n const maxRetries = ~~error.request.request.retries;\n const after = ~~error.request.request.retryAfter;\n options.request.retryCount = info.retryCount + 1;\n if (maxRetries > info.retryCount) {\n return after * state.retryAfterBaseValue;\n }\n });\n return limiter.schedule(\n requestWithGraphqlErrorHandling.bind(null, state, octokit, request),\n options\n );\n}\nasync function requestWithGraphqlErrorHandling(state, octokit, request, options) {\n const response = await request(request, options);\n if (response.data && response.data.errors && /Something went wrong while executing your query/.test(\n response.data.errors[0].message\n )) {\n const error = new RequestError(response.data.errors[0].message, 500, {\n request: options,\n response\n });\n return errorRequest(state, octokit, error, options);\n }\n return response;\n}\nexport {\n wrapRequest\n};\n", "import { errorRequest } from \"./error-request\";\nimport { wrapRequest } from \"./wrap-request\";\nconst VERSION = \"5.0.2\";\nfunction retry(octokit, octokitOptions) {\n const state = Object.assign(\n {\n enabled: true,\n retryAfterBaseValue: 1e3,\n doNotRetry: [400, 401, 403, 404, 422],\n retries: 3\n },\n octokitOptions.retry\n );\n if (state.enabled) {\n octokit.hook.error(\"request\", errorRequest.bind(null, state, octokit));\n octokit.hook.wrap(\"request\", wrapRequest.bind(null, state, octokit));\n }\n return {\n retry: {\n retryRequest: (error, retries, retryAfter) => {\n error.request.request = Object.assign({}, error.request.request, {\n retries,\n retryAfter\n });\n return error;\n }\n }\n };\n}\nretry.VERSION = VERSION;\nexport {\n VERSION,\n retry\n};\n"],
|
||||
"mappings": ";AAAA,eAAe,aAAa,OAAO,SAAS,OAAO,SAAS;AAC1D,MAAI,CAAC,MAAM,WAAW,CAAC,MAAM,QAAQ,SAAS;AAC5C,UAAM;AAAA,EACR;AACA,MAAI,MAAM,UAAU,OAAO,CAAC,MAAM,WAAW,SAAS,MAAM,MAAM,GAAG;AACnE,UAAM,UAAU,QAAQ,QAAQ,WAAW,OAAO,QAAQ,QAAQ,UAAU,MAAM;AAClF,UAAM,aAAa,KAAK,KAAK,QAAQ,QAAQ,cAAc,KAAK,GAAG,CAAC;AACpE,UAAM,QAAQ,MAAM,aAAa,OAAO,SAAS,UAAU;AAAA,EAC7D;AACA,QAAM;AACR;;;ACVA,OAAO,gBAAgB;AACvB,SAAS,oBAAoB;AAE7B,eAAe,YAAY,OAAO,SAAS,SAAS,SAAS;AAC3D,QAAM,UAAU,IAAI,WAAW;AAC/B,UAAQ,GAAG,UAAU,SAAS,OAAO,MAAM;AACzC,UAAM,aAAa,CAAC,CAAC,MAAM,QAAQ,QAAQ;AAC3C,UAAM,QAAQ,CAAC,CAAC,MAAM,QAAQ,QAAQ;AACtC,YAAQ,QAAQ,aAAa,KAAK,aAAa;AAC/C,QAAI,aAAa,KAAK,YAAY;AAChC,aAAO,QAAQ,MAAM;AAAA,IACvB;AAAA,EACF,CAAC;AACD,SAAO,QAAQ;AAAA,IACb,gCAAgC,KAAK,MAAM,OAAO,SAAS,OAAO;AAAA,IAClE;AAAA,EACF;AACF;AACA,eAAe,gCAAgC,OAAO,SAAS,SAAS,SAAS;AAC/E,QAAM,WAAW,MAAM,QAAQ,SAAS,OAAO;AAC/C,MAAI,SAAS,QAAQ,SAAS,KAAK,UAAU,kDAAkD;AAAA,IAC7F,SAAS,KAAK,OAAO,CAAC,EAAE;AAAA,EAC1B,GAAG;AACD,UAAM,QAAQ,IAAI,aAAa,SAAS,KAAK,OAAO,CAAC,EAAE,SAAS,KAAK;AAAA,MACnE,SAAS;AAAA,MACT;AAAA,IACF,CAAC;AACD,WAAO,aAAa,OAAO,SAAS,OAAO,OAAO;AAAA,EACpD;AACA,SAAO;AACT;;;AC5BA,IAAM,UAAU;AAChB,SAAS,MAAM,SAAS,gBAAgB;AACtC,QAAM,QAAQ,OAAO;AAAA,IACnB;AAAA,MACE,SAAS;AAAA,MACT,qBAAqB;AAAA,MACrB,YAAY,CAAC,KAAK,KAAK,KAAK,KAAK,GAAG;AAAA,MACpC,SAAS;AAAA,IACX;AAAA,IACA,eAAe;AAAA,EACjB;AACA,MAAI,MAAM,SAAS;AACjB,YAAQ,KAAK,MAAM,WAAW,aAAa,KAAK,MAAM,OAAO,OAAO,CAAC;AACrE,YAAQ,KAAK,KAAK,WAAW,YAAY,KAAK,MAAM,OAAO,OAAO,CAAC;AAAA,EACrE;AACA,SAAO;AAAA,IACL,OAAO;AAAA,MACL,cAAc,CAAC,OAAO,SAAS,eAAe;AAC5C,cAAM,QAAQ,UAAU,OAAO,OAAO,CAAC,GAAG,MAAM,QAAQ,SAAS;AAAA,UAC/D;AAAA,UACA;AAAA,QACF,CAAC;AACD,eAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AACF;AACA,MAAM,UAAU;",
|
||||
"names": []
|
||||
}
|
||||
|
||||
7
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/LICENSE
generated
vendored
Normal file
7
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/LICENSE
generated
vendored
Normal file
@@ -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.
|
||||
65
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/README.md
generated
vendored
Normal file
65
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/README.md
generated
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
# types.ts
|
||||
|
||||
> Shared TypeScript definitions for Octokit projects
|
||||
|
||||
[](https://www.npmjs.com/package/@octokit/types)
|
||||
[](https://github.com/octokit/types.ts/actions?workflow=Test)
|
||||
|
||||
<!-- toc -->
|
||||
|
||||
- [Usage](#usage)
|
||||
- [Examples](#examples)
|
||||
- [Get parameter and response data types for a REST API endpoint](#get-parameter-and-response-data-types-for-a-rest-api-endpoint)
|
||||
- [Get response types from endpoint methods](#get-response-types-from-endpoint-methods)
|
||||
- [Contributing](#contributing)
|
||||
- [License](#license)
|
||||
|
||||
<!-- tocstop -->
|
||||
|
||||
## Usage
|
||||
|
||||
See all exported types at https://octokit.github.io/types.ts
|
||||
|
||||
## Examples
|
||||
|
||||
### Get parameter and response data types for a REST API endpoint
|
||||
|
||||
```ts
|
||||
import { Endpoints } from "@octokit/types";
|
||||
|
||||
type listUserReposParameters =
|
||||
Endpoints["GET /repos/{owner}/{repo}"]["parameters"];
|
||||
type listUserReposResponse = Endpoints["GET /repos/{owner}/{repo}"]["response"];
|
||||
|
||||
async function listRepos(
|
||||
options: listUserReposParameters
|
||||
): listUserReposResponse["data"] {
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
### Get response types from endpoint methods
|
||||
|
||||
```ts
|
||||
import {
|
||||
GetResponseTypeFromEndpointMethod,
|
||||
GetResponseDataTypeFromEndpointMethod,
|
||||
} from "@octokit/types";
|
||||
import { Octokit } from "@octokit/rest";
|
||||
|
||||
const octokit = new Octokit();
|
||||
type CreateLabelResponseType = GetResponseTypeFromEndpointMethod<
|
||||
typeof octokit.issues.createLabel
|
||||
>;
|
||||
type CreateLabelResponseDataType = GetResponseDataTypeFromEndpointMethod<
|
||||
typeof octokit.issues.createLabel
|
||||
>;
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
See [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||
|
||||
## License
|
||||
|
||||
[MIT](LICENSE)
|
||||
31
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/AuthInterface.d.ts
generated
vendored
Normal file
31
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/AuthInterface.d.ts
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
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<Authentication>;
|
||||
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`.
|
||||
*/
|
||||
<T = any>(request: RequestInterface, options: EndpointOptions): Promise<OctokitResponse<T>>;
|
||||
/**
|
||||
* 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`.
|
||||
*/
|
||||
<T = any>(request: RequestInterface, route: Route, parameters?: RequestParameters): Promise<OctokitResponse<T>>;
|
||||
};
|
||||
}
|
||||
21
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts
generated
vendored
Normal file
21
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
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[];
|
||||
};
|
||||
};
|
||||
65
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts
generated
vendored
Normal file
65
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts
generated
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
import { EndpointDefaults } from "./EndpointDefaults";
|
||||
import { RequestOptions } from "./RequestOptions";
|
||||
import { RequestParameters } from "./RequestParameters";
|
||||
import { Route } from "./Route";
|
||||
import { Endpoints } from "./generated/Endpoints";
|
||||
export interface EndpointInterface<D extends object = object> {
|
||||
/**
|
||||
* Transforms a GitHub REST API endpoint into generic request options
|
||||
*
|
||||
* @param {object} endpoint Must set `url` unless it's set defaults. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
<O extends RequestParameters = RequestParameters>(options: O & {
|
||||
method?: string;
|
||||
} & ("url" extends keyof D ? {
|
||||
url?: string;
|
||||
} : {
|
||||
url: string;
|
||||
})): RequestOptions & Pick<D & O, keyof 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`.
|
||||
*/
|
||||
<R extends Route, P extends RequestParameters = R extends keyof Endpoints ? Endpoints[R]["parameters"] & RequestParameters : RequestParameters>(route: keyof Endpoints | R, parameters?: P): (R extends keyof Endpoints ? Endpoints[R]["request"] : RequestOptions) & Pick<P, keyof RequestOptions>;
|
||||
/**
|
||||
* Object with current default route and parameters
|
||||
*/
|
||||
DEFAULTS: D & EndpointDefaults;
|
||||
/**
|
||||
* Returns a new `endpoint` interface with new defaults
|
||||
*/
|
||||
defaults: <O extends RequestParameters = RequestParameters>(newDefaults: O) => EndpointInterface<D & O>;
|
||||
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`.
|
||||
*
|
||||
*/
|
||||
<R extends Route, P extends RequestParameters = R extends keyof Endpoints ? Endpoints[R]["parameters"] & RequestParameters : RequestParameters>(route: keyof Endpoints | R, parameters?: P): D & (R extends keyof Endpoints ? Endpoints[R]["request"] & Endpoints[R]["parameters"] : EndpointDefaults) & P;
|
||||
/**
|
||||
* 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`.
|
||||
*/
|
||||
<P extends RequestParameters = RequestParameters>(options: P): EndpointDefaults & D & P;
|
||||
/**
|
||||
* Returns current default options.
|
||||
*
|
||||
* @deprecated use endpoint.DEFAULTS instead
|
||||
*/
|
||||
(): D & 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: <O extends EndpointDefaults = EndpointDefaults>(options: O) => RequestOptions & Pick<O, keyof RequestOptions>;
|
||||
}
|
||||
7
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts
generated
vendored
Normal file
7
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import { RequestMethod } from "./RequestMethod";
|
||||
import { Url } from "./Url";
|
||||
import { RequestParameters } from "./RequestParameters";
|
||||
export type EndpointOptions = RequestParameters & {
|
||||
method: RequestMethod;
|
||||
url: Url;
|
||||
};
|
||||
4
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/Fetch.d.ts
generated
vendored
Normal file
4
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/Fetch.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* Browser's fetch method (or compatible such as fetch-mock)
|
||||
*/
|
||||
export type Fetch = any;
|
||||
5
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts
generated
vendored
Normal file
5
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
type Unwrap<T> = T extends Promise<infer U> ? U : T;
|
||||
type AnyFunction = (...args: any[]) => any;
|
||||
export type GetResponseTypeFromEndpointMethod<T extends AnyFunction> = Unwrap<ReturnType<T>>;
|
||||
export type GetResponseDataTypeFromEndpointMethod<T extends AnyFunction> = Unwrap<ReturnType<T>>["data"];
|
||||
export {};
|
||||
17
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts
generated
vendored
Normal file
17
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import { ResponseHeaders } from "./ResponseHeaders";
|
||||
import { Url } from "./Url";
|
||||
export type OctokitResponse<T, S extends number = number> = {
|
||||
headers: ResponseHeaders;
|
||||
/**
|
||||
* http response code
|
||||
*/
|
||||
status: S;
|
||||
/**
|
||||
* URL of response after all redirects
|
||||
*/
|
||||
url: Url;
|
||||
/**
|
||||
* Response data as documented in the REST API reference documentation at https://docs.github.com/rest/reference
|
||||
*/
|
||||
data: T;
|
||||
};
|
||||
11
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/RequestError.d.ts
generated
vendored
Normal file
11
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/RequestError.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
export type RequestError = {
|
||||
name: string;
|
||||
status: number;
|
||||
documentation_url: string;
|
||||
errors?: Array<{
|
||||
resource: string;
|
||||
code: string;
|
||||
field: string;
|
||||
message?: string;
|
||||
}>;
|
||||
};
|
||||
15
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts
generated
vendored
Normal file
15
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts
generated
vendored
Normal file
@@ -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;
|
||||
};
|
||||
34
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/RequestInterface.d.ts
generated
vendored
Normal file
34
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/RequestInterface.d.ts
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
import { EndpointInterface } from "./EndpointInterface";
|
||||
import { OctokitResponse } from "./OctokitResponse";
|
||||
import { RequestParameters } from "./RequestParameters";
|
||||
import { Route } from "./Route";
|
||||
import { Endpoints } from "./generated/Endpoints";
|
||||
export interface RequestInterface<D extends object = object> {
|
||||
/**
|
||||
* 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`.
|
||||
*/
|
||||
<T = any, O extends RequestParameters = RequestParameters>(options: O & {
|
||||
method?: string;
|
||||
} & ("url" extends keyof D ? {
|
||||
url?: string;
|
||||
} : {
|
||||
url: string;
|
||||
})): Promise<OctokitResponse<T>>;
|
||||
/**
|
||||
* 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`.
|
||||
*/
|
||||
<R extends Route>(route: keyof Endpoints | R, options?: R extends keyof Endpoints ? Endpoints[R]["parameters"] & RequestParameters : RequestParameters): R extends keyof Endpoints ? Promise<Endpoints[R]["response"]> : Promise<OctokitResponse<any>>;
|
||||
/**
|
||||
* Returns a new `request` with updated route and parameters
|
||||
*/
|
||||
defaults: <O extends RequestParameters = RequestParameters>(newDefaults: O) => RequestInterface<D & O>;
|
||||
/**
|
||||
* Octokit endpoint API, see {@link https://github.com/octokit/endpoint.js|@octokit/endpoint}
|
||||
*/
|
||||
endpoint: EndpointInterface<D>;
|
||||
}
|
||||
4
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/RequestMethod.d.ts
generated
vendored
Normal file
4
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/RequestMethod.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* HTTP Verb supported by GitHub's REST API
|
||||
*/
|
||||
export type RequestMethod = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT";
|
||||
14
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/RequestOptions.d.ts
generated
vendored
Normal file
14
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/RequestOptions.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
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;
|
||||
};
|
||||
45
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/RequestParameters.d.ts
generated
vendored
Normal file
45
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/RequestParameters.d.ts
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
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]: unknown;
|
||||
};
|
||||
26
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts
generated
vendored
Normal file
26
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
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.
|
||||
*
|
||||
* @see https://nodejs.org/api/http.html#http_class_http_agent
|
||||
*/
|
||||
agent?: unknown;
|
||||
/**
|
||||
* 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;
|
||||
};
|
||||
20
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts
generated
vendored
Normal file
20
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
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;
|
||||
};
|
||||
4
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/Route.d.ts
generated
vendored
Normal file
4
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/Route.d.ts
generated
vendored
Normal file
@@ -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;
|
||||
6
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/Signal.d.ts
generated
vendored
Normal file
6
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/Signal.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Abort signal
|
||||
*
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
|
||||
*/
|
||||
export type Signal = any;
|
||||
4
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts
generated
vendored
Normal file
4
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import { AuthInterface } from "./AuthInterface";
|
||||
export interface StrategyInterface<StrategyOptions extends any[], AuthOptions extends any[], Authentication extends object> {
|
||||
(...args: StrategyOptions): AuthInterface<AuthOptions, Authentication>;
|
||||
}
|
||||
4
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/Url.d.ts
generated
vendored
Normal file
4
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/Url.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* Relative or absolute URL. Examples: `'/orgs/{org}'`, `https://example.com/foo/bar`
|
||||
*/
|
||||
export type Url = string;
|
||||
1
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/VERSION.d.ts
generated
vendored
Normal file
1
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/VERSION.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare const VERSION = "9.3.2";
|
||||
3639
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts
generated
vendored
Normal file
3639
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
46
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/package.json
generated
vendored
Normal file
46
node_modules/@octokit/plugin-retry/node_modules/@octokit/types/package.json
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"name": "@octokit/types",
|
||||
"version": "9.3.2",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"description": "Shared TypeScript definitions for Octokit projects",
|
||||
"dependencies": {
|
||||
"@octokit/openapi-types": "^18.0.0"
|
||||
},
|
||||
"repository": "github:octokit/types.ts",
|
||||
"keywords": [
|
||||
"github",
|
||||
"api",
|
||||
"sdk",
|
||||
"toolkit",
|
||||
"typescript"
|
||||
],
|
||||
"author": "Gregor Martynus (https://twitter.com/gr2m)",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@octokit/tsconfig": "^1.0.2",
|
||||
"@types/node": ">= 8",
|
||||
"github-openapi-graphql-query": "^4.0.0",
|
||||
"handlebars": "^4.7.6",
|
||||
"json-schema-to-typescript": "^13.0.0",
|
||||
"lodash.set": "^4.3.2",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"pascal-case": "^3.1.1",
|
||||
"prettier": "^2.0.0",
|
||||
"semantic-release": "^21.0.0",
|
||||
"semantic-release-plugin-update-version-in-files": "^1.0.0",
|
||||
"sort-keys": "^4.2.0",
|
||||
"string-to-jsdoc-comment": "^1.0.0",
|
||||
"typedoc": "^0.24.0",
|
||||
"typescript": "^5.0.0"
|
||||
},
|
||||
"octokit": {
|
||||
"openapi-version": "12.0.0"
|
||||
},
|
||||
"files": [
|
||||
"dist-types/**"
|
||||
],
|
||||
"types": "dist-types/index.d.ts",
|
||||
"sideEffects": false
|
||||
}
|
||||
45
node_modules/@octokit/plugin-retry/package.json
generated
vendored
45
node_modules/@octokit/plugin-retry/package.json
generated
vendored
@@ -1,19 +1,13 @@
|
||||
{
|
||||
"name": "@octokit/plugin-retry",
|
||||
"version": "5.0.2",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"description": "Automatic retry plugin for octokit",
|
||||
"version": "4.0.4",
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"dist-*/",
|
||||
"bin/"
|
||||
],
|
||||
"source": "dist-src/index.js",
|
||||
"types": "dist-types/index.d.ts",
|
||||
"main": "dist-node/index.js",
|
||||
"module": "dist-web/index.js",
|
||||
"pika": true,
|
||||
"sideEffects": false,
|
||||
"repository": "github:octokit/plugin-retry.js",
|
||||
"author": "Simon Grondin (http://github.com/SGrondin)",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@octokit/types": "^9.0.0",
|
||||
"bottleneck": "^2.15.3"
|
||||
@@ -23,25 +17,30 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@octokit/core": "^4.0.0",
|
||||
"@octokit/request-error": "^3.0.0",
|
||||
"@pika/pack": "^0.3.7",
|
||||
"@pika/plugin-build-node": "^0.9.0",
|
||||
"@pika/plugin-build-web": "^0.9.0",
|
||||
"@pika/plugin-ts-standard-pkg": "^0.9.0",
|
||||
"@octokit/request-error": "^4.0.0",
|
||||
"@octokit/tsconfig": "^2.0.0",
|
||||
"@types/fetch-mock": "^7.3.1",
|
||||
"@types/jest": "^29.0.0",
|
||||
"@types/node": "^18.0.0",
|
||||
"esbuild": "^0.17.19",
|
||||
"fetch-mock": "^9.0.0",
|
||||
"glob": "^10.2.6",
|
||||
"jest": "^29.0.0",
|
||||
"prettier": "2.8.3",
|
||||
"prettier": "2.8.8",
|
||||
"semantic-release-plugin-update-version-in-files": "^1.0.0",
|
||||
"ts-jest": "^29.0.0",
|
||||
"typescript": "^4.0.2"
|
||||
"typescript": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 14"
|
||||
"node": ">= 18"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
"files": [
|
||||
"dist-*/**",
|
||||
"bin/**"
|
||||
],
|
||||
"main": "dist-node/index.js",
|
||||
"browser": "dist-web/index.js",
|
||||
"types": "dist-types/index.d.ts",
|
||||
"module": "dist-src/index.js",
|
||||
"sideEffects": false
|
||||
}
|
||||
|
||||
8
node_modules/@octokit/types/dist-node/index.js
generated
vendored
8
node_modules/@octokit/types/dist-node/index.js
generated
vendored
@@ -1,8 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
const VERSION = "9.0.0";
|
||||
|
||||
exports.VERSION = VERSION;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/@octokit/types/dist-node/index.js.map
generated
vendored
1
node_modules/@octokit/types/dist-node/index.js.map
generated
vendored
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"index.js","sources":["../dist-src/VERSION.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n"],"names":["VERSION"],"mappings":";;;;MAAaA,OAAO,GAAG;;;;"}
|
||||
1
node_modules/@octokit/types/dist-src/AuthInterface.js
generated
vendored
1
node_modules/@octokit/types/dist-src/AuthInterface.js
generated
vendored
@@ -1 +0,0 @@
|
||||
export {};
|
||||
1
node_modules/@octokit/types/dist-src/EndpointDefaults.js
generated
vendored
1
node_modules/@octokit/types/dist-src/EndpointDefaults.js
generated
vendored
@@ -1 +0,0 @@
|
||||
export {};
|
||||
1
node_modules/@octokit/types/dist-src/EndpointInterface.js
generated
vendored
1
node_modules/@octokit/types/dist-src/EndpointInterface.js
generated
vendored
@@ -1 +0,0 @@
|
||||
export {};
|
||||
1
node_modules/@octokit/types/dist-src/EndpointOptions.js
generated
vendored
1
node_modules/@octokit/types/dist-src/EndpointOptions.js
generated
vendored
@@ -1 +0,0 @@
|
||||
export {};
|
||||
1
node_modules/@octokit/types/dist-src/Fetch.js
generated
vendored
1
node_modules/@octokit/types/dist-src/Fetch.js
generated
vendored
@@ -1 +0,0 @@
|
||||
export {};
|
||||
1
node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js
generated
vendored
1
node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js
generated
vendored
@@ -1 +0,0 @@
|
||||
export {};
|
||||
1
node_modules/@octokit/types/dist-src/OctokitResponse.js
generated
vendored
1
node_modules/@octokit/types/dist-src/OctokitResponse.js
generated
vendored
@@ -1 +0,0 @@
|
||||
export {};
|
||||
1
node_modules/@octokit/types/dist-src/RequestError.js
generated
vendored
1
node_modules/@octokit/types/dist-src/RequestError.js
generated
vendored
@@ -1 +0,0 @@
|
||||
export {};
|
||||
1
node_modules/@octokit/types/dist-src/RequestHeaders.js
generated
vendored
1
node_modules/@octokit/types/dist-src/RequestHeaders.js
generated
vendored
@@ -1 +0,0 @@
|
||||
export {};
|
||||
1
node_modules/@octokit/types/dist-src/RequestInterface.js
generated
vendored
1
node_modules/@octokit/types/dist-src/RequestInterface.js
generated
vendored
@@ -1 +0,0 @@
|
||||
export {};
|
||||
1
node_modules/@octokit/types/dist-src/RequestMethod.js
generated
vendored
1
node_modules/@octokit/types/dist-src/RequestMethod.js
generated
vendored
@@ -1 +0,0 @@
|
||||
export {};
|
||||
1
node_modules/@octokit/types/dist-src/RequestOptions.js
generated
vendored
1
node_modules/@octokit/types/dist-src/RequestOptions.js
generated
vendored
@@ -1 +0,0 @@
|
||||
export {};
|
||||
1
node_modules/@octokit/types/dist-src/RequestParameters.js
generated
vendored
1
node_modules/@octokit/types/dist-src/RequestParameters.js
generated
vendored
@@ -1 +0,0 @@
|
||||
export {};
|
||||
1
node_modules/@octokit/types/dist-src/RequestRequestOptions.js
generated
vendored
1
node_modules/@octokit/types/dist-src/RequestRequestOptions.js
generated
vendored
@@ -1 +0,0 @@
|
||||
export {};
|
||||
1
node_modules/@octokit/types/dist-src/ResponseHeaders.js
generated
vendored
1
node_modules/@octokit/types/dist-src/ResponseHeaders.js
generated
vendored
@@ -1 +0,0 @@
|
||||
export {};
|
||||
1
node_modules/@octokit/types/dist-src/Route.js
generated
vendored
1
node_modules/@octokit/types/dist-src/Route.js
generated
vendored
@@ -1 +0,0 @@
|
||||
export {};
|
||||
1
node_modules/@octokit/types/dist-src/Signal.js
generated
vendored
1
node_modules/@octokit/types/dist-src/Signal.js
generated
vendored
@@ -1 +0,0 @@
|
||||
export {};
|
||||
1
node_modules/@octokit/types/dist-src/StrategyInterface.js
generated
vendored
1
node_modules/@octokit/types/dist-src/StrategyInterface.js
generated
vendored
@@ -1 +0,0 @@
|
||||
export {};
|
||||
1
node_modules/@octokit/types/dist-src/Url.js
generated
vendored
1
node_modules/@octokit/types/dist-src/Url.js
generated
vendored
@@ -1 +0,0 @@
|
||||
export {};
|
||||
1
node_modules/@octokit/types/dist-src/VERSION.js
generated
vendored
1
node_modules/@octokit/types/dist-src/VERSION.js
generated
vendored
@@ -1 +0,0 @@
|
||||
export const VERSION = "9.0.0";
|
||||
1
node_modules/@octokit/types/dist-src/generated/Endpoints.js
generated
vendored
1
node_modules/@octokit/types/dist-src/generated/Endpoints.js
generated
vendored
@@ -1 +0,0 @@
|
||||
export {};
|
||||
2
node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts
generated
vendored
2
node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts
generated
vendored
@@ -16,6 +16,6 @@ export type EndpointDefaults = RequestParameters & {
|
||||
};
|
||||
mediaType: {
|
||||
format: string;
|
||||
previews: string[];
|
||||
previews?: string[];
|
||||
};
|
||||
};
|
||||
|
||||
2
node_modules/@octokit/types/dist-types/RequestParameters.d.ts
generated
vendored
2
node_modules/@octokit/types/dist-types/RequestParameters.d.ts
generated
vendored
@@ -24,7 +24,7 @@ export type RequestParameters = {
|
||||
*/
|
||||
format?: string;
|
||||
/**
|
||||
* Custom media type names of {@link https://developer.github.com/v3/media/|API Previews} without the `-preview` suffix.
|
||||
* Custom media type names of {@link https://docs.github.com/en/graphql/overview/schema-previews|GraphQL API Previews} without the `-preview` suffix.
|
||||
* Example for single preview: `['squirrel-girl']`.
|
||||
* Example for multiple previews: `['squirrel-girl', 'mister-fantastic']`.
|
||||
*/
|
||||
|
||||
2
node_modules/@octokit/types/dist-types/VERSION.d.ts
generated
vendored
2
node_modules/@octokit/types/dist-types/VERSION.d.ts
generated
vendored
@@ -1 +1 @@
|
||||
export declare const VERSION = "9.0.0";
|
||||
export declare const VERSION = "10.0.0";
|
||||
|
||||
365
node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts
generated
vendored
365
node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts
generated
vendored
@@ -4,7 +4,7 @@ import { RequestHeaders } from "../RequestHeaders";
|
||||
import { RequestRequestOptions } from "../RequestRequestOptions";
|
||||
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
||||
type ExtractParameters<T> = "parameters" extends keyof T ? UnionToIntersection<{
|
||||
[K in keyof T["parameters"]]: T["parameters"][K];
|
||||
[K in keyof T["parameters"]]-?: T["parameters"][K];
|
||||
}[keyof T["parameters"]]> : {};
|
||||
type ExtractRequestBody<T> = "requestBody" extends keyof T ? "content" extends keyof T["requestBody"] ? "application/json" extends keyof T["requestBody"]["content"] ? T["requestBody"]["content"]["application/json"] : {
|
||||
data: {
|
||||
@@ -15,14 +15,9 @@ type ExtractRequestBody<T> = "requestBody" extends keyof T ? "content" extends k
|
||||
[K in keyof T["requestBody"]]: T["requestBody"][K];
|
||||
}[keyof T["requestBody"]];
|
||||
} : {};
|
||||
type ToOctokitParameters<T> = ExtractParameters<T> & ExtractRequestBody<T>;
|
||||
type RequiredPreview<T> = T extends string ? {
|
||||
mediaType: {
|
||||
previews: [T, ...string[]];
|
||||
};
|
||||
} : {};
|
||||
type Operation<Url extends keyof paths, Method extends keyof paths[Url], preview = unknown> = {
|
||||
parameters: ToOctokitParameters<paths[Url][Method]> & RequiredPreview<preview>;
|
||||
type ToOctokitParameters<T> = ExtractParameters<T> & ExtractRequestBody<Required<T>>;
|
||||
type Operation<Url extends keyof paths, Method extends keyof paths[Url]> = {
|
||||
parameters: ToOctokitParameters<paths[Url][Method]>;
|
||||
request: {
|
||||
method: Method extends keyof MethodsMap ? MethodsMap[Method] : never;
|
||||
url: Url;
|
||||
@@ -73,14 +68,6 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/reference/apps#delete-an-app-token
|
||||
*/
|
||||
"DELETE /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "delete">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-enterprise
|
||||
*/
|
||||
"DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "delete">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/actions#delete-self-hosted-runner-from-an-enterprise
|
||||
*/
|
||||
"DELETE /enterprises/{enterprise}/actions/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}", "delete">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/gists#delete-a-gist
|
||||
*/
|
||||
@@ -101,6 +88,10 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/reference/activity#delete-a-thread-subscription
|
||||
*/
|
||||
"DELETE /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "delete">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/orgs/orgs/#delete-an-organization
|
||||
*/
|
||||
"DELETE /orgs/{org}": Operation<"/orgs/{org}", "delete">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/actions#disable-a-selected-repository-for-github-actions-in-an-organization
|
||||
*/
|
||||
@@ -113,18 +104,6 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/reference/actions#remove-a-repository-from-selected-repositories-list-for-a-required-workflow
|
||||
*/
|
||||
"DELETE /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}", "delete">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-group-from-an-organization
|
||||
*/
|
||||
"DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "delete">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/actions#remove-repository-access-to-a-self-hosted-runner-group-in-an-organization
|
||||
*/
|
||||
"DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}", "delete">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-organization
|
||||
*/
|
||||
"DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "delete">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-an-organization
|
||||
*/
|
||||
@@ -157,6 +136,10 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/reference/orgs#unblock-a-user-from-an-organization
|
||||
*/
|
||||
"DELETE /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "delete">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/codespaces#delete-codespaces-billing-users
|
||||
*/
|
||||
"DELETE /orgs/{org}/codespaces/billing/selected_users": Operation<"/orgs/{org}/codespaces/billing/selected_users", "delete">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/codespaces#delete-an-organization-secret
|
||||
*/
|
||||
@@ -198,11 +181,11 @@ export interface Endpoints {
|
||||
*/
|
||||
"DELETE /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "delete">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/migrations#delete-an-organization-migration-archive
|
||||
* @see https://docs.github.com/rest/migrations/orgs#delete-an-organization-migration-archive
|
||||
*/
|
||||
"DELETE /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "delete">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/migrations#unlock-an-organization-repository
|
||||
* @see https://docs.github.com/rest/migrations/orgs#unlock-an-organization-repository
|
||||
*/
|
||||
"DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock", "delete">;
|
||||
/**
|
||||
@@ -221,6 +204,10 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/reference/orgs#remove-public-organization-membership-for-the-authenticated-user
|
||||
*/
|
||||
"DELETE /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "delete">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/repos/rules#delete-organization-ruleset
|
||||
*/
|
||||
"DELETE /orgs/{org}/rulesets/{ruleset_id}": Operation<"/orgs/{org}/rulesets/{ruleset_id}", "delete">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/orgs#remove-a-security-manager-team
|
||||
*/
|
||||
@@ -318,7 +305,7 @@ export interface Endpoints {
|
||||
*/
|
||||
"DELETE /repos/{owner}/{repo}/actions/variables/{name}": Operation<"/repos/{owner}/{repo}/actions/variables/{name}", "delete">;
|
||||
/**
|
||||
* @see https://docs.github.com/v3/repos#delete-autolink
|
||||
* @see https://docs.github.com/rest/repos/autolinks#delete-an-autolink-reference-from-a-repository
|
||||
*/
|
||||
"DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "delete">;
|
||||
/**
|
||||
@@ -405,6 +392,10 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/deployments/branch-policies#delete-deployment-branch-policy
|
||||
*/
|
||||
"DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "delete">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/deployments/protection-rules#disable-deployment-protection-rule
|
||||
*/
|
||||
"DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}", "delete">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/git#delete-a-reference
|
||||
*/
|
||||
@@ -414,7 +405,7 @@ export interface Endpoints {
|
||||
*/
|
||||
"DELETE /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "delete">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/migrations#cancel-an-import
|
||||
* @see https://docs.github.com/rest/migrations/source-imports#cancel-an-import
|
||||
*/
|
||||
"DELETE /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "delete">;
|
||||
/**
|
||||
@@ -501,6 +492,10 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/reference/reactions/#delete-a-release-reaction
|
||||
*/
|
||||
"DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}", "delete">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/repos/rules#delete-repository-ruleset
|
||||
*/
|
||||
"DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id}": Operation<"/repos/{owner}/{repo}/rulesets/{ruleset_id}", "delete">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/activity#delete-a-repository-subscription
|
||||
*/
|
||||
@@ -590,11 +585,11 @@ export interface Endpoints {
|
||||
*/
|
||||
"DELETE /user/keys/{key_id}": Operation<"/user/keys/{key_id}", "delete">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/migrations#delete-a-user-migration-archive
|
||||
* @see https://docs.github.com/rest/migrations/users#delete-a-user-migration-archive
|
||||
*/
|
||||
"DELETE /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "delete">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/migrations#unlock-a-user-repository
|
||||
* @see https://docs.github.com/rest/migrations/users#unlock-a-user-repository
|
||||
*/
|
||||
"DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/user/migrations/{migration_id}/repos/{repo_name}/lock", "delete">;
|
||||
/**
|
||||
@@ -609,6 +604,10 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/collaborators/invitations#decline-a-repository-invitation
|
||||
*/
|
||||
"DELETE /user/repository_invitations/{invitation_id}": Operation<"/user/repository_invitations/{invitation_id}", "delete">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/users/social-accounts#delete-social-account-for-authenticated-user
|
||||
*/
|
||||
"DELETE /user/social_accounts": Operation<"/user/social_accounts", "delete">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/users#delete-a-ssh-signing-key-for-the-authenticated-user
|
||||
*/
|
||||
@@ -645,6 +644,10 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/reference/apps#get-a-delivery-for-an-app-webhook
|
||||
*/
|
||||
"GET /app/hook/deliveries/{delivery_id}": Operation<"/app/hook/deliveries/{delivery_id}", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/apps#list-installation-requests-for-the-authenticated-app
|
||||
*/
|
||||
"GET /app/installation-requests": Operation<"/app/installation-requests", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app
|
||||
*/
|
||||
@@ -669,22 +672,6 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/reference/emojis#get-emojis
|
||||
*/
|
||||
"GET /emojis": Operation<"/emojis", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-enterprise
|
||||
*/
|
||||
"GET /enterprises/{enterprise}/actions/runner-groups": Operation<"/enterprises/{enterprise}/actions/runner-groups", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-enterprise
|
||||
*/
|
||||
"GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-enterprise
|
||||
*/
|
||||
"GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/enterprise-admin#get-code-security-analysis-features-for-an-enterprise
|
||||
*/
|
||||
"GET /enterprises/{enterprise}/code_security_and_analysis": Operation<"/enterprises/{enterprise}/code_security_and_analysis", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-an-enterprise
|
||||
*/
|
||||
@@ -817,6 +804,22 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/reference/orgs#list-organizations
|
||||
*/
|
||||
"GET /organizations": Operation<"/organizations", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/orgs/orgs#list-requests-to-access-organization-resources-with-fine-grained-personal-access-tokens
|
||||
*/
|
||||
"GET /organizations/{org}/personal-access-token-requests": Operation<"/organizations/{org}/personal-access-token-requests", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/orgs/orgs#list-repositories-requested-to-be-accessed-by-a-fine-grained-personal-access-token
|
||||
*/
|
||||
"GET /organizations/{org}/personal-access-token-requests/{pat_request_id}/repositories": Operation<"/organizations/{org}/personal-access-token-requests/{pat_request_id}/repositories", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/orgs/orgs#list-fine-grained-personal-access-tokens-with-access-to-organization-resources
|
||||
*/
|
||||
"GET /organizations/{org}/personal-access-tokens": Operation<"/organizations/{org}/personal-access-tokens", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/orgs/orgs#list-repositories-a-fine-grained-personal-access-token-has-access-to
|
||||
*/
|
||||
"GET /organizations/{org}/personal-access-tokens/{pat_id}/repositories": Operation<"/organizations/{org}/personal-access-tokens/{pat_id}/repositories", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/codespaces#list-in-organization
|
||||
* @deprecated "org_id" is now "org"
|
||||
@@ -866,22 +869,6 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/reference/actions#list-selected-repositories-required-workflows
|
||||
*/
|
||||
"GET /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-organization
|
||||
*/
|
||||
"GET /orgs/{org}/actions/runner-groups": Operation<"/orgs/{org}/actions/runner-groups", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-organization
|
||||
*/
|
||||
"GET /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/actions#list-repository-access-to-a-self-hosted-runner-group-in-an-organization
|
||||
*/
|
||||
"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-in-a-group-for-an-organization
|
||||
*/
|
||||
"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-an-organization
|
||||
*/
|
||||
@@ -935,7 +922,7 @@ export interface Endpoints {
|
||||
*/
|
||||
"GET /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-by-organization
|
||||
* @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-for-an-organization
|
||||
*/
|
||||
"GET /orgs/{org}/code-scanning/alerts": Operation<"/orgs/{org}/code-scanning/alerts", "get">;
|
||||
/**
|
||||
@@ -978,6 +965,10 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret
|
||||
*/
|
||||
"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/packages#list-docker-migration-conflicting-packages-for-organization
|
||||
*/
|
||||
"GET /orgs/{org}/docker/conflicts": Operation<"/orgs/{org}/docker/conflicts", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/activity#list-public-organization-events
|
||||
*/
|
||||
@@ -1047,19 +1038,19 @@ export interface Endpoints {
|
||||
*/
|
||||
"GET /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/migrations#list-organization-migrations
|
||||
* @see https://docs.github.com/rest/migrations/orgs#list-organization-migrations
|
||||
*/
|
||||
"GET /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/migrations#get-an-organization-migration-status
|
||||
* @see https://docs.github.com/rest/migrations/orgs#get-an-organization-migration-status
|
||||
*/
|
||||
"GET /orgs/{org}/migrations/{migration_id}": Operation<"/orgs/{org}/migrations/{migration_id}", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/migrations#download-an-organization-migration-archive
|
||||
* @see https://docs.github.com/rest/migrations/orgs#download-an-organization-migration-archive
|
||||
*/
|
||||
"GET /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/migrations#list-repositories-in-an-organization-migration
|
||||
* @see https://docs.github.com/rest/migrations/orgs#list-repositories-in-an-organization-migration
|
||||
*/
|
||||
"GET /orgs/{org}/migrations/{migration_id}/repositories": Operation<"/orgs/{org}/migrations/{migration_id}/repositories", "get">;
|
||||
/**
|
||||
@@ -1098,6 +1089,14 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/reference/repos#list-organization-repositories
|
||||
*/
|
||||
"GET /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/repos/rules#get-organization-rulesets
|
||||
*/
|
||||
"GET /orgs/{org}/rulesets": Operation<"/orgs/{org}/rulesets", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/repos/rules#get-organization-ruleset
|
||||
*/
|
||||
"GET /orgs/{org}/rulesets/{ruleset_id}": Operation<"/orgs/{org}/rulesets/{ruleset_id}", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-organization
|
||||
*/
|
||||
@@ -1262,6 +1261,14 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-a-repository
|
||||
*/
|
||||
"GET /repos/{owner}/{repo}/actions/oidc/customization/sub": Operation<"/repos/{owner}/{repo}/actions/oidc/customization/sub", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/actions/secrets#list-repository-organization-secrets
|
||||
*/
|
||||
"GET /repos/{owner}/{repo}/actions/organization-secrets": Operation<"/repos/{owner}/{repo}/actions/organization-secrets", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/actions/variables#list-repository-organization-variables
|
||||
*/
|
||||
"GET /repos/{owner}/{repo}/actions/organization-variables": Operation<"/repos/{owner}/{repo}/actions/organization-variables", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-a-repository
|
||||
*/
|
||||
@@ -1387,11 +1394,11 @@ export interface Endpoints {
|
||||
*/
|
||||
"GET /repos/{owner}/{repo}/assignees/{assignee}": Operation<"/repos/{owner}/{repo}/assignees/{assignee}", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/v3/repos#list-autolinks
|
||||
* @see https://docs.github.com/rest/repos/autolinks#list-all-autolinks-of-a-repository
|
||||
*/
|
||||
"GET /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/v3/repos#get-autolink
|
||||
* @see https://docs.github.com/rest/repos/autolinks#get-an-autolink-reference-of-a-repository
|
||||
*/
|
||||
"GET /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "get">;
|
||||
/**
|
||||
@@ -1484,15 +1491,19 @@ export interface Endpoints {
|
||||
*/
|
||||
"GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}": Operation<"/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/code-scanning#list-codeql-databases
|
||||
* @see https://docs.github.com/rest/reference/code-scanning#list-codeql-databases-for-a-repository
|
||||
*/
|
||||
"GET /repos/{owner}/{repo}/code-scanning/codeql/databases": Operation<"/repos/{owner}/{repo}/code-scanning/codeql/databases", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/code-scanning#get-codeql-database
|
||||
* @see https://docs.github.com/rest/reference/code-scanning#get-a-codeql-database-for-a-repository
|
||||
*/
|
||||
"GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}": Operation<"/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/code-scanning#list-recent-code-scanning-analyses-for-a-repository
|
||||
* @see https://docs.github.com/rest/code-scanning#get-a-code-scanning-default-setup-configuration
|
||||
*/
|
||||
"GET /repos/{owner}/{repo}/code-scanning/default-setup": Operation<"/repos/{owner}/{repo}/code-scanning/default-setup", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/code-scanning#get-information-about-a-sarif-upload
|
||||
*/
|
||||
"GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}", "get">;
|
||||
/**
|
||||
@@ -1631,6 +1642,10 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/reference/dependency-graph#get-a-diff-of-the-dependencies-between-commits
|
||||
*/
|
||||
"GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}": Operation<"/repos/{owner}/{repo}/dependency-graph/compare/{basehead}", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/dependency-graph/sboms#export-a-software-bill-of-materials-sbom-for-a-repository
|
||||
*/
|
||||
"GET /repos/{owner}/{repo}/dependency-graph/sbom": Operation<"/repos/{owner}/{repo}/dependency-graph/sbom", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/deployments/deployments#list-deployments
|
||||
*/
|
||||
@@ -1663,6 +1678,18 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/deployments/branch-policies#get-deployment-branch-policy
|
||||
*/
|
||||
"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/deployments/protection-rules#get-all-deployment-protection-rules
|
||||
*/
|
||||
"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/deployments/protection-rules#list-custom-deployment-rule-integrations
|
||||
*/
|
||||
"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/deployments/protection-rules#get-a-deployment-protection-rule
|
||||
*/
|
||||
"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/activity#list-repository-events
|
||||
*/
|
||||
@@ -1716,15 +1743,15 @@ export interface Endpoints {
|
||||
*/
|
||||
"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/migrations#get-an-import-status
|
||||
* @see https://docs.github.com/rest/migrations/source-imports#get-an-import-status
|
||||
*/
|
||||
"GET /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/migrations#get-commit-authors
|
||||
* @see https://docs.github.com/rest/migrations/source-imports#get-commit-authors
|
||||
*/
|
||||
"GET /repos/{owner}/{repo}/import/authors": Operation<"/repos/{owner}/{repo}/import/authors", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/migrations#get-large-files
|
||||
* @see https://docs.github.com/rest/migrations/source-imports#get-large-files
|
||||
*/
|
||||
"GET /repos/{owner}/{repo}/import/large_files": Operation<"/repos/{owner}/{repo}/import/large_files", "get">;
|
||||
/**
|
||||
@@ -1943,6 +1970,18 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-release
|
||||
*/
|
||||
"GET /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/repos/rules#get-rules-for-a-branch
|
||||
*/
|
||||
"GET /repos/{owner}/{repo}/rules/branches/{branch}": Operation<"/repos/{owner}/{repo}/rules/branches/{branch}", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/repos/rules#get-repository-rulesets
|
||||
*/
|
||||
"GET /repos/{owner}/{repo}/rulesets": Operation<"/repos/{owner}/{repo}/rulesets", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/repos/rules#get-repository-ruleset
|
||||
*/
|
||||
"GET /repos/{owner}/{repo}/rulesets/{ruleset_id}": Operation<"/repos/{owner}/{repo}/rulesets/{ruleset_id}", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-a-repository
|
||||
*/
|
||||
@@ -1955,6 +1994,14 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/reference/secret-scanning#list-locations-for-a-secret-scanning-alert
|
||||
*/
|
||||
"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/security-advisories/repository-advisories#list-repository-security-advisories
|
||||
*/
|
||||
"GET /repos/{owner}/{repo}/security-advisories": Operation<"/repos/{owner}/{repo}/security-advisories", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/security-advisories/repository-advisories#get-a-repository-security-advisory
|
||||
*/
|
||||
"GET /repos/{owner}/{repo}/security-advisories/{ghsa_id}": Operation<"/repos/{owner}/{repo}/security-advisories/{ghsa_id}", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/activity#list-stargazers
|
||||
*/
|
||||
@@ -1976,7 +2023,7 @@ export interface Endpoints {
|
||||
*/
|
||||
"GET /repos/{owner}/{repo}/stats/participation": Operation<"/repos/{owner}/{repo}/stats/participation", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/statistics/repos#get-the-hourly-commit-count-for-each-day
|
||||
* @see https://docs.github.com/rest/metrics/statistics#get-the-hourly-commit-count-for-each-day
|
||||
*/
|
||||
"GET /repos/{owner}/{repo}/stats/punch_card": Operation<"/repos/{owner}/{repo}/stats/punch_card", "get">;
|
||||
/**
|
||||
@@ -2191,6 +2238,10 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/reference/codespaces#list-machine-types-for-a-codespace
|
||||
*/
|
||||
"GET /user/codespaces/{codespace_name}/machines": Operation<"/user/codespaces/{codespace_name}/machines", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/packages#list-docker-migration-conflicting-packages-for-authenticated-user
|
||||
*/
|
||||
"GET /user/docker/conflicts": Operation<"/user/docker/conflicts", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/users#list-email-addresses-for-the-authenticated-user
|
||||
*/
|
||||
@@ -2256,19 +2307,19 @@ export interface Endpoints {
|
||||
*/
|
||||
"GET /user/memberships/orgs/{org}": Operation<"/user/memberships/orgs/{org}", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/migrations#list-user-migrations
|
||||
* @see https://docs.github.com/rest/migrations/users#list-user-migrations
|
||||
*/
|
||||
"GET /user/migrations": Operation<"/user/migrations", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/migrations#get-a-user-migration-status
|
||||
* @see https://docs.github.com/rest/migrations/users#get-a-user-migration-status
|
||||
*/
|
||||
"GET /user/migrations/{migration_id}": Operation<"/user/migrations/{migration_id}", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/migrations#download-a-user-migration-archive
|
||||
* @see https://docs.github.com/rest/migrations/users#download-a-user-migration-archive
|
||||
*/
|
||||
"GET /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/migrations#list-repositories-for-a-user-migration
|
||||
* @see https://docs.github.com/rest/migrations/users#list-repositories-for-a-user-migration
|
||||
*/
|
||||
"GET /user/migrations/{migration_id}/repositories": Operation<"/user/migrations/{migration_id}/repositories", "get">;
|
||||
/**
|
||||
@@ -2303,6 +2354,10 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/collaborators/invitations#list-repository-invitations-for-the-authenticated-user
|
||||
*/
|
||||
"GET /user/repository_invitations": Operation<"/user/repository_invitations", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/users/social-accounts#list-social-accounts-for-the-authenticated-user
|
||||
*/
|
||||
"GET /user/social_accounts": Operation<"/user/social_accounts", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/users#list-public-ssh-signing-keys-for-the-authenticated-user
|
||||
*/
|
||||
@@ -2335,6 +2390,10 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/reference/users#get-a-user
|
||||
*/
|
||||
"GET /users/{username}": Operation<"/users/{username}", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/packages#list-docker-migration-conflicting-packages-for-user
|
||||
*/
|
||||
"GET /users/{username}/docker/conflicts": Operation<"/users/{username}/docker/conflicts", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/activity#list-events-for-the-authenticated-user
|
||||
*/
|
||||
@@ -2427,6 +2486,10 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-a-user
|
||||
*/
|
||||
"GET /users/{username}/settings/billing/shared-storage": Operation<"/users/{username}/settings/billing/shared-storage", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/users/social-accounts#list-social-accounts-for-a-user
|
||||
*/
|
||||
"GET /users/{username}/social_accounts": Operation<"/users/{username}/social_accounts", "get">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/users#list-ssh-signing-keys-for-a-user
|
||||
*/
|
||||
@@ -2455,10 +2518,6 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/reference/apps#reset-a-token
|
||||
*/
|
||||
"PATCH /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "patch">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/enterprise-admin#update-code-security-and-analysis-features-for-an-enterprise
|
||||
*/
|
||||
"PATCH /enterprises/{enterprise}/code_security_and_analysis": Operation<"/enterprises/{enterprise}/code_security_and_analysis", "patch">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/gists/#update-a-gist
|
||||
*/
|
||||
@@ -2479,10 +2538,6 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/reference/actions#update-a-required-workflow
|
||||
*/
|
||||
"PATCH /orgs/{org}/actions/required_workflows/{required_workflow_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}", "patch">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/actions#update-a-self-hosted-runner-group-for-an-organization
|
||||
*/
|
||||
"PATCH /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "patch">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/actions/variables#update-an-organization-variable
|
||||
*/
|
||||
@@ -2547,6 +2602,10 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/reference/code-scanning#update-a-code-scanning-alert
|
||||
*/
|
||||
"PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "patch">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/code-scanning#update-a-code-scanning-default-setup-configuration
|
||||
*/
|
||||
"PATCH /repos/{owner}/{repo}/code-scanning/default-setup": Operation<"/repos/{owner}/{repo}/code-scanning/default-setup", "patch">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/commits/comments#update-a-commit-comment
|
||||
*/
|
||||
@@ -2568,15 +2627,15 @@ export interface Endpoints {
|
||||
*/
|
||||
"PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/config", "patch">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/migrations#update-an-import
|
||||
* @see https://docs.github.com/rest/migrations/source-imports#update-an-import
|
||||
*/
|
||||
"PATCH /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "patch">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/migrations#map-a-commit-author
|
||||
* @see https://docs.github.com/rest/migrations/source-imports#map-a-commit-author
|
||||
*/
|
||||
"PATCH /repos/{owner}/{repo}/import/authors/{author_id}": Operation<"/repos/{owner}/{repo}/import/authors/{author_id}", "patch">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/migrations#update-git-lfs-preference
|
||||
* @see https://docs.github.com/rest/migrations/source-imports#update-git-lfs-preference
|
||||
*/
|
||||
"PATCH /repos/{owner}/{repo}/import/lfs": Operation<"/repos/{owner}/{repo}/import/lfs", "patch">;
|
||||
/**
|
||||
@@ -2619,6 +2678,10 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/reference/secret-scanning#update-a-secret-scanning-alert
|
||||
*/
|
||||
"PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", "patch">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/security-advisories/repository-advisories#update-a-repository-security-advisory
|
||||
*/
|
||||
"PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id}": Operation<"/repos/{owner}/{repo}/security-advisories/{ghsa_id}", "patch">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/actions/variables#update-an-environment-variable
|
||||
*/
|
||||
@@ -2672,21 +2735,9 @@ export interface Endpoints {
|
||||
*/
|
||||
"POST /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "post">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/apps#create-a-scoped-access-token
|
||||
* @see https://docs.github.com/rest/apps/apps#create-a-scoped-access-token
|
||||
*/
|
||||
"POST /applications/{client_id}/token/scoped": Operation<"/applications/{client_id}/token/scoped", "post">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/actions#create-self-hosted-runner-group-for-an-enterprise
|
||||
*/
|
||||
"POST /enterprises/{enterprise}/actions/runner-groups": Operation<"/enterprises/{enterprise}/actions/runner-groups", "post">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-enterprise
|
||||
*/
|
||||
"POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "post">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/enterprise-admin#enable-or-disable-a-security-feature
|
||||
*/
|
||||
"POST /enterprises/{enterprise}/{security_product}/{enablement}": Operation<"/enterprises/{enterprise}/{security_product}/{enablement}", "post">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/gists#create-a-gist
|
||||
*/
|
||||
@@ -2707,14 +2758,30 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/reference/markdown#render-a-markdown-document-in-raw-mode
|
||||
*/
|
||||
"POST /markdown/raw": Operation<"/markdown/raw", "post">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/orgs/orgs#review-requests-to-access-organization-resources-with-a-fine-grained-personal-access-token
|
||||
*/
|
||||
"POST /organizations/{org}/personal-access-token-requests": Operation<"/organizations/{org}/personal-access-token-requests", "post">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/orgs/orgs#review-a-request-to-access-organization-resources-with-a-fine-grained-personal-access-token
|
||||
*/
|
||||
"POST /organizations/{org}/personal-access-token-requests/{pat_request_id}": Operation<"/organizations/{org}/personal-access-token-requests/{pat_request_id}", "post">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/orgs/orgs#update-the-access-to-organization-resources-via-fine-grained-personal-access-tokens
|
||||
*/
|
||||
"POST /organizations/{org}/personal-access-tokens": Operation<"/organizations/{org}/personal-access-tokens", "post">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/orgs/orgs#update-the-access-a-fine-grained-personal-access-token-has-to-organization-resources
|
||||
*/
|
||||
"POST /organizations/{org}/personal-access-tokens/{pat_id}": Operation<"/organizations/{org}/personal-access-tokens/{pat_id}", "post">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/actions#create-a-required-workflow
|
||||
*/
|
||||
"POST /orgs/{org}/actions/required_workflows": Operation<"/orgs/{org}/actions/required_workflows", "post">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/actions#create-a-self-hosted-runner-group-for-an-organization
|
||||
* @see https://docs.github.com/rest/actions/self-hosted-runners#create-configuration-for-a-just-in-time-runner-for-an-organization
|
||||
*/
|
||||
"POST /orgs/{org}/actions/runner-groups": Operation<"/orgs/{org}/actions/runner-groups", "post">;
|
||||
"POST /orgs/{org}/actions/runners/generate-jitconfig": Operation<"/orgs/{org}/actions/runners/generate-jitconfig", "post">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-an-organization
|
||||
*/
|
||||
@@ -2731,6 +2798,10 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/actions/variables#create-an-organization-variable
|
||||
*/
|
||||
"POST /orgs/{org}/actions/variables": Operation<"/orgs/{org}/actions/variables", "post">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/codespaces#set-codespaces-billing-users
|
||||
*/
|
||||
"POST /orgs/{org}/codespaces/billing/selected_users": Operation<"/orgs/{org}/codespaces/billing/selected_users", "post">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/orgs#create-an-organization-webhook
|
||||
*/
|
||||
@@ -2752,7 +2823,7 @@ export interface Endpoints {
|
||||
*/
|
||||
"POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop": Operation<"/orgs/{org}/members/{username}/codespaces/{codespace_name}/stop", "post">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/migrations#start-an-organization-migration
|
||||
* @see https://docs.github.com/rest/migrations/orgs#start-an-organization-migration
|
||||
*/
|
||||
"POST /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "post">;
|
||||
/**
|
||||
@@ -2771,6 +2842,10 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/reference/repos#create-an-organization-repository
|
||||
*/
|
||||
"POST /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "post">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/repos/rules#create-organization-repository-ruleset
|
||||
*/
|
||||
"POST /orgs/{org}/rulesets": Operation<"/orgs/{org}/rulesets", "post">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/teams#create-a-team
|
||||
*/
|
||||
@@ -2815,6 +2890,10 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/reference/actions#re-run-job-for-workflow-run
|
||||
*/
|
||||
"POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun", "post">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/actions/self-hosted-runners#create-configuration-for-a-just-in-time-runner-for-a-repository
|
||||
*/
|
||||
"POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig": Operation<"/repos/{owner}/{repo}/actions/runners/generate-jitconfig", "post">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-a-repository
|
||||
*/
|
||||
@@ -2835,6 +2914,10 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/reference/actions#cancel-a-workflow-run
|
||||
*/
|
||||
"POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/cancel", "post">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/actions/workflow-runs#review-custom-deployment-protection-rules-for-a-workflow-run
|
||||
*/
|
||||
"POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule", "post">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/actions#review-pending-deployments-for-a-workflow-run
|
||||
*/
|
||||
@@ -2856,7 +2939,7 @@ export interface Endpoints {
|
||||
*/
|
||||
"POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches", "post">;
|
||||
/**
|
||||
* @see https://docs.github.com/v3/repos#create-an-autolink
|
||||
* @see https://docs.github.com/rest/repos/autolinks#create-an-autolink-reference-for-a-repository
|
||||
*/
|
||||
"POST /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "post">;
|
||||
/**
|
||||
@@ -2904,7 +2987,7 @@ export interface Endpoints {
|
||||
*/
|
||||
"POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest", "post">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/code-scanning#upload-a-sarif-file
|
||||
* @see https://docs.github.com/rest/reference/code-scanning#upload-an-analysis-as-sarif-data
|
||||
*/
|
||||
"POST /repos/{owner}/{repo}/code-scanning/sarifs": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs", "post">;
|
||||
/**
|
||||
@@ -2939,6 +3022,10 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/deployments/branch-policies#create-deployment-branch-policy
|
||||
*/
|
||||
"POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", "post">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/deployments/deployment-protection-rules#create-a-deployment-protection-rule
|
||||
*/
|
||||
"POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules", "post">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/repos#create-a-fork
|
||||
*/
|
||||
@@ -3072,7 +3159,7 @@ export interface Endpoints {
|
||||
*/
|
||||
"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events", "post">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/repos#create-a-release
|
||||
* @see https://docs.github.com/rest/releases/releases#create-a-release
|
||||
*/
|
||||
"POST /repos/{owner}/{repo}/releases": Operation<"/repos/{owner}/{repo}/releases", "post">;
|
||||
/**
|
||||
@@ -3083,6 +3170,18 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-release
|
||||
*/
|
||||
"POST /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "post">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/repos/rules#create-repository-ruleset
|
||||
*/
|
||||
"POST /repos/{owner}/{repo}/rulesets": Operation<"/repos/{owner}/{repo}/rulesets", "post">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/security-advisories/repository-advisories#create-a-repository-security-advisory
|
||||
*/
|
||||
"POST /repos/{owner}/{repo}/security-advisories": Operation<"/repos/{owner}/{repo}/security-advisories", "post">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/security-advisories/repository-advisories#privately-report-a-security-vulnerability
|
||||
*/
|
||||
"POST /repos/{owner}/{repo}/security-advisories/reports": Operation<"/repos/{owner}/{repo}/security-advisories/reports", "post">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/commits/statuses#create-a-commit-status
|
||||
*/
|
||||
@@ -3152,7 +3251,7 @@ export interface Endpoints {
|
||||
*/
|
||||
"POST /user/keys": Operation<"/user/keys", "post">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/migrations#start-a-user-migration
|
||||
* @see https://docs.github.com/rest/migrations/users#start-a-user-migration
|
||||
*/
|
||||
"POST /user/migrations": Operation<"/user/migrations", "post">;
|
||||
/**
|
||||
@@ -3171,6 +3270,10 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user
|
||||
*/
|
||||
"POST /user/repos": Operation<"/user/repos", "post">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/users/social-accounts#add-social-account-for-authenticated-user
|
||||
*/
|
||||
"POST /user/social_accounts": Operation<"/user/social_accounts", "post">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/users#create-an-ssh-signing-key-for-the-authenticated-user
|
||||
*/
|
||||
@@ -3191,14 +3294,6 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/reference/apps#suspend-an-app-installation
|
||||
*/
|
||||
"PUT /app/installations/{installation_id}/suspended": Operation<"/app/installations/{installation_id}/suspended", "put">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/actions#enable-a-selected-organization-for-github-actions-in-an-enterprise
|
||||
*/
|
||||
"PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/permissions/organizations/{org_id}", "put">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/actions#add-organization-access-to-a-self-hosted-runner-group-in-an-enterprise
|
||||
*/
|
||||
"PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}", "put">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/gists#star-a-gist
|
||||
*/
|
||||
@@ -3243,18 +3338,6 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/reference/actions#add-a-repository-to-selected-repositories-list-for-a-required-workflow
|
||||
*/
|
||||
"PUT /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}", "put">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/actions#set-repository-access-to-a-self-hosted-runner-group-in-an-organization
|
||||
*/
|
||||
"PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "put">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-organization
|
||||
*/
|
||||
"PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "put">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/actions#add-a-self-hosted-runner-to-a-group-for-an-organization
|
||||
*/
|
||||
"PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "put">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-an-organization
|
||||
*/
|
||||
@@ -3327,6 +3410,10 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/reference/orgs#set-public-organization-membership-for-the-authenticated-user
|
||||
*/
|
||||
"PUT /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "put">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/repos/rules#update-organization-ruleset
|
||||
*/
|
||||
"PUT /orgs/{org}/rulesets/{ruleset_id}": Operation<"/orgs/{org}/rulesets/{ruleset_id}", "put">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/orgs#add-a-security-manager-team
|
||||
*/
|
||||
@@ -3432,7 +3519,7 @@ export interface Endpoints {
|
||||
*/
|
||||
"PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}", "put">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/migrations#start-an-import
|
||||
* @see https://docs.github.com/rest/migrations/source-imports#start-an-import
|
||||
*/
|
||||
"PUT /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "put">;
|
||||
/**
|
||||
@@ -3475,6 +3562,10 @@ export interface Endpoints {
|
||||
* @see https://docs.github.com/rest/reference/pulls#update-a-pull-request-branch
|
||||
*/
|
||||
"PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/update-branch", "put">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/repos/rules#update-repository-ruleset
|
||||
*/
|
||||
"PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}": Operation<"/repos/{owner}/{repo}/rulesets/{ruleset_id}", "put">;
|
||||
/**
|
||||
* @see https://docs.github.com/rest/reference/activity#set-a-repository-subscription
|
||||
*/
|
||||
|
||||
4
node_modules/@octokit/types/dist-web/index.js
generated
vendored
4
node_modules/@octokit/types/dist-web/index.js
generated
vendored
@@ -1,4 +0,0 @@
|
||||
const VERSION = "9.0.0";
|
||||
|
||||
export { VERSION };
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/@octokit/types/dist-web/index.js.map
generated
vendored
1
node_modules/@octokit/types/dist-web/index.js.map
generated
vendored
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"index.js","sources":["../dist-src/VERSION.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
|
||||
56
node_modules/@octokit/types/package.json
generated
vendored
56
node_modules/@octokit/types/package.json
generated
vendored
@@ -1,21 +1,14 @@
|
||||
{
|
||||
"name": "@octokit/types",
|
||||
"description": "Shared TypeScript definitions for Octokit projects",
|
||||
"version": "9.0.0",
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"dist-*/",
|
||||
"bin/"
|
||||
],
|
||||
"source": "dist-src/index.js",
|
||||
"types": "dist-types/index.d.ts",
|
||||
"octokit": {
|
||||
"openapi-version": "10.0.0"
|
||||
"version": "10.0.0",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"main": "dist-node/index.js",
|
||||
"module": "dist-web/index.js",
|
||||
"pika": true,
|
||||
"sideEffects": false,
|
||||
"description": "Shared TypeScript definitions for Octokit projects",
|
||||
"dependencies": {
|
||||
"@octokit/openapi-types": "^18.0.0"
|
||||
},
|
||||
"repository": "github:octokit/types.ts",
|
||||
"keywords": [
|
||||
"github",
|
||||
"api",
|
||||
@@ -23,32 +16,31 @@
|
||||
"toolkit",
|
||||
"typescript"
|
||||
],
|
||||
"repository": "github:octokit/types.ts",
|
||||
"dependencies": {
|
||||
"@octokit/openapi-types": "^16.0.0"
|
||||
},
|
||||
"author": "Gregor Martynus (https://twitter.com/gr2m)",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@pika/pack": "^0.3.7",
|
||||
"@pika/plugin-build-node": "^0.9.0",
|
||||
"@pika/plugin-build-web": "^0.9.0",
|
||||
"@pika/plugin-ts-standard-pkg": "^0.9.0",
|
||||
"@octokit/tsconfig": "^1.0.2",
|
||||
"@types/node": ">= 8",
|
||||
"github-openapi-graphql-query": "^3.0.0",
|
||||
"github-openapi-graphql-query": "^4.0.0",
|
||||
"handlebars": "^4.7.6",
|
||||
"json-schema-to-typescript": "^11.0.0",
|
||||
"json-schema-to-typescript": "^13.0.0",
|
||||
"lodash.set": "^4.3.2",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"pascal-case": "^3.1.1",
|
||||
"pika-plugin-merge-properties": "^1.0.6",
|
||||
"prettier": "^2.0.0",
|
||||
"semantic-release": "^20.0.0",
|
||||
"semantic-release": "^21.0.0",
|
||||
"semantic-release-plugin-update-version-in-files": "^1.0.0",
|
||||
"sort-keys": "^4.2.0",
|
||||
"string-to-jsdoc-comment": "^1.0.0",
|
||||
"typedoc": "^0.23.0",
|
||||
"typescript": "^4.0.2"
|
||||
"typedoc": "^0.24.0",
|
||||
"typescript": "^5.0.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
"octokit": {
|
||||
"openapi-version": "12.0.0"
|
||||
},
|
||||
"files": [
|
||||
"dist-types/**"
|
||||
],
|
||||
"types": "dist-types/index.d.ts",
|
||||
"sideEffects": false
|
||||
}
|
||||
|
||||
24
node_modules/ip-regex/index.js
generated
vendored
24
node_modules/ip-regex/index.js
generated
vendored
@@ -1,24 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
const v4 = '(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])(?:\\.(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])){3}';
|
||||
|
||||
const v6seg = '[0-9a-fA-F]{1,4}';
|
||||
const v6 = `
|
||||
(
|
||||
(?:${v6seg}:){7}(?:${v6seg}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
|
||||
(?:${v6seg}:){6}(?:${v4}|:${v6seg}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
|
||||
(?:${v6seg}:){5}(?::${v4}|(:${v6seg}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
|
||||
(?:${v6seg}:){4}(?:(:${v6seg}){0,1}:${v4}|(:${v6seg}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
|
||||
(?:${v6seg}:){3}(?:(:${v6seg}){0,2}:${v4}|(:${v6seg}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
|
||||
(?:${v6seg}:){2}(?:(:${v6seg}){0,3}:${v4}|(:${v6seg}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
|
||||
(?:${v6seg}:){1}(?:(:${v6seg}){0,4}:${v4}|(:${v6seg}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
|
||||
(?::((?::${v6seg}){0,5}:${v4}|(?::${v6seg}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
|
||||
)(%[0-9a-zA-Z]{1,})? // %eth0 %1
|
||||
`.replace(/\s*\/\/.*$/gm, '').replace(/\n/g, '').trim();
|
||||
|
||||
const ip = module.exports = opts => opts && opts.exact ?
|
||||
new RegExp(`(?:^${v4}$)|(?:^${v6}$)`) :
|
||||
new RegExp(`(?:${v4})|(?:${v6})`, 'g');
|
||||
|
||||
ip.v4 = opts => opts && opts.exact ? new RegExp(`^${v4}$`) : new RegExp(v4, 'g');
|
||||
ip.v6 = opts => opts && opts.exact ? new RegExp(`^${v6}$`) : new RegExp(v6, 'g');
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user