Added the node modules.
Some checks failed
Auto Maintenance Cycle / pre-commit Autoupdate (push) Failing after 33s
Some checks failed
Auto Maintenance Cycle / pre-commit Autoupdate (push) Failing after 33s
This commit is contained in:
7
node_modules/@octokit/plugin-paginate-rest/LICENSE
generated
vendored
Normal file
7
node_modules/@octokit/plugin-paginate-rest/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.
|
269
node_modules/@octokit/plugin-paginate-rest/README.md
generated
vendored
Normal file
269
node_modules/@octokit/plugin-paginate-rest/README.md
generated
vendored
Normal file
@ -0,0 +1,269 @@
|
||||
# plugin-paginate-rest.js
|
||||
|
||||
> Octokit plugin to paginate REST API endpoint responses
|
||||
|
||||
[](https://www.npmjs.com/package/@octokit/plugin-paginate-rest)
|
||||
[](https://github.com/octokit/plugin-paginate-rest.js/actions?workflow=Test)
|
||||
|
||||
## Usage
|
||||
|
||||
<table>
|
||||
<tbody valign=top align=left>
|
||||
<tr><th>
|
||||
Browsers
|
||||
</th><td width=100%>
|
||||
|
||||
Load `@octokit/plugin-paginate-rest` and [`@octokit/core`](https://github.com/octokit/core.js) (or core-compatible module) directly from [cdn.skypack.dev](https://cdn.skypack.dev)
|
||||
|
||||
```html
|
||||
<script type="module">
|
||||
import { Octokit } from "https://cdn.skypack.dev/@octokit/core";
|
||||
import {
|
||||
paginateRest,
|
||||
composePaginateRest,
|
||||
} from "https://cdn.skypack.dev/@octokit/plugin-paginate-rest";
|
||||
</script>
|
||||
```
|
||||
|
||||
</td></tr>
|
||||
<tr><th>
|
||||
Node
|
||||
</th><td>
|
||||
|
||||
Install with `npm install @octokit/core @octokit/plugin-paginate-rest`. Optionally replace `@octokit/core` with a core-compatible module
|
||||
|
||||
```js
|
||||
const { Octokit } = require("@octokit/core");
|
||||
const {
|
||||
paginateRest,
|
||||
composePaginateRest,
|
||||
} = require("@octokit/plugin-paginate-rest");
|
||||
```
|
||||
|
||||
</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
```js
|
||||
const MyOctokit = Octokit.plugin(paginateRest);
|
||||
const octokit = new MyOctokit({ auth: "secret123" });
|
||||
|
||||
// See https://developer.github.com/v3/issues/#list-issues-for-a-repository
|
||||
const issues = await octokit.paginate("GET /repos/{owner}/{repo}/issues", {
|
||||
owner: "octocat",
|
||||
repo: "hello-world",
|
||||
since: "2010-10-01",
|
||||
per_page: 100,
|
||||
});
|
||||
```
|
||||
|
||||
If you want to utilize the pagination methods in another plugin, use `composePaginateRest`.
|
||||
|
||||
```js
|
||||
function myPlugin(octokit, options) {
|
||||
return {
|
||||
allStars({owner, repo}) => {
|
||||
return composePaginateRest(
|
||||
octokit,
|
||||
"GET /repos/{owner}/{repo}/stargazers",
|
||||
{owner, repo }
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## `octokit.paginate()`
|
||||
|
||||
The `paginateRest` plugin adds a new `octokit.paginate()` method which accepts the same parameters as [`octokit.request`](https://github.com/octokit/request.js#request). Only "List ..." endpoints such as [List issues for a repository](https://developer.github.com/v3/issues/#list-issues-for-a-repository) are supporting pagination. Their [response includes a Link header](https://developer.github.com/v3/issues/#response-1). For other endpoints, `octokit.paginate()` behaves the same as `octokit.request()`.
|
||||
|
||||
The `per_page` parameter is usually defaulting to `30`, and can be set to up to `100`, which helps retrieving a big amount of data without hitting the rate limits too soon.
|
||||
|
||||
An optional `mapFunction` can be passed to map each page response to a new value, usually an array with only the data you need. This can help to reduce memory usage, as only the relevant data has to be kept in memory until the pagination is complete.
|
||||
|
||||
```js
|
||||
const issueTitles = await octokit.paginate(
|
||||
"GET /repos/{owner}/{repo}/issues",
|
||||
{
|
||||
owner: "octocat",
|
||||
repo: "hello-world",
|
||||
since: "2010-10-01",
|
||||
per_page: 100,
|
||||
},
|
||||
(response) => response.data.map((issue) => issue.title)
|
||||
);
|
||||
```
|
||||
|
||||
The `mapFunction` gets a 2nd argument `done` which can be called to end the pagination early.
|
||||
|
||||
```js
|
||||
const issues = await octokit.paginate(
|
||||
"GET /repos/{owner}/{repo}/issues",
|
||||
{
|
||||
owner: "octocat",
|
||||
repo: "hello-world",
|
||||
since: "2010-10-01",
|
||||
per_page: 100,
|
||||
},
|
||||
(response, done) => {
|
||||
if (response.data.find((issue) => issue.title.includes("something"))) {
|
||||
done();
|
||||
}
|
||||
return response.data;
|
||||
}
|
||||
);
|
||||
```
|
||||
|
||||
Alternatively you can pass a `request` method as first argument. This is great when using in combination with [`@octokit/plugin-rest-endpoint-methods`](https://github.com/octokit/plugin-rest-endpoint-methods.js/):
|
||||
|
||||
```js
|
||||
const issues = await octokit.paginate(octokit.rest.issues.listForRepo, {
|
||||
owner: "octocat",
|
||||
repo: "hello-world",
|
||||
since: "2010-10-01",
|
||||
per_page: 100,
|
||||
});
|
||||
```
|
||||
|
||||
## `octokit.paginate.iterator()`
|
||||
|
||||
If your target runtime environments supports async iterators (such as most modern browsers and Node 10+), you can iterate through each response
|
||||
|
||||
```js
|
||||
const parameters = {
|
||||
owner: "octocat",
|
||||
repo: "hello-world",
|
||||
since: "2010-10-01",
|
||||
per_page: 100,
|
||||
};
|
||||
for await (const response of octokit.paginate.iterator(
|
||||
"GET /repos/{owner}/{repo}/issues",
|
||||
parameters
|
||||
)) {
|
||||
// do whatever you want with each response, break out of the loop, etc.
|
||||
const issues = response.data;
|
||||
console.log("%d issues found", issues.length);
|
||||
}
|
||||
```
|
||||
|
||||
Alternatively you can pass a `request` method as first argument. This is great when using in combination with [`@octokit/plugin-rest-endpoint-methods`](https://github.com/octokit/plugin-rest-endpoint-methods.js/):
|
||||
|
||||
```js
|
||||
const parameters = {
|
||||
owner: "octocat",
|
||||
repo: "hello-world",
|
||||
since: "2010-10-01",
|
||||
per_page: 100,
|
||||
};
|
||||
for await (const response of octokit.paginate.iterator(
|
||||
octokit.rest.issues.listForRepo,
|
||||
parameters
|
||||
)) {
|
||||
// do whatever you want with each response, break out of the loop, etc.
|
||||
const issues = response.data;
|
||||
console.log("%d issues found", issues.length);
|
||||
}
|
||||
```
|
||||
|
||||
## `composePaginateRest` and `composePaginateRest.iterator`
|
||||
|
||||
The `compose*` methods work just like their `octokit.*` counterparts described above, with the differenct that both methods require an `octokit` instance to be passed as first argument
|
||||
|
||||
## How it works
|
||||
|
||||
`octokit.paginate()` wraps `octokit.request()`. As long as a `rel="next"` link value is present in the response's `Link` header, it sends another request for that URL, and so on.
|
||||
|
||||
Most of GitHub's paginating REST API endpoints return an array, but there are a few exceptions which return an object with a key that includes the items array. For example:
|
||||
|
||||
- [Search repositories](https://developer.github.com/v3/search/#example) (key `items`)
|
||||
- [List check runs for a specific ref](https://developer.github.com/v3/checks/runs/#response-3) (key: `check_runs`)
|
||||
- [List check suites for a specific ref](https://developer.github.com/v3/checks/suites/#response-1) (key: `check_suites`)
|
||||
- [List repositories](https://developer.github.com/v3/apps/installations/#list-repositories) for an installation (key: `repositories`)
|
||||
- [List installations for a user](https://developer.github.com/v3/apps/installations/#response-1) (key `installations`)
|
||||
|
||||
`octokit.paginate()` is working around these inconsistencies so you don't have to worry about it.
|
||||
|
||||
If a response is lacking the `Link` header, `octokit.paginate()` still resolves with an array, even if the response returns a single object.
|
||||
|
||||
## Types
|
||||
|
||||
The plugin also exposes some types and runtime type guards for TypeScript projects.
|
||||
|
||||
<table>
|
||||
<tbody valign=top align=left>
|
||||
<tr><th>
|
||||
Types
|
||||
</th><td>
|
||||
|
||||
```typescript
|
||||
import {
|
||||
PaginateInterface,
|
||||
PaginatingEndpoints,
|
||||
} from "@octokit/plugin-paginate-rest";
|
||||
```
|
||||
|
||||
</td></tr>
|
||||
<tr><th>
|
||||
Guards
|
||||
</th><td>
|
||||
|
||||
```typescript
|
||||
import { isPaginatingEndpoint } from "@octokit/plugin-paginate-rest";
|
||||
```
|
||||
|
||||
</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
### PaginateInterface
|
||||
|
||||
An `interface` that declares all the overloads of the `.paginate` method.
|
||||
|
||||
### PaginatingEndpoints
|
||||
|
||||
An `interface` which describes all API endpoints supported by the plugin. Some overloads of `.paginate()` method and `composePaginateRest()` function depend on `PaginatingEndpoints`, using the `keyof PaginatingEndpoints` as a type for one of its arguments.
|
||||
|
||||
```typescript
|
||||
import { Octokit } from "@octokit/core";
|
||||
import {
|
||||
PaginatingEndpoints,
|
||||
composePaginateRest,
|
||||
} from "@octokit/plugin-paginate-rest";
|
||||
|
||||
type DataType<T> = "data" extends keyof T ? T["data"] : unknown;
|
||||
|
||||
async function myPaginatePlugin<E extends keyof PaginatingEndpoints>(
|
||||
octokit: Octokit,
|
||||
endpoint: E,
|
||||
parameters?: PaginatingEndpoints[E]["parameters"]
|
||||
): Promise<DataType<PaginatingEndpoints[E]["response"]>> {
|
||||
return await composePaginateRest(octokit, endpoint, parameters);
|
||||
}
|
||||
```
|
||||
|
||||
### isPaginatingEndpoint
|
||||
|
||||
A type guard, `isPaginatingEndpoint(arg)` returns `true` if `arg` is one of the keys in `PaginatingEndpoints` (is `keyof PaginatingEndpoints`).
|
||||
|
||||
```typescript
|
||||
import { Octokit } from "@octokit/core";
|
||||
import {
|
||||
isPaginatingEndpoint,
|
||||
composePaginateRest,
|
||||
} from "@octokit/plugin-paginate-rest";
|
||||
|
||||
async function myPlugin(octokit: Octokit, arg: unknown) {
|
||||
if (isPaginatingEndpoint(arg)) {
|
||||
return await composePaginateRest(octokit, arg);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
See [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||
|
||||
## License
|
||||
|
||||
[MIT](LICENSE)
|
205
node_modules/@octokit/plugin-paginate-rest/dist-node/index.js
generated
vendored
Normal file
205
node_modules/@octokit/plugin-paginate-rest/dist-node/index.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/@octokit/plugin-paginate-rest/dist-node/index.js.map
generated
vendored
Normal file
1
node_modules/@octokit/plugin-paginate-rest/dist-node/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
5
node_modules/@octokit/plugin-paginate-rest/dist-src/compose-paginate.js
generated
vendored
Normal file
5
node_modules/@octokit/plugin-paginate-rest/dist-src/compose-paginate.js
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
import { paginate } from "./paginate";
|
||||
import { iterator } from "./iterator";
|
||||
export const composePaginateRest = Object.assign(paginate, {
|
||||
iterator,
|
||||
});
|
216
node_modules/@octokit/plugin-paginate-rest/dist-src/generated/paginating-endpoints.js
generated
vendored
Normal file
216
node_modules/@octokit/plugin-paginate-rest/dist-src/generated/paginating-endpoints.js
generated
vendored
Normal file
@ -0,0 +1,216 @@
|
||||
export const paginatingEndpoints = [
|
||||
"GET /app/hook/deliveries",
|
||||
"GET /app/installations",
|
||||
"GET /applications/grants",
|
||||
"GET /authorizations",
|
||||
"GET /enterprises/{enterprise}/actions/permissions/organizations",
|
||||
"GET /enterprises/{enterprise}/actions/runner-groups",
|
||||
"GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations",
|
||||
"GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners",
|
||||
"GET /enterprises/{enterprise}/actions/runners",
|
||||
"GET /enterprises/{enterprise}/audit-log",
|
||||
"GET /enterprises/{enterprise}/secret-scanning/alerts",
|
||||
"GET /enterprises/{enterprise}/settings/billing/advanced-security",
|
||||
"GET /events",
|
||||
"GET /gists",
|
||||
"GET /gists/public",
|
||||
"GET /gists/starred",
|
||||
"GET /gists/{gist_id}/comments",
|
||||
"GET /gists/{gist_id}/commits",
|
||||
"GET /gists/{gist_id}/forks",
|
||||
"GET /installation/repositories",
|
||||
"GET /issues",
|
||||
"GET /licenses",
|
||||
"GET /marketplace_listing/plans",
|
||||
"GET /marketplace_listing/plans/{plan_id}/accounts",
|
||||
"GET /marketplace_listing/stubbed/plans",
|
||||
"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts",
|
||||
"GET /networks/{owner}/{repo}/events",
|
||||
"GET /notifications",
|
||||
"GET /organizations",
|
||||
"GET /orgs/{org}/actions/cache/usage-by-repository",
|
||||
"GET /orgs/{org}/actions/permissions/repositories",
|
||||
"GET /orgs/{org}/actions/runner-groups",
|
||||
"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories",
|
||||
"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners",
|
||||
"GET /orgs/{org}/actions/runners",
|
||||
"GET /orgs/{org}/actions/secrets",
|
||||
"GET /orgs/{org}/actions/secrets/{secret_name}/repositories",
|
||||
"GET /orgs/{org}/audit-log",
|
||||
"GET /orgs/{org}/blocks",
|
||||
"GET /orgs/{org}/code-scanning/alerts",
|
||||
"GET /orgs/{org}/codespaces",
|
||||
"GET /orgs/{org}/credential-authorizations",
|
||||
"GET /orgs/{org}/dependabot/secrets",
|
||||
"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories",
|
||||
"GET /orgs/{org}/events",
|
||||
"GET /orgs/{org}/external-groups",
|
||||
"GET /orgs/{org}/failed_invitations",
|
||||
"GET /orgs/{org}/hooks",
|
||||
"GET /orgs/{org}/hooks/{hook_id}/deliveries",
|
||||
"GET /orgs/{org}/installations",
|
||||
"GET /orgs/{org}/invitations",
|
||||
"GET /orgs/{org}/invitations/{invitation_id}/teams",
|
||||
"GET /orgs/{org}/issues",
|
||||
"GET /orgs/{org}/members",
|
||||
"GET /orgs/{org}/migrations",
|
||||
"GET /orgs/{org}/migrations/{migration_id}/repositories",
|
||||
"GET /orgs/{org}/outside_collaborators",
|
||||
"GET /orgs/{org}/packages",
|
||||
"GET /orgs/{org}/packages/{package_type}/{package_name}/versions",
|
||||
"GET /orgs/{org}/projects",
|
||||
"GET /orgs/{org}/public_members",
|
||||
"GET /orgs/{org}/repos",
|
||||
"GET /orgs/{org}/secret-scanning/alerts",
|
||||
"GET /orgs/{org}/settings/billing/advanced-security",
|
||||
"GET /orgs/{org}/team-sync/groups",
|
||||
"GET /orgs/{org}/teams",
|
||||
"GET /orgs/{org}/teams/{team_slug}/discussions",
|
||||
"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments",
|
||||
"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions",
|
||||
"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions",
|
||||
"GET /orgs/{org}/teams/{team_slug}/invitations",
|
||||
"GET /orgs/{org}/teams/{team_slug}/members",
|
||||
"GET /orgs/{org}/teams/{team_slug}/projects",
|
||||
"GET /orgs/{org}/teams/{team_slug}/repos",
|
||||
"GET /orgs/{org}/teams/{team_slug}/teams",
|
||||
"GET /projects/columns/{column_id}/cards",
|
||||
"GET /projects/{project_id}/collaborators",
|
||||
"GET /projects/{project_id}/columns",
|
||||
"GET /repos/{owner}/{repo}/actions/artifacts",
|
||||
"GET /repos/{owner}/{repo}/actions/caches",
|
||||
"GET /repos/{owner}/{repo}/actions/runners",
|
||||
"GET /repos/{owner}/{repo}/actions/runs",
|
||||
"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts",
|
||||
"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs",
|
||||
"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs",
|
||||
"GET /repos/{owner}/{repo}/actions/secrets",
|
||||
"GET /repos/{owner}/{repo}/actions/workflows",
|
||||
"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs",
|
||||
"GET /repos/{owner}/{repo}/assignees",
|
||||
"GET /repos/{owner}/{repo}/branches",
|
||||
"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations",
|
||||
"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs",
|
||||
"GET /repos/{owner}/{repo}/code-scanning/alerts",
|
||||
"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances",
|
||||
"GET /repos/{owner}/{repo}/code-scanning/analyses",
|
||||
"GET /repos/{owner}/{repo}/codespaces",
|
||||
"GET /repos/{owner}/{repo}/codespaces/devcontainers",
|
||||
"GET /repos/{owner}/{repo}/codespaces/secrets",
|
||||
"GET /repos/{owner}/{repo}/collaborators",
|
||||
"GET /repos/{owner}/{repo}/comments",
|
||||
"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions",
|
||||
"GET /repos/{owner}/{repo}/commits",
|
||||
"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments",
|
||||
"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls",
|
||||
"GET /repos/{owner}/{repo}/commits/{ref}/check-runs",
|
||||
"GET /repos/{owner}/{repo}/commits/{ref}/check-suites",
|
||||
"GET /repos/{owner}/{repo}/commits/{ref}/status",
|
||||
"GET /repos/{owner}/{repo}/commits/{ref}/statuses",
|
||||
"GET /repos/{owner}/{repo}/contributors",
|
||||
"GET /repos/{owner}/{repo}/dependabot/secrets",
|
||||
"GET /repos/{owner}/{repo}/deployments",
|
||||
"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses",
|
||||
"GET /repos/{owner}/{repo}/environments",
|
||||
"GET /repos/{owner}/{repo}/events",
|
||||
"GET /repos/{owner}/{repo}/forks",
|
||||
"GET /repos/{owner}/{repo}/git/matching-refs/{ref}",
|
||||
"GET /repos/{owner}/{repo}/hooks",
|
||||
"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries",
|
||||
"GET /repos/{owner}/{repo}/invitations",
|
||||
"GET /repos/{owner}/{repo}/issues",
|
||||
"GET /repos/{owner}/{repo}/issues/comments",
|
||||
"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions",
|
||||
"GET /repos/{owner}/{repo}/issues/events",
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/comments",
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/events",
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/labels",
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions",
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline",
|
||||
"GET /repos/{owner}/{repo}/keys",
|
||||
"GET /repos/{owner}/{repo}/labels",
|
||||
"GET /repos/{owner}/{repo}/milestones",
|
||||
"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels",
|
||||
"GET /repos/{owner}/{repo}/notifications",
|
||||
"GET /repos/{owner}/{repo}/pages/builds",
|
||||
"GET /repos/{owner}/{repo}/projects",
|
||||
"GET /repos/{owner}/{repo}/pulls",
|
||||
"GET /repos/{owner}/{repo}/pulls/comments",
|
||||
"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions",
|
||||
"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments",
|
||||
"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits",
|
||||
"GET /repos/{owner}/{repo}/pulls/{pull_number}/files",
|
||||
"GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers",
|
||||
"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews",
|
||||
"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments",
|
||||
"GET /repos/{owner}/{repo}/releases",
|
||||
"GET /repos/{owner}/{repo}/releases/{release_id}/assets",
|
||||
"GET /repos/{owner}/{repo}/releases/{release_id}/reactions",
|
||||
"GET /repos/{owner}/{repo}/secret-scanning/alerts",
|
||||
"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations",
|
||||
"GET /repos/{owner}/{repo}/stargazers",
|
||||
"GET /repos/{owner}/{repo}/subscribers",
|
||||
"GET /repos/{owner}/{repo}/tags",
|
||||
"GET /repos/{owner}/{repo}/teams",
|
||||
"GET /repos/{owner}/{repo}/topics",
|
||||
"GET /repositories",
|
||||
"GET /repositories/{repository_id}/environments/{environment_name}/secrets",
|
||||
"GET /search/code",
|
||||
"GET /search/commits",
|
||||
"GET /search/issues",
|
||||
"GET /search/labels",
|
||||
"GET /search/repositories",
|
||||
"GET /search/topics",
|
||||
"GET /search/users",
|
||||
"GET /teams/{team_id}/discussions",
|
||||
"GET /teams/{team_id}/discussions/{discussion_number}/comments",
|
||||
"GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions",
|
||||
"GET /teams/{team_id}/discussions/{discussion_number}/reactions",
|
||||
"GET /teams/{team_id}/invitations",
|
||||
"GET /teams/{team_id}/members",
|
||||
"GET /teams/{team_id}/projects",
|
||||
"GET /teams/{team_id}/repos",
|
||||
"GET /teams/{team_id}/teams",
|
||||
"GET /user/blocks",
|
||||
"GET /user/codespaces",
|
||||
"GET /user/codespaces/secrets",
|
||||
"GET /user/emails",
|
||||
"GET /user/followers",
|
||||
"GET /user/following",
|
||||
"GET /user/gpg_keys",
|
||||
"GET /user/installations",
|
||||
"GET /user/installations/{installation_id}/repositories",
|
||||
"GET /user/issues",
|
||||
"GET /user/keys",
|
||||
"GET /user/marketplace_purchases",
|
||||
"GET /user/marketplace_purchases/stubbed",
|
||||
"GET /user/memberships/orgs",
|
||||
"GET /user/migrations",
|
||||
"GET /user/migrations/{migration_id}/repositories",
|
||||
"GET /user/orgs",
|
||||
"GET /user/packages",
|
||||
"GET /user/packages/{package_type}/{package_name}/versions",
|
||||
"GET /user/public_emails",
|
||||
"GET /user/repos",
|
||||
"GET /user/repository_invitations",
|
||||
"GET /user/starred",
|
||||
"GET /user/subscriptions",
|
||||
"GET /user/teams",
|
||||
"GET /users",
|
||||
"GET /users/{username}/events",
|
||||
"GET /users/{username}/events/orgs/{org}",
|
||||
"GET /users/{username}/events/public",
|
||||
"GET /users/{username}/followers",
|
||||
"GET /users/{username}/following",
|
||||
"GET /users/{username}/gists",
|
||||
"GET /users/{username}/gpg_keys",
|
||||
"GET /users/{username}/keys",
|
||||
"GET /users/{username}/orgs",
|
||||
"GET /users/{username}/packages",
|
||||
"GET /users/{username}/projects",
|
||||
"GET /users/{username}/received_events",
|
||||
"GET /users/{username}/received_events/public",
|
||||
"GET /users/{username}/repos",
|
||||
"GET /users/{username}/starred",
|
||||
"GET /users/{username}/subscriptions",
|
||||
];
|
17
node_modules/@octokit/plugin-paginate-rest/dist-src/index.js
generated
vendored
Normal file
17
node_modules/@octokit/plugin-paginate-rest/dist-src/index.js
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
import { VERSION } from "./version";
|
||||
import { paginate } from "./paginate";
|
||||
import { iterator } from "./iterator";
|
||||
export { composePaginateRest } from "./compose-paginate";
|
||||
export { isPaginatingEndpoint, paginatingEndpoints, } from "./paginating-endpoints";
|
||||
/**
|
||||
* @param octokit Octokit instance
|
||||
* @param options Options passed to Octokit constructor
|
||||
*/
|
||||
export function paginateRest(octokit) {
|
||||
return {
|
||||
paginate: Object.assign(paginate.bind(null, octokit), {
|
||||
iterator: iterator.bind(null, octokit),
|
||||
}),
|
||||
};
|
||||
}
|
||||
paginateRest.VERSION = VERSION;
|
39
node_modules/@octokit/plugin-paginate-rest/dist-src/iterator.js
generated
vendored
Normal file
39
node_modules/@octokit/plugin-paginate-rest/dist-src/iterator.js
generated
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
import { normalizePaginatedListResponse } from "./normalize-paginated-list-response";
|
||||
export function iterator(octokit, route, parameters) {
|
||||
const options = typeof route === "function"
|
||||
? route.endpoint(parameters)
|
||||
: octokit.request.endpoint(route, parameters);
|
||||
const requestMethod = typeof route === "function" ? route : octokit.request;
|
||||
const method = options.method;
|
||||
const headers = options.headers;
|
||||
let url = options.url;
|
||||
return {
|
||||
[Symbol.asyncIterator]: () => ({
|
||||
async next() {
|
||||
if (!url)
|
||||
return { done: true };
|
||||
try {
|
||||
const response = await requestMethod({ method, url, headers });
|
||||
const normalizedResponse = normalizePaginatedListResponse(response);
|
||||
// `response.headers.link` format:
|
||||
// '<https://api.github.com/users/aseemk/followers?page=2>; rel="next", <https://api.github.com/users/aseemk/followers?page=2>; rel="last"'
|
||||
// sets `url` to undefined if "next" URL is not present or `link` header is not set
|
||||
url = ((normalizedResponse.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1];
|
||||
return { value: normalizedResponse };
|
||||
}
|
||||
catch (error) {
|
||||
if (error.status !== 409)
|
||||
throw error;
|
||||
url = "";
|
||||
return {
|
||||
value: {
|
||||
status: 200,
|
||||
headers: {},
|
||||
data: [],
|
||||
},
|
||||
};
|
||||
}
|
||||
},
|
||||
}),
|
||||
};
|
||||
}
|
47
node_modules/@octokit/plugin-paginate-rest/dist-src/normalize-paginated-list-response.js
generated
vendored
Normal file
47
node_modules/@octokit/plugin-paginate-rest/dist-src/normalize-paginated-list-response.js
generated
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
/**
|
||||
* Some “list” response that can be paginated have a different response structure
|
||||
*
|
||||
* They have a `total_count` key in the response (search also has `incomplete_results`,
|
||||
* /installation/repositories also has `repository_selection`), as well as a key with
|
||||
* the list of the items which name varies from endpoint to endpoint.
|
||||
*
|
||||
* Octokit normalizes these responses so that paginated results are always returned following
|
||||
* the same structure. One challenge is that if the list response has only one page, no Link
|
||||
* header is provided, so this header alone is not sufficient to check wether a response is
|
||||
* paginated or not.
|
||||
*
|
||||
* We check if a "total_count" key is present in the response data, but also make sure that
|
||||
* a "url" property is not, as the "Get the combined status for a specific ref" endpoint would
|
||||
* otherwise match: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref
|
||||
*/
|
||||
export function normalizePaginatedListResponse(response) {
|
||||
// endpoints can respond with 204 if repository is empty
|
||||
if (!response.data) {
|
||||
return {
|
||||
...response,
|
||||
data: [],
|
||||
};
|
||||
}
|
||||
const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data);
|
||||
if (!responseNeedsNormalization)
|
||||
return response;
|
||||
// keep the additional properties intact as there is currently no other way
|
||||
// to retrieve the same information.
|
||||
const incompleteResults = response.data.incomplete_results;
|
||||
const repositorySelection = response.data.repository_selection;
|
||||
const totalCount = response.data.total_count;
|
||||
delete response.data.incomplete_results;
|
||||
delete response.data.repository_selection;
|
||||
delete response.data.total_count;
|
||||
const namespaceKey = Object.keys(response.data)[0];
|
||||
const data = response.data[namespaceKey];
|
||||
response.data = data;
|
||||
if (typeof incompleteResults !== "undefined") {
|
||||
response.data.incomplete_results = incompleteResults;
|
||||
}
|
||||
if (typeof repositorySelection !== "undefined") {
|
||||
response.data.repository_selection = repositorySelection;
|
||||
}
|
||||
response.data.total_count = totalCount;
|
||||
return response;
|
||||
}
|
24
node_modules/@octokit/plugin-paginate-rest/dist-src/paginate.js
generated
vendored
Normal file
24
node_modules/@octokit/plugin-paginate-rest/dist-src/paginate.js
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
import { iterator } from "./iterator";
|
||||
export function paginate(octokit, route, parameters, mapFn) {
|
||||
if (typeof parameters === "function") {
|
||||
mapFn = parameters;
|
||||
parameters = undefined;
|
||||
}
|
||||
return gather(octokit, [], iterator(octokit, route, parameters)[Symbol.asyncIterator](), mapFn);
|
||||
}
|
||||
function gather(octokit, results, iterator, mapFn) {
|
||||
return iterator.next().then((result) => {
|
||||
if (result.done) {
|
||||
return results;
|
||||
}
|
||||
let earlyExit = false;
|
||||
function done() {
|
||||
earlyExit = true;
|
||||
}
|
||||
results = results.concat(mapFn ? mapFn(result.value, done) : result.value.data);
|
||||
if (earlyExit) {
|
||||
return results;
|
||||
}
|
||||
return gather(octokit, results, iterator, mapFn);
|
||||
});
|
||||
}
|
10
node_modules/@octokit/plugin-paginate-rest/dist-src/paginating-endpoints.js
generated
vendored
Normal file
10
node_modules/@octokit/plugin-paginate-rest/dist-src/paginating-endpoints.js
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
import { paginatingEndpoints, } from "./generated/paginating-endpoints";
|
||||
export { paginatingEndpoints } from "./generated/paginating-endpoints";
|
||||
export function isPaginatingEndpoint(arg) {
|
||||
if (typeof arg === "string") {
|
||||
return paginatingEndpoints.includes(arg);
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
1
node_modules/@octokit/plugin-paginate-rest/dist-src/types.js
generated
vendored
Normal file
1
node_modules/@octokit/plugin-paginate-rest/dist-src/types.js
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export {};
|
1
node_modules/@octokit/plugin-paginate-rest/dist-src/version.js
generated
vendored
Normal file
1
node_modules/@octokit/plugin-paginate-rest/dist-src/version.js
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export const VERSION = "2.21.3";
|
2
node_modules/@octokit/plugin-paginate-rest/dist-types/compose-paginate.d.ts
generated
vendored
Normal file
2
node_modules/@octokit/plugin-paginate-rest/dist-types/compose-paginate.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
import { ComposePaginateInterface } from "./types";
|
||||
export declare const composePaginateRest: ComposePaginateInterface;
|
1612
node_modules/@octokit/plugin-paginate-rest/dist-types/generated/paginating-endpoints.d.ts
generated
vendored
Normal file
1612
node_modules/@octokit/plugin-paginate-rest/dist-types/generated/paginating-endpoints.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
16
node_modules/@octokit/plugin-paginate-rest/dist-types/index.d.ts
generated
vendored
Normal file
16
node_modules/@octokit/plugin-paginate-rest/dist-types/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
import { Octokit } from "@octokit/core";
|
||||
import { PaginateInterface } from "./types";
|
||||
export { PaginateInterface } from "./types";
|
||||
export { PaginatingEndpoints } from "./types";
|
||||
export { composePaginateRest } from "./compose-paginate";
|
||||
export { isPaginatingEndpoint, paginatingEndpoints, } from "./paginating-endpoints";
|
||||
/**
|
||||
* @param octokit Octokit instance
|
||||
* @param options Options passed to Octokit constructor
|
||||
*/
|
||||
export declare function paginateRest(octokit: Octokit): {
|
||||
paginate: PaginateInterface;
|
||||
};
|
||||
export declare namespace paginateRest {
|
||||
var VERSION: string;
|
||||
}
|
20
node_modules/@octokit/plugin-paginate-rest/dist-types/iterator.d.ts
generated
vendored
Normal file
20
node_modules/@octokit/plugin-paginate-rest/dist-types/iterator.d.ts
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
import { Octokit } from "@octokit/core";
|
||||
import { RequestInterface, RequestParameters, Route } from "./types";
|
||||
export declare function iterator(octokit: Octokit, route: Route | RequestInterface, parameters?: RequestParameters): {
|
||||
[Symbol.asyncIterator]: () => {
|
||||
next(): Promise<{
|
||||
done: boolean;
|
||||
value?: undefined;
|
||||
} | {
|
||||
value: import("@octokit/types/dist-types/OctokitResponse").OctokitResponse<any, number>;
|
||||
done?: undefined;
|
||||
} | {
|
||||
value: {
|
||||
status: number;
|
||||
headers: {};
|
||||
data: never[];
|
||||
};
|
||||
done?: undefined;
|
||||
}>;
|
||||
};
|
||||
};
|
18
node_modules/@octokit/plugin-paginate-rest/dist-types/normalize-paginated-list-response.d.ts
generated
vendored
Normal file
18
node_modules/@octokit/plugin-paginate-rest/dist-types/normalize-paginated-list-response.d.ts
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Some “list” response that can be paginated have a different response structure
|
||||
*
|
||||
* They have a `total_count` key in the response (search also has `incomplete_results`,
|
||||
* /installation/repositories also has `repository_selection`), as well as a key with
|
||||
* the list of the items which name varies from endpoint to endpoint.
|
||||
*
|
||||
* Octokit normalizes these responses so that paginated results are always returned following
|
||||
* the same structure. One challenge is that if the list response has only one page, no Link
|
||||
* header is provided, so this header alone is not sufficient to check wether a response is
|
||||
* paginated or not.
|
||||
*
|
||||
* We check if a "total_count" key is present in the response data, but also make sure that
|
||||
* a "url" property is not, as the "Get the combined status for a specific ref" endpoint would
|
||||
* otherwise match: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref
|
||||
*/
|
||||
import { OctokitResponse } from "./types";
|
||||
export declare function normalizePaginatedListResponse(response: OctokitResponse<any>): OctokitResponse<any>;
|
3
node_modules/@octokit/plugin-paginate-rest/dist-types/paginate.d.ts
generated
vendored
Normal file
3
node_modules/@octokit/plugin-paginate-rest/dist-types/paginate.d.ts
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
import { Octokit } from "@octokit/core";
|
||||
import { MapFunction, PaginationResults, RequestParameters, Route, RequestInterface } from "./types";
|
||||
export declare function paginate(octokit: Octokit, route: Route | RequestInterface, parameters?: RequestParameters, mapFn?: MapFunction): Promise<PaginationResults<unknown>>;
|
3
node_modules/@octokit/plugin-paginate-rest/dist-types/paginating-endpoints.d.ts
generated
vendored
Normal file
3
node_modules/@octokit/plugin-paginate-rest/dist-types/paginating-endpoints.d.ts
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
import { PaginatingEndpoints } from "./generated/paginating-endpoints";
|
||||
export { paginatingEndpoints } from "./generated/paginating-endpoints";
|
||||
export declare function isPaginatingEndpoint(arg: unknown): arg is keyof PaginatingEndpoints;
|
242
node_modules/@octokit/plugin-paginate-rest/dist-types/types.d.ts
generated
vendored
Normal file
242
node_modules/@octokit/plugin-paginate-rest/dist-types/types.d.ts
generated
vendored
Normal file
@ -0,0 +1,242 @@
|
||||
import { Octokit } from "@octokit/core";
|
||||
import * as OctokitTypes from "@octokit/types";
|
||||
export { EndpointOptions, RequestInterface, OctokitResponse, RequestParameters, Route, } from "@octokit/types";
|
||||
export { PaginatingEndpoints } from "./generated/paginating-endpoints";
|
||||
import { PaginatingEndpoints } from "./generated/paginating-endpoints";
|
||||
declare type KnownKeys<T> = Extract<{
|
||||
[K in keyof T]: string extends K ? never : number extends K ? never : K;
|
||||
} extends {
|
||||
[_ in keyof T]: infer U;
|
||||
} ? U : never, keyof T>;
|
||||
declare type KeysMatching<T, V> = {
|
||||
[K in keyof T]: T[K] extends V ? K : never;
|
||||
}[keyof T];
|
||||
declare type KnownKeysMatching<T, V> = KeysMatching<Pick<T, KnownKeys<T>>, V>;
|
||||
declare type GetResultsType<T> = T extends {
|
||||
data: any[];
|
||||
} ? T["data"] : T extends {
|
||||
data: object;
|
||||
} ? T["data"][KnownKeysMatching<T["data"], any[]>] : never;
|
||||
declare type NormalizeResponse<T> = T & {
|
||||
data: GetResultsType<T>;
|
||||
};
|
||||
declare type DataType<T> = "data" extends keyof T ? T["data"] : unknown;
|
||||
export interface MapFunction<T = OctokitTypes.OctokitResponse<PaginationResults<unknown>>, M = unknown[]> {
|
||||
(response: T, done: () => void): M;
|
||||
}
|
||||
export declare type PaginationResults<T = unknown> = T[];
|
||||
export interface PaginateInterface {
|
||||
/**
|
||||
* Paginate a request using endpoint options and map each response to a custom array
|
||||
*
|
||||
* @param {object} options Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
* @param {function} mapFn Optional method to map each response to a custom array
|
||||
*/
|
||||
<T, M>(options: OctokitTypes.EndpointOptions, mapFn: MapFunction<OctokitTypes.OctokitResponse<PaginationResults<T>>, M[]>): Promise<PaginationResults<M>>;
|
||||
/**
|
||||
* Paginate a request using endpoint options
|
||||
*
|
||||
* @param {object} options Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
<T>(options: OctokitTypes.EndpointOptions): Promise<PaginationResults<T>>;
|
||||
/**
|
||||
* Paginate a request using a known endpoint route string and map each response to a custom array
|
||||
*
|
||||
* @param {string} route Request method + URL. Example: `'GET /orgs/{org}'`
|
||||
* @param {function} mapFn Optional method to map each response to a custom array
|
||||
*/
|
||||
<R extends keyof PaginatingEndpoints, M extends unknown[]>(route: R, mapFn: MapFunction<PaginatingEndpoints[R]["response"], M>): Promise<M>;
|
||||
/**
|
||||
* Paginate a request using a known endpoint route string and parameters, and map each response to a custom array
|
||||
*
|
||||
* @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`.
|
||||
* @param {function} mapFn Optional method to map each response to a custom array
|
||||
*/
|
||||
<R extends keyof PaginatingEndpoints, M extends unknown[]>(route: R, parameters: PaginatingEndpoints[R]["parameters"], mapFn: MapFunction<PaginatingEndpoints[R]["response"], M>): Promise<M>;
|
||||
/**
|
||||
* Paginate a request using an known endpoint route string
|
||||
*
|
||||
* @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 keyof PaginatingEndpoints>(route: R, parameters?: PaginatingEndpoints[R]["parameters"]): Promise<DataType<PaginatingEndpoints[R]["response"]>>;
|
||||
/**
|
||||
* Paginate a request using an unknown endpoint route string
|
||||
*
|
||||
* @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, R extends OctokitTypes.Route = OctokitTypes.Route>(route: R, parameters?: R extends keyof PaginatingEndpoints ? PaginatingEndpoints[R]["parameters"] : OctokitTypes.RequestParameters): Promise<T[]>;
|
||||
/**
|
||||
* Paginate a request using an endpoint method and a map function
|
||||
*
|
||||
* @param {string} request Request method (`octokit.request` or `@octokit/request`)
|
||||
* @param {function} mapFn? Optional method to map each response to a custom array
|
||||
*/
|
||||
<R extends OctokitTypes.RequestInterface, M extends unknown[]>(request: R, mapFn: MapFunction<NormalizeResponse<OctokitTypes.GetResponseTypeFromEndpointMethod<R>>, M>): Promise<M>;
|
||||
/**
|
||||
* Paginate a request using an endpoint method, parameters, and a map function
|
||||
*
|
||||
* @param {string} request Request method (`octokit.request` or `@octokit/request`)
|
||||
* @param {object} parameters URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
* @param {function} mapFn? Optional method to map each response to a custom array
|
||||
*/
|
||||
<R extends OctokitTypes.RequestInterface, M extends unknown[]>(request: R, parameters: Parameters<R>[0], mapFn: MapFunction<NormalizeResponse<OctokitTypes.GetResponseTypeFromEndpointMethod<R>>, M>): Promise<M>;
|
||||
/**
|
||||
* Paginate a request using an endpoint method and parameters
|
||||
*
|
||||
* @param {string} request Request method (`octokit.request` or `@octokit/request`)
|
||||
* @param {object} parameters? URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
<R extends OctokitTypes.RequestInterface>(request: R, parameters?: Parameters<R>[0]): Promise<NormalizeResponse<OctokitTypes.GetResponseTypeFromEndpointMethod<R>>["data"]>;
|
||||
iterator: {
|
||||
/**
|
||||
* Get an async iterator to paginate a request using endpoint options
|
||||
*
|
||||
* @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of
|
||||
* @param {object} options Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
<T>(options: OctokitTypes.EndpointOptions): AsyncIterableIterator<OctokitTypes.OctokitResponse<PaginationResults<T>>>;
|
||||
/**
|
||||
* Get an async iterator to paginate a request using a known endpoint route string and optional parameters
|
||||
*
|
||||
* @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of
|
||||
* @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 keyof PaginatingEndpoints>(route: R, parameters?: PaginatingEndpoints[R]["parameters"]): AsyncIterableIterator<OctokitTypes.OctokitResponse<DataType<PaginatingEndpoints[R]["response"]>>>;
|
||||
/**
|
||||
* Get an async iterator to paginate a request using an unknown endpoint route string and optional parameters
|
||||
*
|
||||
* @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of
|
||||
* @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, R extends OctokitTypes.Route = OctokitTypes.Route>(route: R, parameters?: R extends keyof PaginatingEndpoints ? PaginatingEndpoints[R]["parameters"] : OctokitTypes.RequestParameters): AsyncIterableIterator<OctokitTypes.OctokitResponse<PaginationResults<T>>>;
|
||||
/**
|
||||
* Get an async iterator to paginate a request using a request method and optional parameters
|
||||
*
|
||||
* @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of
|
||||
* @param {string} request `@octokit/request` or `octokit.request` method
|
||||
* @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
<R extends OctokitTypes.RequestInterface>(request: R, parameters?: Parameters<R>[0]): AsyncIterableIterator<NormalizeResponse<OctokitTypes.GetResponseTypeFromEndpointMethod<R>>>;
|
||||
};
|
||||
}
|
||||
export interface ComposePaginateInterface {
|
||||
/**
|
||||
* Paginate a request using endpoint options and map each response to a custom array
|
||||
*
|
||||
* @param {object} octokit Octokit instance
|
||||
* @param {object} options Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
* @param {function} mapFn Optional method to map each response to a custom array
|
||||
*/
|
||||
<T, M>(octokit: Octokit, options: OctokitTypes.EndpointOptions, mapFn: MapFunction<OctokitTypes.OctokitResponse<PaginationResults<T>>, M[]>): Promise<PaginationResults<M>>;
|
||||
/**
|
||||
* Paginate a request using endpoint options
|
||||
*
|
||||
* @param {object} octokit Octokit instance
|
||||
* @param {object} options Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
<T>(octokit: Octokit, options: OctokitTypes.EndpointOptions): Promise<PaginationResults<T>>;
|
||||
/**
|
||||
* Paginate a request using a known endpoint route string and map each response to a custom array
|
||||
*
|
||||
* @param {object} octokit Octokit instance
|
||||
* @param {string} route Request method + URL. Example: `'GET /orgs/{org}'`
|
||||
* @param {function} mapFn Optional method to map each response to a custom array
|
||||
*/
|
||||
<R extends keyof PaginatingEndpoints, M extends unknown[]>(octokit: Octokit, route: R, mapFn: MapFunction<PaginatingEndpoints[R]["response"], M>): Promise<M>;
|
||||
/**
|
||||
* Paginate a request using a known endpoint route string and parameters, and map each response to a custom array
|
||||
*
|
||||
* @param {object} octokit Octokit 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`.
|
||||
* @param {function} mapFn Optional method to map each response to a custom array
|
||||
*/
|
||||
<R extends keyof PaginatingEndpoints, M extends unknown[]>(octokit: Octokit, route: R, parameters: PaginatingEndpoints[R]["parameters"], mapFn: MapFunction<PaginatingEndpoints[R]["response"], M>): Promise<M>;
|
||||
/**
|
||||
* Paginate a request using an known endpoint route string
|
||||
*
|
||||
* @param {object} octokit Octokit 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`.
|
||||
*/
|
||||
<R extends keyof PaginatingEndpoints>(octokit: Octokit, route: R, parameters?: PaginatingEndpoints[R]["parameters"]): Promise<DataType<PaginatingEndpoints[R]["response"]>>;
|
||||
/**
|
||||
* Paginate a request using an unknown endpoint route string
|
||||
*
|
||||
* @param {object} octokit Octokit 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, R extends OctokitTypes.Route = OctokitTypes.Route>(octokit: Octokit, route: R, parameters?: R extends keyof PaginatingEndpoints ? PaginatingEndpoints[R]["parameters"] : OctokitTypes.RequestParameters): Promise<T[]>;
|
||||
/**
|
||||
* Paginate a request using an endpoint method and a map function
|
||||
*
|
||||
* @param {object} octokit Octokit instance
|
||||
* @param {string} request Request method (`octokit.request` or `@octokit/request`)
|
||||
* @param {function} mapFn? Optional method to map each response to a custom array
|
||||
*/
|
||||
<R extends OctokitTypes.RequestInterface, M extends unknown[]>(octokit: Octokit, request: R, mapFn: MapFunction<NormalizeResponse<OctokitTypes.GetResponseTypeFromEndpointMethod<R>>, M>): Promise<M>;
|
||||
/**
|
||||
* Paginate a request using an endpoint method, parameters, and a map function
|
||||
*
|
||||
* @param {object} octokit Octokit instance
|
||||
* @param {string} request Request method (`octokit.request` or `@octokit/request`)
|
||||
* @param {object} parameters URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
* @param {function} mapFn? Optional method to map each response to a custom array
|
||||
*/
|
||||
<R extends OctokitTypes.RequestInterface, M extends unknown[]>(octokit: Octokit, request: R, parameters: Parameters<R>[0], mapFn: MapFunction<NormalizeResponse<OctokitTypes.GetResponseTypeFromEndpointMethod<R>>, M>): Promise<M>;
|
||||
/**
|
||||
* Paginate a request using an endpoint method and parameters
|
||||
*
|
||||
* @param {object} octokit Octokit instance
|
||||
* @param {string} request Request method (`octokit.request` or `@octokit/request`)
|
||||
* @param {object} parameters? URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
<R extends OctokitTypes.RequestInterface>(octokit: Octokit, request: R, parameters?: Parameters<R>[0]): Promise<NormalizeResponse<OctokitTypes.GetResponseTypeFromEndpointMethod<R>>["data"]>;
|
||||
iterator: {
|
||||
/**
|
||||
* Get an async iterator to paginate a request using endpoint options
|
||||
*
|
||||
* @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of
|
||||
*
|
||||
* @param {object} octokit Octokit instance
|
||||
* @param {object} options Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
<T>(octokit: Octokit, options: OctokitTypes.EndpointOptions): AsyncIterableIterator<OctokitTypes.OctokitResponse<PaginationResults<T>>>;
|
||||
/**
|
||||
* Get an async iterator to paginate a request using a known endpoint route string and optional parameters
|
||||
*
|
||||
* @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of
|
||||
*
|
||||
* @param {object} octokit Octokit 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`.
|
||||
*/
|
||||
<R extends keyof PaginatingEndpoints>(octokit: Octokit, route: R, parameters?: PaginatingEndpoints[R]["parameters"]): AsyncIterableIterator<OctokitTypes.OctokitResponse<DataType<PaginatingEndpoints[R]["response"]>>>;
|
||||
/**
|
||||
* Get an async iterator to paginate a request using an unknown endpoint route string and optional parameters
|
||||
*
|
||||
* @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of
|
||||
*
|
||||
* @param {object} octokit Octokit 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, R extends OctokitTypes.Route = OctokitTypes.Route>(octokit: Octokit, route: R, parameters?: R extends keyof PaginatingEndpoints ? PaginatingEndpoints[R]["parameters"] : OctokitTypes.RequestParameters): AsyncIterableIterator<OctokitTypes.OctokitResponse<PaginationResults<T>>>;
|
||||
/**
|
||||
* Get an async iterator to paginate a request using a request method and optional parameters
|
||||
*
|
||||
* @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of
|
||||
*
|
||||
* @param {object} octokit Octokit instance
|
||||
* @param {string} request `@octokit/request` or `octokit.request` method
|
||||
* @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
<R extends OctokitTypes.RequestInterface>(octokit: Octokit, request: R, parameters?: Parameters<R>[0]): AsyncIterableIterator<NormalizeResponse<OctokitTypes.GetResponseTypeFromEndpointMethod<R>>>;
|
||||
};
|
||||
}
|
1
node_modules/@octokit/plugin-paginate-rest/dist-types/version.d.ts
generated
vendored
Normal file
1
node_modules/@octokit/plugin-paginate-rest/dist-types/version.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export declare const VERSION = "2.21.3";
|
358
node_modules/@octokit/plugin-paginate-rest/dist-web/index.js
generated
vendored
Normal file
358
node_modules/@octokit/plugin-paginate-rest/dist-web/index.js
generated
vendored
Normal file
@ -0,0 +1,358 @@
|
||||
const VERSION = "2.21.3";
|
||||
|
||||
/**
|
||||
* Some “list” response that can be paginated have a different response structure
|
||||
*
|
||||
* They have a `total_count` key in the response (search also has `incomplete_results`,
|
||||
* /installation/repositories also has `repository_selection`), as well as a key with
|
||||
* the list of the items which name varies from endpoint to endpoint.
|
||||
*
|
||||
* Octokit normalizes these responses so that paginated results are always returned following
|
||||
* the same structure. One challenge is that if the list response has only one page, no Link
|
||||
* header is provided, so this header alone is not sufficient to check wether a response is
|
||||
* paginated or not.
|
||||
*
|
||||
* We check if a "total_count" key is present in the response data, but also make sure that
|
||||
* a "url" property is not, as the "Get the combined status for a specific ref" endpoint would
|
||||
* otherwise match: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref
|
||||
*/
|
||||
function normalizePaginatedListResponse(response) {
|
||||
// endpoints can respond with 204 if repository is empty
|
||||
if (!response.data) {
|
||||
return {
|
||||
...response,
|
||||
data: [],
|
||||
};
|
||||
}
|
||||
const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data);
|
||||
if (!responseNeedsNormalization)
|
||||
return response;
|
||||
// keep the additional properties intact as there is currently no other way
|
||||
// to retrieve the same information.
|
||||
const incompleteResults = response.data.incomplete_results;
|
||||
const repositorySelection = response.data.repository_selection;
|
||||
const totalCount = response.data.total_count;
|
||||
delete response.data.incomplete_results;
|
||||
delete response.data.repository_selection;
|
||||
delete response.data.total_count;
|
||||
const namespaceKey = Object.keys(response.data)[0];
|
||||
const data = response.data[namespaceKey];
|
||||
response.data = data;
|
||||
if (typeof incompleteResults !== "undefined") {
|
||||
response.data.incomplete_results = incompleteResults;
|
||||
}
|
||||
if (typeof repositorySelection !== "undefined") {
|
||||
response.data.repository_selection = repositorySelection;
|
||||
}
|
||||
response.data.total_count = totalCount;
|
||||
return response;
|
||||
}
|
||||
|
||||
function iterator(octokit, route, parameters) {
|
||||
const options = typeof route === "function"
|
||||
? route.endpoint(parameters)
|
||||
: octokit.request.endpoint(route, parameters);
|
||||
const requestMethod = typeof route === "function" ? route : octokit.request;
|
||||
const method = options.method;
|
||||
const headers = options.headers;
|
||||
let url = options.url;
|
||||
return {
|
||||
[Symbol.asyncIterator]: () => ({
|
||||
async next() {
|
||||
if (!url)
|
||||
return { done: true };
|
||||
try {
|
||||
const response = await requestMethod({ method, url, headers });
|
||||
const normalizedResponse = normalizePaginatedListResponse(response);
|
||||
// `response.headers.link` format:
|
||||
// '<https://api.github.com/users/aseemk/followers?page=2>; rel="next", <https://api.github.com/users/aseemk/followers?page=2>; rel="last"'
|
||||
// sets `url` to undefined if "next" URL is not present or `link` header is not set
|
||||
url = ((normalizedResponse.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1];
|
||||
return { value: normalizedResponse };
|
||||
}
|
||||
catch (error) {
|
||||
if (error.status !== 409)
|
||||
throw error;
|
||||
url = "";
|
||||
return {
|
||||
value: {
|
||||
status: 200,
|
||||
headers: {},
|
||||
data: [],
|
||||
},
|
||||
};
|
||||
}
|
||||
},
|
||||
}),
|
||||
};
|
||||
}
|
||||
|
||||
function paginate(octokit, route, parameters, mapFn) {
|
||||
if (typeof parameters === "function") {
|
||||
mapFn = parameters;
|
||||
parameters = undefined;
|
||||
}
|
||||
return gather(octokit, [], iterator(octokit, route, parameters)[Symbol.asyncIterator](), mapFn);
|
||||
}
|
||||
function gather(octokit, results, iterator, mapFn) {
|
||||
return iterator.next().then((result) => {
|
||||
if (result.done) {
|
||||
return results;
|
||||
}
|
||||
let earlyExit = false;
|
||||
function done() {
|
||||
earlyExit = true;
|
||||
}
|
||||
results = results.concat(mapFn ? mapFn(result.value, done) : result.value.data);
|
||||
if (earlyExit) {
|
||||
return results;
|
||||
}
|
||||
return gather(octokit, results, iterator, mapFn);
|
||||
});
|
||||
}
|
||||
|
||||
const composePaginateRest = Object.assign(paginate, {
|
||||
iterator,
|
||||
});
|
||||
|
||||
const paginatingEndpoints = [
|
||||
"GET /app/hook/deliveries",
|
||||
"GET /app/installations",
|
||||
"GET /applications/grants",
|
||||
"GET /authorizations",
|
||||
"GET /enterprises/{enterprise}/actions/permissions/organizations",
|
||||
"GET /enterprises/{enterprise}/actions/runner-groups",
|
||||
"GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations",
|
||||
"GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners",
|
||||
"GET /enterprises/{enterprise}/actions/runners",
|
||||
"GET /enterprises/{enterprise}/audit-log",
|
||||
"GET /enterprises/{enterprise}/secret-scanning/alerts",
|
||||
"GET /enterprises/{enterprise}/settings/billing/advanced-security",
|
||||
"GET /events",
|
||||
"GET /gists",
|
||||
"GET /gists/public",
|
||||
"GET /gists/starred",
|
||||
"GET /gists/{gist_id}/comments",
|
||||
"GET /gists/{gist_id}/commits",
|
||||
"GET /gists/{gist_id}/forks",
|
||||
"GET /installation/repositories",
|
||||
"GET /issues",
|
||||
"GET /licenses",
|
||||
"GET /marketplace_listing/plans",
|
||||
"GET /marketplace_listing/plans/{plan_id}/accounts",
|
||||
"GET /marketplace_listing/stubbed/plans",
|
||||
"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts",
|
||||
"GET /networks/{owner}/{repo}/events",
|
||||
"GET /notifications",
|
||||
"GET /organizations",
|
||||
"GET /orgs/{org}/actions/cache/usage-by-repository",
|
||||
"GET /orgs/{org}/actions/permissions/repositories",
|
||||
"GET /orgs/{org}/actions/runner-groups",
|
||||
"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories",
|
||||
"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners",
|
||||
"GET /orgs/{org}/actions/runners",
|
||||
"GET /orgs/{org}/actions/secrets",
|
||||
"GET /orgs/{org}/actions/secrets/{secret_name}/repositories",
|
||||
"GET /orgs/{org}/audit-log",
|
||||
"GET /orgs/{org}/blocks",
|
||||
"GET /orgs/{org}/code-scanning/alerts",
|
||||
"GET /orgs/{org}/codespaces",
|
||||
"GET /orgs/{org}/credential-authorizations",
|
||||
"GET /orgs/{org}/dependabot/secrets",
|
||||
"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories",
|
||||
"GET /orgs/{org}/events",
|
||||
"GET /orgs/{org}/external-groups",
|
||||
"GET /orgs/{org}/failed_invitations",
|
||||
"GET /orgs/{org}/hooks",
|
||||
"GET /orgs/{org}/hooks/{hook_id}/deliveries",
|
||||
"GET /orgs/{org}/installations",
|
||||
"GET /orgs/{org}/invitations",
|
||||
"GET /orgs/{org}/invitations/{invitation_id}/teams",
|
||||
"GET /orgs/{org}/issues",
|
||||
"GET /orgs/{org}/members",
|
||||
"GET /orgs/{org}/migrations",
|
||||
"GET /orgs/{org}/migrations/{migration_id}/repositories",
|
||||
"GET /orgs/{org}/outside_collaborators",
|
||||
"GET /orgs/{org}/packages",
|
||||
"GET /orgs/{org}/packages/{package_type}/{package_name}/versions",
|
||||
"GET /orgs/{org}/projects",
|
||||
"GET /orgs/{org}/public_members",
|
||||
"GET /orgs/{org}/repos",
|
||||
"GET /orgs/{org}/secret-scanning/alerts",
|
||||
"GET /orgs/{org}/settings/billing/advanced-security",
|
||||
"GET /orgs/{org}/team-sync/groups",
|
||||
"GET /orgs/{org}/teams",
|
||||
"GET /orgs/{org}/teams/{team_slug}/discussions",
|
||||
"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments",
|
||||
"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions",
|
||||
"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions",
|
||||
"GET /orgs/{org}/teams/{team_slug}/invitations",
|
||||
"GET /orgs/{org}/teams/{team_slug}/members",
|
||||
"GET /orgs/{org}/teams/{team_slug}/projects",
|
||||
"GET /orgs/{org}/teams/{team_slug}/repos",
|
||||
"GET /orgs/{org}/teams/{team_slug}/teams",
|
||||
"GET /projects/columns/{column_id}/cards",
|
||||
"GET /projects/{project_id}/collaborators",
|
||||
"GET /projects/{project_id}/columns",
|
||||
"GET /repos/{owner}/{repo}/actions/artifacts",
|
||||
"GET /repos/{owner}/{repo}/actions/caches",
|
||||
"GET /repos/{owner}/{repo}/actions/runners",
|
||||
"GET /repos/{owner}/{repo}/actions/runs",
|
||||
"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts",
|
||||
"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs",
|
||||
"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs",
|
||||
"GET /repos/{owner}/{repo}/actions/secrets",
|
||||
"GET /repos/{owner}/{repo}/actions/workflows",
|
||||
"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs",
|
||||
"GET /repos/{owner}/{repo}/assignees",
|
||||
"GET /repos/{owner}/{repo}/branches",
|
||||
"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations",
|
||||
"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs",
|
||||
"GET /repos/{owner}/{repo}/code-scanning/alerts",
|
||||
"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances",
|
||||
"GET /repos/{owner}/{repo}/code-scanning/analyses",
|
||||
"GET /repos/{owner}/{repo}/codespaces",
|
||||
"GET /repos/{owner}/{repo}/codespaces/devcontainers",
|
||||
"GET /repos/{owner}/{repo}/codespaces/secrets",
|
||||
"GET /repos/{owner}/{repo}/collaborators",
|
||||
"GET /repos/{owner}/{repo}/comments",
|
||||
"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions",
|
||||
"GET /repos/{owner}/{repo}/commits",
|
||||
"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments",
|
||||
"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls",
|
||||
"GET /repos/{owner}/{repo}/commits/{ref}/check-runs",
|
||||
"GET /repos/{owner}/{repo}/commits/{ref}/check-suites",
|
||||
"GET /repos/{owner}/{repo}/commits/{ref}/status",
|
||||
"GET /repos/{owner}/{repo}/commits/{ref}/statuses",
|
||||
"GET /repos/{owner}/{repo}/contributors",
|
||||
"GET /repos/{owner}/{repo}/dependabot/secrets",
|
||||
"GET /repos/{owner}/{repo}/deployments",
|
||||
"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses",
|
||||
"GET /repos/{owner}/{repo}/environments",
|
||||
"GET /repos/{owner}/{repo}/events",
|
||||
"GET /repos/{owner}/{repo}/forks",
|
||||
"GET /repos/{owner}/{repo}/git/matching-refs/{ref}",
|
||||
"GET /repos/{owner}/{repo}/hooks",
|
||||
"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries",
|
||||
"GET /repos/{owner}/{repo}/invitations",
|
||||
"GET /repos/{owner}/{repo}/issues",
|
||||
"GET /repos/{owner}/{repo}/issues/comments",
|
||||
"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions",
|
||||
"GET /repos/{owner}/{repo}/issues/events",
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/comments",
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/events",
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/labels",
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions",
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline",
|
||||
"GET /repos/{owner}/{repo}/keys",
|
||||
"GET /repos/{owner}/{repo}/labels",
|
||||
"GET /repos/{owner}/{repo}/milestones",
|
||||
"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels",
|
||||
"GET /repos/{owner}/{repo}/notifications",
|
||||
"GET /repos/{owner}/{repo}/pages/builds",
|
||||
"GET /repos/{owner}/{repo}/projects",
|
||||
"GET /repos/{owner}/{repo}/pulls",
|
||||
"GET /repos/{owner}/{repo}/pulls/comments",
|
||||
"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions",
|
||||
"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments",
|
||||
"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits",
|
||||
"GET /repos/{owner}/{repo}/pulls/{pull_number}/files",
|
||||
"GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers",
|
||||
"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews",
|
||||
"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments",
|
||||
"GET /repos/{owner}/{repo}/releases",
|
||||
"GET /repos/{owner}/{repo}/releases/{release_id}/assets",
|
||||
"GET /repos/{owner}/{repo}/releases/{release_id}/reactions",
|
||||
"GET /repos/{owner}/{repo}/secret-scanning/alerts",
|
||||
"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations",
|
||||
"GET /repos/{owner}/{repo}/stargazers",
|
||||
"GET /repos/{owner}/{repo}/subscribers",
|
||||
"GET /repos/{owner}/{repo}/tags",
|
||||
"GET /repos/{owner}/{repo}/teams",
|
||||
"GET /repos/{owner}/{repo}/topics",
|
||||
"GET /repositories",
|
||||
"GET /repositories/{repository_id}/environments/{environment_name}/secrets",
|
||||
"GET /search/code",
|
||||
"GET /search/commits",
|
||||
"GET /search/issues",
|
||||
"GET /search/labels",
|
||||
"GET /search/repositories",
|
||||
"GET /search/topics",
|
||||
"GET /search/users",
|
||||
"GET /teams/{team_id}/discussions",
|
||||
"GET /teams/{team_id}/discussions/{discussion_number}/comments",
|
||||
"GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions",
|
||||
"GET /teams/{team_id}/discussions/{discussion_number}/reactions",
|
||||
"GET /teams/{team_id}/invitations",
|
||||
"GET /teams/{team_id}/members",
|
||||
"GET /teams/{team_id}/projects",
|
||||
"GET /teams/{team_id}/repos",
|
||||
"GET /teams/{team_id}/teams",
|
||||
"GET /user/blocks",
|
||||
"GET /user/codespaces",
|
||||
"GET /user/codespaces/secrets",
|
||||
"GET /user/emails",
|
||||
"GET /user/followers",
|
||||
"GET /user/following",
|
||||
"GET /user/gpg_keys",
|
||||
"GET /user/installations",
|
||||
"GET /user/installations/{installation_id}/repositories",
|
||||
"GET /user/issues",
|
||||
"GET /user/keys",
|
||||
"GET /user/marketplace_purchases",
|
||||
"GET /user/marketplace_purchases/stubbed",
|
||||
"GET /user/memberships/orgs",
|
||||
"GET /user/migrations",
|
||||
"GET /user/migrations/{migration_id}/repositories",
|
||||
"GET /user/orgs",
|
||||
"GET /user/packages",
|
||||
"GET /user/packages/{package_type}/{package_name}/versions",
|
||||
"GET /user/public_emails",
|
||||
"GET /user/repos",
|
||||
"GET /user/repository_invitations",
|
||||
"GET /user/starred",
|
||||
"GET /user/subscriptions",
|
||||
"GET /user/teams",
|
||||
"GET /users",
|
||||
"GET /users/{username}/events",
|
||||
"GET /users/{username}/events/orgs/{org}",
|
||||
"GET /users/{username}/events/public",
|
||||
"GET /users/{username}/followers",
|
||||
"GET /users/{username}/following",
|
||||
"GET /users/{username}/gists",
|
||||
"GET /users/{username}/gpg_keys",
|
||||
"GET /users/{username}/keys",
|
||||
"GET /users/{username}/orgs",
|
||||
"GET /users/{username}/packages",
|
||||
"GET /users/{username}/projects",
|
||||
"GET /users/{username}/received_events",
|
||||
"GET /users/{username}/received_events/public",
|
||||
"GET /users/{username}/repos",
|
||||
"GET /users/{username}/starred",
|
||||
"GET /users/{username}/subscriptions",
|
||||
];
|
||||
|
||||
function isPaginatingEndpoint(arg) {
|
||||
if (typeof arg === "string") {
|
||||
return paginatingEndpoints.includes(arg);
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param octokit Octokit instance
|
||||
* @param options Options passed to Octokit constructor
|
||||
*/
|
||||
function paginateRest(octokit) {
|
||||
return {
|
||||
paginate: Object.assign(paginate.bind(null, octokit), {
|
||||
iterator: iterator.bind(null, octokit),
|
||||
}),
|
||||
};
|
||||
}
|
||||
paginateRest.VERSION = VERSION;
|
||||
|
||||
export { composePaginateRest, isPaginatingEndpoint, paginateRest, paginatingEndpoints };
|
||||
//# sourceMappingURL=index.js.map
|
1
node_modules/@octokit/plugin-paginate-rest/dist-web/index.js.map
generated
vendored
Normal file
1
node_modules/@octokit/plugin-paginate-rest/dist-web/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
51
node_modules/@octokit/plugin-paginate-rest/package.json
generated
vendored
Normal file
51
node_modules/@octokit/plugin-paginate-rest/package.json
generated
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
{
|
||||
"name": "@octokit/plugin-paginate-rest",
|
||||
"description": "Octokit plugin to paginate REST API endpoint responses",
|
||||
"version": "2.21.3",
|
||||
"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,
|
||||
"keywords": [
|
||||
"github",
|
||||
"api",
|
||||
"sdk",
|
||||
"toolkit"
|
||||
],
|
||||
"repository": "github:octokit/plugin-paginate-rest.js",
|
||||
"dependencies": {
|
||||
"@octokit/types": "^6.40.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@octokit/core": ">=2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@octokit/core": "^4.0.0",
|
||||
"@octokit/plugin-rest-endpoint-methods": "^6.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",
|
||||
"@types/fetch-mock": "^7.3.1",
|
||||
"@types/jest": "^28.0.0",
|
||||
"@types/node": "^16.0.0",
|
||||
"fetch-mock": "^9.0.0",
|
||||
"github-openapi-graphql-query": "^2.0.0",
|
||||
"jest": "^28.0.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"prettier": "2.7.1",
|
||||
"semantic-release-plugin-update-version-in-files": "^1.0.0",
|
||||
"ts-jest": "^28.0.0",
|
||||
"typescript": "^4.0.2"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user