diff --git a/.dockerignore b/.dockerignore index ccc2930..66bcbd1 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1,12 @@ /coverage -/node_modules + +# Dependency directories +node_modules/ +jspm_packages/ + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..98c3dbc --- /dev/null +++ b/.eslintignore @@ -0,0 +1,3 @@ +/dist/** +/coverage/** +/node_modules/** diff --git a/.eslintrc.json b/.eslintrc.json index ba2a82b..97c0c7a 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,11 +1,12 @@ { "env": { "node": true, - "es2021": true, - "jest/globals": true + "es6": true, + "jest": true }, "extends": [ "eslint:recommended", + "plugin:@typescript-eslint/eslint-recommended", "plugin:@typescript-eslint/recommended", "plugin:jest/recommended", "plugin:prettier/recommended" diff --git a/.gitattributes b/.gitattributes index 93763d5..65de486 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,2 @@ -/dist/** linguist-generated=true -/lib/** linguist-generated=true +/dist/** linguist-generated=true -diff +/lib/** linguist-generated=true -diff diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 42a0e53..2e82715 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -3,18 +3,28 @@ updates: - package-ecosystem: "github-actions" directory: "/" schedule: - interval: "daily" - time: "06:00" - timezone: "Europe/Paris" + interval: monthly labels: - "dependencies" + commit-message: + prefix: "ci" + include: "scope" + groups: + actions: + patterns: + - "*" - package-ecosystem: "npm" directory: "/" schedule: - interval: "daily" - time: "06:00" - timezone: "Europe/Paris" + interval: monthly allow: - dependency-type: "production" labels: - "dependencies" + commit-message: + prefix: "chore" + include: "scope" + groups: + npm: + patterns: + - "*" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c1aea28..8316602 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,8 +1,17 @@ name: ci +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions +permissions: + contents: read + on: schedule: - - cron: '0 10 * * *' # everyday at 10am + - cron: '0 10 * * *' + workflow_dispatch: push: branches: - 'master' @@ -10,9 +19,6 @@ on: tags: - 'v*' pull_request: - branches: - - 'master' - - 'releases/v*' jobs: ci: @@ -22,34 +28,30 @@ jobs: matrix: os: - ubuntu-latest - - macOS-latest + - macos-latest - windows-latest version: - latest - - '~> 0.182' + - '~> 2.13' distribution: - goreleaser - goreleaser-pro steps: - - - name: Checkout - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 - - - name: Set up Go - uses: actions/setup-go@v3 + - name: Set up Go + uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: - go-version: 1.18 - - - name: Check + go-version: stable + - name: Check uses: ./ with: version: ${{ matrix.version }} - args: check --debug + args: check --verbose workdir: ./test - - - name: GoReleaser + - name: GoReleaser if: ${{ !(github.event_name == 'pull_request' && matrix.distribution == 'goreleaser-pro') }} uses: ./ env: @@ -57,7 +59,7 @@ jobs: with: distribution: ${{ matrix.distribution }} version: ${{ matrix.version }} - args: release --skip-publish --rm-dist + args: release --skip=publish --clean --snapshot workdir: ./test install-only: @@ -67,34 +69,36 @@ jobs: matrix: version: - latest - - '~> 0.166' + - '~> 2.13' distribution: - goreleaser - goreleaser-pro + cosign: + - true + - false steps: - - - name: Checkout - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 - - - name: Set up Go - uses: actions/setup-go@v3 + - name: Set up Go + uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: go-version: 1.18 - - - name: GoReleaser + - name: Install cosign + if: matrix.cosign + uses: sigstore/cosign-installer@cad07c2e89fa2edd6e2d7bab4c1aa38e53f76003 # v4.1.1 + - name: GoReleaser if: ${{ !(github.event_name == 'pull_request' && matrix.distribution == 'goreleaser-pro') }} uses: ./ with: distribution: ${{ matrix.distribution }} version: ${{ matrix.version }} install-only: true - - - name: Check + - name: Check if: ${{ !(github.event_name == 'pull_request' && matrix.distribution == 'goreleaser-pro') }} run: | - goreleaser check --debug + goreleaser check --verbose signing: runs-on: ${{ matrix.os }} @@ -104,41 +108,36 @@ jobs: matrix: os: - ubuntu-latest - - macOS-latest + - macos-latest - windows-latest steps: - - - name: Checkout - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 - - - name: Set up Go - uses: actions/setup-go@v3 + - name: Set up Go + uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: go-version: 1.18 - - - name: Import GPG key + - name: Import GPG key id: import_gpg - uses: crazy-max/ghaction-import-gpg@v5 + uses: crazy-max/ghaction-import-gpg@2dc316deee8e90f13e1a351ab510b4d5bc0c82cd # v7.0.0 with: gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY_TEST }} passphrase: ${{ secrets.PASSPHRASE_TEST }} - - - name: Check + - name: Check uses: ./ with: version: latest - args: -f .goreleaser-signing.yml check --debug + args: -f .goreleaser-signing.yml check --verbose workdir: ./test env: GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} - - - name: GoReleaser + - name: GoReleaser uses: ./ with: version: latest - args: -f .goreleaser-signing.yml release --skip-publish --rm-dist + args: -f .goreleaser-signing.yml release --skip=publish --clean --snapshot workdir: ./test env: GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} @@ -146,77 +145,81 @@ jobs: upload-artifact: runs-on: ubuntu-latest steps: - - - name: Checkout - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 - - - name: Set up Go - uses: actions/setup-go@v3 + - name: Set up Go + uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: go-version: 1.18 - - - name: Check + - name: Check uses: ./ with: - args: check --debug + args: check --verbose workdir: ./test - - - name: GoReleaser + - name: GoReleaser uses: ./ with: - args: release --skip-publish --rm-dist + args: release --skip=publish --clean --snapshot workdir: ./test - - - name: Upload assets - uses: actions/upload-artifact@v3 + - name: Upload assets + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: myapp path: ./test/dist/* - current-tag: - runs-on: ubuntu-latest - steps: - - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Set up Go - uses: actions/setup-go@v3 - with: - go-version: 1.18 - - - name: GoReleaser - uses: ./ - with: - args: release --skip-publish --rm-dist - workdir: ./test - env: - GORELEASER_CURRENT_TAG: v99.99.99 - dist: runs-on: ubuntu-latest steps: - - - name: Checkout - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 - - - name: Set up Go - uses: actions/setup-go@v3 + - name: Set up Go + uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: go-version: 1.18 - - - name: GoReleaser + - name: GoReleaser uses: ./ with: - args: release --config .goreleaser-dist.yml --skip-publish --rm-dist + args: release --config .goreleaser-dist.yml --skip=publish --clean --snapshot workdir: ./test - - - name: Check dist + - name: Check dist run: | tree -nh ./test/_output + + nightly: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + - windows-latest + distribution: + - goreleaser-pro + - goreleaser + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + with: + go-version: 1.18 + - name: GoReleaser + uses: ./ + with: + install-only: true + distribution: ${{ matrix.distribution }} + version: nightly + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Check + run: | + goreleaser check -f ./test/.goreleaser.yml + goreleaser --version + goreleaser --version | grep nightly diff --git a/.github/workflows/release-major-tag.yml b/.github/workflows/release-major-tag.yml new file mode 100644 index 0000000..457f18b --- /dev/null +++ b/.github/workflows/release-major-tag.yml @@ -0,0 +1,42 @@ +name: release major tag + +run-name: Move ${{ github.event.inputs.major_version }} to ${{ github.event.inputs.target }} + +on: + workflow_dispatch: + inputs: + target: + description: The tag, branch, or SHA the major version should point to (e.g. v7.1.0) + required: true + major_version: + type: choice + description: The major version tag to move + options: + - v7 + - v6 + - v5 + - v4 + - v3 + - v2 + - v1 + +# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions +permissions: + contents: write + +jobs: + tag: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + fetch-depth: 0 + - name: Git config + run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + - name: Move ${{ github.event.inputs.major_version }} to ${{ github.event.inputs.target }} + run: git tag -f ${{ github.event.inputs.major_version }} ${{ github.event.inputs.target }} + - name: Push + run: git push origin ${{ github.event.inputs.major_version }} --force diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 737a351..08f1c68 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,36 +1,42 @@ name: test +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions +permissions: + contents: read + on: push: branches: - 'master' - 'releases/v*' pull_request: - branches: - - 'master' - - 'releases/v*' jobs: test: runs-on: ubuntu-latest steps: - - - name: Checkout - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 - - - name: Validate - uses: docker/bake-action@v2 + - name: Setup Node.js + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: - targets: validate - - - name: Test - uses: docker/bake-action@v2 + node-version-file: '.node-version' + cache: npm + - name: Install cosign + uses: sigstore/cosign-installer@cad07c2e89fa2edd6e2d7bab4c1aa38e53f76003 # v4.1.1 + - name: Install dependencies + run: npm ci + - name: Test + run: npm test + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Upload coverage + uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0 with: - targets: test - - - name: Upload coverage - uses: codecov/codecov-action@v3 - with: - file: ./coverage/clover.xml + files: ./coverage/clover.xml diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml new file mode 100644 index 0000000..3ef7ea5 --- /dev/null +++ b/.github/workflows/validate.yml @@ -0,0 +1,83 @@ +name: validate + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions +permissions: + contents: read + +on: + push: + branches: + - 'master' + - 'releases/v*' + pull_request: + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - name: Setup Node.js + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + with: + node-version-file: '.node-version' + cache: npm + - name: Install dependencies + run: npm ci + - name: Format check + run: npm run format-check + - name: Lint + run: npm run lint + + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - name: Setup Node.js + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.0.0 + with: + node-version-file: '.node-version' + cache: npm + - name: Install dependencies + run: npm ci --ignore-scripts + - name: Rebuild dist + run: npm run build + - name: Compare dist + id: diff + run: | + if [ "$(git diff --ignore-space-at-eol dist | wc -l)" -gt "0" ]; then + echo "Detected uncommitted changes after build. Run 'npm run build' and commit dist/." >&2 + git diff dist + exit 1 + fi + - name: Upload built dist on failure + if: ${{ failure() && steps.diff.conclusion == 'failure' }} + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: dist + path: dist + + vendor: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - name: Setup Node.js + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.0.0 + with: + node-version-file: '.node-version' + cache: npm + - name: Refresh package-lock.json + run: npm install --package-lock-only + - name: Compare package-lock.json + run: | + if [ -n "$(git status --porcelain -- package-lock.json)" ]; then + echo "package-lock.json is out of sync with package.json. Run 'npm install' and commit." >&2 + git diff package-lock.json + exit 1 + fi diff --git a/.gitignore b/.gitignore index 69b201b..7a623c4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,19 +1,11 @@ -/.dev -node_modules/ -lib +# https://raw.githubusercontent.com/github/gitignore/main/Node.gitignore -# Jetbrains -/.idea -/*.iml - -# Rest of the file 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* +.pnpm-debug.log* # Diagnostic reports (https://nodejs.org/api/report.html) report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json @@ -24,34 +16,14 @@ pids *.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 +node_modules/ jspm_packages/ -# TypeScript v1 declaration files -typings/ - # TypeScript cache *.tsbuildinfo @@ -61,36 +33,11 @@ typings/ # Optional eslint cache .eslintcache -# Optional REPL history -.node_repl_history -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file +# dotenv environment variable files .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/ +.env.development.local +.env.test.local +.env.production.local +.env.local +provenance.json diff --git a/.kodiak.toml b/.kodiak.toml deleted file mode 100644 index e538846..0000000 --- a/.kodiak.toml +++ /dev/null @@ -1,15 +0,0 @@ -version = 1 - -[merge] -automerge_label = "automerge" -blacklist_title_regex = "^WIP.*" -method = "squash" -delete_branch_on_merge = true -block_on_reviews_requested = false -notify_on_conflict = true -optimistic_updates = true - -[merge.message] -title = "pull_request_title" -include_pr_number = true -body_type = "markdown" diff --git a/.node-version b/.node-version new file mode 100644 index 0000000..a45fd52 --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +24 diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..5b3b81b --- /dev/null +++ b/.prettierignore @@ -0,0 +1,6 @@ +# Dependency directories +node_modules/ +jspm_packages/ + +# yarn v2 +.yarn/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..bb87824 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,89 @@ +# Contributing + +Thanks for your interest in contributing! + +## Prerequisites + +- [Node.js](https://nodejs.org/) — version pinned in [`.node-version`](./.node-version). + Tools like [`nvm`](https://github.com/nvm-sh/nvm), [`fnm`](https://github.com/Schniz/fnm), + [`asdf`](https://asdf-vm.com/), or [`mise`](https://mise.jdx.dev/) read this file + automatically. +- [`cosign`](https://docs.sigstore.dev/cosign/installation/) — only required if you + want to run the signature-verification integration tests locally. + +## Setup + +```sh +npm ci +``` + +## Pre-commit checklist + +Before committing changes to `src/`, `__tests__/`, `package.json`, +`package-lock.json`, or `action.yml`: + +```sh +npm run pre-checkin +``` + +That runs `format` + `build` + `test` — the same checks CI runs. + +Then commit `dist/` along with your source changes; the action runtime loads +`dist/index.js` directly, so it must stay in sync. + +If CI's `validate / build` job fails because `dist/` differs from a fresh +build, just download the `dist` artifact from the failed run and commit it — +or rerun `npm run build` locally with the Node version in `.node-version`. + +## npm scripts + +| Script | Purpose | +| ------------------- | ------------------------------------------------ | +| `npm run build` | Bundle `src/` to `dist/index.js` via `ncc` | +| `npm run format` | Run Prettier (write) | +| `npm run format-check` | Run Prettier (check only, used in CI) | +| `npm run lint` | Run ESLint (check only, used in CI) | +| `npm run lint:fix` | Run ESLint with `--fix` | +| `npm test` | Run Jest with coverage | +| `npm run pre-checkin` | `format` + `lint:fix` + `build` + `test` | + +## Tests + +`npm test` runs the full Jest suite, including integration tests that: + +- Download real GoReleaser releases from GitHub +- Verify `checksums.txt` against the downloaded archive +- Verify the cosign sigstore bundle (skipped if `cosign` isn't on `PATH`, + but the CI image always has it installed) + +These need outbound network access. Offline / restrictive-proxy runs will +have those tests fail — that's expected. + +## Commit messages + +Use [Conventional Commits](https://www.conventionalcommits.org/) (`feat:`, +`fix:`, `test:`, `docs:`, `chore:`, `ci:`, …). Keep the subject ≤72 chars. + +## Pull requests + +- Target `master`. +- Make sure `npm run pre-checkin` passes. +- One logical change per PR is easier to review. +- The `signing` CI job and `goreleaser-pro` matrix entries are skipped on PRs + from forks because they need repository secrets — that's expected and not + something you need to fix. + +## Releasing (maintainers) + +1. Create a new GitHub Release with a semver tag (e.g. `v7.1.0`) — either + through the UI or `gh release create v7.1.0 --generate-notes`. +2. Once the release exists, run the [**release major tag**](./.github/workflows/release-major-tag.yml) + workflow from the Actions tab: + - `target`: the new tag (e.g. `v7.1.0`) + - `major_version`: the major version to repoint (e.g. `v7`) + + This force-pushes the major tag to the new release so consumers using + `goreleaser/goreleaser-action@v7` pick up the change. + + The same workflow doubles as a rollback tool — pass an older tag as + `target` to revert the major. diff --git a/README.md b/README.md index b9ff8e9..e4a3dce 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@
@@ -16,6 +16,7 @@ ___ * [Usage](#usage) * [Workflow](#workflow) + * [Verification](#verification) * [Run on new tag](#run-on-new-tag) * [Signing](#signing) * [Upload artifacts](#upload-artifacts) @@ -30,6 +31,12 @@ ___ ## Usage +GoReleaser Action runs [goreleaser][], please follow its [docs][gdocs] for +more information about how to customize what GoReleaser does. + +[goreleaser]: https://goreleaser.com/ +[gdocs]: https://goreleaser.com/customization + ### Workflow ```yaml @@ -39,26 +46,30 @@ on: pull_request: push: +permissions: + contents: write + jobs: goreleaser: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v6 with: fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v6 - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v3 + uses: goreleaser/goreleaser-action@v7 with: # either 'goreleaser' (default) or 'goreleaser-pro' distribution: goreleaser - version: latest - args: release --rm-dist + # 'latest', 'nightly', or a semver + version: '~> v2' + args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution @@ -67,6 +78,49 @@ jobs: > **IMPORTANT**: note the `fetch-depth: 0` input in `Checkout` step. It is required for the changelog to work correctly. +### Verification + +The action verifies the integrity of the downloaded GoReleaser archive +against the published `checksums.txt` automatically — no configuration +required. + +If [`cosign`](https://docs.sigstore.dev/cosign/) is available on `PATH`, the +action will additionally verify the cosign sigstore signature of the +checksums file against the GoReleaser release workflow's OIDC identity. If +`cosign` isn't installed, this step is silently skipped. + +> **Note**: cosign signature verification requires GoReleaser **v2.13.0 or +> newer** (and the matching `nightly`). Earlier releases ship a `.sig` +> detached signature signed with cosign v2, which is not compatible with +> the cosign v3 sigstore-bundle format the action verifies. For older +> versions the cosign step is silently skipped — only the `checksums.txt` +> SHA-256 verification runs. + +> **Note**: when `version: nightly` is used, the action resolves the +> latest immutable `vX.Y.Z-1024;if(G){if(t.dump&&H===t.dump.charCodeAt(0)){z+="?"}else{z+="? "}}z+=t.dump;if(G){z+=generateNextLine(t,s)}if(!writeNode(t,s+1,V,true,G)){continue}if(t.dump&&H===t.dump.charCodeAt(0)){z+=":"}else{z+=": "}z+=t.dump;T+=z}t.tag=L;t.dump=T||"{}"}function detectType(t,s,b){var F,T,U,q,H,W;T=b?t.explicitTypes:t.implicitTypes;for(U=0,q=T.length;Utag resolver accepts not "'+W+'" style')}t.dump=F}return true}}return false}function writeNode(t,s,b,F,T,B,U){t.tag=null;t.dump=b;if(!detectType(t,b,false)){detectType(t,b,true)}var q=L.call(t.dump);var H=F;var W;if(F){F=t.flowLevel<0||t.flowLevel>s}var V=q==="[object Object]"||q==="[object Array]",G,z;if(V){G=t.duplicates.indexOf(b);z=G!==-1}if(t.tag!==null&&t.tag!=="?"||z||t.indent!==2&&s>0){T=false}if(z&&t.usedDuplicates[G]){t.dump="*ref_"+G}else{if(V&&z&&!t.usedDuplicates[G]){t.usedDuplicates[G]=true}if(q==="[object Object]"){if(F&&Object.keys(t.dump).length!==0){writeBlockMapping(t,s,t.dump,T);if(z){t.dump="&ref_"+G+t.dump}}else{writeFlowMapping(t,s,t.dump);if(z){t.dump="&ref_"+G+" "+t.dump}}}else if(q==="[object Array]"){if(F&&t.dump.length!==0){if(t.noArrayIndent&&!U&&s>0){writeBlockSequence(t,s-1,t.dump,T)}else{writeBlockSequence(t,s,t.dump,T)}if(z){t.dump="&ref_"+G+t.dump}}else{writeFlowSequence(t,s,t.dump);if(z){t.dump="&ref_"+G+" "+t.dump}}}else if(q==="[object String]"){if(t.tag!=="?"){writeScalar(t,t.dump,s,B,H)}}else if(q==="[object Undefined]"){return false}else{if(t.skipInvalid)return false;throw new R("unacceptable kind of an object to dump "+q)}if(t.tag!==null&&t.tag!=="?"){W=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21");if(t.tag[0]==="!"){W="!"+W}else if(W.slice(0,18)==="tag:yaml.org,2002:"){W="!!"+W.slice(18)}else{W="!<"+W+">"}t.dump=W+" "+t.dump}}return true}function getDuplicateReferences(t,s){var b=[],F=[],R,T;inspectNode(t,b,F);for(R=0,T=F.length;R{"use strict";function formatError(t,s){var b="",F=t.reason||"(unknown reason)";if(!t.mark)return F;if(t.mark.name){b+='in "'+t.mark.name+'" '}b+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")";if(!s&&t.mark.snippet){b+="\n\n"+t.mark.snippet}return F+" "+b}function YAMLException(t,s){Error.call(this);this.name="YAMLException";this.reason=t;this.mark=s;this.message=formatError(this,false);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack||""}}YAMLException.prototype=Object.create(Error.prototype);YAMLException.prototype.constructor=YAMLException;YAMLException.prototype.toString=function toString(t){return this.name+": "+formatError(this,t)};t.exports=YAMLException},1161:(t,s,b)=>{"use strict";var F=b(6829);var R=b(8179);var T=b(6975);var L=b(8759);var B=Object.prototype.hasOwnProperty;var U=1;var q=2;var H=3;var W=4;var V=1;var G=2;var z=3;var Y=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var X=/[\x85\u2028\u2029]/;var K=/[,\[\]\{\}]/;var J=/^(?:!|!!|![a-z\-]+!)$/i;var Z=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _class(t){return Object.prototype.toString.call(t)}function is_EOL(t){return t===10||t===13}function is_WHITE_SPACE(t){return t===9||t===32}function is_WS_OR_EOL(t){return t===9||t===32||t===10||t===13}function is_FLOW_INDICATOR(t){return t===44||t===91||t===93||t===123||t===125}function fromHexCode(t){var s;if(48<=t&&t<=57){return t-48}s=t|32;if(97<=s&&s<=102){return s-97+10}return-1}function escapedHexLen(t){if(t===120){return 2}if(t===117){return 4}if(t===85){return 8}return 0}function fromDecimalCode(t){if(48<=t&&t<=57){return t-48}return-1}function simpleEscapeSequence(t){return t===48?"\0":t===97?"":t===98?"\b":t===116?"\t":t===9?"\t":t===110?"\n":t===118?"\v":t===102?"\f":t===114?"\r":t===101?"":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?" ":t===95?" ":t===76?"\u2028":t===80?"\u2029":""}function charFromCodepoint(t){if(t<=65535){return String.fromCharCode(t)}return String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var Q=new Array(256);var ee=new Array(256);for(var te=0;te<256;te++){Q[te]=simpleEscapeSequence(te)?1:0;ee[te]=simpleEscapeSequence(te)}function State(t,s){this.input=t;this.filename=s["filename"]||null;this.schema=s["schema"]||L;this.onWarning=s["onWarning"]||null;this.legacy=s["legacy"]||false;this.json=s["json"]||false;this.listener=s["listener"]||null;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=t.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.firstTabInLine=-1;this.documents=[]}function generateError(t,s){var b={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};b.snippet=T(b);return new R(s,b)}function throwError(t,s){throw generateError(t,s)}function throwWarning(t,s){if(t.onWarning){t.onWarning.call(null,generateError(t,s))}}var ne={YAML:function handleYamlDirective(t,s,b){var F,R,T;if(t.version!==null){throwError(t,"duplication of %YAML directive")}if(b.length!==1){throwError(t,"YAML directive accepts exactly one argument")}F=/^([0-9]+)\.([0-9]+)$/.exec(b[0]);if(F===null){throwError(t,"ill-formed argument of the YAML directive")}R=parseInt(F[1],10);T=parseInt(F[2],10);if(R!==1){throwError(t,"unacceptable YAML version of the document")}t.version=b[0];t.checkLineBreaks=T<2;if(T!==1&&T!==2){throwWarning(t,"unsupported YAML version of the document")}},TAG:function handleTagDirective(t,s,b){var F,R;if(b.length!==2){throwError(t,"TAG directive accepts exactly two arguments")}F=b[0];R=b[1];if(!J.test(F)){throwError(t,"ill-formed tag handle (first argument) of the TAG directive")}if(B.call(t.tagMap,F)){throwError(t,'there is a previously declared suffix for "'+F+'" tag handle')}if(!Z.test(R)){throwError(t,"ill-formed tag prefix (second argument) of the TAG directive")}try{R=decodeURIComponent(R)}catch(s){throwError(t,"tag prefix is malformed: "+R)}t.tagMap[F]=R}};function captureSegment(t,s,b,F){var R,T,L,B;if(s1){t.result+=F.repeat("\n",s-1)}}function readPlainScalar(t,s,b){var F,R,T,L,B,U,q,H,W=t.kind,V=t.result,G;G=t.input.charCodeAt(t.position);if(is_WS_OR_EOL(G)||is_FLOW_INDICATOR(G)||G===35||G===38||G===42||G===33||G===124||G===62||G===39||G===34||G===37||G===64||G===96){return false}if(G===63||G===45){R=t.input.charCodeAt(t.position+1);if(is_WS_OR_EOL(R)||b&&is_FLOW_INDICATOR(R)){return false}}t.kind="scalar";t.result="";T=L=t.position;B=false;while(G!==0){if(G===58){R=t.input.charCodeAt(t.position+1);if(is_WS_OR_EOL(R)||b&&is_FLOW_INDICATOR(R)){break}}else if(G===35){F=t.input.charCodeAt(t.position-1);if(is_WS_OR_EOL(F)){break}}else if(t.position===t.lineStart&&testDocumentSeparator(t)||b&&is_FLOW_INDICATOR(G)){break}else if(is_EOL(G)){U=t.line;q=t.lineStart;H=t.lineIndent;skipSeparationSpace(t,false,-1);if(t.lineIndent>=s){B=true;G=t.input.charCodeAt(t.position);continue}else{t.position=L;t.line=U;t.lineStart=q;t.lineIndent=H;break}}if(B){captureSegment(t,T,L,false);writeFoldedLines(t,t.line-U);T=L=t.position;B=false}if(!is_WHITE_SPACE(G)){L=t.position+1}G=t.input.charCodeAt(++t.position)}captureSegment(t,T,L,false);if(t.result){return true}t.kind=W;t.result=V;return false}function readSingleQuotedScalar(t,s){var b,F,R;b=t.input.charCodeAt(t.position);if(b!==39){return false}t.kind="scalar";t.result="";t.position++;F=R=t.position;while((b=t.input.charCodeAt(t.position))!==0){if(b===39){captureSegment(t,F,t.position,true);b=t.input.charCodeAt(++t.position);if(b===39){F=t.position;t.position++;R=t.position}else{return true}}else if(is_EOL(b)){captureSegment(t,F,R,true);writeFoldedLines(t,skipSeparationSpace(t,false,s));F=R=t.position}else if(t.position===t.lineStart&&testDocumentSeparator(t)){throwError(t,"unexpected end of the document within a single quoted scalar")}else{t.position++;R=t.position}}throwError(t,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(t,s){var b,F,R,T,L,B;B=t.input.charCodeAt(t.position);if(B!==34){return false}t.kind="scalar";t.result="";t.position++;b=F=t.position;while((B=t.input.charCodeAt(t.position))!==0){if(B===34){captureSegment(t,b,t.position,true);t.position++;return true}else if(B===92){captureSegment(t,b,t.position,true);B=t.input.charCodeAt(++t.position);if(is_EOL(B)){skipSeparationSpace(t,false,s)}else if(B<256&&Q[B]){t.result+=ee[B];t.position++}else if((L=escapedHexLen(B))>0){R=L;T=0;for(;R>0;R--){B=t.input.charCodeAt(++t.position);if((L=fromHexCode(B))>=0){T=(T<<4)+L}else{throwError(t,"expected hexadecimal character")}}t.result+=charFromCodepoint(T);t.position++}else{throwError(t,"unknown escape sequence")}b=F=t.position}else if(is_EOL(B)){captureSegment(t,b,F,true);writeFoldedLines(t,skipSeparationSpace(t,false,s));b=F=t.position}else if(t.position===t.lineStart&&testDocumentSeparator(t)){throwError(t,"unexpected end of the document within a double quoted scalar")}else{t.position++;F=t.position}}throwError(t,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(t,s){var b=true,F,R,T,L=t.tag,B,q=t.anchor,H,W,V,G,z,Y=Object.create(null),X,K,J,Z;Z=t.input.charCodeAt(t.position);if(Z===91){W=93;z=false;B=[]}else if(Z===123){W=125;z=true;B={}}else{return false}if(t.anchor!==null){t.anchorMap[t.anchor]=B}Z=t.input.charCodeAt(++t.position);while(Z!==0){skipSeparationSpace(t,true,s);Z=t.input.charCodeAt(t.position);if(Z===W){t.position++;t.tag=L;t.anchor=q;t.kind=z?"mapping":"sequence";t.result=B;return true}else if(!b){throwError(t,"missed comma between flow collection entries")}else if(Z===44){throwError(t,"expected the node content, but found ','")}K=X=J=null;V=G=false;if(Z===63){H=t.input.charCodeAt(t.position+1);if(is_WS_OR_EOL(H)){V=G=true;t.position++;skipSeparationSpace(t,true,s)}}F=t.line;R=t.lineStart;T=t.position;composeNode(t,s,U,false,true);K=t.tag;X=t.result;skipSeparationSpace(t,true,s);Z=t.input.charCodeAt(t.position);if((G||t.line===F)&&Z===58){V=true;Z=t.input.charCodeAt(++t.position);skipSeparationSpace(t,true,s);composeNode(t,s,U,false,true);J=t.result}if(z){storeMappingPair(t,B,Y,K,X,J,F,R,T)}else if(V){B.push(storeMappingPair(t,null,Y,K,X,J,F,R,T))}else{B.push(X)}skipSeparationSpace(t,true,s);Z=t.input.charCodeAt(t.position);if(Z===44){b=true;Z=t.input.charCodeAt(++t.position)}else{b=false}}throwError(t,"unexpected end of the stream within a flow collection")}function readBlockScalar(t,s){var b,R,T=V,L=false,B=false,U=s,q=0,H=false,W,Y;Y=t.input.charCodeAt(t.position);if(Y===124){R=false}else if(Y===62){R=true}else{return false}t.kind="scalar";t.result="";while(Y!==0){Y=t.input.charCodeAt(++t.position);if(Y===43||Y===45){if(V===T){T=Y===43?z:G}else{throwError(t,"repeat of a chomping mode identifier")}}else if((W=fromDecimalCode(Y))>=0){if(W===0){throwError(t,"bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!B){U=s+W-1;B=true}else{throwError(t,"repeat of an indentation width identifier")}}else{break}}if(is_WHITE_SPACE(Y)){do{Y=t.input.charCodeAt(++t.position)}while(is_WHITE_SPACE(Y));if(Y===35){do{Y=t.input.charCodeAt(++t.position)}while(!is_EOL(Y)&&Y!==0)}}while(Y!==0){readLineBreak(t);t.lineIndent=0;Y=t.input.charCodeAt(t.position);while((!B||t.lineIndentU){U=t.lineIndent}if(is_EOL(Y)){q++;continue}if(t.lineIndents)&&U!==0){throwError(t,"bad indentation of a sequence entry")}else if(t.lineIndent s){if(J){L=t.line;B=t.lineStart;U=t.position}if(composeNode(t,s,W,true,R)){if(J){X=t.result}else{K=t.result}}if(!J){storeMappingPair(t,G,z,Y,X,K,L,B,U);Y=X=K=null}skipSeparationSpace(t,true,-1);Q=t.input.charCodeAt(t.position)}if((t.line===T||t.lineIndent>s)&&Q!==0){throwError(t,"bad indentation of a mapping entry")}else if(t.lineIndents){G=1}else if(t.lineIndent===s){G=0}else if(t.lineIndents){G=1}else if(t.lineIndent===s){G=0}else if(t.lineIndenttag; it should be "scalar", not "'+t.kind+'"')}for(X=0,K=t.implicitTypes.length;X")}if(t.result!==null&&Z.kind!==t.kind){throwError(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+Z.kind+'", not "'+t.kind+'"')}if(!Z.resolve(t.result,t.tag)){throwError(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}else{t.result=Z.construct(t.result,t.tag);if(t.anchor!==null){t.anchorMap[t.anchor]=t.result}}}if(t.listener!==null){t.listener("close",t)}return t.tag!==null||t.anchor!==null||Y}function readDocument(t){var s=t.position,b,F,R,T=false,L;t.version=null;t.checkLineBreaks=t.legacy;t.tagMap=Object.create(null);t.anchorMap=Object.create(null);while((L=t.input.charCodeAt(t.position))!==0){skipSeparationSpace(t,true,-1);L=t.input.charCodeAt(t.position);if(t.lineIndent>0||L!==37){break}T=true;L=t.input.charCodeAt(++t.position);b=t.position;while(L!==0&&!is_WS_OR_EOL(L)){L=t.input.charCodeAt(++t.position)}F=t.input.slice(b,t.position);R=[];if(F.length<1){throwError(t,"directive name must not be less than one character in length")}while(L!==0){while(is_WHITE_SPACE(L)){L=t.input.charCodeAt(++t.position)}if(L===35){do{L=t.input.charCodeAt(++t.position)}while(L!==0&&!is_EOL(L));break}if(is_EOL(L))break;b=t.position;while(L!==0&&!is_WS_OR_EOL(L)){L=t.input.charCodeAt(++t.position)}R.push(t.input.slice(b,t.position))}if(L!==0)readLineBreak(t);if(B.call(ne,F)){ne[F](t,F,R)}else{throwWarning(t,'unknown document directive "'+F+'"')}}skipSeparationSpace(t,true,-1);if(t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45){t.position+=3;skipSeparationSpace(t,true,-1)}else if(T){throwError(t,"directives end mark is expected")}composeNode(t,t.lineIndent-1,W,false,true);skipSeparationSpace(t,true,-1);if(t.checkLineBreaks&&X.test(t.input.slice(s,t.position))){throwWarning(t,"non-ASCII line breaks are interpreted as content")}t.documents.push(t.result);if(t.position===t.lineStart&&testDocumentSeparator(t)){if(t.input.charCodeAt(t.position)===46){t.position+=3;skipSeparationSpace(t,true,-1)}return}if(t.position {"use strict";var F=b(8179);var R=b(6073);function compileList(t,s){var b=[];t[s].forEach((function(t){var s=b.length;b.forEach((function(b,F){if(b.tag===t.tag&&b.kind===t.kind&&b.multi===t.multi){s=F}}));b[s]=t}));return b}function compileMap(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},s,b;function collectType(s){if(s.multi){t.multi[s.kind].push(s);t.multi["fallback"].push(s)}else{t[s.kind][s.tag]=t["fallback"][s.tag]=s}}for(s=0,b=arguments.length;s{"use strict";t.exports=b(1035)},8759:(t,s,b)=>{"use strict";t.exports=b(2011).extend({implicit:[b(9212),b(6104)],explicit:[b(7900),b(9046),b(6860),b(9548)]})},8562:(t,s,b)=>{"use strict";var F=b(1082);t.exports=new F({explicit:[b(3619),b(7283),b(6150)]})},1035:(t,s,b)=>{"use strict";t.exports=b(8562).extend({implicit:[b(721),b(4993),b(1615),b(2705)]})},6975:(t,s,b)=>{"use strict";var F=b(6829);function getLine(t,s,b,F,R){var T="";var L="";var B=Math.floor(R/2)-1;if(F-s>B){T=" ... ";s=F-B+T.length}if(b-F>B){L=" ...";b=F+B-L.length}return{str:T+t.slice(s,b).replace(/\t/g,"→")+L,pos:F-s+T.length}}function padStart(t,s){return F.repeat(" ",s-t.length)+t}function makeSnippet(t,s){s=Object.create(s||null);if(!t.buffer)return null;if(!s.maxLength)s.maxLength=79;if(typeof s.indent!=="number")s.indent=1;if(typeof s.linesBefore!=="number")s.linesBefore=3;if(typeof s.linesAfter!=="number")s.linesAfter=2;var b=/\r?\n|\r|\0/g;var R=[0];var T=[];var L;var B=-1;while(L=b.exec(t.buffer)){T.push(L.index);R.push(L.index+L[0].length);if(t.position<=L.index&&B<0){B=R.length-2}}if(B<0)B=R.length-1;var U="",q,H;var W=Math.min(t.line+s.linesAfter,T.length).toString().length;var V=s.maxLength-(s.indent+W+3);for(q=1;q<=s.linesBefore;q++){if(B-q<0)break;H=getLine(t.buffer,R[B-q],T[B-q],t.position-(R[B]-R[B-q]),V);U=F.repeat(" ",s.indent)+padStart((t.line-q+1).toString(),W)+" | "+H.str+"\n"+U}H=getLine(t.buffer,R[B],T[B],t.position,V);U+=F.repeat(" ",s.indent)+padStart((t.line+1).toString(),W)+" | "+H.str+"\n";U+=F.repeat("-",s.indent+W+3+H.pos)+"^"+"\n";for(q=1;q<=s.linesAfter;q++){if(B+q>=T.length)break;H=getLine(t.buffer,R[B+q],T[B+q],t.position-(R[B]-R[B+q]),V);U+=F.repeat(" ",s.indent)+padStart((t.line+q+1).toString(),W)+" | "+H.str+"\n"}return U.replace(/\n$/,"")}t.exports=makeSnippet},6073:(t,s,b)=>{"use strict";var F=b(8179);var R=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"];var T=["scalar","sequence","mapping"];function compileStyleAliases(t){var s={};if(t!==null){Object.keys(t).forEach((function(b){t[b].forEach((function(t){s[String(t)]=b}))}))}return s}function Type(t,s){s=s||{};Object.keys(s).forEach((function(s){if(R.indexOf(s)===-1){throw new F('Unknown option "'+s+'" is met in definition of "'+t+'" YAML type.')}}));this.options=s;this.tag=t;this.kind=s["kind"]||null;this.resolve=s["resolve"]||function(){return true};this.construct=s["construct"]||function(t){return t};this.instanceOf=s["instanceOf"]||null;this.predicate=s["predicate"]||null;this.represent=s["represent"]||null;this.representName=s["representName"]||null;this.defaultStyle=s["defaultStyle"]||null;this.multi=s["multi"]||false;this.styleAliases=compileStyleAliases(s["styleAliases"]||null);if(T.indexOf(this.kind)===-1){throw new F('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}}t.exports=Type},7900:(t,s,b)=>{"use strict";var F=b(6073);var R="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function resolveYamlBinary(t){if(t===null)return false;var s,b,F=0,T=t.length,L=R;for(b=0;b 64)continue;if(s<0)return false;F+=6}return F%8===0}function constructYamlBinary(t){var s,b,F=t.replace(/[\r\n=]/g,""),T=F.length,L=R,B=0,U=[];for(s=0;s >16&255);U.push(B>>8&255);U.push(B&255)}B=B<<6|L.indexOf(F.charAt(s))}b=T%4*6;if(b===0){U.push(B>>16&255);U.push(B>>8&255);U.push(B&255)}else if(b===18){U.push(B>>10&255);U.push(B>>2&255)}else if(b===12){U.push(B>>4&255)}return new Uint8Array(U)}function representYamlBinary(t){var s="",b=0,F,T,L=t.length,B=R;for(F=0;F >18&63];s+=B[b>>12&63];s+=B[b>>6&63];s+=B[b&63]}b=(b<<8)+t[F]}T=L%3;if(T===0){s+=B[b>>18&63];s+=B[b>>12&63];s+=B[b>>6&63];s+=B[b&63]}else if(T===2){s+=B[b>>10&63];s+=B[b>>4&63];s+=B[b<<2&63];s+=B[64]}else if(T===1){s+=B[b>>2&63];s+=B[b<<4&63];s+=B[64];s+=B[64]}return s}function isBinary(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}t.exports=new F("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary})},4993:(t,s,b)=>{"use strict";var F=b(6073);function resolveYamlBoolean(t){if(t===null)return false;var s=t.length;return s===4&&(t==="true"||t==="True"||t==="TRUE")||s===5&&(t==="false"||t==="False"||t==="FALSE")}function constructYamlBoolean(t){return t==="true"||t==="True"||t==="TRUE"}function isBoolean(t){return Object.prototype.toString.call(t)==="[object Boolean]"}t.exports=new F("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"})},2705:(t,s,b)=>{"use strict";var F=b(6829);var R=b(6073);var T=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?"+"|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?"+"|[-+]?\\.(?:inf|Inf|INF)"+"|\\.(?:nan|NaN|NAN))$");function resolveYamlFloat(t){if(t===null)return false;if(!T.test(t)||t[t.length-1]==="_"){return false}return true}function constructYamlFloat(t){var s,b;s=t.replace(/_/g,"").toLowerCase();b=s[0]==="-"?-1:1;if("+-".indexOf(s[0])>=0){s=s.slice(1)}if(s===".inf"){return b===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(s===".nan"){return NaN}return b*parseFloat(s,10)}var L=/^[-+]?[0-9]+e/;function representYamlFloat(t,s){var b;if(isNaN(t)){switch(s){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===t){switch(s){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===t){switch(s){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(F.isNegativeZero(t)){return"-0.0"}b=t.toString(10);return L.test(b)?b.replace("e",".e"):b}function isFloat(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||F.isNegativeZero(t))}t.exports=new R("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"})},1615:(t,s,b)=>{"use strict";var F=b(6829);var R=b(6073);function isHexCode(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function isOctCode(t){return 48<=t&&t<=55}function isDecCode(t){return 48<=t&&t<=57}function resolveYamlInteger(t){if(t===null)return false;var s=t.length,b=0,F=false,R;if(!s)return false;R=t[b];if(R==="-"||R==="+"){R=t[++b]}if(R==="0"){if(b+1===s)return true;R=t[++b];if(R==="b"){b++;for(;b =0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},6150:(t,s,b)=>{"use strict";var F=b(6073);t.exports=new F("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}})},6104:(t,s,b)=>{"use strict";var F=b(6073);function resolveYamlMerge(t){return t==="<<"||t===null}t.exports=new F("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge})},721:(t,s,b)=>{"use strict";var F=b(6073);function resolveYamlNull(t){if(t===null)return true;var s=t.length;return s===1&&t==="~"||s===4&&(t==="null"||t==="Null"||t==="NULL")}function constructYamlNull(){return null}function isNull(t){return t===null}t.exports=new F("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})},9046:(t,s,b)=>{"use strict";var F=b(6073);var R=Object.prototype.hasOwnProperty;var T=Object.prototype.toString;function resolveYamlOmap(t){if(t===null)return true;var s=[],b,F,L,B,U,q=t;for(b=0,F=q.length;b{"use strict";var F=b(6073);var R=Object.prototype.toString;function resolveYamlPairs(t){if(t===null)return true;var s,b,F,T,L,B=t;L=new Array(B.length);for(s=0,b=B.length;s{"use strict";var F=b(6073);t.exports=new F("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}})},9548:(t,s,b)=>{"use strict";var F=b(6073);var R=Object.prototype.hasOwnProperty;function resolveYamlSet(t){if(t===null)return true;var s,b=t;for(s in b){if(R.call(b,s)){if(b[s]!==null)return false}}return true}function constructYamlSet(t){return t!==null?t:{}}t.exports=new F("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet})},3619:(t,s,b)=>{"use strict";var F=b(6073);t.exports=new F("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}})},9212:(t,s,b)=>{"use strict";var F=b(6073);var R=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9])"+"-([0-9][0-9])$");var T=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9]?)"+"-([0-9][0-9]?)"+"(?:[Tt]|[ \\t]+)"+"([0-9][0-9]?)"+":([0-9][0-9])"+":([0-9][0-9])"+"(?:\\.([0-9]*))?"+"(?:[ \\t]*(Z|([-+])([0-9][0-9]?)"+"(?::([0-9][0-9]))?))?$");function resolveYamlTimestamp(t){if(t===null)return false;if(R.exec(t)!==null)return true;if(T.exec(t)!==null)return true;return false}function constructYamlTimestamp(t){var s,b,F,L,B,U,q,H=0,W=null,V,G,z;s=R.exec(t);if(s===null)s=T.exec(t);if(s===null)throw new Error("Date resolve error");b=+s[1];F=+s[2]-1;L=+s[3];if(!s[4]){return new Date(Date.UTC(b,F,L))}B=+s[4];U=+s[5];q=+s[6];if(s[7]){H=s[7].slice(0,3);while(H.length<3){H+="0"}H=+H}if(s[9]){V=+s[10];G=+(s[11]||0);W=(V*60+G)*6e4;if(s[9]==="-")W=-W}z=new Date(Date.UTC(b,F,L,B,U,q,H));if(W)z.setTime(z.getTime()-W);return z}function representYamlTimestamp(t){return t.toISOString()}t.exports=new F("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp})},9200:(t,s,b)=>{"use strict";var F=b(7147),R=b(1017).join,T=b(1017).resolve,L=b(1017).dirname,B={extensions:["js","json","coffee"],recurse:true,rename:function(t){return t},visit:function(t){return t}};function checkFileInclusion(t,s,b){return new RegExp("\\.("+b.extensions.join("|")+")$","i").test(s)&&!(b.include&&b.include instanceof RegExp&&!b.include.test(t))&&!(b.include&&typeof b.include==="function"&&!b.include(t,s))&&!(b.exclude&&b.exclude instanceof RegExp&&b.exclude.test(t))&&!(b.exclude&&typeof b.exclude==="function"&&b.exclude(t,s))}function requireDirectory(t,s,b){var U={};if(s&&!b&&typeof s!=="string"){b=s;s=null}b=b||{};for(var q in B){if(typeof b[q]==="undefined"){b[q]=B[q]}}s=!s?L(t.filename):T(L(t.filename),s);F.readdirSync(s).forEach((function(T){var L=R(s,T),B,q,H;if(F.statSync(L).isDirectory()&&b.recurse){B=requireDirectory(t,L,b);if(Object.keys(B).length){U[b.rename(T,L,T)]=B}}else{if(L!==t.filename&&checkFileInclusion(L,T,b)){q=T.substring(0,T.lastIndexOf("."));H=t.require(L);U[b.rename(q,L,T)]=b.visit(H,L,T)||H}}}));return U}t.exports=requireDirectory;t.exports.defaults=B},5911:(t,s)=>{s=t.exports=SemVer;var b;if(typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)){b=function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("SEMVER");console.log.apply(console,t)}}else{b=function(){}}s.SEMVER_SPEC_VERSION="2.0.0";var F=256;var R=Number.MAX_SAFE_INTEGER||9007199254740991;var T=16;var L=s.re=[];var B=s.src=[];var U=s.tokens={};var q=0;function tok(t){U[t]=q++}tok("NUMERICIDENTIFIER");B[U.NUMERICIDENTIFIER]="0|[1-9]\\d*";tok("NUMERICIDENTIFIERLOOSE");B[U.NUMERICIDENTIFIERLOOSE]="[0-9]+";tok("NONNUMERICIDENTIFIER");B[U.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";tok("MAINVERSION");B[U.MAINVERSION]="("+B[U.NUMERICIDENTIFIER]+")\\."+"("+B[U.NUMERICIDENTIFIER]+")\\."+"("+B[U.NUMERICIDENTIFIER]+")";tok("MAINVERSIONLOOSE");B[U.MAINVERSIONLOOSE]="("+B[U.NUMERICIDENTIFIERLOOSE]+")\\."+"("+B[U.NUMERICIDENTIFIERLOOSE]+")\\."+"("+B[U.NUMERICIDENTIFIERLOOSE]+")";tok("PRERELEASEIDENTIFIER");B[U.PRERELEASEIDENTIFIER]="(?:"+B[U.NUMERICIDENTIFIER]+"|"+B[U.NONNUMERICIDENTIFIER]+")";tok("PRERELEASEIDENTIFIERLOOSE");B[U.PRERELEASEIDENTIFIERLOOSE]="(?:"+B[U.NUMERICIDENTIFIERLOOSE]+"|"+B[U.NONNUMERICIDENTIFIER]+")";tok("PRERELEASE");B[U.PRERELEASE]="(?:-("+B[U.PRERELEASEIDENTIFIER]+"(?:\\."+B[U.PRERELEASEIDENTIFIER]+")*))";tok("PRERELEASELOOSE");B[U.PRERELEASELOOSE]="(?:-?("+B[U.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+B[U.PRERELEASEIDENTIFIERLOOSE]+")*))";tok("BUILDIDENTIFIER");B[U.BUILDIDENTIFIER]="[0-9A-Za-z-]+";tok("BUILD");B[U.BUILD]="(?:\\+("+B[U.BUILDIDENTIFIER]+"(?:\\."+B[U.BUILDIDENTIFIER]+")*))";tok("FULL");tok("FULLPLAIN");B[U.FULLPLAIN]="v?"+B[U.MAINVERSION]+B[U.PRERELEASE]+"?"+B[U.BUILD]+"?";B[U.FULL]="^"+B[U.FULLPLAIN]+"$";tok("LOOSEPLAIN");B[U.LOOSEPLAIN]="[v=\\s]*"+B[U.MAINVERSIONLOOSE]+B[U.PRERELEASELOOSE]+"?"+B[U.BUILD]+"?";tok("LOOSE");B[U.LOOSE]="^"+B[U.LOOSEPLAIN]+"$";tok("GTLT");B[U.GTLT]="((?:<|>)?=?)";tok("XRANGEIDENTIFIERLOOSE");B[U.XRANGEIDENTIFIERLOOSE]=B[U.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";tok("XRANGEIDENTIFIER");B[U.XRANGEIDENTIFIER]=B[U.NUMERICIDENTIFIER]+"|x|X|\\*";tok("XRANGEPLAIN");B[U.XRANGEPLAIN]="[v=\\s]*("+B[U.XRANGEIDENTIFIER]+")"+"(?:\\.("+B[U.XRANGEIDENTIFIER]+")"+"(?:\\.("+B[U.XRANGEIDENTIFIER]+")"+"(?:"+B[U.PRERELEASE]+")?"+B[U.BUILD]+"?"+")?)?";tok("XRANGEPLAINLOOSE");B[U.XRANGEPLAINLOOSE]="[v=\\s]*("+B[U.XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+B[U.XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+B[U.XRANGEIDENTIFIERLOOSE]+")"+"(?:"+B[U.PRERELEASELOOSE]+")?"+B[U.BUILD]+"?"+")?)?";tok("XRANGE");B[U.XRANGE]="^"+B[U.GTLT]+"\\s*"+B[U.XRANGEPLAIN]+"$";tok("XRANGELOOSE");B[U.XRANGELOOSE]="^"+B[U.GTLT]+"\\s*"+B[U.XRANGEPLAINLOOSE]+"$";tok("COERCE");B[U.COERCE]="(^|[^\\d])"+"(\\d{1,"+T+"})"+"(?:\\.(\\d{1,"+T+"}))?"+"(?:\\.(\\d{1,"+T+"}))?"+"(?:$|[^\\d])";tok("COERCERTL");L[U.COERCERTL]=new RegExp(B[U.COERCE],"g");tok("LONETILDE");B[U.LONETILDE]="(?:~>?)";tok("TILDETRIM");B[U.TILDETRIM]="(\\s*)"+B[U.LONETILDE]+"\\s+";L[U.TILDETRIM]=new RegExp(B[U.TILDETRIM],"g");var H="$1~";tok("TILDE");B[U.TILDE]="^"+B[U.LONETILDE]+B[U.XRANGEPLAIN]+"$";tok("TILDELOOSE");B[U.TILDELOOSE]="^"+B[U.LONETILDE]+B[U.XRANGEPLAINLOOSE]+"$";tok("LONECARET");B[U.LONECARET]="(?:\\^)";tok("CARETTRIM");B[U.CARETTRIM]="(\\s*)"+B[U.LONECARET]+"\\s+";L[U.CARETTRIM]=new RegExp(B[U.CARETTRIM],"g");var W="$1^";tok("CARET");B[U.CARET]="^"+B[U.LONECARET]+B[U.XRANGEPLAIN]+"$";tok("CARETLOOSE");B[U.CARETLOOSE]="^"+B[U.LONECARET]+B[U.XRANGEPLAINLOOSE]+"$";tok("COMPARATORLOOSE");B[U.COMPARATORLOOSE]="^"+B[U.GTLT]+"\\s*("+B[U.LOOSEPLAIN]+")$|^$";tok("COMPARATOR");B[U.COMPARATOR]="^"+B[U.GTLT]+"\\s*("+B[U.FULLPLAIN]+")$|^$";tok("COMPARATORTRIM");B[U.COMPARATORTRIM]="(\\s*)"+B[U.GTLT]+"\\s*("+B[U.LOOSEPLAIN]+"|"+B[U.XRANGEPLAIN]+")";L[U.COMPARATORTRIM]=new RegExp(B[U.COMPARATORTRIM],"g");var V="$1$2$3";tok("HYPHENRANGE");B[U.HYPHENRANGE]="^\\s*("+B[U.XRANGEPLAIN]+")"+"\\s+-\\s+"+"("+B[U.XRANGEPLAIN]+")"+"\\s*$";tok("HYPHENRANGELOOSE");B[U.HYPHENRANGELOOSE]="^\\s*("+B[U.XRANGEPLAINLOOSE]+")"+"\\s+-\\s+"+"("+B[U.XRANGEPLAINLOOSE]+")"+"\\s*$";tok("STAR");B[U.STAR]="(<|>)?=?\\s*\\*";for(var G=0;G F){return null}var b=s.loose?L[U.LOOSE]:L[U.FULL];if(!b.test(t)){return null}try{return new SemVer(t,s)}catch(t){return null}}s.valid=valid;function valid(t,s){var b=parse(t,s);return b?b.version:null}s.clean=clean;function clean(t,s){var b=parse(t.trim().replace(/^[=v]+/,""),s);return b?b.version:null}s.SemVer=SemVer;function SemVer(t,s){if(!s||typeof s!=="object"){s={loose:!!s,includePrerelease:false}}if(t instanceof SemVer){if(t.loose===s.loose){return t}else{t=t.version}}else if(typeof t!=="string"){throw new TypeError("Invalid Version: "+t)}if(t.length>F){throw new TypeError("version is longer than "+F+" characters")}if(!(this instanceof SemVer)){return new SemVer(t,s)}b("SemVer",t,s);this.options=s;this.loose=!!s.loose;var T=t.trim().match(s.loose?L[U.LOOSE]:L[U.FULL]);if(!T){throw new TypeError("Invalid Version: "+t)}this.raw=t;this.major=+T[1];this.minor=+T[2];this.patch=+T[3];if(this.major>R||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>R||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>R||this.patch<0){throw new TypeError("Invalid patch version")}if(!T[4]){this.prerelease=[]}else{this.prerelease=T[4].split(".").map((function(t){if(/^[0-9]+$/.test(t)){var s=+t;if(s>=0&&s=0){if(typeof this.prerelease[b]==="number"){this.prerelease[b]++;b=-2}}if(b===-1){this.prerelease.push(0)}}if(s){if(this.prerelease[0]===s){if(isNaN(this.prerelease[1])){this.prerelease=[s,0]}}else{this.prerelease=[s,0]}}break;default:throw new Error("invalid increment argument: "+t)}this.format();this.raw=this.version;return this};s.inc=inc;function inc(t,s,b,F){if(typeof b==="string"){F=b;b=undefined}try{return new SemVer(t,b).inc(s,F).version}catch(t){return null}}s.diff=diff;function diff(t,s){if(eq(t,s)){return null}else{var b=parse(t);var F=parse(s);var R="";if(b.prerelease.length||F.prerelease.length){R="pre";var T="prerelease"}for(var L in b){if(L==="major"||L==="minor"||L==="patch"){if(b[L]!==F[L]){return R+L}}}return T}}s.compareIdentifiers=compareIdentifiers;var z=/^[0-9]+$/;function compareIdentifiers(t,s){var b=z.test(t);var F=z.test(s);if(b&&F){t=+t;s=+s}return t===s?0:b&&!F?-1:F&&!b?1:t 0}s.lt=lt;function lt(t,s,b){return compare(t,s,b)<0}s.eq=eq;function eq(t,s,b){return compare(t,s,b)===0}s.neq=neq;function neq(t,s,b){return compare(t,s,b)!==0}s.gte=gte;function gte(t,s,b){return compare(t,s,b)>=0}s.lte=lte;function lte(t,s,b){return compare(t,s,b)<=0}s.cmp=cmp;function cmp(t,s,b,F){switch(s){case"===":if(typeof t==="object")t=t.version;if(typeof b==="object")b=b.version;return t===b;case"!==":if(typeof t==="object")t=t.version;if(typeof b==="object")b=b.version;return t!==b;case"":case"=":case"==":return eq(t,b,F);case"!=":return neq(t,b,F);case">":return gt(t,b,F);case">=":return gte(t,b,F);case"<":return lt(t,b,F);case"<=":return lte(t,b,F);default:throw new TypeError("Invalid operator: "+s)}}s.Comparator=Comparator;function Comparator(t,s){if(!s||typeof s!=="object"){s={loose:!!s,includePrerelease:false}}if(t instanceof Comparator){if(t.loose===!!s.loose){return t}else{t=t.value}}if(!(this instanceof Comparator)){return new Comparator(t,s)}b("comparator",t,s);this.options=s;this.loose=!!s.loose;this.parse(t);if(this.semver===Y){this.value=""}else{this.value=this.operator+this.semver.version}b("comp",this)}var Y={};Comparator.prototype.parse=function(t){var s=this.options.loose?L[U.COMPARATORLOOSE]:L[U.COMPARATOR];var b=t.match(s);if(!b){throw new TypeError("Invalid comparator: "+t)}this.operator=b[1]!==undefined?b[1]:"";if(this.operator==="="){this.operator=""}if(!b[2]){this.semver=Y}else{this.semver=new SemVer(b[2],this.options.loose)}};Comparator.prototype.toString=function(){return this.value};Comparator.prototype.test=function(t){b("Comparator.test",t,this.options.loose);if(this.semver===Y||t===Y){return true}if(typeof t==="string"){try{t=new SemVer(t,this.options)}catch(t){return false}}return cmp(t,this.operator,this.semver,this.options)};Comparator.prototype.intersects=function(t,s){if(!(t instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!s||typeof s!=="object"){s={loose:!!s,includePrerelease:false}}var b;if(this.operator===""){if(this.value===""){return true}b=new Range(t.value,s);return satisfies(this.value,b,s)}else if(t.operator===""){if(t.value===""){return true}b=new Range(this.value,s);return satisfies(t.semver,b,s)}var F=(this.operator===">="||this.operator===">")&&(t.operator===">="||t.operator===">");var R=(this.operator==="<="||this.operator==="<")&&(t.operator==="<="||t.operator==="<");var T=this.semver.version===t.semver.version;var L=(this.operator===">="||this.operator==="<=")&&(t.operator===">="||t.operator==="<=");var B=cmp(this.semver,"<",t.semver,s)&&((this.operator===">="||this.operator===">")&&(t.operator==="<="||t.operator==="<"));var U=cmp(this.semver,">",t.semver,s)&&((this.operator==="<="||this.operator==="<")&&(t.operator===">="||t.operator===">"));return F||R||T&&L||B||U};s.Range=Range;function Range(t,s){if(!s||typeof s!=="object"){s={loose:!!s,includePrerelease:false}}if(t instanceof Range){if(t.loose===!!s.loose&&t.includePrerelease===!!s.includePrerelease){return t}else{return new Range(t.raw,s)}}if(t instanceof Comparator){return new Range(t.value,s)}if(!(this instanceof Range)){return new Range(t,s)}this.options=s;this.loose=!!s.loose;this.includePrerelease=!!s.includePrerelease;this.raw=t;this.set=t.split(/\s*\|\|\s*/).map((function(t){return this.parseRange(t.trim())}),this).filter((function(t){return t.length}));if(!this.set.length){throw new TypeError("Invalid SemVer Range: "+t)}this.format()}Range.prototype.format=function(){this.range=this.set.map((function(t){return t.join(" ").trim()})).join("||").trim();return this.range};Range.prototype.toString=function(){return this.range};Range.prototype.parseRange=function(t){var s=this.options.loose;t=t.trim();var F=s?L[U.HYPHENRANGELOOSE]:L[U.HYPHENRANGE];t=t.replace(F,hyphenReplace);b("hyphen replace",t);t=t.replace(L[U.COMPARATORTRIM],V);b("comparator trim",t,L[U.COMPARATORTRIM]);t=t.replace(L[U.TILDETRIM],H);t=t.replace(L[U.CARETTRIM],W);t=t.split(/\s+/).join(" ");var R=s?L[U.COMPARATORLOOSE]:L[U.COMPARATOR];var T=t.split(" ").map((function(t){return parseComparator(t,this.options)}),this).join(" ").split(/\s+/);if(this.options.loose){T=T.filter((function(t){return!!t.match(R)}))}T=T.map((function(t){return new Comparator(t,this.options)}),this);return T};Range.prototype.intersects=function(t,s){if(!(t instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((function(b){return isSatisfiable(b,s)&&t.set.some((function(t){return isSatisfiable(t,s)&&b.every((function(b){return t.every((function(t){return b.intersects(t,s)}))}))}))}))};function isSatisfiable(t,s){var b=true;var F=t.slice();var R=F.pop();while(b&&F.length){b=F.every((function(t){return R.intersects(t,s)}));R=F.pop()}return b}s.toComparators=toComparators;function toComparators(t,s){return new Range(t,s).set.map((function(t){return t.map((function(t){return t.value})).join(" ").trim().split(" ")}))}function parseComparator(t,s){b("comp",t,s);t=replaceCarets(t,s);b("caret",t);t=replaceTildes(t,s);b("tildes",t);t=replaceXRanges(t,s);b("xrange",t);t=replaceStars(t,s);b("stars",t);return t}function isX(t){return!t||t.toLowerCase()==="x"||t==="*"}function replaceTildes(t,s){return t.trim().split(/\s+/).map((function(t){return replaceTilde(t,s)})).join(" ")}function replaceTilde(t,s){var F=s.loose?L[U.TILDELOOSE]:L[U.TILDE];return t.replace(F,(function(s,F,R,T,L){b("tilde",t,s,F,R,T,L);var B;if(isX(F)){B=""}else if(isX(R)){B=">="+F+".0.0 <"+(+F+1)+".0.0"}else if(isX(T)){B=">="+F+"."+R+".0 <"+F+"."+(+R+1)+".0"}else if(L){b("replaceTilde pr",L);B=">="+F+"."+R+"."+T+"-"+L+" <"+F+"."+(+R+1)+".0"}else{B=">="+F+"."+R+"."+T+" <"+F+"."+(+R+1)+".0"}b("tilde return",B);return B}))}function replaceCarets(t,s){return t.trim().split(/\s+/).map((function(t){return replaceCaret(t,s)})).join(" ")}function replaceCaret(t,s){b("caret",t,s);var F=s.loose?L[U.CARETLOOSE]:L[U.CARET];return t.replace(F,(function(s,F,R,T,L){b("caret",t,s,F,R,T,L);var B;if(isX(F)){B=""}else if(isX(R)){B=">="+F+".0.0 <"+(+F+1)+".0.0"}else if(isX(T)){if(F==="0"){B=">="+F+"."+R+".0 <"+F+"."+(+R+1)+".0"}else{B=">="+F+"."+R+".0 <"+(+F+1)+".0.0"}}else if(L){b("replaceCaret pr",L);if(F==="0"){if(R==="0"){B=">="+F+"."+R+"."+T+"-"+L+" <"+F+"."+R+"."+(+T+1)}else{B=">="+F+"."+R+"."+T+"-"+L+" <"+F+"."+(+R+1)+".0"}}else{B=">="+F+"."+R+"."+T+"-"+L+" <"+(+F+1)+".0.0"}}else{b("no pr");if(F==="0"){if(R==="0"){B=">="+F+"."+R+"."+T+" <"+F+"."+R+"."+(+T+1)}else{B=">="+F+"."+R+"."+T+" <"+F+"."+(+R+1)+".0"}}else{B=">="+F+"."+R+"."+T+" <"+(+F+1)+".0.0"}}b("caret return",B);return B}))}function replaceXRanges(t,s){b("replaceXRanges",t,s);return t.split(/\s+/).map((function(t){return replaceXRange(t,s)})).join(" ")}function replaceXRange(t,s){t=t.trim();var F=s.loose?L[U.XRANGELOOSE]:L[U.XRANGE];return t.replace(F,(function(F,R,T,L,B,U){b("xRange",t,F,R,T,L,B,U);var q=isX(T);var H=q||isX(L);var W=H||isX(B);var V=W;if(R==="="&&V){R=""}U=s.includePrerelease?"-0":"";if(q){if(R===">"||R==="<"){F="<0.0.0-0"}else{F="*"}}else if(R&&V){if(H){L=0}B=0;if(R===">"){R=">=";if(H){T=+T+1;L=0;B=0}else{L=+L+1;B=0}}else if(R==="<="){R="<";if(H){T=+T+1}else{L=+L+1}}F=R+T+"."+L+"."+B+U}else if(H){F=">="+T+".0.0"+U+" <"+(+T+1)+".0.0"+U}else if(W){F=">="+T+"."+L+".0"+U+" <"+T+"."+(+L+1)+".0"+U}b("xRange return",F);return F}))}function replaceStars(t,s){b("replaceStars",t,s);return t.trim().replace(L[U.STAR],"")}function hyphenReplace(t,s,b,F,R,T,L,B,U,q,H,W,V){if(isX(b)){s=""}else if(isX(F)){s=">="+b+".0.0"}else if(isX(R)){s=">="+b+"."+F+".0"}else{s=">="+s}if(isX(U)){B=""}else if(isX(q)){B="<"+(+U+1)+".0.0"}else if(isX(H)){B="<"+U+"."+(+q+1)+".0"}else if(W){B="<="+U+"."+q+"."+H+"-"+W}else{B="<="+B}return(s+" "+B).trim()}Range.prototype.test=function(t){if(!t){return false}if(typeof t==="string"){try{t=new SemVer(t,this.options)}catch(t){return false}}for(var s=0;s0){var T=t[R].semver;if(T.major===s.major&&T.minor===s.minor&&T.patch===s.patch){return true}}}return false}return true}s.satisfies=satisfies;function satisfies(t,s,b){try{s=new Range(s,b)}catch(t){return false}return s.test(t)}s.maxSatisfying=maxSatisfying;function maxSatisfying(t,s,b){var F=null;var R=null;try{var T=new Range(s,b)}catch(t){return null}t.forEach((function(t){if(T.test(t)){if(!F||R.compare(t)===-1){F=t;R=new SemVer(F,b)}}}));return F}s.minSatisfying=minSatisfying;function minSatisfying(t,s,b){var F=null;var R=null;try{var T=new Range(s,b)}catch(t){return null}t.forEach((function(t){if(T.test(t)){if(!F||R.compare(t)===1){F=t;R=new SemVer(F,b)}}}));return F}s.minVersion=minVersion;function minVersion(t,s){t=new Range(t,s);var b=new SemVer("0.0.0");if(t.test(b)){return b}b=new SemVer("0.0.0-0");if(t.test(b)){return b}b=null;for(var F=0;F ":if(s.prerelease.length===0){s.patch++}else{s.prerelease.push(0)}s.raw=s.format();case"":case">=":if(!b||gt(b,s)){b=s}break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+t.operator)}}))}if(b&&t.test(b)){return b}return null}s.validRange=validRange;function validRange(t,s){try{return new Range(t,s).range||"*"}catch(t){return null}}s.ltr=ltr;function ltr(t,s,b){return outside(t,s,"<",b)}s.gtr=gtr;function gtr(t,s,b){return outside(t,s,">",b)}s.outside=outside;function outside(t,s,b,F){t=new SemVer(t,F);s=new Range(s,F);var R,T,L,B,U;switch(b){case">":R=gt;T=lte;L=lt;B=">";U=">=";break;case"<":R=lt;T=gte;L=gt;B="<";U="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies(t,s,F)){return false}for(var q=0;q =0.0.0")}W=W||t;V=V||t;if(R(t.semver,W.semver,F)){W=t}else if(L(t.semver,V.semver,F)){V=t}}));if(W.operator===B||W.operator===U){return false}if((!V.operator||V.operator===B)&&T(t,V.semver)){return false}else if(V.operator===U&&L(t,V.semver)){return false}}return true}s.prerelease=prerelease;function prerelease(t,s){var b=parse(t,s);return b&&b.prerelease.length?b.prerelease:null}s.intersects=intersects;function intersects(t,s,b){t=new Range(t,b);s=new Range(s,b);return t.intersects(s)}s.coerce=coerce;function coerce(t,s){if(t instanceof SemVer){return t}if(typeof t==="number"){t=String(t)}if(typeof t!=="string"){return null}s=s||{};var b=null;if(!s.rtl){b=t.match(L[U.COERCE])}else{var F;while((F=L[U.COERCERTL].exec(t))&&(!b||b.index+b[0].length!==t.length)){if(!b||F.index+F[0].length!==b.index+b[0].length){b=F}L[U.COERCERTL].lastIndex=F.index+F[1].length+F[2].length}L[U.COERCERTL].lastIndex=-1}if(b===null){return null}return parse(b[2]+"."+(b[3]||"0")+"."+(b[4]||"0"),s)}},2577:(t,s,b)=>{"use strict";const F=b(3520);const R=b(4882);const T=b(8212);const stringWidth=t=>{if(typeof t!=="string"||t.length===0){return 0}t=F(t);if(t.length===0){return 0}t=t.replace(T()," ");let s=0;for(let b=0;b =127&&F<=159){continue}if(F>=768&&F<=879){continue}if(F>65535){b++}s+=R(F)?2:1}return s};t.exports=stringWidth;t.exports["default"]=stringWidth},3520:(t,s,b)=>{"use strict";const F=b(5063);t.exports=t=>typeof t==="string"?t.replace(F(),""):t},5591:(t,s,b)=>{"use strict";const F=b(5063);t.exports=t=>typeof t==="string"?t.replace(F(),""):t},4294:(t,s,b)=>{t.exports=b(4219)},4219:(t,s,b)=>{"use strict";var F=b(1808);var R=b(4404);var T=b(3685);var L=b(5687);var B=b(2361);var U=b(9491);var q=b(3837);s.httpOverHttp=httpOverHttp;s.httpsOverHttp=httpsOverHttp;s.httpOverHttps=httpOverHttps;s.httpsOverHttps=httpsOverHttps;function httpOverHttp(t){var s=new TunnelingAgent(t);s.request=T.request;return s}function httpsOverHttp(t){var s=new TunnelingAgent(t);s.request=T.request;s.createSocket=createSecureSocket;s.defaultPort=443;return s}function httpOverHttps(t){var s=new TunnelingAgent(t);s.request=L.request;return s}function httpsOverHttps(t){var s=new TunnelingAgent(t);s.request=L.request;s.createSocket=createSecureSocket;s.defaultPort=443;return s}function TunnelingAgent(t){var s=this;s.options=t||{};s.proxyOptions=s.options.proxy||{};s.maxSockets=s.options.maxSockets||T.Agent.defaultMaxSockets;s.requests=[];s.sockets=[];s.on("free",(function onFree(t,b,F,R){var T=toOptions(b,F,R);for(var L=0,B=s.requests.length;L=this.maxSockets){R.requests.push(T);return}R.createSocket(T,(function(s){s.on("free",onFree);s.on("close",onCloseOrRemove);s.on("agentRemove",onCloseOrRemove);t.onSocket(s);function onFree(){R.emit("free",s,T)}function onCloseOrRemove(t){R.removeSocket(s);s.removeListener("free",onFree);s.removeListener("close",onCloseOrRemove);s.removeListener("agentRemove",onCloseOrRemove)}}))};TunnelingAgent.prototype.createSocket=function createSocket(t,s){var b=this;var F={};b.sockets.push(F);var R=mergeOptions({},b.proxyOptions,{method:"CONNECT",path:t.host+":"+t.port,agent:false,headers:{host:t.host+":"+t.port}});if(t.localAddress){R.localAddress=t.localAddress}if(R.proxyAuth){R.headers=R.headers||{};R.headers["Proxy-Authorization"]="Basic "+new Buffer(R.proxyAuth).toString("base64")}H("making CONNECT request");var T=b.request(R);T.useChunkedEncodingByDefault=false;T.once("response",onResponse);T.once("upgrade",onUpgrade);T.once("connect",onConnect);T.once("error",onError);T.end();function onResponse(t){t.upgrade=true}function onUpgrade(t,s,b){process.nextTick((function(){onConnect(t,s,b)}))}function onConnect(R,L,B){T.removeAllListeners();L.removeAllListeners();if(R.statusCode!==200){H("tunneling socket could not be established, statusCode=%d",R.statusCode);L.destroy();var U=new Error("tunneling socket could not be established, "+"statusCode="+R.statusCode);U.code="ECONNRESET";t.request.emit("error",U);b.removeSocket(F);return}if(B.length>0){H("got illegal response body from proxy");L.destroy();var U=new Error("got illegal response body from proxy");U.code="ECONNRESET";t.request.emit("error",U);b.removeSocket(F);return}H("tunneling connection has established");b.sockets[b.sockets.indexOf(F)]=L;return s(L)}function onError(s){T.removeAllListeners();H("tunneling socket could not be established, cause=%s\n",s.message,s.stack);var R=new Error("tunneling socket could not be established, "+"cause="+s.message);R.code="ECONNRESET";t.request.emit("error",R);b.removeSocket(F)}};TunnelingAgent.prototype.removeSocket=function removeSocket(t){var s=this.sockets.indexOf(t);if(s===-1){return}this.sockets.splice(s,1);var b=this.requests.shift();if(b){this.createSocket(b,(function(t){b.request.onSocket(t)}))}};function createSecureSocket(t,s){var b=this;TunnelingAgent.prototype.createSocket.call(b,t,(function(F){var T=t.request.getHeader("host");var L=mergeOptions({},b.options,{socket:F,servername:T?T.replace(/:.*$/,""):t.host});var B=R.connect(0,L);b.sockets[b.sockets.indexOf(F)]=B;s(B)}))}function toOptions(t,s,b){if(typeof t==="string"){return{host:t,port:s,localAddress:b}}return t}function mergeOptions(t){for(var s=1,b=arguments.length;s{var s=[];for(var b=0;b<256;++b){s[b]=(b+256).toString(16).substr(1)}function bytesToUuid(t,b){var F=b||0;var R=s;return[R[t[F++]],R[t[F++]],R[t[F++]],R[t[F++]],"-",R[t[F++]],R[t[F++]],"-",R[t[F++]],R[t[F++]],"-",R[t[F++]],R[t[F++]],"-",R[t[F++]],R[t[F++]],R[t[F++]],R[t[F++]],R[t[F++]],R[t[F++]]].join("")}t.exports=bytesToUuid},5859:(t,s,b)=>{var F=b(6113);t.exports=function nodeRNG(){return F.randomBytes(16)}},824:(t,s,b)=>{var F=b(5859);var R=b(2707);function v4(t,s,b){var T=s&&b||0;if(typeof t=="string"){s=t==="binary"?new Array(16):null;t=null}t=t||{};var L=t.random||(t.rng||F)();L[6]=L[6]&15|64;L[8]=L[8]&63|128;if(s){for(var B=0;B<16;++B){s[T+B]=L[B]}}return s||R(L)}t.exports=v4},9824:(t,s,b)=>{"use strict";const F=b(2577);const R=b(5591);const T=b(2068);const L=new Set(["",""]);const B=39;const U="";const q="[";const H="]";const W="m";const V=`${H}8;;`;const wrapAnsi=t=>`${L.values().next().value}${q}${t}${W}`;const wrapAnsiHyperlink=t=>`${L.values().next().value}${V}${t}${U}`;const wordLengths=t=>t.split(" ").map((t=>F(t)));const wrapWord=(t,s,b)=>{const T=[...s];let B=false;let q=false;let H=F(R(t[t.length-1]));for(const[s,R]of T.entries()){const G=F(R);if(H+G<=b){t[t.length-1]+=R}else{t.push(R);H=0}if(L.has(R)){B=true;q=T.slice(s+1).join("").startsWith(V)}if(B){if(q){if(R===U){B=false;q=false}}else if(R===W){B=false}continue}H+=G;if(H===b&&s 0&&t.length>1){t[t.length-2]+=t.pop()}};const stringVisibleTrimSpacesRight=t=>{const s=t.split(" ");let b=s.length;while(b>0){if(F(s[b-1])>0){break}b--}if(b===s.length){return t}return s.slice(0,b).join(" ")+s.slice(b).join("")};const exec=(t,s,b={})=>{if(b.trim!==false&&t.trim()===""){return""}let R="";let H;let W;const G=wordLengths(t);let z=[""];for(const[R,T]of t.split(" ").entries()){if(b.trim!==false){z[z.length-1]=z[z.length-1].trimStart()}let t=F(z[z.length-1]);if(R!==0){if(t>=s&&(b.wordWrap===false||b.trim===false)){z.push("");t=0}if(t>0||b.trim===false){z[z.length-1]+=" ";t++}}if(b.hard&&G[R]>s){const b=s-t;const F=1+Math.floor((G[R]-b-1)/s);const L=Math.floor((G[R]-1)/s);if(L s&&t>0&&G[R]>0){if(b.wordWrap===false&&t s&&b.wordWrap===false){wrapWord(z,T,s);continue}z[z.length-1]+=T}if(b.trim!==false){z=z.map(stringVisibleTrimSpacesRight)}const Y=[...z.join("\n")];for(const[t,s]of Y.entries()){R+=s;if(L.has(s)){const{groups:s}=new RegExp(`(?:\\${q}(?\\d+)m|\\${V}(?.*)${U})`).exec(Y.slice(t).join(""))||{groups:{}};if(s.code!==undefined){const t=Number.parseFloat(s.code);H=t===B?undefined:t}else if(s.uri!==undefined){W=s.uri.length===0?undefined:s.uri}}const b=T.codes.get(Number(H));if(Y[t+1]==="\n"){if(W){R+=wrapAnsiHyperlink("")}if(H&&b){R+=wrapAnsi(b)}}else if(s==="\n"){if(H&&b){R+=wrapAnsi(H)}if(W){R+=wrapAnsiHyperlink(W)}}}return R};t.exports=(t,s,b)=>String(t).normalize().replace(/\r\n/g,"\n").split("\n").map((t=>exec(t,s,b))).join("\n")},8954:function(t,s,b){"use strict";var F=this&&this.__createBinding||(Object.create?function(t,s,b,F){if(F===undefined)F=b;var R=Object.getOwnPropertyDescriptor(s,b);if(!R||("get"in R?!s.__esModule:R.writable||R.configurable)){R={enumerable:true,get:function(){return s[b]}}}Object.defineProperty(t,F,R)}:function(t,s,b,F){if(F===undefined)F=b;t[F]=s[b]});var R=this&&this.__setModuleDefault||(Object.create?function(t,s){Object.defineProperty(t,"default",{enumerable:true,value:s})}:function(t,s){t["default"]=s});var T=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var s={};if(t!=null)for(var b in t)if(b!=="default"&&Object.prototype.hasOwnProperty.call(t,b))F(s,t,b);R(s,t);return s};var L=this&&this.__awaiter||function(t,s,b,F){function adopt(t){return t instanceof b?t:new b((function(s){s(t)}))}return new(b||(b=Promise))((function(b,R){function fulfilled(t){try{step(F.next(t))}catch(t){R(t)}}function rejected(t){try{step(F["throw"](t))}catch(t){R(t)}}function step(t){t.done?b(t.value):adopt(t.value).then(fulfilled,rejected)}step((F=F.apply(t,s||[])).next())}))};Object.defineProperty(s,"__esModule",{value:true});s.setOutput=s.getInputs=s.osArch=s.osPlat=void 0;const B=T(b(2037));const U=T(b(2186));const q=b(7351);s.osPlat=B.platform();s.osArch=B.arch();function getInputs(){return L(this,void 0,void 0,(function*(){return{distribution:U.getInput("distribution")||"goreleaser",version:U.getInput("version"),args:U.getInput("args"),workdir:U.getInput("workdir")||".",installOnly:U.getBooleanInput("install-only")}}))}s.getInputs=getInputs;function setOutput(t,s){(0,q.issueCommand)("set-output",{name:t},s)}s.setOutput=setOutput},6350:function(t,s,b){"use strict";var F=this&&this.__createBinding||(Object.create?function(t,s,b,F){if(F===undefined)F=b;var R=Object.getOwnPropertyDescriptor(s,b);if(!R||("get"in R?!s.__esModule:R.writable||R.configurable)){R={enumerable:true,get:function(){return s[b]}}}Object.defineProperty(t,F,R)}:function(t,s,b,F){if(F===undefined)F=b;t[F]=s[b]});var R=this&&this.__setModuleDefault||(Object.create?function(t,s){Object.defineProperty(t,"default",{enumerable:true,value:s})}:function(t,s){t["default"]=s});var T=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var s={};if(t!=null)for(var b in t)if(b!=="default"&&Object.prototype.hasOwnProperty.call(t,b))F(s,t,b);R(s,t);return s};var L=this&&this.__awaiter||function(t,s,b,F){function adopt(t){return t instanceof b?t:new b((function(s){s(t)}))}return new(b||(b=Promise))((function(b,R){function fulfilled(t){try{step(F.next(t))}catch(t){R(t)}}function rejected(t){try{step(F["throw"](t))}catch(t){R(t)}}function step(t){t.done?b(t.value):adopt(t.value).then(fulfilled,rejected)}step((F=F.apply(t,s||[])).next())}))};Object.defineProperty(s,"__esModule",{value:true});s.getShortCommit=s.isTagDirty=s.getTag=void 0;const B=T(b(1514));const git=(t=[])=>L(void 0,void 0,void 0,(function*(){return yield B.getExecOutput(`git`,t,{ignoreReturnCode:true,silent:true}).then((t=>{if(t.stderr.length>0&&t.exitCode!=0){throw new Error(t.stderr)}return t.stdout.trim()}))}));function getTag(){return L(this,void 0,void 0,(function*(){try{if((process.env.GITHUB_REF||"").startsWith("refs/tags")){const t=(process.env.GITHUB_REF||"").split("/").pop();if(t!==""&&t!==undefined){return t}}return yield git(["tag","--points-at",`${process.env.GITHUB_SHA}`,"--sort","-version:creatordate"]).then((t=>{if(t.length==0){return git(["describe","--tags","--abbrev=0"])}return t.split("\n")[0]}))}catch(t){return""}}))}s.getTag=getTag;function isTagDirty(t){return L(this,void 0,void 0,(function*(){try{yield git(["describe","--exact-match","--tags","--match",t])}catch(t){return true}return false}))}s.isTagDirty=isTagDirty;function getShortCommit(){return L(this,void 0,void 0,(function*(){return yield git(["show","--format='%h'","HEAD","--quiet"])}))}s.getShortCommit=getShortCommit},978:function(t,s,b){"use strict";var F=this&&this.__createBinding||(Object.create?function(t,s,b,F){if(F===undefined)F=b;var R=Object.getOwnPropertyDescriptor(s,b);if(!R||("get"in R?!s.__esModule:R.writable||R.configurable)){R={enumerable:true,get:function(){return s[b]}}}Object.defineProperty(t,F,R)}:function(t,s,b,F){if(F===undefined)F=b;t[F]=s[b]});var R=this&&this.__setModuleDefault||(Object.create?function(t,s){Object.defineProperty(t,"default",{enumerable:true,value:s})}:function(t,s){t["default"]=s});var T=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var s={};if(t!=null)for(var b in t)if(b!=="default"&&Object.prototype.hasOwnProperty.call(t,b))F(s,t,b);R(s,t);return s};var L=this&&this.__awaiter||function(t,s,b,F){function adopt(t){return t instanceof b?t:new b((function(s){s(t)}))}return new(b||(b=Promise))((function(b,R){function fulfilled(t){try{step(F.next(t))}catch(t){R(t)}}function rejected(t){try{step(F["throw"](t))}catch(t){R(t)}}function step(t){t.done?b(t.value):adopt(t.value).then(fulfilled,rejected)}step((F=F.apply(t,s||[])).next())}))};Object.defineProperty(s,"__esModule",{value:true});s.getRelease=void 0;const B=T(b(8218));const U=T(b(5911));const q=T(b(2186));const H=T(b(6255));const getRelease=(t,s)=>L(void 0,void 0,void 0,(function*(){const b=(yield resolveVersion(t,s))||s;const F=`https://github.com/goreleaser/${t}/releases/${b}`;const R=new H.HttpClient("goreleaser-action");return(yield R.getJson(F)).result}));s.getRelease=getRelease;const resolveVersion=(t,s)=>L(void 0,void 0,void 0,(function*(){const b=yield getAllTags(t);if(!b){throw new Error(`Cannot find GoReleaser tags`)}q.debug(`Found ${b.length} tags in total`);if(s==="latest"||!B.isPro(t)){return U.maxSatisfying(b,s)}const F=b.map((t=>cleanTag(t)));const R=cleanTag(s);return U.maxSatisfying(F,R)+B.distribSuffix(t)}));const getAllTags=t=>L(void 0,void 0,void 0,(function*(){const s=new H.HttpClient("goreleaser-action");const b=B.distribSuffix(t);const F=`https://goreleaser.com/static/releases${b}.json`;const R=s.getJson(F);return R.then((t=>{if(t.result==null){return[]}return t.result.map((t=>t.tag_name))}))}));const cleanTag=t=>t.replace(/-pro$/,"")},8218:function(t,s,b){"use strict";var F=this&&this.__createBinding||(Object.create?function(t,s,b,F){if(F===undefined)F=b;var R=Object.getOwnPropertyDescriptor(s,b);if(!R||("get"in R?!s.__esModule:R.writable||R.configurable)){R={enumerable:true,get:function(){return s[b]}}}Object.defineProperty(t,F,R)}:function(t,s,b,F){if(F===undefined)F=b;t[F]=s[b]});var R=this&&this.__setModuleDefault||(Object.create?function(t,s){Object.defineProperty(t,"default",{enumerable:true,value:s})}:function(t,s){t["default"]=s});var T=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var s={};if(t!=null)for(var b in t)if(b!=="default"&&Object.prototype.hasOwnProperty.call(t,b))F(s,t,b);R(s,t);return s};var L=this&&this.__awaiter||function(t,s,b,F){function adopt(t){return t instanceof b?t:new b((function(s){s(t)}))}return new(b||(b=Promise))((function(b,R){function fulfilled(t){try{step(F.next(t))}catch(t){R(t)}}function rejected(t){try{step(F["throw"](t))}catch(t){R(t)}}function step(t){t.done?b(t.value):adopt(t.value).then(fulfilled,rejected)}step((F=F.apply(t,s||[])).next())}))};var B=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(s,"__esModule",{value:true});s.getMetadata=s.getArtifacts=s.getDistPath=s.isPro=s.distribSuffix=s.install=void 0;const U=T(b(7147));const q=T(b(1017));const H=T(b(3837));const W=B(b(1917));const V=T(b(8954));const G=T(b(978));const z=T(b(2186));const Y=T(b(7784));function install(t,s){return L(this,void 0,void 0,(function*(){const b=yield G.getRelease(t,s);if(!b){throw new Error(`Cannot find GoReleaser ${s} release`)}const F=getFilename(t);const R=H.format("https://github.com/goreleaser/%s/releases/download/%s/%s",t,b.tag_name,F);z.info(`Downloading ${R}`);const T=yield Y.downloadTool(R);z.debug(`Downloaded to ${T}`);z.info("Extracting GoReleaser");let L;if(V.osPlat=="win32"){L=yield Y.extractZip(T)}else{L=yield Y.extractTar(T)}z.debug(`Extracted to ${L}`);const B=yield Y.cacheDir(L,"goreleaser-action",b.tag_name.replace(/^v/,""));z.debug(`Cached to ${B}`);const U=q.join(B,V.osPlat=="win32"?"goreleaser.exe":"goreleaser");z.debug(`Exe path is ${U}`);return U}))}s.install=install;const distribSuffix=t=>(0,s.isPro)(t)?"-pro":"";s.distribSuffix=distribSuffix;const isPro=t=>t==="goreleaser-pro";s.isPro=isPro;const getFilename=t=>{let b;switch(V.osArch){case"x64":{b="x86_64";break}case"x32":{b="i386";break}case"arm":{const t=process.config.variables.arm_version;b=t?"armv"+t:"arm";break}default:{b=V.osArch;break}}if(V.osPlat=="darwin"){b="all"}const F=V.osPlat=="win32"?"Windows":V.osPlat=="darwin"?"Darwin":"Linux";const R=V.osPlat=="win32"?"zip":"tar.gz";const T=(0,s.distribSuffix)(t);return H.format("goreleaser%s_%s_%s.%s",T,F,b,R)};function getDistPath(t){return L(this,void 0,void 0,(function*(){const s=W.default.load(U.readFileSync(t,"utf8"));return s.dist||"dist"}))}s.getDistPath=getDistPath;function getArtifacts(t){return L(this,void 0,void 0,(function*(){const s=q.join(t,"artifacts.json");if(!U.existsSync(s)){return undefined}const b=U.readFileSync(s,{encoding:"utf-8"}).trim();if(b==="null"){return undefined}return b}))}s.getArtifacts=getArtifacts;function getMetadata(t){return L(this,void 0,void 0,(function*(){const s=q.join(t,"metadata.json");if(!U.existsSync(s)){return undefined}const b=U.readFileSync(s,{encoding:"utf-8"}).trim();if(b==="null"){return undefined}return b}))}s.getMetadata=getMetadata},399:function(t,s,b){"use strict";var F=this&&this.__createBinding||(Object.create?function(t,s,b,F){if(F===undefined)F=b;var R=Object.getOwnPropertyDescriptor(s,b);if(!R||("get"in R?!s.__esModule:R.writable||R.configurable)){R={enumerable:true,get:function(){return s[b]}}}Object.defineProperty(t,F,R)}:function(t,s,b,F){if(F===undefined)F=b;t[F]=s[b]});var R=this&&this.__setModuleDefault||(Object.create?function(t,s){Object.defineProperty(t,"default",{enumerable:true,value:s})}:function(t,s){t["default"]=s});var T=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var s={};if(t!=null)for(var b in t)if(b!=="default"&&Object.prototype.hasOwnProperty.call(t,b))F(s,t,b);R(s,t);return s};var L=this&&this.__awaiter||function(t,s,b,F){function adopt(t){return t instanceof b?t:new b((function(s){s(t)}))}return new(b||(b=Promise))((function(b,R){function fulfilled(t){try{step(F.next(t))}catch(t){R(t)}}function rejected(t){try{step(F["throw"](t))}catch(t){R(t)}}function step(t){t.done?b(t.value):adopt(t.value).then(fulfilled,rejected)}step((F=F.apply(t,s||[])).next())}))};var B=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(s,"__esModule",{value:true});const U=T(b(7147));const q=T(b(1017));const H=B(b(8822));const W=T(b(8954));const V=T(b(6350));const G=T(b(8218));const z=T(b(2186));const Y=T(b(1514));function run(){return L(this,void 0,void 0,(function*(){try{const t=yield W.getInputs();const s=yield G.install(t.distribution,t.version);z.info(`GoReleaser ${t.version} installed successfully`);if(t.installOnly){const t=q.dirname(s);z.addPath(t);z.debug(`Added ${t} to PATH`);return}else if(!t.args){z.setFailed("args input required");return}if(t.workdir&&t.workdir!=="."){z.info(`Using ${t.workdir} as working directory`);process.chdir(t.workdir)}const b=yield V.getShortCommit();const F=yield V.getTag();const R=yield V.isTagDirty(F);let T;const B=H.default.parse(t.args);if(B.config){T=B.config}else{[".goreleaser.yaml",".goreleaser.yml","goreleaser.yaml","goreleaser.yml"].forEach((t=>{if(U.existsSync(t)){T=t}}))}let X="";if(t.args.split(" ").indexOf("release")>-1){if(R){if(!t.args.includes("--snapshot")&&!t.args.includes("--nightly")){z.info(`No tag found for commit ${b}. Snapshot forced`);X=" --snapshot"}}else{z.info(`${F} tag found for commit ${b}`)}}yield Y.exec(`${s} ${t.args}${X}`,undefined,{env:Object.assign({},process.env,{GORELEASER_CURRENT_TAG:process.env.GORELEASER_CURRENT_TAG||F||""})});if(typeof T==="string"){const t=yield G.getArtifacts(yield G.getDistPath(T));if(t){yield z.group(`Artifacts output`,(()=>L(this,void 0,void 0,(function*(){z.info(t);W.setOutput("artifacts",t)}))))}const s=yield G.getMetadata(yield G.getDistPath(T));if(s){yield z.group(`Metadata output`,(()=>L(this,void 0,void 0,(function*(){z.info(s);W.setOutput("metadata",s)}))))}}}catch(t){z.setFailed(t.message)}}))}run()},9167:t=>{function webpackEmptyContext(t){var s=new Error("Cannot find module '"+t+"'");s.code="MODULE_NOT_FOUND";throw s}webpackEmptyContext.keys=()=>[];webpackEmptyContext.resolve=webpackEmptyContext;webpackEmptyContext.id=9167;t.exports=webpackEmptyContext},5977:t=>{function webpackEmptyContext(t){var s=new Error("Cannot find module '"+t+"'");s.code="MODULE_NOT_FOUND";throw s}webpackEmptyContext.keys=()=>[];webpackEmptyContext.resolve=webpackEmptyContext;webpackEmptyContext.id=5977;t.exports=webpackEmptyContext},4907:t=>{function webpackEmptyContext(t){var s=new Error("Cannot find module '"+t+"'");s.code="MODULE_NOT_FOUND";throw s}webpackEmptyContext.keys=()=>[];webpackEmptyContext.resolve=webpackEmptyContext;webpackEmptyContext.id=4907;t.exports=webpackEmptyContext},9491:t=>{"use strict";t.exports=require("assert")},2081:t=>{"use strict";t.exports=require("child_process")},6113:t=>{"use strict";t.exports=require("crypto")},2361:t=>{"use strict";t.exports=require("events")},7147:t=>{"use strict";t.exports=require("fs")},3685:t=>{"use strict";t.exports=require("http")},5687:t=>{"use strict";t.exports=require("https")},1808:t=>{"use strict";t.exports=require("net")},2037:t=>{"use strict";t.exports=require("os")},1017:t=>{"use strict";t.exports=require("path")},2781:t=>{"use strict";t.exports=require("stream")},1576:t=>{"use strict";t.exports=require("string_decoder")},9512:t=>{"use strict";t.exports=require("timers")},4404:t=>{"use strict";t.exports=require("tls")},3837:t=>{"use strict";t.exports=require("util")},7059:(t,s,b)=>{"use strict";const F={right:alignRight,center:alignCenter};const R=0;const T=1;const L=2;const B=3;class UI{constructor(t){var s;this.width=t.width;this.wrap=(s=t.wrap)!==null&&s!==void 0?s:true;this.rows=[]}span(...t){const s=this.div(...t);s.span=true}resetOutput(){this.rows=[]}div(...t){if(t.length===0){this.div("")}if(this.wrap&&this.shouldApplyLayoutDSL(...t)&&typeof t[0]==="string"){return this.applyLayoutDSL(t[0])}const s=t.map((t=>{if(typeof t==="string"){return this.colFromString(t)}return t}));this.rows.push(s);return s}shouldApplyLayoutDSL(...t){return t.length===1&&typeof t[0]==="string"&&/[\t\n]/.test(t[0])}applyLayoutDSL(t){const s=t.split("\n").map((t=>t.split("\t")));let b=0;s.forEach((t=>{if(t.length>1&&U.stringWidth(t[0])>b){b=Math.min(Math.floor(this.width*.5),U.stringWidth(t[0]))}}));s.forEach((t=>{this.div(...t.map(((s,F)=>({text:s.trim(),padding:this.measurePadding(s),width:F===0&&t.length>1?b:undefined}))))}));return this.rows[this.rows.length-1]}colFromString(t){return{text:t,padding:this.measurePadding(t)}}measurePadding(t){const s=U.stripAnsi(t);return[0,s.match(/\s*$/)[0].length,0,s.match(/^\s*/)[0].length]}toString(){const t=[];this.rows.forEach((s=>{this.rowToString(s,t)}));return t.filter((t=>!t.hidden)).map((t=>t.text)).join("\n")}rowToString(t,s){this.rasterize(t).forEach(((b,R)=>{let L="";b.forEach(((b,q)=>{const{width:H}=t[q];const W=this.negatePadding(t[q]);let V=b;if(W>U.stringWidth(b)){V+=" ".repeat(W-U.stringWidth(b))}if(t[q].align&&t[q].align!=="left"&&this.wrap){const s=F[t[q].align];V=s(V,W);if(U.stringWidth(V) 0){L=this.renderInline(L,s[s.length-1])}}));s.push({text:L.replace(/ +$/,""),span:t.span})}));return s}renderInline(t,s){const b=t.match(/^ */);const F=b?b[0].length:0;const R=s.text;const T=U.stringWidth(R.trimRight());if(!s.span){return t}if(!this.wrap){s.hidden=true;return R+t}if(F {t.width=b[T];if(this.wrap){F=U.wrap(t.text,this.negatePadding(t),{hard:true}).split("\n")}else{F=t.text.split("\n")}if(t.border){F.unshift("."+"-".repeat(this.negatePadding(t)+2)+".");F.push("'"+"-".repeat(this.negatePadding(t)+2)+"'")}if(t.padding){F.unshift(...new Array(t.padding[R]||0).fill(""));F.push(...new Array(t.padding[L]||0).fill(""))}F.forEach(((t,b)=>{if(!s[b]){s.push([])}const F=s[b];for(let t=0;t t.width||U.stringWidth(t.text)))}let s=t.length;let b=this.width;const F=t.map((t=>{if(t.width){s--;b-=t.width;return t.width}return undefined}));const R=s?Math.floor(b/s):0;return F.map(((s,b)=>{if(s===undefined){return Math.max(R,_minWidth(t[b]))}return s}))}}function addBorder(t,s,b){if(t.border){if(/[.']-+[.']/.test(s)){return""}if(s.trim().length!==0){return b}return" "}return""}function _minWidth(t){const s=t.padding||[];const b=1+(s[B]||0)+(s[T]||0);if(t.border){return b+4}return b}function getWindowWidth(){if(typeof process==="object"&&process.stdout&&process.stdout.columns){return process.stdout.columns}return 80}function alignRight(t,s){t=t.trim();const b=U.stringWidth(t);if(b =s){return t}return" ".repeat(s-b>>1)+t}let U;function cliui(t,s){U=s;return new UI({width:(t===null||t===void 0?void 0:t.width)||getWindowWidth(),wrap:t===null||t===void 0?void 0:t.wrap})}const q=b(2577);const H=b(5591);const W=b(9824);function ui(t){return cliui(t,{stringWidth:q,stripAnsi:H,wrap:W})}t.exports=ui},452:(t,s,b)=>{"use strict";var F=b(7147);var R=b(3837);var T=b(1017);let L;class Y18N{constructor(t){t=t||{};this.directory=t.directory||"./locales";this.updateFiles=typeof t.updateFiles==="boolean"?t.updateFiles:true;this.locale=t.locale||"en";this.fallbackToLanguage=typeof t.fallbackToLanguage==="boolean"?t.fallbackToLanguage:true;this.cache=Object.create(null);this.writeQueue=[]}__(...t){if(typeof arguments[0]!=="string"){return this._taggedLiteral(arguments[0],...arguments)}const s=t.shift();let cb=function(){};if(typeof t[t.length-1]==="function")cb=t.pop();cb=cb||function(){};if(!this.cache[this.locale])this._readLocaleFile();if(!this.cache[this.locale][s]&&this.updateFiles){this.cache[this.locale][s]=s;this._enqueueWrite({directory:this.directory,locale:this.locale,cb:cb})}else{cb()}return L.format.apply(L.format,[this.cache[this.locale][s]||s].concat(t))}__n(){const t=Array.prototype.slice.call(arguments);const s=t.shift();const b=t.shift();const F=t.shift();let cb=function(){};if(typeof t[t.length-1]==="function")cb=t.pop();if(!this.cache[this.locale])this._readLocaleFile();let R=F===1?s:b;if(this.cache[this.locale][s]){const t=this.cache[this.locale][s];R=t[F===1?"one":"other"]}if(!this.cache[this.locale][s]&&this.updateFiles){this.cache[this.locale][s]={one:s,other:b};this._enqueueWrite({directory:this.directory,locale:this.locale,cb:cb})}else{cb()}const T=[R];if(~R.indexOf("%d"))T.push(F);return L.format.apply(L.format,T.concat(t))}setLocale(t){this.locale=t}getLocale(){return this.locale}updateLocale(t){if(!this.cache[this.locale])this._readLocaleFile();for(const s in t){if(Object.prototype.hasOwnProperty.call(t,s)){this.cache[this.locale][s]=t[s]}}}_taggedLiteral(t,...s){let b="";t.forEach((function(t,F){const R=s[F+1];b+=t;if(typeof R!=="undefined"){b+="%s"}}));return this.__.apply(this,[b].concat([].slice.call(s,1)))}_enqueueWrite(t){this.writeQueue.push(t);if(this.writeQueue.length===1)this._processWriteQueue()}_processWriteQueue(){const t=this;const s=this.writeQueue[0];const b=s.directory;const F=s.locale;const R=s.cb;const T=this._resolveLocaleFile(b,F);const B=JSON.stringify(this.cache[F],null,2);L.fs.writeFile(T,B,"utf-8",(function(s){t.writeQueue.shift();if(t.writeQueue.length>0)t._processWriteQueue();R(s)}))}_readLocaleFile(){let t={};const s=this._resolveLocaleFile(this.directory,this.locale);try{if(L.fs.readFileSync){t=JSON.parse(L.fs.readFileSync(s,"utf-8"))}}catch(b){if(b instanceof SyntaxError){b.message="syntax error in "+s}if(b.code==="ENOENT")t={};else throw b}this.cache[this.locale]=t}_resolveLocaleFile(t,s){let b=L.resolve(t,"./",s+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(b)&&~s.lastIndexOf("_")){const F=L.resolve(t,"./",s.split("_")[0]+".json");if(this._fileExistsSync(F))b=F}return b}_fileExistsSync(t){return L.exists(t)}}function y18n$1(t,s){L=s;const b=new Y18N(t);return{__:b.__.bind(b),__n:b.__n.bind(b),setLocale:b.setLocale.bind(b),getLocale:b.getLocale.bind(b),updateLocale:b.updateLocale.bind(b),locale:b.locale}}var B={fs:{readFileSync:F.readFileSync,writeFile:F.writeFile},format:R.format,resolve:T.resolve,exists:t=>{try{return F.statSync(t).isFile()}catch(t){return false}}};const y18n=t=>y18n$1(t,B);t.exports=y18n},9562:(t,s,b)=>{"use strict";var F=b(9491);class e extends Error{constructor(t){super(t||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}}let R,T=[];function n(t,s,F,L){R=L;let B={};if(Object.prototype.hasOwnProperty.call(t,"extends")){if("string"!=typeof t.extends)return B;const L=/\.json|\..*rc$/.test(t.extends);let U=null;if(L)U=function(t,s){return R.path.resolve(t,s)}(s,t.extends);else try{U=b(9167).resolve(t.extends)}catch(s){return t}!function(t){if(T.indexOf(t)>-1)throw new e(`Circular extended configurations: '${t}'.`)}(U),T.push(U),B=L?JSON.parse(R.readFileSync(U,"utf8")):b(9167)(t.extends),delete t.extends,B=n(B,R.path.dirname(U),F,R)}return T=[],F?r(B,t):Object.assign({},B,t)}function r(t,s){const b={};function i(t){return t&&"object"==typeof t&&!Array.isArray(t)}Object.assign(b,t);for(const F of Object.keys(s))i(s[F])&&i(b[F])?b[F]=r(t[F],s[F]):b[F]=s[F];return b}function o(t){const s=t.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),b=/\.*[\][<>]/g,F=s.shift();if(!F)throw new Error(`No command found in: ${t}`);const R={cmd:F.replace(b,""),demanded:[],optional:[]};return s.forEach(((t,F)=>{let T=!1;t=t.replace(/\s/g,""),/\.+[\]>]/.test(t)&&F===s.length-1&&(T=!0),/^\[/.test(t)?R.optional.push({cmd:t.replace(b,"").split("|"),variadic:T}):R.demanded.push({cmd:t.replace(b,"").split("|"),variadic:T})})),R}const L=["first","second","third","fourth","fifth","sixth"];function h(t,s,b){try{let F=0;const[R,T,L]="object"==typeof t?[{demanded:[],optional:[]},t,s]:[o(`cmd ${t}`),s,b],B=[].slice.call(T);for(;B.length&&void 0===B[B.length-1];)B.pop();const U=L||B.length;if(Uq)throw new e(`Too many arguments provided. Expected max ${q} but received ${U}.`);R.demanded.forEach((t=>{const s=l(B.shift());0===t.cmd.filter((t=>t===s||"*"===t)).length&&c(s,t.cmd,F),F+=1})),R.optional.forEach((t=>{if(0===B.length)return;const s=l(B.shift());0===t.cmd.filter((t=>t===s||"*"===t)).length&&c(s,t.cmd,F),F+=1}))}catch(t){console.warn(t.stack)}}function l(t){return Array.isArray(t)?"array":null===t?"null":typeof t}function c(t,s,b){throw new e(`Invalid ${L[b]||"manyith"} argument. Expected ${s.join(" or ")} but received ${t}.`)}function f(t){return!!t&&!!t.then&&"function"==typeof t.then}function d(t,s,b,F){b.assert.notStrictEqual(t,s,F)}function u(t,s){s.assert.strictEqual(typeof t,"string")}function p(t){return Object.keys(t)}function g(t={},s=(()=>!0)){const b={};return p(t).forEach((F=>{s(F,t[F])&&(b[F]=t[F])})),b}function m(){return process.versions.electron&&!process.defaultApp?0:1}function y(){return process.argv[m()]}var B=Object.freeze({__proto__:null,hideBin:function(t){return t.slice(m()+1)},getProcessArgvBin:y});function v(t,s,b,F){if("a"===b&&!F)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof s?t!==s||!F:!s.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===b?F:"a"===b?F.call(t):F?F.value:s.get(t)}function O(t,s,b,F,R){if("m"===F)throw new TypeError("Private method is not writable");if("a"===F&&!R)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof s?t!==s||!R:!s.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===F?R.call(t,b):R?R.value=b:s.set(t,b),b}class w{constructor(t){this.globalMiddleware=[],this.frozens=[],this.yargs=t}addMiddleware(t,s,b=!0,F=!1){if(h(" [boolean] [boolean] [boolean]",[t,s,b],arguments.length),Array.isArray(t)){for(let F=0;F {const F=[...b[s]||[],s];return!t.option||!F.includes(t.option)})),t.option=s,this.addMiddleware(t,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){const t=this.frozens.pop();void 0!==t&&(this.globalMiddleware=t)}reset(){this.globalMiddleware=this.globalMiddleware.filter((t=>t.global))}}function C(t,s,b,F){return b.reduce(((t,b)=>{if(b.applyBeforeValidation!==F)return t;if(b.mutates){if(b.applied)return t;b.applied=!0}if(f(t))return t.then((t=>Promise.all([t,b(t,s)]))).then((([t,s])=>Object.assign(t,s)));{const F=b(t,s);return f(F)?F.then((s=>Object.assign(t,s))):Object.assign(t,F)}}),t)}function j(t,s,b=(t=>{throw t})){try{const b="function"==typeof t?t():t;return f(b)?b.then((t=>s(t))):s(b)}catch(t){return b(t)}}const U=/(^\*)|(^\$0)/;class M{constructor(t,s,b,F){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=F,this.usage=t,this.globalMiddleware=b,this.validation=s}addDirectory(t,s,b,F){"boolean"!=typeof(F=F||{}).recurse&&(F.recurse=!1),Array.isArray(F.extensions)||(F.extensions=["js"]);const R="function"==typeof F.visit?F.visit:t=>t;F.visit=(t,s,b)=>{const F=R(t,s,b);if(F){if(this.requireCache.has(s))return F;this.requireCache.add(s),this.addHandler(F)}return F},this.shim.requireDirectory({require:s,filename:b},t,F)}addHandler(t,s,b,F,R,T){let L=[];const B=function(t){return t?t.map((t=>(t.applyBeforeValidation=!1,t))):[]}(R);if(F=F||(()=>{}),Array.isArray(t))if(function(t){return t.every((t=>"string"==typeof t))}(t))[t,...L]=t;else for(const s of t)this.addHandler(s);else{if(function(t){return"object"==typeof t&&!Array.isArray(t)}(t)){let s=Array.isArray(t.command)||"string"==typeof t.command?t.command:this.moduleName(t);return t.aliases&&(s=[].concat(s).concat(t.aliases)),void this.addHandler(s,this.extractDesc(t),t.builder,t.handler,t.middlewares,t.deprecated)}if(k(b))return void this.addHandler([t].concat(L),s,b.builder,b.handler,b.middlewares,b.deprecated)}if("string"==typeof t){const R=o(t);L=L.map((t=>o(t).cmd));let q=!1;const H=[R.cmd].concat(L).filter((t=>!U.test(t)||(q=!0,!1)));0===H.length&&q&&H.push("$0"),q&&(R.cmd=H[0],L=H.slice(1),t=t.replace(U,R.cmd)),L.forEach((t=>{this.aliasMap[t]=R.cmd})),!1!==s&&this.usage.command(t,s,q,L,T),this.handlers[R.cmd]={original:t,description:s,handler:F,builder:b||{},middlewares:B,deprecated:T,demanded:R.demanded,optional:R.optional},q&&(this.defaultCommand=this.handlers[R.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(t,s,b,F,R,T){const L=this.handlers[t]||this.handlers[this.aliasMap[t]]||this.defaultCommand,B=s.getInternalMethods().getContext(),U=B.commands.slice(),q=!t;t&&(B.commands.push(t),B.fullCommands.push(L.original));const H=this.applyBuilderUpdateUsageAndParse(q,L,s,b.aliases,U,F,R,T);return f(H)?H.then((t=>this.applyMiddlewareAndGetResult(q,L,t.innerArgv,B,R,t.aliases,s))):this.applyMiddlewareAndGetResult(q,L,H.innerArgv,B,R,H.aliases,s)}applyBuilderUpdateUsageAndParse(t,s,b,F,R,T,L,B){const U=s.builder;let q=b;if(x(U)){const H=U(b.getInternalMethods().reset(F),B);if(f(H))return H.then((F=>{var B;return q=(B=F)&&"function"==typeof B.getInternalMethods?F:b,this.parseAndUpdateUsage(t,s,q,R,T,L)}))}else(function(t){return"object"==typeof t})(U)&&(q=b.getInternalMethods().reset(F),Object.keys(s.builder).forEach((t=>{q.option(t,U[t])})));return this.parseAndUpdateUsage(t,s,q,R,T,L)}parseAndUpdateUsage(t,s,b,F,R,T){t&&b.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(b)&&b.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(F,s),s.description);const L=b.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,R,T);return f(L)?L.then((t=>({aliases:b.parsed.aliases,innerArgv:t}))):{aliases:b.parsed.aliases,innerArgv:L}}shouldUpdateUsage(t){return!t.getInternalMethods().getUsageInstance().getUsageDisabled()&&0===t.getInternalMethods().getUsageInstance().getUsage().length}usageFromParentCommandsCommandHandler(t,s){const b=U.test(s.original)?s.original.replace(U,"").trim():s.original,F=t.filter((t=>!U.test(t)));return F.push(b),`$0 ${F.join(" ")}`}handleValidationAndGetResult(t,s,b,F,R,T,L,B){if(!T.getInternalMethods().getHasOutput()){const s=T.getInternalMethods().runValidation(R,B,T.parsed.error,t);b=j(b,(t=>(s(t),t)))}if(s.handler&&!T.getInternalMethods().getHasOutput()){T.getInternalMethods().setHasOutput();const F=!!T.getOptions().configuration["populate--"];T.getInternalMethods().postProcess(b,F,!1,!1),b=j(b=C(b,T,L,!1),(t=>{const b=s.handler(t);return f(b)?b.then((()=>t)):t})),t||T.getInternalMethods().getUsageInstance().cacheHelpMessage(),f(b)&&!T.getInternalMethods().hasParseCallback()&&b.catch((t=>{try{T.getInternalMethods().getUsageInstance().fail(null,t)}catch(t){}}))}return t||(F.commands.pop(),F.fullCommands.pop()),b}applyMiddlewareAndGetResult(t,s,b,F,R,T,L){let B={};if(R)return b;L.getInternalMethods().getHasOutput()||(B=this.populatePositionals(s,b,F,L));const U=this.globalMiddleware.getMiddleware().slice(0).concat(s.middlewares),q=C(b,L,U,!0);return f(q)?q.then((b=>this.handleValidationAndGetResult(t,s,b,F,T,L,U,B))):this.handleValidationAndGetResult(t,s,q,F,T,L,U,B)}populatePositionals(t,s,b,F){s._=s._.slice(b.commands.length);const R=t.demanded.slice(0),T=t.optional.slice(0),L={};for(this.validation.positionalCount(R.length,s._.length);R.length;){const t=R.shift();this.populatePositional(t,s,L)}for(;T.length;){const t=T.shift();this.populatePositional(t,s,L)}return s._=b.commands.concat(s._.map((t=>""+t))),this.postProcessPositionals(s,L,this.cmdToParseOptions(t.original),F),L}populatePositional(t,s,b){const F=t.cmd[0];t.variadic?b[F]=s._.splice(0).map(String):s._.length&&(b[F]=[String(s._.shift())])}cmdToParseOptions(t){const s={array:[],default:{},alias:{},demand:{}},b=o(t);return b.demanded.forEach((t=>{const[b,...F]=t.cmd;t.variadic&&(s.array.push(b),s.default[b]=[]),s.alias[b]=F,s.demand[b]=!0})),b.optional.forEach((t=>{const[b,...F]=t.cmd;t.variadic&&(s.array.push(b),s.default[b]=[]),s.alias[b]=F})),s}postProcessPositionals(t,s,b,F){const R=Object.assign({},F.getOptions());R.default=Object.assign(b.default,R.default);for(const t of Object.keys(b.alias))R.alias[t]=(R.alias[t]||[]).concat(b.alias[t]);R.array=R.array.concat(b.array),R.config={};const T=[];if(Object.keys(s).forEach((t=>{s[t].map((s=>{R.configuration["unknown-options-as-args"]&&(R.key[t]=!0),T.push(`--${t}`),T.push(s)}))})),!T.length)return;const L=Object.assign({},R.configuration,{"populate--":!1}),B=this.shim.Parser.detailed(T,Object.assign({},R,{configuration:L}));if(B.error)F.getInternalMethods().getUsageInstance().fail(B.error.message,B.error);else{const b=Object.keys(s);Object.keys(s).forEach((t=>{b.push(...B.aliases[t])})),Object.keys(B.argv).forEach((R=>{b.includes(R)&&(s[R]||(s[R]=B.argv[R]),!this.isInConfigs(F,R)&&!this.isDefaulted(F,R)&&Object.prototype.hasOwnProperty.call(t,R)&&Object.prototype.hasOwnProperty.call(B.argv,R)&&(Array.isArray(t[R])||Array.isArray(B.argv[R]))?t[R]=[].concat(t[R],B.argv[R]):t[R]=B.argv[R])}))}}isDefaulted(t,s){const{default:b}=t.getOptions();return Object.prototype.hasOwnProperty.call(b,s)||Object.prototype.hasOwnProperty.call(b,this.shim.Parser.camelCase(s))}isInConfigs(t,s){const{configObjects:b}=t.getOptions();return b.some((t=>Object.prototype.hasOwnProperty.call(t,s)))||b.some((t=>Object.prototype.hasOwnProperty.call(t,this.shim.Parser.camelCase(s))))}runDefaultBuilderOn(t){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(t)){const s=U.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");t.getInternalMethods().getUsageInstance().usage(s,this.defaultCommand.description)}const s=this.defaultCommand.builder;if(x(s))return s(t,!0);k(s)||Object.keys(s).forEach((b=>{t.option(b,s[b])}))}moduleName(t){const s=function(t){if(false){}for(let s,F=0,R=Object.keys(b.c);F {const b=s;b._handle&&b.isTTY&&"function"==typeof b._handle.setBlocking&&b._handle.setBlocking(t)}))}function A(t){return"boolean"==typeof t}function P(t,s){const b=s.y18n.__,F={},R=[];F.failFn=function(t){R.push(t)};let T=null,L=null,B=!0;F.showHelpOnFail=function(s=!0,b){const[R,U]="string"==typeof s?[!0,s]:[s,b];return t.getInternalMethods().isGlobalContext()&&(L=U),T=U,B=R,F};let U=!1;F.fail=function(s,b){const q=t.getInternalMethods().getLoggerInstance();if(!R.length){if(t.getExitProcess()&&E(!0),!U){U=!0,B&&(t.showHelp("error"),q.error()),(s||b)&&q.error(s||b);const F=T||L;F&&((s||b)&&q.error(""),q.error(F))}if(b=b||new e(s),t.getExitProcess())return t.exit(1);if(t.getInternalMethods().hasParseCallback())return t.exit(1,b);throw b}for(let t=R.length-1;t>=0;--t){const T=R[t];if(A(T)){if(b)throw b;if(s)throw Error(s)}else T(s,b,F)}};let q=[],H=!1;F.usage=(t,s)=>null===t?(H=!0,q=[],F):(H=!1,q.push([t,s||""]),F),F.getUsage=()=>q,F.getUsageDisabled=()=>H,F.getPositionalGroupName=()=>b("Positionals:");let W=[];F.example=(t,s)=>{W.push([t,s||""])};let V=[];F.command=function(t,s,b,F,R=!1){b&&(V=V.map((t=>(t[2]=!1,t)))),V.push([t,s||"",b,F,R])},F.getCommands=()=>V;let G={};F.describe=function(t,s){Array.isArray(t)?t.forEach((t=>{F.describe(t,s)})):"object"==typeof t?Object.keys(t).forEach((s=>{F.describe(s,t[s])})):G[t]=s},F.getDescriptions=()=>G;let z=[];F.epilog=t=>{z.push(t)};let Y,X=!1;function v(){return X||(Y=function(){const t=80;return s.process.stdColumns?Math.min(t,s.process.stdColumns):t}(),X=!0),Y}F.wrap=t=>{X=!0,Y=t};const K="__yargsString__:";function w(t,b,F){let R=0;return Array.isArray(t)||(t=Object.values(t).map((t=>[t]))),t.forEach((t=>{R=Math.max(s.stringWidth(F?`${F} ${I(t[0])}`:I(t[0]))+$(t[0]),R)})),b&&(R=Math.min(R,parseInt((.5*b).toString(),10))),R}let J;function j(s){return t.getOptions().hiddenOptions.indexOf(s)<0||t.parsed.argv[t.getOptions().showHiddenOpt]}function _(t,s){let F=`[${b("default:")} `;if(void 0===t&&!s)return null;if(s)F+=s;else switch(typeof t){case"string":F+=`"${t}"`;break;case"object":F+=JSON.stringify(t);break;default:F+=t}return`${F}]`}F.deferY18nLookup=t=>K+t,F.help=function(){if(J)return J;!function(){const s=t.getDemandedOptions(),b=t.getOptions();(Object.keys(b.alias)||[]).forEach((R=>{b.alias[R].forEach((T=>{G[T]&&F.describe(R,G[T]),T in s&&t.demandOption(R,s[T]),b.boolean.includes(T)&&t.boolean(R),b.count.includes(T)&&t.count(R),b.string.includes(T)&&t.string(R),b.normalize.includes(T)&&t.normalize(R),b.array.includes(T)&&t.array(R),b.number.includes(T)&&t.number(R)}))}))}();const R=t.customScriptName?t.$0:s.path.basename(t.$0),T=t.getDemandedOptions(),L=t.getDemandedCommands(),B=t.getDeprecatedOptions(),U=t.getGroups(),Y=t.getOptions();let X=[];X=X.concat(Object.keys(G)),X=X.concat(Object.keys(T)),X=X.concat(Object.keys(L)),X=X.concat(Object.keys(Y.default)),X=X.filter(j),X=Object.keys(X.reduce(((t,s)=>("_"!==s&&(t[s]=!0),t)),{}));const Z=v(),Q=s.cliui({width:Z,wrap:!!Z});if(!H)if(q.length)q.forEach((t=>{Q.div({text:`${t[0].replace(/\$0/g,R)}`}),t[1]&&Q.div({text:`${t[1]}`,padding:[1,0,0,0]})})),Q.div();else if(V.length){let t=null;t=L._?`${R} <${b("command")}>\n`:`${R} [${b("command")}]\n`,Q.div(`${t}`)}if(V.length>1||1===V.length&&!V[0][2]){Q.div(b("Commands:"));const s=t.getInternalMethods().getContext(),F=s.commands.length?`${s.commands.join(" ")} `:"";!0===t.getInternalMethods().getParserConfiguration()["sort-commands"]&&(V=V.sort(((t,s)=>t[0].localeCompare(s[0]))));const T=R?`${R} `:"";V.forEach((t=>{const s=`${T}${F}${t[0].replace(/^\$0 ?/,"")}`;Q.span({text:s,padding:[0,2,0,2],width:w(V,Z,`${R}${F}`)+4},{text:t[1]});const L=[];t[2]&&L.push(`[${b("default")}]`),t[3]&&t[3].length&&L.push(`[${b("aliases:")} ${t[3].join(", ")}]`),t[4]&&("string"==typeof t[4]?L.push(`[${b("deprecated: %s",t[4])}]`):L.push(`[${b("deprecated")}]`)),L.length?Q.div({text:L.join(" "),padding:[0,0,0,2],align:"right"}):Q.div()})),Q.div()}const ee=(Object.keys(Y.alias)||[]).concat(Object.keys(t.parsed.newAliases)||[]);X=X.filter((s=>!t.parsed.newAliases[s]&&ee.every((t=>-1===(Y.alias[t]||[]).indexOf(s)))));const te=b("Options:");U[te]||(U[te]=[]),function(t,s,b,F){let R=[],T=null;Object.keys(b).forEach((t=>{R=R.concat(b[t])})),t.forEach((t=>{T=[t].concat(s[t]),T.some((t=>-1!==R.indexOf(t)))||b[F].push(t)}))}(X,Y.alias,U,te);const x=t=>/^--/.test(I(t)),ne=Object.keys(U).filter((t=>U[t].length>0)).map((t=>({groupName:t,normalizedKeys:U[t].filter(j).map((t=>{if(ee.includes(t))return t;for(let s,b=0;void 0!==(s=ee[b]);b++)if((Y.alias[s]||[]).includes(t))return s;return t}))}))).filter((({normalizedKeys:t})=>t.length>0)).map((({groupName:t,normalizedKeys:s})=>{const b=s.reduce(((s,b)=>(s[b]=[b].concat(Y.alias[b]||[]).map((s=>t===F.getPositionalGroupName()?s:(/^[0-9]$/.test(s)?Y.boolean.includes(b)?"-":"--":s.length>1?"--":"-")+s)).sort(((t,s)=>x(t)===x(s)?0:x(t)?1:-1)).join(", "),s)),{});return{groupName:t,normalizedKeys:s,switches:b}}));if(ne.filter((({groupName:t})=>t!==F.getPositionalGroupName())).some((({normalizedKeys:t,switches:s})=>!t.every((t=>x(s[t])))))&&ne.filter((({groupName:t})=>t!==F.getPositionalGroupName())).forEach((({normalizedKeys:t,switches:s})=>{t.forEach((t=>{var b,F;x(s[t])&&(s[t]=(b=s[t],F="-x, ".length,S(b)?{text:b.text,indentation:b.indentation+F}:{text:b,indentation:F}))}))})),ne.forEach((({groupName:t,normalizedKeys:s,switches:R})=>{Q.div(t),s.forEach((t=>{const s=R[t];let L=G[t]||"",U=null;L.includes(K)&&(L=b(L.substring(K.length))),Y.boolean.includes(t)&&(U=`[${b("boolean")}]`),Y.count.includes(t)&&(U=`[${b("count")}]`),Y.string.includes(t)&&(U=`[${b("string")}]`),Y.normalize.includes(t)&&(U=`[${b("string")}]`),Y.array.includes(t)&&(U=`[${b("array")}]`),Y.number.includes(t)&&(U=`[${b("number")}]`);const q=[t in B?(H=B[t],"string"==typeof H?`[${b("deprecated: %s",H)}]`:`[${b("deprecated")}]`):null,U,t in T?`[${b("required")}]`:null,Y.choices&&Y.choices[t]?`[${b("choices:")} ${F.stringifiedValues(Y.choices[t])}]`:null,_(Y.default[t],Y.defaultDescription[t])].filter(Boolean).join(" ");var H;Q.span({text:I(s),padding:[0,2,0,2+$(s)],width:w(R,Z)+4},L),q?Q.div({text:q,padding:[0,0,0,2],align:"right"}):Q.div()})),Q.div()})),W.length&&(Q.div(b("Examples:")),W.forEach((t=>{t[0]=t[0].replace(/\$0/g,R)})),W.forEach((t=>{""===t[1]?Q.div({text:t[0],padding:[0,2,0,2]}):Q.div({text:t[0],padding:[0,2,0,2],width:w(W,Z)+4},{text:t[1]})})),Q.div()),z.length>0){const t=z.map((t=>t.replace(/\$0/g,R))).join("\n");Q.div(`${t}\n`)}return Q.toString().replace(/\s*$/,"")},F.cacheHelpMessage=function(){J=this.help()},F.clearCachedHelpMessage=function(){J=void 0},F.hasCachedHelpMessage=function(){return!!J},F.showHelp=s=>{const b=t.getInternalMethods().getLoggerInstance();s||(s="error");("function"==typeof s?s:b[s])(F.help())},F.functionDescription=t=>["(",t.name?s.Parser.decamelize(t.name,"-"):b("generated-value"),")"].join(""),F.stringifiedValues=function(t,s){let b="";const F=s||", ",R=[].concat(t);return t&&R.length?(R.forEach((t=>{b.length&&(b+=F),b+=JSON.stringify(t)})),b):b};let Z=null;F.version=t=>{Z=t},F.showVersion=s=>{const b=t.getInternalMethods().getLoggerInstance();s||(s="error");("function"==typeof s?s:b[s])(Z)},F.reset=function(t){return T=null,U=!1,q=[],H=!1,z=[],W=[],V=[],G=g(G,(s=>!t[s])),F};const Q=[];return F.freeze=function(){Q.push({failMessage:T,failureOutput:U,usages:q,usageDisabled:H,epilogs:z,examples:W,commands:V,descriptions:G})},F.unfreeze=function(t=!1){const s=Q.pop();s&&(t?(G={...s.descriptions,...G},V=[...s.commands,...V],q=[...s.usages,...q],W=[...s.examples,...W],z=[...s.epilogs,...z]):({failMessage:T,failureOutput:U,usages:q,usageDisabled:H,epilogs:z,examples:W,commands:V,descriptions:G}=s))},F}function S(t){return"object"==typeof t}function $(t){return S(t)?t.indentation:0}function I(t){return S(t)?t.text:t}class D{constructor(t,s,b,F){var R,T,L;this.yargs=t,this.usage=s,this.command=b,this.shim=F,this.completionKey="get-yargs-completions",this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=null!==(L=(null===(R=this.shim.getEnv("SHELL"))||void 0===R?void 0:R.includes("zsh"))||(null===(T=this.shim.getEnv("ZSH_NAME"))||void 0===T?void 0:T.includes("zsh")))&&void 0!==L&&L}defaultCompletion(t,s,b,F){const R=this.command.getCommandHandlers();for(let s=0,b=t.length;s{const F=o(b[0]).cmd;if(-1===s.indexOf(F))if(this.zshShell){const s=b[1]||"";t.push(F.replace(/:/g,"\\:")+":"+s)}else t.push(F)}))}optionCompletions(t,s,b,F){if((F.match(/^-/)||""===F&&0===t.length)&&!this.previousArgHasChoices(s)){const b=this.yargs.getOptions(),R=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(b.key).forEach((T=>{const L=!!b.configuration["boolean-negation"]&&b.boolean.includes(T);R.includes(T)||b.hiddenOptions.includes(T)||this.argsContainKey(s,T,L)||(this.completeOptionKey(T,t,F),L&&b.default[T]&&this.completeOptionKey(`no-${T}`,t,F))}))}}choicesFromOptionsCompletions(t,s,b,F){if(this.previousArgHasChoices(s)){const b=this.getPreviousArgChoices(s);b&&b.length>0&&t.push(...b.map((t=>t.replace(/:/g,"\\:"))))}}choicesFromPositionalsCompletions(t,s,b,F){if(""===F&&t.length>0&&this.previousArgHasChoices(s))return;const R=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],T=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),L=R[b._.length-T-1];if(!L)return;const B=this.yargs.getOptions().choices[L]||[];for(const s of B)s.startsWith(F)&&t.push(s.replace(/:/g,"\\:"))}getPreviousArgChoices(t){if(t.length<1)return;let s=t[t.length-1],b="";if(!s.startsWith("-")&&t.length>1&&(b=s,s=t[t.length-2]),!s.startsWith("-"))return;const F=s.replace(/^-+/,""),R=this.yargs.getOptions(),T=[F,...this.yargs.getAliases()[F]||[]];let L;for(const t of T)if(Object.prototype.hasOwnProperty.call(R.key,t)&&Array.isArray(R.choices[t])){L=R.choices[t];break}return L?L.filter((t=>!b||t.startsWith(b))):void 0}previousArgHasChoices(t){const s=this.getPreviousArgChoices(t);return void 0!==s&&s.length>0}argsContainKey(t,s,b){const i=s=>-1!==t.indexOf((/^[^0-9]$/.test(s)?"-":"--")+s);if(i(s))return!0;if(b&&i(`no-${s}`))return!0;if(this.aliases)for(const t of this.aliases[s])if(i(t))return!0;return!1}completeOptionKey(t,s,b){const F=this.usage.getDescriptions(),R=!/^--/.test(b)&&(t=>/^[^0-9]$/.test(t))(t)?"-":"--";if(this.zshShell){const b=F[t]||"";s.push(R+`${t.replace(/:/g,"\\:")}:${b.replace("__yargsString__:","")}`)}else s.push(R+t)}customCompletion(t,s,b,F){if(d(this.customCompletionFunction,null,this.shim),this.customCompletionFunction.length<3){const t=this.customCompletionFunction(b,s);return f(t)?t.then((t=>{this.shim.process.nextTick((()=>{F(null,t)}))})).catch((t=>{this.shim.process.nextTick((()=>{F(t,void 0)}))})):F(null,t)}return function(t){return t.length>3}(this.customCompletionFunction)?this.customCompletionFunction(b,s,((R=F)=>this.defaultCompletion(t,s,b,R)),(t=>{F(null,t)})):this.customCompletionFunction(b,s,(t=>{F(null,t)}))}getCompletion(t,s){const b=t.length?t[t.length-1]:"",F=this.yargs.parse(t,!0),R=this.customCompletionFunction?F=>this.customCompletion(t,F,b,s):F=>this.defaultCompletion(t,F,b,s);return f(F)?F.then(R):R(F)}generateCompletionScript(t,s){let b=this.zshShell?'#compdef {{app_name}}\n###-begin-{{app_name}}-completions-###\n#\n# yargs command completion script\n#\n# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc\n# or {{app_path}} {{completion_command}} >> ~/.zprofile on OSX.\n#\n_{{app_name}}_yargs_completions()\n{\n local reply\n local si=$IFS\n IFS=$\'\n\' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "${words[@]}"))\n IFS=$si\n _describe \'values\' reply\n}\ncompdef _{{app_name}}_yargs_completions {{app_name}}\n###-end-{{app_name}}-completions-###\n':'###-begin-{{app_name}}-completions-###\n#\n# yargs command completion script\n#\n# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc\n# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX.\n#\n_{{app_name}}_yargs_completions()\n{\n local cur_word args type_list\n\n cur_word="${COMP_WORDS[COMP_CWORD]}"\n args=("${COMP_WORDS[@]}")\n\n # ask yargs to generate completions.\n type_list=$({{app_path}} --get-yargs-completions "${args[@]}")\n\n COMPREPLY=( $(compgen -W "${type_list}" -- ${cur_word}) )\n\n # if no match was found, fall back to filename completion\n if [ ${#COMPREPLY[@]} -eq 0 ]; then\n COMPREPLY=()\n fi\n\n return 0\n}\ncomplete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}}\n###-end-{{app_name}}-completions-###\n';const F=this.shim.path.basename(t);return t.match(/\.js$/)&&(t=`./${t}`),b=b.replace(/{{app_name}}/g,F),b=b.replace(/{{completion_command}}/g,s),b.replace(/{{app_path}}/g,t)}registerFunction(t){this.customCompletionFunction=t}setParsed(t){this.aliases=t.aliases}}function N(t,s){if(0===t.length)return s.length;if(0===s.length)return t.length;const b=[];let F,R;for(F=0;F<=s.length;F++)b[F]=[F];for(R=0;R<=t.length;R++)b[0][R]=R;for(F=1;F<=s.length;F++)for(R=1;R<=t.length;R++)s.charAt(F-1)===t.charAt(R-1)?b[F][R]=b[F-1][R-1]:F>1&&R>1&&s.charAt(F-2)===t.charAt(R-1)&&s.charAt(F-1)===t.charAt(R-2)?b[F][R]=b[F-2][R-2]+1:b[F][R]=Math.min(b[F-1][R-1]+1,Math.min(b[F][R-1]+1,b[F-1][R]+1));return b[s.length][t.length]}const q=["$0","--","_"];var H,W,V,G,z,Y,X,K,J,Z,Q,ee,te,ne,re,ie,se,oe,ae,ue,le,ce,fe,de,he,pe,ge,me,De,ve,ye,Ee,be,we;const Ce=Symbol("copyDoubleDash"),Oe=Symbol("copyDoubleDash"),Ae=Symbol("deleteFromParserHintObject"),_e=Symbol("emitWarning"),Fe=Symbol("freeze"),Se=Symbol("getDollarZero"),xe=Symbol("getParserConfiguration"),ke=Symbol("guessLocale"),je=Symbol("guessVersion"),Pe=Symbol("parsePositionalNumbers"),Re=Symbol("pkgUp"),Ie=Symbol("populateParserHintArray"),Me=Symbol("populateParserHintSingleValueDictionary"),Te=Symbol("populateParserHintArrayDictionary"),Ne=Symbol("populateParserHintDictionary"),Le=Symbol("sanitizeKey"),Be=Symbol("setKey"),$e=Symbol("unfreeze"),Ue=Symbol("validateAsync"),qe=Symbol("getCommandInstance"),He=Symbol("getContext"),We=Symbol("getHasOutput"),Ve=Symbol("getLoggerInstance"),Ge=Symbol("getParseContext"),ze=Symbol("getUsageInstance"),Ye=Symbol("getValidationInstance"),Xe=Symbol("hasParseCallback"),Ke=Symbol("isGlobalContext"),Je=Symbol("postProcess"),Ze=Symbol("rebase"),Qe=Symbol("reset"),et=Symbol("runYargsParserAndExecuteCommands"),tt=Symbol("runValidation"),nt=Symbol("setHasOutput"),rt=Symbol("kTrackManuallySetKeys");class Xt{constructor(t=[],s,b,F){this.customScriptName=!1,this.parsed=!1,H.set(this,void 0),W.set(this,void 0),V.set(this,{commands:[],fullCommands:[]}),G.set(this,null),z.set(this,null),Y.set(this,"show-hidden"),X.set(this,null),K.set(this,!0),J.set(this,{}),Z.set(this,!0),Q.set(this,[]),ee.set(this,void 0),te.set(this,{}),ne.set(this,!1),re.set(this,null),ie.set(this,!0),se.set(this,void 0),oe.set(this,""),ae.set(this,void 0),ue.set(this,void 0),le.set(this,{}),ce.set(this,null),fe.set(this,null),de.set(this,{}),he.set(this,{}),pe.set(this,void 0),ge.set(this,!1),me.set(this,void 0),De.set(this,!1),ve.set(this,!1),ye.set(this,!1),Ee.set(this,void 0),be.set(this,null),we.set(this,void 0),O(this,me,F,"f"),O(this,pe,t,"f"),O(this,W,s,"f"),O(this,ue,b,"f"),O(this,ee,new w(this),"f"),this.$0=this[Se](),this[Qe](),O(this,H,v(this,H,"f"),"f"),O(this,Ee,v(this,Ee,"f"),"f"),O(this,we,v(this,we,"f"),"f"),O(this,ae,v(this,ae,"f"),"f"),v(this,ae,"f").showHiddenOpt=v(this,Y,"f"),O(this,se,this[Oe](),"f")}addHelpOpt(t,s){return h("[string|boolean] [string]",[t,s],arguments.length),v(this,re,"f")&&(this[Ae](v(this,re,"f")),O(this,re,null,"f")),!1===t&&void 0===s||(O(this,re,"string"==typeof t?t:"help","f"),this.boolean(v(this,re,"f")),this.describe(v(this,re,"f"),s||v(this,Ee,"f").deferY18nLookup("Show help"))),this}help(t,s){return this.addHelpOpt(t,s)}addShowHiddenOpt(t,s){if(h("[string|boolean] [string]",[t,s],arguments.length),!1===t&&void 0===s)return this;const b="string"==typeof t?t:v(this,Y,"f");return this.boolean(b),this.describe(b,s||v(this,Ee,"f").deferY18nLookup("Show hidden options")),v(this,ae,"f").showHiddenOpt=b,this}showHidden(t,s){return this.addShowHiddenOpt(t,s)}alias(t,s){return h("