initial commit of actions
This commit is contained in:
commit
949ece5785
44660 changed files with 12034344 additions and 0 deletions
21
github/codeql-action-v2/node_modules/@octokit/graphql/LICENSE
generated
vendored
Normal file
21
github/codeql-action-v2/node_modules/@octokit/graphql/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
The MIT License
|
||||
|
||||
Copyright (c) 2018 Octokit contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
409
github/codeql-action-v2/node_modules/@octokit/graphql/README.md
generated
vendored
Normal file
409
github/codeql-action-v2/node_modules/@octokit/graphql/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,409 @@
|
|||
# graphql.js
|
||||
|
||||
> GitHub GraphQL API client for browsers and Node
|
||||
|
||||
[](https://www.npmjs.com/package/@octokit/graphql)
|
||||
[](https://github.com/octokit/graphql.js/actions?query=workflow%3ATest+branch%3Amaster)
|
||||
|
||||
<!-- toc -->
|
||||
|
||||
- [Usage](#usage)
|
||||
- [Send a simple query](#send-a-simple-query)
|
||||
- [Authentication](#authentication)
|
||||
- [Variables](#variables)
|
||||
- [Pass query together with headers and variables](#pass-query-together-with-headers-and-variables)
|
||||
- [Use with GitHub Enterprise](#use-with-github-enterprise)
|
||||
- [Use custom `@octokit/request` instance](#use-custom-octokitrequest-instance)
|
||||
- [TypeScript](#typescript)
|
||||
- [Additional Types](#additional-types)
|
||||
- [Errors](#errors)
|
||||
- [Partial responses](#partial-responses)
|
||||
- [Writing tests](#writing-tests)
|
||||
- [License](#license)
|
||||
|
||||
<!-- tocstop -->
|
||||
|
||||
## Usage
|
||||
|
||||
<table>
|
||||
<tbody valign=top align=left>
|
||||
<tr><th>
|
||||
Browsers
|
||||
</th><td width=100%>
|
||||
|
||||
Load `@octokit/graphql` directly from [cdn.skypack.dev](https://cdn.skypack.dev)
|
||||
|
||||
```html
|
||||
<script type="module">
|
||||
import { graphql } from "https://cdn.skypack.dev/@octokit/graphql";
|
||||
</script>
|
||||
```
|
||||
|
||||
</td></tr>
|
||||
<tr><th>
|
||||
Node
|
||||
</th><td>
|
||||
|
||||
Install with <code>npm install @octokit/graphql</code>
|
||||
|
||||
```js
|
||||
const { graphql } = require("@octokit/graphql");
|
||||
// or: import { graphql } from "@octokit/graphql";
|
||||
```
|
||||
|
||||
</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
### Send a simple query
|
||||
|
||||
```js
|
||||
const { repository } = await graphql(
|
||||
`
|
||||
{
|
||||
repository(owner: "octokit", name: "graphql.js") {
|
||||
issues(last: 3) {
|
||||
edges {
|
||||
node {
|
||||
title
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`,
|
||||
{
|
||||
headers: {
|
||||
authorization: `token secret123`,
|
||||
},
|
||||
}
|
||||
);
|
||||
```
|
||||
|
||||
### Authentication
|
||||
|
||||
The simplest way to authenticate a request is to set the `Authorization` header, e.g. to a [personal access token](https://github.com/settings/tokens/).
|
||||
|
||||
```js
|
||||
const graphqlWithAuth = graphql.defaults({
|
||||
headers: {
|
||||
authorization: `token secret123`,
|
||||
},
|
||||
});
|
||||
const { repository } = await graphqlWithAuth(`
|
||||
{
|
||||
repository(owner: "octokit", name: "graphql.js") {
|
||||
issues(last: 3) {
|
||||
edges {
|
||||
node {
|
||||
title
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`);
|
||||
```
|
||||
|
||||
For more complex authentication strategies such as GitHub Apps or Basic, we recommend the according authentication library exported by [`@octokit/auth`](https://github.com/octokit/auth.js).
|
||||
|
||||
```js
|
||||
const { createAppAuth } = require("@octokit/auth-app");
|
||||
const auth = createAppAuth({
|
||||
id: process.env.APP_ID,
|
||||
privateKey: process.env.PRIVATE_KEY,
|
||||
installationId: 123,
|
||||
});
|
||||
const graphqlWithAuth = graphql.defaults({
|
||||
request: {
|
||||
hook: auth.hook,
|
||||
},
|
||||
});
|
||||
|
||||
const { repository } = await graphqlWithAuth(
|
||||
`{
|
||||
repository(owner: "octokit", name: "graphql.js") {
|
||||
issues(last: 3) {
|
||||
edges {
|
||||
node {
|
||||
title
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}`
|
||||
);
|
||||
```
|
||||
|
||||
### Variables
|
||||
|
||||
⚠️ Do not use [template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) in the query strings as they make your code vulnerable to query injection attacks (see [#2](https://github.com/octokit/graphql.js/issues/2)). Use variables instead:
|
||||
|
||||
```js
|
||||
const { lastIssues } = await graphql(
|
||||
`
|
||||
query lastIssues($owner: String!, $repo: String!, $num: Int = 3) {
|
||||
repository(owner: $owner, name: $repo) {
|
||||
issues(last: $num) {
|
||||
edges {
|
||||
node {
|
||||
title
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`,
|
||||
{
|
||||
owner: "octokit",
|
||||
repo: "graphql.js",
|
||||
headers: {
|
||||
authorization: `token secret123`,
|
||||
},
|
||||
}
|
||||
);
|
||||
```
|
||||
|
||||
### Pass query together with headers and variables
|
||||
|
||||
```js
|
||||
const { graphql } = require("@octokit/graphql");
|
||||
const { lastIssues } = await graphql({
|
||||
query: `query lastIssues($owner: String!, $repo: String!, $num: Int = 3) {
|
||||
repository(owner:$owner, name:$repo) {
|
||||
issues(last:$num) {
|
||||
edges {
|
||||
node {
|
||||
title
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}`,
|
||||
owner: "octokit",
|
||||
repo: "graphql.js",
|
||||
headers: {
|
||||
authorization: `token secret123`,
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
### Use with GitHub Enterprise
|
||||
|
||||
```js
|
||||
let { graphql } = require("@octokit/graphql");
|
||||
graphql = graphql.defaults({
|
||||
baseUrl: "https://github-enterprise.acme-inc.com/api",
|
||||
headers: {
|
||||
authorization: `token secret123`,
|
||||
},
|
||||
});
|
||||
const { repository } = await graphql(`
|
||||
{
|
||||
repository(owner: "acme-project", name: "acme-repo") {
|
||||
issues(last: 3) {
|
||||
edges {
|
||||
node {
|
||||
title
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`);
|
||||
```
|
||||
|
||||
### Use custom `@octokit/request` instance
|
||||
|
||||
```js
|
||||
const { request } = require("@octokit/request");
|
||||
const { withCustomRequest } = require("@octokit/graphql");
|
||||
|
||||
let requestCounter = 0;
|
||||
const myRequest = request.defaults({
|
||||
headers: {
|
||||
authentication: "token secret123",
|
||||
},
|
||||
request: {
|
||||
hook(request, options) {
|
||||
requestCounter++;
|
||||
return request(options);
|
||||
},
|
||||
},
|
||||
});
|
||||
const myGraphql = withCustomRequest(myRequest);
|
||||
await request("/");
|
||||
await myGraphql(`
|
||||
{
|
||||
repository(owner: "acme-project", name: "acme-repo") {
|
||||
issues(last: 3) {
|
||||
edges {
|
||||
node {
|
||||
title
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`);
|
||||
// requestCounter is now 2
|
||||
```
|
||||
|
||||
## TypeScript
|
||||
|
||||
`@octokit/graphql` is exposing proper types for its usage with TypeScript projects.
|
||||
|
||||
### Additional Types
|
||||
|
||||
Additionally, `GraphQlQueryResponseData` has been exposed to users:
|
||||
|
||||
```ts
|
||||
import type { GraphQlQueryResponseData } from "@octokit/graphql";
|
||||
```
|
||||
|
||||
## Errors
|
||||
|
||||
In case of a GraphQL error, `error.message` is set to a combined message describing all errors returned by the endpoint.
|
||||
All errors can be accessed at `error.errors`. `error.request` has the request options such as query, variables and headers set for easier debugging.
|
||||
|
||||
```js
|
||||
let { graphql, GraphqlResponseError } = require("@octokit/graphql");
|
||||
graphqlt = graphql.defaults({
|
||||
headers: {
|
||||
authorization: `token secret123`,
|
||||
},
|
||||
});
|
||||
const query = `{
|
||||
viewer {
|
||||
bioHtml
|
||||
}
|
||||
}`;
|
||||
|
||||
try {
|
||||
const result = await graphql(query);
|
||||
} catch (error) {
|
||||
if (error instanceof GraphqlResponseError) {
|
||||
// do something with the error, allowing you to detect a graphql response error,
|
||||
// compared to accidentally catching unrelated errors.
|
||||
|
||||
// server responds with an object like the following (as an example)
|
||||
// class GraphqlResponseError {
|
||||
// "headers": {
|
||||
// "status": "403",
|
||||
// },
|
||||
// "data": null,
|
||||
// "errors": [{
|
||||
// "message": "Field 'bioHtml' doesn't exist on type 'User'",
|
||||
// "locations": [{
|
||||
// "line": 3,
|
||||
// "column": 5
|
||||
// }]
|
||||
// }]
|
||||
// }
|
||||
|
||||
console.log("Request failed:", error.request); // { query, variables: {}, headers: { authorization: 'token secret123' } }
|
||||
console.log(error.message); // Field 'bioHtml' doesn't exist on type 'User'
|
||||
} else {
|
||||
// handle non-GraphQL error
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Partial responses
|
||||
|
||||
A GraphQL query may respond with partial data accompanied by errors. In this case we will throw an error but the partial data will still be accessible through `error.data`
|
||||
|
||||
```js
|
||||
let { graphql } = require("@octokit/graphql");
|
||||
graphql = graphql.defaults({
|
||||
headers: {
|
||||
authorization: `token secret123`,
|
||||
},
|
||||
});
|
||||
const query = `{
|
||||
repository(name: "probot", owner: "probot") {
|
||||
name
|
||||
ref(qualifiedName: "master") {
|
||||
target {
|
||||
... on Commit {
|
||||
history(first: 25, after: "invalid cursor") {
|
||||
nodes {
|
||||
message
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}`;
|
||||
|
||||
try {
|
||||
const result = await graphql(query);
|
||||
} catch (error) {
|
||||
// server responds with
|
||||
// {
|
||||
// "data": {
|
||||
// "repository": {
|
||||
// "name": "probot",
|
||||
// "ref": null
|
||||
// }
|
||||
// },
|
||||
// "errors": [
|
||||
// {
|
||||
// "type": "INVALID_CURSOR_ARGUMENTS",
|
||||
// "path": [
|
||||
// "repository",
|
||||
// "ref",
|
||||
// "target",
|
||||
// "history"
|
||||
// ],
|
||||
// "locations": [
|
||||
// {
|
||||
// "line": 7,
|
||||
// "column": 11
|
||||
// }
|
||||
// ],
|
||||
// "message": "`invalid cursor` does not appear to be a valid cursor."
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
|
||||
console.log("Request failed:", error.request); // { query, variables: {}, headers: { authorization: 'token secret123' } }
|
||||
console.log(error.message); // `invalid cursor` does not appear to be a valid cursor.
|
||||
console.log(error.data); // { repository: { name: 'probot', ref: null } }
|
||||
}
|
||||
```
|
||||
|
||||
## Writing tests
|
||||
|
||||
You can pass a replacement for [the built-in fetch implementation](https://github.com/bitinn/node-fetch) as `request.fetch` option. For example, using [fetch-mock](http://www.wheresrhys.co.uk/fetch-mock/) works great to write tests
|
||||
|
||||
```js
|
||||
const assert = require("assert");
|
||||
const fetchMock = require("fetch-mock/es5/server");
|
||||
|
||||
const { graphql } = require("@octokit/graphql");
|
||||
|
||||
graphql("{ viewer { login } }", {
|
||||
headers: {
|
||||
authorization: "token secret123",
|
||||
},
|
||||
request: {
|
||||
fetch: fetchMock
|
||||
.sandbox()
|
||||
.post("https://api.github.com/graphql", (url, options) => {
|
||||
assert.strictEqual(options.headers.authorization, "token secret123");
|
||||
assert.strictEqual(
|
||||
options.body,
|
||||
'{"query":"{ viewer { login } }"}',
|
||||
"Sends correct query"
|
||||
);
|
||||
return { data: {} };
|
||||
}),
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
[MIT](LICENSE)
|
||||
118
github/codeql-action-v2/node_modules/@octokit/graphql/dist-node/index.js
generated
vendored
Normal file
118
github/codeql-action-v2/node_modules/@octokit/graphql/dist-node/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
var request = require('@octokit/request');
|
||||
var universalUserAgent = require('universal-user-agent');
|
||||
|
||||
const VERSION = "4.8.0";
|
||||
|
||||
function _buildMessageForResponseErrors(data) {
|
||||
return `Request failed due to following response errors:\n` + data.errors.map(e => ` - ${e.message}`).join("\n");
|
||||
}
|
||||
|
||||
class GraphqlResponseError extends Error {
|
||||
constructor(request, headers, response) {
|
||||
super(_buildMessageForResponseErrors(response));
|
||||
this.request = request;
|
||||
this.headers = headers;
|
||||
this.response = response;
|
||||
this.name = "GraphqlResponseError"; // Expose the errors and response data in their shorthand properties.
|
||||
|
||||
this.errors = response.errors;
|
||||
this.data = response.data; // Maintains proper stack trace (only available on V8)
|
||||
|
||||
/* istanbul ignore next */
|
||||
|
||||
if (Error.captureStackTrace) {
|
||||
Error.captureStackTrace(this, this.constructor);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const NON_VARIABLE_OPTIONS = ["method", "baseUrl", "url", "headers", "request", "query", "mediaType"];
|
||||
const FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"];
|
||||
const GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/;
|
||||
function graphql(request, query, options) {
|
||||
if (options) {
|
||||
if (typeof query === "string" && "query" in options) {
|
||||
return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`));
|
||||
}
|
||||
|
||||
for (const key in options) {
|
||||
if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue;
|
||||
return Promise.reject(new Error(`[@octokit/graphql] "${key}" cannot be used as variable name`));
|
||||
}
|
||||
}
|
||||
|
||||
const parsedOptions = typeof query === "string" ? Object.assign({
|
||||
query
|
||||
}, options) : query;
|
||||
const requestOptions = Object.keys(parsedOptions).reduce((result, key) => {
|
||||
if (NON_VARIABLE_OPTIONS.includes(key)) {
|
||||
result[key] = parsedOptions[key];
|
||||
return result;
|
||||
}
|
||||
|
||||
if (!result.variables) {
|
||||
result.variables = {};
|
||||
}
|
||||
|
||||
result.variables[key] = parsedOptions[key];
|
||||
return result;
|
||||
}, {}); // workaround for GitHub Enterprise baseUrl set with /api/v3 suffix
|
||||
// https://github.com/octokit/auth-app.js/issues/111#issuecomment-657610451
|
||||
|
||||
const baseUrl = parsedOptions.baseUrl || request.endpoint.DEFAULTS.baseUrl;
|
||||
|
||||
if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {
|
||||
requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql");
|
||||
}
|
||||
|
||||
return request(requestOptions).then(response => {
|
||||
if (response.data.errors) {
|
||||
const headers = {};
|
||||
|
||||
for (const key of Object.keys(response.headers)) {
|
||||
headers[key] = response.headers[key];
|
||||
}
|
||||
|
||||
throw new GraphqlResponseError(requestOptions, headers, response.data);
|
||||
}
|
||||
|
||||
return response.data.data;
|
||||
});
|
||||
}
|
||||
|
||||
function withDefaults(request$1, newDefaults) {
|
||||
const newRequest = request$1.defaults(newDefaults);
|
||||
|
||||
const newApi = (query, options) => {
|
||||
return graphql(newRequest, query, options);
|
||||
};
|
||||
|
||||
return Object.assign(newApi, {
|
||||
defaults: withDefaults.bind(null, newRequest),
|
||||
endpoint: request.request.endpoint
|
||||
});
|
||||
}
|
||||
|
||||
const graphql$1 = withDefaults(request.request, {
|
||||
headers: {
|
||||
"user-agent": `octokit-graphql.js/${VERSION} ${universalUserAgent.getUserAgent()}`
|
||||
},
|
||||
method: "POST",
|
||||
url: "/graphql"
|
||||
});
|
||||
function withCustomRequest(customRequest) {
|
||||
return withDefaults(customRequest, {
|
||||
method: "POST",
|
||||
url: "/graphql"
|
||||
});
|
||||
}
|
||||
|
||||
exports.GraphqlResponseError = GraphqlResponseError;
|
||||
exports.graphql = graphql$1;
|
||||
exports.withCustomRequest = withCustomRequest;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
github/codeql-action-v2/node_modules/@octokit/graphql/dist-node/index.js.map
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/graphql/dist-node/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
21
github/codeql-action-v2/node_modules/@octokit/graphql/dist-src/error.js
generated
vendored
Normal file
21
github/codeql-action-v2/node_modules/@octokit/graphql/dist-src/error.js
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
function _buildMessageForResponseErrors(data) {
|
||||
return (`Request failed due to following response errors:\n` +
|
||||
data.errors.map((e) => ` - ${e.message}`).join("\n"));
|
||||
}
|
||||
export class GraphqlResponseError extends Error {
|
||||
constructor(request, headers, response) {
|
||||
super(_buildMessageForResponseErrors(response));
|
||||
this.request = request;
|
||||
this.headers = headers;
|
||||
this.response = response;
|
||||
this.name = "GraphqlResponseError";
|
||||
// Expose the errors and response data in their shorthand properties.
|
||||
this.errors = response.errors;
|
||||
this.data = response.data;
|
||||
// Maintains proper stack trace (only available on V8)
|
||||
/* istanbul ignore next */
|
||||
if (Error.captureStackTrace) {
|
||||
Error.captureStackTrace(this, this.constructor);
|
||||
}
|
||||
}
|
||||
}
|
||||
52
github/codeql-action-v2/node_modules/@octokit/graphql/dist-src/graphql.js
generated
vendored
Normal file
52
github/codeql-action-v2/node_modules/@octokit/graphql/dist-src/graphql.js
generated
vendored
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
import { GraphqlResponseError } from "./error";
|
||||
const NON_VARIABLE_OPTIONS = [
|
||||
"method",
|
||||
"baseUrl",
|
||||
"url",
|
||||
"headers",
|
||||
"request",
|
||||
"query",
|
||||
"mediaType",
|
||||
];
|
||||
const FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"];
|
||||
const GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/;
|
||||
export function graphql(request, query, options) {
|
||||
if (options) {
|
||||
if (typeof query === "string" && "query" in options) {
|
||||
return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`));
|
||||
}
|
||||
for (const key in options) {
|
||||
if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key))
|
||||
continue;
|
||||
return Promise.reject(new Error(`[@octokit/graphql] "${key}" cannot be used as variable name`));
|
||||
}
|
||||
}
|
||||
const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query;
|
||||
const requestOptions = Object.keys(parsedOptions).reduce((result, key) => {
|
||||
if (NON_VARIABLE_OPTIONS.includes(key)) {
|
||||
result[key] = parsedOptions[key];
|
||||
return result;
|
||||
}
|
||||
if (!result.variables) {
|
||||
result.variables = {};
|
||||
}
|
||||
result.variables[key] = parsedOptions[key];
|
||||
return result;
|
||||
}, {});
|
||||
// workaround for GitHub Enterprise baseUrl set with /api/v3 suffix
|
||||
// https://github.com/octokit/auth-app.js/issues/111#issuecomment-657610451
|
||||
const baseUrl = parsedOptions.baseUrl || request.endpoint.DEFAULTS.baseUrl;
|
||||
if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {
|
||||
requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql");
|
||||
}
|
||||
return request(requestOptions).then((response) => {
|
||||
if (response.data.errors) {
|
||||
const headers = {};
|
||||
for (const key of Object.keys(response.headers)) {
|
||||
headers[key] = response.headers[key];
|
||||
}
|
||||
throw new GraphqlResponseError(requestOptions, headers, response.data);
|
||||
}
|
||||
return response.data.data;
|
||||
});
|
||||
}
|
||||
18
github/codeql-action-v2/node_modules/@octokit/graphql/dist-src/index.js
generated
vendored
Normal file
18
github/codeql-action-v2/node_modules/@octokit/graphql/dist-src/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { request } from "@octokit/request";
|
||||
import { getUserAgent } from "universal-user-agent";
|
||||
import { VERSION } from "./version";
|
||||
import { withDefaults } from "./with-defaults";
|
||||
export const graphql = withDefaults(request, {
|
||||
headers: {
|
||||
"user-agent": `octokit-graphql.js/${VERSION} ${getUserAgent()}`,
|
||||
},
|
||||
method: "POST",
|
||||
url: "/graphql",
|
||||
});
|
||||
export { GraphqlResponseError } from "./error";
|
||||
export function withCustomRequest(customRequest) {
|
||||
return withDefaults(customRequest, {
|
||||
method: "POST",
|
||||
url: "/graphql",
|
||||
});
|
||||
}
|
||||
1
github/codeql-action-v2/node_modules/@octokit/graphql/dist-src/types.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/graphql/dist-src/types.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/graphql/dist-src/version.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/graphql/dist-src/version.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export const VERSION = "4.8.0";
|
||||
12
github/codeql-action-v2/node_modules/@octokit/graphql/dist-src/with-defaults.js
generated
vendored
Normal file
12
github/codeql-action-v2/node_modules/@octokit/graphql/dist-src/with-defaults.js
generated
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import { request as Request } from "@octokit/request";
|
||||
import { graphql } from "./graphql";
|
||||
export function withDefaults(request, newDefaults) {
|
||||
const newRequest = request.defaults(newDefaults);
|
||||
const newApi = (query, options) => {
|
||||
return graphql(newRequest, query, options);
|
||||
};
|
||||
return Object.assign(newApi, {
|
||||
defaults: withDefaults.bind(null, newRequest),
|
||||
endpoint: Request.endpoint,
|
||||
});
|
||||
}
|
||||
13
github/codeql-action-v2/node_modules/@octokit/graphql/dist-types/error.d.ts
generated
vendored
Normal file
13
github/codeql-action-v2/node_modules/@octokit/graphql/dist-types/error.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import { ResponseHeaders } from "@octokit/types";
|
||||
import { GraphQlEndpointOptions, GraphQlQueryResponse } from "./types";
|
||||
declare type ServerResponseData<T> = Required<GraphQlQueryResponse<T>>;
|
||||
export declare class GraphqlResponseError<ResponseData> extends Error {
|
||||
readonly request: GraphQlEndpointOptions;
|
||||
readonly headers: ResponseHeaders;
|
||||
readonly response: ServerResponseData<ResponseData>;
|
||||
name: string;
|
||||
readonly errors: GraphQlQueryResponse<never>["errors"];
|
||||
readonly data: ResponseData;
|
||||
constructor(request: GraphQlEndpointOptions, headers: ResponseHeaders, response: ServerResponseData<ResponseData>);
|
||||
}
|
||||
export {};
|
||||
3
github/codeql-action-v2/node_modules/@octokit/graphql/dist-types/graphql.d.ts
generated
vendored
Normal file
3
github/codeql-action-v2/node_modules/@octokit/graphql/dist-types/graphql.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
import { request as Request } from "@octokit/request";
|
||||
import { RequestParameters, GraphQlQueryResponseData } from "./types";
|
||||
export declare function graphql<ResponseData = GraphQlQueryResponseData>(request: typeof Request, query: string | RequestParameters, options?: RequestParameters): Promise<ResponseData>;
|
||||
5
github/codeql-action-v2/node_modules/@octokit/graphql/dist-types/index.d.ts
generated
vendored
Normal file
5
github/codeql-action-v2/node_modules/@octokit/graphql/dist-types/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import { request } from "@octokit/request";
|
||||
export declare const graphql: import("./types").graphql;
|
||||
export { GraphQlQueryResponseData } from "./types";
|
||||
export { GraphqlResponseError } from "./error";
|
||||
export declare function withCustomRequest(customRequest: typeof request): import("./types").graphql;
|
||||
55
github/codeql-action-v2/node_modules/@octokit/graphql/dist-types/types.d.ts
generated
vendored
Normal file
55
github/codeql-action-v2/node_modules/@octokit/graphql/dist-types/types.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
import { EndpointOptions, RequestParameters as RequestParametersType, EndpointInterface } from "@octokit/types";
|
||||
export declare type GraphQlEndpointOptions = EndpointOptions & {
|
||||
variables?: {
|
||||
[key: string]: unknown;
|
||||
};
|
||||
};
|
||||
export declare type RequestParameters = RequestParametersType;
|
||||
export declare type Query = string;
|
||||
export interface graphql {
|
||||
/**
|
||||
* Sends a GraphQL query request based on endpoint options
|
||||
* The GraphQL query must be specified in `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`.
|
||||
*/
|
||||
<ResponseData>(options: RequestParameters): GraphQlResponse<ResponseData>;
|
||||
/**
|
||||
* Sends a GraphQL query request based on endpoint options
|
||||
*
|
||||
* @param {string} query GraphQL query. Example: `'query { viewer { login } }'`.
|
||||
* @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
<ResponseData>(query: Query, parameters?: RequestParameters): GraphQlResponse<ResponseData>;
|
||||
/**
|
||||
* Returns a new `endpoint` with updated route and parameters
|
||||
*/
|
||||
defaults: (newDefaults: RequestParameters) => graphql;
|
||||
/**
|
||||
* Octokit endpoint API, see {@link https://github.com/octokit/endpoint.js|@octokit/endpoint}
|
||||
*/
|
||||
endpoint: EndpointInterface;
|
||||
}
|
||||
export declare type GraphQlResponse<ResponseData> = Promise<ResponseData>;
|
||||
export declare type GraphQlQueryResponseData = {
|
||||
[key: string]: any;
|
||||
};
|
||||
export declare type GraphQlQueryResponse<ResponseData> = {
|
||||
data: ResponseData;
|
||||
errors?: [
|
||||
{
|
||||
type: string;
|
||||
message: string;
|
||||
path: [string];
|
||||
extensions: {
|
||||
[key: string]: any;
|
||||
};
|
||||
locations: [
|
||||
{
|
||||
line: number;
|
||||
column: number;
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/graphql/dist-types/version.d.ts
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/graphql/dist-types/version.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export declare const VERSION = "4.8.0";
|
||||
3
github/codeql-action-v2/node_modules/@octokit/graphql/dist-types/with-defaults.d.ts
generated
vendored
Normal file
3
github/codeql-action-v2/node_modules/@octokit/graphql/dist-types/with-defaults.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
import { request as Request } from "@octokit/request";
|
||||
import { graphql as ApiInterface, RequestParameters } from "./types";
|
||||
export declare function withDefaults(request: typeof Request, newDefaults: RequestParameters): ApiInterface;
|
||||
106
github/codeql-action-v2/node_modules/@octokit/graphql/dist-web/index.js
generated
vendored
Normal file
106
github/codeql-action-v2/node_modules/@octokit/graphql/dist-web/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
import { request } from '@octokit/request';
|
||||
import { getUserAgent } from 'universal-user-agent';
|
||||
|
||||
const VERSION = "4.8.0";
|
||||
|
||||
function _buildMessageForResponseErrors(data) {
|
||||
return (`Request failed due to following response errors:\n` +
|
||||
data.errors.map((e) => ` - ${e.message}`).join("\n"));
|
||||
}
|
||||
class GraphqlResponseError extends Error {
|
||||
constructor(request, headers, response) {
|
||||
super(_buildMessageForResponseErrors(response));
|
||||
this.request = request;
|
||||
this.headers = headers;
|
||||
this.response = response;
|
||||
this.name = "GraphqlResponseError";
|
||||
// Expose the errors and response data in their shorthand properties.
|
||||
this.errors = response.errors;
|
||||
this.data = response.data;
|
||||
// Maintains proper stack trace (only available on V8)
|
||||
/* istanbul ignore next */
|
||||
if (Error.captureStackTrace) {
|
||||
Error.captureStackTrace(this, this.constructor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const NON_VARIABLE_OPTIONS = [
|
||||
"method",
|
||||
"baseUrl",
|
||||
"url",
|
||||
"headers",
|
||||
"request",
|
||||
"query",
|
||||
"mediaType",
|
||||
];
|
||||
const FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"];
|
||||
const GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/;
|
||||
function graphql(request, query, options) {
|
||||
if (options) {
|
||||
if (typeof query === "string" && "query" in options) {
|
||||
return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`));
|
||||
}
|
||||
for (const key in options) {
|
||||
if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key))
|
||||
continue;
|
||||
return Promise.reject(new Error(`[@octokit/graphql] "${key}" cannot be used as variable name`));
|
||||
}
|
||||
}
|
||||
const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query;
|
||||
const requestOptions = Object.keys(parsedOptions).reduce((result, key) => {
|
||||
if (NON_VARIABLE_OPTIONS.includes(key)) {
|
||||
result[key] = parsedOptions[key];
|
||||
return result;
|
||||
}
|
||||
if (!result.variables) {
|
||||
result.variables = {};
|
||||
}
|
||||
result.variables[key] = parsedOptions[key];
|
||||
return result;
|
||||
}, {});
|
||||
// workaround for GitHub Enterprise baseUrl set with /api/v3 suffix
|
||||
// https://github.com/octokit/auth-app.js/issues/111#issuecomment-657610451
|
||||
const baseUrl = parsedOptions.baseUrl || request.endpoint.DEFAULTS.baseUrl;
|
||||
if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {
|
||||
requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql");
|
||||
}
|
||||
return request(requestOptions).then((response) => {
|
||||
if (response.data.errors) {
|
||||
const headers = {};
|
||||
for (const key of Object.keys(response.headers)) {
|
||||
headers[key] = response.headers[key];
|
||||
}
|
||||
throw new GraphqlResponseError(requestOptions, headers, response.data);
|
||||
}
|
||||
return response.data.data;
|
||||
});
|
||||
}
|
||||
|
||||
function withDefaults(request$1, newDefaults) {
|
||||
const newRequest = request$1.defaults(newDefaults);
|
||||
const newApi = (query, options) => {
|
||||
return graphql(newRequest, query, options);
|
||||
};
|
||||
return Object.assign(newApi, {
|
||||
defaults: withDefaults.bind(null, newRequest),
|
||||
endpoint: request.endpoint,
|
||||
});
|
||||
}
|
||||
|
||||
const graphql$1 = withDefaults(request, {
|
||||
headers: {
|
||||
"user-agent": `octokit-graphql.js/${VERSION} ${getUserAgent()}`,
|
||||
},
|
||||
method: "POST",
|
||||
url: "/graphql",
|
||||
});
|
||||
function withCustomRequest(customRequest) {
|
||||
return withDefaults(customRequest, {
|
||||
method: "POST",
|
||||
url: "/graphql",
|
||||
});
|
||||
}
|
||||
|
||||
export { GraphqlResponseError, graphql$1 as graphql, withCustomRequest };
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
github/codeql-action-v2/node_modules/@octokit/graphql/dist-web/index.js.map
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/graphql/dist-web/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
7
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/openapi-types/LICENSE
generated
vendored
Normal file
7
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/openapi-types/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
Copyright 2020 Gregor Martynus
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
17
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/openapi-types/README.md
generated
vendored
Normal file
17
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/openapi-types/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# @octokit/openapi-types
|
||||
|
||||
> Generated TypeScript definitions based on GitHub's OpenAPI spec
|
||||
|
||||
This package is continously updated based on [GitHub's OpenAPI specification](https://github.com/github/rest-api-description/)
|
||||
|
||||
## Usage
|
||||
|
||||
```ts
|
||||
import { components } from "@octokit/openapi-types";
|
||||
|
||||
type Repository = components["schemas"]["full-repository"];
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
[MIT](LICENSE)
|
||||
20
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/openapi-types/package.json
generated
vendored
Normal file
20
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/openapi-types/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"name": "@octokit/openapi-types",
|
||||
"description": "Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/octokit/openapi-types.ts.git",
|
||||
"directory": "packages/openapi-types"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"version": "12.11.0",
|
||||
"main": "",
|
||||
"types": "types.d.ts",
|
||||
"author": "Gregor Martynus (https://twitter.com/gr2m)",
|
||||
"license": "MIT",
|
||||
"octokit": {
|
||||
"openapi-version": "6.8.0"
|
||||
}
|
||||
}
|
||||
47095
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/openapi-types/types.d.ts
generated
vendored
Normal file
47095
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/openapi-types/types.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
7
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/LICENSE
generated
vendored
Normal file
7
github/codeql-action-v2/node_modules/@octokit/graphql/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
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/README.md
generated
vendored
Normal file
65
github/codeql-action-v2/node_modules/@octokit/graphql/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)
|
||||
8
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-node/index.js
generated
vendored
Normal file
8
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-node/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
const VERSION = "6.41.0";
|
||||
|
||||
exports.VERSION = VERSION;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-node/index.js.map
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-node/index.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"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
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/AuthInterface.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/AuthInterface.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/EndpointDefaults.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/EndpointDefaults.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/EndpointInterface.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/EndpointInterface.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/EndpointOptions.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/EndpointOptions.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/Fetch.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/Fetch.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/OctokitResponse.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/OctokitResponse.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestError.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestError.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestHeaders.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestHeaders.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestInterface.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestInterface.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestMethod.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestMethod.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestOptions.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestOptions.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestParameters.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestParameters.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestRequestOptions.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/RequestRequestOptions.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/ResponseHeaders.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/ResponseHeaders.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/Route.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/Route.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/Signal.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/Signal.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/StrategyInterface.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/StrategyInterface.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/Url.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/Url.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/VERSION.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/VERSION.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export const VERSION = "6.41.0";
|
||||
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/generated/Endpoints.js
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/generated/Endpoints.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
21
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/index.js
generated
vendored
Normal file
21
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-src/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
export * from "./AuthInterface";
|
||||
export * from "./EndpointDefaults";
|
||||
export * from "./EndpointInterface";
|
||||
export * from "./EndpointOptions";
|
||||
export * from "./Fetch";
|
||||
export * from "./OctokitResponse";
|
||||
export * from "./RequestError";
|
||||
export * from "./RequestHeaders";
|
||||
export * from "./RequestInterface";
|
||||
export * from "./RequestMethod";
|
||||
export * from "./RequestOptions";
|
||||
export * from "./RequestParameters";
|
||||
export * from "./RequestRequestOptions";
|
||||
export * from "./ResponseHeaders";
|
||||
export * from "./Route";
|
||||
export * from "./Signal";
|
||||
export * from "./StrategyInterface";
|
||||
export * from "./Url";
|
||||
export * from "./VERSION";
|
||||
export * from "./GetResponseTypeFromEndpointMethod";
|
||||
export * from "./generated/Endpoints";
|
||||
31
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/AuthInterface.d.ts
generated
vendored
Normal file
31
github/codeql-action-v2/node_modules/@octokit/graphql/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
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts
generated
vendored
Normal file
21
github/codeql-action-v2/node_modules/@octokit/graphql/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 declare type EndpointDefaults = RequestParameters & {
|
||||
baseUrl: Url;
|
||||
method: RequestMethod;
|
||||
url?: Url;
|
||||
headers: RequestHeaders & {
|
||||
accept: string;
|
||||
"user-agent": string;
|
||||
};
|
||||
mediaType: {
|
||||
format: string;
|
||||
previews: string[];
|
||||
};
|
||||
};
|
||||
65
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts
generated
vendored
Normal file
65
github/codeql-action-v2/node_modules/@octokit/graphql/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
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts
generated
vendored
Normal file
7
github/codeql-action-v2/node_modules/@octokit/graphql/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 declare type EndpointOptions = RequestParameters & {
|
||||
method: RequestMethod;
|
||||
url: Url;
|
||||
};
|
||||
4
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/Fetch.d.ts
generated
vendored
Normal file
4
github/codeql-action-v2/node_modules/@octokit/graphql/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 declare type Fetch = any;
|
||||
5
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts
generated
vendored
Normal file
5
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
declare type Unwrap<T> = T extends Promise<infer U> ? U : T;
|
||||
declare type AnyFunction = (...args: any[]) => any;
|
||||
export declare type GetResponseTypeFromEndpointMethod<T extends AnyFunction> = Unwrap<ReturnType<T>>;
|
||||
export declare type GetResponseDataTypeFromEndpointMethod<T extends AnyFunction> = Unwrap<ReturnType<T>>["data"];
|
||||
export {};
|
||||
17
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts
generated
vendored
Normal file
17
github/codeql-action-v2/node_modules/@octokit/graphql/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 declare 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
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/RequestError.d.ts
generated
vendored
Normal file
11
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/RequestError.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
export declare type RequestError = {
|
||||
name: string;
|
||||
status: number;
|
||||
documentation_url: string;
|
||||
errors?: Array<{
|
||||
resource: string;
|
||||
code: string;
|
||||
field: string;
|
||||
message?: string;
|
||||
}>;
|
||||
};
|
||||
15
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts
generated
vendored
Normal file
15
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
export declare 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
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/RequestInterface.d.ts
generated
vendored
Normal file
34
github/codeql-action-v2/node_modules/@octokit/graphql/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
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/RequestMethod.d.ts
generated
vendored
Normal file
4
github/codeql-action-v2/node_modules/@octokit/graphql/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 declare type RequestMethod = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT";
|
||||
14
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/RequestOptions.d.ts
generated
vendored
Normal file
14
github/codeql-action-v2/node_modules/@octokit/graphql/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 declare type RequestOptions = {
|
||||
method: RequestMethod;
|
||||
url: Url;
|
||||
headers: RequestHeaders;
|
||||
body?: any;
|
||||
request?: RequestRequestOptions;
|
||||
};
|
||||
45
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/RequestParameters.d.ts
generated
vendored
Normal file
45
github/codeql-action-v2/node_modules/@octokit/graphql/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 declare 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
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts
generated
vendored
Normal file
26
github/codeql-action-v2/node_modules/@octokit/graphql/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 declare 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
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts
generated
vendored
Normal file
20
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
export declare 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
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/Route.d.ts
generated
vendored
Normal file
4
github/codeql-action-v2/node_modules/@octokit/graphql/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 declare type Route = string;
|
||||
6
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/Signal.d.ts
generated
vendored
Normal file
6
github/codeql-action-v2/node_modules/@octokit/graphql/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 declare type Signal = any;
|
||||
4
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts
generated
vendored
Normal file
4
github/codeql-action-v2/node_modules/@octokit/graphql/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
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/Url.d.ts
generated
vendored
Normal file
4
github/codeql-action-v2/node_modules/@octokit/graphql/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 declare type Url = string;
|
||||
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/VERSION.d.ts
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/VERSION.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export declare const VERSION = "6.41.0";
|
||||
3571
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts
generated
vendored
Normal file
3571
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
21
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/index.d.ts
generated
vendored
Normal file
21
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-types/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
export * from "./AuthInterface";
|
||||
export * from "./EndpointDefaults";
|
||||
export * from "./EndpointInterface";
|
||||
export * from "./EndpointOptions";
|
||||
export * from "./Fetch";
|
||||
export * from "./OctokitResponse";
|
||||
export * from "./RequestError";
|
||||
export * from "./RequestHeaders";
|
||||
export * from "./RequestInterface";
|
||||
export * from "./RequestMethod";
|
||||
export * from "./RequestOptions";
|
||||
export * from "./RequestParameters";
|
||||
export * from "./RequestRequestOptions";
|
||||
export * from "./ResponseHeaders";
|
||||
export * from "./Route";
|
||||
export * from "./Signal";
|
||||
export * from "./StrategyInterface";
|
||||
export * from "./Url";
|
||||
export * from "./VERSION";
|
||||
export * from "./GetResponseTypeFromEndpointMethod";
|
||||
export * from "./generated/Endpoints";
|
||||
4
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-web/index.js
generated
vendored
Normal file
4
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-web/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
const VERSION = "6.41.0";
|
||||
|
||||
export { VERSION };
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-web/index.js.map
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/dist-web/index.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"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;;;;"}
|
||||
54
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/package.json
generated
vendored
Normal file
54
github/codeql-action-v2/node_modules/@octokit/graphql/node_modules/@octokit/types/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
{
|
||||
"name": "@octokit/types",
|
||||
"description": "Shared TypeScript definitions for Octokit projects",
|
||||
"version": "6.41.0",
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"dist-*/",
|
||||
"bin/"
|
||||
],
|
||||
"source": "dist-src/index.js",
|
||||
"types": "dist-types/index.d.ts",
|
||||
"octokit": {
|
||||
"openapi-version": "6.8.0"
|
||||
},
|
||||
"main": "dist-node/index.js",
|
||||
"module": "dist-web/index.js",
|
||||
"pika": true,
|
||||
"sideEffects": false,
|
||||
"keywords": [
|
||||
"github",
|
||||
"api",
|
||||
"sdk",
|
||||
"toolkit",
|
||||
"typescript"
|
||||
],
|
||||
"repository": "github:octokit/types.ts",
|
||||
"dependencies": {
|
||||
"@octokit/openapi-types": "^12.11.0"
|
||||
},
|
||||
"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",
|
||||
"@types/node": ">= 8",
|
||||
"github-openapi-graphql-query": "^2.0.0",
|
||||
"handlebars": "^4.7.6",
|
||||
"json-schema-to-typescript": "^11.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": "^19.0.3",
|
||||
"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"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
||||
47
github/codeql-action-v2/node_modules/@octokit/graphql/package.json
generated
vendored
Normal file
47
github/codeql-action-v2/node_modules/@octokit/graphql/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"name": "@octokit/graphql",
|
||||
"description": "GitHub GraphQL API client for browsers and Node",
|
||||
"version": "4.8.0",
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"dist-*/",
|
||||
"bin/"
|
||||
],
|
||||
"pika": true,
|
||||
"sideEffects": false,
|
||||
"keywords": [
|
||||
"octokit",
|
||||
"github",
|
||||
"api",
|
||||
"graphql"
|
||||
],
|
||||
"repository": "github:octokit/graphql.js",
|
||||
"dependencies": {
|
||||
"@octokit/request": "^5.6.0",
|
||||
"@octokit/types": "^6.0.3",
|
||||
"universal-user-agent": "^6.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@pika/pack": "^0.5.0",
|
||||
"@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.2.5",
|
||||
"@types/jest": "^27.0.0",
|
||||
"@types/node": "^14.0.4",
|
||||
"fetch-mock": "^9.0.0",
|
||||
"jest": "^27.0.0",
|
||||
"prettier": "2.3.2",
|
||||
"semantic-release": "^17.0.0",
|
||||
"semantic-release-plugin-update-version-in-files": "^1.0.0",
|
||||
"ts-jest": "^27.0.0-next.12",
|
||||
"typescript": "^4.0.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"source": "dist-src/index.js",
|
||||
"types": "dist-types/index.d.ts",
|
||||
"main": "dist-node/index.js",
|
||||
"module": "dist-web/index.js"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue