-
-```js
-const app = new App({
- appId: 123,
- privateKey: "-----BEGIN PRIVATE KEY-----\n...",
- oauth: {
- clientId: "0123",
- clientSecret: "0123secret",
- },
- webhooks: {
- secret: "secret",
- },
-});
-
-const { data } = await app.octokit.request("/app");
-console.log("authenticated as %s", data.name);
-for await (const { installation } of app.eachInstallation.iterator()) {
- for await (const { octokit, repository } of app.eachRepository.iterator({
- installationId: installation.id,
- })) {
- await octokit.request("POST /repos/{owner}/{repo}/dispatches", {
- owner: repository.owner.login,
- repo: repository.name,
- event_type: "my_event",
- });
- }
-}
-
-app.webhooks.on("issues.opened", async ({ octokit, payload }) => {
- await octokit.request(
- "POST /repos/{owner}/{repo}/issues/{issue_number}/comments",
- {
- owner: payload.repository.owner.login,
- repo: payload.repository.name,
- issue_number: payload.issue.number,
- body: "Hello World!",
- }
- );
-});
-
-app.oauth.on("token", async ({ token, octokit }) => {
- const { data } = await octokit.request("GET /user");
- console.log(`Token retrieved for ${data.login}`);
-});
-
-require("http").createServer(createNodeMiddleware(app)).listen(3000);
-// can now receive requests at /api/github/*
-```
-
-## `App.defaults(options)`
-
-Create a new `App` with custom defaults for the [constructor options](#constructor-options)
-
-```js
-const MyApp = App.defaults({
- Octokit: MyOctokit,
-});
-const app = new MyApp({ clientId, clientSecret });
-// app.octokit is now an instance of MyOctokit
-```
-
-## Constructor
-
-
-
-
-
- name
-
-
- type
-
-
- description
-
-
-
-
-
-
- appId
-
-
- number
-
-
- Required. Find the App ID on the app’s about page in settings.
-
-
-
-
- privateKey
-
-
- string
-
-
- Required. Content of the *.pem file you downloaded from the app’s about page. You can generate a new private key if needed.
-
-
-
-
- Octokit
-
-
- Constructor
-
-
-
-You can pass in your own Octokit constructor with custom defaults and plugins. Note that `authStrategy` will be always be set to `createAppAuth` from [`@octokit/auth-app`](https://github.com/octokit/auth-app.js).
-
-For usage with enterprise, set `baseUrl` to the hostname + `/api/v3`. Example:
-
-```js
-const { Octokit } = require("@octokit/core");
-new App({
- appId: 123,
- privateKey: "-----BEGIN PRIVATE KEY-----\n...",
- oauth: {
- clientId: 123,
- clientSecret: "secret",
- },
- webhooks: {
- secret: "secret",
- },
- Octokit: Octokit.defaults({
- baseUrl: "https://ghe.my-company.com/api/v3",
- }),
-});
-```
-
-Defaults to [`@octokit/core`](https://github.com/octokit/core.js).
-
-
-
-
- log
-
-
- object
-
-
- Used for internal logging. Defaults to console.
-
-
-
-
- webhooks.secret
-
-
- string
-
-
- Required. Secret as configured in the GitHub App's settings.
-
-
-
-
- webhooks.transform
-
-
- function
-
-
- Only relevant for `app.webhooks.on`. Transform emitted event before calling handlers. Can be asynchronous.
-
-
-
-
- oauth.clientId
-
-
- number
-
-
- Find the OAuth Client ID on the app’s about page in settings.
-
-
-
-
- oauth.clientSecret
-
-
- number
-
-
- Find the OAuth Client Secret on the app’s about page in settings.
-
-
-
-
- oauth.allowSignup
-
-
- boolean
-
-
- Sets the default value for app.oauth.getAuthorizationUrl(options).
-
-
-
-
-
-## API
-
-### `app.octokit`
-
-Octokit instance. Uses the [`Octokit` constructor option](#constructor-option-octokit) if passed.
-
-### `app.log`
-
-See https://github.com/octokit/core.js#logging. Customize using the [`log` constructor option](#constructor-option-log).
-
-### `app.getInstallationOctokit`
-
-```js
-const octokit = await app.getInstallationOctokit(123);
-```
-
-### `app.eachInstallation`
-
-```js
-for await (const { octokit, installation } of app.eachInstallation.iterator()) { /* ... */ }
-await app.eachInstallation(({ octokit, installation }) => /* ... */)
-```
-
-### `app.eachRepository`
-
-```js
-for await (const { octokit, repository } of app.eachRepository.iterator()) { /* ... */ }
-await app.eachRepository(({ octokit, repository }) => /* ... */)
-```
-
-Optionally pass installation ID to iterate through all repositories in one installation
-
-```js
-for await (const { octokit, repository } of app.eachRepository.iterator({ installationId })) { /* ... */ }
-await app.eachRepository({ installationId }, ({ octokit, repository }) => /* ... */)
-```
-
-### `app.webhooks`
-
-An [`@octokit/webhooks` instance](https://github.com/octokit/webhooks.js/#readme)
-
-### `app.oauth`
-
-An [`@octokit/oauth-app` instance](https://github.com/octokit/oauth-app.js/#readme)
-
-## Middlewares
-
-A middleware is a method or set of methods to handle requests for common environments.
-
-By default, all middlewares expose the following routes
-
-| Route | Route Description |
-| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `POST /api/github/webhooks` | Endpoint to receive GitHub Webhook Event requests |
-| `GET /api/github/oauth/login` | Redirects to GitHub's authorization endpoint. Accepts optional `?state` query parameter. |
-| `GET /api/github/oauth/callback` | The client's redirect endpoint. This is where the `token` event gets triggered |
-| `POST /api/github/oauth/token` | Exchange an authorization code for an OAuth Access token. If successful, the `token` event gets triggered. |
-| `GET /api/github/oauth/token` | Check if token is valid. Must authenticate using token in `Authorization` header. Uses GitHub's [`POST /applications/{client_id}/token`](https://developer.github.com/v3/apps/oauth_applications/#check-a-token) endpoint |
-| `PATCH /api/github/oauth/token` | Resets a token (invalidates current one, returns new token). Must authenticate using token in `Authorization` header. Uses GitHub's [`PATCH /applications/{client_id}/token`](https://developer.github.com/v3/apps/oauth_applications/#reset-a-token) endpoint. |
-| `DELETE /api/github/oauth/token` | Invalidates current token, basically the equivalent of a logout. Must authenticate using token in `Authorization` header. |
-| `DELETE /api/github/oauth/grant` | Revokes the user's grant, basically the equivalent of an uninstall. must authenticate using token in `Authorization` header. |
-
-### `createNodeMiddleware(app, options)`
-
-Middleware for Node's built in http server or [`express`](https://expressjs.com/).
-
-```js
-const { App, createNodeMiddleware } = require("@octokit/app");
-const app = new App({
- appId: 123,
- privateKey: "-----BEGIN PRIVATE KEY-----\n...",
- oauth: {
- clientId: "0123",
- clientSecret: "0123secret",
- },
- webhooks: {
- secret: "secret",
- },
-});
-
-const middleware = createNodeMiddleware(app);
-
-require("http").createServer(middleware).listen(3000);
-// can now receive user authorization callbacks at /api/github/*
-```
-
-
-
-
-
- name
-
-
- type
-
-
- description
-
-
-
-
-
-
- app
-
-
- App instance
-
-
- Required.
-
-
-
-
- options.pathPrefix
-
-
- string
-
-
-
-All exposed paths will be prefixed with the provided prefix. Defaults to `"/api/github"`
-
-
-
-
-
- log
-
- object
-
-
-
-
-Used for internal logging. Defaults to [`console`](https://developer.mozilla.org/en-US/docs/Web/API/console) with `debug` and `info` doing nothing.
-
-
-
-⚠️ `@octokit/auth-app` is not meant for usage in the browser. A private key and client secret must not be exposed to users.
-
-The private keys provided by GitHub are in `PKCS#1` format, but the WebCrypto API only supports `PKCS#8`. You need to convert it first:
-
-```shell
-openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in private-key.pem -out private-key-pkcs8.key
-```
-
-The OAuth APIs to create user-to-server tokens cannot be used because they do not have CORS enabled.
-
-If you know what you are doing, load `@octokit/auth-app` directly from [cdn.skypack.dev](https://cdn.skypack.dev)
-
-```html
-
-```
-
-
-
-⚠️ `@octokit/auth-app` is not meant for usage in the browser. A private key and client secret must not be exposed to users.
-
-The private keys provided by GitHub are in `PKCS#1` format, but the WebCrypto API only supports `PKCS#8`. You need to convert it first:
-
-```shell
-openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in private-key.pem -out private-key-pkcs8.key
-```
-
-The OAuth APIs to create user-to-server tokens cannot be used because they do not have CORS enabled.
-
-If you know what you are doing, load `@octokit/auth-app` and `@octokit/core` (or a compatible module) directly from [cdn.skypack.dev](https://cdn.skypack.dev)
-
-```html
-
-```
-
-
-
-```js
-const appOctokit = new Octokit({
- authStrategy: createAppAuth,
- auth: {
- appId: 1,
- privateKey: "-----BEGIN PRIVATE KEY-----\n...",
- clientId: "1234567890abcdef1234",
- clientSecret: "1234567890abcdef1234567890abcdef12345678",
- },
-});
-
-// Send requests as GitHub App
-const { slug } = await appOctokit.request("GET /user");
-console.log("authenticated as %s", slug);
-
-// Send requests as OAuth App
-await appOctokit.request("POST /application/{client_id}/token", {
- client_id: "1234567890abcdef1234",
- access_token: "existingtoken123",
-});
-console.log("token is valid");
-
-// create a new octokit instance that is authenticated as the user
-const userOctokit = await appOctokit.auth({
- type: "oauth-user",
- code: "code123",
- factory: (options) => {
- return new Octokit({
- authStrategy: createOAuthUserAuth,
- auth: options,
- });
- },
-});
-
-// Exchanges the code for the user access token authentication on first request
-// and caches the authentication for successive requests
-const {
- data: { login },
-} = await userOctokit.request("GET /user");
-console.log("Hello, %s!", login);
-```
-
-In order to create an `octokit` instance that is authenticated as an installation, with automated installation token refresh, set `installationId` as `auth` option
-
-```js
-const installationOctokit = new Octokit({
- authStrategy: createAppAuth,
- auth: {
- appId: 1,
- privateKey: "-----BEGIN PRIVATE KEY-----\n...",
- installationId: 123,
- },
-});
-
-// transparently creates an installation access token the first time it is needed
-// and refreshes it when it expires
-await installationOctokit.request("POST /repos/{owner}/{repo}/issues", {
- owner: "octocat",
- repo: "hello-world",
- title: "title",
-});
-```
-
-## `createAppAuth(options)` or `new Octokit({ auth })`
-
-
-
-
-
- name
-
-
- type
-
-
- description
-
-
-
-
-
-
- appId
-
-
- number
-
-
- Required. Find App ID on the app’s about page in settings.
-
-
-
-
- privateKey
-
-
- string
-
-
- Required. Content of the *.pem file you downloaded from the app’s about page. You can generate a new private key if needed.
-
-
-
-
- installationId
-
-
- number
-
-
- Default installationId to be used when calling auth({ type: "installation" }).
-
-
-
-
- clientId
-
-
- string
-
-
- The client ID of the GitHub App.
-
-
-
-
- clientSecret
-
-
- string
-
-
- A client secret for the GitHub App.
-
-
-
-
- request
-
-
- function
-
-
-
-Automatically set to `octokit.request` when using with an `Octokit` constructor.
-
-For standalone usage, you can pass in your own [`@octokit/request`](https://github.com/octokit/request.js) instance. For usage with enterprise, set `baseUrl` to the hostname + `/api/v3`. Example:
-
-```js
-const { request } = require("@octokit/request");
-createAppAuth({
- appId: 1,
- privateKey: "-----BEGIN PRIVATE KEY-----\n...",
- request: request.defaults({
- baseUrl: "https://ghe.my-company.com/api/v3",
- }),
-});
-```
-
-
-
-
- cache
-
-
- object
-
-
- Installation tokens expire after an hour. By default, @octokit/auth-app is caching up to 15000 tokens simultaneously using lru-cache. You can pass your own cache implementation by passing options.cache.{get,set} to the constructor. Example:
-
-```js
-const CACHE = {};
-createAppAuth({
- appId: 1,
- privateKey: "-----BEGIN PRIVATE KEY-----\n...",
- cache: {
- async get(key) {
- return CACHE[key];
- },
- async set(key, value) {
- CACHE[key] = value;
- },
- },
-});
-```
-
-
-
-
- log
-
-
- object
-
-
- You can pass in your preferred logging tool by passing option.log to the constructor. If you would like to make the log level configurable using an environment variable or external option, we recommend the console-log-level package. For example:
-
-```js
-createAppAuth({
- appId: 1,
- privateKey: "-----BEGIN PRIVATE KEY-----\n...",
- log: require("console-log-level")({ level: "info" }),
-});
-```
-
-
-
-
-
-## `auth(options)` or `octokit.auth(options)`
-
-The async `auth()` method accepts different options depending on your use case
-
-### JSON Web Token (JWT) Authentication
-
-Authenticate as the GitHub app to list installations, repositories, and create installation access tokens.
-
-
- Required unless a default installationId was passed to createAppAuth(). ID of installation to retrieve authentication for.
-
-
-
-
- repositoryIds
-
-
- array of numbers
-
-
- The id of the repositories that the installation token can access. Also known as a databaseID when querying the repository object in GitHub's GraphQL API. This option is **(recommended)** over repositoryNames when needing to limit the scope of the access token, due to repositoryNames having the possibility of changing. Additionally, you should only include either repositoryIds or repositoryNames, but not both.
-
-
-
-
- repositoryNames
-
-
- array of strings
-
-
- The name of the repositories that the installation token can access. As mentioned in the repositoryIds description, you should only include either repositoryIds or repositoryNames, but not both.
-
-
-
-
- permissions
-
-
- object
-
-
- The permissions granted to the access token. The permissions object includes the permission names and their access type. For a complete list of permissions and allowable values, see GitHub App permissions.
-
-
-
-
- factory
-
-
- function
-
-
-
-The `auth({type: "installation", installationId, factory })` call with resolve with whatever the factory function returns. The `factory` function will be called with all the strategy option that `auth` was created with, plus the additional options passed to `auth`, besides `type` and `factory`.
-
-For example, you can create a new `auth` instance for an installation which shares the internal state (especially the access token cache) with the calling `auth` instance:
-
-```js
-const appAuth = createAppAuth({
- appId: 1,
- privateKey: "-----BEGIN PRIVATE KEY-----\n...",
-});
-
-const installationAuth123 = await appAuth({
- type: "installation",
- installationId: 123,
- factory: createAppAuth,
-});
-```
-
-
-
-
-
- refresh
-
-
- boolean
-
-
-
-Installation tokens expire after one hour. By default, tokens are cached and returned from cache until expired. To bypass and update a cached token for the given `installationId`, set `refresh` to `true`.
-
-Defaults to `false`.
-
-
-
-
-
-
-### User authentication (web flow)
-
-Exchange code received from the web flow redirect described in [step 2 of GitHub's OAuth web flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#web-application-flow)
-
-
-
-
-
- name
-
-
- type
-
-
- description
-
-
-
-
-
-
- type
-
-
- string
-
-
- Required. Must be "oauth-user".
-
-
-
-
- factory
-
-
- function
-
-
-
-The `auth({type: "oauth-user", factory })` call with resolve with whatever the factory function returns. The `factory` function will be called with all the strategy option that `auth` was created with, plus the additional options passed to `auth`, besides `type` and `factory`.
-
-For example, you can create a new `auth` instance for an installation which shares the internal state (especially the access token cache) with the calling `auth` instance:
-
-```js
-const {
- createAppAuth,
- createOAuthUserAuth,
-} = require("@octokit/auth-oauth-app");
-
-const appAuth = createAppAuth({
- appId: 1,
- privateKey: "-----BEGIN PRIVATE KEY-----\n...",
- clientId: "lv1.1234567890abcdef",
- clientSecret: "1234567890abcdef1234567890abcdef12345678",
-});
-
-const userAuth = await appAuth({
- type: "oauth-user",
- code,
- factory: createOAuthUserAuth,
-});
-
-// will create token upon first call, then cache authentication for successive calls,
-// until token needs to be refreshed (if enabled for the GitHub App)
-const authentication = await userAuth();
-```
-
-
-
-
-
- code
-
-
- string
-
-
- The authorization code which was passed as query parameter to the callback URL from the OAuth web application flow.
-
-
-
-
- redirectUrl
-
-
- string
-
-
- The URL in your application where users are sent after authorization. See redirect urls.
-
-
-### User authentication (device flow)
-
-Create a token using [GitHub's device flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#device-flow).
-
-The device flow does not require a client secret, but it is required as strategy option for `@octokit/auth-app`, even for the device flow. If you want to implement the device flow without requiring a client secret, use [`@octokit/auth-oauth-device`](https://github.com/octokit/auth-oauth-device.js#readme).
-
-
-
-
-
- name
-
-
- type
-
-
- description
-
-
-
-
-
-
- type
-
-
- string
-
-
- Required. Must be "oauth-user".
-
-
-
-
- onVerification
-
-
- function
-
-
-
-**Required**. A function that is called once the device and user codes were retrieved.
-
-The `onVerification()` callback can be used to pause until the user completes step 2, which might result in a better user experience.
-
-```js
-const auth = auth({
- type: "oauth-user",
- onVerification(verification) {
- console.log("Open %s", verification.verification_uri);
- console.log("Enter code: %s", verification.user_code);
- await prompt("press enter when you are ready to continue");
- },
-});
-```
-
-
-
-
-
- factory
-
-
- function
-
-
-
-The `auth({type: "oauth-user", factory })` call with resolve with whatever the factory function returns. The `factory` function will be called with all the strategy option that `auth` was created with, plus the additional options passed to `auth`, besides `type` and `factory`.
-
-For example, you can create a new `auth` instance for an installation which shares the internal state (especially the access token cache) with the calling `auth` instance:
-
-```js
-const {
- createAppAuth,
- createOAuthUserAuth,
-} = require("@octokit/auth-oauth-app");
-
-const appAuth = createAppAuth({
- appId: 1,
- privateKey: "-----BEGIN PRIVATE KEY-----\n...",
- clientId: "lv1.1234567890abcdef",
- clientSecret: "1234567890abcdef1234567890abcdef12345678",
-});
-
-const userAuth = await appAuth({
- type: "oauth-user",
- code,
- factory: createOAuthUserAuth,
-});
-
-// will create token upon first call, then cache authentication for successive calls,
-// until token needs to be refreshed (if enabled for the GitHub App)
-const authentication = await userAuth();
-```
-
-
-
-
-
-
-## Authentication object
-
-Depending on on the `auth()` call, the resulting authentication object can be one of
-
-1. JSON Web Token (JWT) authentication
-1. OAuth App authentication
-1. Installation access token authentication
-1. GitHub APP user authentication token with expiring disabled
-1. GitHub APP user authentication token with expiring enabled
-
-### JSON Web Token (JWT) authentication
-
-
-
-
-
- name
-
-
- type
-
-
- description
-
-
-
-
-
-
- type
-
-
- string
-
-
- "app"
-
-
-
-
- token
-
-
- string
-
-
- The JSON Web Token (JWT) to authenticate as the app.
-
-
-
-
- appId
-
-
- number
-
-
- GitHub App database ID.
-
-
-
-
- expiresAt
-
-
- string
-
-
- Timestamp in UTC format, e.g. "2018-07-07T00:09:30.000Z". A Date object can be created using new Date(authentication.expiresAt).
-
-
-
-
-
-### OAuth App authentication
-
-
-
-
-
- name
-
-
- type
-
-
- description
-
-
-
-
-
-
- type
-
-
- string
-
-
- "oauth-app"
-
-
-
-
- clientType
-
-
- string
-
-
- "github-app"
-
-
-
-
- clientId
-
-
- string
-
-
- The client ID as passed to the constructor.
-
-
-
-
- clientSecret
-
-
- string
-
-
- The client secret as passed to the constructor.
-
- Timestamp in UTC format, e.g. "2018-07-07T00:00:00.000Z". A Date object can be created using new Date(authentication.expiresAt).
-
-
-
-
- expiresAt
-
-
- string
-
-
- Timestamp in UTC format, e.g. "2018-07-07T00:59:00.000Z". A Date object can be created using new Date(authentication.expiresAt).
-
-
-
-
- repositoryIds
-
-
- array of numbers
-
-
- Only present if repositoryIds option passed to auth(options).
-
-
-
-
- repositoryNames
-
-
- array of strings
-
-
- Only present if repositoryNames option passed to auth(options).
-
-
-
-
- permissions
-
-
- object
-
-
- An object where keys are the permission name and the value is either "read" or "write". See the list of all GitHub App Permissions.
-
-
-
-
- singleFileName
-
-
- string
-
-
- If the single file permission is enabled, the singleFileName property is set to the path of the accessible file.
-
-
-
-
-
-### GitHub APP user authentication token with expiring disabled
-
-
-
-
-
- name
-
-
- type
-
-
- description
-
-
-
-
-
-
- type
-
-
- string
-
-
- "token"
-
-
-
-
- tokenType
-
-
- string
-
-
- "oauth"
-
-
-
-
- clientType
-
-
- string
-
-
- "github-app"
-
-
-
-
- clientId
-
-
- string
-
-
- The app's Client ID
-
-
-
-
- clientSecret
-
-
- string
-
-
- One of the app's client secrets
-
-
-
-
- token
-
-
- string
-
-
- The user access token
-
-
-
-
-
-### GitHub APP user authentication token with expiring enabled
-
-
-
-
-
- name
-
-
- type
-
-
- description
-
-
-
-
-
-
- type
-
-
- string
-
-
- "token"
-
-
-
-
- tokenType
-
-
- string
-
-
- "oauth"
-
-
-
-
- clientType
-
-
- string
-
-
- "github-app"
-
-
-
-
- clientId
-
-
- string
-
-
- The app's Client ID
-
-
-
-
- clientSecret
-
-
- string
-
-
- One of the app's client secrets
-
-
-
-
- token
-
-
- string
-
-
- The user access token
-
-
-
-
- refreshToken
-
-
- string
-
-
- The refresh token
-
-
-
-
- expiresAt
-
-
- string
-
-
- Date timestamp in ISO 8601 standard. Example: 2022-01-01T08:00:0.000Z
-
-
-
-
- refreshTokenExpiresAt
-
-
- string
-
-
- Date timestamp in ISO 8601 standard. Example: 2021-07-01T00:00:0.000Z
-
-
-
-
-
-## `auth.hook(request, route, parameters)` or `auth.hook(request, options)`
-
-`auth.hook()` hooks directly into the request life cycle. It amends the request to authenticate either as app or as installation based on the request URL. Although the `"machine-man"` preview has graduated to the official API, https://developer.github.com/changes/2020-08-20-graduate-machine-man-and-sailor-v-previews/, it is still required in versions of GitHub Enterprise up to 2.21 so it automatically sets the `"machine-man"` preview for all endpoints requiring JWT authentication.
-
-The `request` option is an instance of [`@octokit/request`](https://github.com/octokit/request.js#readme). The arguments are the same as for the [`request()` method](https://github.com/octokit/request.js#request).
-
-`auth.hook()` can be called directly to send an authenticated request
-
-```js
-const { data: installations } = await auth.hook(
- request,
- "GET /app/installations"
-);
-```
-
-Or it can be passed as option to [`request()`](https://github.com/octokit/request.js#request).
-
-```js
-const requestWithAuth = request.defaults({
- request: {
- hook: auth.hook,
- },
-});
-
-const { data: installations } = await requestWithAuth("GET /app/installations");
-```
-
-Note that `auth.hook()` does not create and set an OAuth authentication token. But you can use [`@octokit/auth-oauth-app`](https://github.com/octokit/auth-oauth-app.js#readme) for that functionality. And if you don't plan on sending requests to routes that require authentication with `client_id` and `client_secret`, you can just retrieve the token and then create a new instance of [`request()`](https://github.com/octokit/request.js#request) with the authentication header set:
-
-```js
-const { token } = await auth({
- type: "oauth-user",
- code: "123456",
-});
-const requestWithAuth = request.defaults({
- headers: {
- authentication: `token ${token}`,
- },
-});
-```
-
-## Types
-
-```ts
-import {
- // strategy options
- StrategyOptions,
- // auth options
- AuthOptions,
- AppAuthOptions,
- OAuthAppAuthOptions,
- InstallationAuthOptions,
- OAuthWebFlowAuthOptions,
- OAuthDeviceFlowAuthOptions,
- // authentication objects
- Authentication,
- AppAuthentication,
- OAuthAppAuthentication,
- InstallationAccessTokenAuthentication,
- GitHubAppUserAuthentication,
- GitHubAppUserAuthenticationWithExpiration,
-} from "@octokit/auth-app";
-```
-
-## Implementation details
-
-When creating a JSON Web Token, it sets the "issued at time" (iat) to 30s in the past as we have seen people running situations where the GitHub API claimed the iat would be in future. It turned out the clocks on the different machine were not in sync.
-
-Installation access tokens are valid for 60 minutes. This library invalidates them after 59 minutes to account for request delays.
-
-All OAuth features are implemented internally using [@octokit/auth-oauth-app](https://github.com/octokit/auth-oauth-app.js/#readme).
-
-## License
-
-[MIT](LICENSE)
diff --git a/node_modules/@octokit/auth-app/dist-node/index.js b/node_modules/@octokit/auth-app/dist-node/index.js
deleted file mode 100644
index 4635c60..0000000
--- a/node_modules/@octokit/auth-app/dist-node/index.js
+++ /dev/null
@@ -1,452 +0,0 @@
-'use strict';
-
-Object.defineProperty(exports, '__esModule', { value: true });
-
-function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
-
-var universalUserAgent = require('universal-user-agent');
-var request = require('@octokit/request');
-var authOauthApp = require('@octokit/auth-oauth-app');
-var deprecation = require('deprecation');
-var universalGithubAppJwt = require('universal-github-app-jwt');
-var LRU = _interopDefault(require('lru-cache'));
-var authOauthUser = require('@octokit/auth-oauth-user');
-
-async function getAppAuthentication({
- appId,
- privateKey,
- timeDifference
-}) {
- try {
- const appAuthentication = await universalGithubAppJwt.githubAppJwt({
- id: +appId,
- privateKey,
- now: timeDifference && Math.floor(Date.now() / 1000) + timeDifference
- });
- return {
- type: "app",
- token: appAuthentication.token,
- appId: appAuthentication.appId,
- expiresAt: new Date(appAuthentication.expiration * 1000).toISOString()
- };
- } catch (error) {
- if (privateKey === "-----BEGIN RSA PRIVATE KEY-----") {
- throw new Error("The 'privateKey` option contains only the first line '-----BEGIN RSA PRIVATE KEY-----'. If you are setting it using a `.env` file, make sure it is set on a single line with newlines replaced by '\n'");
- } else {
- throw error;
- }
- }
-}
-
-// https://github.com/isaacs/node-lru-cache#readme
-function getCache() {
- return new LRU({
- // cache max. 15000 tokens, that will use less than 10mb memory
- max: 15000,
- // Cache for 1 minute less than GitHub expiry
- maxAge: 1000 * 60 * 59
- });
-}
-async function get(cache, options) {
- const cacheKey = optionsToCacheKey(options);
- const result = await cache.get(cacheKey);
-
- if (!result) {
- return;
- }
-
- const [token, createdAt, expiresAt, repositorySelection, permissionsString, singleFileName] = result.split("|");
- const permissions = options.permissions || permissionsString.split(/,/).reduce((permissions, string) => {
- if (/!$/.test(string)) {
- permissions[string.slice(0, -1)] = "write";
- } else {
- permissions[string] = "read";
- }
-
- return permissions;
- }, {});
- return {
- token,
- createdAt,
- expiresAt,
- permissions,
- repositoryIds: options.repositoryIds,
- repositoryNames: options.repositoryNames,
- singleFileName,
- repositorySelection: repositorySelection
- };
-}
-async function set(cache, options, data) {
- const key = optionsToCacheKey(options);
- const permissionsString = options.permissions ? "" : Object.keys(data.permissions).map(name => `${name}${data.permissions[name] === "write" ? "!" : ""}`).join(",");
- const value = [data.token, data.createdAt, data.expiresAt, data.repositorySelection, permissionsString, data.singleFileName].join("|");
- await cache.set(key, value);
-}
-
-function optionsToCacheKey({
- installationId,
- permissions = {},
- repositoryIds = [],
- repositoryNames = []
-}) {
- const permissionsString = Object.keys(permissions).sort().map(name => permissions[name] === "read" ? name : `${name}!`).join(",");
- const repositoryIdsString = repositoryIds.sort().join(",");
- const repositoryNamesString = repositoryNames.join(",");
- return [installationId, repositoryIdsString, repositoryNamesString, permissionsString].filter(Boolean).join("|");
-}
-
-function toTokenAuthentication({
- installationId,
- token,
- createdAt,
- expiresAt,
- repositorySelection,
- permissions,
- repositoryIds,
- repositoryNames,
- singleFileName
-}) {
- return Object.assign({
- type: "token",
- tokenType: "installation",
- token,
- installationId,
- permissions,
- createdAt,
- expiresAt,
- repositorySelection
- }, repositoryIds ? {
- repositoryIds
- } : null, repositoryNames ? {
- repositoryNames
- } : null, singleFileName ? {
- singleFileName
- } : null);
-}
-
-async function getInstallationAuthentication(state, options, customRequest) {
- const installationId = Number(options.installationId || state.installationId);
-
- if (!installationId) {
- throw new Error("[@octokit/auth-app] installationId option is required for installation authentication.");
- }
-
- if (options.factory) {
- const {
- type,
- factory,
- oauthApp,
- ...factoryAuthOptions
- } = { ...state,
- ...options
- }; // @ts-expect-error if `options.factory` is set, the return type for `auth()` should be `Promise>`
-
- return factory(factoryAuthOptions);
- }
-
- const optionsWithInstallationTokenFromState = Object.assign({
- installationId
- }, options);
-
- if (!options.refresh) {
- const result = await get(state.cache, optionsWithInstallationTokenFromState);
-
- if (result) {
- const {
- token,
- createdAt,
- expiresAt,
- permissions,
- repositoryIds,
- repositoryNames,
- singleFileName,
- repositorySelection
- } = result;
- return toTokenAuthentication({
- installationId,
- token,
- createdAt,
- expiresAt,
- permissions,
- repositorySelection,
- repositoryIds,
- repositoryNames,
- singleFileName
- });
- }
- }
-
- const appAuthentication = await getAppAuthentication(state);
- const request = customRequest || state.request;
- const {
- data: {
- token,
- expires_at: expiresAt,
- repositories,
- permissions: permissionsOptional,
- repository_selection: repositorySelectionOptional,
- single_file: singleFileName
- }
- } = await request("POST /app/installations/{installation_id}/access_tokens", {
- installation_id: installationId,
- repository_ids: options.repositoryIds,
- repositories: options.repositoryNames,
- permissions: options.permissions,
- mediaType: {
- previews: ["machine-man"]
- },
- headers: {
- authorization: `bearer ${appAuthentication.token}`
- }
- });
- /* istanbul ignore next - permissions are optional per OpenAPI spec, but we think that is incorrect */
-
- const permissions = permissionsOptional || {};
- /* istanbul ignore next - repositorySelection are optional per OpenAPI spec, but we think that is incorrect */
-
- const repositorySelection = repositorySelectionOptional || "all";
- const repositoryIds = repositories ? repositories.map(r => r.id) : void 0;
- const repositoryNames = repositories ? repositories.map(repo => repo.name) : void 0;
- const createdAt = new Date().toISOString();
- await set(state.cache, optionsWithInstallationTokenFromState, {
- token,
- createdAt,
- expiresAt,
- repositorySelection,
- permissions,
- repositoryIds,
- repositoryNames,
- singleFileName
- });
- return toTokenAuthentication({
- installationId,
- token,
- createdAt,
- expiresAt,
- repositorySelection,
- permissions,
- repositoryIds,
- repositoryNames,
- singleFileName
- });
-}
-
-async function auth(state, authOptions) {
- switch (authOptions.type) {
- case "app":
- return getAppAuthentication(state);
- // @ts-expect-error "oauth" is not supperted in types
-
- case "oauth":
- state.log.warn( // @ts-expect-error `log.warn()` expects string
- new deprecation.Deprecation(`[@octokit/auth-app] {type: "oauth"} is deprecated. Use {type: "oauth-app"} instead`));
-
- case "oauth-app":
- return state.oauthApp({
- type: "oauth-app"
- });
-
- case "installation":
- return getInstallationAuthentication(state, { ...authOptions,
- type: "installation"
- });
-
- case "oauth-user":
- // @ts-expect-error TODO: infer correct auth options type based on type. authOptions should be typed as "WebFlowAuthOptions | OAuthAppDeviceFlowAuthOptions | GitHubAppDeviceFlowAuthOptions"
- return state.oauthApp(authOptions);
-
- default:
- // @ts-expect-error type is "never" at this point
- throw new Error(`Invalid auth type: ${authOptions.type}`);
- }
-}
-
-const PATHS = ["/app", "/app/hook/config", "/app/hook/deliveries", "/app/hook/deliveries/{delivery_id}", "/app/hook/deliveries/{delivery_id}/attempts", "/app/installations", "/app/installations/{installation_id}", "/app/installations/{installation_id}/access_tokens", "/app/installations/{installation_id}/suspended", "/marketplace_listing/accounts/{account_id}", "/marketplace_listing/plan", "/marketplace_listing/plans", "/marketplace_listing/plans/{plan_id}/accounts", "/marketplace_listing/stubbed/accounts/{account_id}", "/marketplace_listing/stubbed/plan", "/marketplace_listing/stubbed/plans", "/marketplace_listing/stubbed/plans/{plan_id}/accounts", "/orgs/{org}/installation", "/repos/{owner}/{repo}/installation", "/users/{username}/installation"]; // CREDIT: Simon Grondin (https://github.com/SGrondin)
-// https://github.com/octokit/plugin-throttling.js/blob/45c5d7f13b8af448a9dbca468d9c9150a73b3948/lib/route-matcher.js
-
-function routeMatcher(paths) {
- // EXAMPLE. For the following paths:
-
- /* [
- "/orgs/{org}/invitations",
- "/repos/{owner}/{repo}/collaborators/{username}"
- ] */
- const regexes = paths.map(p => p.split("/").map(c => c.startsWith("{") ? "(?:.+?)" : c).join("/")); // 'regexes' would contain:
-
- /* [
- '/orgs/(?:.+?)/invitations',
- '/repos/(?:.+?)/(?:.+?)/collaborators/(?:.+?)'
- ] */
-
- const regex = `^(?:${regexes.map(r => `(?:${r})`).join("|")})[^/]*$`; // 'regex' would contain:
-
- /*
- ^(?:(?:\/orgs\/(?:.+?)\/invitations)|(?:\/repos\/(?:.+?)\/(?:.+?)\/collaborators\/(?:.+?)))[^\/]*$
- It may look scary, but paste it into https://www.debuggex.com/
- and it will make a lot more sense!
- */
-
- return new RegExp(regex, "i");
-}
-
-const REGEX = routeMatcher(PATHS);
-function requiresAppAuth(url) {
- return !!url && REGEX.test(url);
-}
-
-const FIVE_SECONDS_IN_MS = 5 * 1000;
-
-function isNotTimeSkewError(error) {
- return !(error.message.match(/'Expiration time' claim \('exp'\) must be a numeric value representing the future time at which the assertion expires/) || error.message.match(/'Issued at' claim \('iat'\) must be an Integer representing the time that the assertion was issued/));
-}
-
-async function hook(state, request, route, parameters) {
- const endpoint = request.endpoint.merge(route, parameters);
- const url = endpoint.url; // Do not intercept request to retrieve a new token
-
- if (/\/login\/oauth\/access_token$/.test(url)) {
- return request(endpoint);
- }
-
- if (requiresAppAuth(url.replace(request.endpoint.DEFAULTS.baseUrl, ""))) {
- const {
- token
- } = await getAppAuthentication(state);
- endpoint.headers.authorization = `bearer ${token}`;
- let response;
-
- try {
- response = await request(endpoint);
- } catch (error) {
- // If there's an issue with the expiration, regenerate the token and try again.
- // Otherwise rethrow the error for upstream handling.
- if (isNotTimeSkewError(error)) {
- throw error;
- } // If the date header is missing, we can't correct the system time skew.
- // Throw the error to be handled upstream.
-
-
- if (typeof error.response.headers.date === "undefined") {
- throw error;
- }
-
- const diff = Math.floor((Date.parse(error.response.headers.date) - Date.parse(new Date().toString())) / 1000);
- state.log.warn(error.message);
- state.log.warn(`[@octokit/auth-app] GitHub API time and system time are different by ${diff} seconds. Retrying request with the difference accounted for.`);
- const {
- token
- } = await getAppAuthentication({ ...state,
- timeDifference: diff
- });
- endpoint.headers.authorization = `bearer ${token}`;
- return request(endpoint);
- }
-
- return response;
- }
-
- if (authOauthUser.requiresBasicAuth(url)) {
- const authentication = await state.oauthApp({
- type: "oauth-app"
- });
- endpoint.headers.authorization = authentication.headers.authorization;
- return request(endpoint);
- }
-
- const {
- token,
- createdAt
- } = await getInstallationAuthentication(state, // @ts-expect-error TBD
- {}, request);
- endpoint.headers.authorization = `token ${token}`;
- return sendRequestWithRetries(state, request, endpoint, createdAt);
-}
-/**
- * Newly created tokens might not be accessible immediately after creation.
- * In case of a 401 response, we retry with an exponential delay until more
- * than five seconds pass since the creation of the token.
- *
- * @see https://github.com/octokit/auth-app.js/issues/65
- */
-
-async function sendRequestWithRetries(state, request, options, createdAt, retries = 0) {
- const timeSinceTokenCreationInMs = +new Date() - +new Date(createdAt);
-
- try {
- return await request(options);
- } catch (error) {
- if (error.status !== 401) {
- throw error;
- }
-
- if (timeSinceTokenCreationInMs >= FIVE_SECONDS_IN_MS) {
- if (retries > 0) {
- error.message = `After ${retries} retries within ${timeSinceTokenCreationInMs / 1000}s of creating the installation access token, the response remains 401. At this point, the cause may be an authentication problem or a system outage. Please check https://www.githubstatus.com for status information`;
- }
-
- throw error;
- }
-
- ++retries;
- const awaitTime = retries * 1000;
- state.log.warn(`[@octokit/auth-app] Retrying after 401 response to account for token replication delay (retry: ${retries}, wait: ${awaitTime / 1000}s)`);
- await new Promise(resolve => setTimeout(resolve, awaitTime));
- return sendRequestWithRetries(state, request, options, createdAt, retries);
- }
-}
-
-const VERSION = "4.0.7";
-
-function createAppAuth(options) {
- if (!options.appId) {
- throw new Error("[@octokit/auth-app] appId option is required");
- }
-
- if (!Number.isFinite(+options.appId)) {
- throw new Error("[@octokit/auth-app] appId option must be a number or numeric string");
- }
-
- if (!options.privateKey) {
- throw new Error("[@octokit/auth-app] privateKey option is required");
- }
-
- if ("installationId" in options && !options.installationId) {
- throw new Error("[@octokit/auth-app] installationId is set to a falsy value");
- }
-
- const log = Object.assign({
- warn: console.warn.bind(console)
- }, options.log);
- const request$1 = options.request || request.request.defaults({
- headers: {
- "user-agent": `octokit-auth-app.js/${VERSION} ${universalUserAgent.getUserAgent()}`
- }
- });
- const state = Object.assign({
- request: request$1,
- cache: getCache()
- }, options, options.installationId ? {
- installationId: Number(options.installationId)
- } : {}, {
- log,
- oauthApp: authOauthApp.createOAuthAppAuth({
- clientType: "github-app",
- clientId: options.clientId || "",
- clientSecret: options.clientSecret || "",
- request: request$1
- })
- }); // @ts-expect-error not worth the extra code to appease TS
-
- return Object.assign(auth.bind(null, state), {
- hook: hook.bind(null, state)
- });
-}
-
-Object.defineProperty(exports, 'createOAuthUserAuth', {
- enumerable: true,
- get: function () {
- return authOauthUser.createOAuthUserAuth;
- }
-});
-exports.createAppAuth = createAppAuth;
-//# sourceMappingURL=index.js.map
diff --git a/node_modules/@octokit/auth-app/dist-node/index.js.map b/node_modules/@octokit/auth-app/dist-node/index.js.map
deleted file mode 100644
index 19f343a..0000000
--- a/node_modules/@octokit/auth-app/dist-node/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sources":["../dist-src/get-app-authentication.js","../dist-src/cache.js","../dist-src/to-token-authentication.js","../dist-src/get-installation-authentication.js","../dist-src/auth.js","../dist-src/requires-app-auth.js","../dist-src/hook.js","../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["import { githubAppJwt } from \"universal-github-app-jwt\";\nexport async function getAppAuthentication({ appId, privateKey, timeDifference, }) {\n try {\n const appAuthentication = await githubAppJwt({\n id: +appId,\n privateKey,\n now: timeDifference && Math.floor(Date.now() / 1000) + timeDifference,\n });\n return {\n type: \"app\",\n token: appAuthentication.token,\n appId: appAuthentication.appId,\n expiresAt: new Date(appAuthentication.expiration * 1000).toISOString(),\n };\n }\n catch (error) {\n if (privateKey === \"-----BEGIN RSA PRIVATE KEY-----\") {\n throw new Error(\"The 'privateKey` option contains only the first line '-----BEGIN RSA PRIVATE KEY-----'. If you are setting it using a `.env` file, make sure it is set on a single line with newlines replaced by '\\n'\");\n }\n else {\n throw error;\n }\n }\n}\n","// https://github.com/isaacs/node-lru-cache#readme\nimport LRU from \"lru-cache\";\nexport function getCache() {\n return new LRU({\n // cache max. 15000 tokens, that will use less than 10mb memory\n max: 15000,\n // Cache for 1 minute less than GitHub expiry\n maxAge: 1000 * 60 * 59,\n });\n}\nexport async function get(cache, options) {\n const cacheKey = optionsToCacheKey(options);\n const result = await cache.get(cacheKey);\n if (!result) {\n return;\n }\n const [token, createdAt, expiresAt, repositorySelection, permissionsString, singleFileName,] = result.split(\"|\");\n const permissions = options.permissions ||\n permissionsString.split(/,/).reduce((permissions, string) => {\n if (/!$/.test(string)) {\n permissions[string.slice(0, -1)] = \"write\";\n }\n else {\n permissions[string] = \"read\";\n }\n return permissions;\n }, {});\n return {\n token,\n createdAt,\n expiresAt,\n permissions,\n repositoryIds: options.repositoryIds,\n repositoryNames: options.repositoryNames,\n singleFileName,\n repositorySelection: repositorySelection,\n };\n}\nexport async function set(cache, options, data) {\n const key = optionsToCacheKey(options);\n const permissionsString = options.permissions\n ? \"\"\n : Object.keys(data.permissions)\n .map((name) => `${name}${data.permissions[name] === \"write\" ? \"!\" : \"\"}`)\n .join(\",\");\n const value = [\n data.token,\n data.createdAt,\n data.expiresAt,\n data.repositorySelection,\n permissionsString,\n data.singleFileName,\n ].join(\"|\");\n await cache.set(key, value);\n}\nfunction optionsToCacheKey({ installationId, permissions = {}, repositoryIds = [], repositoryNames = [], }) {\n const permissionsString = Object.keys(permissions)\n .sort()\n .map((name) => (permissions[name] === \"read\" ? name : `${name}!`))\n .join(\",\");\n const repositoryIdsString = repositoryIds.sort().join(\",\");\n const repositoryNamesString = repositoryNames.join(\",\");\n return [\n installationId,\n repositoryIdsString,\n repositoryNamesString,\n permissionsString,\n ]\n .filter(Boolean)\n .join(\"|\");\n}\n","export function toTokenAuthentication({ installationId, token, createdAt, expiresAt, repositorySelection, permissions, repositoryIds, repositoryNames, singleFileName, }) {\n return Object.assign({\n type: \"token\",\n tokenType: \"installation\",\n token,\n installationId,\n permissions,\n createdAt,\n expiresAt,\n repositorySelection,\n }, repositoryIds ? { repositoryIds } : null, repositoryNames ? { repositoryNames } : null, singleFileName ? { singleFileName } : null);\n}\n","import { get, set } from \"./cache\";\nimport { getAppAuthentication } from \"./get-app-authentication\";\nimport { toTokenAuthentication } from \"./to-token-authentication\";\nexport async function getInstallationAuthentication(state, options, customRequest) {\n const installationId = Number(options.installationId || state.installationId);\n if (!installationId) {\n throw new Error(\"[@octokit/auth-app] installationId option is required for installation authentication.\");\n }\n if (options.factory) {\n const { type, factory, oauthApp, ...factoryAuthOptions } = {\n ...state,\n ...options,\n };\n // @ts-expect-error if `options.factory` is set, the return type for `auth()` should be `Promise>`\n return factory(factoryAuthOptions);\n }\n const optionsWithInstallationTokenFromState = Object.assign({ installationId }, options);\n if (!options.refresh) {\n const result = await get(state.cache, optionsWithInstallationTokenFromState);\n if (result) {\n const { token, createdAt, expiresAt, permissions, repositoryIds, repositoryNames, singleFileName, repositorySelection, } = result;\n return toTokenAuthentication({\n installationId,\n token,\n createdAt,\n expiresAt,\n permissions,\n repositorySelection,\n repositoryIds,\n repositoryNames,\n singleFileName,\n });\n }\n }\n const appAuthentication = await getAppAuthentication(state);\n const request = customRequest || state.request;\n const { data: { token, expires_at: expiresAt, repositories, permissions: permissionsOptional, repository_selection: repositorySelectionOptional, single_file: singleFileName, }, } = await request(\"POST /app/installations/{installation_id}/access_tokens\", {\n installation_id: installationId,\n repository_ids: options.repositoryIds,\n repositories: options.repositoryNames,\n permissions: options.permissions,\n mediaType: {\n previews: [\"machine-man\"],\n },\n headers: {\n authorization: `bearer ${appAuthentication.token}`,\n },\n });\n /* istanbul ignore next - permissions are optional per OpenAPI spec, but we think that is incorrect */\n const permissions = permissionsOptional || {};\n /* istanbul ignore next - repositorySelection are optional per OpenAPI spec, but we think that is incorrect */\n const repositorySelection = repositorySelectionOptional || \"all\";\n const repositoryIds = repositories\n ? repositories.map((r) => r.id)\n : void 0;\n const repositoryNames = repositories\n ? repositories.map((repo) => repo.name)\n : void 0;\n const createdAt = new Date().toISOString();\n await set(state.cache, optionsWithInstallationTokenFromState, {\n token,\n createdAt,\n expiresAt,\n repositorySelection,\n permissions,\n repositoryIds,\n repositoryNames,\n singleFileName,\n });\n return toTokenAuthentication({\n installationId,\n token,\n createdAt,\n expiresAt,\n repositorySelection,\n permissions,\n repositoryIds,\n repositoryNames,\n singleFileName,\n });\n}\n","import { Deprecation } from \"deprecation\";\nimport { getAppAuthentication } from \"./get-app-authentication\";\nimport { getInstallationAuthentication } from \"./get-installation-authentication\";\nexport async function auth(state, authOptions) {\n switch (authOptions.type) {\n case \"app\":\n return getAppAuthentication(state);\n // @ts-expect-error \"oauth\" is not supperted in types\n case \"oauth\":\n state.log.warn(\n // @ts-expect-error `log.warn()` expects string\n new Deprecation(`[@octokit/auth-app] {type: \"oauth\"} is deprecated. Use {type: \"oauth-app\"} instead`));\n case \"oauth-app\":\n return state.oauthApp({ type: \"oauth-app\" });\n case \"installation\":\n authOptions;\n return getInstallationAuthentication(state, {\n ...authOptions,\n type: \"installation\",\n });\n case \"oauth-user\":\n // @ts-expect-error TODO: infer correct auth options type based on type. authOptions should be typed as \"WebFlowAuthOptions | OAuthAppDeviceFlowAuthOptions | GitHubAppDeviceFlowAuthOptions\"\n return state.oauthApp(authOptions);\n default:\n // @ts-expect-error type is \"never\" at this point\n throw new Error(`Invalid auth type: ${authOptions.type}`);\n }\n}\n","const PATHS = [\n \"/app\",\n \"/app/hook/config\",\n \"/app/hook/deliveries\",\n \"/app/hook/deliveries/{delivery_id}\",\n \"/app/hook/deliveries/{delivery_id}/attempts\",\n \"/app/installations\",\n \"/app/installations/{installation_id}\",\n \"/app/installations/{installation_id}/access_tokens\",\n \"/app/installations/{installation_id}/suspended\",\n \"/marketplace_listing/accounts/{account_id}\",\n \"/marketplace_listing/plan\",\n \"/marketplace_listing/plans\",\n \"/marketplace_listing/plans/{plan_id}/accounts\",\n \"/marketplace_listing/stubbed/accounts/{account_id}\",\n \"/marketplace_listing/stubbed/plan\",\n \"/marketplace_listing/stubbed/plans\",\n \"/marketplace_listing/stubbed/plans/{plan_id}/accounts\",\n \"/orgs/{org}/installation\",\n \"/repos/{owner}/{repo}/installation\",\n \"/users/{username}/installation\",\n];\n// CREDIT: Simon Grondin (https://github.com/SGrondin)\n// https://github.com/octokit/plugin-throttling.js/blob/45c5d7f13b8af448a9dbca468d9c9150a73b3948/lib/route-matcher.js\nfunction routeMatcher(paths) {\n // EXAMPLE. For the following paths:\n /* [\n \"/orgs/{org}/invitations\",\n \"/repos/{owner}/{repo}/collaborators/{username}\"\n ] */\n const regexes = paths.map((p) => p\n .split(\"/\")\n .map((c) => (c.startsWith(\"{\") ? \"(?:.+?)\" : c))\n .join(\"/\"));\n // 'regexes' would contain:\n /* [\n '/orgs/(?:.+?)/invitations',\n '/repos/(?:.+?)/(?:.+?)/collaborators/(?:.+?)'\n ] */\n const regex = `^(?:${regexes.map((r) => `(?:${r})`).join(\"|\")})[^/]*$`;\n // 'regex' would contain:\n /*\n ^(?:(?:\\/orgs\\/(?:.+?)\\/invitations)|(?:\\/repos\\/(?:.+?)\\/(?:.+?)\\/collaborators\\/(?:.+?)))[^\\/]*$\n \n It may look scary, but paste it into https://www.debuggex.com/\n and it will make a lot more sense!\n */\n return new RegExp(regex, \"i\");\n}\nconst REGEX = routeMatcher(PATHS);\nexport function requiresAppAuth(url) {\n return !!url && REGEX.test(url);\n}\n","import { requiresBasicAuth } from \"@octokit/auth-oauth-user\";\nimport { getAppAuthentication } from \"./get-app-authentication\";\nimport { getInstallationAuthentication } from \"./get-installation-authentication\";\nimport { requiresAppAuth } from \"./requires-app-auth\";\nconst FIVE_SECONDS_IN_MS = 5 * 1000;\nfunction isNotTimeSkewError(error) {\n return !(error.message.match(/'Expiration time' claim \\('exp'\\) must be a numeric value representing the future time at which the assertion expires/) ||\n error.message.match(/'Issued at' claim \\('iat'\\) must be an Integer representing the time that the assertion was issued/));\n}\nexport async function hook(state, request, route, parameters) {\n const endpoint = request.endpoint.merge(route, parameters);\n const url = endpoint.url;\n // Do not intercept request to retrieve a new token\n if (/\\/login\\/oauth\\/access_token$/.test(url)) {\n return request(endpoint);\n }\n if (requiresAppAuth(url.replace(request.endpoint.DEFAULTS.baseUrl, \"\"))) {\n const { token } = await getAppAuthentication(state);\n endpoint.headers.authorization = `bearer ${token}`;\n let response;\n try {\n response = await request(endpoint);\n }\n catch (error) {\n // If there's an issue with the expiration, regenerate the token and try again.\n // Otherwise rethrow the error for upstream handling.\n if (isNotTimeSkewError(error)) {\n throw error;\n }\n // If the date header is missing, we can't correct the system time skew.\n // Throw the error to be handled upstream.\n if (typeof error.response.headers.date === \"undefined\") {\n throw error;\n }\n const diff = Math.floor((Date.parse(error.response.headers.date) -\n Date.parse(new Date().toString())) /\n 1000);\n state.log.warn(error.message);\n state.log.warn(`[@octokit/auth-app] GitHub API time and system time are different by ${diff} seconds. Retrying request with the difference accounted for.`);\n const { token } = await getAppAuthentication({\n ...state,\n timeDifference: diff,\n });\n endpoint.headers.authorization = `bearer ${token}`;\n return request(endpoint);\n }\n return response;\n }\n if (requiresBasicAuth(url)) {\n const authentication = await state.oauthApp({ type: \"oauth-app\" });\n endpoint.headers.authorization = authentication.headers.authorization;\n return request(endpoint);\n }\n const { token, createdAt } = await getInstallationAuthentication(state, \n // @ts-expect-error TBD\n {}, request);\n endpoint.headers.authorization = `token ${token}`;\n return sendRequestWithRetries(state, request, endpoint, createdAt);\n}\n/**\n * Newly created tokens might not be accessible immediately after creation.\n * In case of a 401 response, we retry with an exponential delay until more\n * than five seconds pass since the creation of the token.\n *\n * @see https://github.com/octokit/auth-app.js/issues/65\n */\nasync function sendRequestWithRetries(state, request, options, createdAt, retries = 0) {\n const timeSinceTokenCreationInMs = +new Date() - +new Date(createdAt);\n try {\n return await request(options);\n }\n catch (error) {\n if (error.status !== 401) {\n throw error;\n }\n if (timeSinceTokenCreationInMs >= FIVE_SECONDS_IN_MS) {\n if (retries > 0) {\n error.message = `After ${retries} retries within ${timeSinceTokenCreationInMs / 1000}s of creating the installation access token, the response remains 401. At this point, the cause may be an authentication problem or a system outage. Please check https://www.githubstatus.com for status information`;\n }\n throw error;\n }\n ++retries;\n const awaitTime = retries * 1000;\n state.log.warn(`[@octokit/auth-app] Retrying after 401 response to account for token replication delay (retry: ${retries}, wait: ${awaitTime / 1000}s)`);\n await new Promise((resolve) => setTimeout(resolve, awaitTime));\n return sendRequestWithRetries(state, request, options, createdAt, retries);\n }\n}\n","export const VERSION = \"4.0.7\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { request as defaultRequest } from \"@octokit/request\";\nimport { createOAuthAppAuth } from \"@octokit/auth-oauth-app\";\nimport { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nimport { getCache } from \"./cache\";\nimport { VERSION } from \"./version\";\nexport { createOAuthUserAuth } from \"@octokit/auth-oauth-user\";\nexport function createAppAuth(options) {\n if (!options.appId) {\n throw new Error(\"[@octokit/auth-app] appId option is required\");\n }\n if (!Number.isFinite(+options.appId)) {\n throw new Error(\"[@octokit/auth-app] appId option must be a number or numeric string\");\n }\n if (!options.privateKey) {\n throw new Error(\"[@octokit/auth-app] privateKey option is required\");\n }\n if (\"installationId\" in options && !options.installationId) {\n throw new Error(\"[@octokit/auth-app] installationId is set to a falsy value\");\n }\n const log = Object.assign({\n warn: console.warn.bind(console),\n }, options.log);\n const request = options.request ||\n defaultRequest.defaults({\n headers: {\n \"user-agent\": `octokit-auth-app.js/${VERSION} ${getUserAgent()}`,\n },\n });\n const state = Object.assign({\n request,\n cache: getCache(),\n }, options, options.installationId\n ? { installationId: Number(options.installationId) }\n : {}, {\n log,\n oauthApp: createOAuthAppAuth({\n clientType: \"github-app\",\n clientId: options.clientId || \"\",\n clientSecret: options.clientSecret || \"\",\n request,\n }),\n });\n // @ts-expect-error not worth the extra code to appease TS\n return Object.assign(auth.bind(null, state), {\n hook: hook.bind(null, state),\n });\n}\n"],"names":["getAppAuthentication","appId","privateKey","timeDifference","appAuthentication","githubAppJwt","id","now","Math","floor","Date","type","token","expiresAt","expiration","toISOString","error","Error","getCache","LRU","max","maxAge","get","cache","options","cacheKey","optionsToCacheKey","result","createdAt","repositorySelection","permissionsString","singleFileName","split","permissions","reduce","string","test","slice","repositoryIds","repositoryNames","set","data","key","Object","keys","map","name","join","value","installationId","sort","repositoryIdsString","repositoryNamesString","filter","Boolean","toTokenAuthentication","assign","tokenType","getInstallationAuthentication","state","customRequest","Number","factory","oauthApp","factoryAuthOptions","optionsWithInstallationTokenFromState","refresh","request","expires_at","repositories","permissionsOptional","repository_selection","repositorySelectionOptional","single_file","installation_id","repository_ids","mediaType","previews","headers","authorization","r","repo","auth","authOptions","log","warn","Deprecation","PATHS","routeMatcher","paths","regexes","p","c","startsWith","regex","RegExp","REGEX","requiresAppAuth","url","FIVE_SECONDS_IN_MS","isNotTimeSkewError","message","match","hook","route","parameters","endpoint","merge","replace","DEFAULTS","baseUrl","response","date","diff","parse","toString","requiresBasicAuth","authentication","sendRequestWithRetries","retries","timeSinceTokenCreationInMs","status","awaitTime","Promise","resolve","setTimeout","VERSION","createAppAuth","isFinite","console","bind","defaultRequest","defaults","getUserAgent","createOAuthAppAuth","clientType","clientId","clientSecret"],"mappings":";;;;;;;;;;;;;;AACO,eAAeA,oBAAf,CAAoC;EAAEC,KAAF;EAASC,UAAT;EAAqBC;AAArB,CAApC,EAA4E;EAC/E,IAAI;IACA,MAAMC,iBAAiB,GAAG,MAAMC,kCAAY,CAAC;MACzCC,EAAE,EAAE,CAACL,KADoC;MAEzCC,UAFyC;MAGzCK,GAAG,EAAEJ,cAAc,IAAIK,IAAI,C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AAV,EAAgBvE,KAAhB,CAAd,EAAsC;IACzC4C,IAAI,EAAEA,IAAI,CAAC2B,IAAL,CAAU,IAAV,EAAgBvE,KAAhB;GADH,CAAP;AAGH;;;;;;;;;;"}
\ No newline at end of file
diff --git a/node_modules/@octokit/auth-app/dist-src/auth.js b/node_modules/@octokit/auth-app/dist-src/auth.js
deleted file mode 100644
index 5e8f943..0000000
--- a/node_modules/@octokit/auth-app/dist-src/auth.js
+++ /dev/null
@@ -1,28 +0,0 @@
-import { Deprecation } from "deprecation";
-import { getAppAuthentication } from "./get-app-authentication";
-import { getInstallationAuthentication } from "./get-installation-authentication";
-export async function auth(state, authOptions) {
- switch (authOptions.type) {
- case "app":
- return getAppAuthentication(state);
- // @ts-expect-error "oauth" is not supperted in types
- case "oauth":
- state.log.warn(
- // @ts-expect-error `log.warn()` expects string
- new Deprecation(`[@octokit/auth-app] {type: "oauth"} is deprecated. Use {type: "oauth-app"} instead`));
- case "oauth-app":
- return state.oauthApp({ type: "oauth-app" });
- case "installation":
- authOptions;
- return getInstallationAuthentication(state, {
- ...authOptions,
- type: "installation",
- });
- case "oauth-user":
- // @ts-expect-error TODO: infer correct auth options type based on type. authOptions should be typed as "WebFlowAuthOptions | OAuthAppDeviceFlowAuthOptions | GitHubAppDeviceFlowAuthOptions"
- return state.oauthApp(authOptions);
- default:
- // @ts-expect-error type is "never" at this point
- throw new Error(`Invalid auth type: ${authOptions.type}`);
- }
-}
diff --git a/node_modules/@octokit/auth-app/dist-src/cache.js b/node_modules/@octokit/auth-app/dist-src/cache.js
deleted file mode 100644
index 96b085a..0000000
--- a/node_modules/@octokit/auth-app/dist-src/cache.js
+++ /dev/null
@@ -1,71 +0,0 @@
-// https://github.com/isaacs/node-lru-cache#readme
-import LRU from "lru-cache";
-export function getCache() {
- return new LRU({
- // cache max. 15000 tokens, that will use less than 10mb memory
- max: 15000,
- // Cache for 1 minute less than GitHub expiry
- maxAge: 1000 * 60 * 59,
- });
-}
-export async function get(cache, options) {
- const cacheKey = optionsToCacheKey(options);
- const result = await cache.get(cacheKey);
- if (!result) {
- return;
- }
- const [token, createdAt, expiresAt, repositorySelection, permissionsString, singleFileName,] = result.split("|");
- const permissions = options.permissions ||
- permissionsString.split(/,/).reduce((permissions, string) => {
- if (/!$/.test(string)) {
- permissions[string.slice(0, -1)] = "write";
- }
- else {
- permissions[string] = "read";
- }
- return permissions;
- }, {});
- return {
- token,
- createdAt,
- expiresAt,
- permissions,
- repositoryIds: options.repositoryIds,
- repositoryNames: options.repositoryNames,
- singleFileName,
- repositorySelection: repositorySelection,
- };
-}
-export async function set(cache, options, data) {
- const key = optionsToCacheKey(options);
- const permissionsString = options.permissions
- ? ""
- : Object.keys(data.permissions)
- .map((name) => `${name}${data.permissions[name] === "write" ? "!" : ""}`)
- .join(",");
- const value = [
- data.token,
- data.createdAt,
- data.expiresAt,
- data.repositorySelection,
- permissionsString,
- data.singleFileName,
- ].join("|");
- await cache.set(key, value);
-}
-function optionsToCacheKey({ installationId, permissions = {}, repositoryIds = [], repositoryNames = [], }) {
- const permissionsString = Object.keys(permissions)
- .sort()
- .map((name) => (permissions[name] === "read" ? name : `${name}!`))
- .join(",");
- const repositoryIdsString = repositoryIds.sort().join(",");
- const repositoryNamesString = repositoryNames.join(",");
- return [
- installationId,
- repositoryIdsString,
- repositoryNamesString,
- permissionsString,
- ]
- .filter(Boolean)
- .join("|");
-}
diff --git a/node_modules/@octokit/auth-app/dist-src/get-app-authentication.js b/node_modules/@octokit/auth-app/dist-src/get-app-authentication.js
deleted file mode 100644
index 77a8eb0..0000000
--- a/node_modules/@octokit/auth-app/dist-src/get-app-authentication.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { githubAppJwt } from "universal-github-app-jwt";
-export async function getAppAuthentication({ appId, privateKey, timeDifference, }) {
- try {
- const appAuthentication = await githubAppJwt({
- id: +appId,
- privateKey,
- now: timeDifference && Math.floor(Date.now() / 1000) + timeDifference,
- });
- return {
- type: "app",
- token: appAuthentication.token,
- appId: appAuthentication.appId,
- expiresAt: new Date(appAuthentication.expiration * 1000).toISOString(),
- };
- }
- catch (error) {
- if (privateKey === "-----BEGIN RSA PRIVATE KEY-----") {
- throw new Error("The 'privateKey` option contains only the first line '-----BEGIN RSA PRIVATE KEY-----'. If you are setting it using a `.env` file, make sure it is set on a single line with newlines replaced by '\n'");
- }
- else {
- throw error;
- }
- }
-}
diff --git a/node_modules/@octokit/auth-app/dist-src/get-installation-authentication.js b/node_modules/@octokit/auth-app/dist-src/get-installation-authentication.js
deleted file mode 100644
index 748d818..0000000
--- a/node_modules/@octokit/auth-app/dist-src/get-installation-authentication.js
+++ /dev/null
@@ -1,81 +0,0 @@
-import { get, set } from "./cache";
-import { getAppAuthentication } from "./get-app-authentication";
-import { toTokenAuthentication } from "./to-token-authentication";
-export async function getInstallationAuthentication(state, options, customRequest) {
- const installationId = Number(options.installationId || state.installationId);
- if (!installationId) {
- throw new Error("[@octokit/auth-app] installationId option is required for installation authentication.");
- }
- if (options.factory) {
- const { type, factory, oauthApp, ...factoryAuthOptions } = {
- ...state,
- ...options,
- };
- // @ts-expect-error if `options.factory` is set, the return type for `auth()` should be `Promise>`
- return factory(factoryAuthOptions);
- }
- const optionsWithInstallationTokenFromState = Object.assign({ installationId }, options);
- if (!options.refresh) {
- const result = await get(state.cache, optionsWithInstallationTokenFromState);
- if (result) {
- const { token, createdAt, expiresAt, permissions, repositoryIds, repositoryNames, singleFileName, repositorySelection, } = result;
- return toTokenAuthentication({
- installationId,
- token,
- createdAt,
- expiresAt,
- permissions,
- repositorySelection,
- repositoryIds,
- repositoryNames,
- singleFileName,
- });
- }
- }
- const appAuthentication = await getAppAuthentication(state);
- const request = customRequest || state.request;
- const { data: { token, expires_at: expiresAt, repositories, permissions: permissionsOptional, repository_selection: repositorySelectionOptional, single_file: singleFileName, }, } = await request("POST /app/installations/{installation_id}/access_tokens", {
- installation_id: installationId,
- repository_ids: options.repositoryIds,
- repositories: options.repositoryNames,
- permissions: options.permissions,
- mediaType: {
- previews: ["machine-man"],
- },
- headers: {
- authorization: `bearer ${appAuthentication.token}`,
- },
- });
- /* istanbul ignore next - permissions are optional per OpenAPI spec, but we think that is incorrect */
- const permissions = permissionsOptional || {};
- /* istanbul ignore next - repositorySelection are optional per OpenAPI spec, but we think that is incorrect */
- const repositorySelection = repositorySelectionOptional || "all";
- const repositoryIds = repositories
- ? repositories.map((r) => r.id)
- : void 0;
- const repositoryNames = repositories
- ? repositories.map((repo) => repo.name)
- : void 0;
- const createdAt = new Date().toISOString();
- await set(state.cache, optionsWithInstallationTokenFromState, {
- token,
- createdAt,
- expiresAt,
- repositorySelection,
- permissions,
- repositoryIds,
- repositoryNames,
- singleFileName,
- });
- return toTokenAuthentication({
- installationId,
- token,
- createdAt,
- expiresAt,
- repositorySelection,
- permissions,
- repositoryIds,
- repositoryNames,
- singleFileName,
- });
-}
diff --git a/node_modules/@octokit/auth-app/dist-src/hook.js b/node_modules/@octokit/auth-app/dist-src/hook.js
deleted file mode 100644
index 40aab2f..0000000
--- a/node_modules/@octokit/auth-app/dist-src/hook.js
+++ /dev/null
@@ -1,88 +0,0 @@
-import { requiresBasicAuth } from "@octokit/auth-oauth-user";
-import { getAppAuthentication } from "./get-app-authentication";
-import { getInstallationAuthentication } from "./get-installation-authentication";
-import { requiresAppAuth } from "./requires-app-auth";
-const FIVE_SECONDS_IN_MS = 5 * 1000;
-function isNotTimeSkewError(error) {
- return !(error.message.match(/'Expiration time' claim \('exp'\) must be a numeric value representing the future time at which the assertion expires/) ||
- error.message.match(/'Issued at' claim \('iat'\) must be an Integer representing the time that the assertion was issued/));
-}
-export async function hook(state, request, route, parameters) {
- const endpoint = request.endpoint.merge(route, parameters);
- const url = endpoint.url;
- // Do not intercept request to retrieve a new token
- if (/\/login\/oauth\/access_token$/.test(url)) {
- return request(endpoint);
- }
- if (requiresAppAuth(url.replace(request.endpoint.DEFAULTS.baseUrl, ""))) {
- const { token } = await getAppAuthentication(state);
- endpoint.headers.authorization = `bearer ${token}`;
- let response;
- try {
- response = await request(endpoint);
- }
- catch (error) {
- // If there's an issue with the expiration, regenerate the token and try again.
- // Otherwise rethrow the error for upstream handling.
- if (isNotTimeSkewError(error)) {
- throw error;
- }
- // If the date header is missing, we can't correct the system time skew.
- // Throw the error to be handled upstream.
- if (typeof error.response.headers.date === "undefined") {
- throw error;
- }
- const diff = Math.floor((Date.parse(error.response.headers.date) -
- Date.parse(new Date().toString())) /
- 1000);
- state.log.warn(error.message);
- state.log.warn(`[@octokit/auth-app] GitHub API time and system time are different by ${diff} seconds. Retrying request with the difference accounted for.`);
- const { token } = await getAppAuthentication({
- ...state,
- timeDifference: diff,
- });
- endpoint.headers.authorization = `bearer ${token}`;
- return request(endpoint);
- }
- return response;
- }
- if (requiresBasicAuth(url)) {
- const authentication = await state.oauthApp({ type: "oauth-app" });
- endpoint.headers.authorization = authentication.headers.authorization;
- return request(endpoint);
- }
- const { token, createdAt } = await getInstallationAuthentication(state,
- // @ts-expect-error TBD
- {}, request);
- endpoint.headers.authorization = `token ${token}`;
- return sendRequestWithRetries(state, request, endpoint, createdAt);
-}
-/**
- * Newly created tokens might not be accessible immediately after creation.
- * In case of a 401 response, we retry with an exponential delay until more
- * than five seconds pass since the creation of the token.
- *
- * @see https://github.com/octokit/auth-app.js/issues/65
- */
-async function sendRequestWithRetries(state, request, options, createdAt, retries = 0) {
- const timeSinceTokenCreationInMs = +new Date() - +new Date(createdAt);
- try {
- return await request(options);
- }
- catch (error) {
- if (error.status !== 401) {
- throw error;
- }
- if (timeSinceTokenCreationInMs >= FIVE_SECONDS_IN_MS) {
- if (retries > 0) {
- error.message = `After ${retries} retries within ${timeSinceTokenCreationInMs / 1000}s of creating the installation access token, the response remains 401. At this point, the cause may be an authentication problem or a system outage. Please check https://www.githubstatus.com for status information`;
- }
- throw error;
- }
- ++retries;
- const awaitTime = retries * 1000;
- state.log.warn(`[@octokit/auth-app] Retrying after 401 response to account for token replication delay (retry: ${retries}, wait: ${awaitTime / 1000}s)`);
- await new Promise((resolve) => setTimeout(resolve, awaitTime));
- return sendRequestWithRetries(state, request, options, createdAt, retries);
- }
-}
diff --git a/node_modules/@octokit/auth-app/dist-src/index.js b/node_modules/@octokit/auth-app/dist-src/index.js
deleted file mode 100644
index 321f314..0000000
--- a/node_modules/@octokit/auth-app/dist-src/index.js
+++ /dev/null
@@ -1,49 +0,0 @@
-import { getUserAgent } from "universal-user-agent";
-import { request as defaultRequest } from "@octokit/request";
-import { createOAuthAppAuth } from "@octokit/auth-oauth-app";
-import { auth } from "./auth";
-import { hook } from "./hook";
-import { getCache } from "./cache";
-import { VERSION } from "./version";
-export { createOAuthUserAuth } from "@octokit/auth-oauth-user";
-export function createAppAuth(options) {
- if (!options.appId) {
- throw new Error("[@octokit/auth-app] appId option is required");
- }
- if (!Number.isFinite(+options.appId)) {
- throw new Error("[@octokit/auth-app] appId option must be a number or numeric string");
- }
- if (!options.privateKey) {
- throw new Error("[@octokit/auth-app] privateKey option is required");
- }
- if ("installationId" in options && !options.installationId) {
- throw new Error("[@octokit/auth-app] installationId is set to a falsy value");
- }
- const log = Object.assign({
- warn: console.warn.bind(console),
- }, options.log);
- const request = options.request ||
- defaultRequest.defaults({
- headers: {
- "user-agent": `octokit-auth-app.js/${VERSION} ${getUserAgent()}`,
- },
- });
- const state = Object.assign({
- request,
- cache: getCache(),
- }, options, options.installationId
- ? { installationId: Number(options.installationId) }
- : {}, {
- log,
- oauthApp: createOAuthAppAuth({
- clientType: "github-app",
- clientId: options.clientId || "",
- clientSecret: options.clientSecret || "",
- request,
- }),
- });
- // @ts-expect-error not worth the extra code to appease TS
- return Object.assign(auth.bind(null, state), {
- hook: hook.bind(null, state),
- });
-}
diff --git a/node_modules/@octokit/auth-app/dist-src/requires-app-auth.js b/node_modules/@octokit/auth-app/dist-src/requires-app-auth.js
deleted file mode 100644
index 10c5ac7..0000000
--- a/node_modules/@octokit/auth-app/dist-src/requires-app-auth.js
+++ /dev/null
@@ -1,53 +0,0 @@
-const PATHS = [
- "/app",
- "/app/hook/config",
- "/app/hook/deliveries",
- "/app/hook/deliveries/{delivery_id}",
- "/app/hook/deliveries/{delivery_id}/attempts",
- "/app/installations",
- "/app/installations/{installation_id}",
- "/app/installations/{installation_id}/access_tokens",
- "/app/installations/{installation_id}/suspended",
- "/marketplace_listing/accounts/{account_id}",
- "/marketplace_listing/plan",
- "/marketplace_listing/plans",
- "/marketplace_listing/plans/{plan_id}/accounts",
- "/marketplace_listing/stubbed/accounts/{account_id}",
- "/marketplace_listing/stubbed/plan",
- "/marketplace_listing/stubbed/plans",
- "/marketplace_listing/stubbed/plans/{plan_id}/accounts",
- "/orgs/{org}/installation",
- "/repos/{owner}/{repo}/installation",
- "/users/{username}/installation",
-];
-// CREDIT: Simon Grondin (https://github.com/SGrondin)
-// https://github.com/octokit/plugin-throttling.js/blob/45c5d7f13b8af448a9dbca468d9c9150a73b3948/lib/route-matcher.js
-function routeMatcher(paths) {
- // EXAMPLE. For the following paths:
- /* [
- "/orgs/{org}/invitations",
- "/repos/{owner}/{repo}/collaborators/{username}"
- ] */
- const regexes = paths.map((p) => p
- .split("/")
- .map((c) => (c.startsWith("{") ? "(?:.+?)" : c))
- .join("/"));
- // 'regexes' would contain:
- /* [
- '/orgs/(?:.+?)/invitations',
- '/repos/(?:.+?)/(?:.+?)/collaborators/(?:.+?)'
- ] */
- const regex = `^(?:${regexes.map((r) => `(?:${r})`).join("|")})[^/]*$`;
- // 'regex' would contain:
- /*
- ^(?:(?:\/orgs\/(?:.+?)\/invitations)|(?:\/repos\/(?:.+?)\/(?:.+?)\/collaborators\/(?:.+?)))[^\/]*$
-
- It may look scary, but paste it into https://www.debuggex.com/
- and it will make a lot more sense!
- */
- return new RegExp(regex, "i");
-}
-const REGEX = routeMatcher(PATHS);
-export function requiresAppAuth(url) {
- return !!url && REGEX.test(url);
-}
diff --git a/node_modules/@octokit/auth-app/dist-src/to-token-authentication.js b/node_modules/@octokit/auth-app/dist-src/to-token-authentication.js
deleted file mode 100644
index 5aa9a2c..0000000
--- a/node_modules/@octokit/auth-app/dist-src/to-token-authentication.js
+++ /dev/null
@@ -1,12 +0,0 @@
-export function toTokenAuthentication({ installationId, token, createdAt, expiresAt, repositorySelection, permissions, repositoryIds, repositoryNames, singleFileName, }) {
- return Object.assign({
- type: "token",
- tokenType: "installation",
- token,
- installationId,
- permissions,
- createdAt,
- expiresAt,
- repositorySelection,
- }, repositoryIds ? { repositoryIds } : null, repositoryNames ? { repositoryNames } : null, singleFileName ? { singleFileName } : null);
-}
diff --git a/node_modules/@octokit/auth-app/dist-src/types.js b/node_modules/@octokit/auth-app/dist-src/types.js
deleted file mode 100644
index cb0ff5c..0000000
--- a/node_modules/@octokit/auth-app/dist-src/types.js
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/node_modules/@octokit/auth-app/dist-src/version.js b/node_modules/@octokit/auth-app/dist-src/version.js
deleted file mode 100644
index 328cfba..0000000
--- a/node_modules/@octokit/auth-app/dist-src/version.js
+++ /dev/null
@@ -1 +0,0 @@
-export const VERSION = "4.0.7";
diff --git a/node_modules/@octokit/auth-app/dist-types/auth.d.ts b/node_modules/@octokit/auth-app/dist-types/auth.d.ts
deleted file mode 100644
index 306bbbd..0000000
--- a/node_modules/@octokit/auth-app/dist-types/auth.d.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import * as OAuthAppAuth from "@octokit/auth-oauth-app";
-import { State, AppAuthOptions, AppAuthentication, OAuthAppAuthentication, OAuthAppAuthOptions, InstallationAuthOptions, InstallationAccessTokenAuthentication, GitHubAppUserAuthentication, GitHubAppUserAuthenticationWithExpiration, OAuthWebFlowAuthOptions, OAuthDeviceFlowAuthOptions } from "./types";
-/** GitHub App authentication */
-export declare function auth(state: State, authOptions: AppAuthOptions): Promise;
-/** OAuth App authentication */
-export declare function auth(state: State, authOptions: OAuthAppAuthOptions): Promise;
-/** Installation authentication */
-export declare function auth(state: State, authOptions: InstallationAuthOptions): Promise;
-/** User Authentication via OAuth web flow */
-export declare function auth(state: State, authOptions: OAuthWebFlowAuthOptions): Promise;
-/** GitHub App Web flow with `factory` option */
-export declare function auth(state: State, authOptions: OAuthWebFlowAuthOptions & {
- factory: OAuthAppAuth.FactoryGitHubWebFlow;
-}): Promise;
-/** User Authentication via OAuth Device flow */
-export declare function auth(state: State, authOptions: OAuthDeviceFlowAuthOptions): Promise;
-/** GitHub App Device flow with `factory` option */
-export declare function auth(state: State, authOptions: OAuthDeviceFlowAuthOptions & {
- factory: OAuthAppAuth.FactoryGitHubDeviceFlow;
-}): Promise;
diff --git a/node_modules/@octokit/auth-app/dist-types/cache.d.ts b/node_modules/@octokit/auth-app/dist-types/cache.d.ts
deleted file mode 100644
index b1d0db5..0000000
--- a/node_modules/@octokit/auth-app/dist-types/cache.d.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import LRU from "lru-cache";
-import { InstallationAuthOptions, Cache, CacheData, InstallationAccessTokenData } from "./types";
-export declare function getCache(): LRU;
-export declare function get(cache: Cache, options: InstallationAuthOptions): Promise;
-export declare function set(cache: Cache, options: InstallationAuthOptions, data: CacheData): Promise;
diff --git a/node_modules/@octokit/auth-app/dist-types/get-app-authentication.d.ts b/node_modules/@octokit/auth-app/dist-types/get-app-authentication.d.ts
deleted file mode 100644
index 577db6a..0000000
--- a/node_modules/@octokit/auth-app/dist-types/get-app-authentication.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import { AppAuthentication, State } from "./types";
-export declare function getAppAuthentication({ appId, privateKey, timeDifference, }: State & {
- timeDifference?: number;
-}): Promise;
diff --git a/node_modules/@octokit/auth-app/dist-types/get-installation-authentication.d.ts b/node_modules/@octokit/auth-app/dist-types/get-installation-authentication.d.ts
deleted file mode 100644
index fd9c42a..0000000
--- a/node_modules/@octokit/auth-app/dist-types/get-installation-authentication.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import { InstallationAuthOptions, InstallationAccessTokenAuthentication, RequestInterface, State } from "./types";
-export declare function getInstallationAuthentication(state: State, options: InstallationAuthOptions, customRequest?: RequestInterface): Promise;
diff --git a/node_modules/@octokit/auth-app/dist-types/hook.d.ts b/node_modules/@octokit/auth-app/dist-types/hook.d.ts
deleted file mode 100644
index 41cc361..0000000
--- a/node_modules/@octokit/auth-app/dist-types/hook.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import { AnyResponse, EndpointOptions, RequestParameters, RequestInterface, Route, State } from "./types";
-export declare function hook(state: State, request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise;
diff --git a/node_modules/@octokit/auth-app/dist-types/index.d.ts b/node_modules/@octokit/auth-app/dist-types/index.d.ts
deleted file mode 100644
index 2a93962..0000000
--- a/node_modules/@octokit/auth-app/dist-types/index.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import { AuthInterface, StrategyOptions } from "./types";
-export { createOAuthUserAuth } from "@octokit/auth-oauth-user";
-export { StrategyOptions, AppAuthOptions, OAuthAppAuthOptions, InstallationAuthOptions, OAuthWebFlowAuthOptions, OAuthDeviceFlowAuthOptions, Authentication, AppAuthentication, OAuthAppAuthentication, InstallationAccessTokenAuthentication, GitHubAppUserAuthentication, GitHubAppUserAuthenticationWithExpiration, } from "./types";
-export declare function createAppAuth(options: StrategyOptions): AuthInterface;
diff --git a/node_modules/@octokit/auth-app/dist-types/requires-app-auth.d.ts b/node_modules/@octokit/auth-app/dist-types/requires-app-auth.d.ts
deleted file mode 100644
index 2d86d3f..0000000
--- a/node_modules/@octokit/auth-app/dist-types/requires-app-auth.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export declare function requiresAppAuth(url: string | undefined): Boolean;
diff --git a/node_modules/@octokit/auth-app/dist-types/to-token-authentication.d.ts b/node_modules/@octokit/auth-app/dist-types/to-token-authentication.d.ts
deleted file mode 100644
index b02ca30..0000000
--- a/node_modules/@octokit/auth-app/dist-types/to-token-authentication.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import { CacheData, InstallationAccessTokenAuthentication, WithInstallationId } from "./types";
-export declare function toTokenAuthentication({ installationId, token, createdAt, expiresAt, repositorySelection, permissions, repositoryIds, repositoryNames, singleFileName, }: CacheData & WithInstallationId): InstallationAccessTokenAuthentication;
diff --git a/node_modules/@octokit/auth-app/dist-types/types.d.ts b/node_modules/@octokit/auth-app/dist-types/types.d.ts
deleted file mode 100644
index c675b56..0000000
--- a/node_modules/@octokit/auth-app/dist-types/types.d.ts
+++ /dev/null
@@ -1,125 +0,0 @@
-import * as OctokitTypes from "@octokit/types";
-import LRUCache from "lru-cache";
-import * as OAuthAppAuth from "@octokit/auth-oauth-app";
-declare type OAuthStrategyOptions = {
- clientId?: string;
- clientSecret?: string;
-};
-declare type CommonStrategyOptions = {
- appId: number | string;
- privateKey: string;
- installationId?: number | string;
- request?: OctokitTypes.RequestInterface;
- cache?: Cache;
- log?: {
- warn: (message: string, additionalInfo?: object) => any;
- [key: string]: any;
- };
-};
-export declare type StrategyOptions = OAuthStrategyOptions & CommonStrategyOptions & Record;
-export declare type AppAuthOptions = {
- type: "app";
-};
-/**
-Users SHOULD only enter repositoryIds || repositoryNames.
-However, this moduke still passes both to the backend API to
-let the API decide how to handle the logic. We just throw the
-reponse back to the client making the request.
-**/
-export declare type InstallationAuthOptions = {
- type: "installation";
- installationId?: number | string;
- repositoryIds?: number[];
- repositoryNames?: string[];
- permissions?: Permissions;
- refresh?: boolean;
- factory?: never;
- [key: string]: unknown;
-};
-export declare type InstallationAuthOptionsWithFactory = {
- type: "installation";
- installationId?: number | string;
- repositoryIds?: number[];
- repositoryNames?: string[];
- permissions?: Permissions;
- refresh?: boolean;
- factory: FactoryInstallation;
- [key: string]: unknown;
-};
-export declare type OAuthAppAuthOptions = OAuthAppAuth.AppAuthOptions;
-export declare type OAuthWebFlowAuthOptions = OAuthAppAuth.WebFlowAuthOptions;
-export declare type OAuthDeviceFlowAuthOptions = OAuthAppAuth.GitHubAppDeviceFlowAuthOptions;
-export declare type Authentication = AppAuthentication | OAuthAppAuthentication | InstallationAccessTokenAuthentication | GitHubAppUserAuthentication | GitHubAppUserAuthenticationWithExpiration;
-export declare type FactoryInstallationOptions = StrategyOptions & Omit;
-export interface FactoryInstallation {
- (options: FactoryInstallationOptions): T;
-}
-export interface AuthInterface {
- (options: AppAuthOptions): Promise;
- (options: OAuthAppAuthOptions): Promise;
- (options: InstallationAuthOptions): Promise;
- (options: InstallationAuthOptionsWithFactory): Promise;
- (options: OAuthWebFlowAuthOptions): Promise;
- (options: OAuthDeviceFlowAuthOptions): Promise;
- (options: OAuthWebFlowAuthOptions & {
- factory: OAuthAppAuth.FactoryGitHubWebFlow;
- }): Promise;
- (options: OAuthDeviceFlowAuthOptions & {
- factory: OAuthAppAuth.FactoryGitHubDeviceFlow;
- }): Promise;
- hook(request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise>;
-}
-export declare type AnyResponse = OctokitTypes.OctokitResponse;
-export declare type EndpointDefaults = OctokitTypes.EndpointDefaults;
-export declare type EndpointOptions = OctokitTypes.EndpointOptions;
-export declare type RequestParameters = OctokitTypes.RequestParameters;
-export declare type Route = OctokitTypes.Route;
-export declare type RequestInterface = OctokitTypes.RequestInterface;
-export declare type Cache = LRUCache | {
- get: (key: string) => string;
- set: (key: string, value: string) => any;
-};
-export declare type APP_TYPE = "app";
-export declare type TOKEN_TYPE = "token";
-export declare type INSTALLATION_TOKEN_TYPE = "installation";
-export declare type OAUTH_TOKEN_TYPE = "oauth";
-export declare type REPOSITORY_SELECTION = "all" | "selected";
-export declare type JWT = string;
-export declare type ACCESS_TOKEN = string;
-export declare type UTC_TIMESTAMP = string;
-export declare type AppAuthentication = {
- type: APP_TYPE;
- token: JWT;
- appId: number;
- expiresAt: string;
-};
-export declare type InstallationAccessTokenData = {
- token: ACCESS_TOKEN;
- createdAt: UTC_TIMESTAMP;
- expiresAt: UTC_TIMESTAMP;
- permissions: Permissions;
- repositorySelection: REPOSITORY_SELECTION;
- repositoryIds?: number[];
- repositoryNames?: string[];
- singleFileName?: string;
-};
-export declare type CacheData = InstallationAccessTokenData;
-export declare type InstallationAccessTokenAuthentication = InstallationAccessTokenData & {
- type: TOKEN_TYPE;
- tokenType: INSTALLATION_TOKEN_TYPE;
- installationId: number;
-};
-export declare type OAuthAppAuthentication = OAuthAppAuth.AppAuthentication;
-export declare type GitHubAppUserAuthentication = OAuthAppAuth.GitHubAppUserAuthentication;
-export declare type GitHubAppUserAuthenticationWithExpiration = OAuthAppAuth.GitHubAppUserAuthenticationWithExpiration;
-export declare type FactoryOptions = Required> & State;
-export declare type Permissions = Record;
-export declare type WithInstallationId = {
- installationId: number;
-};
-export declare type State = Required> & {
- installationId?: number;
-} & OAuthStrategyOptions & {
- oauthApp: OAuthAppAuth.GitHubAuthInterface;
-};
-export {};
diff --git a/node_modules/@octokit/auth-app/dist-types/version.d.ts b/node_modules/@octokit/auth-app/dist-types/version.d.ts
deleted file mode 100644
index fa963c5..0000000
--- a/node_modules/@octokit/auth-app/dist-types/version.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export declare const VERSION = "4.0.7";
diff --git a/node_modules/@octokit/auth-app/dist-web/index.js b/node_modules/@octokit/auth-app/dist-web/index.js
deleted file mode 100644
index 341a1bb..0000000
--- a/node_modules/@octokit/auth-app/dist-web/index.js
+++ /dev/null
@@ -1,406 +0,0 @@
-import { getUserAgent } from 'universal-user-agent';
-import { request } from '@octokit/request';
-import { createOAuthAppAuth } from '@octokit/auth-oauth-app';
-import { Deprecation } from 'deprecation';
-import { githubAppJwt } from 'universal-github-app-jwt';
-import LRU from 'lru-cache';
-import { requiresBasicAuth } from '@octokit/auth-oauth-user';
-export { createOAuthUserAuth } from '@octokit/auth-oauth-user';
-
-async function getAppAuthentication({ appId, privateKey, timeDifference, }) {
- try {
- const appAuthentication = await githubAppJwt({
- id: +appId,
- privateKey,
- now: timeDifference && Math.floor(Date.now() / 1000) + timeDifference,
- });
- return {
- type: "app",
- token: appAuthentication.token,
- appId: appAuthentication.appId,
- expiresAt: new Date(appAuthentication.expiration * 1000).toISOString(),
- };
- }
- catch (error) {
- if (privateKey === "-----BEGIN RSA PRIVATE KEY-----") {
- throw new Error("The 'privateKey` option contains only the first line '-----BEGIN RSA PRIVATE KEY-----'. If you are setting it using a `.env` file, make sure it is set on a single line with newlines replaced by '\n'");
- }
- else {
- throw error;
- }
- }
-}
-
-// https://github.com/isaacs/node-lru-cache#readme
-function getCache() {
- return new LRU({
- // cache max. 15000 tokens, that will use less than 10mb memory
- max: 15000,
- // Cache for 1 minute less than GitHub expiry
- maxAge: 1000 * 60 * 59,
- });
-}
-async function get(cache, options) {
- const cacheKey = optionsToCacheKey(options);
- const result = await cache.get(cacheKey);
- if (!result) {
- return;
- }
- const [token, createdAt, expiresAt, repositorySelection, permissionsString, singleFileName,] = result.split("|");
- const permissions = options.permissions ||
- permissionsString.split(/,/).reduce((permissions, string) => {
- if (/!$/.test(string)) {
- permissions[string.slice(0, -1)] = "write";
- }
- else {
- permissions[string] = "read";
- }
- return permissions;
- }, {});
- return {
- token,
- createdAt,
- expiresAt,
- permissions,
- repositoryIds: options.repositoryIds,
- repositoryNames: options.repositoryNames,
- singleFileName,
- repositorySelection: repositorySelection,
- };
-}
-async function set(cache, options, data) {
- const key = optionsToCacheKey(options);
- const permissionsString = options.permissions
- ? ""
- : Object.keys(data.permissions)
- .map((name) => `${name}${data.permissions[name] === "write" ? "!" : ""}`)
- .join(",");
- const value = [
- data.token,
- data.createdAt,
- data.expiresAt,
- data.repositorySelection,
- permissionsString,
- data.singleFileName,
- ].join("|");
- await cache.set(key, value);
-}
-function optionsToCacheKey({ installationId, permissions = {}, repositoryIds = [], repositoryNames = [], }) {
- const permissionsString = Object.keys(permissions)
- .sort()
- .map((name) => (permissions[name] === "read" ? name : `${name}!`))
- .join(",");
- const repositoryIdsString = repositoryIds.sort().join(",");
- const repositoryNamesString = repositoryNames.join(",");
- return [
- installationId,
- repositoryIdsString,
- repositoryNamesString,
- permissionsString,
- ]
- .filter(Boolean)
- .join("|");
-}
-
-function toTokenAuthentication({ installationId, token, createdAt, expiresAt, repositorySelection, permissions, repositoryIds, repositoryNames, singleFileName, }) {
- return Object.assign({
- type: "token",
- tokenType: "installation",
- token,
- installationId,
- permissions,
- createdAt,
- expiresAt,
- repositorySelection,
- }, repositoryIds ? { repositoryIds } : null, repositoryNames ? { repositoryNames } : null, singleFileName ? { singleFileName } : null);
-}
-
-async function getInstallationAuthentication(state, options, customRequest) {
- const installationId = Number(options.installationId || state.installationId);
- if (!installationId) {
- throw new Error("[@octokit/auth-app] installationId option is required for installation authentication.");
- }
- if (options.factory) {
- const { type, factory, oauthApp, ...factoryAuthOptions } = {
- ...state,
- ...options,
- };
- // @ts-expect-error if `options.factory` is set, the return type for `auth()` should be `Promise>`
- return factory(factoryAuthOptions);
- }
- const optionsWithInstallationTokenFromState = Object.assign({ installationId }, options);
- if (!options.refresh) {
- const result = await get(state.cache, optionsWithInstallationTokenFromState);
- if (result) {
- const { token, createdAt, expiresAt, permissions, repositoryIds, repositoryNames, singleFileName, repositorySelection, } = result;
- return toTokenAuthentication({
- installationId,
- token,
- createdAt,
- expiresAt,
- permissions,
- repositorySelection,
- repositoryIds,
- repositoryNames,
- singleFileName,
- });
- }
- }
- const appAuthentication = await getAppAuthentication(state);
- const request = customRequest || state.request;
- const { data: { token, expires_at: expiresAt, repositories, permissions: permissionsOptional, repository_selection: repositorySelectionOptional, single_file: singleFileName, }, } = await request("POST /app/installations/{installation_id}/access_tokens", {
- installation_id: installationId,
- repository_ids: options.repositoryIds,
- repositories: options.repositoryNames,
- permissions: options.permissions,
- mediaType: {
- previews: ["machine-man"],
- },
- headers: {
- authorization: `bearer ${appAuthentication.token}`,
- },
- });
- /* istanbul ignore next - permissions are optional per OpenAPI spec, but we think that is incorrect */
- const permissions = permissionsOptional || {};
- /* istanbul ignore next - repositorySelection are optional per OpenAPI spec, but we think that is incorrect */
- const repositorySelection = repositorySelectionOptional || "all";
- const repositoryIds = repositories
- ? repositories.map((r) => r.id)
- : void 0;
- const repositoryNames = repositories
- ? repositories.map((repo) => repo.name)
- : void 0;
- const createdAt = new Date().toISOString();
- await set(state.cache, optionsWithInstallationTokenFromState, {
- token,
- createdAt,
- expiresAt,
- repositorySelection,
- permissions,
- repositoryIds,
- repositoryNames,
- singleFileName,
- });
- return toTokenAuthentication({
- installationId,
- token,
- createdAt,
- expiresAt,
- repositorySelection,
- permissions,
- repositoryIds,
- repositoryNames,
- singleFileName,
- });
-}
-
-async function auth(state, authOptions) {
- switch (authOptions.type) {
- case "app":
- return getAppAuthentication(state);
- // @ts-expect-error "oauth" is not supperted in types
- case "oauth":
- state.log.warn(
- // @ts-expect-error `log.warn()` expects string
- new Deprecation(`[@octokit/auth-app] {type: "oauth"} is deprecated. Use {type: "oauth-app"} instead`));
- case "oauth-app":
- return state.oauthApp({ type: "oauth-app" });
- case "installation":
- return getInstallationAuthentication(state, {
- ...authOptions,
- type: "installation",
- });
- case "oauth-user":
- // @ts-expect-error TODO: infer correct auth options type based on type. authOptions should be typed as "WebFlowAuthOptions | OAuthAppDeviceFlowAuthOptions | GitHubAppDeviceFlowAuthOptions"
- return state.oauthApp(authOptions);
- default:
- // @ts-expect-error type is "never" at this point
- throw new Error(`Invalid auth type: ${authOptions.type}`);
- }
-}
-
-const PATHS = [
- "/app",
- "/app/hook/config",
- "/app/hook/deliveries",
- "/app/hook/deliveries/{delivery_id}",
- "/app/hook/deliveries/{delivery_id}/attempts",
- "/app/installations",
- "/app/installations/{installation_id}",
- "/app/installations/{installation_id}/access_tokens",
- "/app/installations/{installation_id}/suspended",
- "/marketplace_listing/accounts/{account_id}",
- "/marketplace_listing/plan",
- "/marketplace_listing/plans",
- "/marketplace_listing/plans/{plan_id}/accounts",
- "/marketplace_listing/stubbed/accounts/{account_id}",
- "/marketplace_listing/stubbed/plan",
- "/marketplace_listing/stubbed/plans",
- "/marketplace_listing/stubbed/plans/{plan_id}/accounts",
- "/orgs/{org}/installation",
- "/repos/{owner}/{repo}/installation",
- "/users/{username}/installation",
-];
-// CREDIT: Simon Grondin (https://github.com/SGrondin)
-// https://github.com/octokit/plugin-throttling.js/blob/45c5d7f13b8af448a9dbca468d9c9150a73b3948/lib/route-matcher.js
-function routeMatcher(paths) {
- // EXAMPLE. For the following paths:
- /* [
- "/orgs/{org}/invitations",
- "/repos/{owner}/{repo}/collaborators/{username}"
- ] */
- const regexes = paths.map((p) => p
- .split("/")
- .map((c) => (c.startsWith("{") ? "(?:.+?)" : c))
- .join("/"));
- // 'regexes' would contain:
- /* [
- '/orgs/(?:.+?)/invitations',
- '/repos/(?:.+?)/(?:.+?)/collaborators/(?:.+?)'
- ] */
- const regex = `^(?:${regexes.map((r) => `(?:${r})`).join("|")})[^/]*$`;
- // 'regex' would contain:
- /*
- ^(?:(?:\/orgs\/(?:.+?)\/invitations)|(?:\/repos\/(?:.+?)\/(?:.+?)\/collaborators\/(?:.+?)))[^\/]*$
-
- It may look scary, but paste it into https://www.debuggex.com/
- and it will make a lot more sense!
- */
- return new RegExp(regex, "i");
-}
-const REGEX = routeMatcher(PATHS);
-function requiresAppAuth(url) {
- return !!url && REGEX.test(url);
-}
-
-const FIVE_SECONDS_IN_MS = 5 * 1000;
-function isNotTimeSkewError(error) {
- return !(error.message.match(/'Expiration time' claim \('exp'\) must be a numeric value representing the future time at which the assertion expires/) ||
- error.message.match(/'Issued at' claim \('iat'\) must be an Integer representing the time that the assertion was issued/));
-}
-async function hook(state, request, route, parameters) {
- const endpoint = request.endpoint.merge(route, parameters);
- const url = endpoint.url;
- // Do not intercept request to retrieve a new token
- if (/\/login\/oauth\/access_token$/.test(url)) {
- return request(endpoint);
- }
- if (requiresAppAuth(url.replace(request.endpoint.DEFAULTS.baseUrl, ""))) {
- const { token } = await getAppAuthentication(state);
- endpoint.headers.authorization = `bearer ${token}`;
- let response;
- try {
- response = await request(endpoint);
- }
- catch (error) {
- // If there's an issue with the expiration, regenerate the token and try again.
- // Otherwise rethrow the error for upstream handling.
- if (isNotTimeSkewError(error)) {
- throw error;
- }
- // If the date header is missing, we can't correct the system time skew.
- // Throw the error to be handled upstream.
- if (typeof error.response.headers.date === "undefined") {
- throw error;
- }
- const diff = Math.floor((Date.parse(error.response.headers.date) -
- Date.parse(new Date().toString())) /
- 1000);
- state.log.warn(error.message);
- state.log.warn(`[@octokit/auth-app] GitHub API time and system time are different by ${diff} seconds. Retrying request with the difference accounted for.`);
- const { token } = await getAppAuthentication({
- ...state,
- timeDifference: diff,
- });
- endpoint.headers.authorization = `bearer ${token}`;
- return request(endpoint);
- }
- return response;
- }
- if (requiresBasicAuth(url)) {
- const authentication = await state.oauthApp({ type: "oauth-app" });
- endpoint.headers.authorization = authentication.headers.authorization;
- return request(endpoint);
- }
- const { token, createdAt } = await getInstallationAuthentication(state,
- // @ts-expect-error TBD
- {}, request);
- endpoint.headers.authorization = `token ${token}`;
- return sendRequestWithRetries(state, request, endpoint, createdAt);
-}
-/**
- * Newly created tokens might not be accessible immediately after creation.
- * In case of a 401 response, we retry with an exponential delay until more
- * than five seconds pass since the creation of the token.
- *
- * @see https://github.com/octokit/auth-app.js/issues/65
- */
-async function sendRequestWithRetries(state, request, options, createdAt, retries = 0) {
- const timeSinceTokenCreationInMs = +new Date() - +new Date(createdAt);
- try {
- return await request(options);
- }
- catch (error) {
- if (error.status !== 401) {
- throw error;
- }
- if (timeSinceTokenCreationInMs >= FIVE_SECONDS_IN_MS) {
- if (retries > 0) {
- error.message = `After ${retries} retries within ${timeSinceTokenCreationInMs / 1000}s of creating the installation access token, the response remains 401. At this point, the cause may be an authentication problem or a system outage. Please check https://www.githubstatus.com for status information`;
- }
- throw error;
- }
- ++retries;
- const awaitTime = retries * 1000;
- state.log.warn(`[@octokit/auth-app] Retrying after 401 response to account for token replication delay (retry: ${retries}, wait: ${awaitTime / 1000}s)`);
- await new Promise((resolve) => setTimeout(resolve, awaitTime));
- return sendRequestWithRetries(state, request, options, createdAt, retries);
- }
-}
-
-const VERSION = "4.0.7";
-
-function createAppAuth(options) {
- if (!options.appId) {
- throw new Error("[@octokit/auth-app] appId option is required");
- }
- if (!Number.isFinite(+options.appId)) {
- throw new Error("[@octokit/auth-app] appId option must be a number or numeric string");
- }
- if (!options.privateKey) {
- throw new Error("[@octokit/auth-app] privateKey option is required");
- }
- if ("installationId" in options && !options.installationId) {
- throw new Error("[@octokit/auth-app] installationId is set to a falsy value");
- }
- const log = Object.assign({
- warn: console.warn.bind(console),
- }, options.log);
- const request$1 = options.request ||
- request.defaults({
- headers: {
- "user-agent": `octokit-auth-app.js/${VERSION} ${getUserAgent()}`,
- },
- });
- const state = Object.assign({
- request: request$1,
- cache: getCache(),
- }, options, options.installationId
- ? { installationId: Number(options.installationId) }
- : {}, {
- log,
- oauthApp: createOAuthAppAuth({
- clientType: "github-app",
- clientId: options.clientId || "",
- clientSecret: options.clientSecret || "",
- request: request$1,
- }),
- });
- // @ts-expect-error not worth the extra code to appease TS
- return Object.assign(auth.bind(null, state), {
- hook: hook.bind(null, state),
- });
-}
-
-export { createAppAuth };
-//# sourceMappingURL=index.js.map
diff --git a/node_modules/@octokit/auth-app/dist-web/index.js.map b/node_modules/@octokit/auth-app/dist-web/index.js.map
deleted file mode 100644
index 48e1bbb..0000000
--- a/node_modules/@octokit/auth-app/dist-web/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sources":["../dist-src/get-app-authentication.js","../dist-src/cache.js","../dist-src/to-token-authentication.js","../dist-src/get-installation-authentication.js","../dist-src/auth.js","../dist-src/requires-app-auth.js","../dist-src/hook.js","../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["import { githubAppJwt } from \"universal-github-app-jwt\";\nexport async function getAppAuthentication({ appId, privateKey, timeDifference, }) {\n try {\n const appAuthentication = await githubAppJwt({\n id: +appId,\n privateKey,\n now: timeDifference && Math.floor(Date.now() / 1000) + timeDifference,\n });\n return {\n type: \"app\",\n token: appAuthentication.token,\n appId: appAuthentication.appId,\n expiresAt: new Date(appAuthentication.expiration * 1000).toISOString(),\n };\n }\n catch (error) {\n if (privateKey === \"-----BEGIN RSA PRIVATE KEY-----\") {\n throw new Error(\"The 'privateKey` option contains only the first line '-----BEGIN RSA PRIVATE KEY-----'. If you are setting it using a `.env` file, make sure it is set on a single line with newlines replaced by '\\n'\");\n }\n else {\n throw error;\n }\n }\n}\n","// https://github.com/isaacs/node-lru-cache#readme\nimport LRU from \"lru-cache\";\nexport function getCache() {\n return new LRU({\n // cache max. 15000 tokens, that will use less than 10mb memory\n max: 15000,\n // Cache for 1 minute less than GitHub expiry\n maxAge: 1000 * 60 * 59,\n });\n}\nexport async function get(cache, options) {\n const cacheKey = optionsToCacheKey(options);\n const result = await cache.get(cacheKey);\n if (!result) {\n return;\n }\n const [token, createdAt, expiresAt, repositorySelection, permissionsString, singleFileName,] = result.split(\"|\");\n const permissions = options.permissions ||\n permissionsString.split(/,/).reduce((permissions, string) => {\n if (/!$/.test(string)) {\n permissions[string.slice(0, -1)] = \"write\";\n }\n else {\n permissions[string] = \"read\";\n }\n return permissions;\n }, {});\n return {\n token,\n createdAt,\n expiresAt,\n permissions,\n repositoryIds: options.repositoryIds,\n repositoryNames: options.repositoryNames,\n singleFileName,\n repositorySelection: repositorySelection,\n };\n}\nexport async function set(cache, options, data) {\n const key = optionsToCacheKey(options);\n const permissionsString = options.permissions\n ? \"\"\n : Object.keys(data.permissions)\n .map((name) => `${name}${data.permissions[name] === \"write\" ? \"!\" : \"\"}`)\n .join(\",\");\n const value = [\n data.token,\n data.createdAt,\n data.expiresAt,\n data.repositorySelection,\n permissionsString,\n data.singleFileName,\n ].join(\"|\");\n await cache.set(key, value);\n}\nfunction optionsToCacheKey({ installationId, permissions = {}, repositoryIds = [], repositoryNames = [], }) {\n const permissionsString = Object.keys(permissions)\n .sort()\n .map((name) => (permissions[name] === \"read\" ? name : `${name}!`))\n .join(\",\");\n const repositoryIdsString = repositoryIds.sort().join(\",\");\n const repositoryNamesString = repositoryNames.join(\",\");\n return [\n installationId,\n repositoryIdsString,\n repositoryNamesString,\n permissionsString,\n ]\n .filter(Boolean)\n .join(\"|\");\n}\n","export function toTokenAuthentication({ installationId, token, createdAt, expiresAt, repositorySelection, permissions, repositoryIds, repositoryNames, singleFileName, }) {\n return Object.assign({\n type: \"token\",\n tokenType: \"installation\",\n token,\n installationId,\n permissions,\n createdAt,\n expiresAt,\n repositorySelection,\n }, repositoryIds ? { repositoryIds } : null, repositoryNames ? { repositoryNames } : null, singleFileName ? { singleFileName } : null);\n}\n","import { get, set } from \"./cache\";\nimport { getAppAuthentication } from \"./get-app-authentication\";\nimport { toTokenAuthentication } from \"./to-token-authentication\";\nexport async function getInstallationAuthentication(state, options, customRequest) {\n const installationId = Number(options.installationId || state.installationId);\n if (!installationId) {\n throw new Error(\"[@octokit/auth-app] installationId option is required for installation authentication.\");\n }\n if (options.factory) {\n const { type, factory, oauthApp, ...factoryAuthOptions } = {\n ...state,\n ...options,\n };\n // @ts-expect-error if `options.factory` is set, the return type for `auth()` should be `Promise>`\n return factory(factoryAuthOptions);\n }\n const optionsWithInstallationTokenFromState = Object.assign({ installationId }, options);\n if (!options.refresh) {\n const result = await get(state.cache, optionsWithInstallationTokenFromState);\n if (result) {\n const { token, createdAt, expiresAt, permissions, repositoryIds, repositoryNames, singleFileName, repositorySelection, } = result;\n return toTokenAuthentication({\n installationId,\n token,\n createdAt,\n expiresAt,\n permissions,\n repositorySelection,\n repositoryIds,\n repositoryNames,\n singleFileName,\n });\n }\n }\n const appAuthentication = await getAppAuthentication(state);\n const request = customRequest || state.request;\n const { data: { token, expires_at: expiresAt, repositories, permissions: permissionsOptional, repository_selection: repositorySelectionOptional, single_file: singleFileName, }, } = await request(\"POST /app/installations/{installation_id}/access_tokens\", {\n installation_id: installationId,\n repository_ids: options.repositoryIds,\n repositories: options.repositoryNames,\n permissions: options.permissions,\n mediaType: {\n previews: [\"machine-man\"],\n },\n headers: {\n authorization: `bearer ${appAuthentication.token}`,\n },\n });\n /* istanbul ignore next - permissions are optional per OpenAPI spec, but we think that is incorrect */\n const permissions = permissionsOptional || {};\n /* istanbul ignore next - repositorySelection are optional per OpenAPI spec, but we think that is incorrect */\n const repositorySelection = repositorySelectionOptional || \"all\";\n const repositoryIds = repositories\n ? repositories.map((r) => r.id)\n : void 0;\n const repositoryNames = repositories\n ? repositories.map((repo) => repo.name)\n : void 0;\n const createdAt = new Date().toISOString();\n await set(state.cache, optionsWithInstallationTokenFromState, {\n token,\n createdAt,\n expiresAt,\n repositorySelection,\n permissions,\n repositoryIds,\n repositoryNames,\n singleFileName,\n });\n return toTokenAuthentication({\n installationId,\n token,\n createdAt,\n expiresAt,\n repositorySelection,\n permissions,\n repositoryIds,\n repositoryNames,\n singleFileName,\n });\n}\n","import { Deprecation } from \"deprecation\";\nimport { getAppAuthentication } from \"./get-app-authentication\";\nimport { getInstallationAuthentication } from \"./get-installation-authentication\";\nexport async function auth(state, authOptions) {\n switch (authOptions.type) {\n case \"app\":\n return getAppAuthentication(state);\n // @ts-expect-error \"oauth\" is not supperted in types\n case \"oauth\":\n state.log.warn(\n // @ts-expect-error `log.warn()` expects string\n new Deprecation(`[@octokit/auth-app] {type: \"oauth\"} is deprecated. Use {type: \"oauth-app\"} instead`));\n case \"oauth-app\":\n return state.oauthApp({ type: \"oauth-app\" });\n case \"installation\":\n authOptions;\n return getInstallationAuthentication(state, {\n ...authOptions,\n type: \"installation\",\n });\n case \"oauth-user\":\n // @ts-expect-error TODO: infer correct auth options type based on type. authOptions should be typed as \"WebFlowAuthOptions | OAuthAppDeviceFlowAuthOptions | GitHubAppDeviceFlowAuthOptions\"\n return state.oauthApp(authOptions);\n default:\n // @ts-expect-error type is \"never\" at this point\n throw new Error(`Invalid auth type: ${authOptions.type}`);\n }\n}\n","const PATHS = [\n \"/app\",\n \"/app/hook/config\",\n \"/app/hook/deliveries\",\n \"/app/hook/deliveries/{delivery_id}\",\n \"/app/hook/deliveries/{delivery_id}/attempts\",\n \"/app/installations\",\n \"/app/installations/{installation_id}\",\n \"/app/installations/{installation_id}/access_tokens\",\n \"/app/installations/{installation_id}/suspended\",\n \"/marketplace_listing/accounts/{account_id}\",\n \"/marketplace_listing/plan\",\n \"/marketplace_listing/plans\",\n \"/marketplace_listing/plans/{plan_id}/accounts\",\n \"/marketplace_listing/stubbed/accounts/{account_id}\",\n \"/marketplace_listing/stubbed/plan\",\n \"/marketplace_listing/stubbed/plans\",\n \"/marketplace_listing/stubbed/plans/{plan_id}/accounts\",\n \"/orgs/{org}/installation\",\n \"/repos/{owner}/{repo}/installation\",\n \"/users/{username}/installation\",\n];\n// CREDIT: Simon Grondin (https://github.com/SGrondin)\n// https://github.com/octokit/plugin-throttling.js/blob/45c5d7f13b8af448a9dbca468d9c9150a73b3948/lib/route-matcher.js\nfunction routeMatcher(paths) {\n // EXAMPLE. For the following paths:\n /* [\n \"/orgs/{org}/invitations\",\n \"/repos/{owner}/{repo}/collaborators/{username}\"\n ] */\n const regexes = paths.map((p) => p\n .split(\"/\")\n .map((c) => (c.startsWith(\"{\") ? \"(?:.+?)\" : c))\n .join(\"/\"));\n // 'regexes' would contain:\n /* [\n '/orgs/(?:.+?)/invitations',\n '/repos/(?:.+?)/(?:.+?)/collaborators/(?:.+?)'\n ] */\n const regex = `^(?:${regexes.map((r) => `(?:${r})`).join(\"|\")})[^/]*$`;\n // 'regex' would contain:\n /*\n ^(?:(?:\\/orgs\\/(?:.+?)\\/invitations)|(?:\\/repos\\/(?:.+?)\\/(?:.+?)\\/collaborators\\/(?:.+?)))[^\\/]*$\n \n It may look scary, but paste it into https://www.debuggex.com/\n and it will make a lot more sense!\n */\n return new RegExp(regex, \"i\");\n}\nconst REGEX = routeMatcher(PATHS);\nexport function requiresAppAuth(url) {\n return !!url && REGEX.test(url);\n}\n","import { requiresBasicAuth } from \"@octokit/auth-oauth-user\";\nimport { getAppAuthentication } from \"./get-app-authentication\";\nimport { getInstallationAuthentication } from \"./get-installation-authentication\";\nimport { requiresAppAuth } from \"./requires-app-auth\";\nconst FIVE_SECONDS_IN_MS = 5 * 1000;\nfunction isNotTimeSkewError(error) {\n return !(error.message.match(/'Expiration time' claim \\('exp'\\) must be a numeric value representing the future time at which the assertion expires/) ||\n error.message.match(/'Issued at' claim \\('iat'\\) must be an Integer representing the time that the assertion was issued/));\n}\nexport async function hook(state, request, route, parameters) {\n const endpoint = request.endpoint.merge(route, parameters);\n const url = endpoint.url;\n // Do not intercept request to retrieve a new token\n if (/\\/login\\/oauth\\/access_token$/.test(url)) {\n return request(endpoint);\n }\n if (requiresAppAuth(url.replace(request.endpoint.DEFAULTS.baseUrl, \"\"))) {\n const { token } = await getAppAuthentication(state);\n endpoint.headers.authorization = `bearer ${token}`;\n let response;\n try {\n response = await request(endpoint);\n }\n catch (error) {\n // If there's an issue with the expiration, regenerate the token and try again.\n // Otherwise rethrow the error for upstream handling.\n if (isNotTimeSkewError(error)) {\n throw error;\n }\n // If the date header is missing, we can't correct the system time skew.\n // Throw the error to be handled upstream.\n if (typeof error.response.headers.date === \"undefined\") {\n throw error;\n }\n const diff = Math.floor((Date.parse(error.response.headers.date) -\n Date.parse(new Date().toString())) /\n 1000);\n state.log.warn(error.message);\n state.log.warn(`[@octokit/auth-app] GitHub API time and system time are different by ${diff} seconds. Retrying request with the difference accounted for.`);\n const { token } = await getAppAuthentication({\n ...state,\n timeDifference: diff,\n });\n endpoint.headers.authorization = `bearer ${token}`;\n return request(endpoint);\n }\n return response;\n }\n if (requiresBasicAuth(url)) {\n const authentication = await state.oauthApp({ type: \"oauth-app\" });\n endpoint.headers.authorization = authentication.headers.authorization;\n return request(endpoint);\n }\n const { token, createdAt } = await getInstallationAuthentication(state, \n // @ts-expect-error TBD\n {}, request);\n endpoint.headers.authorization = `token ${token}`;\n return sendRequestWithRetries(state, request, endpoint, createdAt);\n}\n/**\n * Newly created tokens might not be accessible immediately after creation.\n * In case of a 401 response, we retry with an exponential delay until more\n * than five seconds pass since the creation of the token.\n *\n * @see https://github.com/octokit/auth-app.js/issues/65\n */\nasync function sendRequestWithRetries(state, request, options, createdAt, retries = 0) {\n const timeSinceTokenCreationInMs = +new Date() - +new Date(createdAt);\n try {\n return await request(options);\n }\n catch (error) {\n if (error.status !== 401) {\n throw error;\n }\n if (timeSinceTokenCreationInMs >= FIVE_SECONDS_IN_MS) {\n if (retries > 0) {\n error.message = `After ${retries} retries within ${timeSinceTokenCreationInMs / 1000}s of creating the installation access token, the response remains 401. At this point, the cause may be an authentication problem or a system outage. Please check https://www.githubstatus.com for status information`;\n }\n throw error;\n }\n ++retries;\n const awaitTime = retries * 1000;\n state.log.warn(`[@octokit/auth-app] Retrying after 401 response to account for token replication delay (retry: ${retries}, wait: ${awaitTime / 1000}s)`);\n await new Promise((resolve) => setTimeout(resolve, awaitTime));\n return sendRequestWithRetries(state, request, options, createdAt, retries);\n }\n}\n","export const VERSION = \"4.0.7\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { request as defaultRequest } from \"@octokit/request\";\nimport { createOAuthAppAuth } from \"@octokit/auth-oauth-app\";\nimport { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nimport { getCache } from \"./cache\";\nimport { VERSION } from \"./version\";\nexport { createOAuthUserAuth } from \"@octokit/auth-oauth-user\";\nexport function createAppAuth(options) {\n if (!options.appId) {\n throw new Error(\"[@octokit/auth-app] appId option is required\");\n }\n if (!Number.isFinite(+options.appId)) {\n throw new Error(\"[@octokit/auth-app] appId option must be a number or numeric string\");\n }\n if (!options.privateKey) {\n throw new Error(\"[@octokit/auth-app] privateKey option is required\");\n }\n if (\"installationId\" in options && !options.installationId) {\n throw new Error(\"[@octokit/auth-app] installationId is set to a falsy value\");\n }\n const log = Object.assign({\n warn: console.warn.bind(console),\n }, options.log);\n const request = options.request ||\n defaultRequest.defaults({\n headers: {\n \"user-agent\": `octokit-auth-app.js/${VERSION} ${getUserAgent()}`,\n },\n });\n const state = Object.assign({\n request,\n cache: getCache(),\n }, options, options.installationId\n ? { installationId: Number(options.installationId) }\n : {}, {\n log,\n oauthApp: createOAuthAppAuth({\n clientType: \"github-app\",\n clientId: options.clientId || \"\",\n clientSecret: options.clientSecret || \"\",\n request,\n }),\n });\n // @ts-expect-error not worth the extra code to appease TS\n return Object.assign(auth.bind(null, state), {\n hook: hook.bind(null, state),\n });\n}\n"],"names":["request","defaultRequest"],"mappings":";;;;;;;;;AACO,eAAe,oBAAoB,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,cAAc,GAAG,EAAE;AACnF,IAAI,IAAI;AACR,QAAQ,MAAM,iBAAiB,GAAG,MAAM,YAAY,CAAC;AACrD,YAAY,EAAE,EAAE,CAAC,KAAK;AACtB,YAAY,UAAU;AACtB,YAAY,GAAG,EAAE,cAAc,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,cAAc;AACjF,SAAS,CAAC,CAAC;AACX,QAAQ,OAAO;AACf,YAAY,IAAI,EAAE,KAAK;AACvB,YAAY,KAAK,EAAE,iBAAiB,CAAC,KAAK;AAC1C,YAAY,KAAK,EAAE,iBAAiB,CAAC,KAAK;AAC1C,YAAY,SAAS,EAAE,IAAI,IAAI,CAAC,iBAAiB,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC,WAAW,EAAE;AAClF,SAAS,CAAC;AACV,KAAK;AACL,IAAI,OAAO,KAAK,EAAE;AAClB,QAAQ,IAAI,UAAU,KAAK,iCAAiC,EAAE;AAC9D,YAAY,MAAM,IAAI,KAAK,CAAC,wMAAwM,CAAC,CAAC;AACtO,SAAS;AACT,aAAa;AACb,YAAY,MAAM,KAAK,CAAC;AACxB,SAAS;AACT,KAAK;AACL;;ACvBA;AACA,AACO,SAAS,QAAQ,GAAG;AAC3B,IAAI,OAAO,IAAI,GAAG,CAAC;AACnB;AACA,QAAQ,GAAG,EAAE,KAAK;AAClB;AACA,QAAQ,MAAM,EAAE,IAAI,GAAG,EAAE,GAAG,EAAE;AAC9B,KAAK,CAAC,CAAC;AACP,CAAC;AACD,AAAO,eAAe,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE;AAC1C,IAAI,MAAM,QAAQ,GA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AY;AACpC,YAAY,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,EAAE;AAC5C,YAAY,YAAY,EAAE,OAAO,CAAC,YAAY,IAAI,EAAE;AACpD,qBAAYA,SAAO;AACnB,SAAS,CAAC;AACV,KAAK,CAAC,CAAC;AACP;AACA,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE;AACjD,QAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC;AACpC,KAAK,CAAC,CAAC;AACP,CAAC;;;;"}
\ No newline at end of file
diff --git a/node_modules/@octokit/auth-app/package.json b/node_modules/@octokit/auth-app/package.json
deleted file mode 100644
index 1db2e18..0000000
--- a/node_modules/@octokit/auth-app/package.json
+++ /dev/null
@@ -1,57 +0,0 @@
-{
- "name": "@octokit/auth-app",
- "description": "GitHub App authentication for JavaScript",
- "version": "4.0.7",
- "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",
- "octokit",
- "authentication",
- "api"
- ],
- "repository": "github:octokit/auth-app.js",
- "dependencies": {
- "@octokit/auth-oauth-app": "^5.0.0",
- "@octokit/auth-oauth-user": "^2.0.0",
- "@octokit/request": "^6.0.0",
- "@octokit/request-error": "^3.0.0",
- "@octokit/types": "^8.0.0",
- "@types/lru-cache": "^5.1.0",
- "deprecation": "^2.3.1",
- "lru-cache": "^6.0.0",
- "universal-github-app-jwt": "^1.0.1",
- "universal-user-agent": "^6.0.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",
- "@sinonjs/fake-timers": "^8.0.0",
- "@types/fetch-mock": "^7.3.1",
- "@types/jest": "^29.0.0",
- "@types/sinonjs__fake-timers": "^8.0.0",
- "fetch-mock": "^9.0.0",
- "jest": "^29.0.0",
- "prettier": "2.7.1",
- "semantic-release-plugin-update-version-in-files": "^1.0.0",
- "ts-jest": "^29.0.0",
- "typescript": "^4.0.2"
- },
- "engines": {
- "node": ">= 14"
- },
- "publishConfig": {
- "access": "public"
- }
-}
diff --git a/node_modules/@octokit/auth-oauth-app/LICENSE b/node_modules/@octokit/auth-oauth-app/LICENSE
deleted file mode 100644
index ef2c18e..0000000
--- a/node_modules/@octokit/auth-oauth-app/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License
-
-Copyright (c) 2019 Octokit contributors
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/@octokit/auth-oauth-app/README.md b/node_modules/@octokit/auth-oauth-app/README.md
deleted file mode 100644
index 27ed15b..0000000
--- a/node_modules/@octokit/auth-oauth-app/README.md
+++ /dev/null
@@ -1,1054 +0,0 @@
-# auth-oauth-app.js
-
-> GitHub OAuth App authentication for JavaScript
-
-[](https://www.npmjs.com/package/@octokit/auth-oauth-app)
-[](https://github.com/octokit/auth-oauth-app.js/actions?query=workflow%3ATest)
-
-`@octokit/auth-oauth-app` is implementing one of [GitHub’s authentication strategies](https://github.com/octokit/auth.js).
-
-It implements authentication using an OAuth app’s client ID and secret as well as creating user access tokens GitHub's OAuth [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) and [device flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#device-flow).
-
-
-
-- [Standalone Usage](#standalone-usage)
- - [Authenticate as app](#authenticate-as-app)
- - [Authenticate user using OAuth Web Flow](#authenticate-user-using-oauth-web-flow)
- - [Authenticate user using OAuth Device flow](#authenticate-user-using-oauth-device-flow)
-- [Usage with Octokit](#usage-with-octokit)
-- [`createOAuthAppAuth(options)` or `new Octokit({ auth })`](#createoauthappauthoptions-or-new-octokit-auth-)
-- [`auth(options)` or `octokit.auth(options)`](#authoptions-or-octokitauthoptions)
- - [Client ID/Client Secret Basic authentication](#client-idclient-secret-basic-authentication)
- - [OAuth web flow](#oauth-web-flow)
- - [OAuth device flow](#oauth-device-flow)
-- [Authentication object](#authentication-object)
- - [OAuth App authentication](#oauth-app-authentication)
- - [OAuth user access token authentication](#oauth-user-access-token-authentication)
- - [GitHub APP user authentication token with expiring disabled](#github-app-user-authentication-token-with-expiring-disabled)
- - [GitHub APP user authentication token with expiring enabled](#github-app-user-authentication-token-with-expiring-enabled)
-- [`auth.hook(request, route, parameters)` or `auth.hook(request, options)`](#authhookrequest-route-parameters-or-authhookrequest-options)
-- [Types](#types)
-- [Implementation details](#implementation-details)
-- [License](#license)
-
-
-
-## Standalone Usage
-
-
-
-
-Browsers
-
-
-⚠️ `@octokit/auth-oauth-app` is not meant for usage in the browser. The OAuth APIs to create tokens do not have CORS enabled, and a client secret must not be exposed to the client.
-
-If you know what you are doing, load `@octokit/auth-oauth-app` directly from [cdn.skypack.dev](https://cdn.skypack.dev)
-
-```html
-
-```
-
-
-
-### Authenticate as app
-
-```js
-const auth = createOAuthAppAuth({
- clientType: "oauth-app",
- clientId: "1234567890abcdef1234",
- clientSecret: "1234567890abcdef1234567890abcdef12345678",
-});
-
-const appAuthentication = await auth({
- type: "oauth-app",
-});
-```
-
-resolves with
-
-```json
-{
- "type": "oauth-app",
- "clientId": "1234567890abcdef1234",
- "clientSecret": "1234567890abcdef1234567890abcdef12345678",
- "headers": {
- "authorization": "basic MTIzNDU2Nzg5MGFiY2RlZjEyMzQ6MTIzNDU2Nzg5MGFiY2RlZjEyMzQ1Njc4OTBhYmNkZWYxMjM0NTY3OA=="
- }
-}
-```
-
-### Authenticate user using OAuth Web Flow
-
-Exchange code from GitHub's OAuth web flow, see https://docs.github.com/en/developers/apps/authorizing-oauth-apps#2-users-are-redirected-back-to-your-site-by-github
-
-```js
-const auth = createOAuthAppAuth({
- clientType: "oauth-app",
- clientId: "1234567890abcdef1234",
- clientSecret: "1234567890abcdef1234567890abcdef12345678",
-});
-
-const userAuthenticationFromWebFlow = await auth({
- type: "oauth-user",
- code: "random123",
- state: "mystate123",
-});
-```
-
-resolves with
-
-```json
-{
- "clientType": "oauth-app",
- "clientId": "1234567890abcdef1234",
- "clientSecret": "1234567890abcdef1234567890abcdef12345678",
- "type": "token",
- "tokenType": "oauth",
- "token": "useraccesstoken123",
- "scopes": []
-}
-```
-
-### Authenticate user using OAuth Device flow
-
-Pass an asynchronous `onVerification()` method which will be called with the response from step 1 of the device flow. In that function you have to prompt the user to enter the user code at the provided verification URL.
-
-`auth()` will not resolve until the user entered the code and granted access to the app.
-
-See https://docs.github.com/en/developers/apps/authorizing-oauth-apps#2-users-are-redirected-back-to-your-site-by-github
-
-```js
-const auth = createOAuthAppAuth({
- clientType: "oauth-app",
- clientId: "1234567890abcdef1234",
- clientSecret: "1234567890abcdef1234567890abcdef12345678",
-});
-
-const userAuthenticationFromDeviceFlow = await auth({
- async onVerification(verification) {
- // verification example
- // {
- // device_code: "3584d83530557fdd1f46af8289938c8ef79f9dc5",
- // user_code: "WDJB-MJHT",
- // verification_uri: "https://github.com/login/device",
- // expires_in: 900,
- // interval: 5,
- // };
-
- console.log("Open %s", verification.verification_uri);
- console.log("Enter code: %s", verification.user_code);
- },
-});
-```
-
-resolves with
-
-```json
-{
- "clientType": "oauth-app",
- "clientId": "1234567890abcdef1234",
- "clientSecret": "1234567890abcdef1234567890abcdef12345678",
- "type": "token",
- "tokenType": "oauth",
- "token": "useraccesstoken123",
- "scopes": []
-}
-```
-
-## Usage with Octokit
-
-
-
-
-
-Browsers
-
-
-
-⚠️ `@octokit/auth-oauth-app` is not meant for usage in the browser. The OAuth APIs to create tokens do not have CORS enabled, and a client secret must not be exposed to the client.
-
-If you know what you are doing, load `@octokit/auth-oauth-app` and `@octokit/core` (or a compatible module) directly from [cdn.skypack.dev](https://cdn.skypack.dev)
-
-```html
-
-```
-
-
-
-```js
-const appOctokit = new Octokit({
- authStrategy: createOAuthAppAuth,
- auth: {
- clientId: "1234567890abcdef1234",
- clientSecret: "1234567890abcdef1234567890abcdef12345678",
- },
-});
-
-// Send requests as app
-await appOctokit.request("POST /application/{client_id}/token", {
- client_id: "1234567890abcdef1234",
- access_token: "existingtoken123",
-});
-console.log("token is valid");
-
-// create a new octokit instance that is authenticated as the user
-const userOctokit = await appOctokit.auth({
- type: "oauth-user",
- code: "code123",
- factory: (options) => {
- return new Octokit({
- authStrategy: createOAuthUserAuth,
- auth: options,
- });
- },
-});
-
-// Exchanges the code for the user access token authentication on first request
-// and caches the authentication for successive requests
-const {
- data: { login },
-} = await userOctokit.request("GET /user");
-console.log("Hello, %s!", login);
-```
-
-## `createOAuthAppAuth(options)` or `new Octokit({ auth })`
-
-The `createOAuthAppAuth` method accepts a single `options` object as argument. The same set of options can be passed as `auth` to the `Octokit` constructor when setting `authStrategy: createOAuthAppAuth`
-
-
-
-
-
- name
-
-
- type
-
-
- description
-
-
-
-
-
-
- clientId
-
-
- string
-
-
- Required. Find your OAuth app’s Client ID in your account’s developer settings.
-
-
-
-
- clientSecret
-
-
- string
-
-
- Required. Find your OAuth app’s Client Secret in your account’s developer settings.
-
-
-
-
- clientType
-
-
- string
-
-
- Must be set to either "oauth-app" or "github-app". Defaults to "oauth-app"
-
-
-
-
- request
-
-
- function
-
-
- You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the API root endpoint. Example:
-
-```js
-const { request } = require("@octokit/request");
-createOAuthAppAuth({
- clientId: "1234567890abcdef1234",
- clientSecret: "1234567890abcdef1234567890abcdef12345678",
- request: request.defaults({
- baseUrl: "https://ghe.my-company.com/api/v3",
- }),
-});
-```
-
-
-
-
-
-## `auth(options)` or `octokit.auth(options)`
-
-The async `auth()` method returned by `createOAuthAppAuth(options)` accepts different options depending on your use case
-
-### Client ID/Client Secret Basic authentication
-
-All REST API routes starting with `/applications/{client_id}` need to be authenticated using the OAuth/GitHub App's Client ID and a client secret.
-
-
-
-
-
- name
-
-
- type
-
-
- description
-
-
-
-
-
-
- type
-
-
- string
-
-
- Required. Must be set to "oauth-app"
-
-
-
-
-
-### OAuth web flow
-
-Exchange `code` for a user access token. See [Web application flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#web-application-flow).
-
-
-
-
-
- name
-
-
- type
-
-
- description
-
-
-
-
-
-
- type
-
-
- string
-
-
- Required. Must be set to "oauth-user".
-
-
-
-
- code
-
-
- string
-
-
- Required. The authorization code which was passed as query parameter to the callback URL from the OAuth web application flow.
-
-
-
-
- redirectUrl
-
-
- string
-
-
- The URL in your application where users are sent after authorization. See redirect urls.
-
-
-When the `factory` option is, the `auth({type: "oauth-user", code, factory })` call with resolve with whatever the `factory` function returns. The `factory` function will be called with all the strategy option that `auth` was created with, plus the additional options passed to `auth`, besides `type` and `factory`.
-
-For example, you can create a new `auth` instance for for a user using [`createOAuthUserAuth`](https://github.com/octokit/auth-oauth-user.js/#readme) which implements auto-refreshing tokens, among other features. You can import `createOAuthUserAuth` directly from `@octokit/auth-oauth-app` which will ensure compatibility.
-
-```js
-const {
- createOAuthAppAuth,
- createOAuthUserAuth,
-} = require("@octokit/auth-oauth-app");
-
-const appAuth = createOAuthAppAuth({
- clientType: "github-app",
- clientId: "lv1.1234567890abcdef",
- clientSecret: "1234567890abcdef1234567890abcdef12345678",
-});
-
-const userAuth = await appAuth({
- type: "oauth-user",
- code,
- factory: createOAuthUserAuth,
-});
-
-// will create token upon first call, then cache authentication for successive calls,
-// until token needs to be refreshed (if enabled for the GitHub App)
-const authentication = await userAuth();
-```
-
-
-
-
-
-
-### OAuth device flow
-
-Create a user access token without an http redirect. See [Device flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#device-flow).
-
-The device flow does not require a client secret, but it is required as strategy option for `@octokit/auth-oauth-app`, even for the device flow. If you want to implement the device flow without requiring a client secret, use [`@octokit/auth-oauth-device`](https://github.com/octokit/auth-oauth-device.js#readme).
-
-
-
-
-
- name
-
-
- type
-
-
- description
-
-
-
-
-
-
- type
-
-
- string
-
-
- Required. Must be set to "oauth-user".
-
-
-
-
- onVerification
-
-
- function
-
-
-
-**Required**. A function that is called once the device and user codes were retrieved.
-
-The `onVerification()` callback can be used to pause until the user completes step 2, which might result in a better user experience.
-
-```js
-const auth = auth({
- type: "oauth-user",
- onVerification(verification) {
- console.log("Open %s", verification.verification_uri);
- console.log("Enter code: %s", verification.user_code);
-
- await prompt("press enter when you are ready to continue");
- },
-});
-```
-
-
-
-
-
- scopes
-
-
- array of strings
-
-
- Only relevant if the clientType strategy option is set to "oauth-app".Array of OAuth scope names that the user access token should be granted. Defaults to no scopes ([]).
-
-
-
-
- factory
-
-
- function
-
-
-
-When the `factory` option is, the `auth({type: "oauth-user", code, factory })` call with resolve with whatever the `factory` function returns. The `factory` function will be called with all the strategy option that `auth` was created with, plus the additional options passed to `auth`, besides `type` and `factory`.
-
-For example, you can create a new `auth` instance for for a user using [`createOAuthUserAuth`](https://github.com/octokit/auth-oauth-user.js/#readme) which implements auto-refreshing tokens, among other features. You can import `createOAuthUserAuth` directly from `@octokit/auth-oauth-app` which will ensure compatibility.
-
-```js
-const {
- createOAuthAppAuth,
- createOAuthUserAuth,
-} = require("@octokit/auth-oauth-app");
-
-const appAuth = createOAuthAppAuth({
- clientType: "github-app",
- clientId: "lv1.1234567890abcdef",
- clientSecret: "1234567890abcdef1234567890abcdef12345678",
-});
-
-const userAuth = await appAuth({
- type: "oauth-user",
- onVerification,
- factory: createOAuthUserAuth,
-});
-
-// will create token upon first call, then cache authentication for successive calls,
-// until token needs to be refreshed (if enabled for the GitHub App)
-const authentication = await userAuth();
-```
-
-
-
-
-
-
-## Authentication object
-
-The async `auth(options)` method to one of four possible authentication objects
-
-1. **OAuth App authentication** for `auth({ type: "oauth-app" })`
-2. **OAuth user access token authentication** for `auth({ type: "oauth-app" })` and App is an OAuth App (OAuth user access token)
-3. **GitHub APP user authentication token with expiring disabled** for `auth({ type: "oauth-app" })` and App is a GitHub App (user-to-server token)
-4. **GitHub APP user authentication token with expiring enabled** for `auth({ type: "oauth-app" })` and App is a GitHub App (user-to-server token)
-
-### OAuth App authentication
-
-
-
-
-
- name
-
-
- type
-
-
- description
-
-
-
-
-
-
- type
-
-
- string
-
-
- "oauth-app"
-
-
-
-
- clientType
-
-
- string
-
-
- "oauth-app" or "github-app"
-
-
-
-
- clientId
-
-
- string
-
-
- The client ID as passed to the constructor.
-
-
-
-
- clientSecret
-
-
- string
-
-
- The client secret as passed to the constructor.
-
-
-
-
- headers
-
-
- object
-
-
- { authorization }.
-
-
-
-
-
-### OAuth user access token authentication
-
-
-
-
-
- name
-
-
- type
-
-
- description
-
-
-
-
-
-
- type
-
-
- string
-
-
- "token"
-
-
-
-
- tokenType
-
-
- string
-
-
- "oauth"
-
-
-
-
- clientType
-
-
- string
-
-
- "oauth-app"
-
-
-
-
- clientId
-
-
- string
-
-
- The clientId from the strategy options
-
-
-
-
- clientSecret
-
-
- string
-
-
- The clientSecret from the strategy options
-
-
-
-
- token
-
-
- string
-
-
- The user access token
-
-
-
-
- scopes
-
-
- array of strings
-
-
- array of scope names enabled for the token
-
-
-
-
-
-### GitHub APP user authentication token with expiring disabled
-
-
-
-
-
- name
-
-
- type
-
-
- description
-
-
-
-
-
-
- type
-
-
- string
-
-
- "token"
-
-
-
-
- tokenType
-
-
- string
-
-
- "oauth"
-
-
-
-
- clientType
-
-
- string
-
-
- "github-app"
-
-
-
-
- clientId
-
-
- string
-
-
- The app's Client ID
-
-
-
-
- clientSecret
-
-
- string
-
-
- One of the app's client secrets
-
-
-
-
- token
-
-
- string
-
-
- The user access token
-
-
-
-
-
-### GitHub APP user authentication token with expiring enabled
-
-
-
-
-
- name
-
-
- type
-
-
- description
-
-
-
-
-
-
- type
-
-
- string
-
-
- "token"
-
-
-
-
- tokenType
-
-
- string
-
-
- "oauth"
-
-
-
-
- clientType
-
-
- string
-
-
- "github-app"
-
-
-
-
- clientId
-
-
- string
-
-
- The app's Client ID
-
-
-
-
- clientSecret
-
-
- string
-
-
- One of the app's client secrets
-
-
-
-
- token
-
-
- string
-
-
- The user access token
-
-
-
-
- refreshToken
-
-
- string
-
-
- The refresh token
-
-
-
-
- expiresAt
-
-
- string
-
-
- Date timestamp in ISO 8601 standard. Example: 2022-01-01T08:00:0.000Z
-
-
-
-
- refreshTokenExpiresAt
-
-
- string
-
-
- Date timestamp in ISO 8601 standard. Example: 2021-07-01T00:00:0.000Z
-
-
-
-
-
-## `auth.hook(request, route, parameters)` or `auth.hook(request, options)`
-
-`auth.hook()` hooks directly into the request life cycle. It amends the request to authenticate correctly using `clientId` and `clientSecret` as basic auth for the API endpoints that support it. It throws an error in other cases.
-
-The `request` option is an instance of [`@octokit/request`](https://github.com/octokit/request.js#readme). The `route`/`options` parameters are the same as for the [`request()` method](https://github.com/octokit/request.js#request).
-
-`auth.hook()` can be called directly to send an authenticated request
-
-```js
-const { data: user } = await auth.hook(
- request,
- "POST /applications/{client_id}/token",
- {
- client_id: "1234567890abcdef1234",
- access_token: "token123",
- }
-);
-```
-
-Or it can be passed as option to [`request()`](https://github.com/octokit/request.js#request).
-
-```js
-const requestWithAuth = request.defaults({
- request: {
- hook: auth.hook,
- },
-});
-
-const { data: user } = await requestWithAuth(
- "POST /applications/{client_id}/token",
- {
- client_id: "1234567890abcdef1234",
- access_token: "token123",
- }
-);
-```
-
-## Types
-
-```ts
-import {
- // strategy options
- OAuthAppStrategyOptions,
- GitHubAppStrategyOptions,
- // auth options
- AppAuthOptions,
- WebFlowAuthOptions,
- OAuthAppDeviceFlowAuthOptions,
- GitHubAppDeviceFlowAuthOptions,
- // auth interfaces
- OAuthAppAuthInterface,
- GitHubAuthInterface,
- // authentication object
- AppAuthentication,
- OAuthAppUserAuthentication,
- GitHubAppUserAuthentication,
- GitHubAppUserAuthenticationWithExpiration,
-} from "@octokit/auth-oauth-app";
-```
-
-## Implementation details
-
-Client ID and secret can be passed as Basic auth in the `Authorization` header in order to get a higher rate limit compared to unauthenticated requests. This is meant for the use on servers only: never expose an OAuth client secret on a client such as a web application!
-
-`auth.hook` will set the correct authentication header automatically based on the request URL. For all [OAuth Application endpoints](https://developer.github.com/v3/apps/oauth_applications/), the `Authorization` header is set to basic auth. For all other endpoints and token is retrieved and used in the `Authorization` header. The token is cached and used for succeeding requests.
-
-To reset the cached access token, you can do this
-
-```js
-const { token } = await auth({ type: "oauth-user" });
-await auth.hook(request, "POST /applications/{client_id}/token", {
- client_id: "1234567890abcdef1234",
- access_token: token,
-});
-```
-
-The internally cached token will be replaced and used for succeeding requests. See also ["the REST API documentation"](https://developer.github.com/v3/oauth_authorizations/).
-
-See also: [octokit/oauth-authorization-url.js](https://github.com/octokit/oauth-authorization-url.js).
-
-## License
-
-[MIT](LICENSE)
-
-```
-
-```
diff --git a/node_modules/@octokit/auth-oauth-app/dist-node/index.js b/node_modules/@octokit/auth-oauth-app/dist-node/index.js
deleted file mode 100644
index fcf5583..0000000
--- a/node_modules/@octokit/auth-oauth-app/dist-node/index.js
+++ /dev/null
@@ -1,99 +0,0 @@
-'use strict';
-
-Object.defineProperty(exports, '__esModule', { value: true });
-
-function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
-
-var universalUserAgent = require('universal-user-agent');
-var request = require('@octokit/request');
-var btoa = _interopDefault(require('btoa-lite'));
-var authOauthUser = require('@octokit/auth-oauth-user');
-
-async function auth(state, authOptions) {
- if (authOptions.type === "oauth-app") {
- return {
- type: "oauth-app",
- clientId: state.clientId,
- clientSecret: state.clientSecret,
- clientType: state.clientType,
- headers: {
- authorization: `basic ${btoa(`${state.clientId}:${state.clientSecret}`)}`
- }
- };
- }
-
- if ("factory" in authOptions) {
- const {
- type,
- ...options
- } = { ...authOptions,
- ...state
- }; // @ts-expect-error TODO: `option` cannot be never, is this a bug?
-
- return authOptions.factory(options);
- }
-
- const common = {
- clientId: state.clientId,
- clientSecret: state.clientSecret,
- request: state.request,
- ...authOptions
- }; // TS: Look what you made me do
-
- const userAuth = state.clientType === "oauth-app" ? await authOauthUser.createOAuthUserAuth({ ...common,
- clientType: state.clientType
- }) : await authOauthUser.createOAuthUserAuth({ ...common,
- clientType: state.clientType
- });
- return userAuth();
-}
-
-async function hook(state, request, route, parameters) {
- let endpoint = request.endpoint.merge(route, parameters); // Do not intercept OAuth Web/Device flow request
-
- if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) {
- return request(endpoint);
- }
-
- if (state.clientType === "github-app" && !authOauthUser.requiresBasicAuth(endpoint.url)) {
- throw new Error(`[@octokit/auth-oauth-app] GitHub Apps cannot use their client ID/secret for basic authentication for endpoints other than "/applications/{client_id}/**". "${endpoint.method} ${endpoint.url}" is not supported.`);
- }
-
- const credentials = btoa(`${state.clientId}:${state.clientSecret}`);
- endpoint.headers.authorization = `basic ${credentials}`;
-
- try {
- return await request(endpoint);
- } catch (error) {
- /* istanbul ignore if */
- if (error.status !== 401) throw error;
- error.message = `[@octokit/auth-oauth-app] "${endpoint.method} ${endpoint.url}" does not support clientId/clientSecret basic authentication.`;
- throw error;
- }
-}
-
-const VERSION = "5.0.4";
-
-function createOAuthAppAuth(options) {
- const state = Object.assign({
- request: request.request.defaults({
- headers: {
- "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${universalUserAgent.getUserAgent()}`
- }
- }),
- clientType: "oauth-app"
- }, options); // @ts-expect-error not worth the extra code to appease TS
-
- return Object.assign(auth.bind(null, state), {
- hook: hook.bind(null, state)
- });
-}
-
-Object.defineProperty(exports, 'createOAuthUserAuth', {
- enumerable: true,
- get: function () {
- return authOauthUser.createOAuthUserAuth;
- }
-});
-exports.createOAuthAppAuth = createOAuthAppAuth;
-//# sourceMappingURL=index.js.map
diff --git a/node_modules/@octokit/auth-oauth-app/dist-node/index.js.map b/node_modules/@octokit/auth-oauth-app/dist-node/index.js.map
deleted file mode 100644
index c9ce3c9..0000000
--- a/node_modules/@octokit/auth-oauth-app/dist-node/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sources":["../dist-src/auth.js","../dist-src/hook.js","../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["import btoa from \"btoa-lite\";\nimport { createOAuthUserAuth } from \"@octokit/auth-oauth-user\";\nexport async function auth(state, authOptions) {\n if (authOptions.type === \"oauth-app\") {\n return {\n type: \"oauth-app\",\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n clientType: state.clientType,\n headers: {\n authorization: `basic ${btoa(`${state.clientId}:${state.clientSecret}`)}`,\n },\n };\n }\n if (\"factory\" in authOptions) {\n const { type, ...options } = {\n ...authOptions,\n ...state,\n };\n // @ts-expect-error TODO: `option` cannot be never, is this a bug?\n return authOptions.factory(options);\n }\n const common = {\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n request: state.request,\n ...authOptions,\n };\n // TS: Look what you made me do\n const userAuth = state.clientType === \"oauth-app\"\n ? await createOAuthUserAuth({\n ...common,\n clientType: state.clientType,\n })\n : await createOAuthUserAuth({\n ...common,\n clientType: state.clientType,\n });\n return userAuth();\n}\n","import btoa from \"btoa-lite\";\nimport { requiresBasicAuth } from \"@octokit/auth-oauth-user\";\nexport async function hook(state, request, route, parameters) {\n let endpoint = request.endpoint.merge(route, parameters);\n // Do not intercept OAuth Web/Device flow request\n if (/\\/login\\/(oauth\\/access_token|device\\/code)$/.test(endpoint.url)) {\n return request(endpoint);\n }\n if (state.clientType === \"github-app\" && !requiresBasicAuth(endpoint.url)) {\n throw new Error(`[@octokit/auth-oauth-app] GitHub Apps cannot use their client ID/secret for basic authentication for endpoints other than \"/applications/{client_id}/**\". \"${endpoint.method} ${endpoint.url}\" is not supported.`);\n }\n const credentials = btoa(`${state.clientId}:${state.clientSecret}`);\n endpoint.headers.authorization = `basic ${credentials}`;\n try {\n return await request(endpoint);\n }\n catch (error) {\n /* istanbul ignore if */\n if (error.status !== 401)\n throw error;\n error.message = `[@octokit/auth-oauth-app] \"${endpoint.method} ${endpoint.url}\" does not support clientId/clientSecret basic authentication.`;\n throw error;\n }\n}\n","export const VERSION = \"5.0.4\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { request } from \"@octokit/request\";\nimport { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nimport { VERSION } from \"./version\";\nexport { createOAuthUserAuth } from \"@octokit/auth-oauth-user\";\nexport function createOAuthAppAuth(options) {\n const state = Object.assign({\n request: request.defaults({\n headers: {\n \"user-agent\": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}`,\n },\n }),\n clientType: \"oauth-app\",\n }, options);\n // @ts-expect-error not worth the extra code to appease TS\n return Object.assign(auth.bind(null, state), {\n hook: hook.bind(null, state),\n });\n}\n"],"names":["auth","state","authOptions","type","clientId","clientSecret","clientType","headers","authorization","btoa","options","factory","common","request","userAuth","createOAuthUserAuth","hook","route","parameters","endpoint","merge","test","url","requiresBasicAuth","Error","method","credentials","error","status","message","VERSION","createOAuthAppAuth","Object","assign","defaults","getUserAgent","bind"],"mappings":";;;;;;;;;;;AAEO,eAAeA,IAAf,CAAoBC,KAApB,EAA2BC,WAA3B,EAAwC;EAC3C,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end of file
diff --git a/node_modules/@octokit/auth-oauth-app/dist-src/auth.js b/node_modules/@octokit/auth-oauth-app/dist-src/auth.js
deleted file mode 100644
index 23c4e60..0000000
--- a/node_modules/@octokit/auth-oauth-app/dist-src/auth.js
+++ /dev/null
@@ -1,40 +0,0 @@
-import btoa from "btoa-lite";
-import { createOAuthUserAuth } from "@octokit/auth-oauth-user";
-export async function auth(state, authOptions) {
- if (authOptions.type === "oauth-app") {
- return {
- type: "oauth-app",
- clientId: state.clientId,
- clientSecret: state.clientSecret,
- clientType: state.clientType,
- headers: {
- authorization: `basic ${btoa(`${state.clientId}:${state.clientSecret}`)}`,
- },
- };
- }
- if ("factory" in authOptions) {
- const { type, ...options } = {
- ...authOptions,
- ...state,
- };
- // @ts-expect-error TODO: `option` cannot be never, is this a bug?
- return authOptions.factory(options);
- }
- const common = {
- clientId: state.clientId,
- clientSecret: state.clientSecret,
- request: state.request,
- ...authOptions,
- };
- // TS: Look what you made me do
- const userAuth = state.clientType === "oauth-app"
- ? await createOAuthUserAuth({
- ...common,
- clientType: state.clientType,
- })
- : await createOAuthUserAuth({
- ...common,
- clientType: state.clientType,
- });
- return userAuth();
-}
diff --git a/node_modules/@octokit/auth-oauth-app/dist-src/hook.js b/node_modules/@octokit/auth-oauth-app/dist-src/hook.js
deleted file mode 100644
index 6c0c848..0000000
--- a/node_modules/@octokit/auth-oauth-app/dist-src/hook.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import btoa from "btoa-lite";
-import { requiresBasicAuth } from "@octokit/auth-oauth-user";
-export async function hook(state, request, route, parameters) {
- let endpoint = request.endpoint.merge(route, parameters);
- // Do not intercept OAuth Web/Device flow request
- if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) {
- return request(endpoint);
- }
- if (state.clientType === "github-app" && !requiresBasicAuth(endpoint.url)) {
- throw new Error(`[@octokit/auth-oauth-app] GitHub Apps cannot use their client ID/secret for basic authentication for endpoints other than "/applications/{client_id}/**". "${endpoint.method} ${endpoint.url}" is not supported.`);
- }
- const credentials = btoa(`${state.clientId}:${state.clientSecret}`);
- endpoint.headers.authorization = `basic ${credentials}`;
- try {
- return await request(endpoint);
- }
- catch (error) {
- /* istanbul ignore if */
- if (error.status !== 401)
- throw error;
- error.message = `[@octokit/auth-oauth-app] "${endpoint.method} ${endpoint.url}" does not support clientId/clientSecret basic authentication.`;
- throw error;
- }
-}
diff --git a/node_modules/@octokit/auth-oauth-app/dist-src/index.js b/node_modules/@octokit/auth-oauth-app/dist-src/index.js
deleted file mode 100644
index 4eeb7be..0000000
--- a/node_modules/@octokit/auth-oauth-app/dist-src/index.js
+++ /dev/null
@@ -1,20 +0,0 @@
-import { getUserAgent } from "universal-user-agent";
-import { request } from "@octokit/request";
-import { auth } from "./auth";
-import { hook } from "./hook";
-import { VERSION } from "./version";
-export { createOAuthUserAuth } from "@octokit/auth-oauth-user";
-export function createOAuthAppAuth(options) {
- const state = Object.assign({
- request: request.defaults({
- headers: {
- "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}`,
- },
- }),
- clientType: "oauth-app",
- }, options);
- // @ts-expect-error not worth the extra code to appease TS
- return Object.assign(auth.bind(null, state), {
- hook: hook.bind(null, state),
- });
-}
diff --git a/node_modules/@octokit/auth-oauth-app/dist-src/types.js b/node_modules/@octokit/auth-oauth-app/dist-src/types.js
deleted file mode 100644
index cb0ff5c..0000000
--- a/node_modules/@octokit/auth-oauth-app/dist-src/types.js
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/node_modules/@octokit/auth-oauth-app/dist-src/version.js b/node_modules/@octokit/auth-oauth-app/dist-src/version.js
deleted file mode 100644
index 3a25cbd..0000000
--- a/node_modules/@octokit/auth-oauth-app/dist-src/version.js
+++ /dev/null
@@ -1 +0,0 @@
-export const VERSION = "5.0.4";
diff --git a/node_modules/@octokit/auth-oauth-app/dist-types/auth.d.ts b/node_modules/@octokit/auth-oauth-app/dist-types/auth.d.ts
deleted file mode 100644
index 7180962..0000000
--- a/node_modules/@octokit/auth-oauth-app/dist-types/auth.d.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { OAuthAppState, GitHubAppState, AppAuthOptions, WebFlowAuthOptions, OAuthAppDeviceFlowAuthOptions, GitHubAppDeviceFlowAuthOptions, FactoryOAuthAppWebFlow, FactoryOAuthAppDeviceFlow, FactoryGitHubWebFlow, FactoryGitHubDeviceFlow, AppAuthentication, OAuthAppUserAuthentication, GitHubAppUserAuthentication, GitHubAppUserAuthenticationWithExpiration } from "./types";
-export declare function auth(state: OAuthAppState | GitHubAppState, authOptions: AppAuthOptions): Promise;
-export declare function auth(state: OAuthAppState, authOptions: WebFlowAuthOptions): Promise;
-export declare function auth(state: OAuthAppState, authOptions: WebFlowAuthOptions & {
- factory: FactoryOAuthAppWebFlow;
-}): Promise;
-export declare function auth(state: OAuthAppState, authOptions: OAuthAppDeviceFlowAuthOptions): Promise;
-export declare function auth(state: OAuthAppState, authOptions: OAuthAppDeviceFlowAuthOptions & {
- factory: FactoryOAuthAppDeviceFlow;
-}): Promise;
-export declare function auth(state: GitHubAppState, authOptions: WebFlowAuthOptions): Promise;
-export declare function auth(state: GitHubAppState, authOptions: WebFlowAuthOptions & {
- factory: FactoryGitHubWebFlow;
-}): Promise;
-export declare function auth(state: GitHubAppState, authOptions: GitHubAppDeviceFlowAuthOptions): Promise;
-export declare function auth(state: GitHubAppState, authOptions: GitHubAppDeviceFlowAuthOptions & {
- factory: FactoryGitHubDeviceFlow;
-}): Promise;
diff --git a/node_modules/@octokit/auth-oauth-app/dist-types/hook.d.ts b/node_modules/@octokit/auth-oauth-app/dist-types/hook.d.ts
deleted file mode 100644
index 12fdfa2..0000000
--- a/node_modules/@octokit/auth-oauth-app/dist-types/hook.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { EndpointOptions, RequestParameters, Route, RequestInterface, OctokitResponse } from "@octokit/types";
-import { OAuthAppState, GitHubAppState } from "./types";
-export declare function hook(state: OAuthAppState | GitHubAppState, request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise>;
diff --git a/node_modules/@octokit/auth-oauth-app/dist-types/index.d.ts b/node_modules/@octokit/auth-oauth-app/dist-types/index.d.ts
deleted file mode 100644
index 68ba65a..0000000
--- a/node_modules/@octokit/auth-oauth-app/dist-types/index.d.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { OAuthAppStrategyOptions, GitHubAppStrategyOptions, OAuthAppAuthInterface, GitHubAuthInterface } from "./types";
-export { OAuthAppStrategyOptions, GitHubAppStrategyOptions, AppAuthOptions, WebFlowAuthOptions, OAuthAppDeviceFlowAuthOptions, GitHubAppDeviceFlowAuthOptions, OAuthAppAuthInterface, GitHubAuthInterface, AppAuthentication, OAuthAppUserAuthentication, GitHubAppUserAuthentication, GitHubAppUserAuthenticationWithExpiration, FactoryGitHubWebFlow, FactoryGitHubDeviceFlow, } from "./types";
-export { createOAuthUserAuth } from "@octokit/auth-oauth-user";
-export declare function createOAuthAppAuth(options: OAuthAppStrategyOptions): OAuthAppAuthInterface;
-export declare function createOAuthAppAuth(options: GitHubAppStrategyOptions): GitHubAuthInterface;
diff --git a/node_modules/@octokit/auth-oauth-app/dist-types/types.d.ts b/node_modules/@octokit/auth-oauth-app/dist-types/types.d.ts
deleted file mode 100644
index a986ea9..0000000
--- a/node_modules/@octokit/auth-oauth-app/dist-types/types.d.ts
+++ /dev/null
@@ -1,98 +0,0 @@
-import { EndpointOptions, RequestParameters, Route, RequestInterface, OctokitResponse } from "@octokit/types";
-import * as AuthOAuthUser from "@octokit/auth-oauth-user";
-import * as DeviceTypes from "@octokit/auth-oauth-device";
-export declare type ClientType = "oauth-app" | "github-app";
-export declare type OAuthAppStrategyOptions = {
- clientType?: "oauth-app";
- clientId: string;
- clientSecret: string;
- request?: RequestInterface;
-};
-export declare type GitHubAppStrategyOptions = {
- clientType: "github-app";
- clientId: string;
- clientSecret: string;
- request?: RequestInterface;
-};
-export declare type AppAuthOptions = {
- type: "oauth-app";
-};
-export declare type WebFlowAuthOptions = {
- type: "oauth-user";
- code: string;
- redirectUrl?: string;
- state?: string;
-};
-export declare type OAuthAppDeviceFlowAuthOptions = {
- type: "oauth-user";
- onVerification: DeviceTypes.OAuthAppStrategyOptions["onVerification"];
- scopes?: string[];
-};
-export declare type GitHubAppDeviceFlowAuthOptions = {
- type: "oauth-user";
- onVerification: DeviceTypes.OAuthAppStrategyOptions["onVerification"];
-};
-export declare type AppAuthentication = {
- type: "oauth-app";
- clientId: string;
- clientSecret: string;
- clientType: ClientType;
- headers: {
- authorization: string;
- };
-};
-export declare type OAuthAppUserAuthentication = AuthOAuthUser.OAuthAppAuthentication;
-export declare type GitHubAppUserAuthentication = AuthOAuthUser.GitHubAppAuthentication;
-export declare type GitHubAppUserAuthenticationWithExpiration = AuthOAuthUser.GitHubAppAuthenticationWithExpiration;
-export declare type FactoryOAuthAppWebFlowOptions = OAuthAppStrategyOptions & Omit & {
- clientType: "oauth-app";
-};
-export declare type FactoryOAuthAppDeviceFlowOptions = OAuthAppStrategyOptions & Omit & {
- clientType: "oauth-app";
-};
-export declare type FactoryGitHubAppWebFlowOptions = GitHubAppStrategyOptions & Omit;
-export declare type FactoryGitHubAppDeviceFlowOptions = GitHubAppStrategyOptions & Omit;
-export interface FactoryOAuthAppWebFlow {
- (options: FactoryOAuthAppWebFlowOptions): T;
-}
-export interface FactoryOAuthAppDeviceFlow {
- (options: FactoryOAuthAppDeviceFlowOptions): T;
-}
-export interface FactoryGitHubWebFlow {
- (options: FactoryGitHubAppWebFlowOptions): T;
-}
-export interface FactoryGitHubDeviceFlow {
- (options: FactoryGitHubAppDeviceFlowOptions): T;
-}
-export interface OAuthAppAuthInterface {
- (options: AppAuthOptions): Promise;
- (options: WebFlowAuthOptions & {
- factory: FactoryOAuthAppWebFlow;
- }): Promise;
- (options: OAuthAppDeviceFlowAuthOptions & {
- factory: FactoryOAuthAppDeviceFlow;
- }): Promise;
- (options: WebFlowAuthOptions): Promise;
- (options: OAuthAppDeviceFlowAuthOptions): Promise;
- hook(request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise>;
-}
-export interface GitHubAuthInterface {
- (options?: AppAuthOptions): Promise;
- (options: WebFlowAuthOptions & {
- factory: FactoryGitHubWebFlow;
- }): Promise;
- (options: GitHubAppDeviceFlowAuthOptions & {
- factory: FactoryGitHubDeviceFlow;
- }): Promise;
- (options?: WebFlowAuthOptions): Promise;
- (options?: GitHubAppDeviceFlowAuthOptions): Promise;
- hook(request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise>;
-}
-export declare type OAuthAppState = OAuthAppStrategyOptions & {
- clientType: "oauth-app";
- request: RequestInterface;
-};
-export declare type GitHubAppState = GitHubAppStrategyOptions & {
- clientType: "github-app";
- request: RequestInterface;
-};
diff --git a/node_modules/@octokit/auth-oauth-app/dist-types/version.d.ts b/node_modules/@octokit/auth-oauth-app/dist-types/version.d.ts
deleted file mode 100644
index 256db1f..0000000
--- a/node_modules/@octokit/auth-oauth-app/dist-types/version.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export declare const VERSION = "5.0.4";
diff --git a/node_modules/@octokit/auth-oauth-app/dist-web/index.js b/node_modules/@octokit/auth-oauth-app/dist-web/index.js
deleted file mode 100644
index c1fc992..0000000
--- a/node_modules/@octokit/auth-oauth-app/dist-web/index.js
+++ /dev/null
@@ -1,87 +0,0 @@
-import { getUserAgent } from 'universal-user-agent';
-import { request } from '@octokit/request';
-import btoa from 'btoa-lite';
-import { createOAuthUserAuth, requiresBasicAuth } from '@octokit/auth-oauth-user';
-export { createOAuthUserAuth } from '@octokit/auth-oauth-user';
-
-async function auth(state, authOptions) {
- if (authOptions.type === "oauth-app") {
- return {
- type: "oauth-app",
- clientId: state.clientId,
- clientSecret: state.clientSecret,
- clientType: state.clientType,
- headers: {
- authorization: `basic ${btoa(`${state.clientId}:${state.clientSecret}`)}`,
- },
- };
- }
- if ("factory" in authOptions) {
- const { type, ...options } = {
- ...authOptions,
- ...state,
- };
- // @ts-expect-error TODO: `option` cannot be never, is this a bug?
- return authOptions.factory(options);
- }
- const common = {
- clientId: state.clientId,
- clientSecret: state.clientSecret,
- request: state.request,
- ...authOptions,
- };
- // TS: Look what you made me do
- const userAuth = state.clientType === "oauth-app"
- ? await createOAuthUserAuth({
- ...common,
- clientType: state.clientType,
- })
- : await createOAuthUserAuth({
- ...common,
- clientType: state.clientType,
- });
- return userAuth();
-}
-
-async function hook(state, request, route, parameters) {
- let endpoint = request.endpoint.merge(route, parameters);
- // Do not intercept OAuth Web/Device flow request
- if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) {
- return request(endpoint);
- }
- if (state.clientType === "github-app" && !requiresBasicAuth(endpoint.url)) {
- throw new Error(`[@octokit/auth-oauth-app] GitHub Apps cannot use their client ID/secret for basic authentication for endpoints other than "/applications/{client_id}/**". "${endpoint.method} ${endpoint.url}" is not supported.`);
- }
- const credentials = btoa(`${state.clientId}:${state.clientSecret}`);
- endpoint.headers.authorization = `basic ${credentials}`;
- try {
- return await request(endpoint);
- }
- catch (error) {
- /* istanbul ignore if */
- if (error.status !== 401)
- throw error;
- error.message = `[@octokit/auth-oauth-app] "${endpoint.method} ${endpoint.url}" does not support clientId/clientSecret basic authentication.`;
- throw error;
- }
-}
-
-const VERSION = "5.0.4";
-
-function createOAuthAppAuth(options) {
- const state = Object.assign({
- request: request.defaults({
- headers: {
- "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}`,
- },
- }),
- clientType: "oauth-app",
- }, options);
- // @ts-expect-error not worth the extra code to appease TS
- return Object.assign(auth.bind(null, state), {
- hook: hook.bind(null, state),
- });
-}
-
-export { createOAuthAppAuth };
-//# sourceMappingURL=index.js.map
diff --git a/node_modules/@octokit/auth-oauth-app/dist-web/index.js.map b/node_modules/@octokit/auth-oauth-app/dist-web/index.js.map
deleted file mode 100644
index de6201f..0000000
--- a/node_modules/@octokit/auth-oauth-app/dist-web/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sources":["../dist-src/auth.js","../dist-src/hook.js","../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["import btoa from \"btoa-lite\";\nimport { createOAuthUserAuth } from \"@octokit/auth-oauth-user\";\nexport async function auth(state, authOptions) {\n if (authOptions.type === \"oauth-app\") {\n return {\n type: \"oauth-app\",\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n clientType: state.clientType,\n headers: {\n authorization: `basic ${btoa(`${state.clientId}:${state.clientSecret}`)}`,\n },\n };\n }\n if (\"factory\" in authOptions) {\n const { type, ...options } = {\n ...authOptions,\n ...state,\n };\n // @ts-expect-error TODO: `option` cannot be never, is this a bug?\n return authOptions.factory(options);\n }\n const common = {\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n request: state.request,\n ...authOptions,\n };\n // TS: Look what you made me do\n const userAuth = state.clientType === \"oauth-app\"\n ? await createOAuthUserAuth({\n ...common,\n clientType: state.clientType,\n })\n : await createOAuthUserAuth({\n ...common,\n clientType: state.clientType,\n });\n return userAuth();\n}\n","import btoa from \"btoa-lite\";\nimport { requiresBasicAuth } from \"@octokit/auth-oauth-user\";\nexport async function hook(state, request, route, parameters) {\n let endpoint = request.endpoint.merge(route, parameters);\n // Do not intercept OAuth Web/Device flow request\n if (/\\/login\\/(oauth\\/access_token|device\\/code)$/.test(endpoint.url)) {\n return request(endpoint);\n }\n if (state.clientType === \"github-app\" && !requiresBasicAuth(endpoint.url)) {\n throw new Error(`[@octokit/auth-oauth-app] GitHub Apps cannot use their client ID/secret for basic authentication for endpoints other than \"/applications/{client_id}/**\". \"${endpoint.method} ${endpoint.url}\" is not supported.`);\n }\n const credentials = btoa(`${state.clientId}:${state.clientSecret}`);\n endpoint.headers.authorization = `basic ${credentials}`;\n try {\n return await request(endpoint);\n }\n catch (error) {\n /* istanbul ignore if */\n if (error.status !== 401)\n throw error;\n error.message = `[@octokit/auth-oauth-app] \"${endpoint.method} ${endpoint.url}\" does not support clientId/clientSecret basic authentication.`;\n throw error;\n }\n}\n","export const VERSION = \"5.0.4\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { request } from \"@octokit/request\";\nimport { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nimport { VERSION } from \"./version\";\nexport { createOAuthUserAuth } from \"@octokit/auth-oauth-user\";\nexport function createOAuthAppAuth(options) {\n const state = Object.assign({\n request: request.defaults({\n headers: {\n \"user-agent\": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}`,\n },\n }),\n clientType: \"oauth-app\",\n }, options);\n // @ts-expect-error not worth the extra code to appease TS\n return Object.assign(auth.bind(null, state), {\n hook: hook.bind(null, state),\n });\n}\n"],"names":[],"mappings":";;;;;;AAEO,eAAe,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE;AAC/C,IAAI,IAAI,WAAW,CAAC,IAAI,KAAK,WAAW,EAAE;AAC1C,QAAQ,OAAO;AACf,YAAY,IAAI,EAAE,WAAW;AAC7B,YAAY,QAAQ,EAAE,KAAK,CAAC,QAAQ;AACpC,YAAY,YAAY,EAAE,KAAK,CAAC,YAAY;AAC5C,YAAY,UAAU,EAAE,KAAK,CAAC,UAAU;AACxC,YAAY,OAAO,EAAE;AACrB,gBAAgB,aAAa,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;AACzF,aAAa;AACb,SAAS,CAAC;AACV,KAAK;AACL,IAAI,IAAI,SAAS,IAAI,WAAW,EAAE;AAClC,QAAQ,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,GAAG;AACrC,YAAY,GAAG,WAAW;AAC1B,YAAY,GAAG,KAAK;AACpB,SAAS,CAAC;AACV;AACA,QAAQ,OAAO,WAAW,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AAC5C,KAAK;AACL,IAAI,MAAM,MAAM,GAAG;AACnB,QAAQ,QAAQ,E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AAQ,CAAC,OAAO,CAAC,aAAa,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;AAC5D,IAAI,IAAI;AACR,QAAQ,OAAO,MAAM,OAAO,CAAC,QAAQ,CAAC,CAAC;AACvC,KAAK;AACL,IAAI,OAAO,KAAK,EAAE;AAClB;AACA,QAAQ,IAAI,KAAK,CAAC,MAAM,KAAK,GAAG;AAChC,YAAY,MAAM,KAAK,CAAC;AACxB,QAAQ,KAAK,CAAC,OAAO,GAAG,CAAC,2BAA2B,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,8DAA8D,CAAC,CAAC;AACtJ,QAAQ,MAAM,KAAK,CAAC;AACpB,KAAK;AACL,CAAC;;ACvBM,MAAM,OAAO,GAAG,mBAAmB,CAAC;;ACMpC,SAAS,kBAAkB,CAAC,OAAO,EAAE;AAC5C,IAAI,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;AAChC,QAAQ,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC;AAClC,YAAY,OAAO,EAAE;AACrB,gBAAgB,YAAY,EAAE,CAAC,0BAA0B,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;AACtF,aAAa;AACb,SAAS,CAAC;AACV,QAAQ,UAAU,EAAE,WAAW;AAC/B,KAAK,EAAE,OAAO,CAAC,CAAC;AAChB;AACA,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE;AACjD,QAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC;AACpC,KAAK,CAAC,CAAC;AACP,CAAC;;;;"}
\ No newline at end of file
diff --git a/node_modules/@octokit/auth-oauth-app/package.json b/node_modules/@octokit/auth-oauth-app/package.json
deleted file mode 100644
index bc5d5e9..0000000
--- a/node_modules/@octokit/auth-oauth-app/package.json
+++ /dev/null
@@ -1,54 +0,0 @@
-{
- "name": "@octokit/auth-oauth-app",
- "description": "GitHub OAuth App authentication for JavaScript",
- "version": "5.0.4",
- "license": "MIT",
- "files": [
- "dist-*/",
- "bin/"
- ],
- "source": "dist-src/index.js",
- "types": "dist-types/index.d.ts",
- "main": "dist-node/index.js",
- "module": "dist-web/index.js",
- "pika": true,
- "sideEffects": false,
- "keywords": [
- "github",
- "octokit",
- "authentication",
- "oauth",
- "api"
- ],
- "repository": "github:octokit/auth-oauth-app.js",
- "dependencies": {
- "@octokit/auth-oauth-device": "^4.0.0",
- "@octokit/auth-oauth-user": "^2.0.0",
- "@octokit/request": "^6.0.0",
- "@octokit/types": "^8.0.0",
- "@types/btoa-lite": "^1.0.0",
- "btoa-lite": "^1.0.0",
- "universal-user-agent": "^6.0.0"
- },
- "devDependencies": {
- "@octokit/core": "^4.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": "^29.0.0",
- "fetch-mock": "^9.0.0",
- "jest": "^29.0.0",
- "prettier": "2.7.1",
- "semantic-release-plugin-update-version-in-files": "^1.0.0",
- "ts-jest": "^29.0.0",
- "typescript": "^4.0.0"
- },
- "engines": {
- "node": ">= 14"
- },
- "publishConfig": {
- "access": "public"
- }
-}
diff --git a/node_modules/@octokit/auth-oauth-device/LICENSE b/node_modules/@octokit/auth-oauth-device/LICENSE
deleted file mode 100644
index 57049d0..0000000
--- a/node_modules/@octokit/auth-oauth-device/LICENSE
+++ /dev/null
@@ -1,9 +0,0 @@
-MIT License
-
-Copyright (c) 2021 Octokit contributors
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@octokit/auth-oauth-device/README.md b/node_modules/@octokit/auth-oauth-device/README.md
deleted file mode 100644
index 2fbe50d..0000000
--- a/node_modules/@octokit/auth-oauth-device/README.md
+++ /dev/null
@@ -1,656 +0,0 @@
-# auth-oauth-device.js
-
-> GitHub OAuth Device authentication strategy for JavaScript
-
-[](https://www.npmjs.com/package/@octokit/auth-oauth-device)
-[](https://github.com/octokit/auth-oauth-device.js/actions?query=workflow%3ATest+branch%3Amain)
-
-`@octokit/auth-oauth-device` is implementing one of [GitHub’s OAuth Device Flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#device-flow).
-
-
-
-- [Usage](#usage)
- - [For OAuth Apps](#for-oauth-apps)
- - [For GitHub Apps](#for-github-apps)
-- [`createOAuthDeviceAuth(options)`](#createoauthdeviceauthoptions)
-- [`auth(options)`](#authoptions)
-- [Authentication object](#authentication-object)
- - [OAuth APP user authentication](#oauth-app-user-authentication)
- - [GitHub APP user authentication with expiring tokens disabled](#github-app-user-authentication-with-expiring-tokens-disabled)
- - [GitHub APP user authentication with expiring tokens enabled](#github-app-user-authentication-with-expiring-tokens-enabled)
-- [`auth.hook(request, route, parameters)` or `auth.hook(request, options)`](#authhookrequest-route-parameters-or-authhookrequest-options)
-- [Types](#types)
-- [How it works](#how-it-works)
-- [Contributing](#contributing)
-- [License](#license)
-
-
-
-## Usage
-
-
-
-### For OAuth Apps
-
-```js
-const auth = createOAuthDeviceAuth({
- clientType: "oauth-app",
- clientId: "1234567890abcdef1234",
- scopes: ["public_repo"],
- onVerification(verification) {
- // verification example
- // {
- // device_code: "3584d83530557fdd1f46af8289938c8ef79f9dc5",
- // user_code: "WDJB-MJHT",
- // verification_uri: "https://github.com/login/device",
- // expires_in: 900,
- // interval: 5,
- // };
-
- console.log("Open %s", verification.verification_uri);
- console.log("Enter code: %s", verification.user_code);
- },
-});
-
-const tokenAuthentication = await auth({
- type: "oauth",
-});
-// resolves with
-// {
-// type: "token",
-// tokenType: "oauth",
-// clientType: "oauth-app",
-// clientId: "1234567890abcdef1234",
-// token: "...", /* the created oauth token */
-// scopes: [] /* depend on request scopes by OAuth app */
-// }
-```
-
-### For GitHub Apps
-
-GitHub Apps do not support `scopes`. Client IDs of GitHub Apps have a `lv1.` prefix. If the GitHub App has expiring user tokens enabled, the resulting `authentication` object has extra properties related to expiration and refreshing the token.
-
-```js
-const auth = createOAuthDeviceAuth({
- clientType: "github-app",
- clientId: "lv1.1234567890abcdef",
- onVerification(verification) {
- // verification example
- // {
- // device_code: "3584d83530557fdd1f46af8289938c8ef79f9dc5",
- // user_code: "WDJB-MJHT",
- // verification_uri: "https://github.com/login/device",
- // expires_in: 900,
- // interval: 5,
- // };
-
- console.log("Open %s", verification.verification_uri);
- console.log("Enter code: %s", verification.user_code);
- },
-});
-
-const tokenAuthentication = await auth({
- type: "oauth",
-});
-// resolves with
-// {
-// type: "token",
-// tokenType: "oauth",
-// clientType: "github-app",
-// clientId: "lv1.1234567890abcdef",
-// token: "...", /* the created oauth token */
-// }
-// or if expiring user tokens are enabled
-// {
-// type: "token",
-// tokenType: "oauth",
-// clientType: "github-app",
-// clientId: "lv1.1234567890abcdef",
-// token: "...", /* the created oauth token */
-// refreshToken: "...",
-// expiresAt: "2022-01-01T08:00:0.000Z",
-// refreshTokenExpiresAt: "2021-07-01T00:00:0.000Z",
-// }
-```
-
-## `createOAuthDeviceAuth(options)`
-
-The `createOAuthDeviceAuth` method accepts a single `options` parameter
-
-
-
-
-
- name
-
-
- type
-
-
- description
-
-
-
-
-
-
- clientId
-
-
- string
-
-
- Required. Find your OAuth app’s Client ID in your account’s developer settings.
-
-
-
-
- onVerification
-
-
- function
-
-
- Required. A function that is called once the device and user codes were retrieved
-
-The `onVerification()` callback can be used to pause until the user completes step 2, which might result in a better user experience.
-
-```js
-const auth = createOAuthDeviceAuth({
- clientId: "1234567890abcdef1234",
- onVerification(verification) {
- console.log("Open %s", verification.verification_uri);
- console.log("Enter code: %s", verification.user_code);
-
- await prompt("press enter when you are ready to continue");
- },
-});
-```
-
-
-
-
-
- clientType
-
-
- string
-
-
-
-Must be either `oauth-app` or `github-app`. Defaults to `oauth-app`.
-
-
-
-
-
- request
-
-
- function
-
-
- You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the API root endpoint. Example:
-
-```js
-const { request } = require("@octokit/request");
-createOAuthDeviceAuth({
- clientId: "1234567890abcdef1234",
- clientSecret: "secret",
- request: request.defaults({
- baseUrl: "https://ghe.my-company.com/api/v3",
- }),
-});
-```
-
-
-
-
- scopes
-
-
- array of strings
-
-
-
-Only relavant if `clientType` is set to `"oauth-app"`.
-
-Array of scope names enabled for the token. Defaults to `[]`. See [available scopes](https://docs.github.com/en/developers/apps/scopes-for-oauth-apps#available-scopes).
-
-
-
-
-
-
-## `auth(options)`
-
-The async `auth()` method returned by `createOAuthDeviceAuth(options)` accepts the following options
-
-
-
-
-
- name
-
-
- type
-
-
- description
-
-
-
-
-
-
- type
-
-
- string
-
-
- Required. Must be set to "oauth"
-
-
-
-
- scopes
-
-
- array of strings
-
-
-
-Only relevant if the `clientType` strategy options was set to `"oauth-app"`
-
-Array of scope names enabled for the token. Defaults to what was set in the [strategy options](#createoauthdeviceauthoptions). See available scopes
-
-
-
-
-
- refresh
-
-
- boolean
-
-
-
-Defaults to `false`. When set to `false`, calling `auth(options)` will resolve with a token that was previously created for the same scopes if it exists. If set to `true` a new token will always be created.
-
-
-
-
-
-
-## Authentication object
-
-The async `auth(options)` method resolves to one of three possible objects
-
-1. OAuth APP user authentication
-1. GitHub APP user authentication with expiring tokens disabled
-1. GitHub APP user authentication with expiring tokens enabled
-
-The differences are
-
-1. `scopes` is only present for OAuth Apps
-2. `refreshToken`, `expiresAt`, `refreshTokenExpiresAt` are only present for GitHub Apps, and only if token expiration is enabled
-
-### OAuth APP user authentication
-
-
-
-
-
- name
-
-
- type
-
-
- description
-
-
-
-
-
-
- type
-
-
- string
-
-
- "token"
-
-
-
-
- tokenType
-
-
- string
-
-
- "oauth"
-
-
-
-
- clientType
-
-
- string
-
-
- "github-app"
-
-
-
-
- clientId
-
-
- string
-
-
- The app's Client ID
-
-
-
-
- token
-
-
- string
-
-
- The personal access token
-
-
-
-
- scopes
-
-
- array of strings
-
-
- array of scope names enabled for the token
-
-
-
-
-
-### GitHub APP user authentication with expiring tokens disabled
-
-
-
-
-
- name
-
-
- type
-
-
- description
-
-
-
-
-
-
- type
-
-
- string
-
-
- "token"
-
-
-
-
- tokenType
-
-
- string
-
-
- "oauth"
-
-
-
-
- clientType
-
-
- string
-
-
- "github-app"
-
-
-
-
- clientId
-
-
- string
-
-
- The app's Client ID
-
-
-
-
- token
-
-
- string
-
-
- The personal access token
-
-
-
-
-
-### GitHub APP user authentication with expiring tokens enabled
-
-
-
-
-
- name
-
-
- type
-
-
- description
-
-
-
-
-
-
- type
-
-
- string
-
-
- "token"
-
-
-
-
- tokenType
-
-
- string
-
-
- "oauth"
-
-
-
-
- clientType
-
-
- string
-
-
- "github-app"
-
-
-
-
- clientId
-
-
- string
-
-
- The app's Client ID
-
-
-
-
- token
-
-
- string
-
-
- The user access token
-
-
-
-
- refreshToken
-
-
- string
-
-
- The refresh token
-
-
-
-
- expiresAt
-
-
- string
-
-
- Date timestamp in ISO 8601 standard. Example: 2022-01-01T08:00:0.000Z
-
-
-
-
- refreshTokenExpiresAt
-
-
- string
-
-
- Date timestamp in ISO 8601 standard. Example: 2021-07-01T00:00:0.000Z
-
-
-
-
-
-## `auth.hook(request, route, parameters)` or `auth.hook(request, options)`
-
-`auth.hook()` hooks directly into the request life cycle. It amends the request to authenticate correctly based on the request URL.
-
-The `request` option is an instance of [`@octokit/request`](https://github.com/octokit/request.js#readme). The `route`/`options` parameters are the same as for the [`request()` method](https://github.com/octokit/request.js#request).
-
-`auth.hook()` can be called directly to send an authenticated request
-
-```js
-const { data: user } = await auth.hook(request, "GET /user");
-```
-
-Or it can be passed as option to [`request()`](https://github.com/octokit/request.js#request).
-
-```js
-const requestWithAuth = request.defaults({
- request: {
- hook: auth.hook,
- },
-});
-
-const { data: user } = await requestWithAuth("GET /user");
-```
-
-## Types
-
-```ts
-import {
- OAuthAppStrategyOptions,
- OAuthAppAuthOptions,
- OAuthAppAuthentication,
- GitHubAppStrategyOptions,
- GitHubAppAuthOptions,
- GitHubAppAuthentication,
- GitHubAppAuthenticationWithExpiration,
-} from "@octokit/auth-oauth-device";
-```
-
-## How it works
-
-GitHub's OAuth Device flow is different from the web flow in two ways
-
-1. It does not require a URL redirect, which makes it great for devices and CLI apps
-2. It does not require the OAuth client secret, which means there is no user-owned server component required.
-
-The flow has 3 parts (see [GitHub documentation](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#device-flow))
-
-1. `@octokit/auth-oauth-device` requests a device and user code
-2. Then the user has to open https://github.com/login/device (or it's GitHub Enterprise Server equivalent) and enter the user code
-3. While the user enters the code, `@octokit/auth-oauth-device` is sending requests in the background to retrieve the OAuth access token. Once the user completed step 2, the request will succeed and the token will be returned
-
-## Contributing
-
-See [CONTRIBUTING.md](CONTRIBUTING.md)
-
-## License
-
-[MIT](LICENSE)
diff --git a/node_modules/@octokit/auth-oauth-device/dist-node/index.js b/node_modules/@octokit/auth-oauth-device/dist-node/index.js
deleted file mode 100644
index 9ff7216..0000000
--- a/node_modules/@octokit/auth-oauth-device/dist-node/index.js
+++ /dev/null
@@ -1,153 +0,0 @@
-'use strict';
-
-Object.defineProperty(exports, '__esModule', { value: true });
-
-var universalUserAgent = require('universal-user-agent');
-var request = require('@octokit/request');
-var oauthMethods = require('@octokit/oauth-methods');
-
-async function getOAuthAccessToken(state, options) {
- const cachedAuthentication = getCachedAuthentication(state, options.auth);
- if (cachedAuthentication) return cachedAuthentication; // Step 1: Request device and user codes
- // https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-1-app-requests-the-device-and-user-verification-codes-from-github
-
- const {
- data: verification
- } = await oauthMethods.createDeviceCode({
- clientType: state.clientType,
- clientId: state.clientId,
- request: options.request || state.request,
- // @ts-expect-error the extra code to make TS happy is not worth it
- scopes: options.auth.scopes || state.scopes
- }); // Step 2: User must enter the user code on https://github.com/login/device
- // See https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-2-prompt-the-user-to-enter-the-user-code-in-a-browser
-
- await state.onVerification(verification); // Step 3: Exchange device code for access token
- // See https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-3-app-polls-github-to-check-if-the-user-authorized-the-device
-
- const authentication = await waitForAccessToken(options.request || state.request, state.clientId, state.clientType, verification);
- state.authentication = authentication;
- return authentication;
-}
-
-function getCachedAuthentication(state, auth) {
- if (auth.refresh === true) return false;
- if (!state.authentication) return false;
-
- if (state.clientType === "github-app") {
- return state.authentication;
- }
-
- const authentication = state.authentication;
- const newScope = ("scopes" in auth && auth.scopes || state.scopes).join(" ");
- const currentScope = authentication.scopes.join(" ");
- return newScope === currentScope ? authentication : false;
-}
-
-async function wait(seconds) {
- await new Promise(resolve => setTimeout(resolve, seconds * 1000));
-}
-
-async function waitForAccessToken(request, clientId, clientType, verification) {
- try {
- const options = {
- clientId,
- request,
- code: verification.device_code
- }; // WHY TYPESCRIPT WHY ARE YOU DOING THIS TO ME
-
- const {
- authentication
- } = clientType === "oauth-app" ? await oauthMethods.exchangeDeviceCode({ ...options,
- clientType: "oauth-app"
- }) : await oauthMethods.exchangeDeviceCode({ ...options,
- clientType: "github-app"
- });
- return {
- type: "token",
- tokenType: "oauth",
- ...authentication
- };
- } catch (error) {
- // istanbul ignore if
- // @ts-ignore
- if (!error.response) throw error; // @ts-ignore
-
- const errorType = error.response.data.error;
-
- if (errorType === "authorization_pending") {
- await wait(verification.interval);
- return waitForAccessToken(request, clientId, clientType, verification);
- }
-
- if (errorType === "slow_down") {
- await wait(verification.interval + 5);
- return waitForAccessToken(request, clientId, clientType, verification);
- }
-
- throw error;
- }
-}
-
-async function auth(state, authOptions) {
- return getOAuthAccessToken(state, {
- auth: authOptions
- });
-}
-
-async function hook(state, request, route, parameters) {
- let endpoint = request.endpoint.merge(route, parameters); // Do not intercept request to retrieve codes or token
-
- if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) {
- return request(endpoint);
- }
-
- const {
- token
- } = await getOAuthAccessToken(state, {
- request,
- auth: {
- type: "oauth"
- }
- });
- endpoint.headers.authorization = `token ${token}`;
- return request(endpoint);
-}
-
-const VERSION = "4.0.3";
-
-function createOAuthDeviceAuth(options) {
- const requestWithDefaults = options.request || request.request.defaults({
- headers: {
- "user-agent": `octokit-auth-oauth-device.js/${VERSION} ${universalUserAgent.getUserAgent()}`
- }
- });
- const {
- request: request$1 = requestWithDefaults,
- ...otherOptions
- } = options;
- const state = options.clientType === "github-app" ? { ...otherOptions,
- clientType: "github-app",
- request: request$1
- } : { ...otherOptions,
- clientType: "oauth-app",
- request: request$1,
- scopes: options.scopes || []
- };
-
- if (!options.clientId) {
- throw new Error('[@octokit/auth-oauth-device] "clientId" option must be set (https://github.com/octokit/auth-oauth-device.js#usage)');
- }
-
- if (!options.onVerification) {
- throw new Error('[@octokit/auth-oauth-device] "onVerification" option must be a function (https://github.com/octokit/auth-oauth-device.js#usage)');
- } // @ts-ignore too much for tsc / ts-jest ¯\_(ツ)_/¯
-
-
- return Object.assign(auth.bind(null, state), {
- hook: hook.bind(null, state)
- });
-}
-
-exports.createOAuthDeviceAuth = createOAuthDeviceAuth;
-//# sourceMappingURL=index.js.map
diff --git a/node_modules/@octokit/auth-oauth-device/dist-node/index.js.map b/node_modules/@octokit/auth-oauth-device/dist-node/index.js.map
deleted file mode 100644
index 89f086e..0000000
--- a/node_modules/@octokit/auth-oauth-device/dist-node/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sources":["../dist-src/get-oauth-access-token.js","../dist-src/auth.js","../dist-src/hook.js","../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["import { createDeviceCode, exchangeDeviceCode } from \"@octokit/oauth-methods\";\nexport async function getOAuthAccessToken(state, options) {\n const cachedAuthentication = getCachedAuthentication(state, options.auth);\n if (cachedAuthentication)\n return cachedAuthentication;\n // Step 1: Request device and user codes\n // https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-1-app-requests-the-device-and-user-verification-codes-from-github\n const { data: verification } = await createDeviceCode({\n clientType: state.clientType,\n clientId: state.clientId,\n request: options.request || state.request,\n // @ts-expect-error the extra code to make TS happy is not worth it\n scopes: options.auth.scopes || state.scopes,\n });\n // Step 2: User must enter the user code on https://github.com/login/device\n // See https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-2-prompt-the-user-to-enter-the-user-code-in-a-browser\n await state.onVerification(verification);\n // Step 3: Exchange device code for access token\n // See https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-3-app-polls-github-to-check-if-the-user-authorized-the-device\n const authentication = await waitForAccessToken(options.request || state.request, state.clientId, state.clientType, verification);\n state.authentication = authentication;\n return authentication;\n}\nfunction getCachedAuthentication(state, auth) {\n if (auth.refresh === true)\n return false;\n if (!state.authentication)\n return false;\n if (state.clientType === \"github-app\") {\n return state.authentication;\n }\n const authentication = state.authentication;\n const newScope = ((\"scopes\" in auth && auth.scopes) || state.scopes).join(\" \");\n const currentScope = authentication.scopes.join(\" \");\n return newScope === currentScope ? authentication : false;\n}\nasync function wait(seconds) {\n await new Promise((resolve) => setTimeout(resolve, seconds * 1000));\n}\nasync function waitForAccessToken(request, clientId, clientType, verification) {\n try {\n const options = {\n clientId,\n request,\n code: verification.device_code,\n };\n // WHY TYPESCRIPT WHY ARE YOU DOING THIS TO ME\n const { authentication } = clientType === \"oauth-app\"\n ? await exchangeDeviceCode({\n ...options,\n clientType: \"oauth-app\",\n })\n : await exchangeDeviceCode({\n ...options,\n clientType: \"github-app\",\n });\n return {\n type: \"token\",\n tokenType: \"oauth\",\n ...authentication,\n };\n }\n catch (error) {\n // istanbul ignore if\n // @ts-ignore\n if (!error.response)\n throw error;\n // @ts-ignore\n const errorType = error.response.data.error;\n if (errorType === \"authorization_pending\") {\n await wait(verification.interval);\n return waitForAccessToken(request, clientId, clientType, verification);\n }\n if (errorType === \"slow_down\") {\n await wait(verification.interval + 5);\n return waitForAccessToken(request, clientId, clientType, verification);\n }\n throw error;\n }\n}\n","import { getOAuthAccessToken } from \"./get-oauth-access-token\";\nexport async function auth(state, authOptions) {\n return getOAuthAccessToken(state, {\n auth: authOptions,\n });\n}\n","import { getOAuthAccessToken } from \"./get-oauth-access-token\";\nexport async function hook(state, request, route, parameters) {\n let endpoint = request.endpoint.merge(route, parameters);\n // Do not intercept request to retrieve codes or token\n if (/\\/login\\/(oauth\\/access_token|device\\/code)$/.test(endpoint.url)) {\n return request(endpoint);\n }\n const { token } = await getOAuthAccessToken(state, {\n request,\n auth: { type: \"oauth\" },\n });\n endpoint.headers.authorization = `token ${token}`;\n return request(endpoint);\n}\n","export const VERSION = \"4.0.3\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { request as octokitRequest } from \"@octokit/request\";\nimport { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nimport { VERSION } from \"./version\";\nexport function createOAuthDeviceAuth(options) {\n const requestWithDefaults = options.request ||\n octokitRequest.defaults({\n headers: {\n \"user-agent\": `octokit-auth-oauth-device.js/${VERSION} ${getUserAgent()}`,\n },\n });\n const { request = requestWithDefaults, ...otherOptions } = options;\n const state = options.clientType === \"github-app\"\n ? {\n ...otherOptions,\n clientType: \"github-app\",\n request,\n }\n : {\n ...otherOptions,\n clientType: \"oauth-app\",\n request,\n scopes: options.scopes || [],\n };\n if (!options.clientId) {\n throw new Error('[@octokit/auth-oauth-device] \"clientId\" option must be set (https://github.com/octokit/auth-oauth-device.js#usage)');\n }\n if (!options.onVerification) {\n throw new Error('[@octokit/auth-oauth-device] \"onVerification\" option must be a function (https://github.com/octokit/auth-oauth-device.js#usage)');\n }\n // @ts-ignore too much for tsc / ts-jest ¯\\_(ツ)_/¯\n return Object.assign(auth.bind(null, state), {\n hook: hook.bind(null, state),\n });\n}\n"],"names":["getOAuthAccessToken","state","options","cachedAuthentication","getCachedAuthentication","auth","data","verification","createDeviceCode","clientType","clientId","request","scopes","onVerification","authentication","waitForAccessToken","refresh","newScope","join","currentScope","wait","seconds","Promise","resolve","setTimeout","code","device_code","exchangeDeviceCode","type","tokenType","error","response","errorType","interval","authOptions","hook","route","parameters","endpoint","merge","test","url","token","headers","authorization","VERSION","createOAuthDeviceAuth","requestWithDefaults","octokitRequest","defaults","getUserAgent","otherOptions","Error","Object","assign","bind"],"mappings":";;;;;;;;AACO,eAAeA,mBAAf,CAAmCC,KAAnC,EAA0CC,OAA1C,EAAmD;EACtD,MAAMC,oBAAoB,GAAGC,uBAAuB,CAACH,KAAD,EAAQC,OAAO,CAACG,IAAhB,CAApD;EACA,IAAIF,oBAAJ,EACI,OAAOA,oBAAP,CAHkD;;;EAMtD,MAAM;IAAEG,IAAI,EAAEC;MAAiB,MAAMC,6BAAgB,CAAC;IAClDC,UAAU,EAAER,KAAK,CAACQ,UADgC;IAElDC,QAAQ,EAAET,KAAK,CAACS,QAFkC;IAGlDC,OAAO,EAAET,OAAO,CAACS,OAAR,IAAmBV,KAAK,CAACU,OAHgB;;IAKlDC,MAAM,EAAEV,OAAO,CAACG,IAAR,CAAaO,MAAb,IAAuBX,KAAK,CAACW;GALY,CAArD,CANsD;;;EAetD,MAAMX,KAAK,CAACY,cAAN,CAAqBN,YAArB,CAAN,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KAAhB;GADH,CAAP;AAGH;;;;"}
\ No newline at end of file
diff --git a/node_modules/@octokit/auth-oauth-device/dist-src/auth.js b/node_modules/@octokit/auth-oauth-device/dist-src/auth.js
deleted file mode 100644
index f62e980..0000000
--- a/node_modules/@octokit/auth-oauth-device/dist-src/auth.js
+++ /dev/null
@@ -1,6 +0,0 @@
-import { getOAuthAccessToken } from "./get-oauth-access-token";
-export async function auth(state, authOptions) {
- return getOAuthAccessToken(state, {
- auth: authOptions,
- });
-}
diff --git a/node_modules/@octokit/auth-oauth-device/dist-src/get-oauth-access-token.js b/node_modules/@octokit/auth-oauth-device/dist-src/get-oauth-access-token.js
deleted file mode 100644
index 34e9282..0000000
--- a/node_modules/@octokit/auth-oauth-device/dist-src/get-oauth-access-token.js
+++ /dev/null
@@ -1,80 +0,0 @@
-import { createDeviceCode, exchangeDeviceCode } from "@octokit/oauth-methods";
-export async function getOAuthAccessToken(state, options) {
- const cachedAuthentication = getCachedAuthentication(state, options.auth);
- if (cachedAuthentication)
- return cachedAuthentication;
- // Step 1: Request device and user codes
- // https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-1-app-requests-the-device-and-user-verification-codes-from-github
- const { data: verification } = await createDeviceCode({
- clientType: state.clientType,
- clientId: state.clientId,
- request: options.request || state.request,
- // @ts-expect-error the extra code to make TS happy is not worth it
- scopes: options.auth.scopes || state.scopes,
- });
- // Step 2: User must enter the user code on https://github.com/login/device
- // See https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-2-prompt-the-user-to-enter-the-user-code-in-a-browser
- await state.onVerification(verification);
- // Step 3: Exchange device code for access token
- // See https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-3-app-polls-github-to-check-if-the-user-authorized-the-device
- const authentication = await waitForAccessToken(options.request || state.request, state.clientId, state.clientType, verification);
- state.authentication = authentication;
- return authentication;
-}
-function getCachedAuthentication(state, auth) {
- if (auth.refresh === true)
- return false;
- if (!state.authentication)
- return false;
- if (state.clientType === "github-app") {
- return state.authentication;
- }
- const authentication = state.authentication;
- const newScope = (("scopes" in auth && auth.scopes) || state.scopes).join(" ");
- const currentScope = authentication.scopes.join(" ");
- return newScope === currentScope ? authentication : false;
-}
-async function wait(seconds) {
- await new Promise((resolve) => setTimeout(resolve, seconds * 1000));
-}
-async function waitForAccessToken(request, clientId, clientType, verification) {
- try {
- const options = {
- clientId,
- request,
- code: verification.device_code,
- };
- // WHY TYPESCRIPT WHY ARE YOU DOING THIS TO ME
- const { authentication } = clientType === "oauth-app"
- ? await exchangeDeviceCode({
- ...options,
- clientType: "oauth-app",
- })
- : await exchangeDeviceCode({
- ...options,
- clientType: "github-app",
- });
- return {
- type: "token",
- tokenType: "oauth",
- ...authentication,
- };
- }
- catch (error) {
- // istanbul ignore if
- // @ts-ignore
- if (!error.response)
- throw error;
- // @ts-ignore
- const errorType = error.response.data.error;
- if (errorType === "authorization_pending") {
- await wait(verification.interval);
- return waitForAccessToken(request, clientId, clientType, verification);
- }
- if (errorType === "slow_down") {
- await wait(verification.interval + 5);
- return waitForAccessToken(request, clientId, clientType, verification);
- }
- throw error;
- }
-}
diff --git a/node_modules/@octokit/auth-oauth-device/dist-src/hook.js b/node_modules/@octokit/auth-oauth-device/dist-src/hook.js
deleted file mode 100644
index 76f9a55..0000000
--- a/node_modules/@octokit/auth-oauth-device/dist-src/hook.js
+++ /dev/null
@@ -1,14 +0,0 @@
-import { getOAuthAccessToken } from "./get-oauth-access-token";
-export async function hook(state, request, route, parameters) {
- let endpoint = request.endpoint.merge(route, parameters);
- // Do not intercept request to retrieve codes or token
- if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) {
- return request(endpoint);
- }
- const { token } = await getOAuthAccessToken(state, {
- request,
- auth: { type: "oauth" },
- });
- endpoint.headers.authorization = `token ${token}`;
- return request(endpoint);
-}
diff --git a/node_modules/@octokit/auth-oauth-device/dist-src/index.js b/node_modules/@octokit/auth-oauth-device/dist-src/index.js
deleted file mode 100644
index b9e6980..0000000
--- a/node_modules/@octokit/auth-oauth-device/dist-src/index.js
+++ /dev/null
@@ -1,36 +0,0 @@
-import { getUserAgent } from "universal-user-agent";
-import { request as octokitRequest } from "@octokit/request";
-import { auth } from "./auth";
-import { hook } from "./hook";
-import { VERSION } from "./version";
-export function createOAuthDeviceAuth(options) {
- const requestWithDefaults = options.request ||
- octokitRequest.defaults({
- headers: {
- "user-agent": `octokit-auth-oauth-device.js/${VERSION} ${getUserAgent()}`,
- },
- });
- const { request = requestWithDefaults, ...otherOptions } = options;
- const state = options.clientType === "github-app"
- ? {
- ...otherOptions,
- clientType: "github-app",
- request,
- }
- : {
- ...otherOptions,
- clientType: "oauth-app",
- request,
- scopes: options.scopes || [],
- };
- if (!options.clientId) {
- throw new Error('[@octokit/auth-oauth-device] "clientId" option must be set (https://github.com/octokit/auth-oauth-device.js#usage)');
- }
- if (!options.onVerification) {
- throw new Error('[@octokit/auth-oauth-device] "onVerification" option must be a function (https://github.com/octokit/auth-oauth-device.js#usage)');
- }
- // @ts-ignore too much for tsc / ts-jest ¯\_(ツ)_/¯
- return Object.assign(auth.bind(null, state), {
- hook: hook.bind(null, state),
- });
-}
diff --git a/node_modules/@octokit/auth-oauth-device/dist-src/types.js b/node_modules/@octokit/auth-oauth-device/dist-src/types.js
deleted file mode 100644
index cb0ff5c..0000000
--- a/node_modules/@octokit/auth-oauth-device/dist-src/types.js
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/node_modules/@octokit/auth-oauth-device/dist-src/version.js b/node_modules/@octokit/auth-oauth-device/dist-src/version.js
deleted file mode 100644
index d6cf15a..0000000
--- a/node_modules/@octokit/auth-oauth-device/dist-src/version.js
+++ /dev/null
@@ -1 +0,0 @@
-export const VERSION = "4.0.3";
diff --git a/node_modules/@octokit/auth-oauth-device/dist-types/auth.d.ts b/node_modules/@octokit/auth-oauth-device/dist-types/auth.d.ts
deleted file mode 100644
index 935ab95..0000000
--- a/node_modules/@octokit/auth-oauth-device/dist-types/auth.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import { OAuthAppAuthOptions, GitHubAppAuthOptions, OAuthAppAuthentication, GitHubAppAuthentication, OAuthAppState, GitHubAppState } from "./types";
-export declare function auth(state: OAuthAppState | GitHubAppState, authOptions: OAuthAppAuthOptions | GitHubAppAuthOptions): Promise;
diff --git a/node_modules/@octokit/auth-oauth-device/dist-types/get-oauth-access-token.d.ts b/node_modules/@octokit/auth-oauth-device/dist-types/get-oauth-access-token.d.ts
deleted file mode 100644
index 2bbe941..0000000
--- a/node_modules/@octokit/auth-oauth-device/dist-types/get-oauth-access-token.d.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import { RequestInterface } from "@octokit/types";
-import { OAuthAppState, GitHubAppState, OAuthAppAuthOptions, GitHubAppAuthOptions, OAuthAppAuthentication, GitHubAppAuthentication } from "./types";
-export declare function getOAuthAccessToken(state: OAuthAppState | GitHubAppState, options: {
- request?: RequestInterface;
- auth: OAuthAppAuthOptions | GitHubAppAuthOptions;
-}): Promise;
diff --git a/node_modules/@octokit/auth-oauth-device/dist-types/hook.d.ts b/node_modules/@octokit/auth-oauth-device/dist-types/hook.d.ts
deleted file mode 100644
index f9803e4..0000000
--- a/node_modules/@octokit/auth-oauth-device/dist-types/hook.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { RequestInterface, OctokitResponse, EndpointOptions, RequestParameters, Route } from "@octokit/types";
-import { OAuthAppState, GitHubAppState } from "./types";
-export declare function hook(state: OAuthAppState | GitHubAppState, request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise>;
diff --git a/node_modules/@octokit/auth-oauth-device/dist-types/index.d.ts b/node_modules/@octokit/auth-oauth-device/dist-types/index.d.ts
deleted file mode 100644
index 4b1b734..0000000
--- a/node_modules/@octokit/auth-oauth-device/dist-types/index.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import { GitHubAppAuthInterface, GitHubAppStrategyOptions, OAuthAppAuthInterface, OAuthAppStrategyOptions } from "./types";
-export { OAuthAppStrategyOptions, OAuthAppAuthOptions, OAuthAppAuthentication, GitHubAppStrategyOptions, GitHubAppAuthOptions, GitHubAppAuthentication, GitHubAppAuthenticationWithExpiration, } from "./types";
-export declare function createOAuthDeviceAuth(options: OAuthAppStrategyOptions): OAuthAppAuthInterface;
-export declare function createOAuthDeviceAuth(options: GitHubAppStrategyOptions): GitHubAppAuthInterface;
diff --git a/node_modules/@octokit/auth-oauth-device/dist-types/types.d.ts b/node_modules/@octokit/auth-oauth-device/dist-types/types.d.ts
deleted file mode 100644
index 951dbab..0000000
--- a/node_modules/@octokit/auth-oauth-device/dist-types/types.d.ts
+++ /dev/null
@@ -1,68 +0,0 @@
-import { RequestInterface, Route, EndpointOptions, RequestParameters, OctokitResponse } from "@octokit/types";
-import * as OAuthMethodsTypes from "@octokit/oauth-methods";
-export declare type ClientType = "oauth-app" | "github-app";
-export declare type OAuthAppStrategyOptions = {
- clientId: string;
- clientType?: "oauth-app";
- onVerification: OnVerificationCallback;
- scopes?: string[];
- request?: RequestInterface;
-};
-export declare type GitHubAppStrategyOptions = {
- clientId: string;
- clientType: "github-app";
- onVerification: OnVerificationCallback;
- request?: RequestInterface;
-};
-export interface OAuthAppAuthInterface {
- (options: OAuthAppAuthOptions): Promise;
- hook(request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise>;
-}
-export interface GitHubAppAuthInterface {
- (options: GitHubAppAuthOptions): Promise;
- hook(request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise>;
-}
-export declare type OAuthAppAuthOptions = {
- type: "oauth";
- scopes?: string[];
- refresh?: boolean;
-};
-export declare type GitHubAppAuthOptions = {
- type: "oauth";
- refresh?: boolean;
-};
-export declare type OAuthAppAuthentication = {
- type: "token";
- tokenType: "oauth";
-} & Omit;
-export declare type GitHubAppAuthentication = {
- type: "token";
- tokenType: "oauth";
-} & Omit;
-export declare type GitHubAppAuthenticationWithExpiration = {
- type: "token";
- tokenType: "oauth";
-} & Omit;
-export declare type Verification = {
- device_code: string;
- user_code: string;
- verification_uri: string;
- expires_in: number;
- interval: number;
-};
-export declare type OnVerificationCallback = (verification: Verification) => any | Promise;
-export declare type OAuthAppState = {
- clientId: string;
- clientType: "oauth-app";
- onVerification: OnVerificationCallback;
- scopes: string[];
- request: RequestInterface;
- authentication?: OAuthAppAuthentication;
-};
-export declare type GitHubAppState = {
- clientId: string;
- clientType: "github-app";
- onVerification: OnVerificationCallback;
- request: RequestInterface;
- authentication?: GitHubAppAuthentication | GitHubAppAuthenticationWithExpiration;
-};
diff --git a/node_modules/@octokit/auth-oauth-device/dist-types/version.d.ts b/node_modules/@octokit/auth-oauth-device/dist-types/version.d.ts
deleted file mode 100644
index 5e93bcf..0000000
--- a/node_modules/@octokit/auth-oauth-device/dist-types/version.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export declare const VERSION = "4.0.3";
diff --git a/node_modules/@octokit/auth-oauth-device/dist-web/index.js b/node_modules/@octokit/auth-oauth-device/dist-web/index.js
deleted file mode 100644
index a47668c..0000000
--- a/node_modules/@octokit/auth-oauth-device/dist-web/index.js
+++ /dev/null
@@ -1,140 +0,0 @@
-import { getUserAgent } from 'universal-user-agent';
-import { request } from '@octokit/request';
-import { createDeviceCode, exchangeDeviceCode } from '@octokit/oauth-methods';
-
-async function getOAuthAccessToken(state, options) {
- const cachedAuthentication = getCachedAuthentication(state, options.auth);
- if (cachedAuthentication)
- return cachedAuthentication;
- // Step 1: Request device and user codes
- // https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-1-app-requests-the-device-and-user-verification-codes-from-github
- const { data: verification } = await createDeviceCode({
- clientType: state.clientType,
- clientId: state.clientId,
- request: options.request || state.request,
- // @ts-expect-error the extra code to make TS happy is not worth it
- scopes: options.auth.scopes || state.scopes,
- });
- // Step 2: User must enter the user code on https://github.com/login/device
- // See https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-2-prompt-the-user-to-enter-the-user-code-in-a-browser
- await state.onVerification(verification);
- // Step 3: Exchange device code for access token
- // See https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-3-app-polls-github-to-check-if-the-user-authorized-the-device
- const authentication = await waitForAccessToken(options.request || state.request, state.clientId, state.clientType, verification);
- state.authentication = authentication;
- return authentication;
-}
-function getCachedAuthentication(state, auth) {
- if (auth.refresh === true)
- return false;
- if (!state.authentication)
- return false;
- if (state.clientType === "github-app") {
- return state.authentication;
- }
- const authentication = state.authentication;
- const newScope = (("scopes" in auth && auth.scopes) || state.scopes).join(" ");
- const currentScope = authentication.scopes.join(" ");
- return newScope === currentScope ? authentication : false;
-}
-async function wait(seconds) {
- await new Promise((resolve) => setTimeout(resolve, seconds * 1000));
-}
-async function waitForAccessToken(request, clientId, clientType, verification) {
- try {
- const options = {
- clientId,
- request,
- code: verification.device_code,
- };
- // WHY TYPESCRIPT WHY ARE YOU DOING THIS TO ME
- const { authentication } = clientType === "oauth-app"
- ? await exchangeDeviceCode({
- ...options,
- clientType: "oauth-app",
- })
- : await exchangeDeviceCode({
- ...options,
- clientType: "github-app",
- });
- return {
- type: "token",
- tokenType: "oauth",
- ...authentication,
- };
- }
- catch (error) {
- // istanbul ignore if
- // @ts-ignore
- if (!error.response)
- throw error;
- // @ts-ignore
- const errorType = error.response.data.error;
- if (errorType === "authorization_pending") {
- await wait(verification.interval);
- return waitForAccessToken(request, clientId, clientType, verification);
- }
- if (errorType === "slow_down") {
- await wait(verification.interval + 5);
- return waitForAccessToken(request, clientId, clientType, verification);
- }
- throw error;
- }
-}
-
-async function auth(state, authOptions) {
- return getOAuthAccessToken(state, {
- auth: authOptions,
- });
-}
-
-async function hook(state, request, route, parameters) {
- let endpoint = request.endpoint.merge(route, parameters);
- // Do not intercept request to retrieve codes or token
- if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) {
- return request(endpoint);
- }
- const { token } = await getOAuthAccessToken(state, {
- request,
- auth: { type: "oauth" },
- });
- endpoint.headers.authorization = `token ${token}`;
- return request(endpoint);
-}
-
-const VERSION = "4.0.3";
-
-function createOAuthDeviceAuth(options) {
- const requestWithDefaults = options.request ||
- request.defaults({
- headers: {
- "user-agent": `octokit-auth-oauth-device.js/${VERSION} ${getUserAgent()}`,
- },
- });
- const { request: request$1 = requestWithDefaults, ...otherOptions } = options;
- const state = options.clientType === "github-app"
- ? {
- ...otherOptions,
- clientType: "github-app",
- request: request$1,
- }
- : {
- ...otherOptions,
- clientType: "oauth-app",
- request: request$1,
- scopes: options.scopes || [],
- };
- if (!options.clientId) {
- throw new Error('[@octokit/auth-oauth-device] "clientId" option must be set (https://github.com/octokit/auth-oauth-device.js#usage)');
- }
- if (!options.onVerification) {
- throw new Error('[@octokit/auth-oauth-device] "onVerification" option must be a function (https://github.com/octokit/auth-oauth-device.js#usage)');
- }
- // @ts-ignore too much for tsc / ts-jest ¯\_(ツ)_/¯
- return Object.assign(auth.bind(null, state), {
- hook: hook.bind(null, state),
- });
-}
-
-export { createOAuthDeviceAuth };
-//# sourceMappingURL=index.js.map
diff --git a/node_modules/@octokit/auth-oauth-device/dist-web/index.js.map b/node_modules/@octokit/auth-oauth-device/dist-web/index.js.map
deleted file mode 100644
index 1ff5fd9..0000000
--- a/node_modules/@octokit/auth-oauth-device/dist-web/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sources":["../dist-src/get-oauth-access-token.js","../dist-src/auth.js","../dist-src/hook.js","../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["import { createDeviceCode, exchangeDeviceCode } from \"@octokit/oauth-methods\";\nexport async function getOAuthAccessToken(state, options) {\n const cachedAuthentication = getCachedAuthentication(state, options.auth);\n if (cachedAuthentication)\n return cachedAuthentication;\n // Step 1: Request device and user codes\n // https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-1-app-requests-the-device-and-user-verification-codes-from-github\n const { data: verification } = await createDeviceCode({\n clientType: state.clientType,\n clientId: state.clientId,\n request: options.request || state.request,\n // @ts-expect-error the extra code to make TS happy is not worth it\n scopes: options.auth.scopes || state.scopes,\n });\n // Step 2: User must enter the user code on https://github.com/login/device\n // See https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-2-prompt-the-user-to-enter-the-user-code-in-a-browser\n await state.onVerification(verification);\n // Step 3: Exchange device code for access token\n // See https://docs.github.com/en/developers/apps/authorizing-oauth-apps#step-3-app-polls-github-to-check-if-the-user-authorized-the-device\n const authentication = await waitForAccessToken(options.request || state.request, state.clientId, state.clientType, verification);\n state.authentication = authentication;\n return authentication;\n}\nfunction getCachedAuthentication(state, auth) {\n if (auth.refresh === true)\n return false;\n if (!state.authentication)\n return false;\n if (state.clientType === \"github-app\") {\n return state.authentication;\n }\n const authentication = state.authentication;\n const newScope = ((\"scopes\" in auth && auth.scopes) || state.scopes).join(\" \");\n const currentScope = authentication.scopes.join(\" \");\n return newScope === currentScope ? authentication : false;\n}\nasync function wait(seconds) {\n await new Promise((resolve) => setTimeout(resolve, seconds * 1000));\n}\nasync function waitForAccessToken(request, clientId, clientType, verification) {\n try {\n const options = {\n clientId,\n request,\n code: verification.device_code,\n };\n // WHY TYPESCRIPT WHY ARE YOU DOING THIS TO ME\n const { authentication } = clientType === \"oauth-app\"\n ? await exchangeDeviceCode({\n ...options,\n clientType: \"oauth-app\",\n })\n : await exchangeDeviceCode({\n ...options,\n clientType: \"github-app\",\n });\n return {\n type: \"token\",\n tokenType: \"oauth\",\n ...authentication,\n };\n }\n catch (error) {\n // istanbul ignore if\n // @ts-ignore\n if (!error.response)\n throw error;\n // @ts-ignore\n const errorType = error.response.data.error;\n if (errorType === \"authorization_pending\") {\n await wait(verification.interval);\n return waitForAccessToken(request, clientId, clientType, verification);\n }\n if (errorType === \"slow_down\") {\n await wait(verification.interval + 5);\n return waitForAccessToken(request, clientId, clientType, verification);\n }\n throw error;\n }\n}\n","import { getOAuthAccessToken } from \"./get-oauth-access-token\";\nexport async function auth(state, authOptions) {\n return getOAuthAccessToken(state, {\n auth: authOptions,\n });\n}\n","import { getOAuthAccessToken } from \"./get-oauth-access-token\";\nexport async function hook(state, request, route, parameters) {\n let endpoint = request.endpoint.merge(route, parameters);\n // Do not intercept request to retrieve codes or token\n if (/\\/login\\/(oauth\\/access_token|device\\/code)$/.test(endpoint.url)) {\n return request(endpoint);\n }\n const { token } = await getOAuthAccessToken(state, {\n request,\n auth: { type: \"oauth\" },\n });\n endpoint.headers.authorization = `token ${token}`;\n return request(endpoint);\n}\n","export const VERSION = \"4.0.3\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { request as octokitRequest } from \"@octokit/request\";\nimport { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nimport { VERSION } from \"./version\";\nexport function createOAuthDeviceAuth(options) {\n const requestWithDefaults = options.request ||\n octokitRequest.defaults({\n headers: {\n \"user-agent\": `octokit-auth-oauth-device.js/${VERSION} ${getUserAgent()}`,\n },\n });\n const { request = requestWithDefaults, ...otherOptions } = options;\n const state = options.clientType === \"github-app\"\n ? {\n ...otherOptions,\n clientType: \"github-app\",\n request,\n }\n : {\n ...otherOptions,\n clientType: \"oauth-app\",\n request,\n scopes: options.scopes || [],\n };\n if (!options.clientId) {\n throw new Error('[@octokit/auth-oauth-device] \"clientId\" option must be set (https://github.com/octokit/auth-oauth-device.js#usage)');\n }\n if (!options.onVerification) {\n throw new Error('[@octokit/auth-oauth-device] \"onVerification\" option must be a function (https://github.com/octokit/auth-oauth-device.js#usage)');\n }\n // @ts-ignore too much for tsc / ts-jest ¯\\_(ツ)_/¯\n return Object.assign(auth.bind(null, state), {\n hook: hook.bind(null, state),\n });\n}\n"],"names":["octokitRequest","request"],"mappings":";;;;AACO,eAAe,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE;AAC1D,IAAI,MAAM,oBAAoB,GAAG,uBAAuB,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;AAC9E,IAAI,IAAI,oBAAoB;AAC5B,QAAQ,OAAO,oBAAoB,CAAC;AACpC;AACA;AACA,IAAI,MAAM,EAAE,IAAI,EAAE,YAAY,E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MAAM,mBAAmB,GAAG,OAAO,CAAC,OAAO;AAC/C,QAAQA,OAAc,CAAC,QAAQ,CAAC;AAChC,YAAY,OAAO,EAAE;AACrB,gBAAgB,YAAY,EAAE,CAAC,6BAA6B,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;AACzF,aAAa;AACb,SAAS,CAAC,CAAC;AACX,IAAI,MAAM,WAAEC,SAAO,GAAG,mBAAmB,EAAE,GAAG,YAAY,EAAE,GAAG,OAAO,CAAC;AACvE,IAAI,MAAM,KAAK,GAAG,OAAO,CAAC,UAAU,KAAK,YAAY;AACrD,UAAU;AACV,YAAY,GAAG,YAAY;AAC3B,YAAY,UAAU,EAAE,YAAY;AACpC,qBAAYA,SAAO;AACnB,SAAS;AACT,UAAU;AACV,YAAY,GAAG,YAAY;AAC3B,YAAY,UAAU,EAAE,WAAW;AACnC,qBAAYA,SAAO;AACnB,YAAY,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,EAAE;AACxC,SAAS,CAAC;AACV,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE;AAC3B,QAAQ,MAAM,IAAI,KAAK,CAAC,oHAAoH,CAAC,CAAC;AAC9I,KAAK;AACL,IAAI,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE;AACjC,QAAQ,MAAM,IAAI,KAAK,CAAC,iIAAiI,CAAC,CAAC;AAC3J,KAAK;AACL;AACA,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE;AACjD,QAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC;AACpC,KAAK,CAAC,CAAC;AACP,CAAC;;;;"}
\ No newline at end of file
diff --git a/node_modules/@octokit/auth-oauth-device/package.json b/node_modules/@octokit/auth-oauth-device/package.json
deleted file mode 100644
index e89528a..0000000
--- a/node_modules/@octokit/auth-oauth-device/package.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "name": "@octokit/auth-oauth-device",
- "description": "GitHub OAuth Device authentication strategy for JavaScript",
- "version": "4.0.3",
- "license": "MIT",
- "files": [
- "dist-*/",
- "bin/"
- ],
- "pika": true,
- "sideEffects": false,
- "keywords": [
- "github",
- "api",
- "sdk",
- "toolkit"
- ],
- "repository": "github:octokit/auth-oauth-device.js",
- "dependencies": {
- "@octokit/oauth-methods": "^2.0.0",
- "@octokit/request": "^6.0.0",
- "@octokit/types": "^8.0.0",
- "universal-user-agent": "^6.0.0"
- },
- "devDependencies": {
- "@octokit/tsconfig": "^1.0.2",
- "@pika/pack": "^0.5.0",
- "@pika/plugin-build-node": "^0.9.2",
- "@pika/plugin-build-web": "^0.9.2",
- "@pika/plugin-ts-standard-pkg": "^0.9.2",
- "@types/jest": "^29.0.0",
- "@types/node": "^16.0.0",
- "fetch-mock": "^9.11.0",
- "jest": "^29.0.0",
- "prettier": "2.7.1",
- "semantic-release": "^19.0.0",
- "semantic-release-plugin-update-version-in-files": "^1.1.0",
- "ts-jest": "^29.0.0",
- "typescript": "^4.2.2"
- },
- "engines": {
- "node": ">= 14"
- },
- "publishConfig": {
- "access": "public"
- },
- "source": "dist-src/index.js",
- "types": "dist-types/index.d.ts",
- "main": "dist-node/index.js",
- "module": "dist-web/index.js"
-}
diff --git a/node_modules/@octokit/auth-oauth-user/LICENSE b/node_modules/@octokit/auth-oauth-user/LICENSE
deleted file mode 100644
index 57049d0..0000000
--- a/node_modules/@octokit/auth-oauth-user/LICENSE
+++ /dev/null
@@ -1,9 +0,0 @@
-MIT License
-
-Copyright (c) 2021 Octokit contributors
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@octokit/auth-oauth-user/README.md b/node_modules/@octokit/auth-oauth-user/README.md
deleted file mode 100644
index 5215668..0000000
--- a/node_modules/@octokit/auth-oauth-user/README.md
+++ /dev/null
@@ -1,1010 +0,0 @@
-# auth-oauth-user.js
-
-> Octokit authentication strategy for OAuth user authentication
-
-[](https://www.npmjs.com/package/@octokit/auth-oauth-user)
-[](https://github.com/octokit/auth-oauth-user.js/actions?query=workflow%3ATest+branch%3Amain)
-
-**Important:** `@octokit/auth-oauth-user` requires your app's `client_secret`, which must not be exposed. If you are looking for an OAuth user authentication strategy that can be used on a client (browser, IoT, CLI), check out [`@octokit/auth-oauth-user-client`](https://github.com/octokit/auth-oauth-user-client.js#readme). Note that `@octokit/auth-oauth-user-client` requires a backend. The only exception is [`@octokit/auth-oauth-device`](https://github.com/octokit/auth-oauth-device.js#readme) which does not require the `client_secret`, but does not work in browsers due to CORS constraints.
-
-
-Table of contents
-
-
-
-- [Features](#features)
-- [Standalone usage](#standalone-usage)
- - [Exchange code from OAuth web flow](#exchange-code-from-oauth-web-flow)
- - [OAuth Device flow](#oauth-device-flow)
- - [Use an existing authentication](#use-an-existing-authentication)
-- [Usage with Octokit](#usage-with-octokit)
-- [`createOAuthUserAuth(options)` or `new Octokit({ auth })`](#createoauthuserauthoptions-or-new-octokit-auth-)
- - [When using GitHub's OAuth web flow](#when-using-githubs-oauth-web-flow)
- - [When using GitHub's OAuth device flow](#when-using-githubs-oauth-device-flow)
- - [When passing an existing authentication object](#when-passing-an-existing-authentication-object)
-- [`auth(options)` or `octokit.auth(options)`](#authoptions-or-octokitauthoptions)
-- [Authentication object](#authentication-object)
- - [OAuth APP authentication token](#oauth-app-authentication-token)
- - [GitHub APP user authentication token with expiring disabled](#github-app-user-authentication-token-with-expiring-disabled)
- - [GitHub APP user authentication token with expiring enabled](#github-app-user-authentication-token-with-expiring-enabled)
-- [`auth.hook(request, route, parameters)` or `auth.hook(request, options)`](#authhookrequest-route-parameters-or-authhookrequest-options)
-- [Types](#types)
-- [Contributing](#contributing)
-- [License](#license)
-
-
-
-
-
-## Features
-
-- Code for token exchange from [GitHub's OAuth web flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#web-application-flow)
-- [GitHub's OAuth device flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#device-flow)
-- Caches token for succesive calls
-- Auto-refreshing for [expiring user access tokens](https://docs.github.com/en/developers/apps/refreshing-user-to-server-access-tokens)
-- Applies the correct authentication strategy based on the request URL when using with `Octokit`
-- Token verification
-- Token reset
-- Token invalidation
-- Application grant revocation
-
-## Standalone usage
-
-
-
-### Exchange code from OAuth web flow
-
-```js
-const auth = createOAuthUserAuth({
- clientId: "1234567890abcdef1234",
- clientSecret: "1234567890abcdef1234567890abcdef12345678",
- code: "code123",
- // optional
- state: "state123",
- redirectUrl: "https://acme-inc.com/login",
-});
-
-// Exchanges the code for the user access token authentication on first call
-// and caches the authentication for successive calls
-const { token } = await auth();
-```
-
-About [GitHub's OAuth web flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#web-application-flow)
-
-### OAuth Device flow
-
-```js
-const auth = createOAuthUserAuth({
- clientId: "1234567890abcdef1234",
- clientSecret: "1234567890abcdef1234567890abcdef12345678",
- onVerification(verification) {
- // verification example
- // {
- // device_code: "3584d83530557fdd1f46af8289938c8ef79f9dc5",
- // user_code: "WDJB-MJHT",
- // verification_uri: "https://github.com/login/device",
- // expires_in: 900,
- // interval: 5,
- // };
-
- console.log("Open %s", verification.verification_uri);
- console.log("Enter code: %s", verification.user_code);
- },
-});
-
-// resolves once the user entered the `user_code` on `verification_uri`
-const { token } = await auth();
-```
-
-About [GitHub's OAuth device flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#device-flow)
-
-### Use an existing authentication
-
-```js
-const auth = createOAuthUserAuth({
- clientId: "1234567890abcdef1234",
- clientSecret: "1234567890abcdef1234567890abcdef12345678",
- clientType: "oauth-app",
- token: "token123",
-});
-
-// will return the passed authentication
-const { token } = await auth();
-```
-
-See [Authentication object](#authentication-object).
-
-## Usage with Octokit
-
-
-
-
-
-Browsers
-
-
-
-`@octokit/auth-oauth-user` cannot be used in the browser. It requires `clientSecret` to be set which must not be exposed to clients, and some of the OAuth APIs it uses do not support CORS.
-
-
-
-```js
-const octokit = new Octokit({
- authStrategy: createOAuthUserAuth,
- auth: {
- clientId: "1234567890abcdef1234",
- clientSecret: "1234567890abcdef1234567890abcdef12345678",
- code: "code123",
- },
-});
-
-// Exchanges the code for the user access token authentication on first request
-// and caches the authentication for successive requests
-const {
- data: { login },
-} = await octokit.request("GET /user");
-console.log("Hello, %s!", login);
-```
-
-## `createOAuthUserAuth(options)` or `new Octokit({ auth })`
-
-The `createOAuthUserAuth` method accepts a single `options` object as argument. The same set of options can be passed as `auth` to the `Octokit` constructor when setting `authStrategy: createOAuthUserAuth`
-
-### When using GitHub's OAuth web flow
-
-
-
-
-
- name
-
-
- type
-
-
- description
-
-
-
-
-
-
- clientId
-
-
- string
-
-
- Required. Client ID of your GitHub/OAuth App. Find it on your app's settings page.
-
-
-
-
- clientSecret
-
-
- string
-
-
- Required. Client Secret for your GitHub/OAuth App. Create one on your app's settings page.
-
-
-
-
- clientType
-
-
- string
-
-
- Either "oauth-app" or "github-app". Defaults to "oauth-app".
-
-
-
-
- code
-
-
- string
-
-
-
-**Required.** The authorization code which was passed as query parameter to the callback URL from [GitHub's OAuth web application flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#web-application-flow).
-
-
-
-
-
- state
-
-
- string
-
-
-
-The unguessable random string you provided in [Step 1 of GitHub's OAuth web application flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#1-request-a-users-github-identity).
-
-
-
-
-
- redirectUrl
-
-
- string
-
-
-
-The redirect_uri parameter you provided in [Step 1 of GitHub's OAuth web application flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#1-request-a-users-github-identity).
-
-
-
-
-
- request
-
-
- function
-
-
- You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the API root endpoint. Example:
-
-```js
-const { request } = require("@octokit/request");
-createOAuthAppAuth({
- clientId: "1234567890abcdef1234",
- clientSecret: "1234567890abcdef1234567890abcdef12345678",
- request: request.defaults({
- baseUrl: "https://ghe.my-company.com/api/v3",
- }),
-});
-```
-
-
-
-
-
-
-### When using GitHub's OAuth device flow
-
-
-
-
-
- name
-
-
- type
-
-
- description
-
-
-
-
-
-
- clientId
-
-
- string
-
-
- Required. Client ID of your GitHub/OAuth App. Find it on your app's settings page.
-
-
-
-
- clientSecret
-
-
- string
-
-
- Required. Client Secret for your GitHub/OAuth App. The clientSecret is not needed for the OAuth device flow itself, but it is required for resetting, refreshing, and invalidating a token. Find the Client Secret on your app's settings page.
-
-
-
-
- clientType
-
-
- string
-
-
- Either "oauth-app" or "github-app". Defaults to "oauth-app".
-
-
-
-
- onVerification
-
-
- function
-
-
-
-**Required**. A function that is called once the device and user codes were retrieved
-
-The `onVerification()` callback can be used to pause until the user completes step 2, which might result in a better user experience.
-
-```js
-const auth = createOAuthUserAuth({
- clientId: "1234567890abcdef1234",
- clientSecret: "1234567890abcdef1234567890abcdef12345678",
- onVerification(verification) {
- console.log("Open %s", verification.verification_uri);
- console.log("Enter code: %s", verification.user_code);
-
- await prompt("press enter when you are ready to continue");
- },
-});
-```
-
-
-
-
-
- request
-
-
- function
-
-
- You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the API root endpoint. Example:
-
-```js
-const { request } = require("@octokit/request");
-createOAuthAppAuth({
- clientId: "1234567890abcdef1234",
- clientSecret: "1234567890abcdef1234567890abcdef12345678",
- onVerification(verification) {
- console.log("Open %s", verification.verification_uri);
- console.log("Enter code: %s", verification.user_code);
-
- await prompt("press enter when you are ready to continue");
- },
- request: request.defaults({
- baseUrl: "https://ghe.my-company.com/api/v3",
- }),
-});
-```
-
-
-
-
-
-
-### When passing an existing authentication object
-
-
-
-
-
- name
-
-
- type
-
-
- description
-
-
-
-
-
-
- clientType
-
-
- string
-
-
- Required. Either "oauth-app" or "github".
-
-
-
-
- clientId
-
-
- string
-
-
- Required. Client ID of your GitHub/OAuth App. Find it on your app's settings page.
-
-
-
-
- clientSecret
-
-
- string
-
-
- Required. Client Secret for your GitHub/OAuth App. Create one on your app's settings page.
-
-
-
-
- token
-
-
- string
-
-
- Required. The user access token
-
-
-
-
- scopes
-
-
- array of strings
-
-
- Required if clientType is set to "oauth-app". Array of OAuth scope names the token was granted
-
-
-
-
- refreshToken
-
-
- string
-
-
- Only relevant if clientType is set to "github-app" and token expiration is enabled.
-
-
-
-
- expiresAt
-
-
- string
-
-
- Only relevant if clientType is set to "github-app" and token expiration is enabled. Date timestamp in ISO 8601 standard. Example: 2022-01-01T08:00:0.000Z
-
-
-
-
-
- refreshTokenExpiresAt
-
-
- string
-
-
- Only relevant if clientType is set to "github-app" and token expiration is enabled. Date timestamp in ISO 8601 standard. Example: 2021-07-01T00:00:0.000Z
-
-
-
-
- request
-
-
- function
-
-
- You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the API root endpoint. Example:
-
-```js
-const { request } = require("@octokit/request");
-createOAuthAppAuth({
- clientId: "1234567890abcdef1234",
- clientSecret: "1234567890abcdef1234567890abcdef12345678",
- request: request.defaults({
- baseUrl: "https://ghe.my-company.com/api/v3",
- }),
-});
-```
-
-
-
-
-
-
-## `auth(options)` or `octokit.auth(options)`
-
-The async `auth()` method is returned by `createOAuthUserAuth(options)` or set on the `octokit` instance when the `Octokit` constructor was called with `authStrategy: createOAuthUserAuth`.
-
-Once `auth()` receives a valid authentication object it caches it in memory and uses it for subsequent calls. It also caches if the token is invalid and no longer tries to send any requests. If the authentication is using a refresh token, a new token will be requested as needed. Calling `auth({ type: "reset" })` will replace the internally cached authentication.
-
-Resolves with an [authentication object](#authentication-object).
-
-
-
-
-
- name
-
-
- type
-
-
- description
-
-
-
-
-
-
- type
-
-
- string
-
-
-
-Without setting `type` auth will return the current authentication object, or exchange the `code` from the strategy options on first call. If the current authentication token is expired, the tokens will be refreshed.
-
-Possible values for `type` are
-
-- `"get"`: returns the token from internal state and creates it if none was created yet
-- `"check"`: sends request to verify the validity of the current token
-- `"reset"`: invalidates current token and replaces it with a new one
-- `"refresh"`: GitHub Apps only, and only if expiring user tokens are enabled.
-- `"delete"`: invalidates current token
-- `"deleteAuthorization"`: revokes OAuth access for application. All tokens for the current user created by the same app are invalidated. The user will be prompted to grant access again during the next OAuth web flow.
-
-
-
-
-
-
-## Authentication object
-
-There are three possible results
-
-1. [OAuth APP authentication token](#oauth-app-authentication-token)
-1. [GitHub APP user authentication token with expiring disabled](#github-app-user-authentication-token-with-expiring-disabled)
-1. [GitHub APP user authentication token with expiring enabled](#github-app-user-authentication-token-with-expiring-enabled)
-
-The differences are
-
-1. `scopes` is only present for OAuth Apps
-2. `refreshToken`, `expiresAt`, `refreshTokenExpiresAt` are only present for GitHub Apps, and only if token expiration is enabled
-
-### OAuth APP authentication token
-
-
-
-
-
- name
-
-
- type
-
-
- description
-
-
-
-
-
-
- type
-
-
- string
-
-
- "token"
-
-
-
-
- tokenType
-
-
- string
-
-
- "oauth"
-
-
-
-
- clientType
-
-
- string
-
-
- "oauth-app"
-
-
-
-
- clientId
-
-
- string
-
-
- The clientId from the strategy options
-
-
-
-
- clientSecret
-
-
- string
-
-
- The clientSecret from the strategy options
-
-
-
-
- token
-
-
- string
-
-
- The user access token
-
-
-
-
- scopes
-
-
- array of strings
-
-
- array of scope names enabled for the token
-
-
-
-
- invalid
-
-
- boolean
-
-
-
-Either `undefined` or `true`. Will be set to `true` if the token was invalided explicitly or found to be invalid
-
-
-
-
-
-
-### GitHub APP user authentication token with expiring disabled
-
-
-
-
-
- name
-
-
- type
-
-
- description
-
-
-
-
-
-
- type
-
-
- string
-
-
- "token"
-
-
-
-
- tokenType
-
-
- string
-
-
- "oauth"
-
-
-
-
- clientType
-
-
- string
-
-
- "github-app"
-
-
-
-
- clientId
-
-
- string
-
-
- The clientId from the strategy options
-
-
-
-
- clientSecret
-
-
- string
-
-
- The clientSecret from the strategy options
-
-
-
-
- token
-
-
- string
-
-
- The user access token
-
-
-
-
- invalid
-
-
- boolean
-
-
-
-Either `undefined` or `true`. Will be set to `true` if the token was invalided explicitly or found to be invalid
-
-
-
-
-
-
-### GitHub APP user authentication token with expiring enabled
-
-
-
-
-
- name
-
-
- type
-
-
- description
-
-
-
-
-
-
- type
-
-
- string
-
-
- "token"
-
-
-
-
- tokenType
-
-
- string
-
-
- "oauth"
-
-
-
-
- clientType
-
-
- string
-
-
- "github-app"
-
-
-
-
- clientId
-
-
- string
-
-
- The clientId from the strategy options
-
-
-
-
- clientSecret
-
-
- string
-
-
- The clientSecret from the strategy options
-
-
-
-
- token
-
-
- string
-
-
- The user access token
-
-
-
-
- refreshToken
-
-
- string
-
-
- The refresh token
-
-
-
-
- expiresAt
-
-
- string
-
-
- Date timestamp in ISO 8601 standard. Example: 2022-01-01T08:00:0.000Z
-
-
-
-
- refreshTokenExpiresAt
-
-
- string
-
-
- Date timestamp in ISO 8601 standard. Example: 2021-07-01T00:00:0.000Z
-
-
-
-
- invalid
-
-
- boolean
-
-
-
-Either `undefined` or `true`. Will be set to `true` if the token was invalided explicitly or found to be invalid
-
-
-
-
-
-
-## `auth.hook(request, route, parameters)` or `auth.hook(request, options)`
-
-`auth.hook()` hooks directly into the request life cycle. It amends the request to authenticate correctly based on the request URL.
-
-The `request` option is an instance of [`@octokit/request`](https://github.com/octokit/request.js#readme). The `route`/`options` parameters are the same as for the [`request()` method](https://github.com/octokit/request.js#request).
-
-`auth.hook()` can be called directly to send an authenticated request
-
-```js
-const { data: user } = await auth.hook(request, "GET /user");
-```
-
-Or it can be passed as option to [`request()`](https://github.com/octokit/request.js#request).
-
-```js
-const requestWithAuth = request.defaults({
- request: {
- hook: auth.hook,
- },
-});
-
-const { data: user } = await requestWithAuth("GET /user");
-```
-
-## Types
-
-```ts
-import {
- GitHubAppAuthentication,
- GitHubAppAuthenticationWithExpiration,
- GitHubAppAuthOptions,
- GitHubAppStrategyOptions,
- GitHubAppStrategyOptionsDeviceFlow,
- GitHubAppStrategyOptionsExistingAuthentication,
- GitHubAppStrategyOptionsExistingAuthenticationWithExpiration,
- GitHubAppStrategyOptionsWebFlow,
- OAuthAppAuthentication,
- OAuthAppAuthOptions,
- OAuthAppStrategyOptions,
- OAuthAppStrategyOptionsDeviceFlow,
- OAuthAppStrategyOptionsExistingAuthentication,
- OAuthAppStrategyOptionsWebFlow,
-} from "@octokit/auth-oauth-user";
-```
-
-## Contributing
-
-See [CONTRIBUTING.md](CONTRIBUTING.md)
-
-## License
-
-[MIT](LICENSE)
diff --git a/node_modules/@octokit/auth-oauth-user/dist-node/index.js b/node_modules/@octokit/auth-oauth-user/dist-node/index.js
deleted file mode 100644
index 51032be..0000000
--- a/node_modules/@octokit/auth-oauth-user/dist-node/index.js
+++ /dev/null
@@ -1,242 +0,0 @@
-'use strict';
-
-Object.defineProperty(exports, '__esModule', { value: true });
-
-function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
-
-var universalUserAgent = require('universal-user-agent');
-var request = require('@octokit/request');
-var authOauthDevice = require('@octokit/auth-oauth-device');
-var oauthMethods = require('@octokit/oauth-methods');
-var btoa = _interopDefault(require('btoa-lite'));
-
-const VERSION = "2.0.4";
-
-// @ts-nocheck there is only place for one of us in this file. And it's not you, TS
-async function getAuthentication(state) {
- // handle code exchange form OAuth Web Flow
- if ("code" in state.strategyOptions) {
- const {
- authentication
- } = await oauthMethods.exchangeWebFlowCode({
- clientId: state.clientId,
- clientSecret: state.clientSecret,
- clientType: state.clientType,
- ...state.strategyOptions,
- request: state.request
- });
- return {
- type: "token",
- tokenType: "oauth",
- ...authentication
- };
- } // handle OAuth device flow
-
-
- if ("onVerification" in state.strategyOptions) {
- const deviceAuth = authOauthDevice.createOAuthDeviceAuth({
- clientType: state.clientType,
- clientId: state.clientId,
- ...state.strategyOptions,
- request: state.request
- });
- const authentication = await deviceAuth({
- type: "oauth"
- });
- return {
- clientSecret: state.clientSecret,
- ...authentication
- };
- } // use existing authentication
-
-
- if ("token" in state.strategyOptions) {
- return {
- type: "token",
- tokenType: "oauth",
- clientId: state.clientId,
- clientSecret: state.clientSecret,
- clientType: state.clientType,
- ...state.strategyOptions
- };
- }
-
- throw new Error("[@octokit/auth-oauth-user] Invalid strategy options");
-}
-
-async function auth(state, options = {}) {
- if (!state.authentication) {
- // This is what TS makes us do ¯\_(ツ)_/¯
- state.authentication = state.clientType === "oauth-app" ? await getAuthentication(state) : await getAuthentication(state);
- }
-
- if (state.authentication.invalid) {
- throw new Error("[@octokit/auth-oauth-user] Token is invalid");
- }
-
- const currentAuthentication = state.authentication; // (auto) refresh for user-to-server tokens
-
- if ("expiresAt" in currentAuthentication) {
- if (options.type === "refresh" || new Date(currentAuthentication.expiresAt) < new Date()) {
- const {
- authentication
- } = await oauthMethods.refreshToken({
- clientType: "github-app",
- clientId: state.clientId,
- clientSecret: state.clientSecret,
- refreshToken: currentAuthentication.refreshToken,
- request: state.request
- });
- state.authentication = {
- tokenType: "oauth",
- type: "token",
- ...authentication
- };
- }
- } // throw error for invalid refresh call
-
-
- if (options.type === "refresh") {
- if (state.clientType === "oauth-app") {
- throw new Error("[@octokit/auth-oauth-user] OAuth Apps do not support expiring tokens");
- }
-
- if (!currentAuthentication.hasOwnProperty("expiresAt")) {
- throw new Error("[@octokit/auth-oauth-user] Refresh token missing");
- }
- } // check or reset token
-
-
- if (options.type === "check" || options.type === "reset") {
- const method = options.type === "check" ? oauthMethods.checkToken : oauthMethods.resetToken;
-
- try {
- const {
- authentication
- } = await method({
- // @ts-expect-error making TS happy would require unnecessary code so no
- clientType: state.clientType,
- clientId: state.clientId,
- clientSecret: state.clientSecret,
- token: state.authentication.token,
- request: state.request
- });
- state.authentication = {
- tokenType: "oauth",
- type: "token",
- // @ts-expect-error TBD
- ...authentication
- };
- return state.authentication;
- } catch (error) {
- // istanbul ignore else
- if (error.status === 404) {
- error.message = "[@octokit/auth-oauth-user] Token is invalid"; // @ts-expect-error TBD
-
- state.authentication.invalid = true;
- }
-
- throw error;
- }
- } // invalidate
-
-
- if (options.type === "delete" || options.type === "deleteAuthorization") {
- const method = options.type === "delete" ? oauthMethods.deleteToken : oauthMethods.deleteAuthorization;
-
- try {
- await method({
- // @ts-expect-error making TS happy would require unnecessary code so no
- clientType: state.clientType,
- clientId: state.clientId,
- clientSecret: state.clientSecret,
- token: state.authentication.token,
- request: state.request
- });
- } catch (error) {
- // istanbul ignore if
- if (error.status !== 404) throw error;
- }
-
- state.authentication.invalid = true;
- return state.authentication;
- }
-
- return state.authentication;
-}
-
-/**
- * The following endpoints require an OAuth App to authenticate using its client_id and client_secret.
- *
- * - [`POST /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#check-a-token) - Check a token
- * - [`PATCH /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#reset-a-token) - Reset a token
- * - [`POST /applications/{client_id}/token/scoped`](https://docs.github.com/en/rest/reference/apps#create-a-scoped-access-token) - Create a scoped access token
- * - [`DELETE /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#delete-an-app-token) - Delete an app token
- * - [`DELETE /applications/{client_id}/grant`](https://docs.github.com/en/rest/reference/apps#delete-an-app-authorization) - Delete an app authorization
- *
- * deprecated:
- *
- * - [`GET /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#check-an-authorization) - Check an authorization
- * - [`POST /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#reset-an-authorization) - Reset an authorization
- * - [`DELETE /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-an-authorization-for-an-application) - Revoke an authorization for an application
- * - [`DELETE /applications/{client_id}/grants/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-a-grant-for-an-application) - Revoke a grant for an application
- */
-const ROUTES_REQUIRING_BASIC_AUTH = /\/applications\/[^/]+\/(token|grant)s?/;
-function requiresBasicAuth(url) {
- return url && ROUTES_REQUIRING_BASIC_AUTH.test(url);
-}
-
-async function hook(state, request, route, parameters = {}) {
- const endpoint = request.endpoint.merge(route, parameters); // Do not intercept OAuth Web/Device flow request
-
- if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) {
- return request(endpoint);
- }
-
- if (requiresBasicAuth(endpoint.url)) {
- const credentials = btoa(`${state.clientId}:${state.clientSecret}`);
- endpoint.headers.authorization = `basic ${credentials}`;
- return request(endpoint);
- } // TS makes us do this ¯\_(ツ)_/¯
-
-
- const {
- token
- } = state.clientType === "oauth-app" ? await auth({ ...state,
- request
- }) : await auth({ ...state,
- request
- });
- endpoint.headers.authorization = "token " + token;
- return request(endpoint);
-}
-
-function createOAuthUserAuth({
- clientId,
- clientSecret,
- clientType = "oauth-app",
- request: request$1 = request.request.defaults({
- headers: {
- "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${universalUserAgent.getUserAgent()}`
- }
- }),
- ...strategyOptions
-}) {
- const state = Object.assign({
- clientType,
- clientId,
- clientSecret,
- strategyOptions,
- request: request$1
- }); // @ts-expect-error not worth the extra code needed to appease TS
-
- return Object.assign(auth.bind(null, state), {
- // @ts-expect-error not worth the extra code needed to appease TS
- hook: hook.bind(null, state)
- });
-}
-createOAuthUserAuth.VERSION = VERSION;
-
-exports.createOAuthUserAuth = createOAuthUserAuth;
-exports.requiresBasicAuth = requiresBasicAuth;
-//# sourceMappingURL=index.js.map
diff --git a/node_modules/@octokit/auth-oauth-user/dist-node/index.js.map b/node_modules/@octokit/auth-oauth-user/dist-node/index.js.map
deleted file mode 100644
index abf0dcb..0000000
--- a/node_modules/@octokit/auth-oauth-user/dist-node/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/get-authentication.js","../dist-src/auth.js","../dist-src/requires-basic-auth.js","../dist-src/hook.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"2.0.4\";\n","// @ts-nocheck there is only place for one of us in this file. And it's not you, TS\nimport { createOAuthDeviceAuth } from \"@octokit/auth-oauth-device\";\nimport { exchangeWebFlowCode } from \"@octokit/oauth-methods\";\nexport async function getAuthentication(state) {\n // handle code exchange form OAuth Web Flow\n if (\"code\" in state.strategyOptions) {\n const { authentication } = await exchangeWebFlowCode({\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n clientType: state.clientType,\n ...state.strategyOptions,\n request: state.request,\n });\n return {\n type: \"token\",\n tokenType: \"oauth\",\n ...authentication,\n };\n }\n // handle OAuth device flow\n if (\"onVerification\" in state.strategyOptions) {\n const deviceAuth = createOAuthDeviceAuth({\n clientType: state.clientType,\n clientId: state.clientId,\n ...state.strategyOptions,\n request: state.request,\n });\n const authentication = await deviceAuth({\n type: \"oauth\",\n });\n return {\n clientSecret: state.clientSecret,\n ...authentication,\n };\n }\n // use existing authentication\n if (\"token\" in state.strategyOptions) {\n return {\n type: \"token\",\n tokenType: \"oauth\",\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n clientType: state.clientType,\n ...state.strategyOptions,\n };\n }\n throw new Error(\"[@octokit/auth-oauth-user] Invalid strategy options\");\n}\n","import { getAuthentication } from \"./get-authentication\";\nimport { checkToken, deleteAuthorization, deleteToken, refreshToken, resetToken, } from \"@octokit/oauth-methods\";\nexport async function auth(state, options = {}) {\n if (!state.authentication) {\n // This is what TS makes us do ¯\\_(ツ)_/¯\n state.authentication =\n state.clientType === \"oauth-app\"\n ? await getAuthentication(state)\n : await getAuthentication(state);\n }\n if (state.authentication.invalid) {\n throw new Error(\"[@octokit/auth-oauth-user] Token is invalid\");\n }\n const currentAuthentication = state.authentication;\n // (auto) refresh for user-to-server tokens\n if (\"expiresAt\" in currentAuthentication) {\n if (options.type === \"refresh\" ||\n new Date(currentAuthentication.expiresAt) < new Date()) {\n const { authentication } = await refreshToken({\n clientType: \"github-app\",\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n refreshToken: currentAuthentication.refreshToken,\n request: state.request,\n });\n state.authentication = {\n tokenType: \"oauth\",\n type: \"token\",\n ...authentication,\n };\n }\n }\n // throw error for invalid refresh call\n if (options.type === \"refresh\") {\n if (state.clientType === \"oauth-app\") {\n throw new Error(\"[@octokit/auth-oauth-user] OAuth Apps do not support expiring tokens\");\n }\n if (!currentAuthentication.hasOwnProperty(\"expiresAt\")) {\n throw new Error(\"[@octokit/auth-oauth-user] Refresh token missing\");\n }\n }\n // check or reset token\n if (options.type === \"check\" || options.type === \"reset\") {\n const method = options.type === \"check\" ? checkToken : resetToken;\n try {\n const { authentication } = await method({\n // @ts-expect-error making TS happy would require unnecessary code so no\n clientType: state.clientType,\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n token: state.authentication.token,\n request: state.request,\n });\n state.authentication = {\n tokenType: \"oauth\",\n type: \"token\",\n // @ts-expect-error TBD\n ...authentication,\n };\n return state.authentication;\n }\n catch (error) {\n // istanbul ignore else\n if (error.status === 404) {\n error.message = \"[@octokit/auth-oauth-user] Token is invalid\";\n // @ts-expect-error TBD\n state.authentication.invalid = true;\n }\n throw error;\n }\n }\n // invalidate\n if (options.type === \"delete\" || options.type === \"deleteAuthorization\") {\n const method = options.type === \"delete\" ? deleteToken : deleteAuthorization;\n try {\n await method({\n // @ts-expect-error making TS happy would require unnecessary code so no\n clientType: state.clientType,\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n token: state.authentication.token,\n request: state.request,\n });\n }\n catch (error) {\n // istanbul ignore if\n if (error.status !== 404)\n throw error;\n }\n state.authentication.invalid = true;\n return state.authentication;\n }\n return state.authentication;\n}\n","/**\n * The following endpoints require an OAuth App to authenticate using its client_id and client_secret.\n *\n * - [`POST /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#check-a-token) - Check a token\n * - [`PATCH /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#reset-a-token) - Reset a token\n * - [`POST /applications/{client_id}/token/scoped`](https://docs.github.com/en/rest/reference/apps#create-a-scoped-access-token) - Create a scoped access token\n * - [`DELETE /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#delete-an-app-token) - Delete an app token\n * - [`DELETE /applications/{client_id}/grant`](https://docs.github.com/en/rest/reference/apps#delete-an-app-authorization) - Delete an app authorization\n *\n * deprecated:\n *\n * - [`GET /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#check-an-authorization) - Check an authorization\n * - [`POST /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#reset-an-authorization) - Reset an authorization\n * - [`DELETE /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-an-authorization-for-an-application) - Revoke an authorization for an application\n * - [`DELETE /applications/{client_id}/grants/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-a-grant-for-an-application) - Revoke a grant for an application\n */\nconst ROUTES_REQUIRING_BASIC_AUTH = /\\/applications\\/[^/]+\\/(token|grant)s?/;\nexport function requiresBasicAuth(url) {\n return url && ROUTES_REQUIRING_BASIC_AUTH.test(url);\n}\n","import btoa from \"btoa-lite\";\nimport { auth } from \"./auth\";\nimport { requiresBasicAuth } from \"./requires-basic-auth\";\nexport async function hook(state, request, route, parameters = {}) {\n const endpoint = request.endpoint.merge(route, parameters);\n // Do not intercept OAuth Web/Device flow request\n if (/\\/login\\/(oauth\\/access_token|device\\/code)$/.test(endpoint.url)) {\n return request(endpoint);\n }\n if (requiresBasicAuth(endpoint.url)) {\n const credentials = btoa(`${state.clientId}:${state.clientSecret}`);\n endpoint.headers.authorization = `basic ${credentials}`;\n return request(endpoint);\n }\n // TS makes us do this ¯\\_(ツ)_/¯\n const { token } = state.clientType === \"oauth-app\"\n ? await auth({ ...state, request })\n : await auth({ ...state, request });\n endpoint.headers.authorization = \"token \" + token;\n return request(endpoint);\n}\n","import { getUserAgent } from \"universal-user-agent\";\nimport { request as octokitRequest } from \"@octokit/request\";\nimport { VERSION } from \"./version\";\nimport { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nexport { requiresBasicAuth } from \"./requires-basic-auth\";\nexport function createOAuthUserAuth({ clientId, clientSecret, clientType = \"oauth-app\", request = octokitRequest.defaults({\n headers: {\n \"user-agent\": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}`,\n },\n}), ...strategyOptions }) {\n const state = Object.assign({\n clientType,\n clientId,\n clientSecret,\n strategyOptions,\n request,\n });\n // @ts-expect-error not worth the extra code needed to appease TS\n return Object.assign(auth.bind(null, state), {\n // @ts-expect-error not worth the extra code needed to appease TS\n hook: hook.bind(null, state),\n });\n}\ncreateOAuthUserAuth.VERSION = VERSION;\n"],"names":["VERSION","getAuthentication","state","strategyOptions","authentication","exchangeWebFlowCode","clientId","clientSecret","clientType","request","type","tokenType","deviceAuth","createOAuthDeviceAuth","Error","auth","options","invalid","currentAuthentication","Date","expiresAt","refreshToken","hasOwnProperty","method","checkToken","resetToken","token","error","status","message","deleteToken","deleteAuthorization","ROUTES_REQUIRING_BASIC_AUTH","requiresBasicAuth","url","test","hook","route","parameters","endpoint","merge","credentials","btoa","headers","authorization","createOAuthUserAuth","octokitRequest","defaults","getUserAgent","Object","assign","bind"],"mappings":";;;;;;;;;;;;AAAO,MAAMA,OAAO,GAAG,mBAAhB;;ACAP;AACA,AAEO,eAAeC,iBAAf,CAAiCC,KAAjC,EAAwC;;EAE3C,IAAI,UAAUA,KAAK,CAACC,eAApB,EAAqC;IACjC,MAAM;MAAEC;QAAmB,MAAMC,gCAAmB,CAAC;MACj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AT,CAA6B;EAAEvC,QAAF;EAAYC,YAAZ;EAA0BC,UAAU,GAAG,WAAvC;WAAoDC,SAAO,GAAGqC,eAAc,CAACC,QAAf,CAAwB;IACtHJ,OAAO,EAAE;MACL,cAAe,6BAA4B3C,OAAQ,IAAGgD,+BAAY,EAAG;;GAFqB,CAA9D;EAIhC,GAAG7C;AAJ6B,CAA7B,EAImB;EACtB,MAAMD,KAAK,GAAG+C,MAAM,CAACC,MAAP,CAAc;IACxB1C,UADwB;IAExBF,QAFwB;IAGxBC,YAHwB;IAIxBJ,eAJwB;aAKxBM;GALU,CAAd,CADsB;;EAStB,OAAOwC,MAAM,CAACC,MAAP,CAAcnC,IAAI,CAACoC,IAAL,CAAU,IAAV,EAAgBjD,KAAhB,CAAd,EAAsC;;IAEzCkC,IAAI,EAAEA,IAAI,CAACe,IAAL,CAAU,IAAV,EAAgBjD,KAAhB;GAFH,CAAP;AAIH;AACD2C,mBAAmB,CAAC7C,OAApB,GAA8BA,OAA9B;;;;;"}
\ No newline at end of file
diff --git a/node_modules/@octokit/auth-oauth-user/dist-src/auth.js b/node_modules/@octokit/auth-oauth-user/dist-src/auth.js
deleted file mode 100644
index 07e42da..0000000
--- a/node_modules/@octokit/auth-oauth-user/dist-src/auth.js
+++ /dev/null
@@ -1,94 +0,0 @@
-import { getAuthentication } from "./get-authentication";
-import { checkToken, deleteAuthorization, deleteToken, refreshToken, resetToken, } from "@octokit/oauth-methods";
-export async function auth(state, options = {}) {
- if (!state.authentication) {
- // This is what TS makes us do ¯\_(ツ)_/¯
- state.authentication =
- state.clientType === "oauth-app"
- ? await getAuthentication(state)
- : await getAuthentication(state);
- }
- if (state.authentication.invalid) {
- throw new Error("[@octokit/auth-oauth-user] Token is invalid");
- }
- const currentAuthentication = state.authentication;
- // (auto) refresh for user-to-server tokens
- if ("expiresAt" in currentAuthentication) {
- if (options.type === "refresh" ||
- new Date(currentAuthentication.expiresAt) < new Date()) {
- const { authentication } = await refreshToken({
- clientType: "github-app",
- clientId: state.clientId,
- clientSecret: state.clientSecret,
- refreshToken: currentAuthentication.refreshToken,
- request: state.request,
- });
- state.authentication = {
- tokenType: "oauth",
- type: "token",
- ...authentication,
- };
- }
- }
- // throw error for invalid refresh call
- if (options.type === "refresh") {
- if (state.clientType === "oauth-app") {
- throw new Error("[@octokit/auth-oauth-user] OAuth Apps do not support expiring tokens");
- }
- if (!currentAuthentication.hasOwnProperty("expiresAt")) {
- throw new Error("[@octokit/auth-oauth-user] Refresh token missing");
- }
- }
- // check or reset token
- if (options.type === "check" || options.type === "reset") {
- const method = options.type === "check" ? checkToken : resetToken;
- try {
- const { authentication } = await method({
- // @ts-expect-error making TS happy would require unnecessary code so no
- clientType: state.clientType,
- clientId: state.clientId,
- clientSecret: state.clientSecret,
- token: state.authentication.token,
- request: state.request,
- });
- state.authentication = {
- tokenType: "oauth",
- type: "token",
- // @ts-expect-error TBD
- ...authentication,
- };
- return state.authentication;
- }
- catch (error) {
- // istanbul ignore else
- if (error.status === 404) {
- error.message = "[@octokit/auth-oauth-user] Token is invalid";
- // @ts-expect-error TBD
- state.authentication.invalid = true;
- }
- throw error;
- }
- }
- // invalidate
- if (options.type === "delete" || options.type === "deleteAuthorization") {
- const method = options.type === "delete" ? deleteToken : deleteAuthorization;
- try {
- await method({
- // @ts-expect-error making TS happy would require unnecessary code so no
- clientType: state.clientType,
- clientId: state.clientId,
- clientSecret: state.clientSecret,
- token: state.authentication.token,
- request: state.request,
- });
- }
- catch (error) {
- // istanbul ignore if
- if (error.status !== 404)
- throw error;
- }
- state.authentication.invalid = true;
- return state.authentication;
- }
- return state.authentication;
-}
diff --git a/node_modules/@octokit/auth-oauth-user/dist-src/get-authentication.js b/node_modules/@octokit/auth-oauth-user/dist-src/get-authentication.js
deleted file mode 100644
index 6b08d77..0000000
--- a/node_modules/@octokit/auth-oauth-user/dist-src/get-authentication.js
+++ /dev/null
@@ -1,48 +0,0 @@
-// @ts-nocheck there is only place for one of us in this file. And it's not you, TS
-import { createOAuthDeviceAuth } from "@octokit/auth-oauth-device";
-import { exchangeWebFlowCode } from "@octokit/oauth-methods";
-export async function getAuthentication(state) {
- // handle code exchange form OAuth Web Flow
- if ("code" in state.strategyOptions) {
- const { authentication } = await exchangeWebFlowCode({
- clientId: state.clientId,
- clientSecret: state.clientSecret,
- clientType: state.clientType,
- ...state.strategyOptions,
- request: state.request,
- });
- return {
- type: "token",
- tokenType: "oauth",
- ...authentication,
- };
- }
- // handle OAuth device flow
- if ("onVerification" in state.strategyOptions) {
- const deviceAuth = createOAuthDeviceAuth({
- clientType: state.clientType,
- clientId: state.clientId,
- ...state.strategyOptions,
- request: state.request,
- });
- const authentication = await deviceAuth({
- type: "oauth",
- });
- return {
- clientSecret: state.clientSecret,
- ...authentication,
- };
- }
- // use existing authentication
- if ("token" in state.strategyOptions) {
- return {
- type: "token",
- tokenType: "oauth",
- clientId: state.clientId,
- clientSecret: state.clientSecret,
- clientType: state.clientType,
- ...state.strategyOptions,
- };
- }
- throw new Error("[@octokit/auth-oauth-user] Invalid strategy options");
-}
diff --git a/node_modules/@octokit/auth-oauth-user/dist-src/hook.js b/node_modules/@octokit/auth-oauth-user/dist-src/hook.js
deleted file mode 100644
index 8977ac4..0000000
--- a/node_modules/@octokit/auth-oauth-user/dist-src/hook.js
+++ /dev/null
@@ -1,21 +0,0 @@
-import btoa from "btoa-lite";
-import { auth } from "./auth";
-import { requiresBasicAuth } from "./requires-basic-auth";
-export async function hook(state, request, route, parameters = {}) {
- const endpoint = request.endpoint.merge(route, parameters);
- // Do not intercept OAuth Web/Device flow request
- if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) {
- return request(endpoint);
- }
- if (requiresBasicAuth(endpoint.url)) {
- const credentials = btoa(`${state.clientId}:${state.clientSecret}`);
- endpoint.headers.authorization = `basic ${credentials}`;
- return request(endpoint);
- }
- // TS makes us do this ¯\_(ツ)_/¯
- const { token } = state.clientType === "oauth-app"
- ? await auth({ ...state, request })
- : await auth({ ...state, request });
- endpoint.headers.authorization = "token " + token;
- return request(endpoint);
-}
diff --git a/node_modules/@octokit/auth-oauth-user/dist-src/index.js b/node_modules/@octokit/auth-oauth-user/dist-src/index.js
deleted file mode 100644
index 4c205f1..0000000
--- a/node_modules/@octokit/auth-oauth-user/dist-src/index.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { getUserAgent } from "universal-user-agent";
-import { request as octokitRequest } from "@octokit/request";
-import { VERSION } from "./version";
-import { auth } from "./auth";
-import { hook } from "./hook";
-export { requiresBasicAuth } from "./requires-basic-auth";
-export function createOAuthUserAuth({ clientId, clientSecret, clientType = "oauth-app", request = octokitRequest.defaults({
- headers: {
- "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}`,
- },
-}), ...strategyOptions }) {
- const state = Object.assign({
- clientType,
- clientId,
- clientSecret,
- strategyOptions,
- request,
- });
- // @ts-expect-error not worth the extra code needed to appease TS
- return Object.assign(auth.bind(null, state), {
- // @ts-expect-error not worth the extra code needed to appease TS
- hook: hook.bind(null, state),
- });
-}
-createOAuthUserAuth.VERSION = VERSION;
diff --git a/node_modules/@octokit/auth-oauth-user/dist-src/requires-basic-auth.js b/node_modules/@octokit/auth-oauth-user/dist-src/requires-basic-auth.js
deleted file mode 100644
index d10f02c..0000000
--- a/node_modules/@octokit/auth-oauth-user/dist-src/requires-basic-auth.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/**
- * The following endpoints require an OAuth App to authenticate using its client_id and client_secret.
- *
- * - [`POST /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#check-a-token) - Check a token
- * - [`PATCH /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#reset-a-token) - Reset a token
- * - [`POST /applications/{client_id}/token/scoped`](https://docs.github.com/en/rest/reference/apps#create-a-scoped-access-token) - Create a scoped access token
- * - [`DELETE /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#delete-an-app-token) - Delete an app token
- * - [`DELETE /applications/{client_id}/grant`](https://docs.github.com/en/rest/reference/apps#delete-an-app-authorization) - Delete an app authorization
- *
- * deprecated:
- *
- * - [`GET /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#check-an-authorization) - Check an authorization
- * - [`POST /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#reset-an-authorization) - Reset an authorization
- * - [`DELETE /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-an-authorization-for-an-application) - Revoke an authorization for an application
- * - [`DELETE /applications/{client_id}/grants/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-a-grant-for-an-application) - Revoke a grant for an application
- */
-const ROUTES_REQUIRING_BASIC_AUTH = /\/applications\/[^/]+\/(token|grant)s?/;
-export function requiresBasicAuth(url) {
- return url && ROUTES_REQUIRING_BASIC_AUTH.test(url);
-}
diff --git a/node_modules/@octokit/auth-oauth-user/dist-src/types.js b/node_modules/@octokit/auth-oauth-user/dist-src/types.js
deleted file mode 100644
index cb0ff5c..0000000
--- a/node_modules/@octokit/auth-oauth-user/dist-src/types.js
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/node_modules/@octokit/auth-oauth-user/dist-src/version.js b/node_modules/@octokit/auth-oauth-user/dist-src/version.js
deleted file mode 100644
index 37f4545..0000000
--- a/node_modules/@octokit/auth-oauth-user/dist-src/version.js
+++ /dev/null
@@ -1 +0,0 @@
-export const VERSION = "2.0.4";
diff --git a/node_modules/@octokit/auth-oauth-user/dist-types/auth.d.ts b/node_modules/@octokit/auth-oauth-user/dist-types/auth.d.ts
deleted file mode 100644
index d85f08b..0000000
--- a/node_modules/@octokit/auth-oauth-user/dist-types/auth.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { OAuthAppAuthOptions, GitHubAppAuthOptions, OAuthAppAuthentication, GitHubAppAuthentication, GitHubAppAuthenticationWithExpiration, OAuthAppState, GitHubAppState } from "./types";
-export declare function auth(state: OAuthAppState, options?: OAuthAppAuthOptions): Promise;
-export declare function auth(state: GitHubAppState, options?: GitHubAppAuthOptions): Promise;
diff --git a/node_modules/@octokit/auth-oauth-user/dist-types/get-authentication.d.ts b/node_modules/@octokit/auth-oauth-user/dist-types/get-authentication.d.ts
deleted file mode 100644
index 359accb..0000000
--- a/node_modules/@octokit/auth-oauth-user/dist-types/get-authentication.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { OAuthAppState, GitHubAppState, OAuthAppAuthentication, GitHubAppAuthentication, GitHubAppAuthenticationWithExpiration } from "./types";
-export declare function getAuthentication(state: OAuthAppState): Promise;
-export declare function getAuthentication(state: GitHubAppState): Promise;
diff --git a/node_modules/@octokit/auth-oauth-user/dist-types/hook.d.ts b/node_modules/@octokit/auth-oauth-user/dist-types/hook.d.ts
deleted file mode 100644
index c3395d6..0000000
--- a/node_modules/@octokit/auth-oauth-user/dist-types/hook.d.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import { EndpointOptions, OctokitResponse, RequestInterface, RequestParameters, Route } from "@octokit/types";
-import { OAuthAppState, GitHubAppState } from "./types";
-declare type AnyResponse = OctokitResponse;
-export declare function hook(state: OAuthAppState, request: RequestInterface, route: Route | EndpointOptions, parameters: RequestParameters): Promise;
-export declare function hook(state: GitHubAppState, request: RequestInterface, route: Route | EndpointOptions, parameters: RequestParameters): Promise;
-export {};
diff --git a/node_modules/@octokit/auth-oauth-user/dist-types/index.d.ts b/node_modules/@octokit/auth-oauth-user/dist-types/index.d.ts
deleted file mode 100644
index 59d69f4..0000000
--- a/node_modules/@octokit/auth-oauth-user/dist-types/index.d.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { OAuthAppStrategyOptions, GitHubAppStrategyOptions, OAuthAppAuthInterface, GitHubAppAuthInterface } from "./types";
-export { OAuthAppStrategyOptionsWebFlow, GitHubAppStrategyOptionsWebFlow, OAuthAppStrategyOptionsDeviceFlow, GitHubAppStrategyOptionsDeviceFlow, OAuthAppStrategyOptionsExistingAuthentication, GitHubAppStrategyOptionsExistingAuthentication, GitHubAppStrategyOptionsExistingAuthenticationWithExpiration, OAuthAppStrategyOptions, GitHubAppStrategyOptions, OAuthAppAuthOptions, GitHubAppAuthOptions, OAuthAppAuthentication, GitHubAppAuthentication, GitHubAppAuthenticationWithExpiration, } from "./types";
-export { requiresBasicAuth } from "./requires-basic-auth";
-export declare function createOAuthUserAuth(options: OAuthAppStrategyOptions): OAuthAppAuthInterface;
-export declare function createOAuthUserAuth(options: GitHubAppStrategyOptions): GitHubAppAuthInterface;
-export declare namespace createOAuthUserAuth {
- var VERSION: string;
-}
diff --git a/node_modules/@octokit/auth-oauth-user/dist-types/requires-basic-auth.d.ts b/node_modules/@octokit/auth-oauth-user/dist-types/requires-basic-auth.d.ts
deleted file mode 100644
index c7a90ea..0000000
--- a/node_modules/@octokit/auth-oauth-user/dist-types/requires-basic-auth.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export declare function requiresBasicAuth(url: string | undefined): boolean | "" | undefined;
diff --git a/node_modules/@octokit/auth-oauth-user/dist-types/types.d.ts b/node_modules/@octokit/auth-oauth-user/dist-types/types.d.ts
deleted file mode 100644
index d619abd..0000000
--- a/node_modules/@octokit/auth-oauth-user/dist-types/types.d.ts
+++ /dev/null
@@ -1,110 +0,0 @@
-import * as OctokitTypes from "@octokit/types";
-import * as DeviceTypes from "@octokit/auth-oauth-device";
-import * as OAuthMethodsTypes from "@octokit/oauth-methods";
-export declare type ClientType = "oauth-app" | "github-app";
-export declare type WebFlowOptions = {
- code: string;
- state?: string;
- redirectUrl?: string;
-};
-declare type CommonOAuthAppStrategyOptions = {
- clientType?: "oauth-app";
- clientId: string;
- clientSecret: string;
- request?: OctokitTypes.RequestInterface;
-};
-declare type CommonGitHubAppStrategyOptions = {
- clientType?: "github-app";
- clientId: string;
- clientSecret: string;
- request?: OctokitTypes.RequestInterface;
-};
-declare type OAuthAppDeviceFlowOptions = {
- onVerification: DeviceTypes.OAuthAppStrategyOptions["onVerification"];
- scopes?: string[];
-};
-declare type GitHubDeviceFlowOptions = {
- onVerification: DeviceTypes.OAuthAppStrategyOptions["onVerification"];
-};
-declare type ExistingOAuthAppAuthenticationOptions = {
- clientType: "oauth-app";
- token: string;
- scopes: string[];
-};
-declare type ExistingGitHubAppAuthenticationOptions = {
- token: string;
-};
-declare type ExistingGitHubAppAuthenticationWithExpirationOptions = {
- token: string;
- refreshToken: string;
- expiresAt: string;
- refreshTokenExpiresAt: string;
-};
-export declare type OAuthAppStrategyOptionsWebFlow = CommonOAuthAppStrategyOptions & WebFlowOptions;
-export declare type GitHubAppStrategyOptionsWebFlow = CommonGitHubAppStrategyOptions & WebFlowOptions;
-export declare type OAuthAppStrategyOptionsDeviceFlow = CommonOAuthAppStrategyOptions & OAuthAppDeviceFlowOptions;
-export declare type GitHubAppStrategyOptionsDeviceFlow = CommonGitHubAppStrategyOptions & GitHubDeviceFlowOptions;
-export declare type OAuthAppStrategyOptionsExistingAuthentication = CommonOAuthAppStrategyOptions & ExistingOAuthAppAuthenticationOptions;
-export declare type GitHubAppStrategyOptionsExistingAuthentication = CommonGitHubAppStrategyOptions & ExistingGitHubAppAuthenticationOptions;
-export declare type GitHubAppStrategyOptionsExistingAuthenticationWithExpiration = CommonGitHubAppStrategyOptions & ExistingGitHubAppAuthenticationWithExpirationOptions;
-export declare type OAuthAppStrategyOptions = OAuthAppStrategyOptionsWebFlow | OAuthAppStrategyOptionsDeviceFlow | OAuthAppStrategyOptionsExistingAuthentication;
-export declare type GitHubAppStrategyOptions = GitHubAppStrategyOptionsWebFlow | GitHubAppStrategyOptionsDeviceFlow | GitHubAppStrategyOptionsExistingAuthentication | GitHubAppStrategyOptionsExistingAuthenticationWithExpiration;
-export declare type OAuthAppAuthentication = {
- tokenType: "oauth";
- type: "token";
-} & OAuthMethodsTypes.OAuthAppAuthentication;
-export declare type GitHubAppAuthentication = {
- tokenType: "oauth";
- type: "token";
-} & OAuthMethodsTypes.GitHubAppAuthentication;
-export declare type GitHubAppAuthenticationWithExpiration = {
- tokenType: "oauth";
- type: "token";
-} & OAuthMethodsTypes.GitHubAppAuthenticationWithExpiration;
-export interface OAuthAppAuthInterface {
- (options?: OAuthAppAuthOptions): Promise;
- hook(request: OctokitTypes.RequestInterface, route: OctokitTypes.Route | OctokitTypes.EndpointOptions, parameters?: OctokitTypes.RequestParameters): Promise>;
-}
-export interface GitHubAppAuthInterface {
- (options?: GitHubAppAuthOptions): Promise;
- hook(request: OctokitTypes.RequestInterface, route: OctokitTypes.Route | OctokitTypes.EndpointOptions, parameters?: OctokitTypes.RequestParameters): Promise>;
-}
-export declare type OAuthAppState = {
- clientId: string;
- clientSecret: string;
- clientType: "oauth-app";
- request: OctokitTypes.RequestInterface;
- strategyOptions: WebFlowOptions | OAuthAppDeviceFlowOptions | ExistingOAuthAppAuthenticationOptions;
- authentication?: OAuthAppAuthentication & {
- invalid?: true;
- };
-};
-declare type GitHubAppStateAuthentication = GitHubAppAuthentication & {
- invalid?: true;
-};
-declare type GitHubAppStateAuthenticationWIthExpiration = GitHubAppAuthenticationWithExpiration & {
- invalid?: true;
-};
-export declare type GitHubAppState = {
- clientId: string;
- clientSecret: string;
- clientType: "github-app";
- request: OctokitTypes.RequestInterface;
- strategyOptions: WebFlowOptions | GitHubDeviceFlowOptions | ExistingGitHubAppAuthenticationOptions | ExistingGitHubAppAuthenticationWithExpirationOptions;
- authentication?: GitHubAppStateAuthentication | GitHubAppStateAuthenticationWIthExpiration;
-};
-export declare type State = OAuthAppState | GitHubAppState;
-export declare type WebFlowState = {
- clientId: string;
- clientSecret: string;
- clientType: ClientType;
- request: OctokitTypes.RequestInterface;
- strategyOptions: WebFlowOptions;
-};
-export declare type OAuthAppAuthOptions = {
- type?: "get" | "check" | "reset" | "delete" | "deleteAuthorization";
-};
-export declare type GitHubAppAuthOptions = {
- type?: "get" | "check" | "reset" | "refresh" | "delete" | "deleteAuthorization";
-};
-export {};
diff --git a/node_modules/@octokit/auth-oauth-user/dist-types/version.d.ts b/node_modules/@octokit/auth-oauth-user/dist-types/version.d.ts
deleted file mode 100644
index 3ffcc39..0000000
--- a/node_modules/@octokit/auth-oauth-user/dist-types/version.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export declare const VERSION = "2.0.4";
diff --git a/node_modules/@octokit/auth-oauth-user/dist-web/index.js b/node_modules/@octokit/auth-oauth-user/dist-web/index.js
deleted file mode 100644
index 6a1ef0b..0000000
--- a/node_modules/@octokit/auth-oauth-user/dist-web/index.js
+++ /dev/null
@@ -1,210 +0,0 @@
-import { getUserAgent } from 'universal-user-agent';
-import { request } from '@octokit/request';
-import { createOAuthDeviceAuth } from '@octokit/auth-oauth-device';
-import { exchangeWebFlowCode, refreshToken, checkToken, resetToken, deleteToken, deleteAuthorization } from '@octokit/oauth-methods';
-import btoa from 'btoa-lite';
-
-const VERSION = "2.0.4";
-
-// @ts-nocheck there is only place for one of us in this file. And it's not you, TS
-async function getAuthentication(state) {
- // handle code exchange form OAuth Web Flow
- if ("code" in state.strategyOptions) {
- const { authentication } = await exchangeWebFlowCode({
- clientId: state.clientId,
- clientSecret: state.clientSecret,
- clientType: state.clientType,
- ...state.strategyOptions,
- request: state.request,
- });
- return {
- type: "token",
- tokenType: "oauth",
- ...authentication,
- };
- }
- // handle OAuth device flow
- if ("onVerification" in state.strategyOptions) {
- const deviceAuth = createOAuthDeviceAuth({
- clientType: state.clientType,
- clientId: state.clientId,
- ...state.strategyOptions,
- request: state.request,
- });
- const authentication = await deviceAuth({
- type: "oauth",
- });
- return {
- clientSecret: state.clientSecret,
- ...authentication,
- };
- }
- // use existing authentication
- if ("token" in state.strategyOptions) {
- return {
- type: "token",
- tokenType: "oauth",
- clientId: state.clientId,
- clientSecret: state.clientSecret,
- clientType: state.clientType,
- ...state.strategyOptions,
- };
- }
- throw new Error("[@octokit/auth-oauth-user] Invalid strategy options");
-}
-
-async function auth(state, options = {}) {
- if (!state.authentication) {
- // This is what TS makes us do ¯\_(ツ)_/¯
- state.authentication =
- state.clientType === "oauth-app"
- ? await getAuthentication(state)
- : await getAuthentication(state);
- }
- if (state.authentication.invalid) {
- throw new Error("[@octokit/auth-oauth-user] Token is invalid");
- }
- const currentAuthentication = state.authentication;
- // (auto) refresh for user-to-server tokens
- if ("expiresAt" in currentAuthentication) {
- if (options.type === "refresh" ||
- new Date(currentAuthentication.expiresAt) < new Date()) {
- const { authentication } = await refreshToken({
- clientType: "github-app",
- clientId: state.clientId,
- clientSecret: state.clientSecret,
- refreshToken: currentAuthentication.refreshToken,
- request: state.request,
- });
- state.authentication = {
- tokenType: "oauth",
- type: "token",
- ...authentication,
- };
- }
- }
- // throw error for invalid refresh call
- if (options.type === "refresh") {
- if (state.clientType === "oauth-app") {
- throw new Error("[@octokit/auth-oauth-user] OAuth Apps do not support expiring tokens");
- }
- if (!currentAuthentication.hasOwnProperty("expiresAt")) {
- throw new Error("[@octokit/auth-oauth-user] Refresh token missing");
- }
- }
- // check or reset token
- if (options.type === "check" || options.type === "reset") {
- const method = options.type === "check" ? checkToken : resetToken;
- try {
- const { authentication } = await method({
- // @ts-expect-error making TS happy would require unnecessary code so no
- clientType: state.clientType,
- clientId: state.clientId,
- clientSecret: state.clientSecret,
- token: state.authentication.token,
- request: state.request,
- });
- state.authentication = {
- tokenType: "oauth",
- type: "token",
- // @ts-expect-error TBD
- ...authentication,
- };
- return state.authentication;
- }
- catch (error) {
- // istanbul ignore else
- if (error.status === 404) {
- error.message = "[@octokit/auth-oauth-user] Token is invalid";
- // @ts-expect-error TBD
- state.authentication.invalid = true;
- }
- throw error;
- }
- }
- // invalidate
- if (options.type === "delete" || options.type === "deleteAuthorization") {
- const method = options.type === "delete" ? deleteToken : deleteAuthorization;
- try {
- await method({
- // @ts-expect-error making TS happy would require unnecessary code so no
- clientType: state.clientType,
- clientId: state.clientId,
- clientSecret: state.clientSecret,
- token: state.authentication.token,
- request: state.request,
- });
- }
- catch (error) {
- // istanbul ignore if
- if (error.status !== 404)
- throw error;
- }
- state.authentication.invalid = true;
- return state.authentication;
- }
- return state.authentication;
-}
-
-/**
- * The following endpoints require an OAuth App to authenticate using its client_id and client_secret.
- *
- * - [`POST /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#check-a-token) - Check a token
- * - [`PATCH /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#reset-a-token) - Reset a token
- * - [`POST /applications/{client_id}/token/scoped`](https://docs.github.com/en/rest/reference/apps#create-a-scoped-access-token) - Create a scoped access token
- * - [`DELETE /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#delete-an-app-token) - Delete an app token
- * - [`DELETE /applications/{client_id}/grant`](https://docs.github.com/en/rest/reference/apps#delete-an-app-authorization) - Delete an app authorization
- *
- * deprecated:
- *
- * - [`GET /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#check-an-authorization) - Check an authorization
- * - [`POST /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#reset-an-authorization) - Reset an authorization
- * - [`DELETE /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-an-authorization-for-an-application) - Revoke an authorization for an application
- * - [`DELETE /applications/{client_id}/grants/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-a-grant-for-an-application) - Revoke a grant for an application
- */
-const ROUTES_REQUIRING_BASIC_AUTH = /\/applications\/[^/]+\/(token|grant)s?/;
-function requiresBasicAuth(url) {
- return url && ROUTES_REQUIRING_BASIC_AUTH.test(url);
-}
-
-async function hook(state, request, route, parameters = {}) {
- const endpoint = request.endpoint.merge(route, parameters);
- // Do not intercept OAuth Web/Device flow request
- if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) {
- return request(endpoint);
- }
- if (requiresBasicAuth(endpoint.url)) {
- const credentials = btoa(`${state.clientId}:${state.clientSecret}`);
- endpoint.headers.authorization = `basic ${credentials}`;
- return request(endpoint);
- }
- // TS makes us do this ¯\_(ツ)_/¯
- const { token } = state.clientType === "oauth-app"
- ? await auth({ ...state, request })
- : await auth({ ...state, request });
- endpoint.headers.authorization = "token " + token;
- return request(endpoint);
-}
-
-function createOAuthUserAuth({ clientId, clientSecret, clientType = "oauth-app", request: request$1 = request.defaults({
- headers: {
- "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}`,
- },
-}), ...strategyOptions }) {
- const state = Object.assign({
- clientType,
- clientId,
- clientSecret,
- strategyOptions,
- request: request$1,
- });
- // @ts-expect-error not worth the extra code needed to appease TS
- return Object.assign(auth.bind(null, state), {
- // @ts-expect-error not worth the extra code needed to appease TS
- hook: hook.bind(null, state),
- });
-}
-createOAuthUserAuth.VERSION = VERSION;
-
-export { createOAuthUserAuth, requiresBasicAuth };
-//# sourceMappingURL=index.js.map
diff --git a/node_modules/@octokit/auth-oauth-user/dist-web/index.js.map b/node_modules/@octokit/auth-oauth-user/dist-web/index.js.map
deleted file mode 100644
index 8daeada..0000000
--- a/node_modules/@octokit/auth-oauth-user/dist-web/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/get-authentication.js","../dist-src/auth.js","../dist-src/requires-basic-auth.js","../dist-src/hook.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"2.0.4\";\n","// @ts-nocheck there is only place for one of us in this file. And it's not you, TS\nimport { createOAuthDeviceAuth } from \"@octokit/auth-oauth-device\";\nimport { exchangeWebFlowCode } from \"@octokit/oauth-methods\";\nexport async function getAuthentication(state) {\n // handle code exchange form OAuth Web Flow\n if (\"code\" in state.strategyOptions) {\n const { authentication } = await exchangeWebFlowCode({\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n clientType: state.clientType,\n ...state.strategyOptions,\n request: state.request,\n });\n return {\n type: \"token\",\n tokenType: \"oauth\",\n ...authentication,\n };\n }\n // handle OAuth device flow\n if (\"onVerification\" in state.strategyOptions) {\n const deviceAuth = createOAuthDeviceAuth({\n clientType: state.clientType,\n clientId: state.clientId,\n ...state.strategyOptions,\n request: state.request,\n });\n const authentication = await deviceAuth({\n type: \"oauth\",\n });\n return {\n clientSecret: state.clientSecret,\n ...authentication,\n };\n }\n // use existing authentication\n if (\"token\" in state.strategyOptions) {\n return {\n type: \"token\",\n tokenType: \"oauth\",\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n clientType: state.clientType,\n ...state.strategyOptions,\n };\n }\n throw new Error(\"[@octokit/auth-oauth-user] Invalid strategy options\");\n}\n","import { getAuthentication } from \"./get-authentication\";\nimport { checkToken, deleteAuthorization, deleteToken, refreshToken, resetToken, } from \"@octokit/oauth-methods\";\nexport async function auth(state, options = {}) {\n if (!state.authentication) {\n // This is what TS makes us do ¯\\_(ツ)_/¯\n state.authentication =\n state.clientType === \"oauth-app\"\n ? await getAuthentication(state)\n : await getAuthentication(state);\n }\n if (state.authentication.invalid) {\n throw new Error(\"[@octokit/auth-oauth-user] Token is invalid\");\n }\n const currentAuthentication = state.authentication;\n // (auto) refresh for user-to-server tokens\n if (\"expiresAt\" in currentAuthentication) {\n if (options.type === \"refresh\" ||\n new Date(currentAuthentication.expiresAt) < new Date()) {\n const { authentication } = await refreshToken({\n clientType: \"github-app\",\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n refreshToken: currentAuthentication.refreshToken,\n request: state.request,\n });\n state.authentication = {\n tokenType: \"oauth\",\n type: \"token\",\n ...authentication,\n };\n }\n }\n // throw error for invalid refresh call\n if (options.type === \"refresh\") {\n if (state.clientType === \"oauth-app\") {\n throw new Error(\"[@octokit/auth-oauth-user] OAuth Apps do not support expiring tokens\");\n }\n if (!currentAuthentication.hasOwnProperty(\"expiresAt\")) {\n throw new Error(\"[@octokit/auth-oauth-user] Refresh token missing\");\n }\n }\n // check or reset token\n if (options.type === \"check\" || options.type === \"reset\") {\n const method = options.type === \"check\" ? checkToken : resetToken;\n try {\n const { authentication } = await method({\n // @ts-expect-error making TS happy would require unnecessary code so no\n clientType: state.clientType,\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n token: state.authentication.token,\n request: state.request,\n });\n state.authentication = {\n tokenType: \"oauth\",\n type: \"token\",\n // @ts-expect-error TBD\n ...authentication,\n };\n return state.authentication;\n }\n catch (error) {\n // istanbul ignore else\n if (error.status === 404) {\n error.message = \"[@octokit/auth-oauth-user] Token is invalid\";\n // @ts-expect-error TBD\n state.authentication.invalid = true;\n }\n throw error;\n }\n }\n // invalidate\n if (options.type === \"delete\" || options.type === \"deleteAuthorization\") {\n const method = options.type === \"delete\" ? deleteToken : deleteAuthorization;\n try {\n await method({\n // @ts-expect-error making TS happy would require unnecessary code so no\n clientType: state.clientType,\n clientId: state.clientId,\n clientSecret: state.clientSecret,\n token: state.authentication.token,\n request: state.request,\n });\n }\n catch (error) {\n // istanbul ignore if\n if (error.status !== 404)\n throw error;\n }\n state.authentication.invalid = true;\n return state.authentication;\n }\n return state.authentication;\n}\n","/**\n * The following endpoints require an OAuth App to authenticate using its client_id and client_secret.\n *\n * - [`POST /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#check-a-token) - Check a token\n * - [`PATCH /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#reset-a-token) - Reset a token\n * - [`POST /applications/{client_id}/token/scoped`](https://docs.github.com/en/rest/reference/apps#create-a-scoped-access-token) - Create a scoped access token\n * - [`DELETE /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#delete-an-app-token) - Delete an app token\n * - [`DELETE /applications/{client_id}/grant`](https://docs.github.com/en/rest/reference/apps#delete-an-app-authorization) - Delete an app authorization\n *\n * deprecated:\n *\n * - [`GET /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#check-an-authorization) - Check an authorization\n * - [`POST /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#reset-an-authorization) - Reset an authorization\n * - [`DELETE /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-an-authorization-for-an-application) - Revoke an authorization for an application\n * - [`DELETE /applications/{client_id}/grants/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-a-grant-for-an-application) - Revoke a grant for an application\n */\nconst ROUTES_REQUIRING_BASIC_AUTH = /\\/applications\\/[^/]+\\/(token|grant)s?/;\nexport function requiresBasicAuth(url) {\n return url && ROUTES_REQUIRING_BASIC_AUTH.test(url);\n}\n","import btoa from \"btoa-lite\";\nimport { auth } from \"./auth\";\nimport { requiresBasicAuth } from \"./requires-basic-auth\";\nexport async function hook(state, request, route, parameters = {}) {\n const endpoint = request.endpoint.merge(route, parameters);\n // Do not intercept OAuth Web/Device flow request\n if (/\\/login\\/(oauth\\/access_token|device\\/code)$/.test(endpoint.url)) {\n return request(endpoint);\n }\n if (requiresBasicAuth(endpoint.url)) {\n const credentials = btoa(`${state.clientId}:${state.clientSecret}`);\n endpoint.headers.authorization = `basic ${credentials}`;\n return request(endpoint);\n }\n // TS makes us do this ¯\\_(ツ)_/¯\n const { token } = state.clientType === \"oauth-app\"\n ? await auth({ ...state, request })\n : await auth({ ...state, request });\n endpoint.headers.authorization = \"token \" + token;\n return request(endpoint);\n}\n","import { getUserAgent } from \"universal-user-agent\";\nimport { request as octokitRequest } from \"@octokit/request\";\nimport { VERSION } from \"./version\";\nimport { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nexport { requiresBasicAuth } from \"./requires-basic-auth\";\nexport function createOAuthUserAuth({ clientId, clientSecret, clientType = \"oauth-app\", request = octokitRequest.defaults({\n headers: {\n \"user-agent\": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}`,\n },\n}), ...strategyOptions }) {\n const state = Object.assign({\n clientType,\n clientId,\n clientSecret,\n strategyOptions,\n request,\n });\n // @ts-expect-error not worth the extra code needed to appease TS\n return Object.assign(auth.bind(null, state), {\n // @ts-expect-error not worth the extra code needed to appease TS\n hook: hook.bind(null, state),\n });\n}\ncreateOAuthUserAuth.VERSION = VERSION;\n"],"names":["request","octokitRequest"],"mappings":";;;;;;AAAO,MAAM,OAAO,GAAG,mBAAmB;;ACA1C;AACA,AAEO,eAAe,iBAAiB,C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O,EAAE;AACb,QAAQ,YAAY,EAAE,CAAC,0BAA0B,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;AAC9E,KAAK;AACL,CAAC,CAAC,EAAE,GAAG,eAAe,EAAE,EAAE;AAC1B,IAAI,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;AAChC,QAAQ,UAAU;AAClB,QAAQ,QAAQ;AAChB,QAAQ,YAAY;AACpB,QAAQ,eAAe;AACvB,iBAAQD,SAAO;AACf,KAAK,CAAC,CAAC;AACP;AACA,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE;AACjD;AACA,QAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC;AACpC,KAAK,CAAC,CAAC;AACP,CAAC;AACD,mBAAmB,CAAC,OAAO,GAAG,OAAO,CAAC;;;;"}
\ No newline at end of file
diff --git a/node_modules/@octokit/auth-oauth-user/package.json b/node_modules/@octokit/auth-oauth-user/package.json
deleted file mode 100644
index a62813b..0000000
--- a/node_modules/@octokit/auth-oauth-user/package.json
+++ /dev/null
@@ -1,57 +0,0 @@
-{
- "name": "@octokit/auth-oauth-user",
- "description": "Octokit authentication strategy for OAuth clients",
- "version": "2.0.4",
- "license": "MIT",
- "files": [
- "dist-*/",
- "bin/"
- ],
- "pika": true,
- "sideEffects": false,
- "keywords": [
- "github",
- "api",
- "sdk",
- "toolkit"
- ],
- "repository": "https://github.com/octokit/auth-oauth-user.js",
- "dependencies": {
- "@octokit/auth-oauth-device": "^4.0.0",
- "@octokit/oauth-methods": "^2.0.0",
- "@octokit/request": "^6.0.0",
- "@octokit/types": "^8.0.0",
- "btoa-lite": "^1.0.0",
- "universal-user-agent": "^6.0.0"
- },
- "peerDependencies": {},
- "devDependencies": {
- "@octokit/core": "^4.0.0",
- "@octokit/tsconfig": "^1.0.2",
- "@pika/pack": "^0.5.0",
- "@pika/plugin-build-node": "^0.9.2",
- "@pika/plugin-build-web": "^0.9.2",
- "@pika/plugin-ts-standard-pkg": "^0.9.2",
- "@types/btoa-lite": "^1.0.0",
- "@types/jest": "^29.0.0",
- "@types/node": "^16.0.0",
- "fetch-mock": "^9.11.0",
- "jest": "^29.0.0",
- "mockdate": "^3.0.4",
- "prettier": "2.7.1",
- "semantic-release": "^19.0.0",
- "semantic-release-plugin-update-version-in-files": "^1.1.0",
- "ts-jest": "^29.0.0",
- "typescript": "^4.2.3"
- },
- "engines": {
- "node": ">= 14"
- },
- "publishConfig": {
- "access": "public"
- },
- "source": "dist-src/index.js",
- "types": "dist-types/index.d.ts",
- "main": "dist-node/index.js",
- "module": "dist-web/index.js"
-}
diff --git a/node_modules/@octokit/auth-token/LICENSE b/node_modules/@octokit/auth-token/LICENSE
deleted file mode 100644
index ef2c18e..0000000
--- a/node_modules/@octokit/auth-token/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License
-
-Copyright (c) 2019 Octokit contributors
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/@octokit/auth-token/README.md b/node_modules/@octokit/auth-token/README.md
deleted file mode 100644
index a1f6d35..0000000
--- a/node_modules/@octokit/auth-token/README.md
+++ /dev/null
@@ -1,290 +0,0 @@
-# auth-token.js
-
-> GitHub API token authentication for browsers and Node.js
-
-[](https://www.npmjs.com/package/@octokit/auth-token)
-[](https://github.com/octokit/auth-token.js/actions?query=workflow%3ATest)
-
-`@octokit/auth-token` is the simplest of [GitHub’s authentication strategies](https://github.com/octokit/auth.js).
-
-It is useful if you want to support multiple authentication strategies, as it’s API is compatible with its sibling packages for [basic](https://github.com/octokit/auth-basic.js), [GitHub App](https://github.com/octokit/auth-app.js) and [OAuth app](https://github.com/octokit/auth.js) authentication.
-
-
-
-- [Usage](#usage)
-- [`createTokenAuth(token) options`](#createtokenauthtoken-options)
-- [`auth()`](#auth)
-- [Authentication object](#authentication-object)
-- [`auth.hook(request, route, options)` or `auth.hook(request, options)`](#authhookrequest-route-options-or-authhookrequest-options)
-- [Find more information](#find-more-information)
- - [Find out what scopes are enabled for oauth tokens](#find-out-what-scopes-are-enabled-for-oauth-tokens)
- - [Find out if token is a personal access token or if it belongs to an OAuth app](#find-out-if-token-is-a-personal-access-token-or-if-it-belongs-to-an-oauth-app)
- - [Find out what permissions are enabled for a repository](#find-out-what-permissions-are-enabled-for-a-repository)
- - [Use token for git operations](#use-token-for-git-operations)
-- [License](#license)
-
-
-
-## Usage
-
-
-
-```js
-const auth = createTokenAuth("ghp_PersonalAccessToken01245678900000000");
-const authentication = await auth();
-// {
-// type: 'token',
-// token: 'ghp_PersonalAccessToken01245678900000000',
-// tokenType: 'oauth'
-// }
-```
-
-## `createTokenAuth(token) options`
-
-The `createTokenAuth` method accepts a single argument of type string, which is the token. The passed token can be one of the following:
-
-- [Personal access token](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line)
-- [OAuth access token](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/)
-- [GITHUB_TOKEN provided to GitHub Actions](https://developer.github.com/actions/creating-github-actions/accessing-the-runtime-environment/#environment-variables)
-- Installation access token ([server-to-server](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation))
-- User authentication for installation ([user-to-server](https://docs.github.com/en/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps))
-
-Examples
-
-```js
-// Personal access token or OAuth access token
-createTokenAuth("ghp_PersonalAccessToken01245678900000000");
-// {
-// type: 'token',
-// token: 'ghp_PersonalAccessToken01245678900000000',
-// tokenType: 'oauth'
-// }
-
-// Installation access token or GitHub Action token
-createTokenAuth("ghs_InstallallationOrActionToken00000000");
-// {
-// type: 'token',
-// token: 'ghs_InstallallationOrActionToken00000000',
-// tokenType: 'installation'
-// }
-
-// Installation access token or GitHub Action token
-createTokenAuth("ghu_InstallationUserToServer000000000000");
-// {
-// type: 'token',
-// token: 'ghu_InstallationUserToServer000000000000',
-// tokenType: 'user-to-server'
-// }
-```
-
-## `auth()`
-
-The `auth()` method has no options. It returns a promise which resolves with the the authentication object.
-
-## Authentication object
-
-
-
-
-
- name
-
-
- type
-
-
- description
-
-
-
-
-
-
- type
-
-
- string
-
-
- "token"
-
-
-
-
- token
-
-
- string
-
-
- The provided token.
-
-
-
-
- tokenType
-
-
- string
-
-
- Can be either "oauth" for personal access tokens and OAuth tokens, "installation" for installation access tokens (includes GITHUB_TOKEN provided to GitHub Actions), "app" for a GitHub App JSON Web Token, or "user-to-server" for a user authentication token through an app installation.
-
-
-
-
-
-## `auth.hook(request, route, options)` or `auth.hook(request, options)`
-
-`auth.hook()` hooks directly into the request life cycle. It authenticates the request using the provided token.
-
-The `request` option is an instance of [`@octokit/request`](https://github.com/octokit/request.js#readme). The `route`/`options` parameters are the same as for the [`request()` method](https://github.com/octokit/request.js#request).
-
-`auth.hook()` can be called directly to send an authenticated request
-
-```js
-const { data: authorizations } = await auth.hook(
- request,
- "GET /authorizations"
-);
-```
-
-Or it can be passed as option to [`request()`](https://github.com/octokit/request.js#request).
-
-```js
-const requestWithAuth = request.defaults({
- request: {
- hook: auth.hook,
- },
-});
-
-const { data: authorizations } = await requestWithAuth("GET /authorizations");
-```
-
-## Find more information
-
-`auth()` does not send any requests, it only transforms the provided token string into an authentication object.
-
-Here is a list of things you can do to retrieve further information
-
-### Find out what scopes are enabled for oauth tokens
-
-Note that this does not work for installations. There is no way to retrieve permissions based on an installation access tokens.
-
-```js
-const TOKEN = "ghp_PersonalAccessToken01245678900000000";
-
-const auth = createTokenAuth(TOKEN);
-const authentication = await auth();
-
-const response = await request("HEAD /", {
- headers: authentication.headers,
-});
-const scopes = response.headers["x-oauth-scopes"].split(/,\s+/);
-
-if (scopes.length) {
- console.log(
- `"${TOKEN}" has ${scopes.length} scopes enabled: ${scopes.join(", ")}`
- );
-} else {
- console.log(`"${TOKEN}" has no scopes enabled`);
-}
-```
-
-### Find out if token is a personal access token or if it belongs to an OAuth app
-
-```js
-const TOKEN = "ghp_PersonalAccessToken01245678900000000";
-
-const auth = createTokenAuth(TOKEN);
-const authentication = await auth();
-
-const response = await request("HEAD /", {
- headers: authentication.headers,
-});
-const clientId = response.headers["x-oauth-client-id"];
-
-if (clientId) {
- console.log(
- `"${token}" is an OAuth token, its app’s client_id is ${clientId}.`
- );
-} else {
- console.log(`"${token}" is a personal access token`);
-}
-```
-
-### Find out what permissions are enabled for a repository
-
-Note that the `permissions` key is not set when authenticated using an installation access token.
-
-```js
-const TOKEN = "ghp_PersonalAccessToken01245678900000000";
-
-const auth = createTokenAuth(TOKEN);
-const authentication = await auth();
-
-const response = await request("GET /repos/{owner}/{repo}", {
- owner: 'octocat',
- repo: 'hello-world'
- headers: authentication.headers
-});
-
-console.log(response.data.permissions)
-// {
-// admin: true,
-// push: true,
-// pull: true
-// }
-```
-
-### Use token for git operations
-
-Both OAuth and installation access tokens can be used for git operations. However, when using with an installation, [the token must be prefixed with `x-access-token`](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#http-based-git-access-by-an-installation).
-
-This example is using the [`execa`](https://github.com/sindresorhus/execa) package to run a `git push` command.
-
-```js
-const TOKEN = "ghp_PersonalAccessToken01245678900000000";
-
-const auth = createTokenAuth(TOKEN);
-const { token, tokenType } = await auth();
-const tokenWithPrefix =
- tokenType === "installation" ? `x-access-token:${token}` : token;
-
-const repositoryUrl = `https://${tokenWithPrefix}@github.com/octocat/hello-world.git`;
-
-const { stdout } = await execa("git", ["push", repositoryUrl]);
-console.log(stdout);
-```
-
-## License
-
-[MIT](LICENSE)
diff --git a/node_modules/@octokit/auth-token/dist-node/index.js b/node_modules/@octokit/auth-token/dist-node/index.js
deleted file mode 100644
index af0f0a6..0000000
--- a/node_modules/@octokit/auth-token/dist-node/index.js
+++ /dev/null
@@ -1,55 +0,0 @@
-'use strict';
-
-Object.defineProperty(exports, '__esModule', { value: true });
-
-const REGEX_IS_INSTALLATION_LEGACY = /^v1\./;
-const REGEX_IS_INSTALLATION = /^ghs_/;
-const REGEX_IS_USER_TO_SERVER = /^ghu_/;
-async function auth(token) {
- const isApp = token.split(/\./).length === 3;
- const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token);
- const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);
- const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth";
- return {
- type: "token",
- token: token,
- tokenType
- };
-}
-
-/**
- * Prefix token for usage in the Authorization header
- *
- * @param token OAuth token or JSON Web Token
- */
-function withAuthorizationPrefix(token) {
- if (token.split(/\./).length === 3) {
- return `bearer ${token}`;
- }
-
- return `token ${token}`;
-}
-
-async function hook(token, request, route, parameters) {
- const endpoint = request.endpoint.merge(route, parameters);
- endpoint.headers.authorization = withAuthorizationPrefix(token);
- return request(endpoint);
-}
-
-const createTokenAuth = function createTokenAuth(token) {
- if (!token) {
- throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");
- }
-
- if (typeof token !== "string") {
- throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");
- }
-
- token = token.replace(/^(token|bearer) +/i, "");
- return Object.assign(auth.bind(null, token), {
- hook: hook.bind(null, token)
- });
-};
-
-exports.createTokenAuth = createTokenAuth;
-//# sourceMappingURL=index.js.map
diff --git a/node_modules/@octokit/auth-token/dist-node/index.js.map b/node_modules/@octokit/auth-token/dist-node/index.js.map
deleted file mode 100644
index 835a07e..0000000
--- a/node_modules/@octokit/auth-token/dist-node/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sources":["../dist-src/auth.js","../dist-src/with-authorization-prefix.js","../dist-src/hook.js","../dist-src/index.js"],"sourcesContent":["const REGEX_IS_INSTALLATION_LEGACY = /^v1\\./;\nconst REGEX_IS_INSTALLATION = /^ghs_/;\nconst REGEX_IS_USER_TO_SERVER = /^ghu_/;\nexport async function auth(token) {\n const isApp = token.split(/\\./).length === 3;\n const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) ||\n REGEX_IS_INSTALLATION.test(token);\n const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);\n const tokenType = isApp\n ? \"app\"\n : isInstallation\n ? \"installation\"\n : isUserToServer\n ? \"user-to-server\"\n : \"oauth\";\n return {\n type: \"token\",\n token: token,\n tokenType,\n };\n}\n","/**\n * Prefix token for usage in the Authorization header\n *\n * @param token OAuth token or JSON Web Token\n */\nexport function withAuthorizationPrefix(token) {\n if (token.split(/\\./).length === 3) {\n return `bearer ${token}`;\n }\n return `token ${token}`;\n}\n","import { withAuthorizationPrefix } from \"./with-authorization-prefix\";\nexport async function hook(token, request, route, parameters) {\n const endpoint = request.endpoint.merge(route, parameters);\n endpoint.headers.authorization = withAuthorizationPrefix(token);\n return request(endpoint);\n}\n","import { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nexport const createTokenAuth = function createTokenAuth(token) {\n if (!token) {\n throw new Error(\"[@octokit/auth-token] No token passed to createTokenAuth\");\n }\n if (typeof token !== \"string\") {\n throw new Error(\"[@octokit/auth-token] Token passed to createTokenAuth is not a string\");\n }\n token = token.replace(/^(token|bearer) +/i, \"\");\n return Object.assign(auth.bind(null, token), {\n hook: hook.bind(null, token),\n });\n};\n"],"names":["REGEX_IS_INSTALLATION_LEGACY","REGEX_IS_INSTALLATION","REGEX_IS_USER_TO_SERVER","auth","token","isApp","split","length","isInstallation","test","isUserToServer","tokenType","type","withAuthorizationPrefix","hook","request","route","parameters","endpoint","merge","headers","authorization","createTokenAuth","Error","replace","Object","assign","bind"],"mappings":";;;;AAAA,MAAMA,4BAA4B,GAAG,OAArC;AACA,MAAMC,qBAAqB,GAAG,OAA9B;AACA,MAAMC,uBAAuB,GAAG,OAAhC;AACO,eAAeC,IAAf,CAAoBC,KAApB,EAA2B;EAC9B,MAAMC,KAAK,GAAGD,KAAK,CAACE,KAAN,CAAY,IAAZ,EAAkBC,MAAlB,KAA6B,CAA3C;EACA,MAAMC,cAAc,GAAGR,4BAA4B,CAACS,IAA7B,CAAkCL,KAAlC,KACnBH,qBAAqB,CAACQ,IAAtB,CAA2BL,KAA3B,CADJ;EAEA,MAAMM,cAAc,GAAGR,uBAAuB,CAACO,IAAxB,CAA6BL,KAA7B,CAAvB;EACA,MAAMO,SAAS,GAAGN,KAAK,GACjB,KADiB,GAEjBG,cAAc,GACV,cADU,GAEVE,cAAc,GACV,gBADU,GAEV,OANd;EAOA,OAAO;IACHE,IAAI,EAAE,OADH;IAEHR,KAAK,EAAEA,KAFJ;IAGHO;GAHJ;AAKH;;ACpBD;AACA;AACA;AACA;AACA;AACA,AAAO,SAASE,uBAAT,CAAiCT,KAAjC,EAAwC;EAC3C,IAAIA,KAAK,CAACE,KAAN,CAAY,IAAZ,EAAkBC,MAAlB,KAA6B,CAAjC,EAAoC;IAChC,OAAQ,UAASH,KAAM,EAAvB;;;EAEJ,OAAQ,SAAQA,KAAM,EAAtB;AACH;;ACTM,eAAeU,IAAf,CAAoBV,KAApB,EAA2BW,OAA3B,EAAoCC,KAApC,EAA2CC,UAA3C,EAAuD;EAC1D,MAAMC,QAAQ,GAAGH,OAAO,CAACG,QAAR,CAAiBC,KAAjB,CAAuBH,KAAvB,EAA8BC,UAA9B,CAAjB;EACAC,QAAQ,CAACE,OAAT,CAAiBC,aAAjB,GAAiCR,uBAAuB,CAACT,KAAD,CAAxD;EACA,OAAOW,OAAO,CAACG,QAAD,CAAd;AACH;;MCHYI,eAAe,GAAG,SAASA,eAAT,CAAyBlB,KAAzB,EAAgC;EAC3D,IAAI,CAACA,KAAL,EAAY;IACR,MAAM,IAAImB,KAAJ,CAAU,0DAAV,CAAN;;;EAEJ,IAAI,OAAOnB,KAAP,KAAiB,QAArB,EAA+B;IAC3B,MAAM,IAAImB,KAAJ,CAAU,uEAAV,CAAN;;;EAEJnB,KAAK,GAAGA,KAAK,CAACoB,OAAN,CAAc,oBAAd,EAAoC,EAApC,CAAR;EACA,OAAOC,MAAM,CAACC,MAAP,CAAcvB,IAAI,CAACwB,IAAL,CAAU,IAAV,EAAgBvB,KAAhB,CAAd,EAAsC;IACzCU,IAAI,EAAEA,IAAI,CAACa,IAAL,CAAU,IAAV,EAAgBvB,KAAhB;GADH,CAAP;AAGH,CAXM;;;;"}
\ No newline at end of file
diff --git a/node_modules/@octokit/auth-token/dist-src/auth.js b/node_modules/@octokit/auth-token/dist-src/auth.js
deleted file mode 100644
index b22ce98..0000000
--- a/node_modules/@octokit/auth-token/dist-src/auth.js
+++ /dev/null
@@ -1,21 +0,0 @@
-const REGEX_IS_INSTALLATION_LEGACY = /^v1\./;
-const REGEX_IS_INSTALLATION = /^ghs_/;
-const REGEX_IS_USER_TO_SERVER = /^ghu_/;
-export async function auth(token) {
- const isApp = token.split(/\./).length === 3;
- const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) ||
- REGEX_IS_INSTALLATION.test(token);
- const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);
- const tokenType = isApp
- ? "app"
- : isInstallation
- ? "installation"
- : isUserToServer
- ? "user-to-server"
- : "oauth";
- return {
- type: "token",
- token: token,
- tokenType,
- };
-}
diff --git a/node_modules/@octokit/auth-token/dist-src/hook.js b/node_modules/@octokit/auth-token/dist-src/hook.js
deleted file mode 100644
index f8e47f0..0000000
--- a/node_modules/@octokit/auth-token/dist-src/hook.js
+++ /dev/null
@@ -1,6 +0,0 @@
-import { withAuthorizationPrefix } from "./with-authorization-prefix";
-export async function hook(token, request, route, parameters) {
- const endpoint = request.endpoint.merge(route, parameters);
- endpoint.headers.authorization = withAuthorizationPrefix(token);
- return request(endpoint);
-}
diff --git a/node_modules/@octokit/auth-token/dist-src/index.js b/node_modules/@octokit/auth-token/dist-src/index.js
deleted file mode 100644
index f2ddd63..0000000
--- a/node_modules/@octokit/auth-token/dist-src/index.js
+++ /dev/null
@@ -1,14 +0,0 @@
-import { auth } from "./auth";
-import { hook } from "./hook";
-export const createTokenAuth = function createTokenAuth(token) {
- if (!token) {
- throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");
- }
- if (typeof token !== "string") {
- throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");
- }
- token = token.replace(/^(token|bearer) +/i, "");
- return Object.assign(auth.bind(null, token), {
- hook: hook.bind(null, token),
- });
-};
diff --git a/node_modules/@octokit/auth-token/dist-src/types.js b/node_modules/@octokit/auth-token/dist-src/types.js
deleted file mode 100644
index cb0ff5c..0000000
--- a/node_modules/@octokit/auth-token/dist-src/types.js
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/node_modules/@octokit/auth-token/dist-src/with-authorization-prefix.js b/node_modules/@octokit/auth-token/dist-src/with-authorization-prefix.js
deleted file mode 100644
index 9035813..0000000
--- a/node_modules/@octokit/auth-token/dist-src/with-authorization-prefix.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/**
- * Prefix token for usage in the Authorization header
- *
- * @param token OAuth token or JSON Web Token
- */
-export function withAuthorizationPrefix(token) {
- if (token.split(/\./).length === 3) {
- return `bearer ${token}`;
- }
- return `token ${token}`;
-}
diff --git a/node_modules/@octokit/auth-token/dist-types/auth.d.ts b/node_modules/@octokit/auth-token/dist-types/auth.d.ts
deleted file mode 100644
index dc41835..0000000
--- a/node_modules/@octokit/auth-token/dist-types/auth.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import { Token, Authentication } from "./types";
-export declare function auth(token: Token): Promise;
diff --git a/node_modules/@octokit/auth-token/dist-types/hook.d.ts b/node_modules/@octokit/auth-token/dist-types/hook.d.ts
deleted file mode 100644
index 21e4b6f..0000000
--- a/node_modules/@octokit/auth-token/dist-types/hook.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import { AnyResponse, EndpointOptions, RequestInterface, RequestParameters, Route, Token } from "./types";
-export declare function hook(token: Token, request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise;
diff --git a/node_modules/@octokit/auth-token/dist-types/index.d.ts b/node_modules/@octokit/auth-token/dist-types/index.d.ts
deleted file mode 100644
index 5999429..0000000
--- a/node_modules/@octokit/auth-token/dist-types/index.d.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { StrategyInterface, Token, Authentication } from "./types";
-export declare type Types = {
- StrategyOptions: Token;
- AuthOptions: never;
- Authentication: Authentication;
-};
-export declare const createTokenAuth: StrategyInterface;
diff --git a/node_modules/@octokit/auth-token/dist-types/types.d.ts b/node_modules/@octokit/auth-token/dist-types/types.d.ts
deleted file mode 100644
index 0ae24de..0000000
--- a/node_modules/@octokit/auth-token/dist-types/types.d.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-import * as OctokitTypes from "@octokit/types";
-export declare type AnyResponse = OctokitTypes.OctokitResponse;
-export declare type StrategyInterface = OctokitTypes.StrategyInterface<[
- Token
-], [
-], Authentication>;
-export declare type EndpointDefaults = OctokitTypes.EndpointDefaults;
-export declare type EndpointOptions = OctokitTypes.EndpointOptions;
-export declare type RequestParameters = OctokitTypes.RequestParameters;
-export declare type RequestInterface = OctokitTypes.RequestInterface;
-export declare type Route = OctokitTypes.Route;
-export declare type Token = string;
-export declare type OAuthTokenAuthentication = {
- type: "token";
- tokenType: "oauth";
- token: Token;
-};
-export declare type InstallationTokenAuthentication = {
- type: "token";
- tokenType: "installation";
- token: Token;
-};
-export declare type AppAuthentication = {
- type: "token";
- tokenType: "app";
- token: Token;
-};
-export declare type UserToServerAuthentication = {
- type: "token";
- tokenType: "user-to-server";
- token: Token;
-};
-export declare type Authentication = OAuthTokenAuthentication | InstallationTokenAuthentication | AppAuthentication | UserToServerAuthentication;
diff --git a/node_modules/@octokit/auth-token/dist-types/with-authorization-prefix.d.ts b/node_modules/@octokit/auth-token/dist-types/with-authorization-prefix.d.ts
deleted file mode 100644
index 2e52c31..0000000
--- a/node_modules/@octokit/auth-token/dist-types/with-authorization-prefix.d.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-/**
- * Prefix token for usage in the Authorization header
- *
- * @param token OAuth token or JSON Web Token
- */
-export declare function withAuthorizationPrefix(token: string): string;
diff --git a/node_modules/@octokit/auth-token/dist-web/index.js b/node_modules/@octokit/auth-token/dist-web/index.js
deleted file mode 100644
index 8b1cd7d..0000000
--- a/node_modules/@octokit/auth-token/dist-web/index.js
+++ /dev/null
@@ -1,55 +0,0 @@
-const REGEX_IS_INSTALLATION_LEGACY = /^v1\./;
-const REGEX_IS_INSTALLATION = /^ghs_/;
-const REGEX_IS_USER_TO_SERVER = /^ghu_/;
-async function auth(token) {
- const isApp = token.split(/\./).length === 3;
- const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) ||
- REGEX_IS_INSTALLATION.test(token);
- const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);
- const tokenType = isApp
- ? "app"
- : isInstallation
- ? "installation"
- : isUserToServer
- ? "user-to-server"
- : "oauth";
- return {
- type: "token",
- token: token,
- tokenType,
- };
-}
-
-/**
- * Prefix token for usage in the Authorization header
- *
- * @param token OAuth token or JSON Web Token
- */
-function withAuthorizationPrefix(token) {
- if (token.split(/\./).length === 3) {
- return `bearer ${token}`;
- }
- return `token ${token}`;
-}
-
-async function hook(token, request, route, parameters) {
- const endpoint = request.endpoint.merge(route, parameters);
- endpoint.headers.authorization = withAuthorizationPrefix(token);
- return request(endpoint);
-}
-
-const createTokenAuth = function createTokenAuth(token) {
- if (!token) {
- throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");
- }
- if (typeof token !== "string") {
- throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");
- }
- token = token.replace(/^(token|bearer) +/i, "");
- return Object.assign(auth.bind(null, token), {
- hook: hook.bind(null, token),
- });
-};
-
-export { createTokenAuth };
-//# sourceMappingURL=index.js.map
diff --git a/node_modules/@octokit/auth-token/dist-web/index.js.map b/node_modules/@octokit/auth-token/dist-web/index.js.map
deleted file mode 100644
index 1d6197b..0000000
--- a/node_modules/@octokit/auth-token/dist-web/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sources":["../dist-src/auth.js","../dist-src/with-authorization-prefix.js","../dist-src/hook.js","../dist-src/index.js"],"sourcesContent":["const REGEX_IS_INSTALLATION_LEGACY = /^v1\\./;\nconst REGEX_IS_INSTALLATION = /^ghs_/;\nconst REGEX_IS_USER_TO_SERVER = /^ghu_/;\nexport async function auth(token) {\n const isApp = token.split(/\\./).length === 3;\n const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) ||\n REGEX_IS_INSTALLATION.test(token);\n const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);\n const tokenType = isApp\n ? \"app\"\n : isInstallation\n ? \"installation\"\n : isUserToServer\n ? \"user-to-server\"\n : \"oauth\";\n return {\n type: \"token\",\n token: token,\n tokenType,\n };\n}\n","/**\n * Prefix token for usage in the Authorization header\n *\n * @param token OAuth token or JSON Web Token\n */\nexport function withAuthorizationPrefix(token) {\n if (token.split(/\\./).length === 3) {\n return `bearer ${token}`;\n }\n return `token ${token}`;\n}\n","import { withAuthorizationPrefix } from \"./with-authorization-prefix\";\nexport async function hook(token, request, route, parameters) {\n const endpoint = request.endpoint.merge(route, parameters);\n endpoint.headers.authorization = withAuthorizationPrefix(token);\n return request(endpoint);\n}\n","import { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nexport const createTokenAuth = function createTokenAuth(token) {\n if (!token) {\n throw new Error(\"[@octokit/auth-token] No token passed to createTokenAuth\");\n }\n if (typeof token !== \"string\") {\n throw new Error(\"[@octokit/auth-token] Token passed to createTokenAuth is not a string\");\n }\n token = token.replace(/^(token|bearer) +/i, \"\");\n return Object.assign(auth.bind(null, token), {\n hook: hook.bind(null, token),\n });\n};\n"],"names":[],"mappings":"AAAA,MAAM,4BAA4B,GAAG,OAAO,CAAC;AAC7C,MAAM,qBAAqB,GAAG,OAAO,CAAC;AACtC,MAAM,uBAAuB,GAAG,OAAO,CAAC;AACjC,eAAe,IAAI,CAAC,KAAK,EAAE;AAClC,IAAI,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;AACjD,IAAI,MAAM,cAAc,GAAG,4BAA4B,CAAC,IAAI,CAAC,KAAK,CAAC;AACnE,QAAQ,qBAAqB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC1C,IAAI,MAAM,cAAc,GAAG,uBAAuB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC/D,IAAI,MAAM,SAAS,GAAG,KAAK;AAC3B,UAAU,KAAK;AACf,UAAU,cAAc;AACxB,cAAc,cAAc;AAC5B,cAAc,cAAc;AAC5B,kBAAkB,gBAAgB;AAClC,kBAAkB,OAAO,CAAC;AAC1B,IAAI,OAAO;AACX,QAAQ,IAAI,EAAE,OAAO;AACrB,QAAQ,KAAK,EAAE,KAAK;AACpB,QAAQ,SAAS;AACjB,KAAK,CAAC;AACN;;ACpBA;AACA;AACA;AACA;AACA;AACA,AAAO,SAAS,uBAAuB,CAAC,KAAK,EAAE;AAC/C,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;AACxC,QAAQ,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;AACjC,KAAK;AACL,IAAI,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;AAC5B,CAAC;;ACTM,eAAe,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE;AAC9D,IAAI,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAC/D,IAAI,QAAQ,CAAC,OAAO,CAAC,aAAa,GAAG,uBAAuB,CAAC,KAAK,CAAC,CAAC;AACpE,IAAI,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC7B,CAAC;;ACHW,MAAC,eAAe,GAAG,SAAS,eAAe,CAAC,KAAK,EAAE;AAC/D,IAAI,IAAI,CAAC,KAAK,EAAE;AAChB,QAAQ,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;AACpF,KAAK;AACL,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACnC,QAAQ,MAAM,IAAI,KAAK,CAAC,uEAAuE,CAAC,CAAC;AACjG,KAAK;AACL,IAAI,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;AACpD,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE;AACjD,QAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC;AACpC,KAAK,CAAC,CAAC;AACP,CAAC;;;;"}
\ No newline at end of file
diff --git a/node_modules/@octokit/auth-token/package.json b/node_modules/@octokit/auth-token/package.json
deleted file mode 100644
index daab213..0000000
--- a/node_modules/@octokit/auth-token/package.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "name": "@octokit/auth-token",
- "description": "GitHub API token authentication for browsers and Node.js",
- "version": "3.0.2",
- "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",
- "octokit",
- "authentication",
- "api"
- ],
- "repository": "github:octokit/auth-token.js",
- "dependencies": {
- "@octokit/types": "^8.0.0"
- },
- "devDependencies": {
- "@octokit/core": "^4.0.0",
- "@octokit/request": "^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": "^29.0.0",
- "fetch-mock": "^9.0.0",
- "jest": "^29.0.0",
- "prettier": "2.7.1",
- "semantic-release": "^19.0.3",
- "ts-jest": "^29.0.0",
- "typescript": "^4.0.0"
- },
- "engines": {
- "node": ">= 14"
- },
- "publishConfig": {
- "access": "public"
- }
-}
diff --git a/node_modules/@octokit/auth-unauthenticated/LICENSE b/node_modules/@octokit/auth-unauthenticated/LICENSE
deleted file mode 100644
index 07d2730..0000000
--- a/node_modules/@octokit/auth-unauthenticated/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License
-
-Copyright (c) 2020 Octokit contributors
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/@octokit/auth-unauthenticated/README.md b/node_modules/@octokit/auth-unauthenticated/README.md
deleted file mode 100644
index e98c06b..0000000
--- a/node_modules/@octokit/auth-unauthenticated/README.md
+++ /dev/null
@@ -1,143 +0,0 @@
-# auth-unauthenticated.js
-
-> strategy for explicitly unauthenticated Octokit instances
-
-[](https://www.npmjs.com/package/@octokit/auth-unauthenticated)
-[](https://github.com/octokit/auth-unauthenticated.js/actions?query=workflow%3ATest)
-
-`@octokit/auth-unauthenticated` is useful for cases when an Octokit constructor has a default authentication strategy, but you require an explicitly unauthenticated instance.
-
-One use cases is when building a GitHub App using [`@octokit/auth-app`](https://github.com/octokit/auth-app.js) and handling webhooks using [`@octokit/webhooks`](https://github.com/octokit/webhooks.js). While all webhook events provide an installation ID in its payload, in case of the `installation.deleted` event, the app can no longer create an installation access token, because the app's access has been revoked.
-
-
-
-- [Usage](#usage)
-- [`createUnauthenticatedAuth() options`](#createunauthenticatedauth-options)
-- [`auth()`](#auth)
-- [Authentication object](#authentication-object)
-- [`auth.hook(request, route, options)` or `auth.hook(request, options)`](#authhookrequest-route-options-or-authhookrequest-options)
-- [License](#license)
-
-
-
-## Usage
-
-
-
-```js
-const auth = createUnauthenticatedAuth({
- reason:
- "Handling an installation.deleted event (The app's access has been revoked)",
-});
-const authentication = await auth();
-// {
-// type: 'unauthenticated',
-// reason: 'Handling an installation.deleted event (The app's access has been revoked)'
-// }
-```
-
-## `createUnauthenticatedAuth() options`
-
-The `createUnauthenticatedAuth` method requires an `options.reason` argument which will be used when returning an error due to a lack of authentication or when logging a warning in case of a `404` error.
-
-Examples
-
-```js
-createUnauthenticatedAuth({
- reason:
- "Handling an installation.deleted event: The app's access has been revoked from @octokit (id: 12345)",
-});
-```
-
-## `auth()`
-
-The `auth()` method accepts any options, but it doesn't do anything with it. That makes it a great drop-in replacement for any other authentication strategy.
-
-## Authentication object
-
-
-
-
-
- name
-
-
- type
-
-
- description
-
-
-
-
-
-
- type
-
-
- string
-
-
- "unauthenticated"
-
-
-
-
-
-## `auth.hook(request, route, options)` or `auth.hook(request, options)`
-
-`auth.hook()` hooks directly into the request life cycle. If a mutating request is attempted to be sent (`DELETE`, `PATCH`, `POST`, or `PUT`), the request is failed immediately and returning an error that contains the reason passed to `createUnauthenticatedAuth({ reason })`.
-
-If a request fails with a `404` or due to hitting a rate/abuse limit, the returned error is amended that it might be caused due to a lack of authentication and will include the reason passed to `createUnauthenticatedAuth({ reason })`.
-
-The `request` option is an instance of [`@octokit/request`](https://github.com/octokit/request.js#readme). The `route`/`options` parameters are the same as for the [`request()` method](https://github.com/octokit/request.js#request).
-
-`auth.hook()` can be called directly to send an authenticated request
-
-```js
-const { data } = await auth.hook(request, "GET /");
-```
-
-Or it can be passed as option to [`request()`](https://github.com/octokit/request.js#request).
-
-```js
-const requestWithAuth = request.defaults({
- request: {
- hook: auth.hook,
- },
-});
-
-const { data } = await requestWithAuth("GET /");
-```
-
-## License
-
-[MIT](LICENSE)
diff --git a/node_modules/@octokit/auth-unauthenticated/dist-node/index.js b/node_modules/@octokit/auth-unauthenticated/dist-node/index.js
deleted file mode 100644
index 3009979..0000000
--- a/node_modules/@octokit/auth-unauthenticated/dist-node/index.js
+++ /dev/null
@@ -1,77 +0,0 @@
-'use strict';
-
-Object.defineProperty(exports, '__esModule', { value: true });
-
-async function auth(reason) {
- return {
- type: "unauthenticated",
- reason
- };
-}
-
-function isRateLimitError(error) {
- if (error.status !== 403) {
- return false;
- }
- /* istanbul ignore if */
-
-
- if (!error.response) {
- return false;
- }
-
- return error.response.headers["x-ratelimit-remaining"] === "0";
-}
-
-const REGEX_ABUSE_LIMIT_MESSAGE = /\babuse\b/i;
-function isAbuseLimitError(error) {
- if (error.status !== 403) {
- return false;
- }
-
- return REGEX_ABUSE_LIMIT_MESSAGE.test(error.message);
-}
-
-async function hook(reason, request, route, parameters) {
- const endpoint = request.endpoint.merge(route, parameters);
- return request(endpoint).catch(error => {
- if (error.status === 404) {
- error.message = `Not found. May be due to lack of authentication. Reason: ${reason}`;
- throw error;
- }
-
- if (isRateLimitError(error)) {
- error.message = `API rate limit exceeded. This maybe caused by the lack of authentication. Reason: ${reason}`;
- throw error;
- }
-
- if (isAbuseLimitError(error)) {
- error.message = `You have triggered an abuse detection mechanism. This maybe caused by the lack of authentication. Reason: ${reason}`;
- throw error;
- }
-
- if (error.status === 401) {
- error.message = `Unauthorized. "${endpoint.method} ${endpoint.url}" failed most likely due to lack of authentication. Reason: ${reason}`;
- throw error;
- }
-
- if (error.status >= 400 && error.status < 500) {
- error.message = error.message.replace(/\.?$/, `. May be caused by lack of authentication (${reason}).`);
- }
-
- throw error;
- });
-}
-
-const createUnauthenticatedAuth = function createUnauthenticatedAuth(options) {
- if (!options || !options.reason) {
- throw new Error("[@octokit/auth-unauthenticated] No reason passed to createUnauthenticatedAuth");
- }
-
- return Object.assign(auth.bind(null, options.reason), {
- hook: hook.bind(null, options.reason)
- });
-};
-
-exports.createUnauthenticatedAuth = createUnauthenticatedAuth;
-//# sourceMappingURL=index.js.map
diff --git a/node_modules/@octokit/auth-unauthenticated/dist-node/index.js.map b/node_modules/@octokit/auth-unauthenticated/dist-node/index.js.map
deleted file mode 100644
index b788dba..0000000
--- a/node_modules/@octokit/auth-unauthenticated/dist-node/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sources":["../dist-src/auth.js","../dist-src/is-rate-limit-error.js","../dist-src/is-abuse-limit-error.js","../dist-src/hook.js","../dist-src/index.js"],"sourcesContent":["export async function auth(reason) {\n return {\n type: \"unauthenticated\",\n reason,\n };\n}\n","export function isRateLimitError(error) {\n if (error.status !== 403) {\n return false;\n }\n /* istanbul ignore if */\n if (!error.response) {\n return false;\n }\n return error.response.headers[\"x-ratelimit-remaining\"] === \"0\";\n}\n","const REGEX_ABUSE_LIMIT_MESSAGE = /\\babuse\\b/i;\nexport function isAbuseLimitError(error) {\n if (error.status !== 403) {\n return false;\n }\n return REGEX_ABUSE_LIMIT_MESSAGE.test(error.message);\n}\n","import { isRateLimitError } from \"./is-rate-limit-error\";\nimport { isAbuseLimitError } from \"./is-abuse-limit-error\";\nexport async function hook(reason, request, route, parameters) {\n const endpoint = request.endpoint.merge(route, parameters);\n return request(endpoint).catch((error) => {\n if (error.status === 404) {\n error.message = `Not found. May be due to lack of authentication. Reason: ${reason}`;\n throw error;\n }\n if (isRateLimitError(error)) {\n error.message = `API rate limit exceeded. This maybe caused by the lack of authentication. Reason: ${reason}`;\n throw error;\n }\n if (isAbuseLimitError(error)) {\n error.message = `You have triggered an abuse detection mechanism. This maybe caused by the lack of authentication. Reason: ${reason}`;\n throw error;\n }\n if (error.status === 401) {\n error.message = `Unauthorized. \"${endpoint.method} ${endpoint.url}\" failed most likely due to lack of authentication. Reason: ${reason}`;\n throw error;\n }\n if (error.status >= 400 && error.status < 500) {\n error.message = error.message.replace(/\\.?$/, `. May be caused by lack of authentication (${reason}).`);\n }\n throw error;\n });\n}\n","import { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nexport const createUnauthenticatedAuth = function createUnauthenticatedAuth(options) {\n if (!options || !options.reason) {\n throw new Error(\"[@octokit/auth-unauthenticated] No reason passed to createUnauthenticatedAuth\");\n }\n return Object.assign(auth.bind(null, options.reason), {\n hook: hook.bind(null, options.reason),\n });\n};\n"],"names":["auth","reason","type","isRateLimitError","error","status","response","headers","REGEX_ABUSE_LIMIT_MESSAGE","isAbuseLimitError","test","message","hook","request","route","parameters","endpoint","merge","catch","method","url","replace","createUnauthenticatedAuth","options","Error","Object","assign","bind"],"mappings":";;;;AAAO,eAAeA,IAAf,CAAoBC,MAApB,EAA4B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EAA0B;MACtBD,KAAK,CAACO,OAAN,GAAiB,kBAAiBK,QAAQ,CAACG,MAAO,IAAGH,QAAQ,CAACI,GAAI,+DAA8DnB,MAAO,EAAvI;MACA,MAAMG,KAAN;;;IAEJ,IAAIA,KAAK,CAACC,MAAN,IAAgB,GAAhB,IAAuBD,KAAK,CAACC,MAAN,GAAe,GAA1C,EAA+C;MAC3CD,KAAK,CAACO,OAAN,GAAgBP,KAAK,CAACO,OAAN,CAAcU,OAAd,CAAsB,MAAtB,EAA+B,8CAA6CpB,MAAO,IAAnF,CAAhB;;;IAEJ,MAAMG,KAAN;GApBG,CAAP;AAsBH;;MCxBYkB,yBAAyB,GAAG,SAASA,yBAAT,CAAmCC,OAAnC,EAA4C;EACjF,IAAI,CAACA,OAAD,IAAY,CAACA,OAAO,CAACtB,MAAzB,EAAiC;IAC7B,MAAM,IAAIuB,KAAJ,CAAU,+EAAV,CAAN;;;EAEJ,OAAOC,MAAM,CAACC,MAAP,CAAc1B,IAAI,CAAC2B,IAAL,CAAU,IAAV,EAAgBJ,OAAO,CAACtB,MAAxB,CAAd,EAA+C;IAClDW,IAAI,EAAEA,IAAI,CAACe,IAAL,CAAU,IAAV,EAAgBJ,OAAO,CAACtB,MAAxB;GADH,CAAP;AAGH,CAPM;;;;"}
\ No newline at end of file
diff --git a/node_modules/@octokit/auth-unauthenticated/dist-src/auth.js b/node_modules/@octokit/auth-unauthenticated/dist-src/auth.js
deleted file mode 100644
index bc4e3ec..0000000
--- a/node_modules/@octokit/auth-unauthenticated/dist-src/auth.js
+++ /dev/null
@@ -1,6 +0,0 @@
-export async function auth(reason) {
- return {
- type: "unauthenticated",
- reason,
- };
-}
diff --git a/node_modules/@octokit/auth-unauthenticated/dist-src/hook.js b/node_modules/@octokit/auth-unauthenticated/dist-src/hook.js
deleted file mode 100644
index a1f8162..0000000
--- a/node_modules/@octokit/auth-unauthenticated/dist-src/hook.js
+++ /dev/null
@@ -1,27 +0,0 @@
-import { isRateLimitError } from "./is-rate-limit-error";
-import { isAbuseLimitError } from "./is-abuse-limit-error";
-export async function hook(reason, request, route, parameters) {
- const endpoint = request.endpoint.merge(route, parameters);
- return request(endpoint).catch((error) => {
- if (error.status === 404) {
- error.message = `Not found. May be due to lack of authentication. Reason: ${reason}`;
- throw error;
- }
- if (isRateLimitError(error)) {
- error.message = `API rate limit exceeded. This maybe caused by the lack of authentication. Reason: ${reason}`;
- throw error;
- }
- if (isAbuseLimitError(error)) {
- error.message = `You have triggered an abuse detection mechanism. This maybe caused by the lack of authentication. Reason: ${reason}`;
- throw error;
- }
- if (error.status === 401) {
- error.message = `Unauthorized. "${endpoint.method} ${endpoint.url}" failed most likely due to lack of authentication. Reason: ${reason}`;
- throw error;
- }
- if (error.status >= 400 && error.status < 500) {
- error.message = error.message.replace(/\.?$/, `. May be caused by lack of authentication (${reason}).`);
- }
- throw error;
- });
-}
diff --git a/node_modules/@octokit/auth-unauthenticated/dist-src/index.js b/node_modules/@octokit/auth-unauthenticated/dist-src/index.js
deleted file mode 100644
index d12db73..0000000
--- a/node_modules/@octokit/auth-unauthenticated/dist-src/index.js
+++ /dev/null
@@ -1,10 +0,0 @@
-import { auth } from "./auth";
-import { hook } from "./hook";
-export const createUnauthenticatedAuth = function createUnauthenticatedAuth(options) {
- if (!options || !options.reason) {
- throw new Error("[@octokit/auth-unauthenticated] No reason passed to createUnauthenticatedAuth");
- }
- return Object.assign(auth.bind(null, options.reason), {
- hook: hook.bind(null, options.reason),
- });
-};
diff --git a/node_modules/@octokit/auth-unauthenticated/dist-src/is-abuse-limit-error.js b/node_modules/@octokit/auth-unauthenticated/dist-src/is-abuse-limit-error.js
deleted file mode 100644
index b3f9d58..0000000
--- a/node_modules/@octokit/auth-unauthenticated/dist-src/is-abuse-limit-error.js
+++ /dev/null
@@ -1,7 +0,0 @@
-const REGEX_ABUSE_LIMIT_MESSAGE = /\babuse\b/i;
-export function isAbuseLimitError(error) {
- if (error.status !== 403) {
- return false;
- }
- return REGEX_ABUSE_LIMIT_MESSAGE.test(error.message);
-}
diff --git a/node_modules/@octokit/auth-unauthenticated/dist-src/is-rate-limit-error.js b/node_modules/@octokit/auth-unauthenticated/dist-src/is-rate-limit-error.js
deleted file mode 100644
index 1e27483..0000000
--- a/node_modules/@octokit/auth-unauthenticated/dist-src/is-rate-limit-error.js
+++ /dev/null
@@ -1,10 +0,0 @@
-export function isRateLimitError(error) {
- if (error.status !== 403) {
- return false;
- }
- /* istanbul ignore if */
- if (!error.response) {
- return false;
- }
- return error.response.headers["x-ratelimit-remaining"] === "0";
-}
diff --git a/node_modules/@octokit/auth-unauthenticated/dist-src/types.js b/node_modules/@octokit/auth-unauthenticated/dist-src/types.js
deleted file mode 100644
index cb0ff5c..0000000
--- a/node_modules/@octokit/auth-unauthenticated/dist-src/types.js
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/node_modules/@octokit/auth-unauthenticated/dist-types/auth.d.ts b/node_modules/@octokit/auth-unauthenticated/dist-types/auth.d.ts
deleted file mode 100644
index ef9f628..0000000
--- a/node_modules/@octokit/auth-unauthenticated/dist-types/auth.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import { Authentication } from "./types";
-export declare function auth(reason: string): Promise;
diff --git a/node_modules/@octokit/auth-unauthenticated/dist-types/hook.d.ts b/node_modules/@octokit/auth-unauthenticated/dist-types/hook.d.ts
deleted file mode 100644
index f5f2f45..0000000
--- a/node_modules/@octokit/auth-unauthenticated/dist-types/hook.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import { AnyResponse, EndpointOptions, RequestInterface, RequestParameters, Route } from "./types";
-export declare function hook(reason: string, request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise;
diff --git a/node_modules/@octokit/auth-unauthenticated/dist-types/index.d.ts b/node_modules/@octokit/auth-unauthenticated/dist-types/index.d.ts
deleted file mode 100644
index d207444..0000000
--- a/node_modules/@octokit/auth-unauthenticated/dist-types/index.d.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { StrategyInterface, Options, Authentication } from "./types";
-export declare type Types = {
- StrategyOptions: Options;
- AuthOptions: never;
- Authentication: Authentication;
-};
-export declare const createUnauthenticatedAuth: StrategyInterface;
diff --git a/node_modules/@octokit/auth-unauthenticated/dist-types/is-abuse-limit-error.d.ts b/node_modules/@octokit/auth-unauthenticated/dist-types/is-abuse-limit-error.d.ts
deleted file mode 100644
index 3687db9..0000000
--- a/node_modules/@octokit/auth-unauthenticated/dist-types/is-abuse-limit-error.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import { RequestError } from "@octokit/request-error";
-export declare function isAbuseLimitError(error: RequestError): boolean;
diff --git a/node_modules/@octokit/auth-unauthenticated/dist-types/is-rate-limit-error.d.ts b/node_modules/@octokit/auth-unauthenticated/dist-types/is-rate-limit-error.d.ts
deleted file mode 100644
index 2e3dd47..0000000
--- a/node_modules/@octokit/auth-unauthenticated/dist-types/is-rate-limit-error.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import { RequestError } from "@octokit/request-error";
-export declare function isRateLimitError(error: RequestError): boolean;
diff --git a/node_modules/@octokit/auth-unauthenticated/dist-types/types.d.ts b/node_modules/@octokit/auth-unauthenticated/dist-types/types.d.ts
deleted file mode 100644
index 3892482..0000000
--- a/node_modules/@octokit/auth-unauthenticated/dist-types/types.d.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import * as OctokitTypes from "@octokit/types";
-export declare type AnyResponse = OctokitTypes.OctokitResponse;
-export declare type StrategyInterface = OctokitTypes.StrategyInterface<[
- Options
-], [
-], Authentication>;
-export declare type EndpointDefaults = OctokitTypes.EndpointDefaults;
-export declare type EndpointOptions = OctokitTypes.EndpointOptions;
-export declare type RequestParameters = OctokitTypes.RequestParameters;
-export declare type RequestInterface = OctokitTypes.RequestInterface;
-export declare type Route = OctokitTypes.Route;
-export declare type Options = {
- reason: string;
-};
-export declare type Authentication = {
- type: "unauthenticated";
- reason: string;
-};
diff --git a/node_modules/@octokit/auth-unauthenticated/dist-web/index.js b/node_modules/@octokit/auth-unauthenticated/dist-web/index.js
deleted file mode 100644
index f04a0dd..0000000
--- a/node_modules/@octokit/auth-unauthenticated/dist-web/index.js
+++ /dev/null
@@ -1,63 +0,0 @@
-async function auth(reason) {
- return {
- type: "unauthenticated",
- reason,
- };
-}
-
-function isRateLimitError(error) {
- if (error.status !== 403) {
- return false;
- }
- /* istanbul ignore if */
- if (!error.response) {
- return false;
- }
- return error.response.headers["x-ratelimit-remaining"] === "0";
-}
-
-const REGEX_ABUSE_LIMIT_MESSAGE = /\babuse\b/i;
-function isAbuseLimitError(error) {
- if (error.status !== 403) {
- return false;
- }
- return REGEX_ABUSE_LIMIT_MESSAGE.test(error.message);
-}
-
-async function hook(reason, request, route, parameters) {
- const endpoint = request.endpoint.merge(route, parameters);
- return request(endpoint).catch((error) => {
- if (error.status === 404) {
- error.message = `Not found. May be due to lack of authentication. Reason: ${reason}`;
- throw error;
- }
- if (isRateLimitError(error)) {
- error.message = `API rate limit exceeded. This maybe caused by the lack of authentication. Reason: ${reason}`;
- throw error;
- }
- if (isAbuseLimitError(error)) {
- error.message = `You have triggered an abuse detection mechanism. This maybe caused by the lack of authentication. Reason: ${reason}`;
- throw error;
- }
- if (error.status === 401) {
- error.message = `Unauthorized. "${endpoint.method} ${endpoint.url}" failed most likely due to lack of authentication. Reason: ${reason}`;
- throw error;
- }
- if (error.status >= 400 && error.status < 500) {
- error.message = error.message.replace(/\.?$/, `. May be caused by lack of authentication (${reason}).`);
- }
- throw error;
- });
-}
-
-const createUnauthenticatedAuth = function createUnauthenticatedAuth(options) {
- if (!options || !options.reason) {
- throw new Error("[@octokit/auth-unauthenticated] No reason passed to createUnauthenticatedAuth");
- }
- return Object.assign(auth.bind(null, options.reason), {
- hook: hook.bind(null, options.reason),
- });
-};
-
-export { createUnauthenticatedAuth };
-//# sourceMappingURL=index.js.map
diff --git a/node_modules/@octokit/auth-unauthenticated/dist-web/index.js.map b/node_modules/@octokit/auth-unauthenticated/dist-web/index.js.map
deleted file mode 100644
index 4766e8e..0000000
--- a/node_modules/@octokit/auth-unauthenticated/dist-web/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sources":["../dist-src/auth.js","../dist-src/is-rate-limit-error.js","../dist-src/is-abuse-limit-error.js","../dist-src/hook.js","../dist-src/index.js"],"sourcesContent":["export async function auth(reason) {\n return {\n type: \"unauthenticated\",\n reason,\n };\n}\n","export function isRateLimitError(error) {\n if (error.status !== 403) {\n return false;\n }\n /* istanbul ignore if */\n if (!error.response) {\n return false;\n }\n return error.response.headers[\"x-ratelimit-remaining\"] === \"0\";\n}\n","const REGEX_ABUSE_LIMIT_MESSAGE = /\\babuse\\b/i;\nexport function isAbuseLimitError(error) {\n if (error.status !== 403) {\n return false;\n }\n return REGEX_ABUSE_LIMIT_MESSAGE.test(error.message);\n}\n","import { isRateLimitError } from \"./is-rate-limit-error\";\nimport { isAbuseLimitError } from \"./is-abuse-limit-error\";\nexport async function hook(reason, request, route, parameters) {\n const endpoint = request.endpoint.merge(route, parameters);\n return request(endpoint).catch((error) => {\n if (error.status === 404) {\n error.message = `Not found. May be due to lack of authentication. Reason: ${reason}`;\n throw error;\n }\n if (isRateLimitError(error)) {\n error.message = `API rate limit exceeded. This maybe caused by the lack of authentication. Reason: ${reason}`;\n throw error;\n }\n if (isAbuseLimitError(error)) {\n error.message = `You have triggered an abuse detection mechanism. This maybe caused by the lack of authentication. Reason: ${reason}`;\n throw error;\n }\n if (error.status === 401) {\n error.message = `Unauthorized. \"${endpoint.method} ${endpoint.url}\" failed most likely due to lack of authentication. Reason: ${reason}`;\n throw error;\n }\n if (error.status >= 400 && error.status < 500) {\n error.message = error.message.replace(/\\.?$/, `. May be caused by lack of authentication (${reason}).`);\n }\n throw error;\n });\n}\n","import { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nexport const createUnauthenticatedAuth = function createUnauthenticatedAuth(options) {\n if (!options || !options.reason) {\n throw new Error(\"[@octokit/auth-unauthenticated] No reason passed to createUnauthenticatedAuth\");\n }\n return Object.assign(auth.bind(null, options.reason), {\n hook: hook.bind(null, options.reason),\n });\n};\n"],"names":[],"mappings":"AAAO,eAAe,IAAI,CAAC,MAAM,EAAE;AACnC,IAAI,OAAO;AACX,QAAQ,IAAI,EAAE,iBAAiB;AAC/B,QAAQ,MAAM;AACd,KAAK,CAAC;AACN;;ACLO,SAAS,gBAAgB,CAAC,KAAK,EAAE;AACxC,IAAI,IAAI,KAAK,CAAC,MAAM,KAAK,GAAG,EAAE;AAC9B,QAAQ,OAAO,KAAK,CAAC;AACrB,KAAK;AACL;AACA,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;AACzB,QAAQ,OAAO,KAAK,CAAC;AACrB,KAAK;AACL,IAAI,OAAO,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,uBAAuB,CAAC,KAAK,GAAG,CAAC;AACnE,CAAC;;ACTD,MAAM,yBAAyB,GAAG,YAAY,CAAC;AAC/C,AAAO,SAAS,iBAAiB,CAAC,KAAK,EAAE;AACzC,IAAI,IAAI,KAAK,CAAC,MAAM,KAAK,GAAG,EAAE;AAC9B,QAAQ,OAAO,KAAK,CAAC;AACrB,KAAK;AACL,IAAI,OAAO,yBAAyB,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AACzD,CAAC;;ACJM,eAAe,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE;AAC/D,IAAI,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAC/D,IAAI,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,KAAK;AAC9C,QAAQ,IAAI,KAAK,CAAC,MAAM,KAAK,GAAG,EAAE;AAClC,YAAY,KAAK,CAAC,OAAO,GAAG,CAAC,yDAAyD,EAAE,MAAM,CAAC,CAAC,CAAC;AACjG,YA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AM,CAAC,EAAE;AAC1D,QAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC;AAC7C,KAAK,CAAC,CAAC;AACP,CAAC;;;;"}
\ No newline at end of file
diff --git a/node_modules/@octokit/auth-unauthenticated/package.json b/node_modules/@octokit/auth-unauthenticated/package.json
deleted file mode 100644
index 95ad386..0000000
--- a/node_modules/@octokit/auth-unauthenticated/package.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "name": "@octokit/auth-unauthenticated",
- "description": "GitHub API token authentication for browsers and Node.js",
- "version": "3.0.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",
- "octokit",
- "authentication",
- "api"
- ],
- "repository": "github:octokit/auth-unauthenticated.js",
- "dependencies": {
- "@octokit/request-error": "^3.0.0",
- "@octokit/types": "^8.0.0"
- },
- "devDependencies": {
- "@octokit/core": "^4.0.0",
- "@octokit/request": "^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",
- "@tsconfig/node10": "^1.0.3",
- "@types/jest": "^29.0.0",
- "fetch-mock": "^9.10.7",
- "jest": "^29.0.0",
- "prettier": "2.7.1",
- "ts-jest": "^29.0.0",
- "typescript": "^4.0.0"
- },
- "engines": {
- "node": ">= 14"
- },
- "publishConfig": {
- "access": "public"
- }
-}
diff --git a/node_modules/@octokit/core/LICENSE b/node_modules/@octokit/core/LICENSE
deleted file mode 100644
index ef2c18e..0000000
--- a/node_modules/@octokit/core/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License
-
-Copyright (c) 2019 Octokit contributors
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/@octokit/core/README.md b/node_modules/@octokit/core/README.md
deleted file mode 100644
index b03db10..0000000
--- a/node_modules/@octokit/core/README.md
+++ /dev/null
@@ -1,448 +0,0 @@
-# core.js
-
-> Extendable client for GitHub's REST & GraphQL APIs
-
-[](https://www.npmjs.com/package/@octokit/core)
-[](https://github.com/octokit/core.js/actions?query=workflow%3ATest+branch%3Amaster)
-
-
-
-- [Usage](#usage)
- - [REST API example](#rest-api-example)
- - [GraphQL example](#graphql-example)
-- [Options](#options)
-- [Defaults](#defaults)
-- [Authentication](#authentication)
-- [Logging](#logging)
-- [Hooks](#hooks)
-- [Plugins](#plugins)
-- [Build your own Octokit with Plugins and Defaults](#build-your-own-octokit-with-plugins-and-defaults)
-- [LICENSE](#license)
-
-
-
-If you need a minimalistic library to utilize GitHub's [REST API](https://developer.github.com/v3/) and [GraphQL API](https://developer.github.com/v4/) which you can extend with plugins as needed, then `@octokit/core` is a great starting point.
-
-If you don't need the Plugin API then using [`@octokit/request`](https://github.com/octokit/request.js/) or [`@octokit/graphql`](https://github.com/octokit/graphql.js/) directly is a good alternative.
-
-## Usage
-
-
-
-When using with GitHub Enterprise Server, set `options.baseUrl` to the root URL of the API. For example, if your GitHub Enterprise Server's hostname is `github.acme-inc.com`, then set `options.baseUrl` to `https://github.acme-inc.com/api/v3`. Example
-
-```js
-const octokit = new Octokit({
- baseUrl: "https://github.acme-inc.com/api/v3",
-});
-```
-
-
-
-
- options.previews
-
-
- Array of Strings
-
-
-
-Some REST API endpoints require preview headers to be set, or enable
-additional features. Preview headers can be set on a per-request basis, e.g.
-
-```js
-octokit.request("POST /repos/{owner}/{repo}/pulls", {
- mediaType: {
- previews: ["shadow-cat"],
- },
- owner,
- repo,
- title: "My pull request",
- base: "master",
- head: "my-feature",
- draft: true,
-});
-```
-
-You can also set previews globally, by setting the `options.previews` option on the constructor. Example:
-
-```js
-const octokit = new Octokit({
- previews: ["shadow-cat"],
-});
-```
-
-
-
-
- options.request
-
-
- Object
-
-
-
-Set a default request timeout (`options.request.timeout`) or an [`http(s).Agent`](https://nodejs.org/api/http.html#http_class_http_agent) e.g. for proxy usage (Node only, `options.request.agent`).
-
-There are more `options.request.*` options, see [`@octokit/request` options](https://github.com/octokit/request.js#request). `options.request` can also be set on a per-request basis.
-
-
-
-
- options.timeZone
-
-
- String
-
-
-
-Sets the `Time-Zone` header which defines a timezone according to the [list of names from the Olson database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
-
-```js
-const octokit = new Octokit({
- timeZone: "America/Los_Angeles",
-});
-```
-
-The time zone header will determine the timezone used for generating the timestamp when creating commits. See [GitHub's Timezones documentation](https://developer.github.com/v3/#timezones).
-
-
-
-
- options.userAgent
-
-
- String
-
-
-
-A custom user agent string for your app or library. Example
-
-```js
-const octokit = new Octokit({
- userAgent: "my-app/v1.2.3",
-});
-```
-
-
-
-
-
-## Defaults
-
-You can create a new Octokit class with customized default options.
-
-```js
-const MyOctokit = Octokit.defaults({
- auth: "personal-access-token123",
- baseUrl: "https://github.acme-inc.com/api/v3",
- userAgent: "my-app/v1.2.3",
-});
-const octokit1 = new MyOctokit();
-const octokit2 = new MyOctokit();
-```
-
-If you pass additional options to your new constructor, the options will be merged shallowly.
-
-```js
-const MyOctokit = Octokit.defaults({
- foo: {
- opt1: 1,
- },
-});
-const octokit = new MyOctokit({
- foo: {
- opt2: 1,
- },
-});
-// options will be { foo: { opt2: 1 }}
-```
-
-If you need a deep or conditional merge, you can pass a function instead.
-
-```js
-const MyOctokit = Octokit.defaults((options) => {
- return {
- foo: Object.assign({}, options.foo, { opt1: 1 }),
- };
-});
-const octokit = new MyOctokit({
- foo: { opt2: 1 },
-});
-// options will be { foo: { opt1: 1, opt2: 1 }}
-```
-
-Be careful about mutating the `options` object in the `Octokit.defaults` callback, as it can have unforeseen consequences.
-
-## Authentication
-
-Authentication is optional for some REST API endpoints accessing public data, but is required for GraphQL queries. Using authentication also increases your [API rate limit](https://developer.github.com/v3/#rate-limiting).
-
-By default, Octokit authenticates using the [token authentication strategy](https://github.com/octokit/auth-token.js). Pass in a token using `options.auth`. It can be a personal access token, an OAuth token, an installation access token or a JSON Web Token for GitHub App authentication. The `Authorization` header will be set according to the type of token.
-
-```js
-import { Octokit } from "@octokit/core";
-
-const octokit = new Octokit({
- auth: "mypersonalaccesstoken123",
-});
-
-const { data } = await octokit.request("/user");
-```
-
-To use a different authentication strategy, set `options.authStrategy`. A list of authentication strategies is available at [octokit/authentication-strategies.js](https://github.com/octokit/authentication-strategies.js/#readme).
-
-Example
-
-```js
-import { Octokit } from "@octokit/core";
-import { createAppAuth } from "@octokit/auth-app";
-
-const appOctokit = new Octokit({
- authStrategy: createAppAuth,
- auth: {
- appId: 123,
- privateKey: process.env.PRIVATE_KEY,
- },
-});
-
-const { data } = await appOctokit.request("/app");
-```
-
-The `.auth()` method returned by the current authentication strategy can be accessed at `octokit.auth()`. Example
-
-```js
-const { token } = await appOctokit.auth({
- type: "installation",
- installationId: 123,
-});
-```
-
-## Logging
-
-There are four built-in log methods
-
-1. `octokit.log.debug(message[, additionalInfo])`
-1. `octokit.log.info(message[, additionalInfo])`
-1. `octokit.log.warn(message[, additionalInfo])`
-1. `octokit.log.error(message[, additionalInfo])`
-
-They can be configured using the [`log` client option](client-options). By default, `octokit.log.debug()` and `octokit.log.info()` are no-ops, while the other two call `console.warn()` and `console.error()` respectively.
-
-This is useful if you build reusable [plugins](#plugins).
-
-If you would like to make the log level configurable using an environment variable or external option, we recommend the [console-log-level](https://github.com/watson/console-log-level) package. Example
-
-```js
-const octokit = new Octokit({
- log: require("console-log-level")({ level: "info" }),
-});
-```
-
-## Hooks
-
-You can customize Octokit's request lifecycle with hooks.
-
-```js
-octokit.hook.before("request", async (options) => {
- validate(options);
-});
-octokit.hook.after("request", async (response, options) => {
- console.log(`${options.method} ${options.url}: ${response.status}`);
-});
-octokit.hook.error("request", async (error, options) => {
- if (error.status === 304) {
- return findInCache(error.response.headers.etag);
- }
-
- throw error;
-});
-octokit.hook.wrap("request", async (request, options) => {
- // add logic before, after, catch errors or replace the request altogether
- return request(options);
-});
-```
-
-See [before-after-hook](https://github.com/gr2m/before-after-hook#readme) for more documentation on hooks.
-
-## Plugins
-
-Octokit’s functionality can be extended using plugins. The `Octokit.plugin()` method accepts a plugin (or many) and returns a new constructor.
-
-A plugin is a function which gets two arguments:
-
-1. the current instance
-2. the options passed to the constructor.
-
-In order to extend `octokit`'s API, the plugin must return an object with the new methods.
-
-```js
-// index.js
-const { Octokit } = require("@octokit/core")
-const MyOctokit = Octokit.plugin(
- require("./lib/my-plugin"),
- require("octokit-plugin-example")
-);
-
-const octokit = new MyOctokit({ greeting: "Moin moin" });
-octokit.helloWorld(); // logs "Moin moin, world!"
-octokit.request("GET /"); // logs "GET / - 200 in 123ms"
-
-// lib/my-plugin.js
-module.exports = (octokit, options = { greeting: "Hello" }) => {
- // hook into the request lifecycle
- octokit.hook.wrap("request", async (request, options) => {
- const time = Date.now();
- const response = await request(options);
- console.log(
- `${options.method} ${options.url} – ${response.status} in ${Date.now() -
- time}ms`
- );
- return response;
- });
-
- // add a custom method
- return {
- helloWorld: () => console.log(`${options.greeting}, world!`);
- }
-};
-```
-
-## Build your own Octokit with Plugins and Defaults
-
-You can build your own Octokit class with preset default options and plugins. In fact, this is mostly how the `@octokit/` modules work, such as [`@octokit/action`](https://github.com/octokit/action.js):
-
-```js
-const { Octokit } = require("@octokit/core");
-const MyActionOctokit = Octokit.plugin(
- require("@octokit/plugin-paginate-rest").paginateRest,
- require("@octokit/plugin-throttling").throttling,
- require("@octokit/plugin-retry").retry
-).defaults({
- throttle: {
- onAbuseLimit: (retryAfter, options) => {
- /* ... */
- },
- onRateLimit: (retryAfter, options) => {
- /* ... */
- },
- },
- authStrategy: require("@octokit/auth-action").createActionAuth,
- userAgent: `my-octokit-action/v1.2.3`,
-});
-
-const octokit = new MyActionOctokit();
-const installations = await octokit.paginate("GET /app/installations");
-```
-
-## LICENSE
-
-[MIT](LICENSE)
diff --git a/node_modules/@octokit/core/dist-node/index.js b/node_modules/@octokit/core/dist-node/index.js
deleted file mode 100644
index 002dcba..0000000
--- a/node_modules/@octokit/core/dist-node/index.js
+++ /dev/null
@@ -1,138 +0,0 @@
-'use strict';
-
-Object.defineProperty(exports, '__esModule', { value: true });
-
-var universalUserAgent = require('universal-user-agent');
-var beforeAfterHook = require('before-after-hook');
-var request = require('@octokit/request');
-var graphql = require('@octokit/graphql');
-var authToken = require('@octokit/auth-token');
-
-const VERSION = "4.1.0";
-
-class Octokit {
- constructor(options = {}) {
- const hook = new beforeAfterHook.Collection();
- const requestDefaults = {
- baseUrl: request.request.endpoint.DEFAULTS.baseUrl,
- headers: {},
- request: Object.assign({}, options.request, {
- // @ts-ignore internal usage only, no need to type
- hook: hook.bind(null, "request")
- }),
- mediaType: {
- previews: [],
- format: ""
- }
- }; // prepend default user agent with `options.userAgent` if set
-
- requestDefaults.headers["user-agent"] = [options.userAgent, `octokit-core.js/${VERSION} ${universalUserAgent.getUserAgent()}`].filter(Boolean).join(" ");
-
- if (options.baseUrl) {
- requestDefaults.baseUrl = options.baseUrl;
- }
-
- if (options.previews) {
- requestDefaults.mediaType.previews = options.previews;
- }
-
- if (options.timeZone) {
- requestDefaults.headers["time-zone"] = options.timeZone;
- }
-
- this.request = request.request.defaults(requestDefaults);
- this.graphql = graphql.withCustomRequest(this.request).defaults(requestDefaults);
- this.log = Object.assign({
- debug: () => {},
- info: () => {},
- warn: console.warn.bind(console),
- error: console.error.bind(console)
- }, options.log);
- this.hook = hook; // (1) If neither `options.authStrategy` nor `options.auth` are set, the `octokit` instance
- // is unauthenticated. The `this.auth()` method is a no-op and no request hook is registered.
- // (2) If only `options.auth` is set, use the default token authentication strategy.
- // (3) If `options.authStrategy` is set then use it and pass in `options.auth`. Always pass own request as many strategies accept a custom request instance.
- // TODO: type `options.auth` based on `options.authStrategy`.
-
- if (!options.authStrategy) {
- if (!options.auth) {
- // (1)
- this.auth = async () => ({
- type: "unauthenticated"
- });
- } else {
- // (2)
- const auth = authToken.createTokenAuth(options.auth); // @ts-ignore ¯\_(ツ)_/¯
-
- hook.wrap("request", auth.hook);
- this.auth = auth;
- }
- } else {
- const {
- authStrategy,
- ...otherOptions
- } = options;
- const auth = authStrategy(Object.assign({
- request: this.request,
- log: this.log,
- // we pass the current octokit instance as well as its constructor options
- // to allow for authentication strategies that return a new octokit instance
- // that shares the same internal state as the current one. The original
- // requirement for this was the "event-octokit" authentication strategy
- // of https://github.com/probot/octokit-auth-probot.
- octokit: this,
- octokitOptions: otherOptions
- }, options.auth)); // @ts-ignore ¯\_(ツ)_/¯
-
- hook.wrap("request", auth.hook);
- this.auth = auth;
- } // apply plugins
- // https://stackoverflow.com/a/16345172
-
-
- const classConstructor = this.constructor;
- classConstructor.plugins.forEach(plugin => {
- Object.assign(this, plugin(this, options));
- });
- }
-
- static defaults(defaults) {
- const OctokitWithDefaults = class extends this {
- constructor(...args) {
- const options = args[0] || {};
-
- if (typeof defaults === "function") {
- super(defaults(options));
- return;
- }
-
- super(Object.assign({}, defaults, options, options.userAgent && defaults.userAgent ? {
- userAgent: `${options.userAgent} ${defaults.userAgent}`
- } : null));
- }
-
- };
- return OctokitWithDefaults;
- }
- /**
- * Attach a plugin (or many) to your Octokit instance.
- *
- * @example
- * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)
- */
-
-
- static plugin(...newPlugins) {
- var _a;
-
- const currentPlugins = this.plugins;
- const NewOctokit = (_a = class extends this {}, _a.plugins = currentPlugins.concat(newPlugins.filter(plugin => !currentPlugins.includes(plugin))), _a);
- return NewOctokit;
- }
-
-}
-Octokit.VERSION = VERSION;
-Octokit.plugins = [];
-
-exports.Octokit = Octokit;
-//# sourceMappingURL=index.js.map
diff --git a/node_modules/@octokit/core/dist-node/index.js.map b/node_modules/@octokit/core/dist-node/index.js.map
deleted file mode 100644
index 1cebcd2..0000000
--- a/node_modules/@octokit/core/dist-node/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"4.1.0\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { Collection } from \"before-after-hook\";\nimport { request } from \"@octokit/request\";\nimport { withCustomRequest } from \"@octokit/graphql\";\nimport { createTokenAuth } from \"@octokit/auth-token\";\nimport { VERSION } from \"./version\";\nexport class Octokit {\n constructor(options = {}) {\n const hook = new Collection();\n const requestDefaults = {\n baseUrl: request.endpoint.DEFAULTS.baseUrl,\n headers: {},\n request: Object.assign({}, options.request, {\n // @ts-ignore internal usage only, no need to type\n hook: hook.bind(null, \"request\"),\n }),\n mediaType: {\n previews: [],\n format: \"\",\n },\n };\n // prepend default user agent with `options.userAgent` if set\n requestDefaults.headers[\"user-agent\"] = [\n options.userAgent,\n `octokit-core.js/${VERSION} ${getUserAgent()}`,\n ]\n .filter(Boolean)\n .join(\" \");\n if (options.baseUrl) {\n requestDefaults.baseUrl = options.baseUrl;\n }\n if (options.previews) {\n requestDefaults.mediaType.previews = options.previews;\n }\n if (options.timeZone) {\n requestDefaults.headers[\"time-zone\"] = options.timeZone;\n }\n this.request = request.defaults(requestDefaults);\n this.graphql = withCustomRequest(this.request).defaults(requestDefaults);\n this.log = Object.assign({\n debug: () => { },\n info: () => { },\n warn: console.warn.bind(console),\n error: console.error.bind(console),\n }, options.log);\n this.hook = hook;\n // (1) If neither `options.authStrategy` nor `options.auth` are set, the `octokit` instance\n // is unauthenticated. The `this.auth()` method is a no-op and no request hook is registered.\n // (2) If only `options.auth` is set, use the default token authentication strategy.\n // (3) If `options.authStrategy` is set then use it and pass in `options.auth`. Always pass own request as many strategies accept a custom request instance.\n // TODO: type `options.auth` based on `options.authStrategy`.\n if (!options.authStrategy) {\n if (!options.auth) {\n // (1)\n this.auth = async () => ({\n type: \"unauthenticated\",\n });\n }\n else {\n // (2)\n const auth = createTokenAuth(options.auth);\n // @ts-ignore ¯\\_(ツ)_/¯\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n }\n else {\n const { authStrategy, ...otherOptions } = options;\n const auth = authStrategy(Object.assign({\n request: this.request,\n log: this.log,\n // we pass the current octokit instance as well as its constructor options\n // to allow for authentication strategies that return a new octokit instance\n // that shares the same internal state as the current one. The original\n // requirement for this was the \"event-octokit\" authentication strategy\n // of https://github.com/probot/octokit-auth-probot.\n octokit: this,\n octokitOptions: otherOptions,\n }, options.auth));\n // @ts-ignore ¯\\_(ツ)_/¯\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n // apply plugins\n // https://stackoverflow.com/a/16345172\n const classConstructor = this.constructor;\n classConstructor.plugins.forEach((plugin) => {\n Object.assign(this, plugin(this, options));\n });\n }\n static defaults(defaults) {\n const OctokitWithDefaults = class extends this {\n constructor(...args) {\n const options = args[0] || {};\n if (typeof defaults === \"function\") {\n super(defaults(options));\n return;\n }\n super(Object.assign({}, defaults, options, options.userAgent && defaults.userAgent\n ? {\n userAgent: `${options.userAgent} ${defaults.userAgent}`,\n }\n : null));\n }\n };\n return OctokitWithDefaults;\n }\n /**\n * Attach a plugin (or many) to your Octokit instance.\n *\n * @example\n * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)\n */\n static plugin(...newPlugins) {\n var _a;\n const currentPlugins = this.plugins;\n const NewOctokit = (_a = class extends this {\n },\n _a.plugins = currentPlugins.concat(newPlugins.filter((plugin) => !currentPlugins.includes(plugin))),\n _a);\n return NewOctokit;\n }\n}\nOctokit.VERSION = VERSION;\nOctokit.plugins = [];\n"],"names":["VERSION","Octokit","constructor","options","hook","Collection","requestDefaults","baseUrl","request","endpoint","DEFAULTS","headers","Object","assign","bind","mediaType","previews","format","userAgent","getUserAgent","filter","Boolean","join","timeZone","defaults","graphql","withCustomRequest","log","debug","info","warn","console","error","authStrategy","auth","type","createTokenAuth","wrap","otherOptions","octokit","octokitOptions","classConstructor","plugins","forEach","plugin","OctokitWithDefaults","args","newPlugins","_a","currentPlugins","NewOctokit","concat","includes"],"mappings":";;;;;;;;;;AAAO,MAAMA,OAAO,GAAG,mBAAhB;;ACMA,MAAMC,OAAN,CAAc;AACjBC,EAAAA,WAAW,CAACC,OAAO,GAAG,EAAX,EAAe;AACtB,UAAMC,IAAI,GAAG,IAAIC,0BAAJ,EAAb;AACA,UAAMC,eAAe,GAAG;AACpBC,MAAAA,OAAO,EAAEC,eAAO,CAACC,QAAR,CAAiBC,QAAjB,CAA0BH,OADf;AAEpBI,MAAAA,OAAO,EAAE,EAFW;AAGpBH,MAAAA,OAAO,EAAEI,MAAM,CAACC,MAAP,CAAc,EAAd,EAAkBV,OAAO,CAACK,OAA1B,EAAmC;AACxC;AACAJ,QAAAA,IAAI,EAAEA,IAAI,CAACU,IAAL,CAAU,IAAV,EAAgB,SAAhB;AAFkC,OAAnC,CAHW;AAOpBC,MAAAA,SAAS,EAAE;AACPC,QAAAA,QAAQ,EAAE,EADH;AAEPC,QAAAA,MAAM,EAAE;AAFD;AAPS,KAAxB,CAFsB;;AAetBX,IAAAA,eAAe,CAACK,OAAhB,CAAwB,YAAxB,IAAwC,CACpCR,OAAO,CAAC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,CAAd;AACA;AACH;;AACD,cAAMS,MAAM,CAACC,MAAP,CAAc,EAAd,EAAkBW,QAAlB,EAA4BrB,OAA5B,EAAqCA,OAAO,CAACe,SAAR,IAAqBM,QAAQ,CAACN,SAA9B,GACrC;AACEA,UAAAA,SAAS,EAAG,GAAEf,OAAO,CAACe,SAAU,IAAGM,QAAQ,CAACN,SAAU;AADxD,SADqC,GAIrC,IAJA,CAAN;AAKH;;AAZ0C,KAA/C;AAcA,WAAO2B,mBAAP;AACH;AACD;AACJ;AACA;AACA;AACA;AACA;;;AACiB,SAAND,MAAM,CAAC,GAAGG,UAAJ,EAAgB;AACzB,QAAIC,EAAJ;;AACA,UAAMC,cAAc,GAAG,KAAKP,OAA5B;AACA,UAAMQ,UAAU,IAAIF,EAAE,GAAG,cAAc,IAAd,CAAmB,EAAxB,EAEhBA,EAAE,CAACN,OAAH,GAAaO,cAAc,CAACE,MAAf,CAAsBJ,UAAU,CAAC3B,MAAX,CAAmBwB,MAAD,IAAY,CAACK,cAAc,CAACG,QAAf,CAAwBR,MAAxB,CAA/B,CAAtB,CAFG,EAGhBI,EAHY,CAAhB;AAIA,WAAOE,UAAP;AACH;;AAnHgB;AAqHrBjD,OAAO,CAACD,OAAR,GAAkBA,OAAlB;AACAC,OAAO,CAACyC,OAAR,GAAkB,EAAlB;;;;"}
\ No newline at end of file
diff --git a/node_modules/@octokit/core/dist-src/index.js b/node_modules/@octokit/core/dist-src/index.js
deleted file mode 100644
index bdbc335..0000000
--- a/node_modules/@octokit/core/dist-src/index.js
+++ /dev/null
@@ -1,125 +0,0 @@
-import { getUserAgent } from "universal-user-agent";
-import { Collection } from "before-after-hook";
-import { request } from "@octokit/request";
-import { withCustomRequest } from "@octokit/graphql";
-import { createTokenAuth } from "@octokit/auth-token";
-import { VERSION } from "./version";
-export class Octokit {
- constructor(options = {}) {
- const hook = new Collection();
- const requestDefaults = {
- baseUrl: request.endpoint.DEFAULTS.baseUrl,
- headers: {},
- request: Object.assign({}, options.request, {
- // @ts-ignore internal usage only, no need to type
- hook: hook.bind(null, "request"),
- }),
- mediaType: {
- previews: [],
- format: "",
- },
- };
- // prepend default user agent with `options.userAgent` if set
- requestDefaults.headers["user-agent"] = [
- options.userAgent,
- `octokit-core.js/${VERSION} ${getUserAgent()}`,
- ]
- .filter(Boolean)
- .join(" ");
- if (options.baseUrl) {
- requestDefaults.baseUrl = options.baseUrl;
- }
- if (options.previews) {
- requestDefaults.mediaType.previews = options.previews;
- }
- if (options.timeZone) {
- requestDefaults.headers["time-zone"] = options.timeZone;
- }
- this.request = request.defaults(requestDefaults);
- this.graphql = withCustomRequest(this.request).defaults(requestDefaults);
- this.log = Object.assign({
- debug: () => { },
- info: () => { },
- warn: console.warn.bind(console),
- error: console.error.bind(console),
- }, options.log);
- this.hook = hook;
- // (1) If neither `options.authStrategy` nor `options.auth` are set, the `octokit` instance
- // is unauthenticated. The `this.auth()` method is a no-op and no request hook is registered.
- // (2) If only `options.auth` is set, use the default token authentication strategy.
- // (3) If `options.authStrategy` is set then use it and pass in `options.auth`. Always pass own request as many strategies accept a custom request instance.
- // TODO: type `options.auth` based on `options.authStrategy`.
- if (!options.authStrategy) {
- if (!options.auth) {
- // (1)
- this.auth = async () => ({
- type: "unauthenticated",
- });
- }
- else {
- // (2)
- const auth = createTokenAuth(options.auth);
- // @ts-ignore ¯\_(ツ)_/¯
- hook.wrap("request", auth.hook);
- this.auth = auth;
- }
- }
- else {
- const { authStrategy, ...otherOptions } = options;
- const auth = authStrategy(Object.assign({
- request: this.request,
- log: this.log,
- // we pass the current octokit instance as well as its constructor options
- // to allow for authentication strategies that return a new octokit instance
- // that shares the same internal state as the current one. The original
- // requirement for this was the "event-octokit" authentication strategy
- // of https://github.com/probot/octokit-auth-probot.
- octokit: this,
- octokitOptions: otherOptions,
- }, options.auth));
- // @ts-ignore ¯\_(ツ)_/¯
- hook.wrap("request", auth.hook);
- this.auth = auth;
- }
- // apply plugins
- // https://stackoverflow.com/a/16345172
- const classConstructor = this.constructor;
- classConstructor.plugins.forEach((plugin) => {
- Object.assign(this, plugin(this, options));
- });
- }
- static defaults(defaults) {
- const OctokitWithDefaults = class extends this {
- constructor(...args) {
- const options = args[0] || {};
- if (typeof defaults === "function") {
- super(defaults(options));
- return;
- }
- super(Object.assign({}, defaults, options, options.userAgent && defaults.userAgent
- ? {
- userAgent: `${options.userAgent} ${defaults.userAgent}`,
- }
- : null));
- }
- };
- return OctokitWithDefaults;
- }
- /**
- * Attach a plugin (or many) to your Octokit instance.
- *
- * @example
- * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)
- */
- static plugin(...newPlugins) {
- var _a;
- const currentPlugins = this.plugins;
- const NewOctokit = (_a = class extends this {
- },
- _a.plugins = currentPlugins.concat(newPlugins.filter((plugin) => !currentPlugins.includes(plugin))),
- _a);
- return NewOctokit;
- }
-}
-Octokit.VERSION = VERSION;
-Octokit.plugins = [];
diff --git a/node_modules/@octokit/core/dist-src/types.js b/node_modules/@octokit/core/dist-src/types.js
deleted file mode 100644
index cb0ff5c..0000000
--- a/node_modules/@octokit/core/dist-src/types.js
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/node_modules/@octokit/core/dist-src/version.js b/node_modules/@octokit/core/dist-src/version.js
deleted file mode 100644
index c3170d5..0000000
--- a/node_modules/@octokit/core/dist-src/version.js
+++ /dev/null
@@ -1 +0,0 @@
-export const VERSION = "4.1.0";
diff --git a/node_modules/@octokit/core/dist-types/index.d.ts b/node_modules/@octokit/core/dist-types/index.d.ts
deleted file mode 100644
index b757c5b..0000000
--- a/node_modules/@octokit/core/dist-types/index.d.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-import { HookCollection } from "before-after-hook";
-import { request } from "@octokit/request";
-import { graphql } from "@octokit/graphql";
-import { Constructor, Hooks, OctokitOptions, OctokitPlugin, ReturnTypeOf, UnionToIntersection } from "./types";
-export declare class Octokit {
- static VERSION: string;
- static defaults>(this: S, defaults: OctokitOptions | Function): S;
- static plugins: OctokitPlugin[];
- /**
- * Attach a plugin (or many) to your Octokit instance.
- *
- * @example
- * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)
- */
- static plugin & {
- plugins: any[];
- }, T extends OctokitPlugin[]>(this: S, ...newPlugins: T): S & Constructor>>;
- constructor(options?: OctokitOptions);
- request: typeof request;
- graphql: typeof graphql;
- log: {
- debug: (message: string, additionalInfo?: object) => any;
- info: (message: string, additionalInfo?: object) => any;
- warn: (message: string, additionalInfo?: object) => any;
- error: (message: string, additionalInfo?: object) => any;
- [key: string]: any;
- };
- hook: HookCollection;
- auth: (...args: unknown[]) => Promise;
-}
diff --git a/node_modules/@octokit/core/dist-types/types.d.ts b/node_modules/@octokit/core/dist-types/types.d.ts
deleted file mode 100644
index 3970d0d..0000000
--- a/node_modules/@octokit/core/dist-types/types.d.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-import * as OctokitTypes from "@octokit/types";
-import { RequestError } from "@octokit/request-error";
-import { Octokit } from ".";
-export declare type RequestParameters = OctokitTypes.RequestParameters;
-export interface OctokitOptions {
- authStrategy?: any;
- auth?: any;
- userAgent?: string;
- previews?: string[];
- baseUrl?: string;
- log?: {
- debug: (message: string) => unknown;
- info: (message: string) => unknown;
- warn: (message: string) => unknown;
- error: (message: string) => unknown;
- };
- request?: OctokitTypes.RequestRequestOptions;
- timeZone?: string;
- [option: string]: any;
-}
-export declare type Constructor = new (...args: any[]) => T;
-export declare type ReturnTypeOf = T extends AnyFunction ? ReturnType : T extends AnyFunction[] ? UnionToIntersection, void>> : never;
-/**
- * @author https://stackoverflow.com/users/2887218/jcalz
- * @see https://stackoverflow.com/a/50375286/10325032
- */
-export declare type UnionToIntersection = (Union extends any ? (argument: Union) => void : never) extends (argument: infer Intersection) => void ? Intersection : never;
-declare type AnyFunction = (...args: any) => any;
-export declare type OctokitPlugin = (octokit: Octokit, options: OctokitOptions) => {
- [key: string]: any;
-} | void;
-export declare type Hooks = {
- request: {
- Options: Required;
- Result: OctokitTypes.OctokitResponse;
- Error: RequestError | Error;
- };
- [key: string]: {
- Options: unknown;
- Result: unknown;
- Error: unknown;
- };
-};
-export {};
diff --git a/node_modules/@octokit/core/dist-types/version.d.ts b/node_modules/@octokit/core/dist-types/version.d.ts
deleted file mode 100644
index 64fbeb8..0000000
--- a/node_modules/@octokit/core/dist-types/version.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export declare const VERSION = "4.1.0";
diff --git a/node_modules/@octokit/core/dist-web/index.js b/node_modules/@octokit/core/dist-web/index.js
deleted file mode 100644
index 7707608..0000000
--- a/node_modules/@octokit/core/dist-web/index.js
+++ /dev/null
@@ -1,130 +0,0 @@
-import { getUserAgent } from 'universal-user-agent';
-import { Collection } from 'before-after-hook';
-import { request } from '@octokit/request';
-import { withCustomRequest } from '@octokit/graphql';
-import { createTokenAuth } from '@octokit/auth-token';
-
-const VERSION = "4.1.0";
-
-class Octokit {
- constructor(options = {}) {
- const hook = new Collection();
- const requestDefaults = {
- baseUrl: request.endpoint.DEFAULTS.baseUrl,
- headers: {},
- request: Object.assign({}, options.request, {
- // @ts-ignore internal usage only, no need to type
- hook: hook.bind(null, "request"),
- }),
- mediaType: {
- previews: [],
- format: "",
- },
- };
- // prepend default user agent with `options.userAgent` if set
- requestDefaults.headers["user-agent"] = [
- options.userAgent,
- `octokit-core.js/${VERSION} ${getUserAgent()}`,
- ]
- .filter(Boolean)
- .join(" ");
- if (options.baseUrl) {
- requestDefaults.baseUrl = options.baseUrl;
- }
- if (options.previews) {
- requestDefaults.mediaType.previews = options.previews;
- }
- if (options.timeZone) {
- requestDefaults.headers["time-zone"] = options.timeZone;
- }
- this.request = request.defaults(requestDefaults);
- this.graphql = withCustomRequest(this.request).defaults(requestDefaults);
- this.log = Object.assign({
- debug: () => { },
- info: () => { },
- warn: console.warn.bind(console),
- error: console.error.bind(console),
- }, options.log);
- this.hook = hook;
- // (1) If neither `options.authStrategy` nor `options.auth` are set, the `octokit` instance
- // is unauthenticated. The `this.auth()` method is a no-op and no request hook is registered.
- // (2) If only `options.auth` is set, use the default token authentication strategy.
- // (3) If `options.authStrategy` is set then use it and pass in `options.auth`. Always pass own request as many strategies accept a custom request instance.
- // TODO: type `options.auth` based on `options.authStrategy`.
- if (!options.authStrategy) {
- if (!options.auth) {
- // (1)
- this.auth = async () => ({
- type: "unauthenticated",
- });
- }
- else {
- // (2)
- const auth = createTokenAuth(options.auth);
- // @ts-ignore ¯\_(ツ)_/¯
- hook.wrap("request", auth.hook);
- this.auth = auth;
- }
- }
- else {
- const { authStrategy, ...otherOptions } = options;
- const auth = authStrategy(Object.assign({
- request: this.request,
- log: this.log,
- // we pass the current octokit instance as well as its constructor options
- // to allow for authentication strategies that return a new octokit instance
- // that shares the same internal state as the current one. The original
- // requirement for this was the "event-octokit" authentication strategy
- // of https://github.com/probot/octokit-auth-probot.
- octokit: this,
- octokitOptions: otherOptions,
- }, options.auth));
- // @ts-ignore ¯\_(ツ)_/¯
- hook.wrap("request", auth.hook);
- this.auth = auth;
- }
- // apply plugins
- // https://stackoverflow.com/a/16345172
- const classConstructor = this.constructor;
- classConstructor.plugins.forEach((plugin) => {
- Object.assign(this, plugin(this, options));
- });
- }
- static defaults(defaults) {
- const OctokitWithDefaults = class extends this {
- constructor(...args) {
- const options = args[0] || {};
- if (typeof defaults === "function") {
- super(defaults(options));
- return;
- }
- super(Object.assign({}, defaults, options, options.userAgent && defaults.userAgent
- ? {
- userAgent: `${options.userAgent} ${defaults.userAgent}`,
- }
- : null));
- }
- };
- return OctokitWithDefaults;
- }
- /**
- * Attach a plugin (or many) to your Octokit instance.
- *
- * @example
- * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)
- */
- static plugin(...newPlugins) {
- var _a;
- const currentPlugins = this.plugins;
- const NewOctokit = (_a = class extends this {
- },
- _a.plugins = currentPlugins.concat(newPlugins.filter((plugin) => !currentPlugins.includes(plugin))),
- _a);
- return NewOctokit;
- }
-}
-Octokit.VERSION = VERSION;
-Octokit.plugins = [];
-
-export { Octokit };
-//# sourceMappingURL=index.js.map
diff --git a/node_modules/@octokit/core/dist-web/index.js.map b/node_modules/@octokit/core/dist-web/index.js.map
deleted file mode 100644
index 3f553e1..0000000
--- a/node_modules/@octokit/core/dist-web/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"4.1.0\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { Collection } from \"before-after-hook\";\nimport { request } from \"@octokit/request\";\nimport { withCustomRequest } from \"@octokit/graphql\";\nimport { createTokenAuth } from \"@octokit/auth-token\";\nimport { VERSION } from \"./version\";\nexport class Octokit {\n constructor(options = {}) {\n const hook = new Collection();\n const requestDefaults = {\n baseUrl: request.endpoint.DEFAULTS.baseUrl,\n headers: {},\n request: Object.assign({}, options.request, {\n // @ts-ignore internal usage only, no need to type\n hook: hook.bind(null, \"request\"),\n }),\n mediaType: {\n previews: [],\n format: \"\",\n },\n };\n // prepend default user agent with `options.userAgent` if set\n requestDefaults.headers[\"user-agent\"] = [\n options.userAgent,\n `octokit-core.js/${VERSION} ${getUserAgent()}`,\n ]\n .filter(Boolean)\n .join(\" \");\n if (options.baseUrl) {\n requestDefaults.baseUrl = options.baseUrl;\n }\n if (options.previews) {\n requestDefaults.mediaType.previews = options.previews;\n }\n if (options.timeZone) {\n requestDefaults.headers[\"time-zone\"] = options.timeZone;\n }\n this.request = request.defaults(requestDefaults);\n this.graphql = withCustomRequest(this.request).defaults(requestDefaults);\n this.log = Object.assign({\n debug: () => { },\n info: () => { },\n warn: console.warn.bind(console),\n error: console.error.bind(console),\n }, options.log);\n this.hook = hook;\n // (1) If neither `options.authStrategy` nor `options.auth` are set, the `octokit` instance\n // is unauthenticated. The `this.auth()` method is a no-op and no request hook is registered.\n // (2) If only `options.auth` is set, use the default token authentication strategy.\n // (3) If `options.authStrategy` is set then use it and pass in `options.auth`. Always pass own request as many strategies accept a custom request instance.\n // TODO: type `options.auth` based on `options.authStrategy`.\n if (!options.authStrategy) {\n if (!options.auth) {\n // (1)\n this.auth = async () => ({\n type: \"unauthenticated\",\n });\n }\n else {\n // (2)\n const auth = createTokenAuth(options.auth);\n // @ts-ignore ¯\\_(ツ)_/¯\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n }\n else {\n const { authStrategy, ...otherOptions } = options;\n const auth = authStrategy(Object.assign({\n request: this.request,\n log: this.log,\n // we pass the current octokit instance as well as its constructor options\n // to allow for authentication strategies that return a new octokit instance\n // that shares the same internal state as the current one. The original\n // requirement for this was the \"event-octokit\" authentication strategy\n // of https://github.com/probot/octokit-auth-probot.\n octokit: this,\n octokitOptions: otherOptions,\n }, options.auth));\n // @ts-ignore ¯\\_(ツ)_/¯\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n // apply plugins\n // https://stackoverflow.com/a/16345172\n const classConstructor = this.constructor;\n classConstructor.plugins.forEach((plugin) => {\n Object.assign(this, plugin(this, options));\n });\n }\n static defaults(defaults) {\n const OctokitWithDefaults = class extends this {\n constructor(...args) {\n const options = args[0] || {};\n if (typeof defaults === \"function\") {\n super(defaults(options));\n return;\n }\n super(Object.assign({}, defaults, options, options.userAgent && defaults.userAgent\n ? {\n userAgent: `${options.userAgent} ${defaults.userAgent}`,\n }\n : null));\n }\n };\n return OctokitWithDefaults;\n }\n /**\n * Attach a plugin (or many) to your Octokit instance.\n *\n * @example\n * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)\n */\n static plugin(...newPlugins) {\n var _a;\n const currentPlugins = this.plugins;\n const NewOctokit = (_a = class extends this {\n },\n _a.plugins = currentPlugins.concat(newPlugins.filter((plugin) => !currentPlugins.includes(plugin))),\n _a);\n return NewOctokit;\n }\n}\nOctokit.VERSION = VERSION;\nOctokit.plugins = [];\n"],"names":[],"mappings":";;;;;;AAAO,MAAM,OAAO,GAAG,mBAAmB;;ACMnC,MAAM,OAAO,CAAC;AACrB,IAAI,WAAW,CAAC,OAAO,GAAG,EAAE,E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AACb,SAAS,CAAC;AACV,QAAQ,OAAO,mBAAmB,CAAC;AACnC,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAO,MAAM,CAAC,GAAG,UAAU,EAAE;AACjC,QAAQ,IAAI,EAAE,CAAC;AACf,QAAQ,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC;AAC5C,QAAQ,MAAM,UAAU,IAAI,EAAE,GAAG,cAAc,IAAI,CAAC;AACpD,aAAa;AACb,YAAY,EAAE,CAAC,OAAO,GAAG,cAAc,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;AAC/G,YAAY,EAAE,CAAC,CAAC;AAChB,QAAQ,OAAO,UAAU,CAAC;AAC1B,KAAK;AACL,CAAC;AACD,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC;AAC1B,OAAO,CAAC,OAAO,GAAG,EAAE,CAAC;;;;"}
\ No newline at end of file
diff --git a/node_modules/@octokit/core/package.json b/node_modules/@octokit/core/package.json
deleted file mode 100644
index 9f10b09..0000000
--- a/node_modules/@octokit/core/package.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "name": "@octokit/core",
- "description": "Extendable client for GitHub's REST & GraphQL APIs",
- "version": "4.1.0",
- "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": [
- "octokit",
- "github",
- "api",
- "sdk",
- "toolkit"
- ],
- "repository": "github:octokit/core.js",
- "dependencies": {
- "@octokit/auth-token": "^3.0.0",
- "@octokit/graphql": "^5.0.0",
- "@octokit/request": "^6.0.0",
- "@octokit/request-error": "^3.0.0",
- "@octokit/types": "^8.0.0",
- "before-after-hook": "^2.2.0",
- "universal-user-agent": "^6.0.0"
- },
- "devDependencies": {
- "@octokit/auth": "^3.0.1",
- "@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": "^29.0.0",
- "@types/lolex": "^5.1.0",
- "@types/node": "^16.0.0",
- "fetch-mock": "^9.0.0",
- "http-proxy-agent": "^5.0.0",
- "jest": "^29.0.0",
- "lolex": "^6.0.0",
- "prettier": "2.7.1",
- "proxy": "^1.0.1",
- "semantic-release": "^19.0.0",
- "semantic-release-plugin-update-version-in-files": "^1.0.0",
- "ts-jest": "^29.0.0",
- "typescript": "^4.0.2"
- },
- "engines": {
- "node": ">= 14"
- },
- "publishConfig": {
- "access": "public"
- }
-}
diff --git a/node_modules/@octokit/endpoint/LICENSE b/node_modules/@octokit/endpoint/LICENSE
deleted file mode 100644
index af5366d..0000000
--- a/node_modules/@octokit/endpoint/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License
-
-Copyright (c) 2018 Octokit contributors
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/@octokit/endpoint/README.md b/node_modules/@octokit/endpoint/README.md
deleted file mode 100644
index 5452a45..0000000
--- a/node_modules/@octokit/endpoint/README.md
+++ /dev/null
@@ -1,421 +0,0 @@
-# endpoint.js
-
-> Turns GitHub REST API endpoints into generic request options
-
-[](https://www.npmjs.com/package/@octokit/endpoint)
-[](https://github.com/octokit/endpoint.js/actions/workflows/test.yml?query=branch%3Amaster)
-
-`@octokit/endpoint` combines [GitHub REST API routes](https://developer.github.com/v3/) with your parameters and turns them into generic request options that can be used in any request library.
-
-
-
-
-
-- [Usage](#usage)
-- [API](#api)
- - [`endpoint(route, options)` or `endpoint(options)`](#endpointroute-options-or-endpointoptions)
- - [`endpoint.defaults()`](#endpointdefaults)
- - [`endpoint.DEFAULTS`](#endpointdefaults)
- - [`endpoint.merge(route, options)` or `endpoint.merge(options)`](#endpointmergeroute-options-or-endpointmergeoptions)
- - [`endpoint.parse()`](#endpointparse)
-- [Special cases](#special-cases)
- - [The `data` parameter – set request body directly](#the-data-parameter-%E2%80%93-set-request-body-directly)
- - [Set parameters for both the URL/query and the request body](#set-parameters-for-both-the-urlquery-and-the-request-body)
-- [LICENSE](#license)
-
-
-
-## Usage
-
-
-
-Example for [List organization repositories](https://developer.github.com/v3/repos/#list-organization-repositories)
-
-```js
-const requestOptions = endpoint("GET /orgs/{org}/repos", {
- headers: {
- authorization: "token 0000000000000000000000000000000000000001",
- },
- org: "octokit",
- type: "private",
-});
-```
-
-The resulting `requestOptions` looks as follows
-
-```json
-{
- "method": "GET",
- "url": "https://api.github.com/orgs/octokit/repos?type=private",
- "headers": {
- "accept": "application/vnd.github.v3+json",
- "authorization": "token 0000000000000000000000000000000000000001",
- "user-agent": "octokit/endpoint.js v1.2.3"
- }
-}
-```
-
-You can pass `requestOptions` to common request libraries
-
-```js
-const { url, ...options } = requestOptions;
-// using with fetch (https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)
-fetch(url, options);
-// using with request (https://github.com/request/request)
-request(requestOptions);
-// using with got (https://github.com/sindresorhus/got)
-got[options.method](url, options);
-// using with axios
-axios(requestOptions);
-```
-
-## API
-
-### `endpoint(route, options)` or `endpoint(options)`
-
-
-
-
-
- name
-
-
- type
-
-
- description
-
-
-
-
-
-
- route
-
-
- String
-
-
- If set, it has to be a string consisting of URL and the request method, e.g., GET /orgs/{org}. If it’s set to a URL, only the method defaults to GET.
-
-
-
-
- options.method
-
-
- String
-
-
- Required unless route is set. Any supported http verb. Defaults to GET.
-
-
-
-
- options.url
-
-
- String
-
-
- Required unless route is set. A path or full URL which may contain :variable or {variable} placeholders,
- e.g., /orgs/{org}/repos. The url is parsed using url-template.
-
-
-
-
- options.baseUrl
-
-
- String
-
-
- Defaults to https://api.github.com.
-
-
-
-
- options.headers
-
-
- Object
-
-
- Custom headers. Passed headers are merged with defaults:
- headers['user-agent'] defaults to octokit-endpoint.js/1.2.3 (where 1.2.3 is the released version).
- headers['accept'] defaults to application/vnd.github.v3+json.
-
-
-
-
- options.mediaType.format
-
-
- String
-
-
- Media type param, such as raw, diff, or text+json. See Media Types. Setting options.mediaType.format will amend the headers.accept value.
-
-
-
-
- options.mediaType.previews
-
-
- Array of Strings
-
-
- Name of previews, such as mercy, symmetra, or scarlet-witch. See API Previews. If options.mediaType.previews was set as default, the new previews will be merged into the default ones. Setting options.mediaType.previews will amend the headers.accept value. options.mediaType.previews will be merged with an existing array set using .defaults().
-
-
-
-
- options.data
-
-
- Any
-
-
- Set request body directly instead of setting it to JSON based on additional parameters. See "The data parameter" below.
-
-
-
-
- options.request
-
-
- Object
-
-
- Pass custom meta information for the request. The request object will be returned as is.
-
-
-
-
-
-All other options will be passed depending on the `method` and `url` options.
-
-1. If the option key has a placeholder in the `url`, it will be used as the replacement. For example, if the passed options are `{url: '/orgs/{org}/repos', org: 'foo'}` the returned `options.url` is `https://api.github.com/orgs/foo/repos`.
-2. If the `method` is `GET` or `HEAD`, the option is passed as a query parameter.
-3. Otherwise, the parameter is passed in the request body as a JSON key.
-
-**Result**
-
-`endpoint()` is a synchronous method and returns an object with the following keys:
-
-
-
-
-
- key
-
-
- type
-
-
- description
-
-
-
-
-
-
method
-
String
-
The http method. Always lowercase.
-
-
-
url
-
String
-
The url with placeholders replaced with passed parameters.
-
-
-
headers
-
Object
-
All header names are lowercased.
-
-
-
body
-
Any
-
The request body if one is present. Only for PATCH, POST, PUT, DELETE requests.
-
-
-
request
-
Object
-
Request meta option, it will be returned as it was passed into endpoint()
-
-
-
-
-### `endpoint.defaults()`
-
-Override or set default options. Example:
-
-```js
-const request = require("request");
-const myEndpoint = require("@octokit/endpoint").defaults({
- baseUrl: "https://github-enterprise.acme-inc.com/api/v3",
- headers: {
- "user-agent": "myApp/1.2.3",
- authorization: `token 0000000000000000000000000000000000000001`,
- },
- org: "my-project",
- per_page: 100,
-});
-
-request(myEndpoint(`GET /orgs/{org}/repos`));
-```
-
-You can call `.defaults()` again on the returned method, the defaults will cascade.
-
-```js
-const myProjectEndpoint = endpoint.defaults({
- baseUrl: "https://github-enterprise.acme-inc.com/api/v3",
- headers: {
- "user-agent": "myApp/1.2.3",
- },
- org: "my-project",
-});
-const myProjectEndpointWithAuth = myProjectEndpoint.defaults({
- headers: {
- authorization: `token 0000000000000000000000000000000000000001`,
- },
-});
-```
-
-`myProjectEndpointWithAuth` now defaults the `baseUrl`, `headers['user-agent']`,
-`org` and `headers['authorization']` on top of `headers['accept']` that is set
-by the global default.
-
-### `endpoint.DEFAULTS`
-
-The current default options.
-
-```js
-endpoint.DEFAULTS.baseUrl; // https://api.github.com
-const myEndpoint = endpoint.defaults({
- baseUrl: "https://github-enterprise.acme-inc.com/api/v3",
-});
-myEndpoint.DEFAULTS.baseUrl; // https://github-enterprise.acme-inc.com/api/v3
-```
-
-### `endpoint.merge(route, options)` or `endpoint.merge(options)`
-
-Get the defaulted endpoint options, but without parsing them into request options:
-
-```js
-const myProjectEndpoint = endpoint.defaults({
- baseUrl: "https://github-enterprise.acme-inc.com/api/v3",
- headers: {
- "user-agent": "myApp/1.2.3",
- },
- org: "my-project",
-});
-myProjectEndpoint.merge("GET /orgs/{org}/repos", {
- headers: {
- authorization: `token 0000000000000000000000000000000000000001`,
- },
- org: "my-secret-project",
- type: "private",
-});
-
-// {
-// baseUrl: 'https://github-enterprise.acme-inc.com/api/v3',
-// method: 'GET',
-// url: '/orgs/{org}/repos',
-// headers: {
-// accept: 'application/vnd.github.v3+json',
-// authorization: `token 0000000000000000000000000000000000000001`,
-// 'user-agent': 'myApp/1.2.3'
-// },
-// org: 'my-secret-project',
-// type: 'private'
-// }
-```
-
-### `endpoint.parse()`
-
-Stateless method to turn endpoint options into request options. Calling
-`endpoint(options)` is the same as calling `endpoint.parse(endpoint.merge(options))`.
-
-## Special cases
-
-
-
-### The `data` parameter – set request body directly
-
-Some endpoints such as [Render a Markdown document in raw mode](https://developer.github.com/v3/markdown/#render-a-markdown-document-in-raw-mode) don’t have parameters that are sent as request body keys, instead, the request body needs to be set directly. In these cases, set the `data` parameter.
-
-```js
-const options = endpoint("POST /markdown/raw", {
- data: "Hello world github/linguist#1 **cool**, and #1!",
- headers: {
- accept: "text/html;charset=utf-8",
- "content-type": "text/plain",
- },
-});
-
-// options is
-// {
-// method: 'post',
-// url: 'https://api.github.com/markdown/raw',
-// headers: {
-// accept: 'text/html;charset=utf-8',
-// 'content-type': 'text/plain',
-// 'user-agent': userAgent
-// },
-// body: 'Hello world github/linguist#1 **cool**, and #1!'
-// }
-```
-
-### Set parameters for both the URL/query and the request body
-
-There are API endpoints that accept both query parameters as well as a body. In that case, you need to add the query parameters as templates to `options.url`, as defined in the [RFC 6570 URI Template specification](https://tools.ietf.org/html/rfc6570).
-
-Example
-
-```js
-endpoint(
- "POST https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}",
- {
- name: "example.zip",
- label: "short description",
- headers: {
- "content-type": "text/plain",
- "content-length": 14,
- authorization: `token 0000000000000000000000000000000000000001`,
- },
- data: "Hello, world!",
- }
-);
-```
-
-## LICENSE
-
-[MIT](LICENSE)
diff --git a/node_modules/@octokit/endpoint/dist-node/index.js b/node_modules/@octokit/endpoint/dist-node/index.js
deleted file mode 100644
index 1e59eb1..0000000
--- a/node_modules/@octokit/endpoint/dist-node/index.js
+++ /dev/null
@@ -1,388 +0,0 @@
-'use strict';
-
-Object.defineProperty(exports, '__esModule', { value: true });
-
-var isPlainObject = require('is-plain-object');
-var universalUserAgent = require('universal-user-agent');
-
-function lowercaseKeys(object) {
- if (!object) {
- return {};
- }
-
- return Object.keys(object).reduce((newObj, key) => {
- newObj[key.toLowerCase()] = object[key];
- return newObj;
- }, {});
-}
-
-function mergeDeep(defaults, options) {
- const result = Object.assign({}, defaults);
- Object.keys(options).forEach(key => {
- if (isPlainObject.isPlainObject(options[key])) {
- if (!(key in defaults)) Object.assign(result, {
- [key]: options[key]
- });else result[key] = mergeDeep(defaults[key], options[key]);
- } else {
- Object.assign(result, {
- [key]: options[key]
- });
- }
- });
- return result;
-}
-
-function removeUndefinedProperties(obj) {
- for (const key in obj) {
- if (obj[key] === undefined) {
- delete obj[key];
- }
- }
-
- return obj;
-}
-
-function merge(defaults, route, options) {
- if (typeof route === "string") {
- let [method, url] = route.split(" ");
- options = Object.assign(url ? {
- method,
- url
- } : {
- url: method
- }, options);
- } else {
- options = Object.assign({}, route);
- } // lowercase header names before merging with defaults to avoid duplicates
-
-
- options.headers = lowercaseKeys(options.headers); // remove properties with undefined values before merging
-
- removeUndefinedProperties(options);
- removeUndefinedProperties(options.headers);
- const mergedOptions = mergeDeep(defaults || {}, options); // mediaType.previews arrays are merged, instead of overwritten
-
- if (defaults && defaults.mediaType.previews.length) {
- mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(preview => !mergedOptions.mediaType.previews.includes(preview)).concat(mergedOptions.mediaType.previews);
- }
-
- mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map(preview => preview.replace(/-preview/, ""));
- return mergedOptions;
-}
-
-function addQueryParameters(url, parameters) {
- const separator = /\?/.test(url) ? "&" : "?";
- const names = Object.keys(parameters);
-
- if (names.length === 0) {
- return url;
- }
-
- return url + separator + names.map(name => {
- if (name === "q") {
- return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+");
- }
-
- return `${name}=${encodeURIComponent(parameters[name])}`;
- }).join("&");
-}
-
-const urlVariableRegex = /\{[^}]+\}/g;
-
-function removeNonChars(variableName) {
- return variableName.replace(/^\W+|\W+$/g, "").split(/,/);
-}
-
-function extractUrlVariableNames(url) {
- const matches = url.match(urlVariableRegex);
-
- if (!matches) {
- return [];
- }
-
- return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);
-}
-
-function omit(object, keysToOmit) {
- return Object.keys(object).filter(option => !keysToOmit.includes(option)).reduce((obj, key) => {
- obj[key] = object[key];
- return obj;
- }, {});
-}
-
-// Based on https://github.com/bramstein/url-template, licensed under BSD
-// TODO: create separate package.
-//
-// Copyright (c) 2012-2014, Bram Stein
-// All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in the
-// documentation and/or other materials provided with the distribution.
-// 3. The name of the author may not be used to endorse or promote products
-// derived from this software without specific prior written permission.
-// THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-/* istanbul ignore file */
-function encodeReserved(str) {
- return str.split(/(%[0-9A-Fa-f]{2})/g).map(function (part) {
- if (!/%[0-9A-Fa-f]/.test(part)) {
- part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]");
- }
-
- return part;
- }).join("");
-}
-
-function encodeUnreserved(str) {
- return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {
- return "%" + c.charCodeAt(0).toString(16).toUpperCase();
- });
-}
-
-function encodeValue(operator, value, key) {
- value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value);
-
- if (key) {
- return encodeUnreserved(key) + "=" + value;
- } else {
- return value;
- }
-}
-
-function isDefined(value) {
- return value !== undefined && value !== null;
-}
-
-function isKeyOperator(operator) {
- return operator === ";" || operator === "&" || operator === "?";
-}
-
-function getValues(context, operator, key, modifier) {
- var value = context[key],
- result = [];
-
- if (isDefined(value) && value !== "") {
- if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
- value = value.toString();
-
- if (modifier && modifier !== "*") {
- value = value.substring(0, parseInt(modifier, 10));
- }
-
- result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : ""));
- } else {
- if (modifier === "*") {
- if (Array.isArray(value)) {
- value.filter(isDefined).forEach(function (value) {
- result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : ""));
- });
- } else {
- Object.keys(value).forEach(function (k) {
- if (isDefined(value[k])) {
- result.push(encodeValue(operator, value[k], k));
- }
- });
- }
- } else {
- const tmp = [];
-
- if (Array.isArray(value)) {
- value.filter(isDefined).forEach(function (value) {
- tmp.push(encodeValue(operator, value));
- });
- } else {
- Object.keys(value).forEach(function (k) {
- if (isDefined(value[k])) {
- tmp.push(encodeUnreserved(k));
- tmp.push(encodeValue(operator, value[k].toString()));
- }
- });
- }
-
- if (isKeyOperator(operator)) {
- result.push(encodeUnreserved(key) + "=" + tmp.join(","));
- } else if (tmp.length !== 0) {
- result.push(tmp.join(","));
- }
- }
- }
- } else {
- if (operator === ";") {
- if (isDefined(value)) {
- result.push(encodeUnreserved(key));
- }
- } else if (value === "" && (operator === "&" || operator === "?")) {
- result.push(encodeUnreserved(key) + "=");
- } else if (value === "") {
- result.push("");
- }
- }
-
- return result;
-}
-
-function parseUrl(template) {
- return {
- expand: expand.bind(null, template)
- };
-}
-
-function expand(template, context) {
- var operators = ["+", "#", ".", "/", ";", "?", "&"];
- return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) {
- if (expression) {
- let operator = "";
- const values = [];
-
- if (operators.indexOf(expression.charAt(0)) !== -1) {
- operator = expression.charAt(0);
- expression = expression.substr(1);
- }
-
- expression.split(/,/g).forEach(function (variable) {
- var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable);
- values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));
- });
-
- if (operator && operator !== "+") {
- var separator = ",";
-
- if (operator === "?") {
- separator = "&";
- } else if (operator !== "#") {
- separator = operator;
- }
-
- return (values.length !== 0 ? operator : "") + values.join(separator);
- } else {
- return values.join(",");
- }
- } else {
- return encodeReserved(literal);
- }
- });
-}
-
-function parse(options) {
- // https://fetch.spec.whatwg.org/#methods
- let method = options.method.toUpperCase(); // replace :varname with {varname} to make it RFC 6570 compatible
-
- let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}");
- let headers = Object.assign({}, options.headers);
- let body;
- let parameters = omit(options, ["method", "baseUrl", "url", "headers", "request", "mediaType"]); // extract variable names from URL to calculate remaining variables later
-
- const urlVariableNames = extractUrlVariableNames(url);
- url = parseUrl(url).expand(parameters);
-
- if (!/^http/.test(url)) {
- url = options.baseUrl + url;
- }
-
- const omittedParameters = Object.keys(options).filter(option => urlVariableNames.includes(option)).concat("baseUrl");
- const remainingParameters = omit(parameters, omittedParameters);
- const isBinaryRequest = /application\/octet-stream/i.test(headers.accept);
-
- if (!isBinaryRequest) {
- if (options.mediaType.format) {
- // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw
- headers.accept = headers.accept.split(/,/).map(preview => preview.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`)).join(",");
- }
-
- if (options.mediaType.previews.length) {
- const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || [];
- headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map(preview => {
- const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json";
- return `application/vnd.github.${preview}-preview${format}`;
- }).join(",");
- }
- } // for GET/HEAD requests, set URL query parameters from remaining parameters
- // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters
-
-
- if (["GET", "HEAD"].includes(method)) {
- url = addQueryParameters(url, remainingParameters);
- } else {
- if ("data" in remainingParameters) {
- body = remainingParameters.data;
- } else {
- if (Object.keys(remainingParameters).length) {
- body = remainingParameters;
- }
- }
- } // default content-type for JSON if body is set
-
-
- if (!headers["content-type"] && typeof body !== "undefined") {
- headers["content-type"] = "application/json; charset=utf-8";
- } // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body.
- // fetch does not allow to set `content-length` header, but we can set body to an empty string
-
-
- if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") {
- body = "";
- } // Only return body/request keys if present
-
-
- return Object.assign({
- method,
- url,
- headers
- }, typeof body !== "undefined" ? {
- body
- } : null, options.request ? {
- request: options.request
- } : null);
-}
-
-function endpointWithDefaults(defaults, route, options) {
- return parse(merge(defaults, route, options));
-}
-
-function withDefaults(oldDefaults, newDefaults) {
- const DEFAULTS = merge(oldDefaults, newDefaults);
- const endpoint = endpointWithDefaults.bind(null, DEFAULTS);
- return Object.assign(endpoint, {
- DEFAULTS,
- defaults: withDefaults.bind(null, DEFAULTS),
- merge: merge.bind(null, DEFAULTS),
- parse
- });
-}
-
-const VERSION = "7.0.3";
-
-const userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`; // DEFAULTS has all properties set that EndpointOptions has, except url.
-// So we use RequestParameters and add method as additional required property.
-
-const DEFAULTS = {
- method: "GET",
- baseUrl: "https://api.github.com",
- headers: {
- accept: "application/vnd.github.v3+json",
- "user-agent": userAgent
- },
- mediaType: {
- format: "",
- previews: []
- }
-};
-
-const endpoint = withDefaults(null, DEFAULTS);
-
-exports.endpoint = endpoint;
-//# sourceMappingURL=index.js.map
diff --git a/node_modules/@octokit/endpoint/dist-node/index.js.map b/node_modules/@octokit/endpoint/dist-node/index.js.map
deleted file mode 100644
index a9a1f0e..0000000
--- a/node_modules/@octokit/endpoint/dist-node/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sources":["../dist-src/util/lowercase-keys.js","../dist-src/util/merge-deep.js","../dist-src/util/remove-undefined-properties.js","../dist-src/merge.js","../dist-src/util/add-query-parameters.js","../dist-src/util/extract-url-variable-names.js","../dist-src/util/omit.js","../dist-src/util/url-template.js","../dist-src/parse.js","../dist-src/endpoint-with-defaults.js","../dist-src/with-defaults.js","../dist-src/version.js","../dist-src/defaults.js","../dist-src/index.js"],"sourcesContent":["export function lowercaseKeys(object) {\n if (!object) {\n return {};\n }\n return Object.keys(object).reduce((newObj, key) => {\n newObj[key.toLowerCase()] = object[key];\n return newObj;\n }, {});\n}\n","import { isPlainObject } from \"is-plain-object\";\nexport function mergeDeep(defaults, options) {\n const result = Object.assign({}, defaults);\n Object.keys(options).forEach((key) => {\n if (isPlainObject(options[key])) {\n if (!(key in defaults))\n Object.assign(result, { [key]: options[key] });\n else\n result[key] = mergeDeep(defaults[key], options[key]);\n }\n else {\n Object.assign(result, { [key]: options[key] });\n }\n });\n return result;\n}\n","export function removeUndefinedProperties(obj) {\n for (const key in obj) {\n if (obj[key] === undefined) {\n delete obj[key];\n }\n }\n return obj;\n}\n","import { lowercaseKeys } from \"./util/lowercase-keys\";\nimport { mergeDeep } from \"./util/merge-deep\";\nimport { removeUndefinedProperties } from \"./util/remove-undefined-properties\";\nexport function merge(defaults, route, options) {\n if (typeof route === \"string\") {\n let [method, url] = route.split(\" \");\n options = Object.assign(url ? { method, url } : { url: method }, options);\n }\n else {\n options = Object.assign({}, route);\n }\n // lowercase header names before merging with defaults to avoid duplicates\n options.headers = lowercaseKeys(options.headers);\n // remove properties with undefined values before merging\n removeUndefinedProperties(options);\n removeUndefinedProperties(options.headers);\n const mergedOptions = mergeDeep(defaults || {}, options);\n // mediaType.previews arrays are merged, instead of overwritten\n if (defaults && defaults.mediaType.previews.length) {\n mergedOptions.mediaType.previews = defaults.mediaType.previews\n .filter((preview) => !mergedOptions.mediaType.previews.includes(preview))\n .concat(mergedOptions.mediaType.previews);\n }\n mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, \"\"));\n return mergedOptions;\n}\n","export function addQueryParameters(url, parameters) {\n const separator = /\\?/.test(url) ? \"&\" : \"?\";\n const names = Object.keys(parameters);\n if (names.length === 0) {\n return url;\n }\n return (url +\n separator +\n names\n .map((name) => {\n if (name === \"q\") {\n return (\"q=\" + parameters.q.split(\"+\").map(encodeURIComponent).join(\"+\"));\n }\n return `${name}=${encodeURIComponent(parameters[name])}`;\n })\n .join(\"&\"));\n}\n","const urlVariableRegex = /\\{[^}]+\\}/g;\nfunction removeNonChars(variableName) {\n return variableName.replace(/^\\W+|\\W+$/g, \"\").split(/,/);\n}\nexport function extractUrlVariableNames(url) {\n const matches = url.match(urlVariableRegex);\n if (!matches) {\n return [];\n }\n return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);\n}\n","export function omit(object, keysToOmit) {\n return Object.keys(object)\n .filter((option) => !keysToOmit.includes(option))\n .reduce((obj, key) => {\n obj[key] = object[key];\n return obj;\n }, {});\n}\n","// Based on https://github.com/bramstein/url-template, licensed under BSD\n// TODO: create separate package.\n//\n// Copyright (c) 2012-2014, Bram Stein\n// All rights reserved.\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions\n// are met:\n// 1. Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// 2. Redistributions in binary form must reproduce the above copyright\n// notice, this list of conditions and the following disclaimer in the\n// documentation and/or other materials provided with the distribution.\n// 3. The name of the author may not be used to endorse or promote products\n// derived from this software without specific prior written permission.\n// THIS SOFTWARE IS PROVIDED BY THE AUTHOR \"AS IS\" AND ANY EXPRESS OR IMPLIED\n// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n/* istanbul ignore file */\nfunction encodeReserved(str) {\n return str\n .split(/(%[0-9A-Fa-f]{2})/g)\n .map(function (part) {\n if (!/%[0-9A-Fa-f]/.test(part)) {\n part = encodeURI(part).replace(/%5B/g, \"[\").replace(/%5D/g, \"]\");\n }\n return part;\n })\n .join(\"\");\n}\nfunction encodeUnreserved(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\nfunction encodeValue(operator, value, key) {\n value =\n operator === \"+\" || operator === \"#\"\n ? encodeReserved(value)\n : encodeUnreserved(value);\n if (key) {\n return encodeUnreserved(key) + \"=\" + value;\n }\n else {\n return value;\n }\n}\nfunction isDefined(value) {\n return value !== undefined && value !== null;\n}\nfunction isKeyOperator(operator) {\n return operator === \";\" || operator === \"&\" || operator === \"?\";\n}\nfunction getValues(context, operator, key, modifier) {\n var value = context[key], result = [];\n if (isDefined(value) && value !== \"\") {\n if (typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\") {\n value = value.toString();\n if (modifier && modifier !== \"*\") {\n value = value.substring(0, parseInt(modifier, 10));\n }\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n }\n else {\n if (modifier === \"*\") {\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n result.push(encodeValue(operator, value[k], k));\n }\n });\n }\n }\n else {\n const tmp = [];\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n tmp.push(encodeValue(operator, value));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n tmp.push(encodeUnreserved(k));\n tmp.push(encodeValue(operator, value[k].toString()));\n }\n });\n }\n if (isKeyOperator(operator)) {\n result.push(encodeUnreserved(key) + \"=\" + tmp.join(\",\"));\n }\n else if (tmp.length !== 0) {\n result.push(tmp.join(\",\"));\n }\n }\n }\n }\n else {\n if (operator === \";\") {\n if (isDefined(value)) {\n result.push(encodeUnreserved(key));\n }\n }\n else if (value === \"\" && (operator === \"&\" || operator === \"?\")) {\n result.push(encodeUnreserved(key) + \"=\");\n }\n else if (value === \"\") {\n result.push(\"\");\n }\n }\n return result;\n}\nexport function parseUrl(template) {\n return {\n expand: expand.bind(null, template),\n };\n}\nfunction expand(template, context) {\n var operators = [\"+\", \"#\", \".\", \"/\", \";\", \"?\", \"&\"];\n return template.replace(/\\{([^\\{\\}]+)\\}|([^\\{\\}]+)/g, function (_, expression, literal) {\n if (expression) {\n let operator = \"\";\n const values = [];\n if (operators.indexOf(expression.charAt(0)) !== -1) {\n operator = expression.charAt(0);\n expression = expression.substr(1);\n }\n expression.split(/,/g).forEach(function (variable) {\n var tmp = /([^:\\*]*)(?::(\\d+)|(\\*))?/.exec(variable);\n values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\n });\n if (operator && operator !== \"+\") {\n var separator = \",\";\n if (operator === \"?\") {\n separator = \"&\";\n }\n else if (operator !== \"#\") {\n separator = operator;\n }\n return (values.length !== 0 ? operator : \"\") + values.join(separator);\n }\n else {\n return values.join(\",\");\n }\n }\n else {\n return encodeReserved(literal);\n }\n });\n}\n","import { addQueryParameters } from \"./util/add-query-parameters\";\nimport { extractUrlVariableNames } from \"./util/extract-url-variable-names\";\nimport { omit } from \"./util/omit\";\nimport { parseUrl } from \"./util/url-template\";\nexport function parse(options) {\n // https://fetch.spec.whatwg.org/#methods\n let method = options.method.toUpperCase();\n // replace :varname with {varname} to make it RFC 6570 compatible\n let url = (options.url || \"/\").replace(/:([a-z]\\w+)/g, \"{$1}\");\n let headers = Object.assign({}, options.headers);\n let body;\n let parameters = omit(options, [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"mediaType\",\n ]);\n // extract variable names from URL to calculate remaining variables later\n const urlVariableNames = extractUrlVariableNames(url);\n url = parseUrl(url).expand(parameters);\n if (!/^http/.test(url)) {\n url = options.baseUrl + url;\n }\n const omittedParameters = Object.keys(options)\n .filter((option) => urlVariableNames.includes(option))\n .concat(\"baseUrl\");\n const remainingParameters = omit(parameters, omittedParameters);\n const isBinaryRequest = /application\\/octet-stream/i.test(headers.accept);\n if (!isBinaryRequest) {\n if (options.mediaType.format) {\n // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw\n headers.accept = headers.accept\n .split(/,/)\n .map((preview) => preview.replace(/application\\/vnd(\\.\\w+)(\\.v3)?(\\.\\w+)?(\\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`))\n .join(\",\");\n }\n if (options.mediaType.previews.length) {\n const previewsFromAcceptHeader = headers.accept.match(/[\\w-]+(?=-preview)/g) || [];\n headers.accept = previewsFromAcceptHeader\n .concat(options.mediaType.previews)\n .map((preview) => {\n const format = options.mediaType.format\n ? `.${options.mediaType.format}`\n : \"+json\";\n return `application/vnd.github.${preview}-preview${format}`;\n })\n .join(\",\");\n }\n }\n // for GET/HEAD requests, set URL query parameters from remaining parameters\n // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters\n if ([\"GET\", \"HEAD\"].includes(method)) {\n url = addQueryParameters(url, remainingParameters);\n }\n else {\n if (\"data\" in remainingParameters) {\n body = remainingParameters.data;\n }\n else {\n if (Object.keys(remainingParameters).length) {\n body = remainingParameters;\n }\n }\n }\n // default content-type for JSON if body is set\n if (!headers[\"content-type\"] && typeof body !== \"undefined\") {\n headers[\"content-type\"] = \"application/json; charset=utf-8\";\n }\n // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body.\n // fetch does not allow to set `content-length` header, but we can set body to an empty string\n if ([\"PATCH\", \"PUT\"].includes(method) && typeof body === \"undefined\") {\n body = \"\";\n }\n // Only return body/request keys if present\n return Object.assign({ method, url, headers }, typeof body !== \"undefined\" ? { body } : null, options.request ? { request: options.request } : null);\n}\n","import { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function endpointWithDefaults(defaults, route, options) {\n return parse(merge(defaults, route, options));\n}\n","import { endpointWithDefaults } from \"./endpoint-with-defaults\";\nimport { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function withDefaults(oldDefaults, newDefaults) {\n const DEFAULTS = merge(oldDefaults, newDefaults);\n const endpoint = endpointWithDefaults.bind(null, DEFAULTS);\n return Object.assign(endpoint, {\n DEFAULTS,\n defaults: withDefaults.bind(null, DEFAULTS),\n merge: merge.bind(null, DEFAULTS),\n parse,\n });\n}\n","export const VERSION = \"7.0.3\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nconst userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`;\n// DEFAULTS has all properties set that EndpointOptions has, except url.\n// So we use RequestParameters and add method as additional required property.\nexport const DEFAULTS = {\n method: \"GET\",\n baseUrl: \"https://api.github.com\",\n headers: {\n accept: \"application/vnd.github.v3+json\",\n \"user-agent\": userAgent,\n },\n mediaType: {\n format: \"\",\n previews: [],\n },\n};\n","import { withDefaults } from \"./with-defaults\";\nimport { DEFAULTS } from \"./defaults\";\nexport const endpoint = withDefaults(null, DEFAULTS);\n"],"names":["lowercaseKeys","object","Object","keys","reduce","newObj","key","toLowerCase","mergeDeep","defaults","options","result","assign","forEach","isPlainObject","removeUndefinedProperties","obj","undefined","merge","route","method","url","split","headers","mergedOptions","mediaType","previews","length","filter","preview","includes","concat","map","replace","addQueryParameters","parameters","separator","test","names","name","q","encodeURIComponent","join","urlVariableRegex","removeNonChars","variableName","extractUrlVariableNames","matches","match","a","b","omit","keysToOmit","option","encodeReserved","str","part","encodeURI","encodeUnreserved","c","charCodeAt","toString","toUpperCase","encodeValue","operator","value","isDefined","isKeyOperator","getValues","context","modifier","substring","parseInt","push","Array","isArray","k","tmp","parseUrl","template","expand","bind","operators","_","expression","literal","values","indexOf","charAt","substr","variable","exec","parse","body","urlVariableNames","baseUrl","omittedParameters","remainingParameters","isBinaryRequest","accept","format","previewsFromAcceptHeader","data","request","endpointWithDefaults","withDefaults","oldDefaults","newDefaults","DEFAULTS","endpoint","VERSION","userAgent","getUserAgent"],"mappings":";;;;;;;AAAO,SAASA,aAAT,CAAuBC,MAAvB,EAA+B;EAClC,IAAI,CAACA,MAAL,EAAa;IACT,OAAO,EAAP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
diff --git a/node_modules/@octokit/endpoint/dist-src/defaults.js b/node_modules/@octokit/endpoint/dist-src/defaults.js
deleted file mode 100644
index 456e586..0000000
--- a/node_modules/@octokit/endpoint/dist-src/defaults.js
+++ /dev/null
@@ -1,17 +0,0 @@
-import { getUserAgent } from "universal-user-agent";
-import { VERSION } from "./version";
-const userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`;
-// DEFAULTS has all properties set that EndpointOptions has, except url.
-// So we use RequestParameters and add method as additional required property.
-export const DEFAULTS = {
- method: "GET",
- baseUrl: "https://api.github.com",
- headers: {
- accept: "application/vnd.github.v3+json",
- "user-agent": userAgent,
- },
- mediaType: {
- format: "",
- previews: [],
- },
-};
diff --git a/node_modules/@octokit/endpoint/dist-src/endpoint-with-defaults.js b/node_modules/@octokit/endpoint/dist-src/endpoint-with-defaults.js
deleted file mode 100644
index 5763758..0000000
--- a/node_modules/@octokit/endpoint/dist-src/endpoint-with-defaults.js
+++ /dev/null
@@ -1,5 +0,0 @@
-import { merge } from "./merge";
-import { parse } from "./parse";
-export function endpointWithDefaults(defaults, route, options) {
- return parse(merge(defaults, route, options));
-}
diff --git a/node_modules/@octokit/endpoint/dist-src/index.js b/node_modules/@octokit/endpoint/dist-src/index.js
deleted file mode 100644
index 599917f..0000000
--- a/node_modules/@octokit/endpoint/dist-src/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import { withDefaults } from "./with-defaults";
-import { DEFAULTS } from "./defaults";
-export const endpoint = withDefaults(null, DEFAULTS);
diff --git a/node_modules/@octokit/endpoint/dist-src/merge.js b/node_modules/@octokit/endpoint/dist-src/merge.js
deleted file mode 100644
index 1abcecf..0000000
--- a/node_modules/@octokit/endpoint/dist-src/merge.js
+++ /dev/null
@@ -1,26 +0,0 @@
-import { lowercaseKeys } from "./util/lowercase-keys";
-import { mergeDeep } from "./util/merge-deep";
-import { removeUndefinedProperties } from "./util/remove-undefined-properties";
-export function merge(defaults, route, options) {
- if (typeof route === "string") {
- let [method, url] = route.split(" ");
- options = Object.assign(url ? { method, url } : { url: method }, options);
- }
- else {
- options = Object.assign({}, route);
- }
- // lowercase header names before merging with defaults to avoid duplicates
- options.headers = lowercaseKeys(options.headers);
- // remove properties with undefined values before merging
- removeUndefinedProperties(options);
- removeUndefinedProperties(options.headers);
- const mergedOptions = mergeDeep(defaults || {}, options);
- // mediaType.previews arrays are merged, instead of overwritten
- if (defaults && defaults.mediaType.previews.length) {
- mergedOptions.mediaType.previews = defaults.mediaType.previews
- .filter((preview) => !mergedOptions.mediaType.previews.includes(preview))
- .concat(mergedOptions.mediaType.previews);
- }
- mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, ""));
- return mergedOptions;
-}
diff --git a/node_modules/@octokit/endpoint/dist-src/parse.js b/node_modules/@octokit/endpoint/dist-src/parse.js
deleted file mode 100644
index 8cf5885..0000000
--- a/node_modules/@octokit/endpoint/dist-src/parse.js
+++ /dev/null
@@ -1,78 +0,0 @@
-import { addQueryParameters } from "./util/add-query-parameters";
-import { extractUrlVariableNames } from "./util/extract-url-variable-names";
-import { omit } from "./util/omit";
-import { parseUrl } from "./util/url-template";
-export function parse(options) {
- // https://fetch.spec.whatwg.org/#methods
- let method = options.method.toUpperCase();
- // replace :varname with {varname} to make it RFC 6570 compatible
- let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}");
- let headers = Object.assign({}, options.headers);
- let body;
- let parameters = omit(options, [
- "method",
- "baseUrl",
- "url",
- "headers",
- "request",
- "mediaType",
- ]);
- // extract variable names from URL to calculate remaining variables later
- const urlVariableNames = extractUrlVariableNames(url);
- url = parseUrl(url).expand(parameters);
- if (!/^http/.test(url)) {
- url = options.baseUrl + url;
- }
- const omittedParameters = Object.keys(options)
- .filter((option) => urlVariableNames.includes(option))
- .concat("baseUrl");
- const remainingParameters = omit(parameters, omittedParameters);
- const isBinaryRequest = /application\/octet-stream/i.test(headers.accept);
- if (!isBinaryRequest) {
- if (options.mediaType.format) {
- // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw
- headers.accept = headers.accept
- .split(/,/)
- .map((preview) => preview.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`))
- .join(",");
- }
- if (options.mediaType.previews.length) {
- const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || [];
- headers.accept = previewsFromAcceptHeader
- .concat(options.mediaType.previews)
- .map((preview) => {
- const format = options.mediaType.format
- ? `.${options.mediaType.format}`
- : "+json";
- return `application/vnd.github.${preview}-preview${format}`;
- })
- .join(",");
- }
- }
- // for GET/HEAD requests, set URL query parameters from remaining parameters
- // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters
- if (["GET", "HEAD"].includes(method)) {
- url = addQueryParameters(url, remainingParameters);
- }
- else {
- if ("data" in remainingParameters) {
- body = remainingParameters.data;
- }
- else {
- if (Object.keys(remainingParameters).length) {
- body = remainingParameters;
- }
- }
- }
- // default content-type for JSON if body is set
- if (!headers["content-type"] && typeof body !== "undefined") {
- headers["content-type"] = "application/json; charset=utf-8";
- }
- // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body.
- // fetch does not allow to set `content-length` header, but we can set body to an empty string
- if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") {
- body = "";
- }
- // Only return body/request keys if present
- return Object.assign({ method, url, headers }, typeof body !== "undefined" ? { body } : null, options.request ? { request: options.request } : null);
-}
diff --git a/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js b/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js
deleted file mode 100644
index d26be31..0000000
--- a/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js
+++ /dev/null
@@ -1,17 +0,0 @@
-export function addQueryParameters(url, parameters) {
- const separator = /\?/.test(url) ? "&" : "?";
- const names = Object.keys(parameters);
- if (names.length === 0) {
- return url;
- }
- return (url +
- separator +
- names
- .map((name) => {
- if (name === "q") {
- return ("q=" + parameters.q.split("+").map(encodeURIComponent).join("+"));
- }
- return `${name}=${encodeURIComponent(parameters[name])}`;
- })
- .join("&"));
-}
diff --git a/node_modules/@octokit/endpoint/dist-src/util/extract-url-variable-names.js b/node_modules/@octokit/endpoint/dist-src/util/extract-url-variable-names.js
deleted file mode 100644
index 3e75db2..0000000
--- a/node_modules/@octokit/endpoint/dist-src/util/extract-url-variable-names.js
+++ /dev/null
@@ -1,11 +0,0 @@
-const urlVariableRegex = /\{[^}]+\}/g;
-function removeNonChars(variableName) {
- return variableName.replace(/^\W+|\W+$/g, "").split(/,/);
-}
-export function extractUrlVariableNames(url) {
- const matches = url.match(urlVariableRegex);
- if (!matches) {
- return [];
- }
- return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);
-}
diff --git a/node_modules/@octokit/endpoint/dist-src/util/lowercase-keys.js b/node_modules/@octokit/endpoint/dist-src/util/lowercase-keys.js
deleted file mode 100644
index 0780642..0000000
--- a/node_modules/@octokit/endpoint/dist-src/util/lowercase-keys.js
+++ /dev/null
@@ -1,9 +0,0 @@
-export function lowercaseKeys(object) {
- if (!object) {
- return {};
- }
- return Object.keys(object).reduce((newObj, key) => {
- newObj[key.toLowerCase()] = object[key];
- return newObj;
- }, {});
-}
diff --git a/node_modules/@octokit/endpoint/dist-src/util/merge-deep.js b/node_modules/@octokit/endpoint/dist-src/util/merge-deep.js
deleted file mode 100644
index d92aca3..0000000
--- a/node_modules/@octokit/endpoint/dist-src/util/merge-deep.js
+++ /dev/null
@@ -1,16 +0,0 @@
-import { isPlainObject } from "is-plain-object";
-export function mergeDeep(defaults, options) {
- const result = Object.assign({}, defaults);
- Object.keys(options).forEach((key) => {
- if (isPlainObject(options[key])) {
- if (!(key in defaults))
- Object.assign(result, { [key]: options[key] });
- else
- result[key] = mergeDeep(defaults[key], options[key]);
- }
- else {
- Object.assign(result, { [key]: options[key] });
- }
- });
- return result;
-}
diff --git a/node_modules/@octokit/endpoint/dist-src/util/omit.js b/node_modules/@octokit/endpoint/dist-src/util/omit.js
deleted file mode 100644
index 6245031..0000000
--- a/node_modules/@octokit/endpoint/dist-src/util/omit.js
+++ /dev/null
@@ -1,8 +0,0 @@
-export function omit(object, keysToOmit) {
- return Object.keys(object)
- .filter((option) => !keysToOmit.includes(option))
- .reduce((obj, key) => {
- obj[key] = object[key];
- return obj;
- }, {});
-}
diff --git a/node_modules/@octokit/endpoint/dist-src/util/remove-undefined-properties.js b/node_modules/@octokit/endpoint/dist-src/util/remove-undefined-properties.js
deleted file mode 100644
index 6b5ee5f..0000000
--- a/node_modules/@octokit/endpoint/dist-src/util/remove-undefined-properties.js
+++ /dev/null
@@ -1,8 +0,0 @@
-export function removeUndefinedProperties(obj) {
- for (const key in obj) {
- if (obj[key] === undefined) {
- delete obj[key];
- }
- }
- return obj;
-}
diff --git a/node_modules/@octokit/endpoint/dist-src/util/url-template.js b/node_modules/@octokit/endpoint/dist-src/util/url-template.js
deleted file mode 100644
index 439b3fe..0000000
--- a/node_modules/@octokit/endpoint/dist-src/util/url-template.js
+++ /dev/null
@@ -1,164 +0,0 @@
-// Based on https://github.com/bramstein/url-template, licensed under BSD
-// TODO: create separate package.
-//
-// Copyright (c) 2012-2014, Bram Stein
-// All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in the
-// documentation and/or other materials provided with the distribution.
-// 3. The name of the author may not be used to endorse or promote products
-// derived from this software without specific prior written permission.
-// THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-/* istanbul ignore file */
-function encodeReserved(str) {
- return str
- .split(/(%[0-9A-Fa-f]{2})/g)
- .map(function (part) {
- if (!/%[0-9A-Fa-f]/.test(part)) {
- part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]");
- }
- return part;
- })
- .join("");
-}
-function encodeUnreserved(str) {
- return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {
- return "%" + c.charCodeAt(0).toString(16).toUpperCase();
- });
-}
-function encodeValue(operator, value, key) {
- value =
- operator === "+" || operator === "#"
- ? encodeReserved(value)
- : encodeUnreserved(value);
- if (key) {
- return encodeUnreserved(key) + "=" + value;
- }
- else {
- return value;
- }
-}
-function isDefined(value) {
- return value !== undefined && value !== null;
-}
-function isKeyOperator(operator) {
- return operator === ";" || operator === "&" || operator === "?";
-}
-function getValues(context, operator, key, modifier) {
- var value = context[key], result = [];
- if (isDefined(value) && value !== "") {
- if (typeof value === "string" ||
- typeof value === "number" ||
- typeof value === "boolean") {
- value = value.toString();
- if (modifier && modifier !== "*") {
- value = value.substring(0, parseInt(modifier, 10));
- }
- result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : ""));
- }
- else {
- if (modifier === "*") {
- if (Array.isArray(value)) {
- value.filter(isDefined).forEach(function (value) {
- result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : ""));
- });
- }
- else {
- Object.keys(value).forEach(function (k) {
- if (isDefined(value[k])) {
- result.push(encodeValue(operator, value[k], k));
- }
- });
- }
- }
- else {
- const tmp = [];
- if (Array.isArray(value)) {
- value.filter(isDefined).forEach(function (value) {
- tmp.push(encodeValue(operator, value));
- });
- }
- else {
- Object.keys(value).forEach(function (k) {
- if (isDefined(value[k])) {
- tmp.push(encodeUnreserved(k));
- tmp.push(encodeValue(operator, value[k].toString()));
- }
- });
- }
- if (isKeyOperator(operator)) {
- result.push(encodeUnreserved(key) + "=" + tmp.join(","));
- }
- else if (tmp.length !== 0) {
- result.push(tmp.join(","));
- }
- }
- }
- }
- else {
- if (operator === ";") {
- if (isDefined(value)) {
- result.push(encodeUnreserved(key));
- }
- }
- else if (value === "" && (operator === "&" || operator === "?")) {
- result.push(encodeUnreserved(key) + "=");
- }
- else if (value === "") {
- result.push("");
- }
- }
- return result;
-}
-export function parseUrl(template) {
- return {
- expand: expand.bind(null, template),
- };
-}
-function expand(template, context) {
- var operators = ["+", "#", ".", "/", ";", "?", "&"];
- return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) {
- if (expression) {
- let operator = "";
- const values = [];
- if (operators.indexOf(expression.charAt(0)) !== -1) {
- operator = expression.charAt(0);
- expression = expression.substr(1);
- }
- expression.split(/,/g).forEach(function (variable) {
- var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable);
- values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));
- });
- if (operator && operator !== "+") {
- var separator = ",";
- if (operator === "?") {
- separator = "&";
- }
- else if (operator !== "#") {
- separator = operator;
- }
- return (values.length !== 0 ? operator : "") + values.join(separator);
- }
- else {
- return values.join(",");
- }
- }
- else {
- return encodeReserved(literal);
- }
- });
-}
diff --git a/node_modules/@octokit/endpoint/dist-src/version.js b/node_modules/@octokit/endpoint/dist-src/version.js
deleted file mode 100644
index 5845293..0000000
--- a/node_modules/@octokit/endpoint/dist-src/version.js
+++ /dev/null
@@ -1 +0,0 @@
-export const VERSION = "7.0.3";
diff --git a/node_modules/@octokit/endpoint/dist-src/with-defaults.js b/node_modules/@octokit/endpoint/dist-src/with-defaults.js
deleted file mode 100644
index 81baf6c..0000000
--- a/node_modules/@octokit/endpoint/dist-src/with-defaults.js
+++ /dev/null
@@ -1,13 +0,0 @@
-import { endpointWithDefaults } from "./endpoint-with-defaults";
-import { merge } from "./merge";
-import { parse } from "./parse";
-export function withDefaults(oldDefaults, newDefaults) {
- const DEFAULTS = merge(oldDefaults, newDefaults);
- const endpoint = endpointWithDefaults.bind(null, DEFAULTS);
- return Object.assign(endpoint, {
- DEFAULTS,
- defaults: withDefaults.bind(null, DEFAULTS),
- merge: merge.bind(null, DEFAULTS),
- parse,
- });
-}
diff --git a/node_modules/@octokit/endpoint/dist-types/defaults.d.ts b/node_modules/@octokit/endpoint/dist-types/defaults.d.ts
deleted file mode 100644
index 30fcd20..0000000
--- a/node_modules/@octokit/endpoint/dist-types/defaults.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import { EndpointDefaults } from "@octokit/types";
-export declare const DEFAULTS: EndpointDefaults;
diff --git a/node_modules/@octokit/endpoint/dist-types/endpoint-with-defaults.d.ts b/node_modules/@octokit/endpoint/dist-types/endpoint-with-defaults.d.ts
deleted file mode 100644
index ff39e5e..0000000
--- a/node_modules/@octokit/endpoint/dist-types/endpoint-with-defaults.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { EndpointOptions, RequestParameters, Route } from "@octokit/types";
-import { DEFAULTS } from "./defaults";
-export declare function endpointWithDefaults(defaults: typeof DEFAULTS, route: Route | EndpointOptions, options?: RequestParameters): import("@octokit/types").RequestOptions;
diff --git a/node_modules/@octokit/endpoint/dist-types/index.d.ts b/node_modules/@octokit/endpoint/dist-types/index.d.ts
deleted file mode 100644
index 1ede136..0000000
--- a/node_modules/@octokit/endpoint/dist-types/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export declare const endpoint: import("@octokit/types").EndpointInterface