Full Code of afc163/surge-preview for AI

main 2eeb59677bf6 cached
19 files
1.5 MB
484.7k tokens
1342 symbols
1 requests
Download .txt
Showing preview only (1,574K chars total). Download the full file or copy to clipboard to get everything.
Repository: afc163/surge-preview
Branch: main
Commit: 2eeb59677bf6
Files: 19
Total size: 1.5 MB

Directory structure:
gitextract_gzrb4oe_/

├── .github/
│   ├── dependabot.yml
│   └── workflows/
│       ├── preview.yml
│       └── test.yml
├── .gitignore
├── .husky/
│   └── pre-commit
├── .npmrc
├── README.md
├── action.yml
├── biome.json
├── dist/
│   ├── index.js
│   └── sourcemap-register.js
├── jest.config.js
├── package.json
├── src/
│   ├── comment.ts
│   ├── commentToPullRequest.ts
│   ├── helpers.ts
│   └── main.ts
├── tsconfig.json
└── utils/
    └── gen-preview.js

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/dependabot.yml
================================================
version: 2
updates:
  # Enable version updates for npm
  - package-ecosystem: 'npm'
    # Look for `package.json` and `lock` files in the `root` directory
    directory: '/'
    # Check the npm registry for updates every day (weekdays)
    schedule:
      interval: 'daily'
  - package-ecosystem: "github-actions"
    # Workflow files stored in the default location of `.github/workflows`
    directory: "/"
    schedule:
      interval: 'daily'


================================================
FILE: .github/workflows/preview.yml
================================================
name: 'preview'
on: # rebuild any PRs and main branch changes
  pull_request:
    # use default types + closed event type
    types: [opened, synchronize, reopened, closed]

jobs:
  preview: # make sure the action works on a clean machine without building
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: ./
        id: preview_step
        name: test afc163/surge-preview
        with:
          surge_token: ${{ secrets.SURGE_TOKEN }}
          github_token: ${{ secrets.GITHUB_TOKEN }}
          teardown: 'true'
          dist: public/preview
          build: |
            mkdir -p public/preview
            npm install
            npm run build-preview -- public/preview
      - name: Get the output url
        run: echo "url => ${{ steps.preview_step.outputs.preview_url }}"
  preview2:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: ./
        id: preview_action
        name: test afc163/surge-preview
        with:
          # test the default 'github_token' value here
          surge_token: ${{ secrets.SURGE_TOKEN }}
          teardown: 'true'
          dist: public/preview2
          build: |
            mkdir -p public/preview2
            npm install
            npm run build-preview -- public/preview2
      - name: Get the output url
        run: echo "url => ${{ steps.preview_action.outputs.preview_url }}"


================================================
FILE: .github/workflows/test.yml
================================================
name: 'build-test'
on: # rebuild any PRs and main branch changes
  pull_request:
    types: [opened, synchronize, reopened]
  push:
    branches:
      - main
      - 'releases/*'
      - test
      - v1

jobs:
  build: # make sure build/ci work properly
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: |
          npm install
      - run: |
          npm run all


================================================
FILE: .gitignore
================================================
# Dependency directory
node_modules
package-lock.json

# Rest pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# OS metadata
.DS_Store
Thumbs.db

# Ignore built ts files
__tests__/runner/*
lib/**/*
public

# IDE
.idea/
*.iml


================================================
FILE: .husky/pre-commit
================================================
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged

================================================
FILE: .npmrc
================================================
engine-strict=true

================================================
FILE: README.md
================================================
# Surge PR Preview

[![CI status][github-action-image]][github-action-url]

[github-action-image]: https://github.com/afc163/surge-preview/workflows/build-test/badge.svg
[github-action-url]: https://github.com/afc163/surge-preview/actions?query=workflow%3Abuild-test

A GitHub action that preview website in [surge.sh](https://surge.sh/) for your pull requests.

<img width="800" alt="image" src="https://user-images.githubusercontent.com/507615/90243810-2230b480-de62-11ea-9a2c-9e869a2067dd.png">

<img width="800" alt="image" src="https://user-images.githubusercontent.com/507615/91127543-0be3ed80-e6d9-11ea-897f-977c346bbc77.png">

### Pros

Compare to Netlify/Vercel?

- It is **free**.
- It supports multiple preview jobs.

### Usage

Add a workflow (`.github/workflows/preview.yml`):

```yaml
name: 🔂 Surge PR Preview

on: [pull_request]

jobs:
  preview:
    runs-on: ubuntu-latest
    permissions:
      pull-requests: write # allow surge-preview to create/update PR comments
    steps:
      - uses: actions/checkout@v4
      - uses: afc163/surge-preview@v1
        id: preview_step
        with:
          surge_token: ${{ secrets.SURGE_TOKEN }}
          dist: public
          build: |
            npm install
            npm run build
      - name: Get the preview_url
        run: echo "url => ${{ steps.preview_step.outputs.preview_url }}"
```

The preview website url will be `https://{{repository.owner}}-{{repository.name}}-{{job.name}}-pr-{{pr.number}}.surge.sh`.

#### Multiple Jobs

```yaml
name: 🔂 Surge PR Preview

on: [pull_request]

permissions:
  pull-requests: write # allow surge-preview to create/update PR comments

jobs:
  preview-job-1:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: afc163/surge-preview@v1
        with:
          surge_token: ${{ secrets.SURGE_TOKEN }}
          dist: public
          build: |
            npm install
            npm run build
  preview-job-2:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: afc163/surge-preview@v1
        with:
          surge_token: ${{ secrets.SURGE_TOKEN }}
          dist: public
          build: |
            npm install
            npm run build
```

The preview website urls will be:

- `https://{{repository.owner}}-{{repository.name}}-preview-job-1-pr-{{pr.number}}.surge.sh`
- `https://{{repository.owner}}-{{repository.name}}-preview-job-2-pr-{{pr.number}}.surge.sh`

### Teardown

When a pull request is closed and teardown is set to 'true', then the surge instance will be destroyed.

```yaml
name: 🔂 Surge PR Preview

on:
  pull_request:
    # when using teardown: 'true', add default event types + closed event type (for teardown)
    types: [opened, synchronize, reopened, closed]
  push:

jobs:
  preview:
    runs-on: ubuntu-latest
    permissions:
      pull-requests: write # allow surge-preview to create/update PR comments
    steps:
      - uses: actions/checkout@v4
      - uses: afc163/surge-preview@v1
        with:
          surge_token: ${{ secrets.SURGE_TOKEN }}
          dist: public
          teardown: 'true'
          build: |
            npm install
            npm run build
```


### Usage to deal with PRs created from forked repositories

When someone creates a PR from a forked repository, there is a security challenge: workflows triggered by `pull_request` events do not have access to your to repository secrets (like your surge token) for security reasons.

**Why this is a problem:** Without access to the surge token, the preview deployment will fail.

**Why not use `pull_request_target`?** While this event does provide access to secrets, it executes code from the PR branch with your secrets, creating a security risk. Attackers could potentially steal your secrets by submitting malicious PRs.
Resources:
- https://securitylab.github.com/resources/github-actions-preventing-pwn-requests/
- https://github.com/afc163/surge-preview/commit/4931cbc38d650f631f91974da3ccd4809c88aa1b and https://github.com/afc163/surge-preview/issues/99


**Solution: Use a three-workflow Approach**

This approach separates the build and deployment steps for improved security:

1. **Build workflow**: Builds the site without needing secrets
2. **Deploy workflow**: Deploys the pre-built site using your secrets
3. **Teardown workflow**: Removes the preview when a PR is closed

#### How it works

1. First workflow builds the site and saves it as an artifact
2. Second workflow retrieves the artifact and deploys it to Surge
3. Third workflow handles cleanup when PRs are closed

#### Example Workflows

Here is an example of how to set up these workflows in your repository:

**Build workflow** (triggered by `pull_request`):

```yaml
name: Surge PR Preview - Build Stage

on:
  pull_request:

jobs:
  build-preview:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4
      - name: Build site
        env:
          PR_NUMBER: ${{ github.event.pull_request.number }}
        # Generate a random page, containing the number of the PR
        # Replace with your actual build command
        run: |
          mkdir site
          cp -r public/surge/* site/
          sed -i "s/@PR_NUMBER@/${PR_NUMBER}/g" site/index.html

      - name: Upload site artifact
        uses: actions/upload-artifact@v4
        with:
          name: pr-build-dist # Important: use this same name in the deploy workflow
          path: site/
```

**Deploy workflow** (triggered by `workflow_run`, when the build workflow completes):

```yaml
name: Surge PR Preview - Deploy Stage

on:
  workflow_run:
    workflows: ["Surge PR Preview - Build Stage"]
    types:
      - completed

permissions:
  pull-requests: write # Needed to comment on PRs

jobs:
  # Important - the job id:
  # MUST be unique across all surge preview deployments for a repository as the job id is used in the deployment URL
  # MUST be kept in sync with the job id of the teardown stage (this id is used by the surge-preview action to forge the deployment URL)
  deploy:
    runs-on: ubuntu-latest
    if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }}

    steps:
      - name: Download built site
        uses: dawidd6/action-download-artifact@v8
        with:
          workflow: ${{ github.event.workflow_run.workflow_id }}
          run_id: ${{ github.event.workflow_run.id }}
          name: pr-build-dist  # Must match the name from build workflow
          path: site/

      - name: Deploy to Surge
        uses: afc163/surge-preview@v1
        with:
          surge_token: ${{ secrets.SURGE_TOKEN }}
          github_token: ${{ secrets.GITHUB_TOKEN }}
          build: echo done
          dist: site
          failOnError: true
          teardown: false # Teardown is handled by the separate workflow
```

**Teardown workflow** (triggered when a PR is closed):

```yaml
name: Surge PR Preview - Teardown Stage

on:
  pull_request_target:
    types: [closed]

permissions:
  pull-requests: write # Needed to comment on PRs

jobs:
  deploy: # Must match the job ID from the deploy workflow
    runs-on: ubuntu-latest
    steps:
      - name: Teardown preview site
        uses: afc163/surge-preview@v1
        with:
          surge_token: ${{ secrets.SURGE_TOKEN }}
          github_token: ${{ secrets.GITHUB_TOKEN }}
          failOnError: true
          teardown: true
          build: echo "Cleaning up preview" 
```


#### Troubleshooting

When running the workflow triggered by `workflow_run` event, the surge-preview action retrieves the number of the Pull Request associated with the workflow run by doing API calls.

Occasionally, the API call may hit rate limits, as the search API can use many calls internally. In this case, the error is caught and a warning is logged. Re-running the workflow should resolve the issue.

As a workaround, you can use a [Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#about-personal-access-tokens) instead of the GITHUB_TOKEN: this PAT has a higher rate limit errors, so the API calls are more likely to succeed.

**Note**: Using a PAT as github_token input of the surge-preview action has a side effect: the PR comment created by the action will be created by the account to which the PAT belongs.
When using GITHUB_TOKEN, the PR comments are created by the GitHub Actions bot.


#### Limitations

In some situations, it is hard to know if the surge deployment has been done.

When a workflow is triggered by `workflow_run`, it does not appear in the PR checks, so you cannot see whether the workflow has run or if it has failed.
By default, there is no status on the commit. It is possible to add this manually in the workflow, for example by using [set-commit-status-action](https://github.com/myrotvorets/set-commit-status-action).

However, when the workflow runs, the usual comment is updated by the `surge-preview` action to indicate whether the deployment is in progress or if the Surge deployment succeeded or failed.


### Inputs

| Parameter       | Description                                                                                                                       | Default                                                                                                                                  |
|-----------------|-----------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------|
| `surge_token`   | [Getting your Surge token](https://surge.sh/help/integrating-with-circleci).                                                      | An arbitrary token for demonstration. Use your own, otherwise anybody using this action can control your surge domain.                   |
| `github_token`  | Used to create Pull Request comment, requires `pull-requests` permission set to `write`. Possible value: `secrets.GITHUB_TOKEN`.  | [`github.token`](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow) |
| `build`         | Build scripts to run before deploy.                                                                                               | `npm install` <br> `npm run build`                                                                                                       |
| `dist`          | Dist folder deployed to [surge.sh](https://surge.sh/).                                                                            | `public`                                                                                                                                 |
| `failOnError`   | Set `failed` if a deployment throws error. If not set, fallback to the `FAIL_ON__ERROR` environment variable.                     | `false`                                                                                                                                  |
| `teardown`      | Determines if the preview instance will be torn down on PR close.                                                                 | `false`                                                                                                                                  |

### Outputs

- `preview_url`: The url for the related PR preview

### Who are using it?

- https://github.com/ant-design/ant-design-pro
- https://github.com/ant-design/pro-components
- https://github.com/antvis/antvis.github.io
- https://github.com/antvis/gatsby-theme-antv
- https://github.com/antvis/g2
- https://github.com/antvis/g2plot
- https://github.com/antvis/g6
- https://github.com/antvis/x6
- https://github.com/umijs/dumi
- https://github.com/alibaba/hooks
- https://github.com/youzan/vant
- https://github.com/didi/cube-ui
- https://github.com/didi/mand-mobile
- https://github.com/jdf2e/nutui
- https://github.com/ant-design-colorful/ant-design-colorful
- https://github.com/iambumblehead/react-dropdown-now
- https://github.com/libwebp-wasm/gif2webp
- https://github.com/libwebp-wasm/img2webp

### Thanks to

- https://github.com/jwalton/gh-find-current-pr
- https://github.com/marocchino/sticky-pull-request-comment


================================================
FILE: action.yml
================================================
name: '🔂 Surge PR Preview'
description: 'Preview website in surge.sh for every pull request'
author: 'afc163'
inputs:
  surge_token:
    description: 'surge.sh token'
    default: '6973bdb764f0d5fd07c910de27e2d7d0'
  github_token:
    description: 'github token'
    required: true
    default: ${{ github.token }}
  build:
    description: 'build scripts'
    default: |
      npm install
      npm run build
    required: false
  dist:
    description: 'dist folder to deploy'
    default: 'public'
    required: false
  failOnError:
    description: 'Set `failed` if a deployment throws error'
  teardown:
    description: 'Determines if the preview instance will be torn down on PR close'
    default: 'false'
    required: false
outputs:
  preview_url:
    description: 'The url for the related PR preview'
runs:
  using: node20
  main: 'dist/index.js'
branding:
  icon: 'monitor'
  color: 'yellow'


================================================
FILE: biome.json
================================================
{
  "files": {
    "ignore": ["./dist/**/*", "./lib/**/*", "node_modules"]
  },
  "formatter": {
    "enabled": true,
    "formatWithErrors": false,
    "indentStyle": "space",
    "indentWidth": 2,
    "lineEnding": "lf",
    "lineWidth": 80,
    "attributePosition": "auto"
  },
  "linter": {
    "rules": {
      "recommended": false,
      "complexity": {
        "noExtraBooleanCast": "error",
        "noMultipleSpacesInRegularExpressionLiterals": "error",
        "noStaticOnlyClass": "error",
        "noUselessConstructor": "error"
      },
      "correctness": {
        "noConstAssign": "error",
        "noConstantCondition": "error",
        "noEmptyCharacterClassInRegex": "error",
        "noEmptyPattern": "error",
        "noGlobalObjectCalls": "error",
        "noInnerDeclarations": "error",
        "noInvalidConstructorSuper": "error",
        "noNewSymbol": "error",
        "noSelfAssign": "error",
        "noSwitchDeclarations": "error",
        "noUndeclaredVariables": "error",
        "noUnreachable": "error",
        "noUnreachableSuper": "error",
        "noUnsafeFinally": "error",
        "noUnusedLabels": "error",
        "noUnusedVariables": "error",
        "useIsNan": "error",
        "useYield": "error"
      },
      "style": {
        "noArguments": "error",
        "noCommaOperator": "error",
        "noInferrableTypes": "error",
        "noNamespace": "error",
        "noNonNullAssertion": "warn",
        "noVar": "error",
        "useConsistentArrayType": "error",
        "useConst": "error",
        "useForOf": "warn",
        "useShorthandFunctionType": "warn",
        "useSingleVarDeclarator": "error",
        "useTemplate": "error"
      },
      "suspicious": {
        "noCatchAssign": "error",
        "noClassAssign": "error",
        "noCompareNegZero": "error",
        "noControlCharactersInRegex": "error",
        "noDebugger": "error",
        "noDoubleEquals": "error",
        "noDuplicateCase": "error",
        "noDuplicateClassMembers": "error",
        "noDuplicateObjectKeys": "error",
        "noDuplicateParameters": "error",
        "noEmptyBlockStatements": "error",
        "noExplicitAny": "error",
        "noFallthroughSwitchClause": "error",
        "noFunctionAssign": "error",
        "noGlobalAssign": "error",
        "noMisleadingInstantiator": "error",
        "noRedeclare": "error",
        "noUnsafeNegation": "error",
        "useValidTypeof": "error"
      }
    }
  },
  "javascript": {
    "formatter": {
      "jsxQuoteStyle": "double",
      "quoteProperties": "asNeeded",
      "trailingCommas": "all",
      "semicolons": "always",
      "arrowParentheses": "always",
      "bracketSpacing": true,
      "bracketSameLine": false,
      "quoteStyle": "single",
      "attributePosition": "auto"
    }
  }
}


================================================
FILE: dist/index.js
================================================
require('./sourcemap-register.js');/******/ (() => { // webpackBootstrap
/******/ 	var __webpack_modules__ = ({

/***/ 7907:
/***/ (function(__unused_webpack_module, exports) {

"use strict";

var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.findPreviousComment = findPreviousComment;
exports.updateComment = updateComment;
exports.createComment = createComment;
exports.deleteComment = deleteComment;
function headerComment(header) {
    return `<!-- Sticky Pull Request Comment${header || ''} -->`;
}
function findPreviousComment(octokit, repo, issue_number, header) {
    return __awaiter(this, void 0, void 0, function* () {
        const { data: comments } = yield octokit.rest.issues.listComments(Object.assign(Object.assign({}, repo), { issue_number }));
        const h = headerComment(header);
        return comments.find((comment) => { var _a; return (_a = comment.body) === null || _a === void 0 ? void 0 : _a.includes(h); });
    });
}
function updateComment(octokit, repo, comment_id, body, header, previousBody) {
    return __awaiter(this, void 0, void 0, function* () {
        yield octokit.rest.issues.updateComment(Object.assign(Object.assign({}, repo), { comment_id, body: previousBody
                ? `${previousBody}\n${body}`
                : `${body}\n${headerComment(header)}` }));
    });
}
function createComment(octokit, repo, issue_number, body, header, previousBody) {
    return __awaiter(this, void 0, void 0, function* () {
        yield octokit.rest.issues.createComment(Object.assign(Object.assign({}, repo), { issue_number, body: previousBody
                ? `${previousBody}\n${body}`
                : `${body}\n${headerComment(header)}` }));
    });
}
function deleteComment(octokit, repo, comment_id) {
    return __awaiter(this, void 0, void 0, function* () {
        yield octokit.rest.issues.deleteComment(Object.assign(Object.assign({}, repo), { comment_id }));
    });
}


/***/ }),

/***/ 9889:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {

"use strict";

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.comment = comment;
const core = __importStar(__nccwpck_require__(7468));
const comment_1 = __nccwpck_require__(7907);
function comment(_a) {
    return __awaiter(this, arguments, void 0, function* ({ repo, number, message, octokit, header, }) {
        if (isNaN(number) || number < 1) {
            core.info('no numbers given: skip step');
            return;
        }
        const prefixedHeader = `: Surge Preview ${header}'`;
        try {
            const previous = yield (0, comment_1.findPreviousComment)(octokit, repo, number, prefixedHeader);
            const body = message;
            if (previous) {
                yield (0, comment_1.updateComment)(octokit, repo, previous.id, body, prefixedHeader, false);
            }
            else {
                yield (0, comment_1.createComment)(octokit, repo, number, body, prefixedHeader);
            }
        }
        catch (err) {
            if (err instanceof Error) {
                core.setFailed(err.message);
            }
            else {
                console.error('An unknown error occurred');
            }
        }
    });
}


/***/ }),

/***/ 4396:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {

"use strict";

var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getCommentFooter = exports.formatImage = exports.execSurgeCommand = void 0;
const exec_1 = __nccwpck_require__(7520);
const execSurgeCommand = (_a) => __awaiter(void 0, [_a], void 0, function* ({ command, }) {
    let myOutput = '';
    const options = {
        listeners: {
            stdout: (stdoutData) => {
                myOutput += stdoutData.toString();
            },
        },
    };
    yield (0, exec_1.exec)(`npx`, command, options);
    if (myOutput && !myOutput.includes('Success')) {
        throw new Error(myOutput);
    }
});
exports.execSurgeCommand = execSurgeCommand;
const formatImage = ({ buildingLogUrl, imageUrl, }) => {
    return `<a href="${buildingLogUrl}"><img width="300" src="${imageUrl}"></a>`;
};
exports.formatImage = formatImage;
const getCommentFooter = () => {
    return '<sub>🤖 By [surge-preview](https://github.com/afc163/surge-preview)</sub>';
};
exports.getCommentFooter = getCommentFooter;


/***/ }),

/***/ 3134:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {

"use strict";

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const core = __importStar(__nccwpck_require__(7468));
const exec_1 = __nccwpck_require__(7520);
const github = __importStar(__nccwpck_require__(9373));
const commentToPullRequest_1 = __nccwpck_require__(9889);
const helpers_1 = __nccwpck_require__(4396);
let failOnErrorGlobal = false;
let fail;
function main() {
    return __awaiter(this, void 0, void 0, function* () {
        var _a, _b, _c, _d, _e, _f, _g, _h;
        const surgeToken = core.getInput('surge_token') || '6973bdb764f0d5fd07c910de27e2d7d0';
        const token = core.getInput('github_token', { required: true });
        const dist = core.getInput('dist');
        const teardown = ((_a = core.getInput('teardown')) === null || _a === void 0 ? void 0 : _a.toString().toLowerCase()) === 'true';
        const failOnError = !!(core.getInput('failOnError') || process.env.FAIL_ON__ERROR);
        failOnErrorGlobal = failOnError;
        core.debug(`failOnErrorGlobal: ${typeof failOnErrorGlobal} + ${failOnErrorGlobal.toString()}`);
        const octokit = github.getOctokit(token);
        let prNumber;
        let prState;
        core.debug('github.context');
        core.debug(JSON.stringify(github.context, null, 2));
        const { job, payload } = github.context;
        core.debug(`payload.after: ${payload.after}`);
        core.debug(`payload.pull_request: ${payload.pull_request}`);
        const gitCommitSha = payload.after ||
            ((_c = (_b = payload === null || payload === void 0 ? void 0 : payload.pull_request) === null || _b === void 0 ? void 0 : _b.head) === null || _c === void 0 ? void 0 : _c.sha) ||
            ((_d = payload === null || payload === void 0 ? void 0 : payload.workflow_run) === null || _d === void 0 ? void 0 : _d.head_sha);
        core.debug(JSON.stringify(github.context.repo, null, 2));
        core.debug(`payload.pull_request?.head: ${(_e = payload.pull_request) === null || _e === void 0 ? void 0 : _e.head}`);
        const fromForkedRepo = (_f = payload.pull_request) === null || _f === void 0 ? void 0 : _f.head.repo.fork;
        if (payload.number && payload.pull_request) {
            core.debug('prNumber retrieved from pull_request');
            prNumber = payload.number;
            prState = payload.action;
        }
        else {
            core.debug('Not a pull_request, so doing a API search');
            // Inspired by https://github.com/orgs/community/discussions/25220#discussioncomment-8697399
            const query = {
                q: `repo:${github.context.repo.owner}/${github.context.repo.repo} is:pr sha:${gitCommitSha}`,
                per_page: 1,
            };
            try {
                const result = yield octokit.rest.search.issuesAndPullRequests(query);
                const pr = result.data.items.length > 0 && result.data.items[0];
                core.debug(`Found related pull_request: ${JSON.stringify(pr, null, 2)}`);
                prNumber = pr ? pr.number : undefined;
                prState = pr ? pr.state : undefined;
            }
            catch (e) {
                // As mentioned in https://github.com/orgs/community/discussions/25220#discussioncomment-8971083
                // from time to time, you may get rate limit errors given search API seems to use many calls internally.
                core.warning(`Unable to get the PR number with API search: ${e}`);
            }
        }
        if (!prNumber) {
            core.info(`😢 No related PR found, skip it.`);
            return;
        }
        core.info(`Found PR number: ${prNumber}, PR status: ${prState}`);
        const commentIfNotForkedRepo = (message) => {
            // if it is forked repo, don't comment
            if (fromForkedRepo) {
                core.info('PR created from a forked repository, so skip PR comment');
                return;
            }
            (0, commentToPullRequest_1.comment)({
                repo: github.context.repo,
                // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
                number: prNumber,
                message,
                octokit,
                header: job,
            });
        };
        fail = (err) => {
            core.info('error message:');
            core.info(JSON.stringify(err, null, 2));
            commentIfNotForkedRepo(`
😭 Deploy PR Preview ${gitCommitSha} failed. [Build logs](https://github.com/${github.context.repo.owner}/${github.context.repo.repo}/actions/runs/${github.context.runId})

${(0, helpers_1.formatImage)({
                buildingLogUrl,
                imageUrl: 'https://user-images.githubusercontent.com/507615/90250824-4e066700-de6f-11ea-8230-600ecc3d6a6b.png',
            })}

${(0, helpers_1.getCommentFooter)()}
    `);
            if (failOnError) {
                core.setFailed(err.message);
            }
        };
        const repoOwner = github.context.repo.owner.replace(/\./g, '-');
        const repoName = github.context.repo.repo.replace(/\./g, '-');
        const url = `${repoOwner}-${repoName}-${job}-pr-${prNumber}.surge.sh`;
        core.setOutput('preview_url', url);
        let data;
        try {
            const result = yield octokit.rest.checks.listForRef({
                owner: github.context.repo.owner,
                repo: github.context.repo.repo,
                ref: gitCommitSha,
            });
            data = result.data;
        }
        catch (err) {
            if (err instanceof Error) {
                fail(err);
            }
            return;
        }
        core.debug(JSON.stringify(data === null || data === void 0 ? void 0 : data.check_runs, null, 2));
        // 尝试获取 check_run_id,逻辑不是很严谨
        let checkRunId;
        if (((_g = data === null || data === void 0 ? void 0 : data.check_runs) === null || _g === void 0 ? void 0 : _g.length) >= 0) {
            const checkRun = (_h = data === null || data === void 0 ? void 0 : data.check_runs) === null || _h === void 0 ? void 0 : _h.find((item) => item.name === job);
            checkRunId = checkRun === null || checkRun === void 0 ? void 0 : checkRun.id;
        }
        const buildingLogUrl = checkRunId
            ? `https://github.com/${github.context.repo.owner}/${github.context.repo.repo}/runs/${checkRunId}`
            : `https://github.com/${github.context.repo.owner}/${github.context.repo.repo}/actions/runs/${github.context.runId}`;
        core.debug(`teardown enabled?: ${teardown}`);
        core.debug(`event action?: ${payload.action}`);
        if (teardown && prState === 'closed') {
            try {
                core.info(`Teardown: ${url}`);
                core.setSecret(surgeToken);
                yield (0, helpers_1.execSurgeCommand)({
                    command: ['surge', 'teardown', url, `--token`, surgeToken],
                });
                return commentIfNotForkedRepo(`
:recycle: [PR Preview](https://${url}) ${gitCommitSha} has been successfully destroyed since this PR has been closed.

${(0, helpers_1.formatImage)({
                    buildingLogUrl,
                    imageUrl: 'https://user-images.githubusercontent.com/507615/98094112-d838f700-1ec3-11eb-8530-381c2276b80e.png',
                })}
        
${(0, helpers_1.getCommentFooter)()}
      `);
            }
            catch (err) {
                if (err instanceof Error) {
                    return fail === null || fail === void 0 ? void 0 : fail(err);
                }
            }
        }
        commentIfNotForkedRepo(`
⚡️ Deploying PR Preview ${gitCommitSha} to [surge.sh](https://${url}) ... [Build logs](${buildingLogUrl})

${(0, helpers_1.formatImage)({
            buildingLogUrl,
            imageUrl: 'https://user-images.githubusercontent.com/507615/90240294-8d2abd00-de5b-11ea-8140-4840a0b2d571.gif',
        })}

${(0, helpers_1.getCommentFooter)()}
  `);
        const startTime = Date.now();
        try {
            if (!core.getInput('build')) {
                yield (0, exec_1.exec)(`npm install`);
                yield (0, exec_1.exec)(`npm run build`);
            }
            else {
                const buildCommands = core.getInput('build').split('\n');
                for (const command of buildCommands) {
                    core.info(`RUN: ${command}`);
                    yield (0, exec_1.exec)(command);
                }
            }
            const duration = (Date.now() - startTime) / 1000;
            core.info(`Build time: ${duration} seconds`);
            core.info(`Deploy to ${url}`);
            core.setSecret(surgeToken);
            yield (0, helpers_1.execSurgeCommand)({
                command: ['surge', `./${dist}`, url, `--token`, surgeToken],
            });
            commentIfNotForkedRepo(`
🎊 PR Preview ${gitCommitSha} has been successfully built and deployed to https://${url}

🕐 Build time: **${duration}s**

${(0, helpers_1.formatImage)({
                buildingLogUrl,
                imageUrl: 'https://user-images.githubusercontent.com/507615/90250366-88233900-de6e-11ea-95a5-84f0762ffd39.png',
            })}

${(0, helpers_1.getCommentFooter)()}
    `);
        }
        catch (err) {
            if (err instanceof Error) {
                fail === null || fail === void 0 ? void 0 : fail(err);
            }
        }
    });
}
// eslint-disable-next-line github/no-then
main().catch((err) => {
    fail === null || fail === void 0 ? void 0 : fail(err);
});


/***/ }),

/***/ 3017:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {

"use strict";

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.issue = exports.issueCommand = void 0;
const os = __importStar(__nccwpck_require__(2037));
const utils_1 = __nccwpck_require__(195);
/**
 * Commands
 *
 * Command Format:
 *   ::name key=value,key=value::message
 *
 * Examples:
 *   ::warning::This is the message
 *   ::set-env name=MY_VAR::some value
 */
function issueCommand(command, properties, message) {
    const cmd = new Command(command, properties, message);
    process.stdout.write(cmd.toString() + os.EOL);
}
exports.issueCommand = issueCommand;
function issue(name, message = '') {
    issueCommand(name, {}, message);
}
exports.issue = issue;
const CMD_STRING = '::';
class Command {
    constructor(command, properties, message) {
        if (!command) {
            command = 'missing.command';
        }
        this.command = command;
        this.properties = properties;
        this.message = message;
    }
    toString() {
        let cmdStr = CMD_STRING + this.command;
        if (this.properties && Object.keys(this.properties).length > 0) {
            cmdStr += ' ';
            let first = true;
            for (const key in this.properties) {
                if (this.properties.hasOwnProperty(key)) {
                    const val = this.properties[key];
                    if (val) {
                        if (first) {
                            first = false;
                        }
                        else {
                            cmdStr += ',';
                        }
                        cmdStr += `${key}=${escapeProperty(val)}`;
                    }
                }
            }
        }
        cmdStr += `${CMD_STRING}${escapeData(this.message)}`;
        return cmdStr;
    }
}
function escapeData(s) {
    return utils_1.toCommandValue(s)
        .replace(/%/g, '%25')
        .replace(/\r/g, '%0D')
        .replace(/\n/g, '%0A');
}
function escapeProperty(s) {
    return utils_1.toCommandValue(s)
        .replace(/%/g, '%25')
        .replace(/\r/g, '%0D')
        .replace(/\n/g, '%0A')
        .replace(/:/g, '%3A')
        .replace(/,/g, '%2C');
}
//# sourceMappingURL=command.js.map

/***/ }),

/***/ 7468:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {

"use strict";

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;
const command_1 = __nccwpck_require__(3017);
const file_command_1 = __nccwpck_require__(1201);
const utils_1 = __nccwpck_require__(195);
const os = __importStar(__nccwpck_require__(2037));
const path = __importStar(__nccwpck_require__(1017));
const oidc_utils_1 = __nccwpck_require__(1146);
/**
 * The code to exit an action
 */
var ExitCode;
(function (ExitCode) {
    /**
     * A code indicating that the action was successful
     */
    ExitCode[ExitCode["Success"] = 0] = "Success";
    /**
     * A code indicating that the action was a failure
     */
    ExitCode[ExitCode["Failure"] = 1] = "Failure";
})(ExitCode = exports.ExitCode || (exports.ExitCode = {}));
//-----------------------------------------------------------------------
// Variables
//-----------------------------------------------------------------------
/**
 * Sets env variable for this action and future actions in the job
 * @param name the name of the variable to set
 * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify
 */
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function exportVariable(name, val) {
    const convertedVal = utils_1.toCommandValue(val);
    process.env[name] = convertedVal;
    const filePath = process.env['GITHUB_ENV'] || '';
    if (filePath) {
        return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val));
    }
    command_1.issueCommand('set-env', { name }, convertedVal);
}
exports.exportVariable = exportVariable;
/**
 * Registers a secret which will get masked from logs
 * @param secret value of the secret
 */
function setSecret(secret) {
    command_1.issueCommand('add-mask', {}, secret);
}
exports.setSecret = setSecret;
/**
 * Prepends inputPath to the PATH (for this action and future actions)
 * @param inputPath
 */
function addPath(inputPath) {
    const filePath = process.env['GITHUB_PATH'] || '';
    if (filePath) {
        file_command_1.issueFileCommand('PATH', inputPath);
    }
    else {
        command_1.issueCommand('add-path', {}, inputPath);
    }
    process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;
}
exports.addPath = addPath;
/**
 * Gets the value of an input.
 * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.
 * Returns an empty string if the value is not defined.
 *
 * @param     name     name of the input to get
 * @param     options  optional. See InputOptions.
 * @returns   string
 */
function getInput(name, options) {
    const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || '';
    if (options && options.required && !val) {
        throw new Error(`Input required and not supplied: ${name}`);
    }
    if (options && options.trimWhitespace === false) {
        return val;
    }
    return val.trim();
}
exports.getInput = getInput;
/**
 * Gets the values of an multiline input.  Each value is also trimmed.
 *
 * @param     name     name of the input to get
 * @param     options  optional. See InputOptions.
 * @returns   string[]
 *
 */
function getMultilineInput(name, options) {
    const inputs = getInput(name, options)
        .split('\n')
        .filter(x => x !== '');
    if (options && options.trimWhitespace === false) {
        return inputs;
    }
    return inputs.map(input => input.trim());
}
exports.getMultilineInput = getMultilineInput;
/**
 * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification.
 * Support boolean input list: `true | True | TRUE | false | False | FALSE` .
 * The return value is also in boolean type.
 * ref: https://yaml.org/spec/1.2/spec.html#id2804923
 *
 * @param     name     name of the input to get
 * @param     options  optional. See InputOptions.
 * @returns   boolean
 */
function getBooleanInput(name, options) {
    const trueValue = ['true', 'True', 'TRUE'];
    const falseValue = ['false', 'False', 'FALSE'];
    const val = getInput(name, options);
    if (trueValue.includes(val))
        return true;
    if (falseValue.includes(val))
        return false;
    throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` +
        `Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
}
exports.getBooleanInput = getBooleanInput;
/**
 * Sets the value of an output.
 *
 * @param     name     name of the output to set
 * @param     value    value to store. Non-string values will be converted to a string via JSON.stringify
 */
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function setOutput(name, value) {
    const filePath = process.env['GITHUB_OUTPUT'] || '';
    if (filePath) {
        return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value));
    }
    process.stdout.write(os.EOL);
    command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value));
}
exports.setOutput = setOutput;
/**
 * Enables or disables the echoing of commands into stdout for the rest of the step.
 * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.
 *
 */
function setCommandEcho(enabled) {
    command_1.issue('echo', enabled ? 'on' : 'off');
}
exports.setCommandEcho = setCommandEcho;
//-----------------------------------------------------------------------
// Results
//-----------------------------------------------------------------------
/**
 * Sets the action status to failed.
 * When the action exits it will be with an exit code of 1
 * @param message add error issue message
 */
function setFailed(message) {
    process.exitCode = ExitCode.Failure;
    error(message);
}
exports.setFailed = setFailed;
//-----------------------------------------------------------------------
// Logging Commands
//-----------------------------------------------------------------------
/**
 * Gets whether Actions Step Debug is on or not
 */
function isDebug() {
    return process.env['RUNNER_DEBUG'] === '1';
}
exports.isDebug = isDebug;
/**
 * Writes debug message to user log
 * @param message debug message
 */
function debug(message) {
    command_1.issueCommand('debug', {}, message);
}
exports.debug = debug;
/**
 * Adds an error issue
 * @param message error issue message. Errors will be converted to string via toString()
 * @param properties optional properties to add to the annotation.
 */
function error(message, properties = {}) {
    command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);
}
exports.error = error;
/**
 * Adds a warning issue
 * @param message warning issue message. Errors will be converted to string via toString()
 * @param properties optional properties to add to the annotation.
 */
function warning(message, properties = {}) {
    command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);
}
exports.warning = warning;
/**
 * Adds a notice issue
 * @param message notice issue message. Errors will be converted to string via toString()
 * @param properties optional properties to add to the annotation.
 */
function notice(message, properties = {}) {
    command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);
}
exports.notice = notice;
/**
 * Writes info to log with console.log.
 * @param message info message
 */
function info(message) {
    process.stdout.write(message + os.EOL);
}
exports.info = info;
/**
 * Begin an output group.
 *
 * Output until the next `groupEnd` will be foldable in this group
 *
 * @param name The name of the output group
 */
function startGroup(name) {
    command_1.issue('group', name);
}
exports.startGroup = startGroup;
/**
 * End an output group.
 */
function endGroup() {
    command_1.issue('endgroup');
}
exports.endGroup = endGroup;
/**
 * Wrap an asynchronous function call in a group.
 *
 * Returns the same type as the function itself.
 *
 * @param name The name of the group
 * @param fn The function to wrap in the group
 */
function group(name, fn) {
    return __awaiter(this, void 0, void 0, function* () {
        startGroup(name);
        let result;
        try {
            result = yield fn();
        }
        finally {
            endGroup();
        }
        return result;
    });
}
exports.group = group;
//-----------------------------------------------------------------------
// Wrapper action state
//-----------------------------------------------------------------------
/**
 * Saves state for current action, the state can only be retrieved by this action's post job execution.
 *
 * @param     name     name of the state to store
 * @param     value    value to store. Non-string values will be converted to a string via JSON.stringify
 */
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function saveState(name, value) {
    const filePath = process.env['GITHUB_STATE'] || '';
    if (filePath) {
        return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value));
    }
    command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value));
}
exports.saveState = saveState;
/**
 * Gets the value of an state set by this action's main execution.
 *
 * @param     name     name of the state to get
 * @returns   string
 */
function getState(name) {
    return process.env[`STATE_${name}`] || '';
}
exports.getState = getState;
function getIDToken(aud) {
    return __awaiter(this, void 0, void 0, function* () {
        return yield oidc_utils_1.OidcClient.getIDToken(aud);
    });
}
exports.getIDToken = getIDToken;
/**
 * Summary exports
 */
var summary_1 = __nccwpck_require__(8624);
Object.defineProperty(exports, "summary", ({ enumerable: true, get: function () { return summary_1.summary; } }));
/**
 * @deprecated use core.summary
 */
var summary_2 = __nccwpck_require__(8624);
Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } }));
/**
 * Path exports
 */
var path_utils_1 = __nccwpck_require__(5918);
Object.defineProperty(exports, "toPosixPath", ({ enumerable: true, get: function () { return path_utils_1.toPosixPath; } }));
Object.defineProperty(exports, "toWin32Path", ({ enumerable: true, get: function () { return path_utils_1.toWin32Path; } }));
Object.defineProperty(exports, "toPlatformPath", ({ enumerable: true, get: function () { return path_utils_1.toPlatformPath; } }));
//# sourceMappingURL=core.js.map

/***/ }),

/***/ 1201:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {

"use strict";

// For internal use, subject to change.
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.prepareKeyValueMessage = exports.issueFileCommand = void 0;
// We use any as a valid input type
/* eslint-disable @typescript-eslint/no-explicit-any */
const fs = __importStar(__nccwpck_require__(7147));
const os = __importStar(__nccwpck_require__(2037));
const uuid_1 = __nccwpck_require__(6494);
const utils_1 = __nccwpck_require__(195);
function issueFileCommand(command, message) {
    const filePath = process.env[`GITHUB_${command}`];
    if (!filePath) {
        throw new Error(`Unable to find environment variable for file command ${command}`);
    }
    if (!fs.existsSync(filePath)) {
        throw new Error(`Missing file at path: ${filePath}`);
    }
    fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, {
        encoding: 'utf8'
    });
}
exports.issueFileCommand = issueFileCommand;
function prepareKeyValueMessage(key, value) {
    const delimiter = `ghadelimiter_${uuid_1.v4()}`;
    const convertedValue = utils_1.toCommandValue(value);
    // These should realistically never happen, but just in case someone finds a
    // way to exploit uuid generation let's not allow keys or values that contain
    // the delimiter.
    if (key.includes(delimiter)) {
        throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`);
    }
    if (convertedValue.includes(delimiter)) {
        throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`);
    }
    return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`;
}
exports.prepareKeyValueMessage = prepareKeyValueMessage;
//# sourceMappingURL=file-command.js.map

/***/ }),

/***/ 1146:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {

"use strict";

var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.OidcClient = void 0;
const http_client_1 = __nccwpck_require__(517);
const auth_1 = __nccwpck_require__(3161);
const core_1 = __nccwpck_require__(7468);
class OidcClient {
    static createHttpClient(allowRetry = true, maxRetry = 10) {
        const requestOptions = {
            allowRetries: allowRetry,
            maxRetries: maxRetry
        };
        return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions);
    }
    static getRequestToken() {
        const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'];
        if (!token) {
            throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable');
        }
        return token;
    }
    static getIDTokenUrl() {
        const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL'];
        if (!runtimeUrl) {
            throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable');
        }
        return runtimeUrl;
    }
    static getCall(id_token_url) {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
            const httpclient = OidcClient.createHttpClient();
            const res = yield httpclient
                .getJson(id_token_url)
                .catch(error => {
                throw new Error(`Failed to get ID Token. \n 
        Error Code : ${error.statusCode}\n 
        Error Message: ${error.message}`);
            });
            const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;
            if (!id_token) {
                throw new Error('Response json body do not have ID Token field');
            }
            return id_token;
        });
    }
    static getIDToken(audience) {
        return __awaiter(this, void 0, void 0, function* () {
            try {
                // New ID Token is requested from action service
                let id_token_url = OidcClient.getIDTokenUrl();
                if (audience) {
                    const encodedAudience = encodeURIComponent(audience);
                    id_token_url = `${id_token_url}&audience=${encodedAudience}`;
                }
                core_1.debug(`ID token url is ${id_token_url}`);
                const id_token = yield OidcClient.getCall(id_token_url);
                core_1.setSecret(id_token);
                return id_token;
            }
            catch (error) {
                throw new Error(`Error message: ${error.message}`);
            }
        });
    }
}
exports.OidcClient = OidcClient;
//# sourceMappingURL=oidc-utils.js.map

/***/ }),

/***/ 5918:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {

"use strict";

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0;
const path = __importStar(__nccwpck_require__(1017));
/**
 * toPosixPath converts the given path to the posix form. On Windows, \\ will be
 * replaced with /.
 *
 * @param pth. Path to transform.
 * @return string Posix path.
 */
function toPosixPath(pth) {
    return pth.replace(/[\\]/g, '/');
}
exports.toPosixPath = toPosixPath;
/**
 * toWin32Path converts the given path to the win32 form. On Linux, / will be
 * replaced with \\.
 *
 * @param pth. Path to transform.
 * @return string Win32 path.
 */
function toWin32Path(pth) {
    return pth.replace(/[/]/g, '\\');
}
exports.toWin32Path = toWin32Path;
/**
 * toPlatformPath converts the given path to a platform-specific path. It does
 * this by replacing instances of / and \ with the platform-specific path
 * separator.
 *
 * @param pth The path to platformize.
 * @return string The platform-specific path.
 */
function toPlatformPath(pth) {
    return pth.replace(/[/\\]/g, path.sep);
}
exports.toPlatformPath = toPlatformPath;
//# sourceMappingURL=path-utils.js.map

/***/ }),

/***/ 8624:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {

"use strict";

var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;
const os_1 = __nccwpck_require__(2037);
const fs_1 = __nccwpck_require__(7147);
const { access, appendFile, writeFile } = fs_1.promises;
exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY';
exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary';
class Summary {
    constructor() {
        this._buffer = '';
    }
    /**
     * Finds the summary file path from the environment, rejects if env var is not found or file does not exist
     * Also checks r/w permissions.
     *
     * @returns step summary file path
     */
    filePath() {
        return __awaiter(this, void 0, void 0, function* () {
            if (this._filePath) {
                return this._filePath;
            }
            const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR];
            if (!pathFromEnv) {
                throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);
            }
            try {
                yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK);
            }
            catch (_a) {
                throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`);
            }
            this._filePath = pathFromEnv;
            return this._filePath;
        });
    }
    /**
     * Wraps content in an HTML tag, adding any HTML attributes
     *
     * @param {string} tag HTML tag to wrap
     * @param {string | null} content content within the tag
     * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add
     *
     * @returns {string} content wrapped in HTML element
     */
    wrap(tag, content, attrs = {}) {
        const htmlAttrs = Object.entries(attrs)
            .map(([key, value]) => ` ${key}="${value}"`)
            .join('');
        if (!content) {
            return `<${tag}${htmlAttrs}>`;
        }
        return `<${tag}${htmlAttrs}>${content}</${tag}>`;
    }
    /**
     * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default.
     *
     * @param {SummaryWriteOptions} [options] (optional) options for write operation
     *
     * @returns {Promise<Summary>} summary instance
     */
    write(options) {
        return __awaiter(this, void 0, void 0, function* () {
            const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite);
            const filePath = yield this.filePath();
            const writeFunc = overwrite ? writeFile : appendFile;
            yield writeFunc(filePath, this._buffer, { encoding: 'utf8' });
            return this.emptyBuffer();
        });
    }
    /**
     * Clears the summary buffer and wipes the summary file
     *
     * @returns {Summary} summary instance
     */
    clear() {
        return __awaiter(this, void 0, void 0, function* () {
            return this.emptyBuffer().write({ overwrite: true });
        });
    }
    /**
     * Returns the current summary buffer as a string
     *
     * @returns {string} string of summary buffer
     */
    stringify() {
        return this._buffer;
    }
    /**
     * If the summary buffer is empty
     *
     * @returns {boolen} true if the buffer is empty
     */
    isEmptyBuffer() {
        return this._buffer.length === 0;
    }
    /**
     * Resets the summary buffer without writing to summary file
     *
     * @returns {Summary} summary instance
     */
    emptyBuffer() {
        this._buffer = '';
        return this;
    }
    /**
     * Adds raw text to the summary buffer
     *
     * @param {string} text content to add
     * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false)
     *
     * @returns {Summary} summary instance
     */
    addRaw(text, addEOL = false) {
        this._buffer += text;
        return addEOL ? this.addEOL() : this;
    }
    /**
     * Adds the operating system-specific end-of-line marker to the buffer
     *
     * @returns {Summary} summary instance
     */
    addEOL() {
        return this.addRaw(os_1.EOL);
    }
    /**
     * Adds an HTML codeblock to the summary buffer
     *
     * @param {string} code content to render within fenced code block
     * @param {string} lang (optional) language to syntax highlight code
     *
     * @returns {Summary} summary instance
     */
    addCodeBlock(code, lang) {
        const attrs = Object.assign({}, (lang && { lang }));
        const element = this.wrap('pre', this.wrap('code', code), attrs);
        return this.addRaw(element).addEOL();
    }
    /**
     * Adds an HTML list to the summary buffer
     *
     * @param {string[]} items list of items to render
     * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false)
     *
     * @returns {Summary} summary instance
     */
    addList(items, ordered = false) {
        const tag = ordered ? 'ol' : 'ul';
        const listItems = items.map(item => this.wrap('li', item)).join('');
        const element = this.wrap(tag, listItems);
        return this.addRaw(element).addEOL();
    }
    /**
     * Adds an HTML table to the summary buffer
     *
     * @param {SummaryTableCell[]} rows table rows
     *
     * @returns {Summary} summary instance
     */
    addTable(rows) {
        const tableBody = rows
            .map(row => {
            const cells = row
                .map(cell => {
                if (typeof cell === 'string') {
                    return this.wrap('td', cell);
                }
                const { header, data, colspan, rowspan } = cell;
                const tag = header ? 'th' : 'td';
                const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan }));
                return this.wrap(tag, data, attrs);
            })
                .join('');
            return this.wrap('tr', cells);
        })
            .join('');
        const element = this.wrap('table', tableBody);
        return this.addRaw(element).addEOL();
    }
    /**
     * Adds a collapsable HTML details element to the summary buffer
     *
     * @param {string} label text for the closed state
     * @param {string} content collapsable content
     *
     * @returns {Summary} summary instance
     */
    addDetails(label, content) {
        const element = this.wrap('details', this.wrap('summary', label) + content);
        return this.addRaw(element).addEOL();
    }
    /**
     * Adds an HTML image tag to the summary buffer
     *
     * @param {string} src path to the image you to embed
     * @param {string} alt text description of the image
     * @param {SummaryImageOptions} options (optional) addition image attributes
     *
     * @returns {Summary} summary instance
     */
    addImage(src, alt, options) {
        const { width, height } = options || {};
        const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height }));
        const element = this.wrap('img', null, Object.assign({ src, alt }, attrs));
        return this.addRaw(element).addEOL();
    }
    /**
     * Adds an HTML section heading element
     *
     * @param {string} text heading text
     * @param {number | string} [level=1] (optional) the heading level, default: 1
     *
     * @returns {Summary} summary instance
     */
    addHeading(text, level) {
        const tag = `h${level}`;
        const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag)
            ? tag
            : 'h1';
        const element = this.wrap(allowedTag, text);
        return this.addRaw(element).addEOL();
    }
    /**
     * Adds an HTML thematic break (<hr>) to the summary buffer
     *
     * @returns {Summary} summary instance
     */
    addSeparator() {
        const element = this.wrap('hr', null);
        return this.addRaw(element).addEOL();
    }
    /**
     * Adds an HTML line break (<br>) to the summary buffer
     *
     * @returns {Summary} summary instance
     */
    addBreak() {
        const element = this.wrap('br', null);
        return this.addRaw(element).addEOL();
    }
    /**
     * Adds an HTML blockquote to the summary buffer
     *
     * @param {string} text quote text
     * @param {string} cite (optional) citation url
     *
     * @returns {Summary} summary instance
     */
    addQuote(text, cite) {
        const attrs = Object.assign({}, (cite && { cite }));
        const element = this.wrap('blockquote', text, attrs);
        return this.addRaw(element).addEOL();
    }
    /**
     * Adds an HTML anchor tag to the summary buffer
     *
     * @param {string} text link text/content
     * @param {string} href hyperlink
     *
     * @returns {Summary} summary instance
     */
    addLink(text, href) {
        const element = this.wrap('a', text, { href });
        return this.addRaw(element).addEOL();
    }
}
const _summary = new Summary();
/**
 * @deprecated use `core.summary`
 */
exports.markdownSummary = _summary;
exports.summary = _summary;
//# sourceMappingURL=summary.js.map

/***/ }),

/***/ 195:
/***/ ((__unused_webpack_module, exports) => {

"use strict";

// We use any as a valid input type
/* eslint-disable @typescript-eslint/no-explicit-any */
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.toCommandProperties = exports.toCommandValue = void 0;
/**
 * Sanitizes an input into a string so it can be passed into issueCommand safely
 * @param input input to sanitize into a string
 */
function toCommandValue(input) {
    if (input === null || input === undefined) {
        return '';
    }
    else if (typeof input === 'string' || input instanceof String) {
        return input;
    }
    return JSON.stringify(input);
}
exports.toCommandValue = toCommandValue;
/**
 *
 * @param annotationProperties
 * @returns The command properties to send with the actual annotation command
 * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646
 */
function toCommandProperties(annotationProperties) {
    if (!Object.keys(annotationProperties).length) {
        return {};
    }
    return {
        title: annotationProperties.title,
        file: annotationProperties.file,
        line: annotationProperties.startLine,
        endLine: annotationProperties.endLine,
        col: annotationProperties.startColumn,
        endColumn: annotationProperties.endColumn
    };
}
exports.toCommandProperties = toCommandProperties;
//# sourceMappingURL=utils.js.map

/***/ }),

/***/ 7520:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {

"use strict";

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getExecOutput = exports.exec = void 0;
const string_decoder_1 = __nccwpck_require__(1576);
const tr = __importStar(__nccwpck_require__(3644));
/**
 * Exec a command.
 * Output will be streamed to the live console.
 * Returns promise with return code
 *
 * @param     commandLine        command to execute (can include additional args). Must be correctly escaped.
 * @param     args               optional arguments for tool. Escaping is handled by the lib.
 * @param     options            optional exec options.  See ExecOptions
 * @returns   Promise<number>    exit code
 */
function exec(commandLine, args, options) {
    return __awaiter(this, void 0, void 0, function* () {
        const commandArgs = tr.argStringToArray(commandLine);
        if (commandArgs.length === 0) {
            throw new Error(`Parameter 'commandLine' cannot be null or empty.`);
        }
        // Path to tool to execute should be first arg
        const toolPath = commandArgs[0];
        args = commandArgs.slice(1).concat(args || []);
        const runner = new tr.ToolRunner(toolPath, args, options);
        return runner.exec();
    });
}
exports.exec = exec;
/**
 * Exec a command and get the output.
 * Output will be streamed to the live console.
 * Returns promise with the exit code and collected stdout and stderr
 *
 * @param     commandLine           command to execute (can include additional args). Must be correctly escaped.
 * @param     args                  optional arguments for tool. Escaping is handled by the lib.
 * @param     options               optional exec options.  See ExecOptions
 * @returns   Promise<ExecOutput>   exit code, stdout, and stderr
 */
function getExecOutput(commandLine, args, options) {
    var _a, _b;
    return __awaiter(this, void 0, void 0, function* () {
        let stdout = '';
        let stderr = '';
        //Using string decoder covers the case where a mult-byte character is split
        const stdoutDecoder = new string_decoder_1.StringDecoder('utf8');
        const stderrDecoder = new string_decoder_1.StringDecoder('utf8');
        const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout;
        const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr;
        const stdErrListener = (data) => {
            stderr += stderrDecoder.write(data);
            if (originalStdErrListener) {
                originalStdErrListener(data);
            }
        };
        const stdOutListener = (data) => {
            stdout += stdoutDecoder.write(data);
            if (originalStdoutListener) {
                originalStdoutListener(data);
            }
        };
        const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener });
        const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners }));
        //flush any remaining characters
        stdout += stdoutDecoder.end();
        stderr += stderrDecoder.end();
        return {
            exitCode,
            stdout,
            stderr
        };
    });
}
exports.getExecOutput = getExecOutput;
//# sourceMappingURL=exec.js.map

/***/ }),

/***/ 3644:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {

"use strict";

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.argStringToArray = exports.ToolRunner = void 0;
const os = __importStar(__nccwpck_require__(2037));
const events = __importStar(__nccwpck_require__(2361));
const child = __importStar(__nccwpck_require__(2081));
const path = __importStar(__nccwpck_require__(1017));
const io = __importStar(__nccwpck_require__(3086));
const ioUtil = __importStar(__nccwpck_require__(9784));
const timers_1 = __nccwpck_require__(9512);
/* eslint-disable @typescript-eslint/unbound-method */
const IS_WINDOWS = process.platform === 'win32';
/*
 * Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way.
 */
class ToolRunner extends events.EventEmitter {
    constructor(toolPath, args, options) {
        super();
        if (!toolPath) {
            throw new Error("Parameter 'toolPath' cannot be null or empty.");
        }
        this.toolPath = toolPath;
        this.args = args || [];
        this.options = options || {};
    }
    _debug(message) {
        if (this.options.listeners && this.options.listeners.debug) {
            this.options.listeners.debug(message);
        }
    }
    _getCommandString(options, noPrefix) {
        const toolPath = this._getSpawnFileName();
        const args = this._getSpawnArgs(options);
        let cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool
        if (IS_WINDOWS) {
            // Windows + cmd file
            if (this._isCmdFile()) {
                cmd += toolPath;
                for (const a of args) {
                    cmd += ` ${a}`;
                }
            }
            // Windows + verbatim
            else if (options.windowsVerbatimArguments) {
                cmd += `"${toolPath}"`;
                for (const a of args) {
                    cmd += ` ${a}`;
                }
            }
            // Windows (regular)
            else {
                cmd += this._windowsQuoteCmdArg(toolPath);
                for (const a of args) {
                    cmd += ` ${this._windowsQuoteCmdArg(a)}`;
                }
            }
        }
        else {
            // OSX/Linux - this can likely be improved with some form of quoting.
            // creating processes on Unix is fundamentally different than Windows.
            // on Unix, execvp() takes an arg array.
            cmd += toolPath;
            for (const a of args) {
                cmd += ` ${a}`;
            }
        }
        return cmd;
    }
    _processLineBuffer(data, strBuffer, onLine) {
        try {
            let s = strBuffer + data.toString();
            let n = s.indexOf(os.EOL);
            while (n > -1) {
                const line = s.substring(0, n);
                onLine(line);
                // the rest of the string ...
                s = s.substring(n + os.EOL.length);
                n = s.indexOf(os.EOL);
            }
            return s;
        }
        catch (err) {
            // streaming lines to console is best effort.  Don't fail a build.
            this._debug(`error processing line. Failed with error ${err}`);
            return '';
        }
    }
    _getSpawnFileName() {
        if (IS_WINDOWS) {
            if (this._isCmdFile()) {
                return process.env['COMSPEC'] || 'cmd.exe';
            }
        }
        return this.toolPath;
    }
    _getSpawnArgs(options) {
        if (IS_WINDOWS) {
            if (this._isCmdFile()) {
                let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;
                for (const a of this.args) {
                    argline += ' ';
                    argline += options.windowsVerbatimArguments
                        ? a
                        : this._windowsQuoteCmdArg(a);
                }
                argline += '"';
                return [argline];
            }
        }
        return this.args;
    }
    _endsWith(str, end) {
        return str.endsWith(end);
    }
    _isCmdFile() {
        const upperToolPath = this.toolPath.toUpperCase();
        return (this._endsWith(upperToolPath, '.CMD') ||
            this._endsWith(upperToolPath, '.BAT'));
    }
    _windowsQuoteCmdArg(arg) {
        // for .exe, apply the normal quoting rules that libuv applies
        if (!this._isCmdFile()) {
            return this._uvQuoteCmdArg(arg);
        }
        // otherwise apply quoting rules specific to the cmd.exe command line parser.
        // the libuv rules are generic and are not designed specifically for cmd.exe
        // command line parser.
        //
        // for a detailed description of the cmd.exe command line parser, refer to
        // http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912
        // need quotes for empty arg
        if (!arg) {
            return '""';
        }
        // determine whether the arg needs to be quoted
        const cmdSpecialChars = [
            ' ',
            '\t',
            '&',
            '(',
            ')',
            '[',
            ']',
            '{',
            '}',
            '^',
            '=',
            ';',
            '!',
            "'",
            '+',
            ',',
            '`',
            '~',
            '|',
            '<',
            '>',
            '"'
        ];
        let needsQuotes = false;
        for (const char of arg) {
            if (cmdSpecialChars.some(x => x === char)) {
                needsQuotes = true;
                break;
            }
        }
        // short-circuit if quotes not needed
        if (!needsQuotes) {
            return arg;
        }
        // the following quoting rules are very similar to the rules that by libuv applies.
        //
        // 1) wrap the string in quotes
        //
        // 2) double-up quotes - i.e. " => ""
        //
        //    this is different from the libuv quoting rules. libuv replaces " with \", which unfortunately
        //    doesn't work well with a cmd.exe command line.
        //
        //    note, replacing " with "" also works well if the arg is passed to a downstream .NET console app.
        //    for example, the command line:
        //          foo.exe "myarg:""my val"""
        //    is parsed by a .NET console app into an arg array:
        //          [ "myarg:\"my val\"" ]
        //    which is the same end result when applying libuv quoting rules. although the actual
        //    command line from libuv quoting rules would look like:
        //          foo.exe "myarg:\"my val\""
        //
        // 3) double-up slashes that precede a quote,
        //    e.g.  hello \world    => "hello \world"
        //          hello\"world    => "hello\\""world"
        //          hello\\"world   => "hello\\\\""world"
        //          hello world\    => "hello world\\"
        //
        //    technically this is not required for a cmd.exe command line, or the batch argument parser.
        //    the reasons for including this as a .cmd quoting rule are:
        //
        //    a) this is optimized for the scenario where the argument is passed from the .cmd file to an
        //       external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule.
        //
        //    b) it's what we've been doing previously (by deferring to node default behavior) and we
        //       haven't heard any complaints about that aspect.
        //
        // note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be
        // escaped when used on the command line directly - even though within a .cmd file % can be escaped
        // by using %%.
        //
        // the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts
        // the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing.
        //
        // one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would
        // often work, since it is unlikely that var^ would exist, and the ^ character is removed when the
        // variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args
        // to an external program.
        //
        // an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file.
        // % can be escaped within a .cmd file.
        let reverse = '"';
        let quoteHit = true;
        for (let i = arg.length; i > 0; i--) {
            // walk the string in reverse
            reverse += arg[i - 1];
            if (quoteHit && arg[i - 1] === '\\') {
                reverse += '\\'; // double the slash
            }
            else if (arg[i - 1] === '"') {
                quoteHit = true;
                reverse += '"'; // double the quote
            }
            else {
                quoteHit = false;
            }
        }
        reverse += '"';
        return reverse
            .split('')
            .reverse()
            .join('');
    }
    _uvQuoteCmdArg(arg) {
        // Tool runner wraps child_process.spawn() and needs to apply the same quoting as
        // Node in certain cases where the undocumented spawn option windowsVerbatimArguments
        // is used.
        //
        // Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV,
        // see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details),
        // pasting copyright notice from Node within this function:
        //
        //      Copyright Joyent, Inc. and other Node contributors. All rights reserved.
        //
        //      Permission is hereby granted, free of charge, to any person obtaining a copy
        //      of this software and associated documentation files (the "Software"), to
        //      deal in the Software without restriction, including without limitation the
        //      rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
        //      sell copies of the Software, and to permit persons to whom the Software is
        //      furnished to do so, subject to the following conditions:
        //
        //      The above copyright notice and this permission notice shall be included in
        //      all copies or substantial portions of the Software.
        //
        //      THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        //      IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        //      FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        //      AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        //      LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
        //      FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
        //      IN THE SOFTWARE.
        if (!arg) {
            // Need double quotation for empty argument
            return '""';
        }
        if (!arg.includes(' ') && !arg.includes('\t') && !arg.includes('"')) {
            // No quotation needed
            return arg;
        }
        if (!arg.includes('"') && !arg.includes('\\')) {
            // No embedded double quotes or backslashes, so I can just wrap
            // quote marks around the whole thing.
            return `"${arg}"`;
        }
        // Expected input/output:
        //   input : hello"world
        //   output: "hello\"world"
        //   input : hello""world
        //   output: "hello\"\"world"
        //   input : hello\world
        //   output: hello\world
        //   input : hello\\world
        //   output: hello\\world
        //   input : hello\"world
        //   output: "hello\\\"world"
        //   input : hello\\"world
        //   output: "hello\\\\\"world"
        //   input : hello world\
        //   output: "hello world\\" - note the comment in libuv actually reads "hello world\"
        //                             but it appears the comment is wrong, it should be "hello world\\"
        let reverse = '"';
        let quoteHit = true;
        for (let i = arg.length; i > 0; i--) {
            // walk the string in reverse
            reverse += arg[i - 1];
            if (quoteHit && arg[i - 1] === '\\') {
                reverse += '\\';
            }
            else if (arg[i - 1] === '"') {
                quoteHit = true;
                reverse += '\\';
            }
            else {
                quoteHit = false;
            }
        }
        reverse += '"';
        return reverse
            .split('')
            .reverse()
            .join('');
    }
    _cloneExecOptions(options) {
        options = options || {};
        const result = {
            cwd: options.cwd || process.cwd(),
            env: options.env || process.env,
            silent: options.silent || false,
            windowsVerbatimArguments: options.windowsVerbatimArguments || false,
            failOnStdErr: options.failOnStdErr || false,
            ignoreReturnCode: options.ignoreReturnCode || false,
            delay: options.delay || 10000
        };
        result.outStream = options.outStream || process.stdout;
        result.errStream = options.errStream || process.stderr;
        return result;
    }
    _getSpawnOptions(options, toolPath) {
        options = options || {};
        const result = {};
        result.cwd = options.cwd;
        result.env = options.env;
        result['windowsVerbatimArguments'] =
            options.windowsVerbatimArguments || this._isCmdFile();
        if (options.windowsVerbatimArguments) {
            result.argv0 = `"${toolPath}"`;
        }
        return result;
    }
    /**
     * Exec a tool.
     * Output will be streamed to the live console.
     * Returns promise with return code
     *
     * @param     tool     path to tool to exec
     * @param     options  optional exec options.  See ExecOptions
     * @returns   number
     */
    exec() {
        return __awaiter(this, void 0, void 0, function* () {
            // root the tool path if it is unrooted and contains relative pathing
            if (!ioUtil.isRooted(this.toolPath) &&
                (this.toolPath.includes('/') ||
                    (IS_WINDOWS && this.toolPath.includes('\\')))) {
                // prefer options.cwd if it is specified, however options.cwd may also need to be rooted
                this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath);
            }
            // if the tool is only a file name, then resolve it from the PATH
            // otherwise verify it exists (add extension on Windows if necessary)
            this.toolPath = yield io.which(this.toolPath, true);
            return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
                this._debug(`exec tool: ${this.toolPath}`);
                this._debug('arguments:');
                for (const arg of this.args) {
                    this._debug(`   ${arg}`);
                }
                const optionsNonNull = this._cloneExecOptions(this.options);
                if (!optionsNonNull.silent && optionsNonNull.outStream) {
                    optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL);
                }
                const state = new ExecState(optionsNonNull, this.toolPath);
                state.on('debug', (message) => {
                    this._debug(message);
                });
                if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) {
                    return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`));
                }
                const fileName = this._getSpawnFileName();
                const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName));
                let stdbuffer = '';
                if (cp.stdout) {
                    cp.stdout.on('data', (data) => {
                        if (this.options.listeners && this.options.listeners.stdout) {
                            this.options.listeners.stdout(data);
                        }
                        if (!optionsNonNull.silent && optionsNonNull.outStream) {
                            optionsNonNull.outStream.write(data);
                        }
                        stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => {
                            if (this.options.listeners && this.options.listeners.stdline) {
                                this.options.listeners.stdline(line);
                            }
                        });
                    });
                }
                let errbuffer = '';
                if (cp.stderr) {
                    cp.stderr.on('data', (data) => {
                        state.processStderr = true;
                        if (this.options.listeners && this.options.listeners.stderr) {
                            this.options.listeners.stderr(data);
                        }
                        if (!optionsNonNull.silent &&
                            optionsNonNull.errStream &&
                            optionsNonNull.outStream) {
                            const s = optionsNonNull.failOnStdErr
                                ? optionsNonNull.errStream
                                : optionsNonNull.outStream;
                            s.write(data);
                        }
                        errbuffer = this._processLineBuffer(data, errbuffer, (line) => {
                            if (this.options.listeners && this.options.listeners.errline) {
                                this.options.listeners.errline(line);
                            }
                        });
                    });
                }
                cp.on('error', (err) => {
                    state.processError = err.message;
                    state.processExited = true;
                    state.processClosed = true;
                    state.CheckComplete();
                });
                cp.on('exit', (code) => {
                    state.processExitCode = code;
                    state.processExited = true;
                    this._debug(`Exit code ${code} received from tool '${this.toolPath}'`);
                    state.CheckComplete();
                });
                cp.on('close', (code) => {
                    state.processExitCode = code;
                    state.processExited = true;
                    state.processClosed = true;
                    this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);
                    state.CheckComplete();
                });
                state.on('done', (error, exitCode) => {
                    if (stdbuffer.length > 0) {
                        this.emit('stdline', stdbuffer);
                    }
                    if (errbuffer.length > 0) {
                        this.emit('errline', errbuffer);
                    }
                    cp.removeAllListeners();
                    if (error) {
                        reject(error);
                    }
                    else {
                        resolve(exitCode);
                    }
                });
                if (this.options.input) {
                    if (!cp.stdin) {
                        throw new Error('child process missing stdin');
                    }
                    cp.stdin.end(this.options.input);
                }
            }));
        });
    }
}
exports.ToolRunner = ToolRunner;
/**
 * Convert an arg string to an array of args. Handles escaping
 *
 * @param    argString   string of arguments
 * @returns  string[]    array of arguments
 */
function argStringToArray(argString) {
    const args = [];
    let inQuotes = false;
    let escaped = false;
    let arg = '';
    function append(c) {
        // we only escape double quotes.
        if (escaped && c !== '"') {
            arg += '\\';
        }
        arg += c;
        escaped = false;
    }
    for (let i = 0; i < argString.length; i++) {
        const c = argString.charAt(i);
        if (c === '"') {
            if (!escaped) {
                inQuotes = !inQuotes;
            }
            else {
                append(c);
            }
            continue;
        }
        if (c === '\\' && escaped) {
            append(c);
            continue;
        }
        if (c === '\\' && inQuotes) {
            escaped = true;
            continue;
        }
        if (c === ' ' && !inQuotes) {
            if (arg.length > 0) {
                args.push(arg);
                arg = '';
            }
            continue;
        }
        append(c);
    }
    if (arg.length > 0) {
        args.push(arg.trim());
    }
    return args;
}
exports.argStringToArray = argStringToArray;
class ExecState extends events.EventEmitter {
    constructor(options, toolPath) {
        super();
        this.processClosed = false; // tracks whether the process has exited and stdio is closed
        this.processError = '';
        this.processExitCode = 0;
        this.processExited = false; // tracks whether the process has exited
        this.processStderr = false; // tracks whether stderr was written to
        this.delay = 10000; // 10 seconds
        this.done = false;
        this.timeout = null;
        if (!toolPath) {
            throw new Error('toolPath must not be empty');
        }
        this.options = options;
        this.toolPath = toolPath;
        if (options.delay) {
            this.delay = options.delay;
        }
    }
    CheckComplete() {
        if (this.done) {
            return;
        }
        if (this.processClosed) {
            this._setResult();
        }
        else if (this.processExited) {
            this.timeout = timers_1.setTimeout(ExecState.HandleTimeout, this.delay, this);
        }
    }
    _debug(message) {
        this.emit('debug', message);
    }
    _setResult() {
        // determine whether there is an error
        let error;
        if (this.processExited) {
            if (this.processError) {
                error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`);
            }
            else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) {
                error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);
            }
            else if (this.processStderr && this.options.failOnStdErr) {
                error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`);
            }
        }
        // clear the timeout
        if (this.timeout) {
            clearTimeout(this.timeout);
            this.timeout = null;
        }
        this.done = true;
        this.emit('done', error, this.processExitCode);
    }
    static HandleTimeout(state) {
        if (state.done) {
            return;
        }
        if (!state.processClosed && state.processExited) {
            const message = `The STDIO streams did not close within ${state.delay /
                1000} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;
            state._debug(message);
        }
        state._setResult();
    }
}
//# sourceMappingURL=toolrunner.js.map

/***/ }),

/***/ 5395:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.Context = void 0;
const fs_1 = __nccwpck_require__(7147);
const os_1 = __nccwpck_require__(2037);
class Context {
    /**
     * Hydrate the context from the environment
     */
    constructor() {
        var _a, _b, _c;
        this.payload = {};
        if (process.env.GITHUB_EVENT_PATH) {
            if (fs_1.existsSync(process.env.GITHUB_EVENT_PATH)) {
                this.payload = JSON.parse(fs_1.readFileSync(process.env.GITHUB_EVENT_PATH, { encoding: 'utf8' }));
            }
            else {
                const path = process.env.GITHUB_EVENT_PATH;
                process.stdout.write(`GITHUB_EVENT_PATH ${path} does not exist${os_1.EOL}`);
            }
        }
        this.eventName = process.env.GITHUB_EVENT_NAME;
        this.sha = process.env.GITHUB_SHA;
        this.ref = process.env.GITHUB_REF;
        this.workflow = process.env.GITHUB_WORKFLOW;
        this.action = process.env.GITHUB_ACTION;
        this.actor = process.env.GITHUB_ACTOR;
        this.job = process.env.GITHUB_JOB;
        this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10);
        this.runId = parseInt(process.env.GITHUB_RUN_ID, 10);
        this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`;
        this.serverUrl = (_b = process.env.GITHUB_SERVER_URL) !== null && _b !== void 0 ? _b : `https://github.com`;
        this.graphqlUrl = (_c = process.env.GITHUB_GRAPHQL_URL) !== null && _c !== void 0 ? _c : `https://api.github.com/graphql`;
    }
    get issue() {
        const payload = this.payload;
        return Object.assign(Object.assign({}, this.repo), { number: (payload.issue || payload.pull_request || payload).number });
    }
    get repo() {
        if (process.env.GITHUB_REPOSITORY) {
            const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');
            return { owner, repo };
        }
        if (this.payload.repository) {
            return {
                owner: this.payload.repository.owner.login,
                repo: this.payload.repository.name
            };
        }
        throw new Error("context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'");
    }
}
exports.Context = Context;
//# sourceMappingURL=context.js.map

/***/ }),

/***/ 9373:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {

"use strict";

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getOctokit = exports.context = void 0;
const Context = __importStar(__nccwpck_require__(5395));
const utils_1 = __nccwpck_require__(1563);
exports.context = new Context.Context();
/**
 * Returns a hydrated octokit ready to use for GitHub Actions
 *
 * @param     token    the repo PAT or GITHUB_TOKEN
 * @param     options  other options to set
 */
function getOctokit(token, options, ...additionalPlugins) {
    const GitHubWithPlugins = utils_1.GitHub.plugin(...additionalPlugins);
    return new GitHubWithPlugins(utils_1.getOctokitOptions(token, options));
}
exports.getOctokit = getOctokit;
//# sourceMappingURL=github.js.map

/***/ }),

/***/ 7632:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {

"use strict";

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getApiBaseUrl = exports.getProxyAgent = exports.getAuthString = void 0;
const httpClient = __importStar(__nccwpck_require__(517));
function getAuthString(token, options) {
    if (!token && !options.auth) {
        throw new Error('Parameter token or opts.auth is required');
    }
    else if (token && options.auth) {
        throw new Error('Parameters token and opts.auth may not both be specified');
    }
    return typeof options.auth === 'string' ? options.auth : `token ${token}`;
}
exports.getAuthString = getAuthString;
function getProxyAgent(destinationUrl) {
    const hc = new httpClient.HttpClient();
    return hc.getAgent(destinationUrl);
}
exports.getProxyAgent = getProxyAgent;
function getApiBaseUrl() {
    return process.env['GITHUB_API_URL'] || 'https://api.github.com';
}
exports.getApiBaseUrl = getApiBaseUrl;
//# sourceMappingURL=utils.js.map

/***/ }),

/***/ 1563:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {

"use strict";

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getOctokitOptions = exports.GitHub = exports.defaults = exports.context = void 0;
const Context = __importStar(__nccwpck_require__(5395));
const Utils = __importStar(__nccwpck_require__(7632));
// octokit + plugins
const core_1 = __nccwpck_require__(3101);
const plugin_rest_endpoint_methods_1 = __nccwpck_require__(8478);
const plugin_paginate_rest_1 = __nccwpck_require__(6790);
exports.context = new Context.Context();
const baseUrl = Utils.getApiBaseUrl();
exports.defaults = {
    baseUrl,
    request: {
        agent: Utils.getProxyAgent(baseUrl)
    }
};
exports.GitHub = core_1.Octokit.plugin(plugin_rest_endpoint_methods_1.restEndpointMethods, plugin_paginate_rest_1.paginateRest).defaults(exports.defaults);
/**
 * Convience function to correctly format Octokit Options to pass into the constructor.
 *
 * @param     token    the repo PAT or GITHUB_TOKEN
 * @param     options  other options to set
 */
function getOctokitOptions(token, options) {
    const opts = Object.assign({}, options || {}); // Shallow clone - don't mutate the object provided by the caller
    // Auth
    const auth = Utils.getAuthString(token, opts);
    if (auth) {
        opts.auth = auth;
    }
    return opts;
}
exports.getOctokitOptions = getOctokitOptions;
//# sourceMappingURL=utils.js.map

/***/ }),

/***/ 3161:
/***/ (function(__unused_webpack_module, exports) {

"use strict";

var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0;
class BasicCredentialHandler {
    constructor(username, password) {
        this.username = username;
        this.password = password;
    }
    prepareRequest(options) {
        if (!options.headers) {
            throw Error('The request has no headers');
        }
        options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`;
    }
    // This handler cannot handle 401
    canHandleAuthentication() {
        return false;
    }
    handleAuthentication() {
        return __awaiter(this, void 0, void 0, function* () {
            throw new Error('not implemented');
        });
    }
}
exports.BasicCredentialHandler = BasicCredentialHandler;
class BearerCredentialHandler {
    constructor(token) {
        this.token = token;
    }
    // currently implements pre-authorization
    // TODO: support preAuth = false where it hooks on 401
    prepareRequest(options) {
        if (!options.headers) {
            throw Error('The request has no headers');
        }
        options.headers['Authorization'] = `Bearer ${this.token}`;
    }
    // This handler cannot handle 401
    canHandleAuthentication() {
        return false;
    }
    handleAuthentication() {
        return __awaiter(this, void 0, void 0, function* () {
            throw new Error('not implemented');
        });
    }
}
exports.BearerCredentialHandler = BearerCredentialHandler;
class PersonalAccessTokenCredentialHandler {
    constructor(token) {
        this.token = token;
    }
    // currently implements pre-authorization
    // TODO: support preAuth = false where it hooks on 401
    prepareRequest(options) {
        if (!options.headers) {
            throw Error('The request has no headers');
        }
        options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`;
    }
    // This handler cannot handle 401
    canHandleAuthentication() {
        return false;
    }
    handleAuthentication() {
        return __awaiter(this, void 0, void 0, function* () {
            throw new Error('not implemented');
        });
    }
}
exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;
//# sourceMappingURL=auth.js.map

/***/ }),

/***/ 517:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {

"use strict";

/* eslint-disable @typescript-eslint/no-explicit-any */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0;
const http = __importStar(__nccwpck_require__(3685));
const https = __importStar(__nccwpck_require__(5687));
const pm = __importStar(__nccwpck_require__(2707));
const tunnel = __importStar(__nccwpck_require__(2159));
const undici_1 = __nccwpck_require__(5152);
var HttpCodes;
(function (HttpCodes) {
    HttpCodes[HttpCodes["OK"] = 200] = "OK";
    HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices";
    HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently";
    HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved";
    HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther";
    HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified";
    HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy";
    HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy";
    HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect";
    HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect";
    HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest";
    HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized";
    HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired";
    HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden";
    HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound";
    HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed";
    HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable";
    HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired";
    HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout";
    HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict";
    HttpCodes[HttpCodes["Gone"] = 410] = "Gone";
    HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests";
    HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError";
    HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented";
    HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway";
    HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable";
    HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout";
})(HttpCodes || (exports.HttpCodes = HttpCodes = {}));
var Headers;
(function (Headers) {
    Headers["Accept"] = "accept";
    Headers["ContentType"] = "content-type";
})(Headers || (exports.Headers = Headers = {}));
var MediaTypes;
(function (MediaTypes) {
    MediaTypes["ApplicationJson"] = "application/json";
})(MediaTypes || (exports.MediaTypes = MediaTypes = {}));
/**
 * Returns the proxy URL, depending upon the supplied url and proxy environment variables.
 * @param serverUrl  The server URL where the request will be sent. For example, https://api.github.com
 */
function getProxyUrl(serverUrl) {
    const proxyUrl = pm.getProxyUrl(new URL(serverUrl));
    return proxyUrl ? proxyUrl.href : '';
}
exports.getProxyUrl = getProxyUrl;
const HttpRedirectCodes = [
    HttpCodes.MovedPermanently,
    HttpCodes.ResourceMoved,
    HttpCodes.SeeOther,
    HttpCodes.TemporaryRedirect,
    HttpCodes.PermanentRedirect
];
const HttpResponseRetryCodes = [
    HttpCodes.BadGateway,
    HttpCodes.ServiceUnavailable,
    HttpCodes.GatewayTimeout
];
const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];
const ExponentialBackoffCeiling = 10;
const ExponentialBackoffTimeSlice = 5;
class HttpClientError extends Error {
    constructor(message, statusCode) {
        super(message);
        this.name = 'HttpClientError';
        this.statusCode = statusCode;
        Object.setPrototypeOf(this, HttpClientError.prototype);
    }
}
exports.HttpClientError = HttpClientError;
class HttpClientResponse {
    constructor(message) {
        this.message = message;
    }
    readBody() {
        return __awaiter(this, void 0, void 0, function* () {
            return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
                let output = Buffer.alloc(0);
                this.message.on('data', (chunk) => {
                    output = Buffer.concat([output, chunk]);
                });
                this.message.on('end', () => {
                    resolve(output.toString());
                });
            }));
        });
    }
    readBodyBuffer() {
        return __awaiter(this, void 0, void 0, function* () {
            return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
                const chunks = [];
                this.message.on('data', (chunk) => {
                    chunks.push(chunk);
                });
                this.message.on('end', () => {
                    resolve(Buffer.concat(chunks));
                });
            }));
        });
    }
}
exports.HttpClientResponse = HttpClientResponse;
function isHttps(requestUrl) {
    const parsedUrl = new URL(requestUrl);
    return parsedUrl.protocol === 'https:';
}
exports.isHttps = isHttps;
class HttpClient {
    constructor(userAgent, handlers, requestOptions) {
        this._ignoreSslError = false;
        this._allowRedirects = true;
        this._allowRedirectDowngrade = false;
        this._maxRedirects = 50;
        this._allowRetries = false;
        this._maxRetries = 1;
        this._keepAlive = false;
        this._disposed = false;
        this.userAgent = userAgent;
        this.handlers = handlers || [];
        this.requestOptions = requestOptions;
        if (requestOptions) {
            if (requestOptions.ignoreSslError != null) {
                this._ignoreSslError = requestOptions.ignoreSslError;
            }
            this._socketTimeout = requestOptions.socketTimeout;
            if (requestOptions.allowRedirects != null) {
                this._allowRedirects = requestOptions.allowRedirects;
            }
            if (requestOptions.allowRedirectDowngrade != null) {
                this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade;
            }
            if (requestOptions.maxRedirects != null) {
                this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);
            }
            if (requestOptions.keepAlive != null) {
                this._keepAlive = requestOptions.keepAlive;
            }
            if (requestOptions.allowRetries != null) {
                this._allowRetries = requestOptions.allowRetries;
            }
            if (requestOptions.maxRetries != null) {
                this._maxRetries = requestOptions.maxRetries;
            }
        }
    }
    options(requestUrl, additionalHeaders) {
        return __awaiter(this, void 0, void 0, function* () {
            return this.request('OPTIONS', requestUrl, null, additionalHeaders || {});
        });
    }
    get(requestUrl, additionalHeaders) {
        return __awaiter(this, void 0, void 0, function* () {
            return this.request('GET', requestUrl, null, additionalHeaders || {});
        });
    }
    del(requestUrl, additionalHeaders) {
        return __awaiter(this, void 0, void 0, function* () {
            return this.request('DELETE', requestUrl, null, additionalHeaders || {});
        });
    }
    post(requestUrl, data, additionalHeaders) {
        return __awaiter(this, void 0, void 0, function* () {
            return this.request('POST', requestUrl, data, additionalHeaders || {});
        });
    }
    patch(requestUrl, data, additionalHeaders) {
        return __awaiter(this, void 0, void 0, function* () {
            return this.request('PATCH', requestUrl, data, additionalHeaders || {});
        });
    }
    put(requestUrl, data, additionalHeaders) {
        return __awaiter(this, void 0, void 0, function* () {
            return this.request('PUT', requestUrl, data, additionalHeaders || {});
        });
    }
    head(requestUrl, additionalHeaders) {
        return __awaiter(this, void 0, void 0, function* () {
            return this.request('HEAD', requestUrl, null, additionalHeaders || {});
        });
    }
    sendStream(verb, requestUrl, stream, additionalHeaders) {
        return __awaiter(this, void 0, void 0, function* () {
            return this.request(verb, requestUrl, stream, additionalHeaders);
        });
    }
    /**
     * Gets a typed object from an endpoint
     * Be aware that not found returns a null.  Other errors (4xx, 5xx) reject the promise
     */
    getJson(requestUrl, additionalHeaders = {}) {
        return __awaiter(this, void 0, void 0, function* () {
            additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
            const res = yield this.get(requestUrl, additionalHeaders);
            return this._processResponse(res, this.requestOptions);
        });
    }
    postJson(requestUrl, obj, additionalHeaders = {}) {
        return __awaiter(this, void 0, void 0, function* () {
            const data = JSON.stringify(obj, null, 2);
            additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
            additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
            const res = yield this.post(requestUrl, data, additionalHeaders);
            return this._processResponse(res, this.requestOptions);
        });
    }
    putJson(requestUrl, obj, additionalHeaders = {}) {
        return __awaiter(this, void 0, void 0, function* () {
            const data = JSON.stringify(obj, null, 2);
            additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
            additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
            const res = yield this.put(requestUrl, data, additionalHeaders);
            return this._processResponse(res, this.requestOptions);
        });
    }
    patchJson(requestUrl, obj, additionalHeaders = {}) {
        return __awaiter(this, void 0, void 0, function* () {
            const data = JSON.stringify(obj, null, 2);
            additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
            additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
            const res = yield this.patch(requestUrl, data, additionalHeaders);
            return this._processResponse(res, this.requestOptions);
        });
    }
    /**
     * Makes a raw http request.
     * All other methods such as get, post, patch, and request ultimately call this.
     * Prefer get, del, post and patch
     */
    request(verb, requestUrl, data, headers) {
        return __awaiter(this, void 0, void 0, function* () {
            if (this._disposed) {
                throw new Error('Client has already been disposed.');
            }
            const parsedUrl = new URL(requestUrl);
            let info = this._prepareRequest(verb, parsedUrl, headers);
            // Only perform retries on reads since writes may not be idempotent.
            const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb)
                ? this._maxRetries + 1
                : 1;
            let numTries = 0;
            let response;
            do {
                response = yield this.requestRaw(info, data);
                // Check if it's an authentication challenge
                if (response &&
                    response.message &&
                    response.message.statusCode === HttpCodes.Unauthorized) {
                    let authenticationHandler;
                    for (const handler of this.handlers) {
                        if (handler.canHandleAuthentication(response)) {
                            authenticationHandler = handler;
                            break;
                        }
                    }
                    if (authenticationHandler) {
                        return authenticationHandler.handleAuthentication(this, info, data);
                    }
                    else {
                        // We have received an unauthorized response but have no handlers to handle it.
                        // Let the response return to the caller.
                        return response;
                    }
                }
                let redirectsRemaining = this._maxRedirects;
                while (response.message.statusCode &&
                    HttpRedirectCodes.includes(response.message.statusCode) &&
                    this._allowRedirects &&
                    redirectsRemaining > 0) {
                    const redirectUrl = response.message.headers['location'];
                    if (!redirectUrl) {
                        // if there's no location to redirect to, we won't
                        break;
                    }
                    const parsedRedirectUrl = new URL(redirectUrl);
                    if (parsedUrl.protocol === 'https:' &&
                        parsedUrl.protocol !== parsedRedirectUrl.protocol &&
                        !this._allowRedirectDowngrade) {
                        throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.');
                    }
                    // we need to finish reading the response before reassigning response
                    // which will leak the open socket.
                    yield response.readBody();
                    // strip authorization header if redirected to a different hostname
                    if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {
                        for (const header in headers) {
                            // header names are case insensitive
                            if (header.toLowerCase() === 'authorization') {
                                delete headers[header];
                            }
                        }
                    }
                    // let's make the request with the new redirectUrl
                    info = this._prepareRequest(verb, parsedRedirectUrl, headers);
                    response = yield this.requestRaw(info, data);
                    redirectsRemaining--;
                }
                if (!response.message.statusCode ||
                    !HttpResponseRetryCodes.includes(response.message.statusCode)) {
                    // If not a retry code, return immediately instead of retrying
                    return response;
                }
                numTries += 1;
                if (numTries < maxTries) {
                    yield response.readBody();
                    yield this._performExponentialBackoff(numTries);
                }
            } while (numTries < maxTries);
            return response;
        });
    }
    /**
     * Needs to be called if keepAlive is set to true in request options.
     */
    dispose() {
        if (this._agent) {
            this._agent.destroy();
        }
        this._disposed = true;
    }
    /**
     * Raw request.
     * @param info
     * @param data
     */
    requestRaw(info, data) {
        return __awaiter(this, void 0, void 0, function* () {
            return new Promise((resolve, reject) => {
                function callbackForResult(err, res) {
                    if (err) {
                        reject(err);
                    }
                    else if (!res) {
                        // If `err` is not passed, then `res` must be passed.
                        reject(new Error('Unknown error'));
                    }
                    else {
                        resolve(res);
                    }
                }
                this.requestRawWithCallback(info, data, callbackForResult);
            });
        });
    }
    /**
     * Raw request with callback.
     * @param info
     * @param data
     * @param onResult
     */
    requestRawWithCallback(info, data, onResult) {
        if (typeof data === 'string') {
            if (!info.options.headers) {
                info.options.headers = {};
            }
            info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8');
        }
        let callbackCalled = false;
        function handleResult(err, res) {
            if (!callbackCalled) {
                callbackCalled = true;
                onResult(err, res);
            }
        }
        const req = info.httpModule.request(info.options, (msg) => {
            const res = new HttpClientResponse(msg);
            handleResult(undefined, res);
        });
        let socket;
        req.on('socket', sock => {
            socket = sock;
        });
        // If we ever get disconnected, we want the socket to timeout eventually
        req.setTimeout(this._socketTimeout || 3 * 60000, () => {
            if (socket) {
                socket.end();
            }
            handleResult(new Error(`Request timeout: ${info.options.path}`));
        });
        req.on('error', function (err) {
            // err has statusCode property
            // res should have headers
            handleResult(err);
        });
        if (data && typeof data === 'string') {
            req.write(data, 'utf8');
        }
        if (data && typeof data !== 'string') {
            data.on('close', function () {
                req.end();
            });
            data.pipe(req);
        }
        else {
            req.end();
        }
    }
    /**
     * Gets an http agent. This function is useful when you need an http agent that handles
     * routing through a proxy server - depending upon the url and proxy environment variables.
     * @param serverUrl  The server URL where the request will be sent. For example, https://api.github.com
     */
    getAgent(serverUrl) {
        const parsedUrl = new URL(serverUrl);
        return this._getAgent(parsedUrl);
    }
    getAgentDispatcher(serverUrl) {
        const parsedUrl = new URL(serverUrl);
        const proxyUrl = pm.getProxyUrl(parsedUrl);
        const useProxy = proxyUrl && proxyUrl.hostname;
        if (!useProxy) {
            return;
        }
        return this._getProxyAgentDispatcher(parsedUrl, proxyUrl);
    }
    _prepareRequest(method, requestUrl, headers) {
        const info = {};
        info.parsedUrl = requestUrl;
        const usingSsl = info.parsedUrl.protocol === 'https:';
        info.httpModule = usingSsl ? https : http;
        const defaultPort = usingSsl ? 443 : 80;
        info.options = {};
        info.options.host = info.parsedUrl.hostname;
        info.options.port = info.parsedUrl.port
            ? parseInt(info.parsedUrl.port)
            : defaultPort;
        info.options.path =
            (info.parsedUrl.pathname || '') + (info.parsedUrl.search || '');
        info.options.method = method;
        info.options.headers = this._mergeHeaders(headers);
        if (this.userAgent != null) {
            info.options.headers['user-agent'] = this.userAgent;
        }
        info.options.agent = this._getAgent(info.parsedUrl);
        // gives handlers an opportunity to participate
        if (this.handlers) {
            for (const handler of this.handlers) {
                handler.prepareRequest(info.options);
            }
        }
        return info;
    }
    _mergeHeaders(headers) {
        if (this.requestOptions && this.requestOptions.headers) {
            return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {}));
        }
        return lowercaseKeys(headers || {});
    }
    _getExistingOrDefaultHeader(additionalHeaders, header, _default) {
        let clientHeader;
        if (this.requestOptions && this.requestOptions.headers) {
            clientHeader = lowercaseKeys(this.requestOptions.headers)[header];
        }
        return additionalHeaders[header] || clientHeader || _default;
    }
    _getAgent(parsedUrl) {
        let agent;
        const proxyUrl = pm.getProxyUrl(parsedUrl);
        const useProxy = proxyUrl && proxyUrl.hostname;
        if (this._keepAlive && useProxy) {
            agent = this._proxyAgent;
        }
        if (!useProxy) {
            agent = this._agent;
        }
        // if agent is already assigned use that agent.
        if (agent) {
            return agent;
        }
        const usingSsl = parsedUrl.protocol === 'https:';
        let maxSockets = 100;
        if (this.requestOptions) {
            maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;
        }
        // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis.
        if (proxyUrl && proxyUrl.hostname) {
            const agentOptions = {
                maxSockets,
                keepAlive: this._keepAlive,
                proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && {
                    proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`
                })), { host: proxyUrl.hostname, port: proxyUrl.port })
            };
            let tunnelAgent;
            const overHttps = proxyUrl.protocol === 'https:';
            if (usingSsl) {
                tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;
            }
            else {
                tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;
            }
            agent = tunnelAgent(agentOptions);
            this._proxyAgent = agent;
        }
        // if tunneling agent isn't assigned create a new agent
        if (!agent) {
            const options = { keepAlive: this._keepAlive, maxSockets };
            agent = usingSsl ? new https.Agent(options) : new http.Agent(options);
            this._agent = agent;
        }
        if (usingSsl && this._ignoreSslError) {
            // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process
            // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options
            // we have to cast it to any and change it directly
            agent.options = Object.assign(agent.options || {}, {
                rejectUnauthorized: false
            });
        }
        return agent;
    }
    _getProxyAgentDispatcher(parsedUrl, proxyUrl) {
        let proxyAgent;
        if (this._keepAlive) {
            proxyAgent = this._proxyAgentDispatcher;
        }
        // if agent is already assigned use that agent.
        if (proxyAgent) {
            return proxyAgent;
        }
        const usingSsl = parsedUrl.protocol === 'https:';
        proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, ((proxyUrl.username || proxyUrl.password) && {
            token: `${proxyUrl.username}:${proxyUrl.password}`
        })));
        this._proxyAgentDispatcher = proxyAgent;
        if (usingSsl && this._ignoreSslError) {
            // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process
            // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options
            // we have to cast it to any and change it directly
            proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, {
                rejectUnauthorized: false
            });
        }
        return proxyAgent;
    }
    _performExponentialBackoff(retryNumber) {
        return __awaiter(this, void 0, void 0, function* () {
            retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);
            const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);
            return new Promise(resolve => setTimeout(() => resolve(), ms));
        });
    }
    _processResponse(res, options) {
        return __awaiter(this, void 0, void 0, function* () {
            return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
                const statusCode = res.message.statusCode || 0;
                const response = {
                    statusCode,
                    result: null,
                    headers: {}
                };
                // not found leads to null obj returned
                if (statusCode === HttpCodes.NotFound) {
                    resolve(response);
                }
                // get the result from the body
                function dateTimeDeserializer(key, value) {
                    if (typeof value === 'string') {
                        const a = new Date(value);
                        if (!isNaN(a.valueOf())) {
                            return a;
                        }
                    }
                    return value;
                }
                let obj;
                let contents;
                try {
                    contents = yield res.readBody();
                    if (contents && contents.length > 0) {
                        if (options && options.deserializeDates) {
                            obj = JSON.parse(contents, dateTimeDeserializer);
                        }
                        else {
                            obj = JSON.parse(contents);
                        }
                        response.result = obj;
                    }
                    response.headers = res.message.headers;
                }
                catch (err) {
                    // Invalid resource (contents not json);  leaving result obj null
                }
                // note that 3xx redirects are handled by the http layer.
                if (statusCode > 299) {
                    let msg;
                    // if exception/error in body, attempt to get better error
                    if (obj && obj.message) {
                        msg = obj.message;
                    }
                    else if (contents && contents.length > 0) {
                        // it may be the case that the exception is in the body message as string
                        msg = contents;
                    }
                    else {
                        msg = `Failed request: (${statusCode})`;
                    }
                    const err = new HttpClientError(msg, statusCode);
                    err.result = response.result;
                    reject(err);
                }
                else {
                    resolve(response);
                }
            }));
        });
    }
}
exports.HttpClient = HttpClient;
const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});
//# sourceMappingURL=index.js.map

/***/ }),

/***/ 2707:
/***/ ((__unused_webpack_module, exports) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.checkBypass = exports.getProxyUrl = void 0;
function getProxyUrl(reqUrl) {
    const usingSsl = reqUrl.protocol === 'https:';
    if (checkBypass(reqUrl)) {
        return undefined;
    }
    const proxyVar = (() => {
        if (usingSsl) {
            return process.env['https_proxy'] || process.env['HTTPS_PROXY'];
        }
        else {
            return process.env['http_proxy'] || process.env['HTTP_PROXY'];
        }
    })();
    if (proxyVar) {
        try {
            return new URL(proxyVar);
        }
        catch (_a) {
            if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://'))
                return new URL(`http://${proxyVar}`);
        }
    }
    else {
        return undefined;
    }
}
exports.getProxyUrl = getProxyUrl;
function checkBypass(reqUrl) {
    if (!reqUrl.hostname) {
        return false;
    }
    const reqHost = reqUrl.hostname;
    if (isLoopbackAddress(reqHost)) {
        return true;
    }
    const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || '';
    if (!noProxy) {
        return false;
    }
    // Determine the request port
    let reqPort;
    if (reqUrl.port) {
        reqPort = Number(reqUrl.port);
    }
    else if (reqUrl.protocol === 'http:') {
        reqPort = 80;
    }
    else if (reqUrl.protocol === 'https:') {
        reqPort = 443;
    }
    // Format the request hostname and hostname with port
    const upperReqHosts = [reqUrl.hostname.toUpperCase()];
    if (typeof reqPort === 'number') {
        upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);
    }
    // Compare request host against noproxy
    for (const upperNoProxyItem of noProxy
        .split(',')
        .map(x => x.trim().toUpperCase())
        .filter(x => x)) {
        if (upperNoProxyItem === '*' ||
            upperReqHosts.some(x => x === upperNoProxyItem ||
                x.endsWith(`.${upperNoProxyItem}`) ||
                (upperNoProxyItem.startsWith('.') &&
                    x.endsWith(`${upperNoProxyItem}`)))) {
            return true;
        }
    }
    return false;
}
exports.checkBypass = checkBypass;
function isLoopbackAddress(host) {
    const hostLower = host.toLowerCase();
    return (hostLower === 'localhost' ||
        hostLower.startsWith('127.') ||
        hostLower.startsWith('[::1]') ||
        hostLower.startsWith('[0:0:0:0:0:0:0:1]'));
}
//# sourceMappingURL=proxy.js.map

/***/ }),

/***/ 9784:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {

"use strict";

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var _a;
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.READONLY = exports.UV_FS_O_EXLOCK = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rm = exports.rename = exports.readlink = exports.readdir = exports.open = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0;
const fs = __importStar(__nccwpck_require__(7147));
const path = __importStar(__nccwpck_require__(1017));
_a = fs.promises
// export const {open} = 'fs'
, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.open = _a.open, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rm = _a.rm, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink;
// export const {open} = 'fs'
exports.IS_WINDOWS = process.platform === 'win32';
// See https://github.com/nodejs/node/blob/d0153aee367422d0858105abec186da4dff0a0c5/deps/uv/include/uv/win.h#L691
exports.UV_FS_O_EXLOCK = 0x10000000;
exports.READONLY = fs.constants.O_RDONLY;
function exists(fsPath) {
    return __awaiter(this, void 0, void 0, function* () {
        try {
            yield exports.stat(fsPath);
        }
        catch (err) {
            if (err.code === 'ENOENT') {
                return false;
            }
            throw err;
        }
        return true;
    });
}
exports.exists = exists;
function isDirectory(fsPath, useStat = false) {
    return __awaiter(this, void 0, void 0, function* () {
        const stats = useStat ? yield exports.stat(fsPath) : yield exports.lstat(fsPath);
        return stats.isDirectory();
    });
}
exports.isDirectory = isDirectory;
/**
 * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like:
 * \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases).
 */
function isRooted(p) {
    p = normalizeSeparators(p);
    if (!p) {
        throw new Error('isRooted() parameter "p" cannot be empty');
    }
    if (exports.IS_WINDOWS) {
        return (p.startsWith('\\') || /^[A-Z]:/i.test(p) // e.g. \ or \hello or \\hello
        ); // e.g. C: or C:\hello
    }
    return p.startsWith('/');
}
exports.isRooted = isRooted;
/**
 * Best effort attempt to determine whether a file exists and is executable.
 * @param filePath    file path to check
 * @param extensions  additional file extensions to try
 * @return if file exists and is executable, returns the file path. otherwise empty string.
 */
function tryGetExecutablePath(filePath, extensions) {
    return __awaiter(this, void 0, void 0, function* () {
        let stats = undefined;
        try {
            // test file exists
            stats = yield exports.stat(filePath);
        }
        catch (err) {
            if (err.code !== 'ENOENT') {
                // eslint-disable-next-line no-console
                console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`);
            }
        }
        if (stats && stats.isFile()) {
            if (exports.IS_WINDOWS) {
                // on Windows, test for valid extension
                const upperExt = path.extname(filePath).toUpperCase();
                if (extensions.some(validExt => validExt.toUpperCase() === upperExt)) {
                    return filePath;
                }
            }
            else {
                if (isUnixExecutable(stats)) {
                    return filePath;
                }
            }
        }
        // try each extension
        const originalFilePath = filePath;
        for (const extension of extensions) {
            filePath = originalFilePath + extension;
            stats = undefined;
            try {
                stats = yield exports.stat(filePath);
            }
            catch (err) {
                if (err.code !== 'ENOENT') {
                    // eslint-disable-next-line no-console
                    console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`);
                }
            }
            if (stats && stats.isFile()) {
                if (exports.IS_WINDOWS) {
                    // preserve the case of the actual file (since an extension was appended)
                    try {
                        const directory = path.dirname(filePath);
                        const upperName = path.basename(filePath).toUpperCase();
                        for (const actualName of yield exports.readdir(directory)) {
                            if (upperName === actualName.toUpperCase()) {
                                filePath = path.join(directory, actualName);
                                break;
                            }
                        }
                    }
                    catch (err) {
                        // eslint-disable-next-line no-console
                        console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`);
                    }
                    return filePath;
                }
                else {
                    if (isUnixExecutable(stats)) {
                        return filePath;
                    }
                }
            }
        }
        return '';
    });
}
exports.tryGetExecutablePath = tryGetExecutablePath;
function normalizeSeparators(p) {
    p = p || '';
    if (exports.IS_WINDOWS) {
        // convert slashes on Windows
        p = p.replace(/\//g, '\\');
        // remove redundant slashes
        return p.replace(/\\\\+/g, '\\');
    }
    // remove redundant slashes
    return p.replace(/\/\/+/g, '/');
}
// on Mac/Linux, test the execute bit
//     R   W  X  R  W X R W X
//   256 128 64 32 16 8 4 2 1
function isUnixExecutable(stats) {
    return ((stats.mode & 1) > 0 ||
        ((stats.mode & 8) > 0 && stats.gid === process.getgid()) ||
        ((stats.mode & 64) > 0 && stats.uid === process.getuid()));
}
// Get the path of cmd.exe in windows
function getCmdPath() {
    var _a;
    return (_a = process.env['COMSPEC']) !== null && _a !== void 0 ? _a : `cmd.exe`;
}
exports.getCmdPath = getCmdPath;
//# sourceMappingURL=io-util.js.map

/***/ }),

/***/ 3086:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {

"use strict";

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0;
const assert_1 = __nccwpck_require__(9491);
const path = __importStar(__nccwpck_require__(1017));
const ioUtil = __importStar(__nccwpck_require__(9784));
/**
 * Copies a file or folder.
 * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js
 *
 * @param     source    source path
 * @param     dest      destination path
 * @param     options   optional. See CopyOptions.
 */
function cp(source, dest, options = {}) {
    return __awaiter(this, void 0, void 0, function* () {
        const { force, recursive, copySourceDirectory } = readCopyOptions(options);
        const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null;
        // Dest is an existing file, but not forcing
        if (destStat && destStat.isFile() && !force) {
            return;
        }
        // If dest is an existing directory, should copy inside.
        const newDest = destStat && destStat.isDirectory() && copySourceDirectory
            ? path.join(dest, path.basename(source))
            : dest;
        if (!(yield ioUtil.exists(source))) {
            throw new Error(`no such file or directory: ${source}`);
        }
        const sourceStat = yield ioUtil.stat(source);
        if (sourceStat.isDirectory()) {
            if (!recursive) {
                throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`);
            }
            else {
                yield cpDirRecursive(source, newDest, 0, force);
            }
        }
        else {
            if (path.relative(source, newDest) === '') {
                // a file cannot be copied to itself
                throw new Error(`'${newDest}' and '${source}' are the same file`);
            }
            yield copyFile(source, newDest, force);
        }
    });
}
exports.cp = cp;
/**
 * Moves a path.
 *
 * @param     source    source path
 * @param     dest      destination path
 * @param     options   optional. See MoveOptions.
 */
function mv(source, dest, options = {}) {
    return __awaiter(this, void 0, void 0, function* () {
        if (yield ioUtil.exists(dest)) {
            let destExists = true;
            if (yield ioUtil.isDirectory(dest)) {
                // If dest is directory copy src into dest
                dest = path.join(dest, path.basename(source));
                destExists = yield ioUtil.exists(dest);
            }
            if (destExists) {
                if (options.force == null || options.force) {
                    yield rmRF(dest);
                }
                else {
                    throw new Error('Destination already exists');
                }
            }
        }
        yield mkdirP(path.dirname(dest));
        yield ioUtil.rename(source, dest);
    });
}
exports.mv = mv;
/**
 * Remove a path recursively with force
 *
 * @param inputPath path to remove
 */
function rmRF(inputPath) {
    return __awaiter(this, void 0, void 0, function* () {
        if (ioUtil.IS_WINDOWS) {
            // Check for invalid characters
            // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
            if (/[*"<>|]/.test(inputPath)) {
                throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows');
            }
        }
        try {
            // note if path does not exist, error is silent
            yield ioUtil.rm(inputPath, {
                force: true,
                maxRetries: 3,
                recursive: true,
                retryDelay: 300
            });
        }
        catch (err) {
            throw new Error(`File was unable to be removed ${err}`);
        }
    });
}
exports.rmRF = rmRF;
/**
 * Make a directory.  Creates the full path with folders in between
 * Will throw if it fails
 *
 * @param   fsPath        path to create
 * @returns Promise<void>
 */
function mkdirP(fsPath) {
    return __awaiter(this, void 0, void 0, function* () {
        assert_1.ok(fsPath, 'a path argument must be provided');
        yield ioUtil.mkdir(fsPath, { recursive: true });
    });
}
exports.mkdirP = mkdirP;
/**
 * Returns path of a tool had the tool actually been invoked.  Resolves via paths.
 * If you check and the tool does not exist, it will throw.
 *
 * @param     tool              name of the tool
 * @param     check             whether to check if tool exists
 * @returns   Promise<string>   path to tool
 */
function which(tool, check) {
    return __awaiter(this, void 0, void 0, function* () {
        if (!tool) {
            throw new Error("parameter 'tool' is required");
        }
        // recursive when check=true
        if (check) {
            const result = yield which(tool, false);
            if (!result) {
                if (ioUtil.IS_WINDOWS) {
                    throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`);
                }
                else {
                    throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);
                }
            }
            return result;
        }
        const matches = yield findInPath(tool);
        if (matches && matches.length > 0) {
            return matches[0];
        }
        return '';
    });
}
exports.which = which;
/**
 * Returns a list of all occurrences of the given tool on the system path.
 *
 * @returns   Promise<string[]>  the paths of the tool
 */
function findInPath(tool) {
    return __awaiter(this, void 0, void 0, function* () {
        if (!tool) {
            throw new Error("parameter 'tool' is required");
        }
        // build the list of extensions to try
        const extensions = [];
        if (ioUtil.IS_WINDOWS && process.env['PATHEXT']) {
            for (const extension of process.env['PATHEXT'].split(path.delimiter)) {
                if (extension) {
                    extensions.push(extension);
                }
            }
        }
        // if it's rooted, return it if exists. otherwise return empty.
        if (ioUtil.isRooted(tool)) {
            const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions);
            if (filePath) {
                return [filePath];
            }
            return [];
        }
        // if any path separators, return empty
        if (tool.includes(path.sep)) {
            return [];
        }
        // build the list of directories
        //
        // Note, technically "where" checks the current directory on Windows. From a toolkit perspective,
        // it feels like we should not do this. Checking the current directory seems like more of a use
        // case of a shell, and the which() function exposed by the toolkit should strive for consistency
        // across platforms.
        const directories = [];
        if (process.env.PATH) {
            for (const p of process.env.PATH.split(path.delimiter)) {
                if (p) {
                    directories.push(p);
                }
            }
        }
        // find all matches
        const matches = [];
        for (const directory of directories) {
            const filePath = yield ioUtil.tryGetExecutablePath(path.join(directory, tool), extensions);
            if (filePath) {
                matches.push(filePath);
            }
        }
        return matches;
    });
}
exports.findInPath = findInPath;
function readCopyOptions(options) {
    const force = options.force == null ? true : options.force;
    const recursive = Boolean(options.recursive);
    const copySourceDirectory = options.copySourceDirectory == null
        ? true
        : Boolean(options.copySourceDirectory);
    return { force, recursive, copySourceDirectory };
}
function cpDirRecursive(sourceDir, destDir, currentDepth, force) {
    return __awaiter(this, void 0, void 0, function* () {
        // Ensure there is not a run away recursive copy
        if (currentDepth >= 255)
            return;
        currentDepth++;
        yield mkdirP(destDir);
        const files = yield ioUtil.readdir(sourceDir);
        for (const fileName of files) {
            const srcFile = `${sourceDir}/${fileName}`;
            const destFile = `${destDir}/${fileName}`;
            const srcFileStat = yield ioUtil.lstat(srcFile);
            if (srcFileStat.isDirectory()) {
                // Recurse
                yield cpDirRecursive(srcFile, destFile, currentDepth, force);
            }
            else {
                yield copyFile(srcFile, destFile, force);
            }
        }
        // Change the mode for the newly created directory
        yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode);
    });
}
// Buffered file copy
function copyFile(srcFile, destFile, force) {
    return __awaiter(this, void 0, void 0, function* () {
        if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) {
            // unlink/re-link it
            try {
                yield ioUtil.lstat(destFile);
                yield ioUtil.unlink(destFile);
            }
            catch (e) {
                // Try to override file permission
                if (e.code === 'EPERM') {
                    yield ioUtil.chmod(destFile, '0666');
                    yield ioUtil.unlink(destFile);
                }
                // other errors = it doesn't exist, no work to do
            }
            // Copy over symlink
            const symlinkFull = yield ioUtil.readlink(srcFile);
            yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? 'junction' : null);
        }
        else if (!(yield ioUtil.exists(destFile)) || force) {
            yield ioUtil.copyFile(srcFile, destFile);
        }
    });
}
//# sourceMappingURL=io.js.map

/***/ }),

/***/ 7901:
/***/ ((__unused_webpack_module, exports) => {

"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


/***/ }),

/***/ 3101:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({ value: true }));

var universalUserAgent = __nccwpck_require__(5565);
var beforeAfterHook = __nccwpck_require__(9285);
var request = __nccwpck_require__(2137);
var graphql = __nccwpck_require__(5981);
var authToken = __nccwpck_require__(7901);

function _objectWithoutPropertiesLoose(source, excluded) {
  if (source == null) return {};
  var target = {};
  var sourceKeys = Object.keys(source);
  var key, i;

  for (i = 0; i < sourceKeys.length; i++) {
    key = sourceKeys[i];
    if (excluded.indexOf(key) >= 0) continue;
    target[key] = source[key];
  }

  return target;
}

function _objectWithoutProperties(source, excluded) {
  if (source == null) return {};

  var target = _objectWithoutPropertiesLoose(source, excluded);

  var key, i;

  if (Object.getOwnPropertySymbols) {
    var sourceSymbolKeys = Object.getOwnPropertySymbols(source);

    for (i = 0; i < sourceSymbolKeys.length; i++) {
      key = sourceSymbolKeys[i];
      if (excluded.indexOf(key) >= 0) continue;
      if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
      target[key] = source[key];
    }
  }

  return target;
}

const VERSION = "3.6.0";

const _excluded = ["authStrategy"];
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
      } = options,
            otherOptions = _objectWithoutProperties(options, _excluded);

      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


/***/ }),

/***/ 5786:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({ value: true }));

var isPlainObject = __nccwpck_require__(7835);
var universalUserAgent = __nccwpck_require__(5565);

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;
      } else {
        headers["content-length"] = 0;
      }
    }
  } // default content-type for JSON if body is set


  if (!headers["content-type"] && typeof body !== "undefined") {
    headers["content-type"] = "application/json; charset=utf-8";
  } // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body.
  // fetch does not allow to set `content-length` header, but we can set body to an empty string


  if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") {
    body = "";
  } // Only return body/request keys if present


  return Object.assign({
    method,
    url,
    headers
  }, typeof body !== "undefined" ? {
    body
  } : null, options.request ? {
    request: options.request
  } : null);
}

function endpointWithDefaults(defaults, route, options) {
  return parse(merge(defaults, route, options));
}

function withDefaults(oldDefaults, newDefaults) {
  const DEFAULTS = merge(oldDefaults, newDefaults);
  const endpoint = endpointWithDefaults.bind(null, DEFAULTS);
  return Object.assign(endpoint, {
    DEFAULTS,
    defaults: withDefaults.bind(null, DEFAULTS),
    merge: merge.bind(null, DEFAULTS),
    parse
  });
}

const VERSION = "6.0.12";

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


/***/ }),

/***/ 5981:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({ value: true }));

var request = __nccwpck_require__(2137);
var universalUserAgent = __nccwpck_require__(5565);

const VERSION = "4.8.0";

function _buildMessageForResponseErrors(data) {
  return `Request failed due to following response errors:\n` + data.errors.map(e => ` - ${e.message}`).join("\n");
}

class GraphqlResponseError extends Error {
  constructor(request, headers, response) {
    super(_buildMessageForResponseErrors(response));
    this.request = request;
    this.headers = headers;
    this.response = response;
    this.name = "GraphqlResponseError"; // Expose the errors and response data in their shorthand properties.

    this.errors = response.errors;
    this.data = response.data; // Maintains proper stack trace (only available on V8)

    /* istanbul ignore next */

    if (Error.captureStackTrace) {
      Error.captureStackTrace(this, this.constructor);
    }
  }

}

const NON_VARIABLE_OPTIONS = ["method", "baseUrl", "url", "headers", "request", "query", "mediaType"];
const FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"];
const GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/;
function graphql(request, query, options) {
  if (options) {
    if (typeof query === "string" && "query" in options) {
      return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`));
    }

    for (const key in options) {
      if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue;
      return Promise.reject(new Error(`[@octokit/graphql] "${key}" cannot be used as variable name`));
    }
  }

  const parsedOptions = typeof query === "string" ? Object.assign({
    query
  }, options) : query;
  const requestOptions = Object.keys(parsedOptions).reduce((result, key) => {
    if (NON_VARIABLE_OPTIONS.includes(key)) {
      result[key] = parsedOptions[key];
      return result;
    }

    if (!result.variables) {
      result.variables = {};
    }

    result.variables[key] = parsedOptions[key];
    return result;
  }, {}); // workaround for GitHub Enterprise baseUrl set with /api/v3 suffix
  // https://github.com/octokit/auth-app.js/issues/111#issuecomment-657610451

  const baseUrl = parsedOptions.baseUrl || request.endpoint.DEFAULTS.baseUrl;

  if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {
    requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql");
  }

  return request(requestOptions).then(response => {
    if (response.data.errors) {
      const headers = {};

      for (const key of Object.keys(response.headers)) {
        headers[key] = response.headers[key];
      }

      throw new GraphqlResponseError(requestOptions, headers, response.data);
    }

    return response.data.data;
  });
}

function withDefaults(request$1, newDefaults) {
  const newRequest = request$1.defaults(newDefaults);

  const newApi = (query, options) => {
    return graphql(newRequest, query, options);
  };

  return Object.assign(newApi, {
    defaults: withDefaults.bind(null, newRequest),
    endpoint: request.request.endpoint
  });
}

const graphql$1 = withDefaults(request.request, {
  headers: {
    "user-agent": `octokit-graphql.js/${VERSION} ${universalUserAgent.getUserAgent()}`
  },
  method: "POST",
  url: "/graphql"
});
function withCustomRequest(customRequest) {
  return withDefaults(customRequest, {
    method: "POST",
    url: "/graphql"
  });
}

exports.GraphqlResponseError = GraphqlResponseError;
exports.graphql = graphql$1;
exports.withCustomRequest = withCustomRequest;
//# sourceMappingURL=index.js.map


/***/ }),

/***/ 6790:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({ value: true }));

const VERSION = "2.21.3";

function ownKeys(object, enumerableOnly) {
  var keys = Object.keys(object);

  if (Object.getOwnPropertySymbols) {
    var symbols = Object.getOwnPropertySymbols(object);
    enumerableOnly && (symbols = symbols.filter(function (sym) {
      return Object.getOwnPropertyDescriptor(object, sym).enumerable;
    })), keys.push.apply(keys, symbols);
  }

  return keys;
}

function _objectSpread2(target) {
  for (var i = 1; i < arguments.length; i++) {
    var source = null != arguments[i] ? arguments[i] : {};
    i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
      _defineProperty(target, key, source[key]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
      Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
    });
  }

  return target;
}

function _defineProperty(obj, key, value) {
  if (key in obj) {
    Object.defineProperty(obj, key, {
      value: value,
      enumerable: true,
      configurable: true,
      writable: true
    });
  } else {
    obj[key] = value;
  }

  return obj;
}

/**
 * Some “list” response that can be paginated have a different response structure
 *
 * They have a `total_count` key in the response (search also has `incomplete_results`,
 * /installation/repositories also has `repository_selection`), as well as a key with
 * the list of the items which name varies from endpoint to endpoint.
 *
 * Octokit normalizes these responses so that paginated results are always returned following
 * the same structure. One challenge is that if the list response has only one page, no Link
 * header is provided, so this header alone is not sufficient to check wether a response is
 * paginated or not.
 *
 * We check if a "total_count" key is present in the response data, but also make sure that
 * a "url" property is not, as the "Get the combined status for a specific ref" endpoint would
 * otherwise match: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref
 */
function normalizePaginatedListResponse(response) {
  // endpoints can respond with 204 if repository is empty
  if (!response.data) {
    return _objectSpread2(_objectSpread2({}, response), {}, {
      data: []
    });
  }

  const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data);
  if (!responseNeedsNormalization) return response; // keep the additional properties intact as there is currently no other way
  // to retrieve the same information.

  const incompleteResults = response.data.incomplete_results;
  const repositorySelection = response.data.repository_selection;
  const totalCount = response.data.total_count;
  delete response.data.incomplete_results;
  delete response.data.repository_selection;
  delete response.data.total_count;
  const namespaceKey = Object.keys(response.data)[0];
  const data = response.data[namespaceKey];
  response.data = data;

  if (typeof incompleteResults !== "undefined") {
    response.data.incomplete_results = incompleteResults;
  }

  if (typeof repositorySelection !== "undefined") {
    response.data.repository_selection = repositorySelection;
  }

  response.data.total_count = totalCount;
  return response;
}

function iterator(octokit, route, parameters) {
  const options = typeof route === "function" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters);
  const requestMethod = typeof route === "function" ? route : octokit.request;
  const method = options.method;
  const headers = options.headers;
  let url = options.url;
  return {
    [Symbol.asyncIterator]: () => ({
      async next() {
        if (!url) return {
          done: true
        };

        try {
          const response = await requestMethod({
            method,
            url,
            headers
          });
          const normalizedResponse = normalizePaginatedListResponse(response); // `response.headers.link` format:
          // '<https://api.github.com/users/aseemk/followers?page=2>; rel="next", <https://api.github.com/users/aseemk/followers?page=2>; rel="last"'
          // sets `url` to undefined if "next" URL is not present or `link` header is not set

          url = ((normalizedResponse.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1];
          return {
            value: normalizedResponse
          };
        } catch (error) {
          if (error.status !== 409) throw error;
          url = "";
          return {
            value: {
              status: 200,
              headers: {},
              data: []
            }
          };
        }
      }

    })
  };
}

function paginate(octokit, route, parameters, mapFn) {
  if (typeof parameters === "function") {
    mapFn = parameters;
    parameters = undefined;
  }

  return gather(octokit, [], iterator(octokit, route, parameters)[Symbol.asyncIterator](), mapFn);
}

function gather(octokit, results, iterator, mapFn) {
  return iterator.next().then(result => {
    if (result.done) {
      return results;
    }

    let earlyExit = false;

    function done() {
      earlyExit = true;
    }

    results = results.concat(mapFn ? mapFn(result.value, done) : result.value.data);

    if (earlyExit) {
      return results;
    }

    return gather(octokit, results, iterator, mapFn);
  });
}

const composePaginateRest = Object.assign(paginate, {
  iterator
});

const paginatingEndpoints = ["GET /app/hook/deliveries", "GET /app/installations", "GET /applications/grants", "GET /authorizations", "GET /enterprises/{enterprise}/actions/permissions/organizations", "GET /enterprises/{enterprise}/actions/runner-groups", "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations", "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners", "GET /enterprises/{enterprise}/actions/runners", "GET /enterprises/{enterprise}/audit-log", "GET /enterprises/{enterprise}/secret-scanning/alerts", "GET /enterprises/{enterprise}/settings/billing/advanced-security", "GET /events", "GET /gists", "GET /gists/public", "GET /gists/starred", "GET /gists/{gist_id}/comments", "GET /gists/{gist_id}/commits", "GET /gists/{gist_id}/forks", "GET /installation/repositories", "GET /issues", "GET /licenses", "GET /marketplace_listing/plans", "GET /marketplace_listing/plans/{plan_id}/accounts", "GET /marketplace_listing/stubbed/plans", "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts", "GET /networks/{owner}/{repo}/events", "GET /notifications", "GET /organizations", "GET /orgs/{org}/actions/cache/usage-by-repository", "GET /orgs/{org}/actions/permissions/repositories", "GET /orgs/{org}/actions/runner-groups", "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "GET /orgs/{org}/
Download .txt
gitextract_gzrb4oe_/

├── .github/
│   ├── dependabot.yml
│   └── workflows/
│       ├── preview.yml
│       └── test.yml
├── .gitignore
├── .husky/
│   └── pre-commit
├── .npmrc
├── README.md
├── action.yml
├── biome.json
├── dist/
│   ├── index.js
│   └── sourcemap-register.js
├── jest.config.js
├── package.json
├── src/
│   ├── comment.ts
│   ├── commentToPullRequest.ts
│   ├── helpers.ts
│   └── main.ts
├── tsconfig.json
└── utils/
    └── gen-preview.js
Download .txt
SYMBOL INDEX (1342 symbols across 6 files)

FILE: dist/index.js
  function adopt (line 10) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 12) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 13) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 14) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function headerComment (line 23) | function headerComment(header) {
  function findPreviousComment (line 26) | function findPreviousComment(octokit, repo, issue_number, header) {
  function updateComment (line 33) | function updateComment(octokit, repo, comment_id, body, header, previous...
  function createComment (line 40) | function createComment(octokit, repo, issue_number, body, header, previo...
  function deleteComment (line 47) | function deleteComment(octokit, repo, comment_id) {
  function adopt (line 85) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 87) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 88) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 89) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function comment (line 97) | function comment(_a) {
  function adopt (line 134) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 136) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 137) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 138) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function adopt (line 201) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 203) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 204) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 205) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function main (line 217) | function main() {
  function issueCommand (line 454) | function issueCommand(command, properties, message) {
  function issue (line 459) | function issue(name, message = '') {
  class Command (line 464) | class Command {
    method constructor (line 465) | constructor(command, properties, message) {
    method toString (line 473) | toString() {
  function escapeData (line 497) | function escapeData(s) {
  function escapeProperty (line 503) | function escapeProperty(s) {
  function adopt (line 540) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 542) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 543) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 544) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function exportVariable (line 579) | function exportVariable(name, val) {
  function setSecret (line 593) | function setSecret(secret) {
  function addPath (line 601) | function addPath(inputPath) {
  function getInput (line 621) | function getInput(name, options) {
  function getMultilineInput (line 640) | function getMultilineInput(name, options) {
  function getBooleanInput (line 660) | function getBooleanInput(name, options) {
  function setOutput (line 679) | function setOutput(name, value) {
  function setCommandEcho (line 693) | function setCommandEcho(enabled) {
  function setFailed (line 705) | function setFailed(message) {
  function isDebug (line 716) | function isDebug() {
  function debug (line 724) | function debug(message) {
  function error (line 733) | function error(message, properties = {}) {
  function warning (line 742) | function warning(message, properties = {}) {
  function notice (line 751) | function notice(message, properties = {}) {
  function info (line 759) | function info(message) {
  function startGroup (line 770) | function startGroup(name) {
  function endGroup (line 777) | function endGroup() {
  function group (line 789) | function group(name, fn) {
  function saveState (line 813) | function saveState(name, value) {
  function getState (line 827) | function getState(name) {
  function getIDToken (line 831) | function getIDToken(aud) {
  function issueFileCommand (line 891) | function issueFileCommand(command, message) {
  function prepareKeyValueMessage (line 904) | function prepareKeyValueMessage(key, value) {
  function adopt (line 929) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 931) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 932) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 933) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  class OidcClient (line 942) | class OidcClient {
    method createHttpClient (line 943) | static createHttpClient(allowRetry = true, maxRetry = 10) {
    method getRequestToken (line 950) | static getRequestToken() {
    method getIDTokenUrl (line 957) | static getIDTokenUrl() {
    method getCall (line 964) | static getCall(id_token_url) {
    method getIDToken (line 982) | static getIDToken(audience) {
  function toPosixPath (line 1041) | function toPosixPath(pth) {
  function toWin32Path (line 1052) | function toWin32Path(pth) {
  function toPlatformPath (line 1064) | function toPlatformPath(pth) {
  function adopt (line 1078) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 1080) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 1081) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 1082) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  class Summary (line 1093) | class Summary {
    method constructor (line 1094) | constructor() {
    method filePath (line 1103) | filePath() {
    method wrap (line 1131) | wrap(tag, content, attrs = {}) {
    method write (line 1147) | write(options) {
    method clear (line 1161) | clear() {
    method stringify (line 1171) | stringify() {
    method isEmptyBuffer (line 1179) | isEmptyBuffer() {
    method emptyBuffer (line 1187) | emptyBuffer() {
    method addRaw (line 1199) | addRaw(text, addEOL = false) {
    method addEOL (line 1208) | addEOL() {
    method addCodeBlock (line 1219) | addCodeBlock(code, lang) {
    method addList (line 1232) | addList(items, ordered = false) {
    method addTable (line 1245) | addTable(rows) {
    method addDetails (line 1273) | addDetails(label, content) {
    method addImage (line 1286) | addImage(src, alt, options) {
    method addHeading (line 1300) | addHeading(text, level) {
    method addSeparator (line 1313) | addSeparator() {
    method addBreak (line 1322) | addBreak() {
    method addQuote (line 1334) | addQuote(text, cite) {
    method addLink (line 1347) | addLink(text, href) {
  function toCommandValue (line 1375) | function toCommandValue(input) {
  function toCommandProperties (line 1391) | function toCommandProperties(annotationProperties) {
  function adopt (line 1434) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 1436) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 1437) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 1438) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function exec (line 1456) | function exec(commandLine, args, options) {
  function getExecOutput (line 1480) | function getExecOutput(commandLine, args, options) {
  function adopt (line 1544) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 1546) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 1547) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 1548) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  class ToolRunner (line 1566) | class ToolRunner extends events.EventEmitter {
    method constructor (line 1567) | constructor(toolPath, args, options) {
    method _debug (line 1576) | _debug(message) {
    method _getCommandString (line 1581) | _getCommandString(options, noPrefix) {
    method _processLineBuffer (line 1619) | _processLineBuffer(data, strBuffer, onLine) {
    method _getSpawnFileName (line 1638) | _getSpawnFileName() {
    method _getSpawnArgs (line 1646) | _getSpawnArgs(options) {
    method _endsWith (line 1662) | _endsWith(str, end) {
    method _isCmdFile (line 1665) | _isCmdFile() {
    method _windowsQuoteCmdArg (line 1670) | _windowsQuoteCmdArg(arg) {
    method _uvQuoteCmdArg (line 1790) | _uvQuoteCmdArg(arg) {
    method _cloneExecOptions (line 1869) | _cloneExecOptions(options) {
    method _getSpawnOptions (line 1884) | _getSpawnOptions(options, toolPath) {
    method exec (line 1905) | exec() {
  function argStringToArray (line 2025) | function argStringToArray(argString) {
  class ExecState (line 2072) | class ExecState extends events.EventEmitter {
    method constructor (line 2073) | constructor(options, toolPath) {
    method CheckComplete (line 2092) | CheckComplete() {
    method _debug (line 2103) | _debug(message) {
    method _setResult (line 2106) | _setResult() {
    method HandleTimeout (line 2128) | static HandleTimeout(state) {
  class Context (line 2153) | class Context {
    method constructor (line 2157) | constructor() {
    method issue (line 2182) | get issue() {
    method repo (line 2186) | get repo() {
  function getOctokit (line 2240) | function getOctokit(token, options, ...additionalPlugins) {
  function getAuthString (line 2276) | function getAuthString(token, options) {
  function getProxyAgent (line 2286) | function getProxyAgent(destinationUrl) {
  function getApiBaseUrl (line 2291) | function getApiBaseUrl() {
  function getOctokitOptions (line 2346) | function getOctokitOptions(token, options) {
  function adopt (line 2366) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 2368) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 2369) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 2370) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  class BasicCredentialHandler (line 2376) | class BasicCredentialHandler {
    method constructor (line 2377) | constructor(username, password) {
    method prepareRequest (line 2381) | prepareRequest(options) {
    method canHandleAuthentication (line 2388) | canHandleAuthentication() {
    method handleAuthentication (line 2391) | handleAuthentication() {
  class BearerCredentialHandler (line 2398) | class BearerCredentialHandler {
    method constructor (line 2399) | constructor(token) {
    method prepareRequest (line 2404) | prepareRequest(options) {
    method canHandleAuthentication (line 2411) | canHandleAuthentication() {
    method handleAuthentication (line 2414) | handleAuthentication() {
  class PersonalAccessTokenCredentialHandler (line 2421) | class PersonalAccessTokenCredentialHandler {
    method constructor (line 2422) | constructor(token) {
    method prepareRequest (line 2427) | prepareRequest(options) {
    method canHandleAuthentication (line 2434) | canHandleAuthentication() {
    method handleAuthentication (line 2437) | handleAuthentication() {
  function adopt (line 2478) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 2480) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 2481) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 2482) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function getProxyUrl (line 2536) | function getProxyUrl(serverUrl) {
  class HttpClientError (line 2556) | class HttpClientError extends Error {
    method constructor (line 2557) | constructor(message, statusCode) {
  class HttpClientResponse (line 2565) | class HttpClientResponse {
    method constructor (line 2566) | constructor(message) {
    method readBody (line 2569) | readBody() {
    method readBodyBuffer (line 2582) | readBodyBuffer() {
  function isHttps (line 2597) | function isHttps(requestUrl) {
  class HttpClient (line 2602) | class HttpClient {
    method constructor (line 2603) | constructor(userAgent, handlers, requestOptions) {
    method options (line 2640) | options(requestUrl, additionalHeaders) {
    method get (line 2645) | get(requestUrl, additionalHeaders) {
    method del (line 2650) | del(requestUrl, additionalHeaders) {
    method post (line 2655) | post(requestUrl, data, additionalHeaders) {
    method patch (line 2660) | patch(requestUrl, data, additionalHeaders) {
    method put (line 2665) | put(requestUrl, data, additionalHeaders) {
    method head (line 2670) | head(requestUrl, additionalHeaders) {
    method sendStream (line 2675) | sendStream(verb, requestUrl, stream, additionalHeaders) {
    method getJson (line 2684) | getJson(requestUrl, additionalHeaders = {}) {
    method postJson (line 2691) | postJson(requestUrl, obj, additionalHeaders = {}) {
    method putJson (line 2700) | putJson(requestUrl, obj, additionalHeaders = {}) {
    method patchJson (line 2709) | patchJson(requestUrl, obj, additionalHeaders = {}) {
    method request (line 2723) | request(verb, requestUrl, data, headers) {
    method dispose (line 2808) | dispose() {
    method requestRaw (line 2819) | requestRaw(info, data) {
    method requestRawWithCallback (line 2844) | requestRawWithCallback(info, data, onResult) {
    method getAgent (line 2896) | getAgent(serverUrl) {
    method getAgentDispatcher (line 2900) | getAgentDispatcher(serverUrl) {
    method _prepareRequest (line 2909) | _prepareRequest(method, requestUrl, headers) {
    method _mergeHeaders (line 2936) | _mergeHeaders(headers) {
    method _getExistingOrDefaultHeader (line 2942) | _getExistingOrDefaultHeader(additionalHeaders, header, _default) {
    method _getAgent (line 2949) | _getAgent(parsedUrl) {
    method _getProxyAgentDispatcher (line 3004) | _getProxyAgentDispatcher(parsedUrl, proxyUrl) {
    method _performExponentialBackoff (line 3028) | _performExponentialBackoff(retryNumber) {
    method _processResponse (line 3035) | _processResponse(res, options) {
  function getProxyUrl (line 3114) | function getProxyUrl(reqUrl) {
  function checkBypass (line 3141) | function checkBypass(reqUrl) {
  function isLoopbackAddress (line 3185) | function isLoopbackAddress(host) {
  function adopt (line 3221) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 3223) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 3224) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 3225) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function exists (line 3242) | function exists(fsPath) {
  function isDirectory (line 3257) | function isDirectory(fsPath, useStat = false) {
  function isRooted (line 3268) | function isRooted(p) {
  function tryGetExecutablePath (line 3286) | function tryGetExecutablePath(filePath, extensions) {
  function normalizeSeparators (line 3357) | function normalizeSeparators(p) {
  function isUnixExecutable (line 3371) | function isUnixExecutable(stats) {
  function getCmdPath (line 3377) | function getCmdPath() {
  function adopt (line 3411) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 3413) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 3414) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 3415) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function cp (line 3432) | function cp(source, dest, options = {}) {
  function mv (line 3473) | function mv(source, dest, options = {}) {
  function rmRF (line 3501) | function rmRF(inputPath) {
  function mkdirP (line 3532) | function mkdirP(fsPath) {
  function which (line 3547) | function which(tool, check) {
  function findInPath (line 3578) | function findInPath(tool) {
  function readCopyOptions (line 3630) | function readCopyOptions(options) {
  function cpDirRecursive (line 3638) | function cpDirRecursive(sourceDir, destDir, currentDepth, force) {
  function copyFile (line 3663) | function copyFile(srcFile, destFile, force) {
  function auth (line 3703) | async function auth(token) {
  function withAuthorizationPrefix (line 3720) | function withAuthorizationPrefix(token) {
  function hook (line 3728) | async function hook(token, request, route, parameters) {
  function _objectWithoutPropertiesLoose (line 3769) | function _objectWithoutPropertiesLoose(source, excluded) {
  function _objectWithoutProperties (line 3784) | function _objectWithoutProperties(source, excluded) {
  class Octokit (line 3808) | class Octokit {
    method constructor (line 3809) | constructor(options = {}) {
    method defaults (line 3895) | static defaults(defaults) {
    method plugin (line 3921) | static plugin(...newPlugins) {
  function lowercaseKeys (line 3950) | function lowercaseKeys(object) {
  function mergeDeep (line 3961) | function mergeDeep(defaults, options) {
  function removeUndefinedProperties (line 3977) | function removeUndefinedProperties(obj) {
  function merge (line 3987) | function merge(defaults, route, options) {
  function addQueryParameters (line 4015) | function addQueryParameters(url, parameters) {
  function removeNonChars (line 4034) | function removeNonChars(variableName) {
  function extractUrlVariableNames (line 4038) | function extractUrlVariableNames(url) {
  function omit (line 4048) | function omit(object, keysToOmit) {
  function encodeReserved (line 4082) | function encodeReserved(str) {
  function encodeUnreserved (line 4092) | function encodeUnreserved(str) {
  function encodeValue (line 4098) | function encodeValue(operator, value, key) {
  function isDefined (line 4108) | function isDefined(value) {
  function isKeyOperator (line 4112) | function isKeyOperator(operator) {
  function getValues (line 4116) | function getValues(context, operator, key, modifier) {
  function parseUrl (line 4180) | function parseUrl(template) {
  function expand (line 4186) | function expand(template, context) {
  function parse (line 4222) | function parse(options) {
  function endpointWithDefaults (line 4296) | function endpointWithDefaults(defaults, route, options) {
  function withDefaults (line 4300) | function withDefaults(oldDefaults, newDefaults) {
  function _buildMessageForResponseErrors (line 4350) | function _buildMessageForResponseErrors(data) {
  class GraphqlResponseError (line 4354) | class GraphqlResponseError extends Error {
    method constructor (line 4355) | constructor(request, headers, response) {
  function graphql (line 4377) | function graphql(request, query, options) {
  function withDefaults (line 4428) | function withDefaults(request$1, newDefaults) {
  function withCustomRequest (line 4448) | function withCustomRequest(customRequest) {
  function ownKeys (line 4473) | function ownKeys(object, enumerableOnly) {
  function _objectSpread2 (line 4486) | function _objectSpread2(target) {
  function _defineProperty (line 4499) | function _defineProperty(obj, key, value) {
  function normalizePaginatedListResponse (line 4530) | function normalizePaginatedListResponse(response) {
  function iterator (line 4564) | function iterator(octokit, route, parameters) {
  function paginate (line 4608) | function paginate(octokit, route, parameters, mapFn) {
  function gather (line 4617) | function gather(octokit, results, iterator, mapFn) {
  function isPaginatingEndpoint (line 4645) | function isPaginatingEndpoint(arg) {
  function paginateRest (line 4658) | function paginateRest(octokit) {
  function ownKeys (line 4684) | function ownKeys(object, enumerableOnly) {
  function _objectSpread2 (line 4702) | function _objectSpread2(target) {
  function _defineProperty (line 4722) | function _defineProperty(obj, key, value) {
  function endpointsToMethods (line 5688) | function endpointsToMethods(octokit, endpointsMap) {
  function decorate (line 5718) | function decorate(octokit, scope, methodName, defaults, decorations) {
  function restEndpointMethods (line 5769) | function restEndpointMethods(octokit) {
  function legacyRestEndpointMethods (line 5776) | function legacyRestEndpointMethods(octokit) {
  function _interopDefault (line 5799) | function _interopDefault (ex) { return (ex && (typeof ex === 'object') &...
  class RequestError (line 5810) | class RequestError extends Error {
    method constructor (line 5811) | constructor(message, statusCode, options) {
  function _interopDefault (line 5881) | function _interopDefault (ex) { return (ex && (typeof ex === 'object') &...
  function getBufferResponse (line 5891) | function getBufferResponse(response) {
  function fetchWrapper (line 5895) | function fetchWrapper(requestOptions) {
  function getResponseData (line 5990) | async function getResponseData(response) {
  function toErrorMessage (line 6004) | function toErrorMessage(data) {
  function withDefaults (line 6019) | function withDefaults(oldEndpoint, newDefaults) {
  function bindApi (line 6069) | function bindApi(hook, state, name) {
  function HookSingular (line 6082) | function HookSingular() {
  function HookCollection (line 6092) | function HookCollection() {
  function Hook (line 6104) | function Hook() {
  function addHook (line 6131) | function addHook(state, kind, name, hook) {
  function register (line 6184) | function register(state, name, method, options) {
  function removeHook (line 6218) | function removeHook(state, name, method) {
  class Deprecation (line 6247) | class Deprecation extends Error {
    method constructor (line 6248) | constructor(message) {
  function isObject (line 6282) | function isObject(o) {
  function isPlainObject (line 6286) | function isPlainObject(o) {
  function _interopDefault (line 6321) | function _interopDefault (ex) { return (ex && (typeof ex === 'object') &...
  class Blob (line 6338) | class Blob {
    method constructor (line 6339) | constructor() {
    method size (line 6377) | get size() {
    method type (line 6380) | get type() {
    method text (line 6383) | text() {
    method arrayBuffer (line 6386) | arrayBuffer() {
    method stream (line 6391) | stream() {
    method toString (line 6398) | toString() {
    method slice (line 6401) | slice() {
  function FetchError (line 6458) | function FetchError(message, type, systemError) {
  function Body (line 6496) | function Body(body) {
  method body (line 6540) | get body() {
  method bodyUsed (line 6544) | get bodyUsed() {
  method arrayBuffer (line 6553) | arrayBuffer() {
  method blob (line 6564) | blob() {
  method json (line 6582) | json() {
  method text (line 6599) | text() {
  method buffer (line 6610) | buffer() {
  method textConverted (line 6620) | textConverted() {
  function consumeBody (line 6656) | function consumeBody() {
  function convertBody (line 6760) | function convertBody(buffer, headers) {
  function isURLSearchParams (line 6824) | function isURLSearchParams(obj) {
  function isBlob (line 6839) | function isBlob(obj) {
  function clone (line 6849) | function clone(instance) {
  function extractContentType (line 6883) | function extractContentType(body) {
  function getTotalBytes (line 6927) | function getTotalBytes(instance) {
  function writeToStream (line 6959) | function writeToStream(dest, instance) {
  function validateName (line 6990) | function validateName(name) {
  function validateValue (line 6997) | function validateValue(value) {
  function find (line 7012) | function find(map, name) {
  class Headers (line 7023) | class Headers {
    method constructor (line 7030) | constructor() {
    method get (line 7091) | get(name) {
    method forEach (line 7109) | forEach(callback) {
    method set (line 7132) | set(name, value) {
    method append (line 7148) | append(name, value) {
    method has (line 7167) | has(name) {
    method delete (line 7179) | delete(name) {
    method raw (line 7193) | raw() {
    method keys (line 7202) | keys() {
    method values (line 7211) | values() {
    method constructor (line 18994) | constructor (init = undefined) {
    method append (line 19013) | append (name, value) {
    method delete (line 19025) | delete (name) {
    method get (line 19070) | get (name) {
    method has (line 19092) | has (name) {
    method set (line 19114) | set (name, value) {
    method getSetCookie (line 19163) | getSetCookie () {
    method [kHeadersSortedMap] (line 19180) | get [kHeadersSortedMap] () {
    method keys (line 19226) | keys () {
    method values (line 19242) | values () {
    method entries (line 19258) | entries () {
    method forEach (line 19278) | forEach (callbackFn, thisArg = globalThis) {
  method [Symbol.iterator] (line 7222) | [Symbol.iterator]() {
  function getHeaders (line 7247) | function getHeaders(headers) {
  function createHeadersIterator (line 7262) | function createHeadersIterator(target, kind) {
  method next (line 7273) | next() {
  function exportNodeCompatibleHeaders (line 7315) | function exportNodeCompatibleHeaders(headers) {
  function createHeadersLenient (line 7335) | function createHeadersLenient(obj) {
  class Response (line 7371) | class Response {
    method constructor (line 7372) | constructor() {
    method url (line 7397) | get url() {
    method status (line 7401) | get status() {
    method ok (line 7408) | get ok() {
    method redirected (line 7412) | get redirected() {
    method statusText (line 7416) | get statusText() {
    method headers (line 7420) | get headers() {
    method clone (line 7429) | clone() {
    method error (line 22495) | static error () {
    method json (line 22512) | static json (data, init = {}) {
    method redirect (line 22543) | static redirect (url, status = 302) {
    method constructor (line 22590) | constructor (body = null, init = {}) {
    method type (line 22625) | get type () {
    method url (line 22633) | get url () {
    method redirected (line 22651) | get redirected () {
    method status (line 22660) | get status () {
    method ok (line 22668) | get ok () {
    method statusText (line 22677) | get statusText () {
    method headers (line 22686) | get headers () {
    method body (line 22693) | get body () {
    method bodyUsed (line 22699) | get bodyUsed () {
    method clone (line 22706) | clone () {
  function parseURL (line 7473) | function parseURL(urlStr) {
  function isRequest (line 7495) | function isRequest(input) {
  function isAbortSignal (line 7499) | function isAbortSignal(signal) {
  class Request (line 7511) | class Request {
    method constructor (line 7512) | constructor(input) {
    method method (line 7578) | get method() {
    method url (line 7582) | get url() {
    method headers (line 7586) | get headers() {
    method redirect (line 7590) | get redirect() {
    method signal (line 7594) | get signal() {
    method clone (line 7603) | clone() {
    method constructor (line 15393) | constructor (origin, {
    method onBodySent (line 15569) | onBodySent (chunk) {
    method onRequestSent (line 15579) | onRequestSent () {
    method onConnect (line 15593) | onConnect (abort) {
    method onHeaders (line 15605) | onHeaders (statusCode, headers, resume, statusText) {
    method onData (line 15620) | onData (chunk) {
    method onUpgrade (line 15632) | onUpgrade (statusCode, headers, socket) {
    method onComplete (line 15639) | onComplete (trailers) {
    method onError (line 15657) | onError (error) {
    method onFinally (line 15672) | onFinally () {
    method addHeader (line 15685) | addHeader (key, value) {
    method [kHTTP1BuildRequest] (line 15690) | static [kHTTP1BuildRequest] (origin, opts, handler) {
    method [kHTTP2BuildRequest] (line 15696) | static [kHTTP2BuildRequest] (origin, opts, handler) {
    method [kHTTP2CopyHeaders] (line 15724) | static [kHTTP2CopyHeaders] (raw) {
    method constructor (line 21551) | constructor (input, init = {}) {
    method method (line 22043) | get method () {
    method url (line 22051) | get url () {
    method headers (line 22061) | get headers () {
    method destination (line 22070) | get destination () {
    method referrer (line 22082) | get referrer () {
    method referrerPolicy (line 22104) | get referrerPolicy () {
    method mode (line 22114) | get mode () {
    method credentials (line 22124) | get credentials () {
    method cache (line 22132) | get cache () {
    method redirect (line 22143) | get redirect () {
    method integrity (line 22153) | get integrity () {
    method keepalive (line 22163) | get keepalive () {
    method isReloadNavigation (line 22172) | get isReloadNavigation () {
    method isHistoryNavigation (line 22182) | get isHistoryNavigation () {
    method signal (line 22193) | get signal () {
    method body (line 22200) | get body () {
    method bodyUsed (line 22206) | get bodyUsed () {
    method duplex (line 22212) | get duplex () {
    method clone (line 22219) | clone () {
  function getNodeRequestOptions (line 7632) | function getNodeRequestOptions(request) {
  function AbortError (line 7706) | function AbortError(message) {
  function fetch (line 7753) | function fetch(url, opts) {
  function fixResponseChunkedTransferBadEnding (line 8045) | function fixResponseChunkedTransferBadEnding(request, errorCallback) {
  function destroyStream (line 8073) | function destroyStream(stream, err) {
  function once (line 8131) | function once (fn) {
  function onceStrict (line 8141) | function onceStrict (fn) {
  function normalize (line 8171) | function normalize(str) { // fix bug in v8
  function findStatus (line 8175) | function findStatus(val) {
  function countSymbols (line 8197) | function countSymbols(string) {
  function mapChars (line 8205) | function mapChars(domain_name, useSTD3, processing_option) {
  function validateLabel (line 8260) | function validateLabel(label, processing_option) {
  function processing (line 8293) | function processing(domain_name, useSTD3, processing_option) {
  function httpOverHttp (line 8387) | function httpOverHttp(options) {
  function httpsOverHttp (line 8393) | function httpsOverHttp(options) {
  function httpOverHttps (line 8401) | function httpOverHttps(options) {
  function httpsOverHttps (line 8407) | function httpsOverHttps(options) {
  function TunnelingAgent (line 8416) | function TunnelingAgent(options) {
  function onFree (line 8459) | function onFree() {
  function onCloseOrRemove (line 8463) | function onCloseOrRemove(err) {
  function onResponse (line 8503) | function onResponse(res) {
  function onUpgrade (line 8508) | function onUpgrade(res, socket, head) {
  function onConnect (line 8515) | function onConnect(res, socket, head) {
  function onError (line 8544) | function onError(cause) {
  function createSecureSocket (line 8574) | function createSecureSocket(options, cb) {
  function toOptions (line 8591) | function toOptions(host, port, localAddress) {
  function mergeOptions (line 8602) | function mergeOptions(target) {
  function makeDispatcher (line 8690) | function makeDispatcher (fn) {
  function defaultFactory (line 8837) | function defaultFactory (origin, opts) {
  class Agent (line 8843) | class Agent extends DispatcherBase {
    method constructor (line 8844) | constructor ({ factory = defaultFactory, maxRedirections = 0, connect,...
    method [kRunning] (line 8900) | get [kRunning] () {
    method [kDispatch] (line 8912) | [kDispatch] (opts, handler) {
    method [kClose] (line 8937) | async [kClose] () {
    method [kDestroy] (line 8950) | async [kDestroy] (err) {
  function abort (line 8978) | function abort (self) {
  function addSignal (line 8986) | function addSignal (self, signal) {
  function removeSignal (line 9007) | function removeSignal (self) {
  class ConnectHandler (line 9041) | class ConnectHandler extends AsyncResource {
    method constructor (line 9042) | constructor (opts, callback) {
    method onConnect (line 9067) | onConnect (abort, context) {
    method onHeaders (line 9076) | onHeaders () {
    method onUpgrade (line 9080) | onUpgrade (statusCode, rawHeaders, socket) {
    method onError (line 9102) | onError (err) {
  function connect (line 9116) | function connect (opts, callback) {
  class PipelineRequest (line 9165) | class PipelineRequest extends Readable {
    method constructor (line 9166) | constructor () {
    method _read (line 9172) | _read () {
    method _destroy (line 9181) | _destroy (err, callback) {
  class PipelineResponse (line 9188) | class PipelineResponse extends Readable {
    method constructor (line 9189) | constructor (resume) {
    method _read (line 9194) | _read () {
    method _destroy (line 9198) | _destroy (err, callback) {
  class PipelineHandler (line 9207) | class PipelineHandler extends AsyncResource {
    method constructor (line 9208) | constructor (opts, handler) {
    method onConnect (line 9292) | onConnect (abort, context) {
    method onHeaders (line 9305) | onHeaders (statusCode, rawHeaders, resume) {
    method onData (line 9367) | onData (chunk) {
    method onComplete (line 9372) | onComplete (trailers) {
    method onError (line 9377) | onError (err) {
  function pipeline (line 9384) | function pipeline (opts, handler) {
  class RequestHandler (line 9415) | class RequestHandler extends AsyncResource {
    method constructor (line 9416) | constructor (opts, callback) {
    method onConnect (line 9473) | onConnect (abort, context) {
    method onHeaders (line 9482) | onHeaders (statusCode, rawHeaders, resume, statusMessage) {
    method onData (line 9518) | onData (chunk) {
    method onComplete (line 9523) | onComplete (trailers) {
    method onError (line 9533) | onError (err) {
  function request (line 9561) | function request (opts, callback) {
  class StreamHandler (line 9604) | class StreamHandler extends AsyncResource {
    method constructor (line 9605) | constructor (opts, factory, callback) {
    method onConnect (line 9662) | onConnect (abort, context) {
    method onHeaders (line 9671) | onHeaders (statusCode, rawHeaders, resume, statusMessage) {
    method onData (line 9746) | onData (chunk) {
    method onComplete (line 9752) | onComplete (trailers) {
    method onError (line 9766) | onError (err) {
  function stream (line 9790) | function stream (opts, factory, callback) {
  class UpgradeHandler (line 9827) | class UpgradeHandler extends AsyncResource {
    method constructor (line 9828) | constructor (opts, callback) {
    method onConnect (line 9854) | onConnect (abort, context) {
    method onHeaders (line 9863) | onHeaders () {
    method onUpgrade (line 9867) | onUpgrade (statusCode, rawHeaders, socket) {
    method onError (line 9884) | onError (err) {
  function upgrade (line 9898) | function upgrade (opts, callback) {
  method constructor (line 9968) | constructor ({
  method destroy (line 9994) | destroy (err) {
  method emit (line 10011) | emit (ev, ...args) {
  method on (line 10022) | on (ev, ...args) {
  method addListener (line 10029) | addListener (ev, ...args) {
  method off (line 10033) | off (ev, ...args) {
  method removeListener (line 10044) | removeListener (ev, ...args) {
  method push (line 10048) | push (chunk) {
  method text (line 10057) | async text () {
  method json (line 10062) | async json () {
  method blob (line 10067) | async blob () {
  method arrayBuffer (line 10072) | async arrayBuffer () {
  method formData (line 10077) | async formData () {
  method bodyUsed (line 10083) | get bodyUsed () {
  method body (line 10088) | get body () {
  method dump (line 10100) | dump (opts) {
  function isLocked (line 10148) | function isLocked (self) {
  function isUnusable (line 10154) | function isUnusable (self) {
  function consume (line 10158) | async function consume (stream, type) {
  function consumeStart (line 10189) | function consumeStart (consume) {
  function consumeEnd (line 10215) | function consumeEnd (consume) {
  function consumePush (line 10246) | function consumePush (consume, chunk) {
  function consumeFinish (line 10251) | function consumeFinish (consume, err) {
  function getResolveErrorBodyCallback (line 10282) | async function getResolveErrorBodyCallback ({ callback, body, contentTyp...
  function getGreatestCommonDivisor (line 10357) | function getGreatestCommonDivisor (a, b) {
  function defaultFactory (line 10362) | function defaultFactory (origin, opts) {
  class BalancedPool (line 10366) | class BalancedPool extends PoolBase {
    method constructor (line 10367) | constructor (upstreams = [], { factory = defaultFactory, ...opts } = {...
    method addUpstream (line 10396) | addUpstream (upstream) {
    method _updateBalancedPoolStats (line 10436) | _updateBalancedPoolStats () {
    method removeUpstream (line 10440) | removeUpstream (upstream) {
    method upstreams (line 10456) | get upstreams () {
    method [kGetDispatcher] (line 10462) | [kGetDispatcher] () {
  class Cache (line 10557) | class Cache {
    method constructor (line 10564) | constructor () {
    method match (line 10572) | async match (request, options = {}) {
    method matchAll (line 10588) | async matchAll (request = undefined, options = {}) {
    method add (line 10656) | async add (request) {
    method addAll (line 10672) | async addAll (requests) {
    method put (line 10833) | async put (request, response) {
    method delete (line 10962) | async delete (request, options = {}) {
    method keys (line 11026) | async keys (request = undefined, options = {}) {
    method #batchCacheOperations (line 11105) | #batchCacheOperations (operations) {
    method #queryCache (line 11243) | #queryCache (requestQuery, options, targetStorage) {
    method #requestMatchesCachedItem (line 11267) | #requestMatchesCachedItem (requestQuery, request, response = null, opt...
  class CacheStorage (line 11381) | class CacheStorage {
    method constructor (line 11388) | constructor () {
    method match (line 11394) | async match (request, options = {}) {
    method has (line 11431) | async has (cacheName) {
    method open (line 11447) | async open (cacheName) {
    method delete (line 11479) | async delete (cacheName) {
    method keys (line 11492) | async keys () {
  function urlEquals (line 11552) | function urlEquals (A, B, excludeFragment = false) {
  function fieldValues (line 11564) | function fieldValues (header) {
  class Client (line 11724) | class Client extends DispatcherBase {
    method constructor (line 11730) | constructor (url, {
    method pipelining (line 11913) | get pipelining () {
    method pipelining (line 11917) | set pipelining (value) {
    method [kPending] (line 11922) | get [kPending] () {
    method [kRunning] (line 11926) | get [kRunning] () {
    method [kSize] (line 11930) | get [kSize] () {
    method [kConnected] (line 11934) | get [kConnected] () {
    method [kBusy] (line 11938) | get [kBusy] () {
    method [kConnect] (line 11948) | [kConnect] (cb) {
    method [kDispatch] (line 11953) | [kDispatch] (opts, handler) {
    method [kClose] (line 11978) | async [kClose] () {
    method [kDestroy] (line 11990) | async [kDestroy] (err) {
  function onHttp2SessionError (line 12024) | function onHttp2SessionError (err) {
  function onHttp2FrameError (line 12032) | function onHttp2FrameError (type, code, id) {
  function onHttp2SessionEnd (line 12041) | function onHttp2SessionEnd () {
  function onHTTP2GoAway (line 12046) | function onHTTP2GoAway (code) {
  function lazyllhttp (line 12086) | async function lazyllhttp () {
  class Parser (line 12161) | class Parser {
    method constructor (line 12162) | constructor (client, socket, { exports }) {
    method setTimeout (line 12190) | setTimeout (value, type) {
    method resume (line 12212) | resume () {
    method readMore (line 12235) | readMore () {
    method execute (line 12245) | execute (data) {
    method destroy (line 12307) | destroy () {
    method onStatus (line 12322) | onStatus (buf) {
    method onMessageBegin (line 12326) | onMessageBegin () {
    method onHeaderField (line 12340) | onHeaderField (buf) {
    method onHeaderValue (line 12352) | onHeaderValue (buf) {
    method trackHeader (line 12374) | trackHeader (len) {
    method onUpgrade (line 12381) | onUpgrade (head) {
    method onHeadersComplete (line 12428) | onHeadersComplete (statusCode, upgrade, shouldKeepAlive) {
    method onBody (line 12537) | onBody (buf) {
    method onMessageComplete (line 12569) | onMessageComplete () {
  function onParserTimeout (line 12636) | function onParserTimeout (parser) {
  function onSocketReadable (line 12655) | function onSocketReadable () {
  function onSocketError (line 12662) | function onSocketError (err) {
  function onError (line 12682) | function onError (client, err) {
  function onSocketEnd (line 12702) | function onSocketEnd () {
  function onSocketClose (line 12716) | function onSocketClose () {
  function connect (line 12759) | async function connect (client) {
  function emitDrain (line 12924) | function emitDrain (client) {
  function resume (line 12929) | function resume (client, sync) {
  function _resume (line 12946) | function _resume (client, sync) {
  function shouldSendContentLength (line 13071) | function shouldSendContentLength (method) {
  function write (line 13075) | function write (client, request) {
  function writeH2 (line 13240) | function writeH2 (client, session, request) {
  function writeStream (line 13504) | function writeStream ({ h2stream, body, client, request, socket, content...
  function writeBlob (line 13619) | async function writeBlob ({ h2stream, body, client, request, socket, con...
  function writeIterable (line 13654) | async function writeIterable ({ h2stream, body, client, request, socket,...
  class AsyncWriter (line 13734) | class AsyncWriter {
    method constructor (line 13735) | constructor ({ socket, request, contentLength, client, expectsPayload,...
    method write (line 13747) | write (chunk) {
    method end (line 13810) | end () {
    method destroy (line 13857) | destroy (err) {
  function errorRequest (line 13869) | function errorRequest (client, request, err) {
  class CompatWeakRef (line 13893) | class CompatWeakRef {
    method constructor (line 13894) | constructor (value) {
    method deref (line 13898) | deref () {
  class CompatFinalizer (line 13905) | class CompatFinalizer {
    method constructor (line 13906) | constructor (finalizer) {
    method register (line 13910) | register (dispatcher, key) {
  function getCookies (line 13988) | function getCookies (headers) {
  function deleteCookie (line 14015) | function deleteCookie (headers, name, attributes) {
  function getSetCookies (line 14037) | function getSetCookies (headers) {
  function setCookie (line 14057) | function setCookie (headers, cookie) {
  function parseSetCookie (line 14168) | function parseSetCookie (header) {
  function parseUnparsedAttributes (line 14244) | function parseUnparsedAttributes (unparsedAttributes, cookieAttributeLis...
  function isCTLExcludingHtab (line 14485) | function isCTLExcludingHtab (value) {
  function validateCookieName (line 14512) | function validateCookieName (name) {
  function validateCookieValue (line 14549) | function validateCookieValue (value) {
  function validateCookiePath (line 14570) | function validateCookiePath (path) {
  function validateCookieDomain (line 14585) | function validateCookieDomain (domain) {
  function toIMFDate (line 14636) | function toIMFDate (date) {
  function validateCookieMaxAge (line 14669) | function validateCookieMaxAge (maxAge) {
  function stringify (line 14679) | function stringify (cookie) {
  function getHeadersList (line 14747) | function getHeadersList (headers) {
  method constructor (line 14798) | constructor (maxCachedSessions) {
  method get (line 14813) | get (sessionKey) {
  method set (line 14818) | set (sessionKey, session) {
  method constructor (line 14829) | constructor (maxCachedSessions) {
  method get (line 14834) | get (sessionKey) {
  method set (line 14838) | set (sessionKey, session) {
  function buildConnector (line 14854) | function buildConnector ({ allowH2, maxCachedSessions, socketPath, timeo...
  function setupTimeout (line 14938) | function setupTimeout (onConnectTimeout, timeout) {
  function onConnectTimeout (line 14963) | function onConnectTimeout (socket) {
  class UndiciError (line 15104) | class UndiciError extends Error {
    method constructor (line 15105) | constructor (message) {
  class ConnectTimeoutError (line 15112) | class ConnectTimeoutError extends UndiciError {
    method constructor (line 15113) | constructor (message) {
  class HeadersTimeoutError (line 15122) | class HeadersTimeoutError extends UndiciError {
    method constructor (line 15123) | constructor (message) {
  class HeadersOverflowError (line 15132) | class HeadersOverflowError extends UndiciError {
    method constructor (line 15133) | constructor (message) {
  class BodyTimeoutError (line 15142) | class BodyTimeoutError extends UndiciError {
    method constructor (line 15143) | constructor (message) {
  class ResponseStatusCodeError (line 15152) | class ResponseStatusCodeError extends UndiciError {
    method constructor (line 15153) | constructor (message, statusCode, headers, body) {
  class InvalidArgumentError (line 15166) | class InvalidArgumentError extends UndiciError {
    method constructor (line 15167) | constructor (message) {
  class InvalidReturnValueError (line 15176) | class InvalidReturnValueError extends UndiciError {
    method constructor (line 15177) | constructor (message) {
  class RequestAbortedError (line 15186) | class RequestAbortedError extends UndiciError {
    method constructor (line 15187) | constructor (message) {
  class InformationalError (line 15196) | class InformationalError extends UndiciError {
    method constructor (line 15197) | constructor (message) {
  class RequestContentLengthMismatchError (line 15206) | class RequestContentLengthMismatchError extends UndiciError {
    method constructor (line 15207) | constructor (message) {
  class ResponseContentLengthMismatchError (line 15216) | class ResponseContentLengthMismatchError extends UndiciError {
    method constructor (line 15217) | constructor (message) {
  class ClientDestroyedError (line 15226) | class ClientDestroyedError extends UndiciError {
    method constructor (line 15227) | constructor (message) {
  class ClientClosedError (line 15236) | class ClientClosedError extends UndiciError {
    method constructor (line 15237) | constructor (message) {
  class SocketError (line 15246) | class SocketError extends UndiciError {
    method constructor (line 15247) | constructor (message, socket) {
  class NotSupportedError (line 15257) | class NotSupportedError extends UndiciError {
    method constructor (line 15258) | constructor (message) {
  class BalancedPoolMissingUpstreamError (line 15267) | class BalancedPoolMissingUpstreamError extends UndiciError {
    method constructor (line 15268) | constructor (message) {
  class HTTPParserError (line 15277) | class HTTPParserError extends Error {
    method constructor (line 15278) | constructor (message, code, data) {
  class ResponseExceededMaxSizeError (line 15287) | class ResponseExceededMaxSizeError extends UndiciError {
    method constructor (line 15288) | constructor (message) {
  class RequestRetryError (line 15297) | class RequestRetryError extends UndiciError {
    method constructor (line 15298) | constructor (message, code, { headers, data }) {
  class Request (line 15392) | class Request {
    method constructor (line 7512) | constructor(input) {
    method method (line 7578) | get method() {
    method url (line 7582) | get url() {
    method headers (line 7586) | get headers() {
    method redirect (line 7590) | get redirect() {
    method signal (line 7594) | get signal() {
    method clone (line 7603) | clone() {
    method constructor (line 15393) | constructor (origin, {
    method onBodySent (line 15569) | onBodySent (chunk) {
    method onRequestSent (line 15579) | onRequestSent () {
    method onConnect (line 15593) | onConnect (abort) {
    method onHeaders (line 15605) | onHeaders (statusCode, headers, resume, statusText) {
    method onData (line 15620) | onData (chunk) {
    method onUpgrade (line 15632) | onUpgrade (statusCode, headers, socket) {
    method onComplete (line 15639) | onComplete (trailers) {
    method onError (line 15657) | onError (error) {
    method onFinally (line 15672) | onFinally () {
    method addHeader (line 15685) | addHeader (key, value) {
    method [kHTTP1BuildRequest] (line 15690) | static [kHTTP1BuildRequest] (origin, opts, handler) {
    method [kHTTP2BuildRequest] (line 15696) | static [kHTTP2BuildRequest] (origin, opts, handler) {
    method [kHTTP2CopyHeaders] (line 15724) | static [kHTTP2CopyHeaders] (raw) {
    method constructor (line 21551) | constructor (input, init = {}) {
    method method (line 22043) | get method () {
    method url (line 22051) | get url () {
    method headers (line 22061) | get headers () {
    method destination (line 22070) | get destination () {
    method referrer (line 22082) | get referrer () {
    method referrerPolicy (line 22104) | get referrerPolicy () {
    method mode (line 22114) | get mode () {
    method credentials (line 22124) | get credentials () {
    method cache (line 22132) | get cache () {
    method redirect (line 22143) | get redirect () {
    method integrity (line 22153) | get integrity () {
    method keepalive (line 22163) | get keepalive () {
    method isReloadNavigation (line 22172) | get isReloadNavigation () {
    method isHistoryNavigation (line 22182) | get isHistoryNavigation () {
    method signal (line 22193) | get signal () {
    method body (line 22200) | get body () {
    method bodyUsed (line 22206) | get bodyUsed () {
    method duplex (line 22212) | get duplex () {
    method clone (line 22219) | clone () {
  function processHeaderValue (line 15741) | function processHeaderValue (key, val, skipAppend) {
  function processHeader (line 15755) | function processHeader (request, key, val, skipAppend = false) {
  function nop (line 15932) | function nop () {}
  function isStream (line 15934) | function isStream (obj) {
  function isBlobLike (line 15939) | function isBlobLike (object) {
  function buildURL (line 15949) | function buildURL (url, queryParams) {
  function parseURL (line 15963) | function parseURL (url) {
  function parseOrigin (line 16030) | function parseOrigin (url) {
  function getHostname (line 16040) | function getHostname (host) {
  function getServerName (line 16056) | function getServerName (host) {
  function deepClone (line 16071) | function deepClone (obj) {
  function isAsyncIterable (line 16075) | function isAsyncIterable (obj) {
  function isIterable (line 16079) | function isIterable (obj) {
  function bodyLength (line 16083) | function bodyLength (body) {
  function isDestroyed (line 16100) | function isDestroyed (stream) {
  function isReadableAborted (line 16104) | function isReadableAborted (stream) {
  function destroy (line 16109) | function destroy (stream, err) {
  function parseKeepAliveTimeout (line 16133) | function parseKeepAliveTimeout (val) {
  function headerNameToString (line 16143) | function headerNameToString (value) {
  function parseHeaders (line 16147) | function parseHeaders (headers, obj = {}) {
  function parseRawHeaders (line 16178) | function parseRawHeaders (headers) {
  function isBuffer (line 16205) | function isBuffer (buffer) {
  function validateHandler (line 16210) | function validateHandler (handler, method, upgrade) {
  function isDisturbed (line 16248) | function isDisturbed (body) {
  function isErrored (line 16259) | function isErrored (body) {
  function isReadable (line 16267) | function isReadable (body) {
  function getSocketInfo (line 16275) | function getSocketInfo (socket) {
  function ReadableStreamFrom (line 16295) | function ReadableStreamFrom (iterable) {
  function isFormDataLike (line 16332) | function isFormDataLike (object) {
  function throwIfAborted (line 16346) | function throwIfAborted (signal) {
  function addAbortListener (line 16360) | function addAbortListener (signal, listener) {
  function toUSVString (line 16374) | function toUSVString (val) {
  function parseRangeHeader (line 16386) | function parseRangeHeader (range) {
  class DispatcherBase (line 16463) | class DispatcherBase extends Dispatcher {
    method constructor (line 16464) | constructor () {
    method destroyed (line 16473) | get destroyed () {
    method closed (line 16477) | get closed () {
    method interceptors (line 16481) | get interceptors () {
    method interceptors (line 16485) | set interceptors (newInterceptors) {
    method close (line 16498) | close (callback) {
    method destroy (line 16544) | destroy (err, callback) {
    method [kInterceptedDispatch] (line 16593) | [kInterceptedDispatch] (opts, handler) {
    method dispatch (line 16607) | dispatch (opts, handler) {
  class Dispatcher (line 16651) | class Dispatcher extends EventEmitter {
    method dispatch (line 16652) | dispatch () {
    method close (line 16656) | close () {
    method destroy (line 16660) | destroy () {
  function extractBody (line 16706) | function extractBody (object, keepalive = false) {
  function safelyExtractBody (line 16926) | function safelyExtractBody (object, keepalive = false) {
  function cloneBody (line 16948) | function cloneBody (body) {
  function throwIfAborted (line 16994) | function throwIfAborted (state) {
  function bodyMixinMethods (line 17000) | function bodyMixinMethods (instance) {
  function mixinBody (line 17162) | function mixinBody (prototype) {
  function specConsumeBody (line 17172) | async function specConsumeBody (object, convertBytesToJSValue, instance) {
  function bodyUnusable (line 17217) | function bodyUnusable (body) {
  function utf8DecodeBytes (line 17228) | function utf8DecodeBytes (buffer) {
  function parseJSONFromBytes (line 17254) | function parseJSONFromBytes (bytes) {
  function bodyMimeType (line 17262) | function bodyMimeType (object) {
  function dataURLProcessor (line 17463) | function dataURLProcessor (dataURL) {
  function URLSerializer (line 17565) | function URLSerializer (url, excludeFragment = false) {
  function collectASequenceOfCodePoints (line 17582) | function collectASequenceOfCodePoints (condition, input, position) {
  function collectASequenceOfCodePointsFast (line 17606) | function collectASequenceOfCodePointsFast (char, input, position) {
  function stringPercentDecode (line 17621) | function stringPercentDecode (input) {
  function percentDecode (line 17631) | function percentDecode (input) {
  function parseMIMEType (line 17676) | function parseMIMEType (input) {
  function forgivingBase64 (line 17849) | function forgivingBase64 (data) {
  function collectAnHTTPQuotedString (line 17893) | function collectAnHTTPQuotedString (input, position, extractValue) {
  function serializeAMimeType (line 17968) | function serializeAMimeType (mimeType) {
  function isHTTPWhiteSpace (line 18013) | function isHTTPWhiteSpace (char) {
  function removeHTTPWhitespace (line 18021) | function removeHTTPWhitespace (str, leading = true, trailing = true) {
  function isASCIIWhitespace (line 18040) | function isASCIIWhitespace (char) {
  function removeASCIIWhitespace (line 18047) | function removeASCIIWhitespace (str, leading = true, trailing = true) {
  class File (line 18091) | class File extends Blob {
    method constructor (line 18092) | constructor (fileBits, fileName, options = {}) {
    method name (line 18156) | get name () {
    method lastModified (line 18162) | get lastModified () {
    method type (line 18168) | get type () {
  class FileLike (line 18175) | class FileLike {
    method constructor (line 18176) | constructor (blobLike, fileName, options = {}) {
    method stream (line 18223) | stream (...args) {
    method arrayBuffer (line 18229) | arrayBuffer (...args) {
    method slice (line 18235) | slice (...args) {
    method text (line 18241) | text (...args) {
    method size (line 18247) | get size () {
    method type (line 18253) | get type () {
    method name (line 18259) | get name () {
    method lastModified (line 18265) | get lastModified () {
  method [Symbol.toStringTag] (line 18271) | get [Symbol.toStringTag] () {
  method defaultValue (line 18313) | get defaultValue () {
  function processBlobParts (line 18343) | function processBlobParts (parts, options) {
  function convertLineEndingsNative (line 18393) | function convertLineEndingsNative (s) {
  function isFileLike (line 18411) | function isFileLike (object) {
  class FormData (line 18444) | class FormData {
    method constructor (line 18445) | constructor (form) {
    method append (line 18457) | append (name, value, filename = undefined) {
    method delete (line 18486) | delete (name) {
    method get (line 18498) | get (name) {
    method getAll (line 18517) | getAll (name) {
    method has (line 18533) | has (name) {
    method set (line 18545) | set (name, value, filename = undefined) {
    method entries (line 18588) | entries () {
    method keys (line 18598) | keys () {
    method values (line 18608) | values () {
    method forEach (line 18622) | forEach (callbackFn, thisArg = globalThis) {
  function makeEntry (line 18655) | function makeEntry (name, value, filename) {
  function getGlobalOrigin (line 18711) | function getGlobalOrigin () {
  function setGlobalOrigin (line 18715) | function setGlobalOrigin (newOrigin) {
  function isHTTPWhiteSpaceCharCode (line 18774) | function isHTTPWhiteSpaceCharCode (code) {
  function headerValueNormalize (line 18782) | function headerValueNormalize (potentialValue) {
  function fill (line 18794) | function fill (headers, object) {
  function appendHeader (line 18834) | function appendHeader (headers, name, value) {
  class HeadersList (line 18875) | class HeadersList {
    method constructor (line 18879) | constructor (init) {
    method contains (line 18891) | contains (name) {
    method clear (line 18900) | clear () {
    method append (line 18907) | append (name, value) {
    method set (line 18933) | set (name, value) {
    method delete (line 18949) | delete (name) {
    method get (line 18962) | get (name) {
    method entries (line 18979) | get entries () {
  method [Symbol.iterator] (line 18972) | * [Symbol.iterator] () {
  class Headers (line 18993) | class Headers {
    method constructor (line 7030) | constructor() {
    method get (line 7091) | get(name) {
    method forEach (line 7109) | forEach(callback) {
    method set (line 7132) | set(name, value) {
    method append (line 7148) | append(name, value) {
    method has (line 7167) | has(name) {
    method delete (line 7179) | delete(name) {
    method raw (line 7193) | raw() {
    method keys (line 7202) | keys() {
    method values (line 7211) | values() {
    method constructor (line 18994) | constructor (init = undefined) {
    method append (line 19013) | append (name, value) {
    method delete (line 19025) | delete (name) {
    method get (line 19070) | get (name) {
    method has (line 19092) | has (name) {
    method set (line 19114) | set (name, value) {
    method getSetCookie (line 19163) | getSetCookie () {
    method [kHeadersSortedMap] (line 19180) | get [kHeadersSortedMap] () {
    method keys (line 19226) | keys () {
    method values (line 19242) | values () {
    method entries (line 19258) | entries () {
    method forEach (line 19278) | forEach (callbackFn, thisArg = globalThis) {
  method [Symbol.for('nodejs.util.inspect.custom')] (line 19294) | [Symbol.for('nodejs.util.inspect.custom')] () {
  class Fetch (line 19420) | class Fetch extends EE {
    method constructor (line 19421) | constructor (dispatcher) {
    method terminate (line 19436) | terminate (reason) {
    method abort (line 19447) | abort (error) {
  function fetch (line 19474) | function fetch (input, init = {}) {
  function finalizeAndReportTiming (line 19607) | function finalizeAndReportTiming (response, initiatorType = 'other') {
  function markResourceTiming (line 19670) | function markResourceTiming (timingInfo, originalURL, initiatorType, glo...
  function abortFetch (line 19677) | function abortFetch (p, request, responseObject, error) {
  function fetching (line 19722) | function fetching ({
  function mainFetch (line 19877) | async function mainFetch (fetchParams, recursive = false) {
  function schemeFetch (line 20129) | function schemeFetch (fetchParams) {
  function finalizeResponse (line 20246) | function finalizeResponse (fetchParams, response) {
  function fetchFinale (line 20259) | function fetchFinale (fetchParams, response) {
  function httpFetch (line 20350) | async function httpFetch (fetchParams) {
  function httpRedirectFetch (line 20453) | function httpRedirectFetch (fetchParams, response) {
  function httpNetworkOrCacheFetch (line 20597) | async function httpNetworkOrCacheFetch (
  function httpNetworkFetch (line 20927) | async function httpNetworkFetch (
  class Request (line 21549) | class Request {
    method constructor (line 7512) | constructor(input) {
    method method (line 7578) | get method() {
    method url (line 7582) | get url() {
    method headers (line 7586) | get headers() {
    method redirect (line 7590) | get redirect() {
    method signal (line 7594) | get signal() {
    method clone (line 7603) | clone() {
    method constructor (line 15393) | constructor (origin, {
    method onBodySent (line 15569) | onBodySent (chunk) {
    method onRequestSent (line 15579) | onRequestSent () {
    method onConnect (line 15593) | onConnect (abort) {
    method onHeaders (line 15605) | onHeaders (statusCode, headers, resume, statusText) {
    method onData (line 15620) | onData (chunk) {
    method onUpgrade (line 15632) | onUpgrade (statusCode, headers, socket) {
    method onComplete (line 15639) | onComplete (trailers) {
    method onError (line 15657) | onError (error) {
    method onFinally (line 15672) | onFinally () {
    method addHeader (line 15685) | addHeader (key, value) {
    method [kHTTP1BuildRequest] (line 15690) | static [kHTTP1BuildRequest] (origin, opts, handler) {
    method [kHTTP2BuildRequest] (line 15696) | static [kHTTP2BuildRequest] (origin, opts, handler) {
    method [kHTTP2CopyHeaders] (line 15724) | static [kHTTP2CopyHeaders] (raw) {
    method constructor (line 21551) | constructor (input, init = {}) {
    method method (line 22043) | get method () {
    method url (line 22051) | get url () {
    method headers (line 22061) | get headers () {
    method destination (line 22070) | get destination () {
    method referrer (line 22082) | get referrer () {
    method referrerPolicy (line 22104) | get referrerPolicy () {
    method mode (line 22114) | get mode () {
    method credentials (line 22124) | get credentials () {
    method cache (line 22132) | get cache () {
    method redirect (line 22143) | get redirect () {
    method integrity (line 22153) | get integrity () {
    method keepalive (line 22163) | get keepalive () {
    method isReloadNavigation (line 22172) | get isReloadNavigation () {
    method isHistoryNavigation (line 22182) | get isHistoryNavigation () {
    method signal (line 22193) | get signal () {
    method body (line 22200) | get body () {
    method bodyUsed (line 22206) | get bodyUsed () {
    method duplex (line 22212) | get duplex () {
    method clone (line 22219) | clone () {
  function makeRequest (line 22261) | function makeRequest (init) {
  function cloneRequest (line 22309) | function cloneRequest (request) {
  class Response (line 22493) | class Response {
    method constructor (line 7372) | constructor() {
    method url (line 7397) | get url() {
    method status (line 7401) | get status() {
    method ok (line 7408) | get ok() {
    method redirected (line 7412) | get redirected() {
    method statusText (line 7416) | get statusText() {
    method headers (line 7420) | get headers() {
    method clone (line 7429) | clone() {
    method error (line 22495) | static error () {
    method json (line 22512) | static json (data, init = {}) {
    method redirect (line 22543) | static redirect (url, status = 302) {
    method constructor (line 22590) | constructor (body = null, init = {}) {
    method type (line 22625) | get type () {
    method url (line 22633) | get url () {
    method redirected (line 22651) | get redirected () {
    method status (line 22660) | get status () {
    method ok (line 22668) | get ok () {
    method statusText (line 22677) | get statusText () {
    method headers (line 22686) | get headers () {
    method body (line 22693) | get body () {
    method bodyUsed (line 22699) | get bodyUsed () {
    method clone (line 22706) | clone () {
  function cloneResponse (line 22759) | function cloneResponse (response) {
  function makeResponse (line 22785) | function makeResponse (init) {
  function makeNetworkError (line 22804) | function makeNetworkError (reason) {
  function makeFilteredResponse (line 22816) | function makeFilteredResponse (response, state) {
  function filterResponse (line 22835) | function filterResponse (response, type) {
  function makeAppropriateNetworkError (line 22889) | function makeAppropriateNetworkError (fetchParams, err = null) {
  function initializeResponse (line 22901) | function initializeResponse (response, init, body) {
  function responseURL (line 23080) | function responseURL (response) {
  function responseLocationURL (line 23090) | function responseLocationURL (response, requestFragment) {
  function requestCurrentURL (line 23117) | function requestCurrentURL (request) {
  function requestBadPort (line 23121) | function requestBadPort (request) {
  function isErrorLike (line 23135) | function isErrorLike (object) {
  function isValidReasonPhrase (line 23148) | function isValidReasonPhrase (statusText) {
  function isTokenCharCode (line 23170) | function isTokenCharCode (c) {
  function isValidHTTPToken (line 23200) | function isValidHTTPToken (characters) {
  function isValidHeaderName (line 23216) | function isValidHeaderName (potentialValue) {
  function isValidHeaderValue (line 23224) | function isValidHeaderValue (potentialValue) {
  function setRequestReferrerPolicyOnRedirect (line 23248) | function setRequestReferrerPolicyOnRedirect (request, actualResponse) {
  function crossOriginResourcePolicyCheck (line 23288) | function crossOriginResourcePolicyCheck () {
  function corsCheck (line 23294) | function corsCheck () {
  function TAOCheck (line 23300) | function TAOCheck () {
  function appendFetchMetadata (line 23305) | function appendFetchMetadata (httpRequest) {
  function appendRequestOriginHeader (line 23331) | function appendRequestOriginHeader (request) {
  function coarsenedSharedCurrentTime (line 23374) | function coarsenedSharedCurrentTime (crossOriginIsolatedCapability) {
  function createOpaqueTimingInfo (line 23380) | function createOpaqueTimingInfo (timingInfo) {
  function makePolicyContainer (line 23397) | function makePolicyContainer () {
  function clonePolicyContainer (line 23405) | function clonePolicyContainer (policyContainer) {
  function determineRequestsReferrer (line 23412) | function determineRequestsReferrer (request) {
  function stripURLForReferrer (line 23511) | function stripURLForReferrer (url, originOnly) {
  function isURLPotentiallyTrustworthy (line 23542) | function isURLPotentiallyTrustworthy (url) {
  function bytesMatch (line 23588) | function bytesMatch (bytes, metadataList) {
  function parseMetadata (line 23660) | function parseMetadata (metadata) {
  function getStrongestMetadata (line 23710) | function getStrongestMetadata (metadataList) {
  function filterMetadataListByAlgorithm (line 23739) | function filterMetadataListByAlgorithm (metadataList, algorithm) {
  function compareBase64Mixed (line 23764) | function compareBase64Mixed (actualValue, expectedValue) {
  function tryUpgradeRequestToAPotentiallyTrustworthyURL (line 23784) | function tryUpgradeRequestToAPotentiallyTrustworthyURL (request) {
  function sameOrigin (line 23793) | function sameOrigin (A, B) {
  function createDeferredPromise (line 23809) | function createDeferredPromise () {
  function isAborted (line 23820) | function isAborted (fetchParams) {
  function isCancelled (line 23824) | function isCancelled (fetchParams) {
  function normalizeMethod (line 23851) | function normalizeMethod (method) {
  function serializeJavascriptValueToJSONString (line 23856) | function serializeJavascriptValueToJSONString (value) {
  function makeIterator (line 23881) | function makeIterator (iterator, name, kind) {
  function iteratorResult (line 23944) | function iteratorResult (pair, kind) {
  function fullyReadBody (line 23988) | async function fullyReadBody (body, processBody, processBodyError) {
  function isReadableStreamLike (line 24024) | function isReadableStreamLike (stream) {
  function isomorphicDecode (line 24041) | function isomorphicDecode (input) {
  function readableStreamClose (line 24056) | function readableStreamClose (controller) {
  function isomorphicEncode (line 24071) | function isomorphicEncode (input) {
  function readAllBytes (line 24088) | async function readAllBytes (reader) {
  function urlIsLocal (line 24118) | function urlIsLocal (url) {
  function urlHasHttpsScheme (line 24129) | function urlHasHttpsScheme (url) {
  function urlIsHttpHttpsScheme (line 24141) | function urlIsHttpHttpsScheme (url) {
  function getEncoding (line 24869) | function getEncoding (label) {
  class FileReader (line 25178) | class FileReader extends EventTarget {
    method constructor (line 25179) | constructor () {
    method readAsArrayBuffer (line 25199) | readAsArrayBuffer (blob) {
    method readAsBinaryString (line 25215) | readAsBinaryString (blob) {
    method readAsText (line 25232) | readAsText (blob, encoding = undefined) {
    method readAsDataURL (line 25252) | readAsDataURL (blob) {
    method abort (line 25267) | abort () {
    method readyState (line 25304) | get readyState () {
    method result (line 25317) | get result () {
    method error (line 25328) | get error () {
    method onloadend (line 25336) | get onloadend () {
    method onloadend (line 25342) | set onloadend (fn) {
    method onerror (line 25357) | get onerror () {
    method onerror (line 25363) | set onerror (fn) {
    method onloadstart (line 25378) | get onloadstart () {
    method onloadstart (line 25384) | set onloadstart (fn) {
    method onprogress (line 25399) | get onprogress () {
    method onprogress (line 25405) | set onprogress (fn) {
    method onload (line 25420) | get onload () {
    method onload (line 25426) | set onload (fn) {
    method onabort (line 25441) | get onabort () {
    method onabort (line 25447) | set onabort (fn) {
  class ProgressEvent (line 25522) | class ProgressEvent extends Event {
    method constructor (line 25523) | constructor (type, eventInitDict = {}) {
    method lengthComputable (line 25536) | get lengthComputable () {
    method loaded (line 25542) | get loaded () {
    method total (line 25548) | get total () {
  function readOperation (line 25648) | function readOperation (fr, blob, type, encodingName) {
  function fireAProgressEvent (line 25814) | function fireAProgressEvent (e, reader) {
  function packageData (line 25832) | function packageData (bytes, type, mimeType, encodingName) {
  function decode (line 25934) | function decode (ioQueue, encoding) {
  function BOMSniffing (line 25966) | function BOMSniffing (ioQueue) {
  function combineByteSequences (line 25990) | function combineByteSequences (sequences) {
  function setGlobalDispatcher (line 26029) | function setGlobalDispatcher (agent) {
  function getGlobalDispatcher (line 26041) | function getGlobalDispatcher () {
  method constructor (line 26060) | constructor (handler) {
  method onConnect (line 26064) | onConnect (...args) {
  method onError (line 26068) | onError (...args) {
  method onUpgrade (line 26072) | onUpgrade (...args) {
  method onHeaders (line 26076) | onHeaders (...args) {
  method onData (line 26080) | onData (...args) {
  method onComplete (line 26084) | onComplete (...args) {
  method onBodySent (line 26088) | onBodySent (...args) {
  class BodyAsyncIterable (line 26112) | class BodyAsyncIterable {
    method constructor (line 26113) | constructor (body) {
  method [Symbol.asyncIterator] (line 26118) | async * [Symbol.asyncIterator] () {
  class RedirectHandler (line 26125) | class RedirectHandler {
    method constructor (line 26126) | constructor (dispatch, maxRedirections, opts, handler) {
    method onConnect (line 26175) | onConnect (abort) {
    method onUpgrade (line 26180) | onUpgrade (statusCode, headers, socket) {
    method onError (line 26184) | onError (error) {
    method onHeaders (line 26188) | onHeaders (statusCode, headers, resume, statusText) {
    method onData (line 26221) | onData (chunk) {
    method onComplete (line 26245) | onComplete (trailers) {
    method onBodySent (line 26265) | onBodySent (chunk) {
  function parseLocation (line 26272) | function parseLocation (statusCode, headers) {
  function shouldRemoveHeader (line 26285) | function shouldRemoveHeader (header, removeContent, unknownOrigin) {
  function cleanRequestHeaders (line 26300) | function cleanRequestHeaders (headers, removeContent, unknownOrigin) {
  function calculateRetryAfterHeader (line 26334) | function calculateRetryAfterHeader (retryAfter) {
  class RetryHandler (line 26341) | class RetryHandler {
    method constructor (line 26342) | constructor (opts, handlers) {
    method onRequestSent (line 26404) | onRequestSent () {
    method onUpgrade (line 26410) | onUpgrade (statusCode, headers, socket) {
    method onConnect (line 26416) | onConnect (abort) {
    method onBodySent (line 26424) | onBodySent (chunk) {
    method [kRetryHandlerDefaultRetry] (line 26428) | static [kRetryHandlerDefaultRetry] (err, { state, opts }, cb) {
    method onHeaders (line 26496) | onHeaders (statusCode, rawHeaders, resume, statusMessage) {
    method onData (line 26614) | onData (chunk) {
    method onComplete (line 26620) | onComplete (rawTrailers) {
    method onError (line 26625) | onError (err) {
  function createRedirectInterceptor (line 26676) | function createRedirectInterceptor ({ maxRedirections: defaultMaxRedirec...
  function enumToMap (line 27005) | function enumToMap(obj) {
  class FakeWeakRef (line 27047) | class FakeWeakRef {
    method constructor (line 27048) | constructor (value) {
    method deref (line 27052) | deref () {
  class MockAgent (line 27057) | class MockAgent extends Dispatcher {
    method constructor (line 27058) | constructor (opts) {
    method get (line 27075) | get (origin) {
    method dispatch (line 27085) | dispatch (opts, handler) {
    method close (line 27091) | async close () {
    method deactivate (line 27096) | deactivate () {
    method activate (line 27100) | activate () {
    method enableNetConnect (line 27104) | enableNetConnect (matcher) {
    method disableNetConnect (line 27118) | disableNetConnect () {
    method isMockActive (line 27124) | get isMockActive () {
    method [kMockAgentSet] (line 27128) | [kMockAgentSet] (origin, dispatcher) {
    method [kFactory] (line 27132) | [kFactory] (origin) {
    method [kMockAgentGet] (line 27139) | [kMockAgentGet] (origin) {
    method [kGetNetConnect] (line 27165) | [kGetNetConnect] () {
    method pendingInterceptors (line 27169) | pendingInterceptors () {
    method assertNoPendingInterceptors (line 27177) | assertNoPendingInterceptors ({ pendingInterceptorsFormatter = new Pend...
  class MockClient (line 27224) | class MockClient extends Client {
    method constructor (line 27225) | constructor (origin, opts) {
    method intercept (line 27250) | intercept (opts) {
    method [kClose] (line 27254) | async [kClose] () {
  method [Symbols.kConnected] (line 27243) | get [Symbols.kConnected] () {
  class MockNotMatchedError (line 27274) | class MockNotMatchedError extends UndiciError {
    method constructor (line 27275) | constructor (message) {
  class MockScope (line 27312) | class MockScope {
    method constructor (line 27313) | constructor (mockDispatch) {
    method delay (line 27320) | delay (waitInMs) {
    method persist (line 27332) | persist () {
    method times (line 27340) | times (repeatTimes) {
  class MockInterceptor (line 27353) | class MockInterceptor {
    method constructor (line 27354) | constructor (opts, mockDispatches) {
    method createMockScopeDispatchData (line 27387) | createMockScopeDispatchData (statusCode, data, responseOptions = {}) {
    method validateReplyParameters (line 27396) | validateReplyParameters (statusCode, data, responseOptions) {
    method reply (line 27411) | reply (replyData) {
    method replyWithError (line 27457) | replyWithError (error) {
    method defaultReplyHeaders (line 27469) | defaultReplyHeaders (headers) {
    method defaultReplyTrailers (line 27481) | defaultReplyTrailers (trailers) {
    method replyContentLength (line 27493) | replyContentLength () {
  class MockPool (line 27530) | class MockPool extends Pool {
    method constructor (line 27531) | constructor (origin, opts) {
    method intercept (line 27556) | intercept (opts) {
    method [kClose] (line 27560) | async [kClose] () {
  method [Symbols.kConnected] (line 27549) | get [Symbols.kConnected] () {
  function matchValue (line 27625) | function matchValue (match, value) {
  function lowerCaseEntries (line 27638) | function lowerCaseEntries (headers) {
  function getHeaderByName (line 27650) | function getHeaderByName (headers, key) {
  function buildHeadersFromArray (line 27667) | function buildHeadersFromArray (headers) { // fetch HeadersList
  function matchHeaders (line 27676) | function matchHeaders (mockDispatch, headers) {
  function safeUrl (line 27700) | function safeUrl (path) {
  function matchKey (line 27716) | function matchKey (mockDispatch, { path, method, body, headers }) {
  function getResponseData (line 27724) | function getResponseData (data) {
  function getMockDispatch (line 27734) | function getMockDispatch (mockDispatches, key) {
  function addMockDispatch (line 27765) | function addMockDispatch (mockDispatches, key, data) {
  function deleteMockDispatch (line 27773) | function deleteMockDispatch (mockDispatches, key) {
  function buildKey (line 27785) | function buildKey (opts) {
  function generateKeyValues (line 27796) | function generateKeyValues (data) {
  function getStatusText (line 27808) | function getStatusText (statusCode) {
  function getResponse (line 27812) | async function getResponse (body) {
  function mockDispatch (line 27823) | function mockDispatch (opts, handler) {
  function buildMockDispatch (line 27895) | function buildMockDispatch () {
  function checkNetConnect (line 27925) | function checkNetConnect (netConnect, origin) {
  function buildMockOptions (line 27935) | function buildMockOptions (opts) {
  method constructor (line 27975) | constructor ({ disableColors } = {}) {
  method format (line 27990) | format (pendingInterceptors) {
  method constructor (line 28031) | constructor (singular, plural) {
  method pluralize (line 28036) | pluralize (count) {
  class FixedCircularBuffer (line 28109) | class FixedCircularBuffer {
    method constructor (line 28110) | constructor() {
    method isEmpty (line 28117) | isEmpty() {
    method isFull (line 28121) | isFull() {
    method push (line 28125) | push(data) {
    method shift (line 28130) | shift() {
  method constructor (line 28141) | constructor() {
  method isEmpty (line 28145) | isEmpty() {
  method push (line 28149) | push(data) {
  method shift (line 28158) | shift() {
  class PoolBase (line 28196) | class PoolBase extends DispatcherBase {
    method constructor (line 28197) | constructor () {
    method [kBusy] (line 28249) | get [kBusy] () {
    method [kConnected] (line 28253) | get [kConnected] () {
    method [kFree] (line 28257) | get [kFree] () {
    method [kPending] (line 28261) | get [kPending] () {
    method [kRunning] (line 28269) | get [kRunning] () {
    method [kSize] (line 28277) | get [kSize] () {
    method stats (line 28285) | get stats () {
    method [kClose] (line 28289) | async [kClose] () {
    method [kDestroy] (line 28299) | async [kDestroy] (err) {
    method [kDispatch] (line 28311) | [kDispatch] (opts, handler) {
    method [kAddClient] (line 28326) | [kAddClient] (client) {
    method [kRemoveClient] (line 28346) | [kRemoveClient] (client) {
  class PoolStats (line 28380) | class PoolStats {
    method constructor (line 28381) | constructor (pool) {
    method connected (line 28385) | get connected () {
    method free (line 28389) | get free () {
    method pending (line 28393) | get pending () {
    method queued (line 28397) | get queued () {
    method running (line 28401) | get running () {
    method size (line 28405) | get size () {
  function defaultFactory (line 28440) | function defaultFactory (origin, opts) {
  class Pool (line 28444) | class Pool extends PoolBase {
    method constructor (line 28445) | constructor (origin, {
    method [kGetDispatcher] (line 28496) | [kGetDispatcher] () {
  function defaultProtocolPort (line 28538) | function defaultProtocolPort (protocol) {
  function buildProxyOptions (line 28542) | function buildProxyOptions (opts) {
  function defaultFactory (line 28557) | function defaultFactory (origin, opts) {
  class ProxyAgent (line 28561) | class ProxyAgent extends DispatcherBase {
    method constructor (line 28562) | constructor (opts) {
    method dispatch (line 28645) | dispatch (opts, handler) {
    method [kClose] (line 28661) | async [kClose] () {
    method [kDestroy] (line 28666) | async [kDestroy] () {
  function buildHeaders (line 28676) | function buildHeaders (headers) {
  function throwIfProxyAuthIsSent (line 28701) | function throwIfProxyAuthIsSent (headers) {
  function onTimeout (line 28725) | function onTimeout () {
  function refreshTimeout (line 28758) | function refreshTimeout () {
  class Timeout (line 28770) | class Timeout {
    method constructor (line 28771) | constructor (callback, delay, opaque) {
    method refresh (line 28785) | refresh () {
    method clear (line 28796) | clear () {
  method setTimeout (line 28802) | setTimeout (callback, delay, opaque) {
  method clearTimeout (line 28807) | clearTimeout (timeout) {
  function establishWebSocketConnection (line 28862) | function establishWebSocketConnection (url, protocols, ws, onEstablish, ...
  function onSocketData (line 29034) | function onSocketData (chunk) {
  function onSocketClose (line 29044) | function onSocketClose () {
  function onSocketError (line 29099) | function onSocketError (error) {
  class MessageEvent (line 29190) | class MessageEvent extends Event {
    method constructor (line 29193) | constructor (type, eventInitDict = {}) {
    method data (line 29204) | get data () {
    method origin (line 29210) | get origin () {
    method lastEventId (line 29216) | get lastEventId () {
    method source (line 29222) | get source () {
    method ports (line 29228) | get ports () {
    method initMessageEvent (line 29238) | initMessageEvent (
  class CloseEvent (line 29261) | class CloseEvent extends Event {
    method constructor (line 29264) | constructor (type, eventInitDict = {}) {
    method wasClean (line 29275) | get wasClean () {
    method code (line 29281) | get code () {
    method reason (line 29287) | get reason () {
  class ErrorEvent (line 29295) | class ErrorEvent extends Event {
    method constructor (line 29298) | constructor (type, eventInitDict) {
    method message (line 29309) | get message () {
    method filename (line 29315) | get filename () {
    method lineno (line 29321) | get lineno () {
    method colno (line 29327) | get colno () {
    method error (line 29333) | get error () {
  method defaultValue (line 29426) | get defaultValue () {
  class WebsocketFrameSend (line 29504) | class WebsocketFrameSend {
    method constructor (line 29508) | constructor (data) {
    method createFrame (line 29513) | createFrame (opcode) {
  class ByteParser (line 29591) | class ByteParser extends Writable {
    method constructor (line 29600) | constructor (ws) {
    method _write (line 29610) | _write (chunk, _, callback) {
    method run (line 29622) | run (callback) {
    method consume (line 29829) | consume (n) {
    method parseCloseBody (line 29866) | parseCloseBody (onlyCode, data) {
    method closingInfo (line 29909) | get closingInfo () {
  function isEstablished (line 29956) | function isEstablished (ws) {
  function isClosing (line 29966) | function isClosing (ws) {
  function isClosed (line 29976) | function isClosed (ws) {
  function fireEvent (line 29986) | function fireEvent (e, target, eventConstructor = Event, eventInitDict) {
  function websocketMessageReceived (line 30008) | function websocketMessageReceived (ws, type, data) {
  function isValidSubprotocol (line 30055) | function isValidSubprotocol (protocol) {
  function isValidStatusCode (line 30103) | function isValidStatusCode (code) {
  function failWebsocketConnection (line 30119) | function failWebsocketConnection (ws, reason) {
  class WebSocket (line 30180) | class WebSocket extends EventTarget {
    method constructor (line 30196) | constructor (url, protocols = []) {
    method close (line 30302) | close (code = undefined, reason = undefined) {
    method send (line 30405) | send (data) {
    method readyState (line 30520) | get readyState () {
    method bufferedAmount (line 30527) | get bufferedAmount () {
    method url (line 30533) | get url () {
    method extensions (line 30540) | get extensions () {
    method protocol (line 30546) | get protocol () {
    method onopen (line 30552) | get onopen () {
    method onopen (line 30558) | set onopen (fn) {
    method onerror (line 30573) | get onerror () {
    method onerror (line 30579) | set onerror (fn) {
    method onclose (line 30594) | get onclose () {
    method onclose (line 30600) | set onclose (fn) {
    method onmessage (line 30615) | get onmessage () {
    method onmessage (line 30621) | set onmessage (fn) {
    method binaryType (line 30636) | get binaryType () {
    method binaryType (line 30642) | set binaryType (type) {
    method #onConnectionEstablished (line 30655) | #onConnectionEstablished (response) {
  method defaultValue (line 30752) | get defaultValue () {
  method defaultValue (line 30759) | get defaultValue () {
  function getUserAgent (line 30806) | function getUserAgent() {
  function _interopRequireDefault (line 30906) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function _interopRequireDefault (line 30923) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function md5 (line 30925) | function md5(bytes) {
  function _interopRequireDefault (line 30968) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function parse (line 30970) | function parse(uuid) {
  function _interopRequireDefault (line 31035) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function rng (line 31041) | function rng() {
  function _interopRequireDefault (line 31066) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function sha1 (line 31068) | function sha1(bytes) {
  function _interopRequireDefault (line 31096) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function stringify (line 31108) | function stringify(arr, offset = 0) {
  function _interopRequireDefault (line 31144) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function v1 (line 31158) | function v1(options, buf, offset) {
  function _interopRequireDefault (line 31258) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function _interopRequireDefault (line 31282) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function stringToBytes (line 31284) | function stringToBytes(str) {
  function _default (line 31301) | function _default(name, version, hashfunc) {
  function _interopRequireDefault (line 31366) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function v4 (line 31368) | function v4(options, buf, offset) {
  function _interopRequireDefault (line 31410) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function _interopRequireDefault (line 31431) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function validate (line 31433) | function validate(uuid) {
  function _interopRequireDefault (line 31455) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function version (line 31457) | function version(uuid) {
  function sign (line 31479) | function sign(x) {
  function evenRound (line 31483) | function evenRound(x) {
  function createNumberConversion (line 31492) | function createNumberConversion(bitLength, typeOpts) {
  method constructor (line 31675) | constructor(constructorArgs) {
  method href (line 31697) | get href() {
  method href (line 31701) | set href(v) {
  method origin (line 31710) | get origin() {
  method protocol (line 31714) | get protocol() {
  method protocol (line 31718) | set protocol(v) {
  method username (line 31722) | get username() {
  method username (line 31726) | set username(v) {
  method password (line 31734) | get password() {
  method password (line 31738) | set password(v) {
  method host (line 31746) | get host() {
  method host (line 31760) | set host(v) {
  method hostname (line 31768) | get hostname() {
  method hostname (line 31776) | set hostname(v) {
  method port (line 31784) | get port() {
  method port (line 31792) | set port(v) {
  method pathname (line 31804) | get pathname() {
  method pathname (line 31816) | set pathname(v) {
  method search (line 31825) | get search() {
  method search (line 31833) | set search(v) {
  method hash (line 31848) | get hash() {
  method hash (line 31856) | set hash(v) {
  method toJSON (line 31867) | toJSON() {
  function URL (line 31887) | function URL(url) {
  method get (line 31917) | get() {
  method set (line 31920) | set(V) {
  method get (line 31936) | get() {
  method get (line 31944) | get() {
  method set (line 31947) | set(V) {
  method get (line 31956) | get() {
  method set (line 31959) | set(V) {
  method get (line 31968) | get() {
  method set (line 31971) | set(V) {
  method get (line 31980) | get() {
  method set (line 31983) | set(V) {
  method get (line 31992) | get() {
  method set (line 31995) | set(V) {
  method get (line 32004) | get() {
  method set (line 32007) | set(V) {
  method get (line 32016) | get() {
  method set (line 32019) | set(V) {
  method get (line 32028) | get() {
  method set (line 32031) | set(V) {
  method get (line 32040) | get() {
  method set (line 32043) | set(V) {
  method is (line 32053) | is(obj) {
  method create (line 32056) | create(constructorArgs, privateData) {
  method setup (line 32061) | setup(obj, constructorArgs, privateData) {
  function countSymbols (line 32118) | function countSymbols(str) {
  function at (line 32122) | function at(input, idx) {
  function isASCIIDigit (line 32127) | function isASCIIDigit(c) {
  function isASCIIAlpha (line 32131) | function isASCIIAlpha(c) {
  function isASCIIAlphanumeric (line 32135) | function isASCIIAlphanumeric(c) {
  function isASCIIHex (line 32139) | function isASCIIHex(c) {
  function isSingleDot (line 32143) | function isSingleDot(buffer) {
  function isDoubleDot (line 32147) | function isDoubleDot(buffer) {
  function isWindowsDriveLetterCodePoints (line 32152) | function isWindowsDriveLetterCodePoints(cp1, cp2) {
  function isWindowsDriveLetterString (line 32156) | function isWindowsDriveLetterString(string) {
  function isNormalizedWindowsDriveLetterString (line 32160) | function isNormalizedWindowsDriveLetterString(string) {
  function containsForbiddenHostCodePoint (line 32164) | function containsForbiddenHostCodePoint(string) {
  function containsForbiddenHostCodePointExcludingPercent (line 32168) | function containsForbiddenHostCodePointExcludingPercent(string) {
  function isSpecialScheme (line 32172) | function isSpecialScheme(scheme) {
  function isSpecial (line 32176) | function isSpecial(url) {
  function defaultPort (line 32180) | function defaultPort(scheme) {
  function percentEncode (line 32184) | function percentEncode(c) {
  function utf8PercentEncode (line 32193) | function utf8PercentEncode(c) {
  function utf8PercentDecode (line 32205) | function utf8PercentDecode(str) {
  function isC0ControlPercentEncode (line 32221) | function isC0ControlPercentEncode(c) {
  function isPathPercentEncode (line 32226) | function isPathPercentEncode(c) {
  function isUserinfoPercentEncode (line 32232) | function isUserinfoPercentEncode(c) {
  function percentEncodeChar (line 32236) | function percentEncodeChar(c, encodeSetPredicate) {
  function parseIPv4Number (line 32246) | function parseIPv4Number(input) {
  function parseIPv4 (line 32269) | function parseIPv4(input) {
  function serializeIPv4 (line 32314) | function serializeIPv4(address) {
  function parseIPv6 (line 32329) | function parseIPv6(input) {
  function serializeIPv6 (line 32458) | function serializeIPv6(address) {
  function parseHost (line 32488) | function parseHost(input, isSpecialArg) {
  function parseOpaqueHost (line 32519) | function parseOpaqueHost(input) {
  function findLongestZeroSequence (line 32532) | function findLongestZeroSequence(arr) {
  function serializeHost (line 32567) | function serializeHost(host) {
  function trimControlChars (line 32580) | function trimControlChars(url) {
  function trimTabAndNewline (line 32584) | function trimTabAndNewline(url) {
  function shortenPath (line 32588) | function shortenPath(url) {
  function includesCredentials (line 32600) | function includesCredentials(url) {
  function cannotHaveAUsernamePasswordPort (line 32604) | function cannotHaveAUsernamePasswordPort(url) {
  function isNormalizedWindowsDriveLetter (line 32608) | function isNormalizedWindowsDriveLetter(string) {
  function URLStateMachine (line 32612) | function URLStateMachine(input, base, encodingOverride, url, stateOverri...
  function serializeURL (line 33270) | function serializeURL(url, excludeFragment) {
  function serializeOrigin (line 33311) | function serializeOrigin(tuple) {
  function wrappy (line 33440) | function wrappy (fn, cb) {
  function Dicer (line 33746) | function Dicer (cfg) {
  function HeaderParser (line 33964) | function HeaderParser (cfg) {
  function PartStream (line 34065) | function PartStream (opts) {
  function SBMH (line 34112) | function SBMH (needle) {
  function Busboy (line 34327) | function Busboy (opts) {
  function Multipart (line 34436) | function Multipart (boy, cfg) {
  function skipPart (line 34699) | function skipPart (part) {
  function FileStream (line 34703) | function FileStream (opts) {
  function UrlEncoded (line 34733) | function UrlEncoded (boy, cfg) {
  function Decoder (line 34937) | function Decoder () {
  function getDecoder (line 35015) | function getDecoder (charset) {
  function decodeText (line 35112) | function decodeText (text, sourceEncoding, destEncoding) {
  function encodedReplacer (line 35259) | function encodedReplacer (match) {
  function parseParams (line 35268) | function parseParams (str) {
  function __nccwpck_require__ (line 35366) | function __nccwpck_require__(moduleId) {

FILE: dist/sourcemap-register.js
  function isArrayBuffer (line 1) | function isArrayBuffer(e){return r.call(e).slice(8,-1)==="ArrayBuffer"}
  function fromArrayBuffer (line 1) | function fromArrayBuffer(e,r,t){r>>>=0;var o=e.byteLength-r;if(o<0){thro...
  function fromString (line 1) | function fromString(e,r){if(typeof r!=="string"||r===""){r="utf8"}if(!Bu...
  function bufferFrom (line 1) | function bufferFrom(e,r,t){if(typeof e==="number"){throw new TypeError('...
  function ArraySet (line 1) | function ArraySet(){this._array=[];this._set=i?new Map:Object.create(null)}
  function toVLQSigned (line 1) | function toVLQSigned(e){return e<0?(-e<<1)+1:(e<<1)+0}
  function fromVLQSigned (line 1) | function fromVLQSigned(e){var r=(e&1)===1;var n=e>>1;return r?-n:n}
  function recursiveSearch (line 1) | function recursiveSearch(e,n,t,o,i,a){var u=Math.floor((n-e)/2)+e;var s=...
  function generatedPositionAfter (line 1) | function generatedPositionAfter(e,r){var n=e.generatedLine;var o=r.gener...
  function MappingList (line 1) | function MappingList(){this._array=[];this._sorted=true;this._last={gene...
  function swap (line 1) | function swap(e,r,n){var t=e[r];e[r]=e[n];e[n]=t}
  function randomIntInRange (line 1) | function randomIntInRange(e,r){return Math.round(e+Math.random()*(r-e))}
  function doQuickSort (line 1) | function doQuickSort(e,r,n,t){if(n<t){var o=randomIntInRange(n,t);var i=...
  function SourceMapConsumer (line 1) | function SourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=o.pars...
  function BasicSourceMapConsumer (line 1) | function BasicSourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=o...
  function Mapping (line 1) | function Mapping(){this.generatedLine=0;this.generatedColumn=0;this.sour...
  function IndexedSourceMapConsumer (line 1) | function IndexedSourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n...
  function SourceMapGenerator (line 1) | function SourceMapGenerator(e){if(!e){e={}}this._file=o.getArg(e,"file",...
  function SourceNode (line 1) | function SourceNode(e,r,n,t,o){this.children=[];this.sourceContents={};t...
  function getNextLine (line 1) | function getNextLine(){return u<o.length?o[u++]:undefined}
  function addMappingWithCode (line 1) | function addMappingWithCode(e,r){if(e===null||e.source===undefined){t.ad...
  function getArg (line 1) | function getArg(e,r,n){if(r in e){return e[r]}else if(arguments.length==...
  function urlParse (line 1) | function urlParse(e){var r=e.match(n);if(!r){return null}return{scheme:r...
  function urlGenerate (line 1) | function urlGenerate(e){var r="";if(e.scheme){r+=e.scheme+":"}r+="//";if...
  function normalize (line 1) | function normalize(e){var n=e;var t=urlParse(e);if(t){if(!t.path){return...
  function join (line 1) | function join(e,r){if(e===""){e="."}if(r===""){r="."}var n=urlParse(r);v...
  function relative (line 1) | function relative(e,r){if(e===""){e="."}e=e.replace(/\/$/,"");var n=0;wh...
  function identity (line 1) | function identity(e){return e}
  function toSetString (line 1) | function toSetString(e){if(isProtoString(e)){return"$"+e}return e}
  function fromSetString (line 1) | function fromSetString(e){if(isProtoString(e)){return e.slice(1)}return e}
  function isProtoString (line 1) | function isProtoString(e){if(!e){return false}var r=e.length;if(r<9){ret...
  function compareByOriginalPositions (line 1) | function compareByOriginalPositions(e,r,n){var t=strcmp(e.source,r.sourc...
  function compareByGeneratedPositionsDeflated (line 1) | function compareByGeneratedPositionsDeflated(e,r,n){var t=e.generatedLin...
  function strcmp (line 1) | function strcmp(e,r){if(e===r){return 0}if(e===null){return 1}if(r===nul...
  function compareByGeneratedPositionsInflated (line 1) | function compareByGeneratedPositionsInflated(e,r){var n=e.generatedLine-...
  function parseSourceMapInput (line 1) | function parseSourceMapInput(e){return JSON.parse(e.replace(/^\)]}'[^\n]...
  function computeSourceURL (line 1) | function computeSourceURL(e,r,n){r=r||"";if(e){if(e[e.length-1]!=="/"&&r...
  function dynamicRequire (line 1) | function dynamicRequire(e,r){return e.require(r)}
  function isInBrowser (line 1) | function isInBrowser(){if(c==="browser")return true;if(c==="node")return...
  function hasGlobalProcessEventEmitter (line 1) | function hasGlobalProcessEventEmitter(){return typeof process==="object"...
  function globalProcessVersion (line 1) | function globalProcessVersion(){if(typeof process==="object"&&process!==...
  function globalProcessStderr (line 1) | function globalProcessStderr(){if(typeof process==="object"&&process!==n...
  function globalProcessExit (line 1) | function globalProcessExit(e){if(typeof process==="object"&&process!==nu...
  function handlerExec (line 1) | function handlerExec(e){return function(r){for(var n=0;n<e.length;n++){v...
  function supportRelativeURL (line 1) | function supportRelativeURL(e,r){if(!e)return r;var n=o.dirname(e);var t...
  function retrieveSourceMapURL (line 1) | function retrieveSourceMapURL(e){var r;if(isInBrowser()){try{var n=new X...
  function mapSourcePosition (line 1) | function mapSourcePosition(e){var r=f[e.source];if(!r){var n=v(e.source)...
  function mapEvalOrigin (line 1) | function mapEvalOrigin(e){var r=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/...
  function CallSiteToString (line 1) | function CallSiteToString(){var e;var r="";if(this.isNative()){r="native...
  function cloneCallSite (line 1) | function cloneCallSite(e){var r={};Object.getOwnPropertyNames(Object.get...
  function wrapCallSite (line 1) | function wrapCallSite(e,r){if(r===undefined){r={nextPosition:null,curPos...
  function prepareStackTrace (line 1) | function prepareStackTrace(e,r){if(l){p={};f={}}var n=e.name||"Error";va...
  function getErrorSource (line 1) | function getErrorSource(e){var r=/\n    at [^(]+ \((.*):(\d+):(\d+)\)/.e...
  function printErrorAndExit (line 1) | function printErrorAndExit(e){var r=getErrorSource(e);var n=globalProces...
  function shimEmitUncaughtException (line 1) | function shimEmitUncaughtException(){var e=process.emit;process.emit=fun...
  function __webpack_require__ (line 1) | function __webpack_require__(n){var t=r[n];if(t!==undefined){return t.ex...

FILE: src/comment.ts
  function headerComment (line 3) | function headerComment(header?: string) {
  function findPreviousComment (line 7) | async function findPreviousComment(
  function updateComment (line 21) | async function updateComment(
  function createComment (line 38) | async function createComment(
  function deleteComment (line 55) | async function deleteComment(

FILE: src/commentToPullRequest.ts
  type Octokit (line 5) | type Octokit = InstanceType<typeof GitHub>;
  type Repo (line 6) | type Repo = {
  type CommentConfig (line 11) | interface CommentConfig {
  function comment (line 19) | async function comment({

FILE: src/helpers.ts
  type ExecSurgeCommandOptions (line 3) | interface ExecSurgeCommandOptions {

FILE: src/main.ts
  function main (line 10) | async function main() {
Condensed preview — 19 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,637K chars).
[
  {
    "path": ".github/dependabot.yml",
    "chars": 446,
    "preview": "version: 2\nupdates:\n  # Enable version updates for npm\n  - package-ecosystem: 'npm'\n    # Look for `package.json` and `l"
  },
  {
    "path": ".github/workflows/preview.yml",
    "chars": 1408,
    "preview": "name: 'preview'\non: # rebuild any PRs and main branch changes\n  pull_request:\n    # use default types + closed event typ"
  },
  {
    "path": ".github/workflows/test.yml",
    "chars": 401,
    "preview": "name: 'build-test'\non: # rebuild any PRs and main branch changes\n  pull_request:\n    types: [opened, synchronize, reopen"
  },
  {
    "path": ".gitignore",
    "chars": 1546,
    "preview": "# Dependency directory\nnode_modules\npackage-lock.json\n\n# Rest pulled from https://github.com/github/gitignore/blob/maste"
  },
  {
    "path": ".husky/pre-commit",
    "chars": 57,
    "preview": "#!/bin/sh\n. \"$(dirname \"$0\")/_/husky.sh\"\n\nnpx lint-staged"
  },
  {
    "path": ".npmrc",
    "chars": 18,
    "preview": "engine-strict=true"
  },
  {
    "path": "README.md",
    "chars": 12374,
    "preview": "# Surge PR Preview\n\n[![CI status][github-action-image]][github-action-url]\n\n[github-action-image]: https://github.com/af"
  },
  {
    "path": "action.yml",
    "chars": 904,
    "preview": "name: '🔂 Surge PR Preview'\ndescription: 'Preview website in surge.sh for every pull request'\nauthor: 'afc163'\ninputs:\n  "
  },
  {
    "path": "biome.json",
    "chars": 2807,
    "preview": "{\n  \"files\": {\n    \"ignore\": [\"./dist/**/*\", \"./lib/**/*\", \"node_modules\"]\n  },\n  \"formatter\": {\n    \"enabled\": true,\n  "
  },
  {
    "path": "dist/index.js",
    "chars": 1493387,
    "preview": "require('./sourcemap-register.js');/******/ (() => { // webpackBootstrap\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ 7"
  },
  {
    "path": "dist/sourcemap-register.js",
    "chars": 41034,
    "preview": "(()=>{var e={650:e=>{var r=Object.prototype.toString;var n=typeof Buffer.alloc===\"function\"&&typeof Buffer.allocUnsafe=="
  },
  {
    "path": "jest.config.js",
    "chars": 239,
    "preview": "module.exports = {\n  clearMocks: true,\n  moduleFileExtensions: ['js', 'ts'],\n  testEnvironment: 'node',\n  testMatch: ['*"
  },
  {
    "path": "package.json",
    "chars": 1294,
    "preview": "{\n  \"name\": \"surge-preview\",\n  \"version\": \"1.9.0\",\n  \"private\": true,\n  \"description\": \"Preview website in surge.sh for "
  },
  {
    "path": "src/comment.ts",
    "chars": 1386,
    "preview": "import type { Octokit, Repo } from './commentToPullRequest';\n\nfunction headerComment(header?: string) {\n  return `<!-- S"
  },
  {
    "path": "src/commentToPullRequest.ts",
    "chars": 1234,
    "preview": "import * as core from '@actions/core';\nimport type { GitHub } from '@actions/github/lib/utils';\nimport { createComment, "
  },
  {
    "path": "src/helpers.ts",
    "chars": 821,
    "preview": "import { exec } from '@actions/exec';\n\ninterface ExecSurgeCommandOptions {\n  command: string[];\n}\n\nexport const execSurg"
  },
  {
    "path": "src/main.ts",
    "chars": 7116,
    "preview": "import * as core from '@actions/core';\nimport { exec } from '@actions/exec';\nimport * as github from '@actions/github';\n"
  },
  {
    "path": "tsconfig.json",
    "chars": 943,
    "preview": "{\n  \"compilerOptions\": {\n    \"target\": \"es6\" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES"
  },
  {
    "path": "utils/gen-preview.js",
    "chars": 1538,
    "preview": "const fs = require('fs');\nconst path = require('path');\nconst github = require('@actions/github');\n\nconst writeFile = (f"
  }
]

About this extraction

This page contains the full source code of the afc163/surge-preview GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 19 files (1.5 MB), approximately 484.7k tokens, and a symbol index with 1342 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!