From 4ab3589ed2f2cfd7ad620217486baa497bfee67d Mon Sep 17 00:00:00 2001 From: Tom Keller <1083460+kellertk@users.noreply.github.com> Date: Thu, 28 May 2026 14:44:54 -0700 Subject: [PATCH] chore: replay 6.2 devel changes onto main (#1807) * chore(deps-dev): bump vitest from 3.2.4 to 4.1.5 (#1748) * chore(deps-dev): bump vitest from 3.2.4 to 4.1.5 Bumps [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) from 3.2.4 to 4.1.5. - [Release notes](https://github.com/vitest-dev/vitest/releases) - [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.5/packages/vitest) --- updated-dependencies: - dependency-name: vitest dependency-version: 4.1.5 dependency-type: direct:development update-type: version-update:semver-major ... * chore(deps-dev): update @vitest/coverage-v8 Bump @vitest/coverage-v8 to ^4.1.5 to match peer dependency, and move vi.mock('node:fs') calls to the top level of test files to reflect actual hoisting semantics required by vitest 4.x. --------- (cherry picked from commit 78f374f6d1e7f4d1def8353d2a26416a3e668054) * chore(deps): bump @actions/core from 2.0.3 to 3.0.1 (#1746) * chore(deps): bump @actions/core from 2.0.3 to 3.0.1 Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 2.0.3 to 3.0.1. - [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md) - [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core) --- updated-dependencies: - dependency-name: "@actions/core" dependency-version: 3.0.1 dependency-type: direct:production update-type: version-update:semver-major ... * chore: update test mocks for @actions/core ESM @actions/core v3 ships as an ESM module with non-configurable exports, breaking vi.spyOn(). Switch to vi.mock('@actions/core') which intercepts at the module loader level. --------- (cherry picked from commit 64d8e82527cd8f525f030178565e65c3e96985f0) * chore(deps): bump @aws-sdk/client-sts from 3.1043.0 to 3.1044.0 (#1754) Bumps [@aws-sdk/client-sts](https://github.com/aws/aws-sdk-js-v3/tree/HEAD/clients/client-sts) from 3.1043.0 to 3.1044.0. - [Release notes](https://github.com/aws/aws-sdk-js-v3/releases) - [Changelog](https://github.com/aws/aws-sdk-js-v3/blob/main/clients/client-sts/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-js-v3/commits/v3.1044.0/clients/client-sts) --- updated-dependencies: - dependency-name: "@aws-sdk/client-sts" dependency-version: 3.1042.0 dependency-type: direct:production update-type: version-update:semver-minor ... (cherry picked from commit 4cfda40a13a617661c61bbea22188e90072afad0) * chore: bump unit test node version (#1758) (cherry picked from commit 39d17027214c196ae8a0703cf80b50cb47ab1a38) * chore: automatic major version tagging (#1565) * Update release-please.yml to auto-update version tag * chore: configure release-please auto floating tag --------- (cherry picked from commit c36525a56725db0e07d7ff5df639c0af8ce4fe17) * feat: Allow custom session tags to be passed when assuming a role (#1759) * Add possibility to input custom session tags * Use json for input to custom-tags, add documentation for custom-tags * Add more examples * Simplify example to avoid parse error * Add input validation for custom tags * Fix unit tests for custom-tags * Add debugging message * Skip failing test for now * Build package * Remove some unused validation for custom tags * feat: add validation for custom session tags Harden the custom-tags feature against misuse and misconfiguration: - Validate input is a JSON object (reject arrays, primitives, null) - Enforce STS tag constraints: key length (128), value length (256), allowed characters - Reject nested object/array values that would silently stringify to '[object Object]' - Block overriding default session tags (GitHub, Repository, Workflow, etc.) - Enforce 50-tag session limit - Warn when custom-tags used with OIDC or web identity - Fix missing await on helpers test assertion - Remove unused CUSTOM_TAGS_JSON_INPUTS fixture - Normalize test mocking to vi.mocked() pattern --------- (cherry picked from commit 61f50f630f383628add73c1eab3f1935ba07da2b) * chore: configure codeql to ignore generated code (#1760) (cherry picked from commit dc2353e57a69ebbfa86a53c338dd0f60277e6b21) * feat: support custom STS endpoints (#1762) Closes #1067. This is a advanced option and is not needed for most deployments. (cherry picked from commit 8d52d05d7a4521fa52b39de50cb6114b12e5c332) * chore: automate README version bumping (#1763) Closes #1420. (cherry picked from commit 07ada0fe07a23e36e59cd9063b7fcd8900b01013) * feat: add more retry logic and better logging (#1764) Wraps exportAccountId and validateCredentials calls in retryAndBackoff. Closes #1681. Adds a label parameter to retryAndBackoff for better info-level log messages. (cherry picked from commit 540d0c13aedb8d55501d220bd2f0b3cdedfe84e8) * feat: add regex validation to role-session-name (#1765) Previously invalid role session names would get errors from the STS API instead of this action rejecting them, causing unnecessary retries. Now we check them and fail early. Closes #1656. That FR recommended that we sanitize the name before sending to STS, but instead we error to not silently change the user's selected session name (avoiding the potential security sharp edge) (cherry picked from commit e35449909c6ede5083a48ba4b8bbfaaa1cf09ba1) * chore: update documentation for environment workflows (#1766) Closes #1238. (cherry picked from commit 3f7e1b63d77bea78bb0417be3ac5fffdd82e2678) * chore(deps): bump @aws-sdk/client-sts from 3.1044.0 to 3.1045.0 (#1767) Bumps [@aws-sdk/client-sts](https://github.com/aws/aws-sdk-js-v3/tree/HEAD/clients/client-sts) from 3.1044.0 to 3.1045.0. - [Release notes](https://github.com/aws/aws-sdk-js-v3/releases) - [Changelog](https://github.com/aws/aws-sdk-js-v3/blob/main/clients/client-sts/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-js-v3/commits/v3.1045.0/clients/client-sts) --- updated-dependencies: - dependency-name: "@aws-sdk/client-sts" dependency-version: 3.1045.0 dependency-type: direct:production update-type: version-update:semver-minor ... (cherry picked from commit a388f23f7d89e91f0f8ac855d98ba70f7a280106) * chore(deps-dev): bump @vitest/coverage-v8 from 4.1.5 to 4.1.6 (#1768) Bumps [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8) from 4.1.5 to 4.1.6. - [Release notes](https://github.com/vitest-dev/vitest/releases) - [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.6/packages/coverage-v8) --- updated-dependencies: - dependency-name: "@vitest/coverage-v8" dependency-version: 4.1.6 dependency-type: direct:development update-type: version-update:semver-patch ... (cherry picked from commit 1fb495c4b2bf15cc540e6a0747edae353cc57a1f) * chore(deps-dev): bump @smithy/property-provider from 4.2.14 to 4.3.1 (#1771) Bumps [@smithy/property-provider](https://github.com/smithy-lang/smithy-typescript/tree/HEAD/packages/property-provider) from 4.2.14 to 4.3.1. - [Release notes](https://github.com/smithy-lang/smithy-typescript/releases) - [Changelog](https://github.com/smithy-lang/smithy-typescript/blob/main/packages/property-provider/CHANGELOG.md) - [Commits](https://github.com/smithy-lang/smithy-typescript/commits/@smithy/property-provider@4.3.1/packages/property-provider) --- updated-dependencies: - dependency-name: "@smithy/property-provider" dependency-version: 4.3.1 dependency-type: direct:development update-type: version-update:semver-minor ... (cherry picked from commit 1ab31502aaebb98cfdc4ced2b6e1a2c68b9d96f7) * chore(deps): bump @smithy/node-http-handler from 4.6.1 to 4.7.1 (#1770) Bumps [@smithy/node-http-handler](https://github.com/smithy-lang/smithy-typescript/tree/HEAD/packages/node-http-handler) from 4.6.1 to 4.7.1. - [Release notes](https://github.com/smithy-lang/smithy-typescript/releases) - [Changelog](https://github.com/smithy-lang/smithy-typescript/blob/main/packages/node-http-handler/CHANGELOG.md) - [Commits](https://github.com/smithy-lang/smithy-typescript/commits/@smithy/node-http-handler@4.7.1/packages/node-http-handler) --- updated-dependencies: - dependency-name: "@smithy/node-http-handler" dependency-version: 4.7.1 dependency-type: direct:production update-type: version-update:semver-minor ... (cherry picked from commit dbd503f3687b0d46ad5d401ca4ac2df0f17da523) * chore(deps-dev): bump @biomejs/biome from 2.4.14 to 2.4.15 (#1772) Bumps [@biomejs/biome](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome) from 2.4.14 to 2.4.15. - [Release notes](https://github.com/biomejs/biome/releases) - [Changelog](https://github.com/biomejs/biome/blob/main/packages/@biomejs/biome/CHANGELOG.md) - [Commits](https://github.com/biomejs/biome/commits/@biomejs/biome@2.4.15/packages/@biomejs/biome) --- updated-dependencies: - dependency-name: "@biomejs/biome" dependency-version: 2.4.15 dependency-type: direct:development update-type: version-update:semver-patch ... (cherry picked from commit 7521c5591073295b30b17971e3a0749c172fadce) * chore(deps-dev): bump @types/node from 25.6.0 to 25.7.0 (#1773) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 25.6.0 to 25.7.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 25.7.0 dependency-type: direct:development update-type: version-update:semver-minor ... (cherry picked from commit ef734cca817839d2dcb4b1e3a7118492ebb4df39) * feat: expose run id in STS client user-agent (#1774) * feat: expose run id in STS client user-agent Closes #483. This commit modifies the user-agent string so that it includes the GITHUB_RUN_ID and the GITHUB_RUN_ATTEMPT, in the format typically used by the SDK. User agent strings are logged to CloudTrail, allowing users to correlate CloudTrail events with GHA runs. We took this approach instead of logging the ACCESS_KEY_ID as suggested in the issue to avoid logging sensitive information. * feat: add github_action to ua string (cherry picked from commit 29d1be30273e7ef371d59fccf6ec54572c64ec89) * feat: add additional session tags by default (#1775) Closes #390. Note that 50 session tags are the AWS default, and this commit changes our default set from 7 tags to 15 tags. This commit includes logic to split the tags into "required" vs "overridable". Required tags are this action's previous defaults and could never be overridden. Overridable tags are the new set and can be overridden by custom-tags. The action will not add tags if the addition plus the required plus the user's custom tags exceed the AWS limit of 50 total tags. This ensures backwards compat for the tag additions. (cherry picked from commit e0ba7685077379a14a82d01fefd511490344ebfc) * chore: document forgejo compatibility (#1776) * chore: document forgejo compatibility * chore: linting fixes (cherry picked from commit f35a7d7d7e98a1ce791091d70771e2091cbb1519) * fix: skip credential check on output-env-credentials: false (#1778) Closes #1554. (cherry picked from commit 58e7c47adf77846879008deadfeeef8a6969fe6c) * chore: update README for additional claim support (#1779) * chore: update README for additional claim support * chore: lint fix (whitespace) (cherry picked from commit 713aaabfecea015b1ad8d37dc2b819ee41c00eb0) * chore(deps): bump @smithy/node-http-handler from 4.7.1 to 4.7.3 (#1781) Bumps [@smithy/node-http-handler](https://github.com/smithy-lang/smithy-typescript/tree/HEAD/packages/node-http-handler) from 4.7.1 to 4.7.3. - [Release notes](https://github.com/smithy-lang/smithy-typescript/releases) - [Changelog](https://github.com/smithy-lang/smithy-typescript/blob/main/packages/node-http-handler/CHANGELOG.md) - [Commits](https://github.com/smithy-lang/smithy-typescript/commits/@smithy/node-http-handler@4.7.3/packages/node-http-handler) --- updated-dependencies: - dependency-name: "@smithy/node-http-handler" dependency-version: 4.7.3 dependency-type: direct:production update-type: version-update:semver-patch ... (cherry picked from commit a7c33ae483ce23c86f0fa288549e6389e2fd5486) * chore(deps-dev): bump @types/node from 25.7.0 to 25.9.0 (#1785) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 25.7.0 to 25.9.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 25.9.0 dependency-type: direct:development update-type: version-update:semver-minor ... (cherry picked from commit ffde832a1dcd1b1bcfba9291c9e8a51f05fffc4a) * chore(deps-dev): bump @aws-sdk/credential-provider-env (#1784) Bumps [@aws-sdk/credential-provider-env](https://github.com/aws/aws-sdk-js-v3/tree/HEAD/packages-internal/credential-provider-env) from 3.972.34 to 3.972.38. - [Release notes](https://github.com/aws/aws-sdk-js-v3/releases) - [Changelog](https://github.com/aws/aws-sdk-js-v3/blob/main/packages-internal/credential-provider-env/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-js-v3/commits/HEAD/packages-internal/credential-provider-env) --- updated-dependencies: - dependency-name: "@aws-sdk/credential-provider-env" dependency-version: 3.972.38 dependency-type: direct:development update-type: version-update:semver-patch ... (cherry picked from commit bc1093db1db8bd4f9aeed8eb93c038da7372fa04) * chore(deps-dev): bump @smithy/property-provider from 4.3.1 to 4.3.3 (#1783) Bumps [@smithy/property-provider](https://github.com/smithy-lang/smithy-typescript/tree/HEAD/packages/property-provider) from 4.3.1 to 4.3.3. - [Release notes](https://github.com/smithy-lang/smithy-typescript/releases) - [Changelog](https://github.com/smithy-lang/smithy-typescript/blob/main/packages/property-provider/CHANGELOG.md) - [Commits](https://github.com/smithy-lang/smithy-typescript/commits/@smithy/property-provider@4.3.3/packages/property-provider) --- updated-dependencies: - dependency-name: "@smithy/property-provider" dependency-version: 4.3.3 dependency-type: direct:development update-type: version-update:semver-patch ... (cherry picked from commit fe6ad3af1971161b5691b4f5ea26d4173facda46) * chore(deps): bump @aws-sdk/client-sts from 3.1045.0 to 3.1049.0 (#1782) Bumps [@aws-sdk/client-sts](https://github.com/aws/aws-sdk-js-v3/tree/HEAD/clients/client-sts) from 3.1045.0 to 3.1049.0. - [Release notes](https://github.com/aws/aws-sdk-js-v3/releases) - [Changelog](https://github.com/aws/aws-sdk-js-v3/blob/main/clients/client-sts/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-js-v3/commits/v3.1049.0/clients/client-sts) --- updated-dependencies: - dependency-name: "@aws-sdk/client-sts" dependency-version: 3.1049.0 dependency-type: direct:production update-type: version-update:semver-minor ... (cherry picked from commit 4684f47f897062cba46d1973e47cb65a77ba3586) * chore: reconcile lockfile and test formatting * chore: Update dist --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Michael Lehmann Co-authored-by: Sylvain Verly --- .github/codeql/codeql-config.yml | 5 + .github/workflows/release-please.yml | 33 +- .github/workflows/tests-unit.yml | 4 +- .gitignore | 1 + README.md | 357 +- THIRD-PARTY | 83 +- action.yml | 7 +- dist/cleanup/index.js | 3920 ++-------- dist/index.js | 9917 +++++++++++--------------- package-lock.json | 3514 ++++----- package.json | 16 +- src/CredentialsClient.ts | 25 +- src/assumeRole.ts | 134 +- src/helpers.ts | 31 +- src/index.ts | 138 +- test/assumeRole.test.ts | 6 +- test/cleanup.test.ts | 21 +- test/helpers.test.ts | 90 +- test/index.test.ts | 708 +- test/mockinputs.test.ts | 57 + test/profileManager.test.ts | 240 +- 21 files changed, 7612 insertions(+), 11695 deletions(-) create mode 100644 .github/codeql/codeql-config.yml diff --git a/.github/codeql/codeql-config.yml b/.github/codeql/codeql-config.yml new file mode 100644 index 0000000..3b07f53 --- /dev/null +++ b/.github/codeql/codeql-config.yml @@ -0,0 +1,5 @@ +name: "CodeQL config" + +paths-ignore: + - dist + - node_modules diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index b837d61..d53e6eb 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -36,10 +36,41 @@ ${{ secrets.OSDS_PACKAGING_ROLE }} - name: Run release-please + id: release uses: googleapis/release-please-action@v4 with: release-type: node token: ${{ env.OSDS_ACCESS_TOKEN }} config-file: release-please-config.json manifest-file: .release-please-manifest.json - \ No newline at end of file + + - name: Checkout Again + uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - name: Tag Major Version + if: ${{ steps.release.outputs.release_created }} + run: | + git config user.name "GitHub Actions" + git config user.email "github-aws-sdk-osds-automation@amazon.com" + if git rev-parse "v${{ steps.release.outputs.major }}" >/dev/null 2>&1; then + git tag -d "v${{ steps.release.outputs.major }}" + git push origin ":v${{ steps.release.outputs.major }}" + fi + git tag -a "v${{ steps.release.outputs.major }}" -m "Release v${{ steps.release.outputs.major }}" + git push origin "v${{ steps.release.outputs.major }}" + + - name: Update README version references + if: ${{ steps.release.outputs.release_created }} + run: | + sed -i 's|configure-aws-credentials@v[0-9]*\.[0-9]*\.[0-9]*|configure-aws-credentials@${{ steps.release.outputs.tag_name }}|g' README.md + if git diff --quiet README.md; then + echo "README already up to date" + else + echo "::add-mask::${{ env.OSDS_ACCESS_TOKEN }}" + git remote set-url origin https://${{ env.OSDS_ACCESS_TOKEN }}@github.com/aws-actions/configure-aws-credentials.git + git add README.md + git commit -m "docs: update README version references to ${{ steps.release.outputs.tag_name }}" + git push --force origin + fi diff --git a/.github/workflows/tests-unit.yml b/.github/workflows/tests-unit.yml index 7aa037d..cf697d0 100644 --- a/.github/workflows/tests-unit.yml +++ b/.github/workflows/tests-unit.yml @@ -18,9 +18,9 @@ jobs: - name: "Checkout repository" uses: actions/checkout@v5 - name: "Setup node" - uses: actions/setup-node@v4.4.0 + uses: actions/setup-node@v6.4.0 with: - node-version: 20 + node-version: 24 - name: "Install dependencies" run: npm ci - name: "Run tests" diff --git a/.gitignore b/.gitignore index bc18168..6841d21 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.history node_modules coverage .DS_Store diff --git a/README.md b/README.md index f53c131..df38357 100644 --- a/README.md +++ b/README.md @@ -1,71 +1,76 @@ # Configure AWS Credentials -Authenticate to AWS in GitHub Actions! Works especially well with +Authenticate to AWS in GitHub Actions (and others)! Works especially well with [AWS Secrets Manager][secretsmanager]. -[secretsmanager]: - https://github.com/aws-actions/aws-secretsmanager-get-secrets +[secretsmanager]: https://github.com/aws-actions/aws-secretsmanager-get-secrets ## Quick Start (OIDC, recommended) 1. Create an IAM Identity Provider in your AWS account for GitHub OIDC. (See [OIDC configuration](#oidc-configuration-details) below for details.) -2. Create an IAM Role in your AWS account with a trust policy that allows - GitHub Actions to assume it. (Expand the sections below)
- GitHub OIDC Trust Policy +2. Create an IAM Role in your AWS account with a trust policy that allows GitHub + Actions to assume it. (Expand the sections below)
+ GitHub OIDC Trust Policy - ```json - { - "Version": "2012-10-17", - "Statement": [ - { - "Effect": "Allow", - "Principal": { - "Federated": "arn:aws:iam:::oidc-provider/token.actions.githubusercontent.com" - }, - "Action": "sts:AssumeRoleWithWebIdentity", - "Condition": { - "StringEquals": { - "token.actions.githubusercontent.com:aud": "sts.amazonaws.com", - "token.actions.githubusercontent.com:sub": "repo:/:ref:refs/heads/" - } - } - } - ] - } - ``` + ```json + { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Federated": "arn:aws:iam:::oidc-provider/token.actions.githubusercontent.com" + }, + "Action": "sts:AssumeRoleWithWebIdentity", + "Condition": { + "StringEquals": { + "token.actions.githubusercontent.com:aud": "sts.amazonaws.com", + "token.actions.githubusercontent.com:sub": "repo:/:ref:refs/heads/" + } + } + } + ] + } + ``` -
+
+ + Note: if you are running in a GitHub environment based workflow, the value + for the Sub claim will be different, in the form of + `repo:/:environment:`. + Adjust the trust policy accordingly if you are using environment-based + workflows. 3. Attach permissions to the IAM Role that allow it to access the AWS resources - you need. + you need. 4. Add the following to your GitHub Actions workflow:
- Example Workflow + Example Workflow - ```yaml - # Need ID token write permission to use OIDC - permissions: - id-token: write - jobs: - run_job_with_aws: - runs-on: ubuntu-latest - steps: - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6.1.0 - with: - role-to-assume: - aws-region: - - name: Additional steps - run: | - # Your commands that require AWS credentials - aws sts get-caller-identity - ``` + ```yaml + # Need ID token write permission to use OIDC + permissions: + id-token: write + jobs: + run_job_with_aws: + runs-on: ubuntu-latest + steps: + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v6.1.0 + with: + role-to-assume: + aws-region: + - name: Additional steps + run: | + # Your commands that require AWS credentials + aws sts get-caller-identity + ``` -
+ - That's it! Your GitHub Actions workflow can now access AWS resources using - the IAM Role you created. Other authentication scenarios are also supported - (see below). +That's it! Your GitHub Actions workflow can now access AWS resources using the +IAM Role you created. Other authentication scenarios are also supported (see +below). ## Security Recommendations @@ -81,8 +86,8 @@ Authenticate to AWS in GitHub Actions! Works especially well with of the credentials used in workflows. - Periodically rotate any long-lived credentials that you use. - Store sensitive information in a secure way, such as using - [AWS Secrets Manager](https://aws.amazon.com/secrets-manager/) or - [GitHub Secrets][gh-secrets]. + [AWS Secrets Manager](https://aws.amazon.com/secrets-manager/) or [GitHub + Secrets][gh-secrets]. - Be especially careful about running Actions in non-ephemeral environments, or [triggering workflows on `pull_request_target`](https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#pull_request_target) events. @@ -105,11 +110,12 @@ by specifying different inputs. 5. Use credentials stored in the Action environment to fetch temporary credentials via STS AssumeRole. -Because we use the AWS JavaScript SDK, we always will use the -[credential resolution flow for Node.js][cred-resolution]. +Because we use the AWS JavaScript SDK, we always will use the [credential +resolution flow for Node.js][cred-resolution]. [cred-resolution]: https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/setting-credentials-node.html + Depending on your inputs, the action might override parts of this flow.
@@ -131,8 +137,8 @@ enabling this option._ Additionally, **`aws-region`** is always required. -_Note: If you use GitHub Enterprise Server, you may need to adjust examples -here to match your environment._ +_Note: If you use GitHub Enterprise Server, you may need to adjust examples here +to match your environment._ ## Additional Options @@ -144,36 +150,36 @@ detail.
Options list and descriptions -| Option | Description | Required | -| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -| aws-region | Which AWS region to use | Yes | -| aws-profile | Name of the AWS profile to configure. When provided, credentials are written to `~/.aws/credentials` and `~/.aws/config` files. This enables configuring multiple profiles in a single workflow. Name cannot contain whitespace, square brackets, or slashes. When set, credentials will not be exported as environment variables unless `output-env-credentials` is manually set to true. | No | -| overwrite-aws-profile | Overwrite the given AWS profile if it already exists. When set to false or not set, an error will be thrown if the profile already exists. | No | -| role-to-assume | Role for which to fetch credentials. Only required for some authentication types. | No | -| aws-access-key-id | AWS access key to use. Only required for some authentication types. | No | -| aws-secret-access-key | AWS secret key to use. Only required for some authentication types. | No | -| aws-session-token | AWS session token to use. Used in uncommon authentication scenarios. | No | -| role-chaining | Use existing credentials from the environment to assume a new role. | No | -| audience | The JWT audience when using OIDC. Used in non-default AWS partitions, like China regions. | No | -| http-proxy | An HTTP proxy to use for API calls. | No | -| mask-aws-account-id | AWS account IDs are not considered secret. Setting this will hide account IDs from output anyway. | No | -| role-duration-seconds | The assumed role duration in seconds, if assuming a role. Defaults to 1 hour (3600 seconds). Acceptable values range from 15 minutes (900 seconds) to 12 hours (43200 seconds). | No | -| role-external-id | The external ID of the role to assume. Only needed if your role requires it. | No | -| role-session-name | Defaults to "GitHubActions", but may be changed if required. | No | -| role-skip-session-tagging | Skips session tagging if set. | No | -| transitive-tag-keys | Define a list of transitive tag keys to pass when assuming a role. | No | -| inline-session-policy | You may further restrict the assumed role policy by defining an inline policy here. | No | -| managed-session-policies | You may further restrict the assumed role policy by specifying a managed policy here. | No | -| output-credentials | When set, outputs fetched credentials as action step output. (Outputs aws-access-key-id, aws-secret-access-key, aws-session-token, aws-account-id, authenticated-arn, and aws-expiration). Defaults to false. | No | -| output-env-credentials | When set, outputs fetched credentials as environment variables (AWS_REGION, AWS_DEFAULT_REGION, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN, and AWS_PROFILE (if profile option is used)). Defaults to true when `aws-profile` is not set, and false when `aws-profile` is set. Set to false to avoid setting env variables. (NOTE: Setting to false will prevent aws-account-id from being exported as a step output). | No | -| unset-current-credentials | When set, attempts to unset any existing credentials in your action runner. | No | -| disable-retry | Disabled retry/backoff logic for assume role calls. By default, retries are enabled. | No | -| retry-max-attempts | Limits the number of retry attempts before giving up. Defaults to 12. | No | -| special-characters-workaround | Uncommonly, some environments cannot tolerate special characters in a secret key. This option will retry fetching credentials until the secret access key does not contain special characters. This option overrides disable-retry and retry-max-attempts. | No | -| use-existing-credentials | When set, the action will check if existing credentials are valid and exit if they are. Defaults to false. | No | -| allowed-account-ids | A comma-delimited list of expected AWS account IDs. The action will fail if we receive credentials for the wrong account. | No | -| force-skip-oidc | When set, the action will skip using GitHub OIDC provider even if the id-token permission is set. | No | -| action-timeout-s | Global timeout for the action in seconds. If set to a value greater than 0, the action will fail if it takes longer than this time to complete. | No | +| Option | Description | Required | +| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | +| aws-region | Which AWS region to use | Yes | +| aws-profile | Name of the AWS profile to configure. When provided, credentials are written to `~/.aws/credentials` and `~/.aws/config` files. This enables configuring multiple profiles in a single workflow. Name cannot contain whitespace, square brackets, or slashes. When set, credentials will not be exported as environment variables unless `output-env-credentials` is manually set to true. | No | +| overwrite-aws-profile | Overwrite the given AWS profile if it already exists. When set to false or not set, an error will be thrown if the profile already exists. | No | +| role-to-assume | Role for which to fetch credentials. Only required for some authentication types. | No | +| aws-access-key-id | AWS access key to use. Only required for some authentication types. | No | +| aws-secret-access-key | AWS secret key to use. Only required for some authentication types. | No | +| aws-session-token | AWS session token to use. Used in uncommon authentication scenarios. | No | +| role-chaining | Use existing credentials from the environment to assume a new role. | No | +| audience | The JWT audience when using OIDC. Used in non-default AWS partitions, like China regions. | No | +| http-proxy | An HTTP proxy to use for API calls. | No | +| mask-aws-account-id | AWS account IDs are not considered secret. Setting this will hide account IDs from output anyway. | No | +| role-duration-seconds | The assumed role duration in seconds, if assuming a role. Defaults to 1 hour (3600 seconds). Acceptable values range from 15 minutes (900 seconds) to 12 hours (43200 seconds). | No | +| role-external-id | The external ID of the role to assume. Only needed if your role requires it. | No | +| role-session-name | Defaults to "GitHubActions", but may be changed if required. | No | +| role-skip-session-tagging | Skips session tagging if set. | No | +| transitive-tag-keys | Define a list of transitive tag keys to pass when assuming a role. | No | +| inline-session-policy | You may further restrict the assumed role policy by defining an inline policy here. | No | +| managed-session-policies | You may further restrict the assumed role policy by specifying a managed policy here. | No | +| output-credentials | When set, outputs fetched credentials as action step output. (Outputs aws-access-key-id, aws-secret-access-key, aws-session-token, aws-account-id, authenticated-arn, and aws-expiration). Defaults to false. | No | +| output-env-credentials | When set, outputs fetched credentials as environment variables (AWS_REGION, AWS_DEFAULT_REGION, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN, and AWS_PROFILE (if profile option is used)). Defaults to true when `aws-profile` is not set, and false when `aws-profile` is set. Set to false to avoid setting env variables. (NOTE: Setting to false will prevent aws-account-id from being exported as a step output). | No | +| unset-current-credentials | When set, attempts to unset any existing credentials in your action runner. | No | +| disable-retry | Disabled retry/backoff logic for assume role calls. By default, retries are enabled. | No | +| retry-max-attempts | Limits the number of retry attempts before giving up. Defaults to 12. | No | +| special-characters-workaround | Uncommonly, some environments cannot tolerate special characters in a secret key. This option will retry fetching credentials until the secret access key does not contain special characters. This option overrides disable-retry and retry-max-attempts. | No | +| use-existing-credentials | When set, the action will check if existing credentials are valid and exit if they are. Defaults to false. | No | +| allowed-account-ids | A comma-delimited list of expected AWS account IDs. The action will fail if we receive credentials for the wrong account. | No | +| force-skip-oidc | When set, the action will skip using GitHub OIDC provider even if the id-token permission is set. | No | +| action-timeout-s | Global timeout for the action in seconds. If set to a value greater than 0, the action will fail if it takes longer than this time to complete. | No |
@@ -210,8 +216,8 @@ Profile names may not contain whitespace, square brackets, or forward or backslashes. Writing to a profile will prevent credentials being written to the environment -by default. Use `output-env-credentials: true` if you would like the -credentials to also be exported as environment variables. +by default. Use `output-env-credentials: true` if you would like the credentials +to also be exported as environment variables. By default, the action will not overwrite existing profiles. If you would like to overwrite a profile, set the `overwrite-aws-profile` input to `true`. @@ -226,8 +232,8 @@ extreme care to ensure that this is safe in your environment and you do not leak valid credentials unintentionally. Writing to configuration files is intended for unusual authentication scenarios._ -For using profiles with static IAM User Credentials or when using one -role to assume another, role chaining is needed: +For using profiles with static IAM User Credentials or when using one role to +assume another, role chaining is needed:
@@ -237,7 +243,7 @@ specify the profile name as an environment variable in the job step: ```yaml - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v6.1.0 - with: + with: aws-region: us-east-1 role-to-assume: arn:aws:iam::123456789100:role/my-role aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} @@ -248,9 +254,9 @@ specify the profile name as an environment variable in the job step: AWS_PROFILE: MyProfile1 ``` -If you are using one role to assume another while using profiles, the -subsequent steps must set `role-chaining: true` and specify the prior profile's -name as step environment variables: +If you are using one role to assume another while using profiles, the subsequent +steps must set `role-chaining: true` and specify the prior profile's name as +step environment variables: ```yaml - name: Configure AWS credentials @@ -282,8 +288,8 @@ from the environment. To skip this step, set the `AWS_SKIP_CLEANUP_STEP` environment variable to `true`: ```yaml - env: - AWS_SKIP_CLEANUP_STEP: 'true' +env: + AWS_SKIP_CLEANUP_STEP: "true" ``` #### Use an HTTP proxy @@ -316,11 +322,12 @@ HTTP_PROXY="http://companydomain.com:3128" #### Special characters in AWS_SECRET_ACCESS_KEY Some edge cases are unable to properly parse an `AWS_SECRET_ACCESS_KEY` if it -contains special characters. For more information, please see the -[AWS CLI documentation][aws-cli-troubleshooting]. +contains special characters. For more information, please see the [AWS CLI +documentation][aws-cli-troubleshooting]. [aws-cli-troubleshooting]: https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-troubleshooting.html#tshoot-signature-does-not-match + If you set the `special-characters-workaround` option, this action will continually retry fetching credentials until we get one that does not have special characters. This option overrides the `disable-retry` and @@ -337,13 +344,15 @@ _Note: you might find it helpful to set the `role-session-name` to `${{ github.run_id }}` so as to clarify in audit logs which AWS actions were performed by which workflow run._ -The session will be tagged with the following tags: (Refer to -[GitHub's documentation for `GITHUB_` environment variable -definitions][gh-env-vars]) +The session will be tagged with the following tags: (Refer to [GitHub's +documentation for `GITHUB_` environment variable definitions][gh-env-vars]) [gh-env-vars]: https://docs.github.com/en/actions/reference/workflows-and-actions/variables#default-environment-variables +**Protected tags** are always emitted when session tags are used, and cannot be +overridden via `custom-tags`: + | Key | Value | | ---------- | ----------------- | | GitHub | "Actions" | @@ -351,21 +360,43 @@ definitions][gh-env-vars]) | Workflow | GITHUB_WORKFLOW | | Action | GITHUB_ACTION | | Actor | GITHUB_ACTOR | -| Branch | GITHUB_REF | | Commit | GITHUB_SHA | +| Branch | GITHUB_REF | + +**Overrideable tags** are automatically added to the set of default session tags +but may be overridden via `custom-tags`. AWS has a maximum limit of 50 session +tags; tags from this list are dropped in reverse priority order if your +`custom-tags` set plus the protected set exceeds this limit. + +| Key | Value | Priority | +| --------------- | ----------------------- | -------- | +| EventName | GITHUB_EVENT_NAME | 1 | +| BaseRef | GITHUB_BASE_REF | 2 | +| HeadRef | GITHUB_HEAD_REF | 3 | +| RefName | GITHUB_REF_NAME | 4 | +| RunId | GITHUB_RUN_ID | 5 | +| RefType | GITHUB_REF_TYPE | 6 | +| Job | GITHUB_JOB | 7 | +| TriggeringActor | GITHUB_TRIGGERING_ACTOR | 8 | + +Tags whose source environment variable is unset are omitted (e.g., `BaseRef` and +`HeadRef` are only set on `pull_request` events). _Note: all tag values must conform to -[the tag requirements](https://docs.aws.amazon.com/STS/latest/APIReference/API_Tag.html). -Particularly, `GITHUB_WORKFLOW` will be truncated if it's too long. If -`GITHUB_ACTOR` or `GITHUB_WORKFLOW` contain invalid characters, the characters -will be replaced with an '\*'._ +[the tag requirements][sts-tag-requirements]. +Values longer than 256 characters will be truncated, and characters outside the +allowed set will be replaced with an underscore (`_`).\_ + +[sts-tag-requirements]: + https://docs.aws.amazon.com/STS/latest/APIReference/API_Tag.html The action will use session tagging by default unless you are using OIDC. To [forward session tags to subsequent sessions in a role chain][session-tag-chaining], you can use -[session-tag-chaining]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining +[session-tag-chaining]: + https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining the `transitive-tag-keys` input to specify the keys of the tags to be passed. @@ -382,6 +413,23 @@ with: Actor ``` +### Custom session tags + +You can add custom session tags using the `custom-tags` input, which accepts a +JSON object. Custom tags cannot override protected tags, but they can override +overrideable tags (in which case the overrideable tag's slot is freed for the +next overrideable tag in the priority list, if any). + +```yaml +uses: aws-actions/configure-aws-credentials@v6 +with: + custom-tags: '{"Environment": "Production", "Team": "Platform"}' +``` + +_Note: custom tags are not supported when using OIDC or web identity token +authentication. In those flows, session tags are controlled by the identity +provider's token claims._ + ### Session policies Session policies are not required, but they allow you to limit the scope of the @@ -452,6 +500,12 @@ with:
+### Custom STS endpoint + +Use the `sts-endpoint` input to override the AWS STS endpoint URL. Most users +should not set this option and instead let the SDK derive the correct endpoint +from the specified region. + ## OIDC Configuration Details We recommend using @@ -516,41 +570,42 @@ aws iam create-open-id-connect-provider \ ### Claims and scoping permissions -To align with the Amazon IAM best practice of -[granting least privilege][least-privilege], +To align with the Amazon IAM best practice of [granting least +privilege][least-privilege], the assume role policy document should contain a +[`Condition`](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html) +that restricts which workflows can assume the role. Without any condition, any +GitHub user or repository could potentially assume the role. + +GitHub provides a number of additional claims in the OIDC token that you can use +in your IAM policies to scope down permissions. Early versions of this action +only supported the `sub` and `aud` claims, but AWS IAM and GitHub have since +added support for `sub` claim customization and a variety of additional +claims ([1][gh-blog-oidc], [2][sub-claim-custom]). + +> **Warning:** Avoid `ForAllValues:` in `Allow` statements. These operators +> return true when the claim is absent or misspelled, which can lead to +> uninended access. Instead, use `StringEquals` or `StringLike` operators to +> check for specific claim values. [least-privilege]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege -the assume role policy document should contain a -[`Condition`](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html) -that specifies a subject (`sub`) allowed to assume the role. -[GitHub also recommends](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#defining-trust-conditions-on-cloud-roles-using-oidc-claims) -filtering for the correct audience (`aud`). See -[AWS IAM documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_iam-condition-keys.html#condition-keys-wif) -on which claims you can filter for in your trust policies. +[gh-blog-oidc]: + https://aws.amazon.com/about-aws/whats-new/2026/01/aws-sts-supports-validation-identity-provider-claims/ +[sub-claim-custom]: + https://docs.github.com/en/rest/actions/oidc?apiVersion=2026-03-10 -Without a subject (`sub`) condition, any GitHub user or repository could -potentially assume the role. The subject can be scoped to a GitHub organization -and repository as shown in the CloudFormation template. However, scoping it down -to your org and repo may cause the role assumption to fail in some cases. See -[Example subject claims](https://docs.github.com/en/actions/reference/security/oidc#example-subject-claims) -for specific details on what the subject value will be depending on your -workflow. You can also -[customize your subject claim](https://docs.github.com/en/actions/reference/security/oidc#customizing-the-token-claims) -if you want full control over the information you can filter for in your trust -policy. If you aren't sure what your subject (`sub`) key is, you can add the +#### Inspecting the token + +If you aren't sure what claim values your workflow is producing, the [`actions-oidc-debugger`](https://github.com/github/actions-oidc-debugger) -action to your workflow to see the value of the subject (`sub`) key, as well as -other claims. +action will print the decoded JWT payload. Run it in a private repository +only — the token itself is short-lived but the claim values may be sensitive. -Additional claim conditions can be added for higher specificity as explained in -the -[GitHub documentation][gh-oidc-hardening]. +See the GitHub [security-hardening guide][gh-oidc-hardening] for further +discussion of trust conditions and threat modeling. [gh-oidc-hardening]: https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect -Due to implementation details, not every OIDC claim is presently supported by -IAM. ### Further information about OIDC @@ -562,6 +617,28 @@ For further information on OIDC and GitHub Actions, please see: - [GitHub docs: Configuring OpenID Connect in Amazon Web Services](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services) - [GitHub changelog: GitHub Actions: Secure cloud deployments with OpenID Connect](https://github.blog/changelog/2021-10-27-github-actions-secure-cloud-deployments-with-openid-connect/) +## Compatibility with non-GitHub Actions environments + +This action has been sucessfully tested with +Codeberg/[Forgejo Actions](https://forgejo.org/docs/next/user/actions/overview/) +and should be generally compatible with any CI/CD environment that sets the +correct `GITHUB_` environment variables. For use with Foregejo, please review +the +[runner differences with GitHub's action runners][forgejo-gh-differences]. + +[forgejo-gh-differences]: + https://forgejo.org/docs/next/user/actions/github-actions/#known-list-of-differences +The main difference to be aware of is that Forgejo uses the +`enable-openid-connect` flag to enable OIDC instad of GitHub's `id-token: write` +permission. Forgejo also uses a slightly different syntax for the workflow +definition file, omitting some subkeys. + +For OIDC use, the issuer name for the IAM IdP for GitHub Actions is +`token.actions.githubusercontent.com`. For Forgejo Actions it is +`[foregejo instance url]/api/actions`. As an example, Codeberg would use +`codeberg.org/api/actions` as the issuer URL when configuring the IAM Identity +Provider. The audience would still be `sts.amazonaws.com` by default. + ## Examples ### AssumeRoleWithWebIdentity @@ -659,6 +736,13 @@ This example shows that you can reference the fetched credentials as outputs if the `aws-session-token` input in a situation where session tokens are fetched and passed to this action. +If you only want the credentials available as _step outputs_ and not exported to +the environment (for example, on a self-hosted runner where you do not want the +assumed-role credentials to shadow an existing EC2 instance profile), pair +`output-credentials: true` with `output-env-credentials: false`. In that mode, +the action does not run its post-credential SDK-pickup validation step, since +the credentials were never written to the environment. + ### Configure multiple AWS profiles in a single workflow ```yaml @@ -691,8 +775,8 @@ and passed to this action. This example shows how to configure multiple named AWS profiles in a single workflow. When using the `aws-profile` input, credentials are written to `~/.aws/credentials` and `~/.aws/config` files, allowing you to reference -different profiles using the `--profile` flag with AWS CLI, SDKs, CDK, and -other tools. +different profiles using the `--profile` flag with AWS CLI, SDKs, CDK, and other +tools. Each profile is independent and can authenticate to different AWS accounts or use different roles. This is particularly useful for multi-account deployments @@ -705,6 +789,7 @@ Starting with version 5.0.0, this action uses semantic-style release tags and [immutable-releases]: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/immutable-releases + A floating version tag (vN) is also provided for convenience: this tag will move to the latest major version (vN -> vN.2.1, vM -> vM.0.0, etc.). diff --git a/THIRD-PARTY b/THIRD-PARTY index 615ec13..22b13a3 100644 --- a/THIRD-PARTY +++ b/THIRD-PARTY @@ -644,7 +644,7 @@ Apache License The following npm package may be included in this product: - - @aws-sdk/client-sts@3.1053.0 + - @aws-sdk/client-sts@3.1049.0 This package contains the following license: @@ -854,8 +854,8 @@ Apache License The following npm packages may be included in this product: - - @aws-sdk/signature-v4-multi-region@3.996.28 - - @smithy/core@3.24.4 + - @aws-sdk/signature-v4-multi-region@3.996.27 + - @smithy/core@3.24.5 - @smithy/types@4.14.2 These packages each contain the following license: @@ -1224,7 +1224,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. The following npm package may be included in this product: - - @actions/http-client@3.0.2 + - @actions/http-client@4.0.1 This package contains the following license: @@ -1254,7 +1254,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. The following npm package may be included in this product: - - @aws-sdk/core@3.974.13 + - @aws-sdk/core@3.974.15 This package contains the following license: @@ -1674,18 +1674,18 @@ Apache License The following npm packages may be included in this product: - - @aws-sdk/credential-provider-env@3.972.39 - - @aws-sdk/credential-provider-ini@3.972.43 - - @aws-sdk/credential-provider-node@3.972.44 - - @aws-sdk/token-providers@3.1052.0 + - @aws-sdk/credential-provider-env@3.972.41 + - @aws-sdk/credential-provider-ini@3.972.42 + - @aws-sdk/credential-provider-node@3.972.43 + - @aws-sdk/token-providers@3.1049.0 - @aws-sdk/types@3.973.9 - @aws-sdk/util-locate-window@3.965.5 - - @aws-sdk/xml-builder@3.972.25 - - @smithy/credential-provider-imds@4.3.4 - - @smithy/fetch-http-handler@5.4.4 + - @aws-sdk/xml-builder@3.972.26 + - @smithy/credential-provider-imds@4.3.3 + - @smithy/fetch-http-handler@5.4.3 - @smithy/is-array-buffer@2.2.0 - - @smithy/node-http-handler@4.7.4 - - @smithy/signature-v4@5.4.4 + - @smithy/node-http-handler@4.7.3 + - @smithy/signature-v4@5.4.5 - @smithy/util-buffer-from@2.2.0 - @smithy/util-utf8@2.3.0 @@ -1897,9 +1897,9 @@ Apache License The following npm packages may be included in this product: - - @aws-sdk/credential-provider-process@3.972.39 - - @aws-sdk/credential-provider-sso@3.972.43 - - @aws-sdk/credential-provider-web-identity@3.972.43 + - @aws-sdk/credential-provider-process@3.972.38 + - @aws-sdk/credential-provider-sso@3.972.42 + - @aws-sdk/credential-provider-web-identity@3.972.42 These packages each contain the following license: @@ -2109,9 +2109,9 @@ Apache License The following npm packages may be included in this product: - - @aws-sdk/credential-provider-http@3.972.41 - - @aws-sdk/credential-provider-login@3.972.43 - - @aws-sdk/nested-clients@3.997.11 + - @aws-sdk/credential-provider-http@3.972.40 + - @aws-sdk/credential-provider-login@3.972.42 + - @aws-sdk/nested-clients@3.997.10 These packages each contain the following license: @@ -2335,8 +2335,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The following npm packages may be included in this product: - - @nodable/entities@2.1.0 - - netmask@2.1.0 + - @nodable/entities@2.1.1 - quickjs-wasi@2.2.0 - xml-naming@0.1.0 @@ -2346,6 +2345,36 @@ MIT ----------- +The following npm package may be included in this product: + + - netmask@2.1.1 + +This package contains the following license: + +MIT License + +Copyright (c) 2011 Olivier Poitrey rs@rhapsodyk.net + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----------- + The following npm package may be included in this product: - fast-xml-parser@5.7.3 @@ -2468,7 +2497,7 @@ SOFTWARE. The following npm package may be included in this product: - - undici@6.24.0 + - undici@6.25.0 This package contains the following license: @@ -2610,7 +2639,7 @@ THE SOFTWARE. The following npm package may be included in this product: - - socks@2.8.7 + - socks@2.8.8 This package contains the following license: @@ -2698,9 +2727,9 @@ SOFTWARE. The following npm packages may be included in this product: - - @actions/core@2.0.2 - - @actions/exec@2.0.0 - - @actions/io@2.0.0 + - @actions/core@3.0.1 + - @actions/exec@3.0.0 + - @actions/io@3.0.2 These packages each contain the following license: diff --git a/action.yml b/action.yml index e6448c7..318c99d 100644 --- a/action.yml +++ b/action.yml @@ -1,4 +1,3 @@ - name: '"Configure AWS Credentials" Action for GitHub Actions' description: Configures AWS credentials for use in subsequent steps in a GitHub Action workflow runs: @@ -101,6 +100,12 @@ inputs: action-timeout-s: required: false description: A global timeout in seconds for the action. When the timeout is reached, the action immediately exits. The default is to run without a timeout. + custom-tags: + description: Additional tags to apply to the assumed role session. Must be a JSON object provided as a string. + required: false + sts-endpoint: + description: Custom STS endpoint URL. Use this to point to an STS-compatible API (e.g. MinIO, LocalStack) instead of the default AWS STS endpoint for the region. + required: false outputs: aws-account-id: diff --git a/dist/cleanup/index.js b/dist/cleanup/index.js index 94789c4..c5606af 100644 --- a/dist/cleanup/index.js +++ b/dist/cleanup/index.js @@ -30,287 +30,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge )); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -// node_modules/@actions/core/lib/utils.js -var require_utils = __commonJS({ - "node_modules/@actions/core/lib/utils.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toCommandValue = toCommandValue; - exports2.toCommandProperties = toCommandProperties; - function toCommandValue(input) { - if (input === null || input === void 0) { - return ""; - } else if (typeof input === "string" || input instanceof String) { - return input; - } - return JSON.stringify(input); - } - function toCommandProperties(annotationProperties) { - if (!Object.keys(annotationProperties).length) { - return {}; - } - return { - title: annotationProperties.title, - file: annotationProperties.file, - line: annotationProperties.startLine, - endLine: annotationProperties.endLine, - col: annotationProperties.startColumn, - endColumn: annotationProperties.endColumn - }; - } - } -}); - -// node_modules/@actions/core/lib/command.js -var require_command = __commonJS({ - "node_modules/@actions/core/lib/command.js"(exports2) { - "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - } - __setModuleDefault(result, mod); - return result; - }; - })(); - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.issueCommand = issueCommand; - exports2.issue = issue; - var os = __importStar(require("os")); - var utils_1 = require_utils(); - function issueCommand(command, properties, message) { - const cmd = new Command(command, properties, message); - process.stdout.write(cmd.toString() + os.EOL); - } - function issue(name, message = "") { - issueCommand(name, {}, message); - } - var CMD_STRING = "::"; - var Command = class { - constructor(command, properties, message) { - if (!command) { - command = "missing.command"; - } - this.command = command; - this.properties = properties; - this.message = message; - } - toString() { - let cmdStr = CMD_STRING + this.command; - if (this.properties && Object.keys(this.properties).length > 0) { - cmdStr += " "; - let first = true; - for (const key in this.properties) { - if (this.properties.hasOwnProperty(key)) { - const val = this.properties[key]; - if (val) { - if (first) { - first = false; - } else { - cmdStr += ","; - } - cmdStr += `${key}=${escapeProperty(val)}`; - } - } - } - } - cmdStr += `${CMD_STRING}${escapeData(this.message)}`; - return cmdStr; - } - }; - function escapeData(s) { - return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); - } - function escapeProperty(s) { - return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); - } - } -}); - -// node_modules/@actions/core/lib/file-command.js -var require_file_command = __commonJS({ - "node_modules/@actions/core/lib/file-command.js"(exports2) { - "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - } - __setModuleDefault(result, mod); - return result; - }; - })(); - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.issueFileCommand = issueFileCommand; - exports2.prepareKeyValueMessage = prepareKeyValueMessage; - var crypto = __importStar(require("crypto")); - var fs2 = __importStar(require("fs")); - var os = __importStar(require("os")); - var utils_1 = require_utils(); - function issueFileCommand(command, message) { - const filePath = process.env[`GITHUB_${command}`]; - if (!filePath) { - throw new Error(`Unable to find environment variable for file command ${command}`); - } - if (!fs2.existsSync(filePath)) { - throw new Error(`Missing file at path: ${filePath}`); - } - fs2.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os.EOL}`, { - encoding: "utf8" - }); - } - function prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${crypto.randomUUID()}`; - const convertedValue = (0, utils_1.toCommandValue)(value); - if (key.includes(delimiter)) { - throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); - } - if (convertedValue.includes(delimiter)) { - throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); - } - return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; - } - } -}); - -// node_modules/@actions/http-client/lib/proxy.js -var require_proxy = __commonJS({ - "node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getProxyUrl = getProxyUrl; - exports2.checkBypass = checkBypass; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); - } - var DecodedURL = class extends URL { - constructor(url, base) { - super(url, base); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - // node_modules/tunnel/lib/tunnel.js var require_tunnel = __commonJS({ "node_modules/tunnel/lib/tunnel.js"(exports2) { @@ -322,28 +41,28 @@ var require_tunnel = __commonJS({ var events = require("events"); var assert = require("assert"); var util = require("util"); - exports2.httpOverHttp = httpOverHttp; - exports2.httpsOverHttp = httpsOverHttp; - exports2.httpOverHttps = httpOverHttps; - exports2.httpsOverHttps = httpsOverHttps; - function httpOverHttp(options) { + exports2.httpOverHttp = httpOverHttp2; + exports2.httpsOverHttp = httpsOverHttp2; + exports2.httpOverHttps = httpOverHttps2; + exports2.httpsOverHttps = httpsOverHttps2; + function httpOverHttp2(options) { var agent = new TunnelingAgent(options); agent.request = http.request; return agent; } - function httpsOverHttp(options) { + function httpsOverHttp2(options) { var agent = new TunnelingAgent(options); agent.request = http.request; agent.createSocket = createSecureSocket; agent.defaultPort = 443; return agent; } - function httpOverHttps(options) { + function httpOverHttps2(options) { var agent = new TunnelingAgent(options); agent.request = https.request; return agent; } - function httpsOverHttps(options) { + function httpsOverHttps2(options) { var agent = new TunnelingAgent(options); agent.request = https.request; agent.createSocket = createSecureSocket; @@ -439,18 +158,18 @@ var require_tunnel = __commonJS({ res.statusCode ); socket.destroy(); - var error = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); - error.code = "ECONNRESET"; - options.request.emit("error", error); + var error2 = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); + error2.code = "ECONNRESET"; + options.request.emit("error", error2); self.removeSocket(placeholder); return; } if (head.length > 0) { debug2("got illegal response body from proxy"); socket.destroy(); - var error = new Error("got illegal response body from proxy"); - error.code = "ECONNRESET"; - options.request.emit("error", error); + var error2 = new Error("got illegal response body from proxy"); + error2.code = "ECONNRESET"; + options.request.emit("error", error2); self.removeSocket(placeholder); return; } @@ -465,9 +184,9 @@ var require_tunnel = __commonJS({ cause.message, cause.stack ); - var error = new Error("tunneling socket could not be established, cause=" + cause.message); - error.code = "ECONNRESET"; - options.request.emit("error", error); + var error2 = new Error("tunneling socket could not be established, cause=" + cause.message); + error2.code = "ECONNRESET"; + options.request.emit("error", error2); self.removeSocket(placeholder); } }; @@ -1796,14 +1515,14 @@ var require_diagnostics = __commonJS({ diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { const { connectParams: { version, protocol, port, host }, - error + error: error2 } = evt; debuglog( "connection to %s using %s%s errored - %s", `${host}${port ? `:${port}` : ""}`, protocol, version, - error.message + error2.message ); }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { @@ -1834,14 +1553,14 @@ var require_diagnostics = __commonJS({ diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { request: { method, path, origin }, - error + error: error2 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, path, - error.message + error2.message ); }); isClientSet = true; @@ -1876,7 +1595,7 @@ var require_diagnostics = __commonJS({ diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { const { connectParams: { version, protocol, port, host }, - error + error: error2 } = evt; debuglog( "connection to %s%s using %s%s errored - %s", @@ -1884,7 +1603,7 @@ var require_diagnostics = __commonJS({ port ? `:${port}` : "", protocol, version, - error.message + error2.message ); }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { @@ -2154,16 +1873,16 @@ var require_request = __commonJS({ this.onError(err); } } - onError(error) { + onError(error2) { this.onFinally(); if (channels.error.hasSubscribers) { - channels.error.publish({ request: this, error }); + channels.error.publish({ request: this, error: error2 }); } if (this.aborted) { return; } this.aborted = true; - return this[kHandler].onError(error); + return this[kHandler].onError(error2); } onFinally() { if (this.errorHandler) { @@ -2327,13 +2046,20 @@ var require_dispatcher_base = __commonJS({ var kOnDestroyed = /* @__PURE__ */ Symbol("onDestroyed"); var kOnClosed = /* @__PURE__ */ Symbol("onClosed"); var kInterceptedDispatch = /* @__PURE__ */ Symbol("Intercepted Dispatch"); + var kWebSocketOptions = /* @__PURE__ */ Symbol("webSocketOptions"); var DispatcherBase = class extends Dispatcher { - constructor() { + constructor(opts) { super(); this[kDestroyed] = false; this[kOnDestroyed] = null; this[kClosed] = false; this[kOnClosed] = []; + this[kWebSocketOptions] = opts?.webSocket ?? {}; + } + get webSocketOptions() { + return { + maxPayloadSize: this[kWebSocketOptions].maxPayloadSize ?? 128 * 1024 * 1024 + }; } get destroyed() { return this[kDestroyed]; @@ -2886,7 +2612,7 @@ var require_connect = __commonJS({ }); // node_modules/undici/lib/llhttp/utils.js -var require_utils2 = __commonJS({ +var require_utils = __commonJS({ "node_modules/undici/lib/llhttp/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -2911,7 +2637,7 @@ var require_constants2 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SPECIAL_HEADERS = exports2.HEADER_STATE = exports2.MINOR = exports2.MAJOR = exports2.CONNECTION_TOKEN_CHARS = exports2.HEADER_CHARS = exports2.TOKEN = exports2.STRICT_TOKEN = exports2.HEX = exports2.URL_CHAR = exports2.STRICT_URL_CHAR = exports2.USERINFO_CHARS = exports2.MARK = exports2.ALPHANUM = exports2.NUM = exports2.HEX_MAP = exports2.NUM_MAP = exports2.ALPHA = exports2.FINISH = exports2.H_METHOD_MAP = exports2.METHOD_MAP = exports2.METHODS_RTSP = exports2.METHODS_ICE = exports2.METHODS_HTTP = exports2.METHODS = exports2.LENIENT_FLAGS = exports2.FLAGS = exports2.TYPE = exports2.ERROR = void 0; - var utils_1 = require_utils2(); + var utils_1 = require_utils(); var ERROR; (function(ERROR2) { ERROR2[ERROR2["OK"] = 0] = "OK"; @@ -4284,11 +4010,11 @@ var require_util2 = __commonJS({ var { isUint8Array } = require("node:util/types"); var { webidl } = require_webidl(); var supportedHashes = []; - var crypto; + var crypto2; try { - crypto = require("node:crypto"); + crypto2 = require("node:crypto"); const possibleRelevantHashes = ["sha256", "sha384", "sha512"]; - supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); + supportedHashes = crypto2.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); } catch { } function responseURL(response) { @@ -4561,7 +4287,7 @@ var require_util2 = __commonJS({ } } function bytesMatch(bytes, metadataList) { - if (crypto === void 0) { + if (crypto2 === void 0) { return true; } const parsedMetadata = parseMetadata(metadataList); @@ -4576,7 +4302,7 @@ var require_util2 = __commonJS({ for (const item of metadata) { const algorithm = item.algo; const expectedValue = item.hash; - let actualValue = crypto.createHash(algorithm).update(bytes).digest("base64"); + let actualValue = crypto2.createHash(algorithm).update(bytes).digest("base64"); if (actualValue[actualValue.length - 1] === "=") { if (actualValue[actualValue.length - 2] === "=") { actualValue = actualValue.slice(0, -2); @@ -5640,8 +5366,8 @@ var require_body = __commonJS({ var { multipartFormDataParser } = require_formdata_parser(); var random; try { - const crypto = require("node:crypto"); - random = (max) => crypto.randomInt(0, max); + const crypto2 = require("node:crypto"); + random = (max) => crypto2.randomInt(0, max); } catch { random = (max) => Math.floor(Math.random(max)); } @@ -5886,7 +5612,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r } throwIfAborted(object[kState]); const promise = createDeferredPromise(); - const errorSteps = (error) => promise.reject(error); + const errorSteps = (error2) => promise.reject(error2); const successSteps = (data) => { try { promise.resolve(convertBytesToJSValue(data)); @@ -5981,7 +5707,7 @@ var require_client_h1 = __commonJS({ kResume, kHTTPContext } = require_symbols(); - var constants2 = require_constants2(); + var constants4 = require_constants2(); var EMPTY_BUF = Buffer.alloc(0); var FastBuffer = Buffer[Symbol.species]; var addListener = util.addListener; @@ -6053,7 +5779,7 @@ var require_client_h1 = __commonJS({ constructor(client, socket, { exports: exports3 }) { assert(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0); this.llhttp = exports3; - this.ptr = this.llhttp.llhttp_alloc(constants2.TYPE.RESPONSE); + this.ptr = this.llhttp.llhttp_alloc(constants4.TYPE.RESPONSE); this.client = client; this.socket = socket; this.timeout = null; @@ -6148,19 +5874,19 @@ var require_client_h1 = __commonJS({ currentBufferRef = null; } const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr; - if (ret === constants2.ERROR.PAUSED_UPGRADE) { + if (ret === constants4.ERROR.PAUSED_UPGRADE) { this.onUpgrade(data.slice(offset)); - } else if (ret === constants2.ERROR.PAUSED) { + } else if (ret === constants4.ERROR.PAUSED) { this.paused = true; socket.unshift(data.slice(offset)); - } else if (ret !== constants2.ERROR.OK) { + } else if (ret !== constants4.ERROR.OK) { const ptr = llhttp.llhttp_get_error_reason(this.ptr); let message = ""; if (ptr) { const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0); message = "Response does not match the HTTP/1.1 protocol (" + Buffer.from(llhttp.memory.buffer, ptr, len).toString() + ")"; } - throw new HTTPParserError(message, constants2.ERROR[ret], data.slice(offset)); + throw new HTTPParserError(message, constants4.ERROR[ret], data.slice(offset)); } } catch (err) { util.destroy(socket, err); @@ -6335,7 +6061,7 @@ var require_client_h1 = __commonJS({ socket[kBlocking] = false; client[kResume](); } - return pause ? constants2.ERROR.PAUSED : 0; + return pause ? constants4.ERROR.PAUSED : 0; } onBody(buf) { const { client, socket, statusCode, maxResponseSize } = this; @@ -6357,7 +6083,7 @@ var require_client_h1 = __commonJS({ } this.bytesRead += buf.length; if (request.onData(buf) === false) { - return constants2.ERROR.PAUSED; + return constants4.ERROR.PAUSED; } } onMessageComplete() { @@ -6392,13 +6118,13 @@ var require_client_h1 = __commonJS({ if (socket[kWriting]) { assert(client[kRunning] === 0); util.destroy(socket, new InformationalError("reset")); - return constants2.ERROR.PAUSED; + return constants4.ERROR.PAUSED; } else if (!shouldKeepAlive) { util.destroy(socket, new InformationalError("reset")); - return constants2.ERROR.PAUSED; + return constants4.ERROR.PAUSED; } else if (socket[kReset] && client[kRunning] === 0) { util.destroy(socket, new InformationalError("reset")); - return constants2.ERROR.PAUSED; + return constants4.ERROR.PAUSED; } else if (client[kPipelining] == null || client[kPipelining] === 1) { setImmediate(() => client[kResume]()); } else { @@ -7394,8 +7120,8 @@ var require_client_h2 = __commonJS({ } request.onRequestSent(); client[kResume](); - } catch (error) { - abort(error); + } catch (error2) { + abort(error2); } } function writeStream(abort, socket, expectsPayload, h2stream, body, client, request, contentLength) { @@ -7550,8 +7276,8 @@ var require_redirect_handler = __commonJS({ onUpgrade(statusCode, headers, socket) { this.handler.onUpgrade(statusCode, headers, socket); } - onError(error) { - this.handler.onError(error); + onError(error2) { + this.handler.onError(error2); } onHeaders(statusCode, headers, resume, statusText) { this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers); @@ -7772,9 +7498,10 @@ var require_client = __commonJS({ autoSelectFamilyAttemptTimeout, // h2 maxConcurrentStreams, - allowH2 + allowH2, + webSocket } = {}) { - super(); + super({ webSocket }); if (keepAlive !== void 0) { throw new InvalidArgumentError("unsupported keepAlive, use pipelining=0 instead"); } @@ -8280,8 +8007,8 @@ var require_pool_base = __commonJS({ var kRemoveClient = /* @__PURE__ */ Symbol("remove client"); var kStats = /* @__PURE__ */ Symbol("stats"); var PoolBase = class extends DispatcherBase { - constructor() { - super(); + constructor(opts) { + super(opts); this[kQueue] = new FixedQueue(); this[kClients] = []; this[kQueued] = 0; @@ -8452,7 +8179,6 @@ var require_pool = __commonJS({ allowH2, ...options } = {}) { - super(); if (connections != null && (!Number.isFinite(connections) || connections < 0)) { throw new InvalidArgumentError("invalid connections"); } @@ -8473,13 +8199,14 @@ var require_pool = __commonJS({ ...connect }); } + super(options); this[kInterceptors] = options.interceptors?.Pool && Array.isArray(options.interceptors.Pool) ? options.interceptors.Pool : []; this[kConnections] = connections || null; this[kUrl] = util.parseOrigin(origin); this[kOptions] = { ...util.deepClone(options), connect, allowH2 }; this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; this[kFactory] = factory; - this.on("connectionError", (origin2, targets, error) => { + this.on("connectionError", (origin2, targets, error2) => { for (const target of targets) { const idx = this[kClients].indexOf(target); if (idx !== -1) { @@ -8672,7 +8399,6 @@ var require_agent = __commonJS({ } var Agent = class extends DispatcherBase { constructor({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) { - super(); if (typeof factory !== "function") { throw new InvalidArgumentError("factory must be a function."); } @@ -8682,6 +8408,7 @@ var require_agent = __commonJS({ if (!Number.isInteger(maxRedirections) || maxRedirections < 0) { throw new InvalidArgumentError("maxRedirections must be a positive number"); } + super(options); if (connect && typeof connect !== "function") { connect = { ...connect }; } @@ -8824,7 +8551,7 @@ var require_proxy_agent = __commonJS({ return this.#client.destroy(err); } }; - var ProxyAgent = class extends DispatcherBase { + var ProxyAgent2 = class extends DispatcherBase { constructor(opts) { super(); if (!opts || typeof opts === "object" && !(opts instanceof URL2) && !opts.uri) { @@ -8965,7 +8692,7 @@ var require_proxy_agent = __commonJS({ throw new InvalidArgumentError("Proxy-Authorization should be sent in ProxyAgent constructor"); } } - module2.exports = ProxyAgent; + module2.exports = ProxyAgent2; } }); @@ -8975,7 +8702,7 @@ var require_env_http_proxy_agent = __commonJS({ "use strict"; var DispatcherBase = require_dispatcher_base(); var { kClose, kDestroy, kClosed, kDestroyed, kDispatch, kNoProxyAgent, kHttpProxyAgent, kHttpsProxyAgent } = require_symbols(); - var ProxyAgent = require_proxy_agent(); + var ProxyAgent2 = require_proxy_agent(); var Agent = require_agent(); var DEFAULT_PORTS = { "http:": 80, @@ -8999,13 +8726,13 @@ var require_env_http_proxy_agent = __commonJS({ this[kNoProxyAgent] = new Agent(agentOpts); const HTTP_PROXY = httpProxy ?? process.env.http_proxy ?? process.env.HTTP_PROXY; if (HTTP_PROXY) { - this[kHttpProxyAgent] = new ProxyAgent({ ...agentOpts, uri: HTTP_PROXY }); + this[kHttpProxyAgent] = new ProxyAgent2({ ...agentOpts, uri: HTTP_PROXY }); } else { this[kHttpProxyAgent] = this[kNoProxyAgent]; } const HTTPS_PROXY = httpsProxy ?? process.env.https_proxy ?? process.env.HTTPS_PROXY; if (HTTPS_PROXY) { - this[kHttpsProxyAgent] = new ProxyAgent({ ...agentOpts, uri: HTTPS_PROXY }); + this[kHttpsProxyAgent] = new ProxyAgent2({ ...agentOpts, uri: HTTPS_PROXY }); } else { this[kHttpsProxyAgent] = this[kHttpProxyAgent]; } @@ -10846,13 +10573,13 @@ var require_mock_utils = __commonJS({ if (mockDispatch2.data.callback) { mockDispatch2.data = { ...mockDispatch2.data, ...mockDispatch2.data.callback(opts) }; } - const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch2; + const { data: { statusCode, data, headers, trailers, error: error2 }, delay, persist } = mockDispatch2; const { timesInvoked, times } = mockDispatch2; mockDispatch2.consumed = !persist && timesInvoked >= times; mockDispatch2.pending = timesInvoked < times; - if (error !== null) { + if (error2 !== null) { deleteMockDispatch(this[kDispatches], key); - handler.onError(error); + handler.onError(error2); return true; } if (typeof delay === "number" && delay > 0) { @@ -10890,19 +10617,19 @@ var require_mock_utils = __commonJS({ if (agent.isMockActive) { try { mockDispatch.call(this, opts, handler); - } catch (error) { - if (error instanceof MockNotMatchedError) { + } catch (error2) { + if (error2 instanceof MockNotMatchedError) { const netConnect = agent[kGetNetConnect](); if (netConnect === false) { - throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); + throw new MockNotMatchedError(`${error2.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); } if (checkNetConnect(netConnect, origin)) { originalDispatch.call(this, opts, handler); } else { - throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); + throw new MockNotMatchedError(`${error2.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); } } else { - throw error; + throw error2; } } } else { @@ -11067,11 +10794,11 @@ var require_mock_interceptor = __commonJS({ /** * Mock an undici request with a defined error. */ - replyWithError(error) { - if (typeof error === "undefined") { + replyWithError(error2) { + if (typeof error2 === "undefined") { throw new InvalidArgumentError("error must be defined"); } - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error }); + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error: error2 }); return new MockScope(newMockDispatch); } /** @@ -12032,12 +11759,12 @@ var require_headers = __commonJS({ append(name, value, isLowerCase) { this[kHeadersSortedMap] = null; const lowercaseName = isLowerCase ? name : name.toLowerCase(); - const exists = this[kHeadersMap].get(lowercaseName); - if (exists) { + const exists2 = this[kHeadersMap].get(lowercaseName); + if (exists2) { const delimiter = lowercaseName === "cookie" ? "; " : ", "; this[kHeadersMap].set(lowercaseName, { - name: exists.name, - value: `${exists.value}${delimiter}${value}` + name: exists2.name, + value: `${exists2.value}${delimiter}${value}` }); } else { this[kHeadersMap].set(lowercaseName, { name, value }); @@ -12162,7 +11889,7 @@ var require_headers = __commonJS({ } } }; - var Headers = class _Headers { + var Headers2 = class _Headers { #guard; #headersList; constructor(init = void 0) { @@ -12312,13 +12039,13 @@ var require_headers = __commonJS({ o.#headersList = list; } }; - var { getHeadersGuard, setHeadersGuard, getHeadersList, setHeadersList } = Headers; - Reflect.deleteProperty(Headers, "getHeadersGuard"); - Reflect.deleteProperty(Headers, "setHeadersGuard"); - Reflect.deleteProperty(Headers, "getHeadersList"); - Reflect.deleteProperty(Headers, "setHeadersList"); - iteratorMixin("Headers", Headers, kHeadersSortedMap, 0, 1); - Object.defineProperties(Headers.prototype, { + var { getHeadersGuard, setHeadersGuard, getHeadersList, setHeadersList } = Headers2; + Reflect.deleteProperty(Headers2, "getHeadersGuard"); + Reflect.deleteProperty(Headers2, "setHeadersGuard"); + Reflect.deleteProperty(Headers2, "getHeadersList"); + Reflect.deleteProperty(Headers2, "setHeadersList"); + iteratorMixin("Headers", Headers2, kHeadersSortedMap, 0, 1); + Object.defineProperties(Headers2.prototype, { append: kEnumerableProperty, delete: kEnumerableProperty, get: kEnumerableProperty, @@ -12336,7 +12063,7 @@ var require_headers = __commonJS({ webidl.converters.HeadersInit = function(V, prefix, argument) { if (webidl.util.Type(V) === "Object") { const iterator = Reflect.get(V, Symbol.iterator); - if (!util.types.isProxy(V) && iterator === Headers.prototype.entries) { + if (!util.types.isProxy(V) && iterator === Headers2.prototype.entries) { try { return getHeadersList(V).entriesList; } catch { @@ -12357,7 +12084,7 @@ var require_headers = __commonJS({ fill, // for test. compareHeaderName, - Headers, + Headers: Headers2, HeadersList, getHeadersGuard, setHeadersGuard, @@ -12371,7 +12098,7 @@ var require_headers = __commonJS({ var require_response = __commonJS({ "node_modules/undici/lib/web/fetch/response.js"(exports2, module2) { "use strict"; - var { Headers, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = require_headers(); + var { Headers: Headers2, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = require_headers(); var { extractBody, cloneBody, mixinBody, hasFinalizationRegistry, streamRegistry, bodyUnusable } = require_body(); var util = require_util(); var nodeUtil = require("node:util"); @@ -12449,7 +12176,7 @@ var require_response = __commonJS({ } init = webidl.converters.ResponseInit(init); this[kState] = makeResponse({}); - this[kHeaders] = new Headers(kConstruct); + this[kHeaders] = new Headers2(kConstruct); setHeadersGuard(this[kHeaders], "response"); setHeadersList(this[kHeaders], this[kState].headersList); let bodyWithType = null; @@ -12693,7 +12420,7 @@ var require_response = __commonJS({ function fromInnerResponse(innerResponse, guard) { const response = new Response(kConstruct); response[kState] = innerResponse; - response[kHeaders] = new Headers(kConstruct); + response[kHeaders] = new Headers2(kConstruct); setHeadersList(response[kHeaders], innerResponse.headersList); setHeadersGuard(response[kHeaders], guard); if (hasFinalizationRegistry && innerResponse.body?.stream) { @@ -12813,7 +12540,7 @@ var require_request2 = __commonJS({ "node_modules/undici/lib/web/fetch/request.js"(exports2, module2) { "use strict"; var { extractBody, mixinBody, cloneBody, bodyUnusable } = require_body(); - var { Headers, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = require_headers(); + var { Headers: Headers2, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = require_headers(); var { FinalizationRegistry: FinalizationRegistry2 } = require_dispatcher_weakref()(); var util = require_util(); var nodeUtil = require("node:util"); @@ -13081,7 +12808,7 @@ var require_request2 = __commonJS({ requestFinalizer.register(ac, { signal, abort }, abort); } } - this[kHeaders] = new Headers(kConstruct); + this[kHeaders] = new Headers2(kConstruct); setHeadersList(this[kHeaders], request.headersList); setHeadersGuard(this[kHeaders], "request"); if (mode === "no-cors") { @@ -13370,7 +13097,7 @@ var require_request2 = __commonJS({ const request = new Request(kConstruct); request[kState] = innerRequest; request[kSignal] = signal; - request[kHeaders] = new Headers(kConstruct); + request[kHeaders] = new Headers2(kConstruct); setHeadersList(request[kHeaders], innerRequest.headersList); setHeadersGuard(request[kHeaders], guard); return request; @@ -13589,17 +13316,17 @@ var require_fetch = __commonJS({ this.emit("terminated", reason); } // https://fetch.spec.whatwg.org/#fetch-controller-abort - abort(error) { + abort(error2) { if (this.state !== "ongoing") { return; } this.state = "aborted"; - if (!error) { - error = new DOMException("The operation was aborted.", "AbortError"); + if (!error2) { + error2 = new DOMException("The operation was aborted.", "AbortError"); } - this.serializedAbortReason = error; - this.connection?.destroy(error); - this.emit("terminated", error); + this.serializedAbortReason = error2; + this.connection?.destroy(error2); + this.emit("terminated", error2); } }; function handleFetchDone(response) { @@ -13695,12 +13422,12 @@ var require_fetch = __commonJS({ ); } var markResourceTiming = performance.markResourceTiming; - function abortFetch(p, request, responseObject, error) { + function abortFetch(p, request, responseObject, error2) { if (p) { - p.reject(error); + p.reject(error2); } if (request.body != null && isReadable(request.body?.stream)) { - request.body.stream.cancel(error).catch((err) => { + request.body.stream.cancel(error2).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -13712,7 +13439,7 @@ var require_fetch = __commonJS({ } const response = responseObject[kState]; if (response.body != null && isReadable(response.body?.stream)) { - response.body.stream.cancel(error).catch((err) => { + response.body.stream.cancel(error2).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -14533,13 +14260,13 @@ var require_fetch = __commonJS({ fetchParams.controller.ended = true; this.body.push(null); }, - onError(error) { + onError(error2) { if (this.abort) { fetchParams.controller.off("terminated", this.abort); } - this.body?.destroy(error); - fetchParams.controller.terminate(error); - reject(error); + this.body?.destroy(error2); + fetchParams.controller.terminate(error2); + reject(error2); }, onUpgrade(status, rawHeaders, socket) { if (status !== 101) { @@ -15002,8 +14729,8 @@ var require_util4 = __commonJS({ } fr[kResult] = result; fireAProgressEvent("load", fr); - } catch (error) { - fr[kError] = error; + } catch (error2) { + fr[kError] = error2; fireAProgressEvent("error", fr); } if (fr[kState] !== "loading") { @@ -15012,13 +14739,13 @@ var require_util4 = __commonJS({ }); break; } - } catch (error) { + } catch (error2) { if (fr[kAborted]) { return; } queueMicrotask(() => { fr[kState] = "done"; - fr[kError] = error; + fr[kError] = error2; fireAProgressEvent("error", fr); if (fr[kState] !== "loading") { fireAProgressEvent("loadend", fr); @@ -16408,10 +16135,10 @@ var require_cookies = __commonJS({ var { parseSetCookie } = require_parse(); var { stringify } = require_util6(); var { webidl } = require_webidl(); - var { Headers } = require_headers(); + var { Headers: Headers2 } = require_headers(); function getCookies(headers) { webidl.argumentLengthCheck(arguments, 1, "getCookies"); - webidl.brandCheck(headers, Headers, { strict: false }); + webidl.brandCheck(headers, Headers2, { strict: false }); const cookie = headers.get("cookie"); const out = {}; if (!cookie) { @@ -16424,7 +16151,7 @@ var require_cookies = __commonJS({ return out; } function deleteCookie(headers, name, attributes) { - webidl.brandCheck(headers, Headers, { strict: false }); + webidl.brandCheck(headers, Headers2, { strict: false }); const prefix = "deleteCookie"; webidl.argumentLengthCheck(arguments, 2, prefix); name = webidl.converters.DOMString(name, prefix, "name"); @@ -16438,7 +16165,7 @@ var require_cookies = __commonJS({ } function getSetCookies(headers) { webidl.argumentLengthCheck(arguments, 1, "getSetCookies"); - webidl.brandCheck(headers, Headers, { strict: false }); + webidl.brandCheck(headers, Headers2, { strict: false }); const cookies = headers.getSetCookie(); if (!cookies) { return []; @@ -16447,7 +16174,7 @@ var require_cookies = __commonJS({ } function setCookie(headers, cookie) { webidl.argumentLengthCheck(arguments, 2, "setCookie"); - webidl.brandCheck(headers, Headers, { strict: false }); + webidl.brandCheck(headers, Headers2, { strict: false }); cookie = webidl.converters.Cookie(cookie); const str = stringify(cookie); if (str) { @@ -17049,13 +16776,13 @@ var require_frame = __commonJS({ "use strict"; var { maxUnsigned16Bit } = require_constants5(); var BUFFER_SIZE = 16386; - var crypto; + var crypto2; var buffer = null; var bufIdx = BUFFER_SIZE; try { - crypto = require("node:crypto"); + crypto2 = require("node:crypto"); } catch { - crypto = { + crypto2 = { // not full compatibility, but minimum. randomFillSync: function randomFillSync(buffer2, _offset, _size) { for (let i = 0; i < buffer2.length; ++i) { @@ -17068,7 +16795,7 @@ var require_frame = __commonJS({ function generateMask() { if (bufIdx === BUFFER_SIZE) { bufIdx = 0; - crypto.randomFillSync(buffer ??= Buffer.allocUnsafe(BUFFER_SIZE), 0, BUFFER_SIZE); + crypto2.randomFillSync(buffer ??= Buffer.allocUnsafe(BUFFER_SIZE), 0, BUFFER_SIZE); } return [buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++]]; } @@ -17137,12 +16864,12 @@ var require_connection = __commonJS({ var { CloseEvent } = require_events(); var { makeRequest } = require_request2(); var { fetching } = require_fetch(); - var { Headers, getHeadersList } = require_headers(); + var { Headers: Headers2, getHeadersList } = require_headers(); var { getDecodeSplit } = require_util2(); var { WebsocketFrameSend } = require_frame(); - var crypto; + var crypto2; try { - crypto = require("node:crypto"); + crypto2 = require("node:crypto"); } catch { } function establishWebSocketConnection(url, protocols, client, ws, onEstablish, options) { @@ -17159,10 +16886,10 @@ var require_connection = __commonJS({ redirect: "error" }); if (options.headers) { - const headersList = getHeadersList(new Headers(options.headers)); + const headersList = getHeadersList(new Headers2(options.headers)); request.headersList = headersList; } - const keyValue = crypto.randomBytes(16).toString("base64"); + const keyValue = crypto2.randomBytes(16).toString("base64"); request.headersList.append("sec-websocket-key", keyValue); request.headersList.append("sec-websocket-version", "13"); for (const protocol of protocols) { @@ -17192,7 +16919,7 @@ var require_connection = __commonJS({ return; } const secWSAccept = response.headersList.get("Sec-WebSocket-Accept"); - const digest = crypto.createHash("sha1").update(keyValue + uid).digest("base64"); + const digest = crypto2.createHash("sha1").update(keyValue + uid).digest("base64"); if (secWSAccept !== digest) { failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); return; @@ -17290,11 +17017,11 @@ var require_connection = __commonJS({ }); } } - function onSocketError(error) { + function onSocketError(error2) { const { ws } = this; ws[kReadyState] = states.CLOSING; if (channels.socketError.hasSubscribers) { - channels.socketError.publish(error); + channels.socketError.publish(error2); } this.destroy(); } @@ -17315,31 +17042,26 @@ var require_permessage_deflate = __commonJS({ var tail = Buffer.from([0, 0, 255, 255]); var kBuffer = /* @__PURE__ */ Symbol("kBuffer"); var kLength = /* @__PURE__ */ Symbol("kLength"); - var kDefaultMaxDecompressedSize = 4 * 1024 * 1024; var PerMessageDeflate = class { /** @type {import('node:zlib').InflateRaw} */ #inflate; #options = {}; - /** @type {number} */ - #maxDecompressedSize; - /** @type {boolean} */ - #aborted = false; - /** @type {Function|null} */ - #currentCallback = null; + #maxPayloadSize = 0; /** * @param {Map} extensions - * @param {{ maxDecompressedMessageSize?: number }} [options] */ - constructor(extensions, options = {}) { + constructor(extensions, options) { this.#options.serverNoContextTakeover = extensions.has("server_no_context_takeover"); this.#options.serverMaxWindowBits = extensions.get("server_max_window_bits"); - this.#maxDecompressedSize = options.maxDecompressedMessageSize ?? kDefaultMaxDecompressedSize; + this.#maxPayloadSize = options.maxPayloadSize; } + /** + * Decompress a compressed payload. + * @param {Buffer} chunk Compressed data + * @param {boolean} fin Final fragment flag + * @param {Function} callback Callback function + */ decompress(chunk, fin, callback) { - if (this.#aborted) { - callback(new MessageSizeExceededError()); - return; - } if (!this.#inflate) { let windowBits = Z_DEFAULT_WINDOWBITS; if (this.#options.serverMaxWindowBits) { @@ -17358,20 +17080,11 @@ var require_permessage_deflate = __commonJS({ this.#inflate[kBuffer] = []; this.#inflate[kLength] = 0; this.#inflate.on("data", (data) => { - if (this.#aborted) { - return; - } this.#inflate[kLength] += data.length; - if (this.#inflate[kLength] > this.#maxDecompressedSize) { - this.#aborted = true; + if (this.#maxPayloadSize > 0 && this.#inflate[kLength] > this.#maxPayloadSize) { + callback(new MessageSizeExceededError()); this.#inflate.removeAllListeners(); - this.#inflate.destroy(); this.#inflate = null; - if (this.#currentCallback) { - const cb = this.#currentCallback; - this.#currentCallback = null; - cb(new MessageSizeExceededError()); - } return; } this.#inflate[kBuffer].push(data); @@ -17381,19 +17094,17 @@ var require_permessage_deflate = __commonJS({ callback(err); }); } - this.#currentCallback = callback; this.#inflate.write(chunk); if (fin) { this.#inflate.write(tail); } this.#inflate.flush(() => { - if (this.#aborted || !this.#inflate) { + if (!this.#inflate) { return; } const full = Buffer.concat(this.#inflate[kBuffer], this.#inflate[kLength]); this.#inflate[kBuffer].length = 0; this.#inflate[kLength] = 0; - this.#currentCallback = null; callback(null, full); }); } @@ -17424,8 +17135,10 @@ var require_receiver = __commonJS({ var { WebsocketFrameSend } = require_frame(); var { closeWebSocketConnection } = require_connection(); var { PerMessageDeflate } = require_permessage_deflate(); + var { MessageSizeExceededError } = require_errors(); var ByteParser = class extends Writable { #buffers = []; + #fragmentsBytes = 0; #byteOffset = 0; #loop = false; #state = parserStates.INFO; @@ -17433,18 +17146,18 @@ var require_receiver = __commonJS({ #fragments = []; /** @type {Map} */ #extensions; - /** @type {{ maxDecompressedMessageSize?: number }} */ - #options; + /** @type {number} */ + #maxPayloadSize; /** * @param {import('./websocket').WebSocket} ws * @param {Map|null} extensions - * @param {{ maxDecompressedMessageSize?: number }} [options] + * @param {{ maxPayloadSize?: number }} [options] */ constructor(ws, extensions, options = {}) { super(); this.ws = ws; this.#extensions = extensions == null ? /* @__PURE__ */ new Map() : extensions; - this.#options = options; + this.#maxPayloadSize = options.maxPayloadSize ?? 0; if (this.#extensions.has("permessage-deflate")) { this.#extensions.set("permessage-deflate", new PerMessageDeflate(extensions, options)); } @@ -17459,6 +17172,13 @@ var require_receiver = __commonJS({ this.#loop = true; this.run(callback); } + #validatePayloadLength() { + if (this.#maxPayloadSize > 0 && !isControlFrame(this.#info.opcode) && this.#info.payloadLength > this.#maxPayloadSize) { + failWebsocketConnection(this.ws, "Payload size exceeds maximum allowed size"); + return false; + } + return true; + } /** * Runs whenever a new chunk is received. * Callback is called whenever there are no more chunks buffering, @@ -17518,6 +17238,9 @@ var require_receiver = __commonJS({ if (payloadLength <= 125) { this.#info.payloadLength = payloadLength; this.#state = parserStates.READ_DATA; + if (!this.#validatePayloadLength()) { + return; + } } else if (payloadLength === 126) { this.#state = parserStates.PAYLOADLENGTH_16; } else if (payloadLength === 127) { @@ -17538,6 +17261,9 @@ var require_receiver = __commonJS({ const buffer = this.consume(2); this.#info.payloadLength = buffer.readUInt16BE(0); this.#state = parserStates.READ_DATA; + if (!this.#validatePayloadLength()) { + return; + } } else if (this.#state === parserStates.PAYLOADLENGTH_64) { if (this.#byteOffset < 8) { return callback(); @@ -17551,6 +17277,9 @@ var require_receiver = __commonJS({ } this.#info.payloadLength = lower; this.#state = parserStates.READ_DATA; + if (!this.#validatePayloadLength()) { + return; + } } else if (this.#state === parserStates.READ_DATA) { if (this.#byteOffset < this.#info.payloadLength) { return callback(); @@ -17561,32 +17290,41 @@ var require_receiver = __commonJS({ this.#state = parserStates.INFO; } else { if (!this.#info.compressed) { - this.#fragments.push(body); + this.writeFragments(body); + if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { + failWebsocketConnection(this.ws, new MessageSizeExceededError().message); + return; + } if (!this.#info.fragmented && this.#info.fin) { - const fullMessage = Buffer.concat(this.#fragments); - websocketMessageReceived(this.ws, this.#info.binaryType, fullMessage); - this.#fragments.length = 0; + websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()); } this.#state = parserStates.INFO; } else { - this.#extensions.get("permessage-deflate").decompress(body, this.#info.fin, (error, data) => { - if (error) { - failWebsocketConnection(this.ws, error.message); - return; - } - this.#fragments.push(data); - if (!this.#info.fin) { - this.#state = parserStates.INFO; + this.#extensions.get("permessage-deflate").decompress( + body, + this.#info.fin, + (error2, data) => { + if (error2) { + failWebsocketConnection(this.ws, error2.message); + return; + } + this.writeFragments(data); + if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { + failWebsocketConnection(this.ws, new MessageSizeExceededError().message); + return; + } + if (!this.#info.fin) { + this.#state = parserStates.INFO; + this.#loop = true; + this.run(callback); + return; + } + websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()); this.#loop = true; + this.#state = parserStates.INFO; this.run(callback); - return; } - websocketMessageReceived(this.ws, this.#info.binaryType, Buffer.concat(this.#fragments)); - this.#loop = true; - this.#state = parserStates.INFO; - this.#fragments.length = 0; - this.run(callback); - }); + ); this.#loop = false; break; } @@ -17629,6 +17367,21 @@ var require_receiver = __commonJS({ this.#byteOffset -= n; return buffer; } + writeFragments(fragment) { + this.#fragmentsBytes += fragment.length; + this.#fragments.push(fragment); + } + consumeFragments() { + const fragments = this.#fragments; + if (fragments.length === 1) { + this.#fragmentsBytes = 0; + return fragments.shift(); + } + const output = Buffer.concat(fragments, this.#fragmentsBytes); + this.#fragments = []; + this.#fragmentsBytes = 0; + return output; + } parseCloseBody(data) { assert(data.length !== 1); let code; @@ -17840,8 +17593,6 @@ var require_websocket = __commonJS({ #extensions = ""; /** @type {SendQueue} */ #sendQueue; - /** @type {{ maxDecompressedMessageSize?: number }} */ - #options; /** * @param {string} url * @param {string|string[]} protocols @@ -17885,9 +17636,6 @@ var require_websocket = __commonJS({ throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); } this[kWebSocketURL] = new URL(urlRecord.href); - this.#options = { - maxDecompressedMessageSize: options.maxDecompressedMessageSize - }; const client = environmentSettingsObject.settingsObject; this[kController] = establishWebSocketConnection( urlRecord, @@ -18071,7 +17819,10 @@ var require_websocket = __commonJS({ */ #onConnectionEstablished(response, parsedExtensions) { this[kResponse] = response; - const parser = new ByteParser(this, parsedExtensions, this.#options); + const maxPayloadSize = this[kController]?.dispatcher?.webSocketOptions?.maxPayloadSize; + const parser = new ByteParser(this, parsedExtensions, { + maxPayloadSize + }); parser.on("drain", onParserDrain); parser.on("error", onParserError.bind(this)); response.socket.ws = this; @@ -18146,19 +17897,6 @@ var require_websocket = __commonJS({ { key: "headers", converter: webidl.nullableConverter(webidl.converters.HeadersInit) - }, - { - key: "maxDecompressedMessageSize", - converter: webidl.nullableConverter((V) => { - V = webidl.converters["unsigned long long"](V); - if (V <= 0) { - throw webidl.errors.exception({ - header: "WebSocket constructor", - message: "maxDecompressedMessageSize must be greater than 0" - }); - } - return V; - }) } ]); webidl.converters["DOMString or sequence or WebSocketInit"] = function(V) { @@ -18621,8 +18359,8 @@ var require_eventsource = __commonJS({ pipeline( response.body.stream, eventSourceStream, - (error) => { - if (error?.aborted === false) { + (error2) => { + if (error2?.aborted === false) { this.close(); this.dispatchEvent(new Event("error")); } @@ -18762,7 +18500,7 @@ var require_undici = __commonJS({ var Pool = require_pool(); var BalancedPool = require_balanced_pool(); var Agent = require_agent(); - var ProxyAgent = require_proxy_agent(); + var ProxyAgent2 = require_proxy_agent(); var EnvHttpProxyAgent = require_env_http_proxy_agent(); var RetryAgent = require_retry_agent(); var errors = require_errors(); @@ -18785,7 +18523,7 @@ var require_undici = __commonJS({ module2.exports.Pool = Pool; module2.exports.BalancedPool = BalancedPool; module2.exports.Agent = Agent; - module2.exports.ProxyAgent = ProxyAgent; + module2.exports.ProxyAgent = ProxyAgent2; module2.exports.EnvHttpProxyAgent = EnvHttpProxyAgent; module2.exports.RetryAgent = RetryAgent; module2.exports.RetryHandler = RetryHandler; @@ -18895,2715 +18633,511 @@ var require_undici = __commonJS({ } }); -// node_modules/@actions/http-client/lib/index.js -var require_lib = __commonJS({ - "node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - } - __setModuleDefault(result, mod); - return result; - }; - })(); - var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.HttpClientResponse = exports2.HttpClientError = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - exports2.getProxyUrl = getProxyUrl; - exports2.isHttps = isHttps; - var http = __importStar(require("http")); - var https = __importStar(require("https")); - var pm = __importStar(require_proxy()); - var tunnel = __importStar(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - var HttpClient = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = this._getUserAgentWithOrchestrationId(userAgent); - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl_1) { - return __awaiter(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl_1, obj_1) { - return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl_1, obj_1) { - return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl_1, obj_1) { - return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info, data) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve(res); - } - } - this.requestRawWithCallback(info, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info, data, onResult) { - if (typeof data === "string") { - if (!info.options.headers) { - info.options.headers = {}; - } - info.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info.httpModule.request(info.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info = {}; - info.parsedUrl = requestUrl; - const usingSsl = info.parsedUrl.protocol === "https:"; - info.httpModule = usingSsl ? https : http; - const defaultPort = usingSsl ? 443 : 80; - info.options = {}; - info.options.host = info.parsedUrl.hostname; - info.options.port = info.parsedUrl.port ? parseInt(info.parsedUrl.port) : defaultPort; - info.options.path = (info.parsedUrl.pathname || "") + (info.parsedUrl.search || ""); - info.options.method = method; - info.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info.options.headers["user-agent"] = this.userAgent; - } - info.options.agent = this._getAgent(info.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info.options); - } - } - return info; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - /** - * Gets an existing header value or returns a default. - * Handles converting number header values to strings since HTTP headers must be strings. - * Note: This returns string | string[] since some headers can have multiple values. - * For headers that must always be a single string (like Content-Type), use the - * specialized _getExistingOrDefaultContentTypeHeader method instead. - */ - _getExistingOrDefaultHeader(additionalHeaders, header, _default) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; - if (headerValue) { - clientHeader = typeof headerValue === "number" ? headerValue.toString() : headerValue; - } - } - const additionalValue = additionalHeaders[header]; - if (additionalValue !== void 0) { - return typeof additionalValue === "number" ? additionalValue.toString() : additionalValue; - } - if (clientHeader !== void 0) { - return clientHeader; - } - return _default; - } - /** - * Specialized version of _getExistingOrDefaultHeader for Content-Type header. - * Always returns a single string (not an array) since Content-Type should be a single value. - * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. - * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers - * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). - */ - _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; - if (headerValue) { - if (typeof headerValue === "number") { - clientHeader = String(headerValue); - } else if (Array.isArray(headerValue)) { - clientHeader = headerValue.join(", "); - } else { - clientHeader = headerValue; - } - } - } - const additionalValue = additionalHeaders[Headers.ContentType]; - if (additionalValue !== void 0) { - if (typeof additionalValue === "number") { - return String(additionalValue); - } else if (Array.isArray(additionalValue)) { - return additionalValue.join(", "); - } else { - return additionalValue; - } - } - if (clientHeader !== void 0) { - return clientHeader; - } - return _default; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _getUserAgentWithOrchestrationId(userAgent) { - const baseUserAgent = userAgent || "actions/http-client"; - const orchId = process.env["ACTIONS_ORCHESTRATION_ID"]; - if (orchId) { - const sanitizedId = orchId.replace(/[^a-z0-9_.-]/gi, "_"); - return `${baseUserAgent} actions_orchestration_id/${sanitizedId}`; - } - return baseUserAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve) => setTimeout(() => resolve(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - -// node_modules/@actions/http-client/lib/auth.js -var require_auth = __commonJS({ - "node_modules/@actions/http-client/lib/auth.js"(exports2) { - "use strict"; - var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; - var BasicCredentialHandler = class { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BasicCredentialHandler = BasicCredentialHandler; - var BearerCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BearerCredentialHandler = BearerCredentialHandler; - var PersonalAccessTokenCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; - } -}); - -// node_modules/@actions/core/lib/oidc-utils.js -var require_oidc_utils = __commonJS({ - "node_modules/@actions/core/lib/oidc-utils.js"(exports2) { - "use strict"; - var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.OidcClient = void 0; - var http_client_1 = require_lib(); - var auth_1 = require_auth(); - var core_1 = require_core(); - var OidcClient = class _OidcClient { - static createHttpClient(allowRetry = true, maxRetry = 10) { - const requestOptions = { - allowRetries: allowRetry, - maxRetries: maxRetry - }; - return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); - } - static getRequestToken() { - const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; - if (!token) { - throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); - } - return token; - } - static getIDTokenUrl() { - const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; - if (!runtimeUrl) { - throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); - } - return runtimeUrl; - } - static getCall(id_token_url) { - return __awaiter(this, void 0, void 0, function* () { - var _a; - const httpclient = _OidcClient.createHttpClient(); - const res = yield httpclient.getJson(id_token_url).catch((error) => { - throw new Error(`Failed to get ID Token. - - Error Code : ${error.statusCode} - - Error Message: ${error.message}`); - }); - const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; - if (!id_token) { - throw new Error("Response json body do not have ID Token field"); - } - return id_token; - }); - } - static getIDToken(audience) { - return __awaiter(this, void 0, void 0, function* () { - try { - let id_token_url = _OidcClient.getIDTokenUrl(); - if (audience) { - const encodedAudience = encodeURIComponent(audience); - id_token_url = `${id_token_url}&audience=${encodedAudience}`; - } - (0, core_1.debug)(`ID token url is ${id_token_url}`); - const id_token = yield _OidcClient.getCall(id_token_url); - (0, core_1.setSecret)(id_token); - return id_token; - } catch (error) { - throw new Error(`Error message: ${error.message}`); - } - }); - } - }; - exports2.OidcClient = OidcClient; - } -}); - -// node_modules/@actions/core/lib/summary.js -var require_summary = __commonJS({ - "node_modules/@actions/core/lib/summary.js"(exports2) { - "use strict"; - var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0; - var os_1 = require("os"); - var fs_1 = require("fs"); - var { access, appendFile, writeFile } = fs_1.promises; - exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; - exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; - var Summary = class { - constructor() { - this._buffer = ""; - } - /** - * Finds the summary file path from the environment, rejects if env var is not found or file does not exist - * Also checks r/w permissions. - * - * @returns step summary file path - */ - filePath() { - return __awaiter(this, void 0, void 0, function* () { - if (this._filePath) { - return this._filePath; - } - const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR]; - if (!pathFromEnv) { - throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); - } - try { - yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); - } catch (_a) { - throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); - } - this._filePath = pathFromEnv; - return this._filePath; - }); - } - /** - * Wraps content in an HTML tag, adding any HTML attributes - * - * @param {string} tag HTML tag to wrap - * @param {string | null} content content within the tag - * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add - * - * @returns {string} content wrapped in HTML element - */ - wrap(tag, content, attrs = {}) { - const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); - if (!content) { - return `<${tag}${htmlAttrs}>`; - } - return `<${tag}${htmlAttrs}>${content}`; - } - /** - * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. - * - * @param {SummaryWriteOptions} [options] (optional) options for write operation - * - * @returns {Promise} summary instance - */ - write(options) { - return __awaiter(this, void 0, void 0, function* () { - const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); - const filePath = yield this.filePath(); - const writeFunc = overwrite ? writeFile : appendFile; - yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); - return this.emptyBuffer(); - }); - } - /** - * Clears the summary buffer and wipes the summary file - * - * @returns {Summary} summary instance - */ - clear() { - return __awaiter(this, void 0, void 0, function* () { - return this.emptyBuffer().write({ overwrite: true }); - }); - } - /** - * Returns the current summary buffer as a string - * - * @returns {string} string of summary buffer - */ - stringify() { - return this._buffer; - } - /** - * If the summary buffer is empty - * - * @returns {boolen} true if the buffer is empty - */ - isEmptyBuffer() { - return this._buffer.length === 0; - } - /** - * Resets the summary buffer without writing to summary file - * - * @returns {Summary} summary instance - */ - emptyBuffer() { - this._buffer = ""; - return this; - } - /** - * Adds raw text to the summary buffer - * - * @param {string} text content to add - * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) - * - * @returns {Summary} summary instance - */ - addRaw(text, addEOL = false) { - this._buffer += text; - return addEOL ? this.addEOL() : this; - } - /** - * Adds the operating system-specific end-of-line marker to the buffer - * - * @returns {Summary} summary instance - */ - addEOL() { - return this.addRaw(os_1.EOL); - } - /** - * Adds an HTML codeblock to the summary buffer - * - * @param {string} code content to render within fenced code block - * @param {string} lang (optional) language to syntax highlight code - * - * @returns {Summary} summary instance - */ - addCodeBlock(code, lang) { - const attrs = Object.assign({}, lang && { lang }); - const element = this.wrap("pre", this.wrap("code", code), attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML list to the summary buffer - * - * @param {string[]} items list of items to render - * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) - * - * @returns {Summary} summary instance - */ - addList(items, ordered = false) { - const tag = ordered ? "ol" : "ul"; - const listItems = items.map((item) => this.wrap("li", item)).join(""); - const element = this.wrap(tag, listItems); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML table to the summary buffer - * - * @param {SummaryTableCell[]} rows table rows - * - * @returns {Summary} summary instance - */ - addTable(rows) { - const tableBody = rows.map((row) => { - const cells = row.map((cell) => { - if (typeof cell === "string") { - return this.wrap("td", cell); - } - const { header, data, colspan, rowspan } = cell; - const tag = header ? "th" : "td"; - const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); - return this.wrap(tag, data, attrs); - }).join(""); - return this.wrap("tr", cells); - }).join(""); - const element = this.wrap("table", tableBody); - return this.addRaw(element).addEOL(); - } - /** - * Adds a collapsable HTML details element to the summary buffer - * - * @param {string} label text for the closed state - * @param {string} content collapsable content - * - * @returns {Summary} summary instance - */ - addDetails(label, content) { - const element = this.wrap("details", this.wrap("summary", label) + content); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML image tag to the summary buffer - * - * @param {string} src path to the image you to embed - * @param {string} alt text description of the image - * @param {SummaryImageOptions} options (optional) addition image attributes - * - * @returns {Summary} summary instance - */ - addImage(src, alt, options) { - const { width, height } = options || {}; - const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); - const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML section heading element - * - * @param {string} text heading text - * @param {number | string} [level=1] (optional) the heading level, default: 1 - * - * @returns {Summary} summary instance - */ - addHeading(text, level) { - const tag = `h${level}`; - const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; - const element = this.wrap(allowedTag, text); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML thematic break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addSeparator() { - const element = this.wrap("hr", null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML line break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addBreak() { - const element = this.wrap("br", null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML blockquote to the summary buffer - * - * @param {string} text quote text - * @param {string} cite (optional) citation url - * - * @returns {Summary} summary instance - */ - addQuote(text, cite) { - const attrs = Object.assign({}, cite && { cite }); - const element = this.wrap("blockquote", text, attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML anchor tag to the summary buffer - * - * @param {string} text link text/content - * @param {string} href hyperlink - * - * @returns {Summary} summary instance - */ - addLink(text, href) { - const element = this.wrap("a", text, { href }); - return this.addRaw(element).addEOL(); - } - }; - var _summary = new Summary(); - exports2.markdownSummary = _summary; - exports2.summary = _summary; - } -}); - -// node_modules/@actions/core/lib/path-utils.js -var require_path_utils = __commonJS({ - "node_modules/@actions/core/lib/path-utils.js"(exports2) { - "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - } - __setModuleDefault(result, mod); - return result; - }; - })(); - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toPosixPath = toPosixPath; - exports2.toWin32Path = toWin32Path; - exports2.toPlatformPath = toPlatformPath; - var path = __importStar(require("path")); - function toPosixPath(pth) { - return pth.replace(/[\\]/g, "/"); - } - function toWin32Path(pth) { - return pth.replace(/[/]/g, "\\"); - } - function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path.sep); - } - } -}); - -// node_modules/@actions/io/lib/io-util.js -var require_io_util = __commonJS({ - "node_modules/@actions/io/lib/io-util.js"(exports2) { - "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - } - __setModuleDefault(result, mod); - return result; - }; - })(); - var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - exports2.readlink = readlink; - exports2.exists = exists; - exports2.isDirectory = isDirectory; - exports2.isRooted = isRooted; - exports2.tryGetExecutablePath = tryGetExecutablePath; - exports2.getCmdPath = getCmdPath; - var fs2 = __importStar(require("fs")); - var path = __importStar(require("path")); - _a = fs2.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - function readlink(fsPath) { - return __awaiter(this, void 0, void 0, function* () { - const result = yield fs2.promises.readlink(fsPath); - if (exports2.IS_WINDOWS && !result.endsWith("\\")) { - return `${result}\\`; - } - return result; - }); - } - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs2.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter(this, void 0, void 0, function* () { - try { - yield (0, exports2.stat)(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - function isDirectory(fsPath_1) { - return __awaiter(this, arguments, void 0, function* (fsPath, useStat = false) { - const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); - return stats.isDirectory(); - }); - } - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - function tryGetExecutablePath(filePath, extensions) { - return __awaiter(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield (0, exports2.stat)(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield (0, exports2.stat)(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path.dirname(filePath); - const upperName = path.basename(filePath).toUpperCase(); - for (const actualName of yield (0, exports2.readdir)(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ""; - }); - } - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); - } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - } -}); - -// node_modules/@actions/io/lib/io.js -var require_io = __commonJS({ - "node_modules/@actions/io/lib/io.js"(exports2) { - "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - } - __setModuleDefault(result, mod); - return result; - }; - })(); - var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.cp = cp; - exports2.mv = mv; - exports2.rmRF = rmRF; - exports2.mkdirP = mkdirP; - exports2.which = which; - exports2.findInPath = findInPath; - var assert_1 = require("assert"); - var path = __importStar(require("path")); - var ioUtil = __importStar(require_io_util()); - function cp(source_1, dest_1) { - return __awaiter(this, arguments, void 0, function* (source, dest, options = {}) { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path.join(dest, path.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - function mv(source_1, dest_1) { - return __awaiter(this, arguments, void 0, function* (source, dest, options = {}) { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path.join(dest, path.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - function rmRF(inputPath) { - return __awaiter(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - function mkdirP(fsPath) { - return __awaiter(this, void 0, void 0, function* () { - (0, assert_1.ok)(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - function which(tool, check) { - return __awaiter(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - function findInPath(tool) { - return __awaiter(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); - } - } -}); - -// node_modules/@actions/exec/lib/toolrunner.js -var require_toolrunner = __commonJS({ - "node_modules/@actions/exec/lib/toolrunner.js"(exports2) { - "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - } - __setModuleDefault(result, mod); - return result; - }; - })(); - var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.ToolRunner = void 0; - exports2.argStringToArray = argStringToArray; - var os = __importStar(require("os")); - var events = __importStar(require("events")); - var child = __importStar(require("child_process")); - var path = __importStar(require("path")); - var io = __importStar(require_io()); - var ioUtil = __importStar(require_io_util()); - var timers_1 = require("timers"); - var IS_WINDOWS = process.platform === "win32"; - var ToolRunner = class extends events.EventEmitter { - constructor(toolPath, args, options) { - super(); - if (!toolPath) { - throw new Error("Parameter 'toolPath' cannot be null or empty."); - } - this.toolPath = toolPath; - this.args = args || []; - this.options = options || {}; - } - _debug(message) { - if (this.options.listeners && this.options.listeners.debug) { - this.options.listeners.debug(message); - } - } - _getCommandString(options, noPrefix) { - const toolPath = this._getSpawnFileName(); - const args = this._getSpawnArgs(options); - let cmd = noPrefix ? "" : "[command]"; - if (IS_WINDOWS) { - if (this._isCmdFile()) { - cmd += toolPath; - for (const a of args) { - cmd += ` ${a}`; - } - } else if (options.windowsVerbatimArguments) { - cmd += `"${toolPath}"`; - for (const a of args) { - cmd += ` ${a}`; - } - } else { - cmd += this._windowsQuoteCmdArg(toolPath); - for (const a of args) { - cmd += ` ${this._windowsQuoteCmdArg(a)}`; - } - } - } else { - cmd += toolPath; - for (const a of args) { - cmd += ` ${a}`; - } - } - return cmd; - } - _processLineBuffer(data, strBuffer, onLine) { - try { - let s = strBuffer + data.toString(); - let n = s.indexOf(os.EOL); - while (n > -1) { - const line = s.substring(0, n); - onLine(line); - s = s.substring(n + os.EOL.length); - n = s.indexOf(os.EOL); - } - return s; - } catch (err) { - this._debug(`error processing line. Failed with error ${err}`); - return ""; - } - } - _getSpawnFileName() { - if (IS_WINDOWS) { - if (this._isCmdFile()) { - return process.env["COMSPEC"] || "cmd.exe"; - } - } - return this.toolPath; - } - _getSpawnArgs(options) { - if (IS_WINDOWS) { - if (this._isCmdFile()) { - let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; - for (const a of this.args) { - argline += " "; - argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); - } - argline += '"'; - return [argline]; - } - } - return this.args; - } - _endsWith(str, end) { - return str.endsWith(end); - } - _isCmdFile() { - const upperToolPath = this.toolPath.toUpperCase(); - return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); - } - _windowsQuoteCmdArg(arg) { - if (!this._isCmdFile()) { - return this._uvQuoteCmdArg(arg); - } - if (!arg) { - return '""'; - } - const cmdSpecialChars = [ - " ", - " ", - "&", - "(", - ")", - "[", - "]", - "{", - "}", - "^", - "=", - ";", - "!", - "'", - "+", - ",", - "`", - "~", - "|", - "<", - ">", - '"' - ]; - let needsQuotes = false; - for (const char of arg) { - if (cmdSpecialChars.some((x) => x === char)) { - needsQuotes = true; - break; - } - } - if (!needsQuotes) { - return arg; - } - let reverse = '"'; - let quoteHit = true; - for (let i = arg.length; i > 0; i--) { - reverse += arg[i - 1]; - if (quoteHit && arg[i - 1] === "\\") { - reverse += "\\"; - } else if (arg[i - 1] === '"') { - quoteHit = true; - reverse += '"'; - } else { - quoteHit = false; - } - } - reverse += '"'; - return reverse.split("").reverse().join(""); - } - _uvQuoteCmdArg(arg) { - if (!arg) { - return '""'; - } - if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { - return arg; - } - if (!arg.includes('"') && !arg.includes("\\")) { - return `"${arg}"`; - } - let reverse = '"'; - let quoteHit = true; - for (let i = arg.length; i > 0; i--) { - reverse += arg[i - 1]; - if (quoteHit && arg[i - 1] === "\\") { - reverse += "\\"; - } else if (arg[i - 1] === '"') { - quoteHit = true; - reverse += "\\"; - } else { - quoteHit = false; - } - } - reverse += '"'; - return reverse.split("").reverse().join(""); - } - _cloneExecOptions(options) { - options = options || {}; - const result = { - cwd: options.cwd || process.cwd(), - env: options.env || process.env, - silent: options.silent || false, - windowsVerbatimArguments: options.windowsVerbatimArguments || false, - failOnStdErr: options.failOnStdErr || false, - ignoreReturnCode: options.ignoreReturnCode || false, - delay: options.delay || 1e4 - }; - result.outStream = options.outStream || process.stdout; - result.errStream = options.errStream || process.stderr; - return result; - } - _getSpawnOptions(options, toolPath) { - options = options || {}; - const result = {}; - result.cwd = options.cwd; - result.env = options.env; - result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); - if (options.windowsVerbatimArguments) { - result.argv0 = `"${toolPath}"`; - } - return result; - } - /** - * Exec a tool. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @param tool path to tool to exec - * @param options optional exec options. See ExecOptions - * @returns number - */ - exec() { - return __awaiter(this, void 0, void 0, function* () { - if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { - this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); - } - this.toolPath = yield io.which(this.toolPath, true); - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - this._debug(`exec tool: ${this.toolPath}`); - this._debug("arguments:"); - for (const arg of this.args) { - this._debug(` ${arg}`); - } - const optionsNonNull = this._cloneExecOptions(this.options); - if (!optionsNonNull.silent && optionsNonNull.outStream) { - optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL); - } - const state = new ExecState(optionsNonNull, this.toolPath); - state.on("debug", (message) => { - this._debug(message); - }); - if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { - return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); - } - const fileName = this._getSpawnFileName(); - const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); - let stdbuffer = ""; - if (cp.stdout) { - cp.stdout.on("data", (data) => { - if (this.options.listeners && this.options.listeners.stdout) { - this.options.listeners.stdout(data); - } - if (!optionsNonNull.silent && optionsNonNull.outStream) { - optionsNonNull.outStream.write(data); - } - stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { - if (this.options.listeners && this.options.listeners.stdline) { - this.options.listeners.stdline(line); - } - }); - }); - } - let errbuffer = ""; - if (cp.stderr) { - cp.stderr.on("data", (data) => { - state.processStderr = true; - if (this.options.listeners && this.options.listeners.stderr) { - this.options.listeners.stderr(data); - } - if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { - const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; - s.write(data); - } - errbuffer = this._processLineBuffer(data, errbuffer, (line) => { - if (this.options.listeners && this.options.listeners.errline) { - this.options.listeners.errline(line); - } - }); - }); - } - cp.on("error", (err) => { - state.processError = err.message; - state.processExited = true; - state.processClosed = true; - state.CheckComplete(); - }); - cp.on("exit", (code) => { - state.processExitCode = code; - state.processExited = true; - this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); - state.CheckComplete(); - }); - cp.on("close", (code) => { - state.processExitCode = code; - state.processExited = true; - state.processClosed = true; - this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); - state.CheckComplete(); - }); - state.on("done", (error, exitCode) => { - if (stdbuffer.length > 0) { - this.emit("stdline", stdbuffer); - } - if (errbuffer.length > 0) { - this.emit("errline", errbuffer); - } - cp.removeAllListeners(); - if (error) { - reject(error); - } else { - resolve(exitCode); - } - }); - if (this.options.input) { - if (!cp.stdin) { - throw new Error("child process missing stdin"); - } - cp.stdin.end(this.options.input); - } - })); - }); - } - }; - exports2.ToolRunner = ToolRunner; - function argStringToArray(argString) { - const args = []; - let inQuotes = false; - let escaped = false; - let arg = ""; - function append(c) { - if (escaped && c !== '"') { - arg += "\\"; - } - arg += c; - escaped = false; - } - for (let i = 0; i < argString.length; i++) { - const c = argString.charAt(i); - if (c === '"') { - if (!escaped) { - inQuotes = !inQuotes; - } else { - append(c); - } - continue; - } - if (c === "\\" && escaped) { - append(c); - continue; - } - if (c === "\\" && inQuotes) { - escaped = true; - continue; - } - if (c === " " && !inQuotes) { - if (arg.length > 0) { - args.push(arg); - arg = ""; - } - continue; - } - append(c); - } - if (arg.length > 0) { - args.push(arg.trim()); - } - return args; - } - var ExecState = class _ExecState extends events.EventEmitter { - constructor(options, toolPath) { - super(); - this.processClosed = false; - this.processError = ""; - this.processExitCode = 0; - this.processExited = false; - this.processStderr = false; - this.delay = 1e4; - this.done = false; - this.timeout = null; - if (!toolPath) { - throw new Error("toolPath must not be empty"); - } - this.options = options; - this.toolPath = toolPath; - if (options.delay) { - this.delay = options.delay; - } - } - CheckComplete() { - if (this.done) { - return; - } - if (this.processClosed) { - this._setResult(); - } else if (this.processExited) { - this.timeout = (0, timers_1.setTimeout)(_ExecState.HandleTimeout, this.delay, this); - } - } - _debug(message) { - this.emit("debug", message); - } - _setResult() { - let error; - if (this.processExited) { - if (this.processError) { - error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); - } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { - error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); - } else if (this.processStderr && this.options.failOnStdErr) { - error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); - } - } - if (this.timeout) { - clearTimeout(this.timeout); - this.timeout = null; - } - this.done = true; - this.emit("done", error, this.processExitCode); - } - static HandleTimeout(state) { - if (state.done) { - return; - } - if (!state.processClosed && state.processExited) { - const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; - state._debug(message); - } - state._setResult(); - } - }; - } -}); - -// node_modules/@actions/exec/lib/exec.js -var require_exec = __commonJS({ - "node_modules/@actions/exec/lib/exec.js"(exports2) { - "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - } - __setModuleDefault(result, mod); - return result; - }; - })(); - var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.exec = exec; - exports2.getExecOutput = getExecOutput; - var string_decoder_1 = require("string_decoder"); - var tr = __importStar(require_toolrunner()); - function exec(commandLine, args, options) { - return __awaiter(this, void 0, void 0, function* () { - const commandArgs = tr.argStringToArray(commandLine); - if (commandArgs.length === 0) { - throw new Error(`Parameter 'commandLine' cannot be null or empty.`); - } - const toolPath = commandArgs[0]; - args = commandArgs.slice(1).concat(args || []); - const runner = new tr.ToolRunner(toolPath, args, options); - return runner.exec(); - }); - } - function getExecOutput(commandLine, args, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b; - let stdout = ""; - let stderr = ""; - const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); - const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); - const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; - const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; - const stdErrListener = (data) => { - stderr += stderrDecoder.write(data); - if (originalStdErrListener) { - originalStdErrListener(data); - } - }; - const stdOutListener = (data) => { - stdout += stdoutDecoder.write(data); - if (originalStdoutListener) { - originalStdoutListener(data); - } - }; - const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); - const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); - stdout += stdoutDecoder.end(); - stderr += stderrDecoder.end(); - return { - exitCode, - stdout, - stderr - }; - }); - } - } -}); - -// node_modules/@actions/core/lib/platform.js -var require_platform = __commonJS({ - "node_modules/@actions/core/lib/platform.js"(exports2) { - "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - } - __setModuleDefault(result, mod); - return result; - }; - })(); - var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var __importDefault = exports2 && exports2.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; - exports2.getDetails = getDetails; - var os_1 = __importDefault(require("os")); - var exec = __importStar(require_exec()); - var getWindowsInfo = () => __awaiter(void 0, void 0, void 0, function* () { - const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { - silent: true - }); - const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { - silent: true - }); - return { - name: name.trim(), - version: version.trim() - }; - }); - var getMacOsInfo = () => __awaiter(void 0, void 0, void 0, function* () { - var _a, _b, _c, _d; - const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { - silent: true - }); - const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; - const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; - return { - name, - version - }; - }); - var getLinuxInfo = () => __awaiter(void 0, void 0, void 0, function* () { - const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { - silent: true - }); - const [name, version] = stdout.trim().split("\n"); - return { - name, - version - }; - }); - exports2.platform = os_1.default.platform(); - exports2.arch = os_1.default.arch(); - exports2.isWindows = exports2.platform === "win32"; - exports2.isMacOS = exports2.platform === "darwin"; - exports2.isLinux = exports2.platform === "linux"; - function getDetails() { - return __awaiter(this, void 0, void 0, function* () { - return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { - platform: exports2.platform, - arch: exports2.arch, - isWindows: exports2.isWindows, - isMacOS: exports2.isMacOS, - isLinux: exports2.isLinux - }); - }); - } - } -}); - -// node_modules/@actions/core/lib/core.js -var require_core = __commonJS({ - "node_modules/@actions/core/lib/core.js"(exports2) { - "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - } - __setModuleDefault(result, mod); - return result; - }; - })(); - var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.ExitCode = void 0; - exports2.exportVariable = exportVariable3; - exports2.setSecret = setSecret2; - exports2.addPath = addPath; - exports2.getInput = getInput3; - exports2.getMultilineInput = getMultilineInput; - exports2.getBooleanInput = getBooleanInput2; - exports2.setOutput = setOutput2; - exports2.setCommandEcho = setCommandEcho; - exports2.setFailed = setFailed2; - exports2.isDebug = isDebug; - exports2.debug = debug2; - exports2.error = error; - exports2.warning = warning; - exports2.notice = notice; - exports2.info = info; - exports2.startGroup = startGroup; - exports2.endGroup = endGroup; - exports2.group = group; - exports2.saveState = saveState; - exports2.getState = getState; - exports2.getIDToken = getIDToken; - var command_1 = require_command(); - var file_command_1 = require_file_command(); - var utils_1 = require_utils(); - var os = __importStar(require("os")); - var path = __importStar(require("path")); - var oidc_utils_1 = require_oidc_utils(); - var ExitCode; - (function(ExitCode2) { - ExitCode2[ExitCode2["Success"] = 0] = "Success"; - ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; - })(ExitCode || (exports2.ExitCode = ExitCode = {})); - function exportVariable3(name, val) { - const convertedVal = (0, utils_1.toCommandValue)(val); - process.env[name] = convertedVal; - const filePath = process.env["GITHUB_ENV"] || ""; - if (filePath) { - return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); - } - (0, command_1.issueCommand)("set-env", { name }, convertedVal); - } - function setSecret2(secret) { - (0, command_1.issueCommand)("add-mask", {}, secret); - } - function addPath(inputPath) { - const filePath = process.env["GITHUB_PATH"] || ""; - if (filePath) { - (0, file_command_1.issueFileCommand)("PATH", inputPath); - } else { - (0, command_1.issueCommand)("add-path", {}, inputPath); - } - process.env["PATH"] = `${inputPath}${path.delimiter}${process.env["PATH"]}`; - } - function getInput3(name, options) { - const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; - if (options && options.required && !val) { - throw new Error(`Input required and not supplied: ${name}`); - } - if (options && options.trimWhitespace === false) { - return val; - } - return val.trim(); - } - function getMultilineInput(name, options) { - const inputs = getInput3(name, options).split("\n").filter((x) => x !== ""); - if (options && options.trimWhitespace === false) { - return inputs; - } - return inputs.map((input) => input.trim()); - } - function getBooleanInput2(name, options) { - const trueValue = ["true", "True", "TRUE"]; - const falseValue = ["false", "False", "FALSE"]; - const val = getInput3(name, options); - if (trueValue.includes(val)) - return true; - if (falseValue.includes(val)) - return false; - throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} -Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); - } - function setOutput2(name, value) { - const filePath = process.env["GITHUB_OUTPUT"] || ""; - if (filePath) { - return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); - } - process.stdout.write(os.EOL); - (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); - } - function setCommandEcho(enabled) { - (0, command_1.issue)("echo", enabled ? "on" : "off"); - } - function setFailed2(message) { - process.exitCode = ExitCode.Failure; - error(message); - } - function isDebug() { - return process.env["RUNNER_DEBUG"] === "1"; - } - function debug2(message) { - (0, command_1.issueCommand)("debug", {}, message); - } - function error(message, properties = {}) { - (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); - } - function warning(message, properties = {}) { - (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); - } - function notice(message, properties = {}) { - (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); - } - function info(message) { - process.stdout.write(message + os.EOL); - } - function startGroup(name) { - (0, command_1.issue)("group", name); - } - function endGroup() { - (0, command_1.issue)("endgroup"); - } - function group(name, fn) { - return __awaiter(this, void 0, void 0, function* () { - startGroup(name); - let result; - try { - result = yield fn(); - } finally { - endGroup(); - } - return result; - }); - } - function saveState(name, value) { - const filePath = process.env["GITHUB_STATE"] || ""; - if (filePath) { - return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); - } - (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); - } - function getState(name) { - return process.env[`STATE_${name}`] || ""; - } - function getIDToken(aud) { - return __awaiter(this, void 0, void 0, function* () { - return yield oidc_utils_1.OidcClient.getIDToken(aud); - }); - } - var summary_1 = require_summary(); - Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { - return summary_1.summary; - } }); - var summary_2 = require_summary(); - Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { - return summary_2.markdownSummary; - } }); - var path_utils_1 = require_path_utils(); - Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { - return path_utils_1.toPosixPath; - } }); - Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { - return path_utils_1.toWin32Path; - } }); - Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { - return path_utils_1.toPlatformPath; - } }); - exports2.platform = __importStar(require_platform()); - } -}); - // src/cleanup/index.ts var index_exports = {}; __export(index_exports, { cleanup: () => cleanup }); module.exports = __toCommonJS(index_exports); -var core2 = __toESM(require_core()); + +// node_modules/@actions/core/lib/command.js +var os = __toESM(require("os"), 1); + +// node_modules/@actions/core/lib/utils.js +function toCommandValue(input) { + if (input === null || input === void 0) { + return ""; + } else if (typeof input === "string" || input instanceof String) { + return input; + } + return JSON.stringify(input); +} +function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; +} + +// node_modules/@actions/core/lib/command.js +function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os.EOL); +} +var CMD_STRING = "::"; +var Command = class { + constructor(command, properties, message) { + if (!command) { + command = "missing.command"; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } else { + cmdStr += ","; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } +}; +function escapeData(s) { + return toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); +} +function escapeProperty(s) { + return toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); +} + +// node_modules/@actions/core/lib/file-command.js +var crypto = __toESM(require("crypto"), 1); +var fs = __toESM(require("fs"), 1); +var os2 = __toESM(require("os"), 1); +function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs.appendFileSync(filePath, `${toCommandValue(message)}${os2.EOL}`, { + encoding: "utf8" + }); +} +function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto.randomUUID()}`; + const convertedValue = toCommandValue(value); + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + } + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } + return `${key}<<${delimiter}${os2.EOL}${convertedValue}${os2.EOL}${delimiter}`; +} + +// node_modules/@actions/http-client/lib/index.js +var tunnel = __toESM(require_tunnel2(), 1); +var import_undici = __toESM(require_undici(), 1); +var HttpCodes; +(function(HttpCodes2) { + HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; + HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; + HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; + HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; + HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; + HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; + HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; + HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; + HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; + HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; + HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; +})(HttpCodes || (HttpCodes = {})); +var Headers; +(function(Headers2) { + Headers2["Accept"] = "accept"; + Headers2["ContentType"] = "content-type"; +})(Headers || (Headers = {})); +var MediaTypes; +(function(MediaTypes2) { + MediaTypes2["ApplicationJson"] = "application/json"; +})(MediaTypes || (MediaTypes = {})); +var HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect +]; +var HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout +]; + +// node_modules/@actions/core/lib/summary.js +var import_os = require("os"); +var import_fs = require("fs"); +var __awaiter = function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var { access, appendFile, writeFile } = import_fs.promises; +var SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; +var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, import_fs.constants.R_OK | import_fs.constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(import_os.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } +}; +var _summary = new Summary(); + +// node_modules/@actions/core/lib/platform.js +var import_os2 = __toESM(require("os"), 1); + +// node_modules/@actions/io/lib/io-util.js +var fs2 = __toESM(require("fs"), 1); +var { chmod, copyFile, lstat, mkdir, open, readdir, rename, rm, rmdir, stat, symlink, unlink } = fs2.promises; +var IS_WINDOWS = process.platform === "win32"; +var READONLY = fs2.constants.O_RDONLY; + +// node_modules/@actions/exec/lib/toolrunner.js +var IS_WINDOWS2 = process.platform === "win32"; + +// node_modules/@actions/core/lib/platform.js +var platform = import_os2.default.platform(); +var arch = import_os2.default.arch(); + +// node_modules/@actions/core/lib/core.js +var ExitCode; +(function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; +})(ExitCode || (ExitCode = {})); +function exportVariable(name, val) { + const convertedVal = toCommandValue(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return issueFileCommand("ENV", prepareKeyValueMessage(name, val)); + } + issueCommand("set-env", { name }, convertedVal); +} +function getInput(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); +} +function setFailed(message) { + process.exitCode = ExitCode.Failure; + error(message); +} +function error(message, properties = {}) { + issueCommand("error", toCommandProperties(properties), message instanceof Error ? message.toString() : message); +} // src/helpers.ts -var fs = __toESM(require("node:fs")); -var core = __toESM(require_core()); -function errorMessage(error) { - return error instanceof Error ? error.message : String(error); +var fs3 = __toESM(require("node:fs")); +function errorMessage(error2) { + return error2 instanceof Error ? error2.message : String(error2); } function getBooleanInput(name, options) { const trueValue = ["true", "True", "TRUE"]; const falseValue = ["false", "False", "FALSE"]; const optionsWithoutDefault = { ...options }; delete optionsWithoutDefault.default; - const val = core.getInput(name, optionsWithoutDefault); + const val = getInput(name, optionsWithoutDefault); if (trueValue.includes(val)) return true; if (falseValue.includes(val)) return false; if (val === "") return options?.default ?? false; @@ -21612,31 +19146,31 @@ function getBooleanInput(name, options) { Support boolean input list: \`true | True | TRUE | false | False | FALSE\`` ); } -var O_NOFOLLOW = fs.constants.O_NOFOLLOW ?? 0; +var O_NOFOLLOW = fs3.constants.O_NOFOLLOW ?? 0; // src/cleanup/index.ts function cleanup() { - const awsProfile = core2.getInput("aws-profile", { required: false }); + const awsProfile = getInput("aws-profile", { required: false }); if (getBooleanInput("output-env-credentials", { required: false, default: !awsProfile })) { try { - core2.exportVariable("AWS_ACCESS_KEY_ID", ""); - core2.exportVariable("AWS_SECRET_ACCESS_KEY", ""); - core2.exportVariable("AWS_SESSION_TOKEN", ""); - core2.exportVariable("AWS_DEFAULT_REGION", ""); - core2.exportVariable("AWS_REGION", ""); - if (core2.getInput("aws-profile")) { - core2.exportVariable("AWS_PROFILE", ""); + exportVariable("AWS_ACCESS_KEY_ID", ""); + exportVariable("AWS_SECRET_ACCESS_KEY", ""); + exportVariable("AWS_SESSION_TOKEN", ""); + exportVariable("AWS_DEFAULT_REGION", ""); + exportVariable("AWS_REGION", ""); + if (getInput("aws-profile")) { + exportVariable("AWS_PROFILE", ""); } - } catch (error) { - core2.setFailed(errorMessage(error)); + } catch (error2) { + setFailed(errorMessage(error2)); } } } if (require.main === module) { try { cleanup(); - } catch (error) { - core2.setFailed(errorMessage(error)); + } catch (error2) { + setFailed(errorMessage(error2)); } } // Annotate the CommonJS export names for ESM import in node: diff --git a/dist/index.js b/dist/index.js index 800a4bf..174f632 100644 --- a/dist/index.js +++ b/dist/index.js @@ -33,322 +33,41 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge )); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -// node_modules/@actions/core/lib/utils.js -var require_utils = __commonJS({ - "node_modules/@actions/core/lib/utils.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toCommandValue = toCommandValue; - exports2.toCommandProperties = toCommandProperties; - function toCommandValue(input) { - if (input === null || input === void 0) { - return ""; - } else if (typeof input === "string" || input instanceof String) { - return input; - } - return JSON.stringify(input); - } - function toCommandProperties(annotationProperties) { - if (!Object.keys(annotationProperties).length) { - return {}; - } - return { - title: annotationProperties.title, - file: annotationProperties.file, - line: annotationProperties.startLine, - endLine: annotationProperties.endLine, - col: annotationProperties.startColumn, - endColumn: annotationProperties.endColumn - }; - } - } -}); - -// node_modules/@actions/core/lib/command.js -var require_command = __commonJS({ - "node_modules/@actions/core/lib/command.js"(exports2) { - "use strict"; - var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o2, m3, k5, k22) { - if (k22 === void 0) k22 = k5; - var desc = Object.getOwnPropertyDescriptor(m3, k5); - if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m3[k5]; - } }; - } - Object.defineProperty(o2, k22, desc); - }) : (function(o2, m3, k5, k22) { - if (k22 === void 0) k22 = k5; - o2[k22] = m3[k5]; - })); - var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o2, v) { - Object.defineProperty(o2, "default", { enumerable: true, value: v }); - }) : function(o2, v) { - o2["default"] = v; - }); - var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys2 = function(o2) { - ownKeys2 = Object.getOwnPropertyNames || function(o3) { - var ar = []; - for (var k5 in o3) if (Object.prototype.hasOwnProperty.call(o3, k5)) ar[ar.length] = k5; - return ar; - }; - return ownKeys2(o2); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k5 = ownKeys2(mod), i5 = 0; i5 < k5.length; i5++) if (k5[i5] !== "default") __createBinding2(result, mod, k5[i5]); - } - __setModuleDefault2(result, mod); - return result; - }; - })(); - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.issueCommand = issueCommand; - exports2.issue = issue; - var os3 = __importStar2(require("os")); - var utils_1 = require_utils(); - function issueCommand(command, properties, message) { - const cmd = new Command2(command, properties, message); - process.stdout.write(cmd.toString() + os3.EOL); - } - function issue(name, message = "") { - issueCommand(name, {}, message); - } - var CMD_STRING = "::"; - var Command2 = class { - constructor(command, properties, message) { - if (!command) { - command = "missing.command"; - } - this.command = command; - this.properties = properties; - this.message = message; - } - toString() { - let cmdStr = CMD_STRING + this.command; - if (this.properties && Object.keys(this.properties).length > 0) { - cmdStr += " "; - let first = true; - for (const key in this.properties) { - if (this.properties.hasOwnProperty(key)) { - const val = this.properties[key]; - if (val) { - if (first) { - first = false; - } else { - cmdStr += ","; - } - cmdStr += `${key}=${escapeProperty(val)}`; - } - } - } - } - cmdStr += `${CMD_STRING}${escapeData(this.message)}`; - return cmdStr; - } - }; - function escapeData(s) { - return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); - } - function escapeProperty(s) { - return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); - } - } -}); - -// node_modules/@actions/core/lib/file-command.js -var require_file_command = __commonJS({ - "node_modules/@actions/core/lib/file-command.js"(exports2) { - "use strict"; - var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o2, m3, k5, k22) { - if (k22 === void 0) k22 = k5; - var desc = Object.getOwnPropertyDescriptor(m3, k5); - if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m3[k5]; - } }; - } - Object.defineProperty(o2, k22, desc); - }) : (function(o2, m3, k5, k22) { - if (k22 === void 0) k22 = k5; - o2[k22] = m3[k5]; - })); - var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o2, v) { - Object.defineProperty(o2, "default", { enumerable: true, value: v }); - }) : function(o2, v) { - o2["default"] = v; - }); - var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys2 = function(o2) { - ownKeys2 = Object.getOwnPropertyNames || function(o3) { - var ar = []; - for (var k5 in o3) if (Object.prototype.hasOwnProperty.call(o3, k5)) ar[ar.length] = k5; - return ar; - }; - return ownKeys2(o2); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k5 = ownKeys2(mod), i5 = 0; i5 < k5.length; i5++) if (k5[i5] !== "default") __createBinding2(result, mod, k5[i5]); - } - __setModuleDefault2(result, mod); - return result; - }; - })(); - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.issueFileCommand = issueFileCommand; - exports2.prepareKeyValueMessage = prepareKeyValueMessage; - var crypto3 = __importStar2(require("crypto")); - var fs2 = __importStar2(require("fs")); - var os3 = __importStar2(require("os")); - var utils_1 = require_utils(); - function issueFileCommand(command, message) { - const filePath = process.env[`GITHUB_${command}`]; - if (!filePath) { - throw new Error(`Unable to find environment variable for file command ${command}`); - } - if (!fs2.existsSync(filePath)) { - throw new Error(`Missing file at path: ${filePath}`); - } - fs2.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os3.EOL}`, { - encoding: "utf8" - }); - } - function prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${crypto3.randomUUID()}`; - const convertedValue = (0, utils_1.toCommandValue)(value); - if (key.includes(delimiter)) { - throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); - } - if (convertedValue.includes(delimiter)) { - throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); - } - return `${key}<<${delimiter}${os3.EOL}${convertedValue}${os3.EOL}${delimiter}`; - } - } -}); - -// node_modules/@actions/http-client/lib/proxy.js -var require_proxy = __commonJS({ - "node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getProxyUrl = getProxyUrl; - exports2.checkBypass = checkBypass; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a2) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); - } - var DecodedURL = class extends URL { - constructor(url, base) { - super(url, base); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - // node_modules/tunnel/lib/tunnel.js var require_tunnel = __commonJS({ "node_modules/tunnel/lib/tunnel.js"(exports2) { "use strict"; var net11 = require("net"); var tls8 = require("tls"); - var http5 = require("http"); - var https4 = require("https"); + var http6 = require("http"); + var https5 = require("https"); var events = require("events"); var assert4 = require("assert"); var util = require("util"); - exports2.httpOverHttp = httpOverHttp; - exports2.httpsOverHttp = httpsOverHttp; - exports2.httpOverHttps = httpOverHttps; - exports2.httpsOverHttps = httpsOverHttps; - function httpOverHttp(options) { + exports2.httpOverHttp = httpOverHttp2; + exports2.httpsOverHttp = httpsOverHttp2; + exports2.httpOverHttps = httpOverHttps2; + exports2.httpsOverHttps = httpsOverHttps2; + function httpOverHttp2(options) { var agent = new TunnelingAgent(options); - agent.request = http5.request; + agent.request = http6.request; return agent; } - function httpsOverHttp(options) { + function httpsOverHttp2(options) { var agent = new TunnelingAgent(options); - agent.request = http5.request; + agent.request = http6.request; agent.createSocket = createSecureSocket; agent.defaultPort = 443; return agent; } - function httpOverHttps(options) { + function httpOverHttps2(options) { var agent = new TunnelingAgent(options); - agent.request = https4.request; + agent.request = https5.request; return agent; } - function httpsOverHttps(options) { + function httpsOverHttps2(options) { var agent = new TunnelingAgent(options); - agent.request = https4.request; + agent.request = https5.request; agent.createSocket = createSecureSocket; agent.defaultPort = 443; return agent; @@ -357,7 +76,7 @@ var require_tunnel = __commonJS({ var self = this; self.options = options || {}; self.proxyOptions = self.options.proxy || {}; - self.maxSockets = self.options.maxSockets || http5.Agent.defaultMaxSockets; + self.maxSockets = self.options.maxSockets || http6.Agent.defaultMaxSockets; self.requests = []; self.sockets = []; self.on("free", function onFree(socket, host, port, localAddress) { @@ -417,7 +136,7 @@ var require_tunnel = __commonJS({ connectOptions.headers = connectOptions.headers || {}; connectOptions.headers["Proxy-Authorization"] = "Basic " + new Buffer(connectOptions.proxyAuth).toString("base64"); } - debug19("making CONNECT request"); + debug17("making CONNECT request"); var connectReq = self.request(connectOptions); connectReq.useChunkedEncodingByDefault = false; connectReq.once("response", onResponse); @@ -437,40 +156,40 @@ var require_tunnel = __commonJS({ connectReq.removeAllListeners(); socket.removeAllListeners(); if (res.statusCode !== 200) { - debug19( + debug17( "tunneling socket could not be established, statusCode=%d", res.statusCode ); socket.destroy(); - var error2 = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); - error2.code = "ECONNRESET"; - options.request.emit("error", error2); + var error3 = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); + error3.code = "ECONNRESET"; + options.request.emit("error", error3); self.removeSocket(placeholder); return; } if (head.length > 0) { - debug19("got illegal response body from proxy"); + debug17("got illegal response body from proxy"); socket.destroy(); - var error2 = new Error("got illegal response body from proxy"); - error2.code = "ECONNRESET"; - options.request.emit("error", error2); + var error3 = new Error("got illegal response body from proxy"); + error3.code = "ECONNRESET"; + options.request.emit("error", error3); self.removeSocket(placeholder); return; } - debug19("tunneling connection has established"); + debug17("tunneling connection has established"); self.sockets[self.sockets.indexOf(placeholder)] = socket; return cb(socket); } function onError(cause) { connectReq.removeAllListeners(); - debug19( + debug17( "tunneling socket could not be established, cause=%s\n", cause.message, cause.stack ); - var error2 = new Error("tunneling socket could not be established, cause=" + cause.message); - error2.code = "ECONNRESET"; - options.request.emit("error", error2); + var error3 = new Error("tunneling socket could not be established, cause=" + cause.message); + error3.code = "ECONNRESET"; + options.request.emit("error", error3); self.removeSocket(placeholder); } }; @@ -525,9 +244,9 @@ var require_tunnel = __commonJS({ } return target; } - var debug19; + var debug17; if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { - debug19 = function() { + debug17 = function() { var args = Array.prototype.slice.call(arguments); if (typeof args[0] === "string") { args[0] = "TUNNEL: " + args[0]; @@ -537,10 +256,10 @@ var require_tunnel = __commonJS({ console.error.apply(console, args); }; } else { - debug19 = function() { + debug17 = function() { }; } - exports2.debug = debug19; + exports2.debug = debug17; } }); @@ -1799,14 +1518,14 @@ var require_diagnostics = __commonJS({ diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { const { connectParams: { version, protocol, port, host }, - error: error2 + error: error3 } = evt; debuglog( "connection to %s using %s%s errored - %s", `${host}${port ? `:${port}` : ""}`, protocol, version, - error2.message + error3.message ); }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { @@ -1837,14 +1556,14 @@ var require_diagnostics = __commonJS({ diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { request: { method, path: path4, origin }, - error: error2 + error: error3 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, path4, - error2.message + error3.message ); }); isClientSet = true; @@ -1879,7 +1598,7 @@ var require_diagnostics = __commonJS({ diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { const { connectParams: { version, protocol, port, host }, - error: error2 + error: error3 } = evt; debuglog( "connection to %s%s using %s%s errored - %s", @@ -1887,7 +1606,7 @@ var require_diagnostics = __commonJS({ port ? `:${port}` : "", protocol, version, - error2.message + error3.message ); }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { @@ -2157,16 +1876,16 @@ var require_request = __commonJS({ this.onError(err); } } - onError(error2) { + onError(error3) { this.onFinally(); if (channels.error.hasSubscribers) { - channels.error.publish({ request: this, error: error2 }); + channels.error.publish({ request: this, error: error3 }); } if (this.aborted) { return; } this.aborted = true; - return this[kHandler].onError(error2); + return this[kHandler].onError(error3); } onFinally() { if (this.errorHandler) { @@ -2330,13 +2049,20 @@ var require_dispatcher_base = __commonJS({ var kOnDestroyed = /* @__PURE__ */ Symbol("onDestroyed"); var kOnClosed = /* @__PURE__ */ Symbol("onClosed"); var kInterceptedDispatch = /* @__PURE__ */ Symbol("Intercepted Dispatch"); + var kWebSocketOptions = /* @__PURE__ */ Symbol("webSocketOptions"); var DispatcherBase = class extends Dispatcher { - constructor() { + constructor(opts) { super(); this[kDestroyed] = false; this[kOnDestroyed] = null; this[kClosed] = false; this[kOnClosed] = []; + this[kWebSocketOptions] = opts?.webSocket ?? {}; + } + get webSocketOptions() { + return { + maxPayloadSize: this[kWebSocketOptions].maxPayloadSize ?? 128 * 1024 * 1024 + }; } get destroyed() { return this[kDestroyed]; @@ -2889,7 +2615,7 @@ var require_connect = __commonJS({ }); // node_modules/undici/lib/llhttp/utils.js -var require_utils2 = __commonJS({ +var require_utils = __commonJS({ "node_modules/undici/lib/llhttp/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -2914,7 +2640,7 @@ var require_constants2 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SPECIAL_HEADERS = exports2.HEADER_STATE = exports2.MINOR = exports2.MAJOR = exports2.CONNECTION_TOKEN_CHARS = exports2.HEADER_CHARS = exports2.TOKEN = exports2.STRICT_TOKEN = exports2.HEX = exports2.URL_CHAR = exports2.STRICT_URL_CHAR = exports2.USERINFO_CHARS = exports2.MARK = exports2.ALPHANUM = exports2.NUM = exports2.HEX_MAP = exports2.NUM_MAP = exports2.ALPHA = exports2.FINISH = exports2.H_METHOD_MAP = exports2.METHOD_MAP = exports2.METHODS_RTSP = exports2.METHODS_ICE = exports2.METHODS_HTTP = exports2.METHODS = exports2.LENIENT_FLAGS = exports2.FLAGS = exports2.TYPE = exports2.ERROR = void 0; - var utils_1 = require_utils2(); + var utils_1 = require_utils(); var ERROR; (function(ERROR2) { ERROR2[ERROR2["OK"] = 0] = "OK"; @@ -4287,11 +4013,11 @@ var require_util2 = __commonJS({ var { isUint8Array } = require("node:util/types"); var { webidl } = require_webidl(); var supportedHashes = []; - var crypto3; + var crypto4; try { - crypto3 = require("node:crypto"); + crypto4 = require("node:crypto"); const possibleRelevantHashes = ["sha256", "sha384", "sha512"]; - supportedHashes = crypto3.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); + supportedHashes = crypto4.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); } catch { } function responseURL(response) { @@ -4564,7 +4290,7 @@ var require_util2 = __commonJS({ } } function bytesMatch(bytes, metadataList) { - if (crypto3 === void 0) { + if (crypto4 === void 0) { return true; } const parsedMetadata = parseMetadata(metadataList); @@ -4579,7 +4305,7 @@ var require_util2 = __commonJS({ for (const item of metadata) { const algorithm = item.algo; const expectedValue = item.hash; - let actualValue = crypto3.createHash(algorithm).update(bytes).digest("base64"); + let actualValue = crypto4.createHash(algorithm).update(bytes).digest("base64"); if (actualValue[actualValue.length - 1] === "=") { if (actualValue[actualValue.length - 2] === "=") { actualValue = actualValue.slice(0, -2); @@ -5643,8 +5369,8 @@ var require_body = __commonJS({ var { multipartFormDataParser } = require_formdata_parser(); var random; try { - const crypto3 = require("node:crypto"); - random = (max) => crypto3.randomInt(0, max); + const crypto4 = require("node:crypto"); + random = (max) => crypto4.randomInt(0, max); } catch { random = (max) => Math.floor(Math.random(max)); } @@ -5889,7 +5615,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r } throwIfAborted(object[kState]); const promise = createDeferredPromise(); - const errorSteps = (error2) => promise.reject(error2); + const errorSteps = (error3) => promise.reject(error3); const successSteps = (data3) => { try { promise.resolve(convertBytesToJSValue(data3)); @@ -5984,7 +5710,7 @@ var require_client_h1 = __commonJS({ kResume, kHTTPContext } = require_symbols(); - var constants2 = require_constants2(); + var constants4 = require_constants2(); var EMPTY_BUF = Buffer.alloc(0); var FastBuffer = Buffer[Symbol.species]; var addListener = util.addListener; @@ -6056,7 +5782,7 @@ var require_client_h1 = __commonJS({ constructor(client, socket, { exports: exports3 }) { assert4(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0); this.llhttp = exports3; - this.ptr = this.llhttp.llhttp_alloc(constants2.TYPE.RESPONSE); + this.ptr = this.llhttp.llhttp_alloc(constants4.TYPE.RESPONSE); this.client = client; this.socket = socket; this.timeout = null; @@ -6151,19 +5877,19 @@ var require_client_h1 = __commonJS({ currentBufferRef = null; } const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr; - if (ret === constants2.ERROR.PAUSED_UPGRADE) { + if (ret === constants4.ERROR.PAUSED_UPGRADE) { this.onUpgrade(data3.slice(offset)); - } else if (ret === constants2.ERROR.PAUSED) { + } else if (ret === constants4.ERROR.PAUSED) { this.paused = true; socket.unshift(data3.slice(offset)); - } else if (ret !== constants2.ERROR.OK) { + } else if (ret !== constants4.ERROR.OK) { const ptr = llhttp.llhttp_get_error_reason(this.ptr); let message = ""; if (ptr) { const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0); message = "Response does not match the HTTP/1.1 protocol (" + Buffer.from(llhttp.memory.buffer, ptr, len).toString() + ")"; } - throw new HTTPParserError(message, constants2.ERROR[ret], data3.slice(offset)); + throw new HTTPParserError(message, constants4.ERROR[ret], data3.slice(offset)); } } catch (err) { util.destroy(socket, err); @@ -6338,7 +6064,7 @@ var require_client_h1 = __commonJS({ socket[kBlocking] = false; client[kResume](); } - return pause ? constants2.ERROR.PAUSED : 0; + return pause ? constants4.ERROR.PAUSED : 0; } onBody(buf) { const { client, socket, statusCode, maxResponseSize } = this; @@ -6360,7 +6086,7 @@ var require_client_h1 = __commonJS({ } this.bytesRead += buf.length; if (request.onData(buf) === false) { - return constants2.ERROR.PAUSED; + return constants4.ERROR.PAUSED; } } onMessageComplete() { @@ -6395,13 +6121,13 @@ var require_client_h1 = __commonJS({ if (socket[kWriting]) { assert4(client[kRunning] === 0); util.destroy(socket, new InformationalError("reset")); - return constants2.ERROR.PAUSED; + return constants4.ERROR.PAUSED; } else if (!shouldKeepAlive) { util.destroy(socket, new InformationalError("reset")); - return constants2.ERROR.PAUSED; + return constants4.ERROR.PAUSED; } else if (socket[kReset] && client[kRunning] === 0) { util.destroy(socket, new InformationalError("reset")); - return constants2.ERROR.PAUSED; + return constants4.ERROR.PAUSED; } else if (client[kPipelining] == null || client[kPipelining] === 1) { setImmediate(() => client[kResume]()); } else { @@ -7397,8 +7123,8 @@ var require_client_h2 = __commonJS({ } request.onRequestSent(); client[kResume](); - } catch (error2) { - abort(error2); + } catch (error3) { + abort(error3); } } function writeStream(abort, socket, expectsPayload, h2stream, body, client, request, contentLength) { @@ -7553,8 +7279,8 @@ var require_redirect_handler = __commonJS({ onUpgrade(statusCode, headers, socket) { this.handler.onUpgrade(statusCode, headers, socket); } - onError(error2) { - this.handler.onError(error2); + onError(error3) { + this.handler.onError(error3); } onHeaders(statusCode, headers, resume3, statusText) { this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers); @@ -7679,7 +7405,7 @@ var require_client = __commonJS({ "use strict"; var assert4 = require("node:assert"); var net11 = require("node:net"); - var http5 = require("node:http"); + var http6 = require("node:http"); var util = require_util(); var { channels } = require_diagnostics(); var Request = require_request(); @@ -7775,9 +7501,10 @@ var require_client = __commonJS({ autoSelectFamilyAttemptTimeout, // h2 maxConcurrentStreams, - allowH2 + allowH2, + webSocket } = {}) { - super(); + super({ webSocket }); if (keepAlive !== void 0) { throw new InvalidArgumentError("unsupported keepAlive, use pipelining=0 instead"); } @@ -7866,7 +7593,7 @@ var require_client = __commonJS({ this[kUrl] = util.parseOrigin(url); this[kConnector] = connect14; this[kPipelining] = pipelining != null ? pipelining : 1; - this[kMaxHeadersSize] = maxHeaderSize || http5.maxHeaderSize; + this[kMaxHeadersSize] = maxHeaderSize || http6.maxHeaderSize; this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout; this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 6e5 : keepAliveMaxTimeout; this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 2e3 : keepAliveTimeoutThreshold; @@ -8283,8 +8010,8 @@ var require_pool_base = __commonJS({ var kRemoveClient = /* @__PURE__ */ Symbol("remove client"); var kStats = /* @__PURE__ */ Symbol("stats"); var PoolBase = class extends DispatcherBase { - constructor() { - super(); + constructor(opts) { + super(opts); this[kQueue] = new FixedQueue(); this[kClients] = []; this[kQueued] = 0; @@ -8455,7 +8182,6 @@ var require_pool = __commonJS({ allowH2, ...options } = {}) { - super(); if (connections != null && (!Number.isFinite(connections) || connections < 0)) { throw new InvalidArgumentError("invalid connections"); } @@ -8476,13 +8202,14 @@ var require_pool = __commonJS({ ...connect13 }); } + super(options); this[kInterceptors] = options.interceptors?.Pool && Array.isArray(options.interceptors.Pool) ? options.interceptors.Pool : []; this[kConnections] = connections || null; this[kUrl] = util.parseOrigin(origin); this[kOptions] = { ...util.deepClone(options), connect: connect13, allowH2 }; this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; this[kFactory] = factory; - this.on("connectionError", (origin2, targets, error2) => { + this.on("connectionError", (origin2, targets, error3) => { for (const target of targets) { const idx = this[kClients].indexOf(target); if (idx !== -1) { @@ -8673,9 +8400,8 @@ var require_agent = __commonJS({ function defaultFactory(origin, opts) { return opts && opts.connections === 1 ? new Client3(origin, opts) : new Pool(origin, opts); } - var Agent7 = class extends DispatcherBase { + var Agent9 = class extends DispatcherBase { constructor({ factory = defaultFactory, maxRedirections = 0, connect: connect13, ...options } = {}) { - super(); if (typeof factory !== "function") { throw new InvalidArgumentError("factory must be a function."); } @@ -8685,6 +8411,7 @@ var require_agent = __commonJS({ if (!Number.isInteger(maxRedirections) || maxRedirections < 0) { throw new InvalidArgumentError("maxRedirections must be a positive number"); } + super(options); if (connect13 && typeof connect13 !== "function") { connect13 = { ...connect13 }; } @@ -8745,7 +8472,7 @@ var require_agent = __commonJS({ await Promise.all(destroyPromises); } }; - module2.exports = Agent7; + module2.exports = Agent9; } }); @@ -8755,7 +8482,7 @@ var require_proxy_agent = __commonJS({ "use strict"; var { kProxy, kClose, kDestroy, kDispatch, kInterceptors } = require_symbols(); var { URL: URL10 } = require("node:url"); - var Agent7 = require_agent(); + var Agent9 = require_agent(); var Pool = require_pool(); var DispatcherBase = require_dispatcher_base(); var { InvalidArgumentError, RequestAbortedError, SecureProxyConnectionError } = require_errors(); @@ -8827,7 +8554,7 @@ var require_proxy_agent = __commonJS({ return this.#client.destroy(err); } }; - var ProxyAgent2 = class extends DispatcherBase { + var ProxyAgent3 = class extends DispatcherBase { constructor(opts) { super(); if (!opts || typeof opts === "object" && !(opts instanceof URL10) && !opts.uri) { @@ -8870,7 +8597,7 @@ var require_proxy_agent = __commonJS({ return agentFactory(origin2, options); }; this[kClient] = clientFactory(url, { connect: connect13 }); - this[kAgent] = new Agent7({ + this[kAgent] = new Agent9({ ...opts, factory, connect: async (opts2, callback) => { @@ -8968,7 +8695,7 @@ var require_proxy_agent = __commonJS({ throw new InvalidArgumentError("Proxy-Authorization should be sent in ProxyAgent constructor"); } } - module2.exports = ProxyAgent2; + module2.exports = ProxyAgent3; } }); @@ -8978,8 +8705,8 @@ var require_env_http_proxy_agent = __commonJS({ "use strict"; var DispatcherBase = require_dispatcher_base(); var { kClose, kDestroy, kClosed, kDestroyed, kDispatch, kNoProxyAgent, kHttpProxyAgent, kHttpsProxyAgent } = require_symbols(); - var ProxyAgent2 = require_proxy_agent(); - var Agent7 = require_agent(); + var ProxyAgent3 = require_proxy_agent(); + var Agent9 = require_agent(); var DEFAULT_PORTS4 = { "http:": 80, "https:": 443 @@ -8999,16 +8726,16 @@ var require_env_http_proxy_agent = __commonJS({ }); } const { httpProxy, httpsProxy, noProxy, ...agentOpts } = opts; - this[kNoProxyAgent] = new Agent7(agentOpts); + this[kNoProxyAgent] = new Agent9(agentOpts); const HTTP_PROXY = httpProxy ?? process.env.http_proxy ?? process.env.HTTP_PROXY; if (HTTP_PROXY) { - this[kHttpProxyAgent] = new ProxyAgent2({ ...agentOpts, uri: HTTP_PROXY }); + this[kHttpProxyAgent] = new ProxyAgent3({ ...agentOpts, uri: HTTP_PROXY }); } else { this[kHttpProxyAgent] = this[kNoProxyAgent]; } const HTTPS_PROXY = httpsProxy ?? process.env.https_proxy ?? process.env.HTTPS_PROXY; if (HTTPS_PROXY) { - this[kHttpsProxyAgent] = new ProxyAgent2({ ...agentOpts, uri: HTTPS_PROXY }); + this[kHttpsProxyAgent] = new ProxyAgent3({ ...agentOpts, uri: HTTPS_PROXY }); } else { this[kHttpsProxyAgent] = this[kHttpProxyAgent]; } @@ -10849,13 +10576,13 @@ var require_mock_utils = __commonJS({ if (mockDispatch2.data.callback) { mockDispatch2.data = { ...mockDispatch2.data, ...mockDispatch2.data.callback(opts) }; } - const { data: { statusCode, data: data3, headers, trailers, error: error2 }, delay, persist } = mockDispatch2; + const { data: { statusCode, data: data3, headers, trailers, error: error3 }, delay, persist } = mockDispatch2; const { timesInvoked, times } = mockDispatch2; mockDispatch2.consumed = !persist && timesInvoked >= times; mockDispatch2.pending = timesInvoked < times; - if (error2 !== null) { + if (error3 !== null) { deleteMockDispatch(this[kDispatches], key); - handler.onError(error2); + handler.onError(error3); return true; } if (typeof delay === "number" && delay > 0) { @@ -10893,19 +10620,19 @@ var require_mock_utils = __commonJS({ if (agent.isMockActive) { try { mockDispatch.call(this, opts, handler); - } catch (error2) { - if (error2 instanceof MockNotMatchedError) { + } catch (error3) { + if (error3 instanceof MockNotMatchedError) { const netConnect = agent[kGetNetConnect](); if (netConnect === false) { - throw new MockNotMatchedError(`${error2.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); + throw new MockNotMatchedError(`${error3.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); } if (checkNetConnect(netConnect, origin)) { originalDispatch.call(this, opts, handler); } else { - throw new MockNotMatchedError(`${error2.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); + throw new MockNotMatchedError(`${error3.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); } } else { - throw error2; + throw error3; } } } else { @@ -11070,11 +10797,11 @@ var require_mock_interceptor = __commonJS({ /** * Mock an undici request with a defined error. */ - replyWithError(error2) { - if (typeof error2 === "undefined") { + replyWithError(error3) { + if (typeof error3 === "undefined") { throw new InvalidArgumentError("error must be defined"); } - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error: error2 }); + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error: error3 }); return new MockScope(newMockDispatch); } /** @@ -11293,7 +11020,7 @@ var require_mock_agent = __commonJS({ "node_modules/undici/lib/mock/mock-agent.js"(exports2, module2) { "use strict"; var { kClients } = require_symbols(); - var Agent7 = require_agent(); + var Agent9 = require_agent(); var { kAgent, kMockAgentSet, @@ -11320,7 +11047,7 @@ var require_mock_agent = __commonJS({ if (opts?.agent && typeof opts.agent.dispatch !== "function") { throw new InvalidArgumentError("Argument opts.agent must implement Agent"); } - const agent = opts?.agent ? opts.agent : new Agent7(opts); + const agent = opts?.agent ? opts.agent : new Agent9(opts); this[kAgent] = agent; this[kClients] = agent[kClients]; this[kOptions] = buildMockOptions(opts); @@ -11424,9 +11151,9 @@ var require_global2 = __commonJS({ "use strict"; var globalDispatcher = /* @__PURE__ */ Symbol.for("undici.globalDispatcher.1"); var { InvalidArgumentError } = require_errors(); - var Agent7 = require_agent(); + var Agent9 = require_agent(); if (getGlobalDispatcher() === void 0) { - setGlobalDispatcher(new Agent7()); + setGlobalDispatcher(new Agent9()); } function setGlobalDispatcher(agent) { if (!agent || typeof agent.dispatch !== "function") { @@ -12035,12 +11762,12 @@ var require_headers = __commonJS({ append(name, value, isLowerCase) { this[kHeadersSortedMap] = null; const lowercaseName = isLowerCase ? name : name.toLowerCase(); - const exists = this[kHeadersMap].get(lowercaseName); - if (exists) { + const exists2 = this[kHeadersMap].get(lowercaseName); + if (exists2) { const delimiter = lowercaseName === "cookie" ? "; " : ", "; this[kHeadersMap].set(lowercaseName, { - name: exists.name, - value: `${exists.value}${delimiter}${value}` + name: exists2.name, + value: `${exists2.value}${delimiter}${value}` }); } else { this[kHeadersMap].set(lowercaseName, { name, value }); @@ -12165,7 +11892,7 @@ var require_headers = __commonJS({ } } }; - var Headers = class _Headers { + var Headers2 = class _Headers { #guard; #headersList; constructor(init = void 0) { @@ -12315,13 +12042,13 @@ var require_headers = __commonJS({ o2.#headersList = list2; } }; - var { getHeadersGuard, setHeadersGuard, getHeadersList, setHeadersList } = Headers; - Reflect.deleteProperty(Headers, "getHeadersGuard"); - Reflect.deleteProperty(Headers, "setHeadersGuard"); - Reflect.deleteProperty(Headers, "getHeadersList"); - Reflect.deleteProperty(Headers, "setHeadersList"); - iteratorMixin("Headers", Headers, kHeadersSortedMap, 0, 1); - Object.defineProperties(Headers.prototype, { + var { getHeadersGuard, setHeadersGuard, getHeadersList, setHeadersList } = Headers2; + Reflect.deleteProperty(Headers2, "getHeadersGuard"); + Reflect.deleteProperty(Headers2, "setHeadersGuard"); + Reflect.deleteProperty(Headers2, "getHeadersList"); + Reflect.deleteProperty(Headers2, "setHeadersList"); + iteratorMixin("Headers", Headers2, kHeadersSortedMap, 0, 1); + Object.defineProperties(Headers2.prototype, { append: kEnumerableProperty, delete: kEnumerableProperty, get: kEnumerableProperty, @@ -12339,7 +12066,7 @@ var require_headers = __commonJS({ webidl.converters.HeadersInit = function(V, prefix, argument) { if (webidl.util.Type(V) === "Object") { const iterator = Reflect.get(V, Symbol.iterator); - if (!util.types.isProxy(V) && iterator === Headers.prototype.entries) { + if (!util.types.isProxy(V) && iterator === Headers2.prototype.entries) { try { return getHeadersList(V).entriesList; } catch { @@ -12360,7 +12087,7 @@ var require_headers = __commonJS({ fill, // for test. compareHeaderName, - Headers, + Headers: Headers2, HeadersList, getHeadersGuard, setHeadersGuard, @@ -12374,7 +12101,7 @@ var require_headers = __commonJS({ var require_response = __commonJS({ "node_modules/undici/lib/web/fetch/response.js"(exports2, module2) { "use strict"; - var { Headers, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = require_headers(); + var { Headers: Headers2, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = require_headers(); var { extractBody, cloneBody, mixinBody, hasFinalizationRegistry, streamRegistry, bodyUnusable } = require_body(); var util = require_util(); var nodeUtil = require("node:util"); @@ -12452,7 +12179,7 @@ var require_response = __commonJS({ } init = webidl.converters.ResponseInit(init); this[kState] = makeResponse({}); - this[kHeaders] = new Headers(kConstruct); + this[kHeaders] = new Headers2(kConstruct); setHeadersGuard(this[kHeaders], "response"); setHeadersList(this[kHeaders], this[kState].headersList); let bodyWithType = null; @@ -12696,7 +12423,7 @@ var require_response = __commonJS({ function fromInnerResponse(innerResponse, guard) { const response = new Response(kConstruct); response[kState] = innerResponse; - response[kHeaders] = new Headers(kConstruct); + response[kHeaders] = new Headers2(kConstruct); setHeadersList(response[kHeaders], innerResponse.headersList); setHeadersGuard(response[kHeaders], guard); if (hasFinalizationRegistry && innerResponse.body?.stream) { @@ -12816,7 +12543,7 @@ var require_request2 = __commonJS({ "node_modules/undici/lib/web/fetch/request.js"(exports2, module2) { "use strict"; var { extractBody, mixinBody, cloneBody, bodyUnusable } = require_body(); - var { Headers, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = require_headers(); + var { Headers: Headers2, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = require_headers(); var { FinalizationRegistry: FinalizationRegistry2 } = require_dispatcher_weakref()(); var util = require_util(); var nodeUtil = require("node:util"); @@ -13084,7 +12811,7 @@ var require_request2 = __commonJS({ requestFinalizer.register(ac, { signal, abort }, abort); } } - this[kHeaders] = new Headers(kConstruct); + this[kHeaders] = new Headers2(kConstruct); setHeadersList(this[kHeaders], request.headersList); setHeadersGuard(this[kHeaders], "request"); if (mode === "no-cors") { @@ -13373,7 +13100,7 @@ var require_request2 = __commonJS({ const request = new Request(kConstruct); request[kState] = innerRequest; request[kSignal] = signal; - request[kHeaders] = new Headers(kConstruct); + request[kHeaders] = new Headers2(kConstruct); setHeadersList(request[kHeaders], innerRequest.headersList); setHeadersGuard(request[kHeaders], guard); return request; @@ -13592,17 +13319,17 @@ var require_fetch = __commonJS({ this.emit("terminated", reason); } // https://fetch.spec.whatwg.org/#fetch-controller-abort - abort(error2) { + abort(error3) { if (this.state !== "ongoing") { return; } this.state = "aborted"; - if (!error2) { - error2 = new DOMException("The operation was aborted.", "AbortError"); + if (!error3) { + error3 = new DOMException("The operation was aborted.", "AbortError"); } - this.serializedAbortReason = error2; - this.connection?.destroy(error2); - this.emit("terminated", error2); + this.serializedAbortReason = error3; + this.connection?.destroy(error3); + this.emit("terminated", error3); } }; function handleFetchDone(response) { @@ -13698,12 +13425,12 @@ var require_fetch = __commonJS({ ); } var markResourceTiming = performance.markResourceTiming; - function abortFetch(p2, request, responseObject, error2) { + function abortFetch(p2, request, responseObject, error3) { if (p2) { - p2.reject(error2); + p2.reject(error3); } if (request.body != null && isReadable(request.body?.stream)) { - request.body.stream.cancel(error2).catch((err) => { + request.body.stream.cancel(error3).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -13715,7 +13442,7 @@ var require_fetch = __commonJS({ } const response = responseObject[kState]; if (response.body != null && isReadable(response.body?.stream)) { - response.body.stream.cancel(error2).catch((err) => { + response.body.stream.cancel(error3).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -14536,13 +14263,13 @@ var require_fetch = __commonJS({ fetchParams.controller.ended = true; this.body.push(null); }, - onError(error2) { + onError(error3) { if (this.abort) { fetchParams.controller.off("terminated", this.abort); } - this.body?.destroy(error2); - fetchParams.controller.terminate(error2); - reject(error2); + this.body?.destroy(error3); + fetchParams.controller.terminate(error3); + reject(error3); }, onUpgrade(status, rawHeaders, socket) { if (status !== 101) { @@ -15005,8 +14732,8 @@ var require_util4 = __commonJS({ } fr[kResult] = result; fireAProgressEvent("load", fr); - } catch (error2) { - fr[kError] = error2; + } catch (error3) { + fr[kError] = error3; fireAProgressEvent("error", fr); } if (fr[kState] !== "loading") { @@ -15015,13 +14742,13 @@ var require_util4 = __commonJS({ }); break; } - } catch (error2) { + } catch (error3) { if (fr[kAborted]) { return; } queueMicrotask(() => { fr[kState] = "done"; - fr[kError] = error2; + fr[kError] = error3; fireAProgressEvent("error", fr); if (fr[kState] !== "loading") { fireAProgressEvent("loadend", fr); @@ -16411,10 +16138,10 @@ var require_cookies = __commonJS({ var { parseSetCookie } = require_parse(); var { stringify } = require_util6(); var { webidl } = require_webidl(); - var { Headers } = require_headers(); + var { Headers: Headers2 } = require_headers(); function getCookies(headers) { webidl.argumentLengthCheck(arguments, 1, "getCookies"); - webidl.brandCheck(headers, Headers, { strict: false }); + webidl.brandCheck(headers, Headers2, { strict: false }); const cookie = headers.get("cookie"); const out = {}; if (!cookie) { @@ -16427,7 +16154,7 @@ var require_cookies = __commonJS({ return out; } function deleteCookie(headers, name, attributes) { - webidl.brandCheck(headers, Headers, { strict: false }); + webidl.brandCheck(headers, Headers2, { strict: false }); const prefix = "deleteCookie"; webidl.argumentLengthCheck(arguments, 2, prefix); name = webidl.converters.DOMString(name, prefix, "name"); @@ -16441,7 +16168,7 @@ var require_cookies = __commonJS({ } function getSetCookies(headers) { webidl.argumentLengthCheck(arguments, 1, "getSetCookies"); - webidl.brandCheck(headers, Headers, { strict: false }); + webidl.brandCheck(headers, Headers2, { strict: false }); const cookies = headers.getSetCookie(); if (!cookies) { return []; @@ -16450,7 +16177,7 @@ var require_cookies = __commonJS({ } function setCookie(headers, cookie) { webidl.argumentLengthCheck(arguments, 2, "setCookie"); - webidl.brandCheck(headers, Headers, { strict: false }); + webidl.brandCheck(headers, Headers2, { strict: false }); cookie = webidl.converters.Cookie(cookie); const str = stringify(cookie); if (str) { @@ -17052,13 +16779,13 @@ var require_frame = __commonJS({ "use strict"; var { maxUnsigned16Bit } = require_constants5(); var BUFFER_SIZE = 16386; - var crypto3; + var crypto4; var buffer = null; var bufIdx = BUFFER_SIZE; try { - crypto3 = require("node:crypto"); + crypto4 = require("node:crypto"); } catch { - crypto3 = { + crypto4 = { // not full compatibility, but minimum. randomFillSync: function randomFillSync(buffer2, _offset2, _size) { for (let i5 = 0; i5 < buffer2.length; ++i5) { @@ -17071,7 +16798,7 @@ var require_frame = __commonJS({ function generateMask() { if (bufIdx === BUFFER_SIZE) { bufIdx = 0; - crypto3.randomFillSync(buffer ??= Buffer.allocUnsafe(BUFFER_SIZE), 0, BUFFER_SIZE); + crypto4.randomFillSync(buffer ??= Buffer.allocUnsafe(BUFFER_SIZE), 0, BUFFER_SIZE); } return [buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++]]; } @@ -17140,12 +16867,12 @@ var require_connection = __commonJS({ var { CloseEvent } = require_events(); var { makeRequest } = require_request2(); var { fetching } = require_fetch(); - var { Headers, getHeadersList } = require_headers(); + var { Headers: Headers2, getHeadersList } = require_headers(); var { getDecodeSplit } = require_util2(); var { WebsocketFrameSend } = require_frame(); - var crypto3; + var crypto4; try { - crypto3 = require("node:crypto"); + crypto4 = require("node:crypto"); } catch { } function establishWebSocketConnection(url, protocols2, client, ws, onEstablish, options) { @@ -17162,10 +16889,10 @@ var require_connection = __commonJS({ redirect: "error" }); if (options.headers) { - const headersList = getHeadersList(new Headers(options.headers)); + const headersList = getHeadersList(new Headers2(options.headers)); request.headersList = headersList; } - const keyValue = crypto3.randomBytes(16).toString("base64"); + const keyValue = crypto4.randomBytes(16).toString("base64"); request.headersList.append("sec-websocket-key", keyValue); request.headersList.append("sec-websocket-version", "13"); for (const protocol of protocols2) { @@ -17195,7 +16922,7 @@ var require_connection = __commonJS({ return; } const secWSAccept = response.headersList.get("Sec-WebSocket-Accept"); - const digest = crypto3.createHash("sha1").update(keyValue + uid).digest("base64"); + const digest = crypto4.createHash("sha1").update(keyValue + uid).digest("base64"); if (secWSAccept !== digest) { failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); return; @@ -17293,11 +17020,11 @@ var require_connection = __commonJS({ }); } } - function onSocketError(error2) { + function onSocketError(error3) { const { ws } = this; ws[kReadyState] = states.CLOSING; if (channels.socketError.hasSubscribers) { - channels.socketError.publish(error2); + channels.socketError.publish(error3); } this.destroy(); } @@ -17318,31 +17045,26 @@ var require_permessage_deflate = __commonJS({ var tail = Buffer.from([0, 0, 255, 255]); var kBuffer = /* @__PURE__ */ Symbol("kBuffer"); var kLength = /* @__PURE__ */ Symbol("kLength"); - var kDefaultMaxDecompressedSize = 4 * 1024 * 1024; var PerMessageDeflate = class { /** @type {import('node:zlib').InflateRaw} */ #inflate; #options = {}; - /** @type {number} */ - #maxDecompressedSize; - /** @type {boolean} */ - #aborted = false; - /** @type {Function|null} */ - #currentCallback = null; + #maxPayloadSize = 0; /** * @param {Map} extensions - * @param {{ maxDecompressedMessageSize?: number }} [options] */ - constructor(extensions, options = {}) { + constructor(extensions, options) { this.#options.serverNoContextTakeover = extensions.has("server_no_context_takeover"); this.#options.serverMaxWindowBits = extensions.get("server_max_window_bits"); - this.#maxDecompressedSize = options.maxDecompressedMessageSize ?? kDefaultMaxDecompressedSize; + this.#maxPayloadSize = options.maxPayloadSize; } + /** + * Decompress a compressed payload. + * @param {Buffer} chunk Compressed data + * @param {boolean} fin Final fragment flag + * @param {Function} callback Callback function + */ decompress(chunk, fin, callback) { - if (this.#aborted) { - callback(new MessageSizeExceededError()); - return; - } if (!this.#inflate) { let windowBits = Z_DEFAULT_WINDOWBITS; if (this.#options.serverMaxWindowBits) { @@ -17361,20 +17083,11 @@ var require_permessage_deflate = __commonJS({ this.#inflate[kBuffer] = []; this.#inflate[kLength] = 0; this.#inflate.on("data", (data3) => { - if (this.#aborted) { - return; - } this.#inflate[kLength] += data3.length; - if (this.#inflate[kLength] > this.#maxDecompressedSize) { - this.#aborted = true; + if (this.#maxPayloadSize > 0 && this.#inflate[kLength] > this.#maxPayloadSize) { + callback(new MessageSizeExceededError()); this.#inflate.removeAllListeners(); - this.#inflate.destroy(); this.#inflate = null; - if (this.#currentCallback) { - const cb = this.#currentCallback; - this.#currentCallback = null; - cb(new MessageSizeExceededError()); - } return; } this.#inflate[kBuffer].push(data3); @@ -17384,19 +17097,17 @@ var require_permessage_deflate = __commonJS({ callback(err); }); } - this.#currentCallback = callback; this.#inflate.write(chunk); if (fin) { this.#inflate.write(tail); } this.#inflate.flush(() => { - if (this.#aborted || !this.#inflate) { + if (!this.#inflate) { return; } const full = Buffer.concat(this.#inflate[kBuffer], this.#inflate[kLength]); this.#inflate[kBuffer].length = 0; this.#inflate[kLength] = 0; - this.#currentCallback = null; callback(null, full); }); } @@ -17427,8 +17138,10 @@ var require_receiver = __commonJS({ var { WebsocketFrameSend } = require_frame(); var { closeWebSocketConnection } = require_connection(); var { PerMessageDeflate } = require_permessage_deflate(); + var { MessageSizeExceededError } = require_errors(); var ByteParser = class extends Writable3 { #buffers = []; + #fragmentsBytes = 0; #byteOffset = 0; #loop = false; #state = parserStates.INFO; @@ -17436,18 +17149,18 @@ var require_receiver = __commonJS({ #fragments = []; /** @type {Map} */ #extensions; - /** @type {{ maxDecompressedMessageSize?: number }} */ - #options; + /** @type {number} */ + #maxPayloadSize; /** * @param {import('./websocket').WebSocket} ws * @param {Map|null} extensions - * @param {{ maxDecompressedMessageSize?: number }} [options] + * @param {{ maxPayloadSize?: number }} [options] */ constructor(ws, extensions, options = {}) { super(); this.ws = ws; this.#extensions = extensions == null ? /* @__PURE__ */ new Map() : extensions; - this.#options = options; + this.#maxPayloadSize = options.maxPayloadSize ?? 0; if (this.#extensions.has("permessage-deflate")) { this.#extensions.set("permessage-deflate", new PerMessageDeflate(extensions, options)); } @@ -17462,6 +17175,13 @@ var require_receiver = __commonJS({ this.#loop = true; this.run(callback); } + #validatePayloadLength() { + if (this.#maxPayloadSize > 0 && !isControlFrame(this.#info.opcode) && this.#info.payloadLength > this.#maxPayloadSize) { + failWebsocketConnection(this.ws, "Payload size exceeds maximum allowed size"); + return false; + } + return true; + } /** * Runs whenever a new chunk is received. * Callback is called whenever there are no more chunks buffering, @@ -17521,6 +17241,9 @@ var require_receiver = __commonJS({ if (payloadLength <= 125) { this.#info.payloadLength = payloadLength; this.#state = parserStates.READ_DATA; + if (!this.#validatePayloadLength()) { + return; + } } else if (payloadLength === 126) { this.#state = parserStates.PAYLOADLENGTH_16; } else if (payloadLength === 127) { @@ -17541,6 +17264,9 @@ var require_receiver = __commonJS({ const buffer = this.consume(2); this.#info.payloadLength = buffer.readUInt16BE(0); this.#state = parserStates.READ_DATA; + if (!this.#validatePayloadLength()) { + return; + } } else if (this.#state === parserStates.PAYLOADLENGTH_64) { if (this.#byteOffset < 8) { return callback(); @@ -17554,6 +17280,9 @@ var require_receiver = __commonJS({ } this.#info.payloadLength = lower; this.#state = parserStates.READ_DATA; + if (!this.#validatePayloadLength()) { + return; + } } else if (this.#state === parserStates.READ_DATA) { if (this.#byteOffset < this.#info.payloadLength) { return callback(); @@ -17564,32 +17293,41 @@ var require_receiver = __commonJS({ this.#state = parserStates.INFO; } else { if (!this.#info.compressed) { - this.#fragments.push(body); + this.writeFragments(body); + if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { + failWebsocketConnection(this.ws, new MessageSizeExceededError().message); + return; + } if (!this.#info.fragmented && this.#info.fin) { - const fullMessage = Buffer.concat(this.#fragments); - websocketMessageReceived(this.ws, this.#info.binaryType, fullMessage); - this.#fragments.length = 0; + websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()); } this.#state = parserStates.INFO; } else { - this.#extensions.get("permessage-deflate").decompress(body, this.#info.fin, (error2, data3) => { - if (error2) { - failWebsocketConnection(this.ws, error2.message); - return; - } - this.#fragments.push(data3); - if (!this.#info.fin) { - this.#state = parserStates.INFO; + this.#extensions.get("permessage-deflate").decompress( + body, + this.#info.fin, + (error3, data3) => { + if (error3) { + failWebsocketConnection(this.ws, error3.message); + return; + } + this.writeFragments(data3); + if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { + failWebsocketConnection(this.ws, new MessageSizeExceededError().message); + return; + } + if (!this.#info.fin) { + this.#state = parserStates.INFO; + this.#loop = true; + this.run(callback); + return; + } + websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()); this.#loop = true; + this.#state = parserStates.INFO; this.run(callback); - return; } - websocketMessageReceived(this.ws, this.#info.binaryType, Buffer.concat(this.#fragments)); - this.#loop = true; - this.#state = parserStates.INFO; - this.#fragments.length = 0; - this.run(callback); - }); + ); this.#loop = false; break; } @@ -17632,6 +17370,21 @@ var require_receiver = __commonJS({ this.#byteOffset -= n3; return buffer; } + writeFragments(fragment) { + this.#fragmentsBytes += fragment.length; + this.#fragments.push(fragment); + } + consumeFragments() { + const fragments = this.#fragments; + if (fragments.length === 1) { + this.#fragmentsBytes = 0; + return fragments.shift(); + } + const output = Buffer.concat(fragments, this.#fragmentsBytes); + this.#fragments = []; + this.#fragmentsBytes = 0; + return output; + } parseCloseBody(data3) { assert4(data3.length !== 1); let code; @@ -17843,8 +17596,6 @@ var require_websocket = __commonJS({ #extensions = ""; /** @type {SendQueue} */ #sendQueue; - /** @type {{ maxDecompressedMessageSize?: number }} */ - #options; /** * @param {string} url * @param {string|string[]} protocols @@ -17888,9 +17639,6 @@ var require_websocket = __commonJS({ throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); } this[kWebSocketURL] = new URL(urlRecord.href); - this.#options = { - maxDecompressedMessageSize: options.maxDecompressedMessageSize - }; const client = environmentSettingsObject.settingsObject; this[kController] = establishWebSocketConnection( urlRecord, @@ -18074,7 +17822,10 @@ var require_websocket = __commonJS({ */ #onConnectionEstablished(response, parsedExtensions) { this[kResponse] = response; - const parser = new ByteParser(this, parsedExtensions, this.#options); + const maxPayloadSize = this[kController]?.dispatcher?.webSocketOptions?.maxPayloadSize; + const parser = new ByteParser(this, parsedExtensions, { + maxPayloadSize + }); parser.on("drain", onParserDrain); parser.on("error", onParserError.bind(this)); response.socket.ws = this; @@ -18149,19 +17900,6 @@ var require_websocket = __commonJS({ { key: "headers", converter: webidl.nullableConverter(webidl.converters.HeadersInit) - }, - { - key: "maxDecompressedMessageSize", - converter: webidl.nullableConverter((V) => { - V = webidl.converters["unsigned long long"](V); - if (V <= 0) { - throw webidl.errors.exception({ - header: "WebSocket constructor", - message: "maxDecompressedMessageSize must be greater than 0" - }); - } - return V; - }) } ]); webidl.converters["DOMString or sequence or WebSocketInit"] = function(V) { @@ -18624,8 +18362,8 @@ var require_eventsource = __commonJS({ pipeline( response.body.stream, eventSourceStream, - (error2) => { - if (error2?.aborted === false) { + (error3) => { + if (error3?.aborted === false) { this.close(); this.dispatchEvent(new Event("error")); } @@ -18764,8 +18502,8 @@ var require_undici = __commonJS({ var Dispatcher = require_dispatcher(); var Pool = require_pool(); var BalancedPool = require_balanced_pool(); - var Agent7 = require_agent(); - var ProxyAgent2 = require_proxy_agent(); + var Agent9 = require_agent(); + var ProxyAgent3 = require_proxy_agent(); var EnvHttpProxyAgent = require_env_http_proxy_agent(); var RetryAgent = require_retry_agent(); var errors = require_errors(); @@ -18787,8 +18525,8 @@ var require_undici = __commonJS({ module2.exports.Client = Client3; module2.exports.Pool = Pool; module2.exports.BalancedPool = BalancedPool; - module2.exports.Agent = Agent7; - module2.exports.ProxyAgent = ProxyAgent2; + module2.exports.Agent = Agent9; + module2.exports.ProxyAgent = ProxyAgent3; module2.exports.EnvHttpProxyAgent = EnvHttpProxyAgent; module2.exports.RetryAgent = RetryAgent; module2.exports.RetryHandler = RetryHandler; @@ -18898,2695 +18636,6 @@ var require_undici = __commonJS({ } }); -// node_modules/@actions/http-client/lib/index.js -var require_lib = __commonJS({ - "node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o2, m3, k5, k22) { - if (k22 === void 0) k22 = k5; - var desc = Object.getOwnPropertyDescriptor(m3, k5); - if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m3[k5]; - } }; - } - Object.defineProperty(o2, k22, desc); - }) : (function(o2, m3, k5, k22) { - if (k22 === void 0) k22 = k5; - o2[k22] = m3[k5]; - })); - var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o2, v) { - Object.defineProperty(o2, "default", { enumerable: true, value: v }); - }) : function(o2, v) { - o2["default"] = v; - }); - var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys2 = function(o2) { - ownKeys2 = Object.getOwnPropertyNames || function(o3) { - var ar = []; - for (var k5 in o3) if (Object.prototype.hasOwnProperty.call(o3, k5)) ar[ar.length] = k5; - return ar; - }; - return ownKeys2(o2); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k5 = ownKeys2(mod), i5 = 0; i5 < k5.length; i5++) if (k5[i5] !== "default") __createBinding2(result, mod, k5[i5]); - } - __setModuleDefault2(result, mod); - return result; - }; - })(); - var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e5) { - reject(e5); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e5) { - reject(e5); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.HttpClientResponse = exports2.HttpClientError = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - exports2.getProxyUrl = getProxyUrl; - exports2.isHttps = isHttps; - var http5 = __importStar2(require("http")); - var https4 = __importStar2(require("https")); - var pm = __importStar2(require_proxy()); - var tunnel = __importStar2(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter2(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter2(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - var HttpClient = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = this._getUserAgentWithOrchestrationId(userAgent); - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter2(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter2(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter2(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data3, additionalHeaders) { - return __awaiter2(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data3, additionalHeaders || {}); - }); - } - patch(requestUrl, data3, additionalHeaders) { - return __awaiter2(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data3, additionalHeaders || {}); - }); - } - put(requestUrl, data3, additionalHeaders) { - return __awaiter2(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data3, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter2(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter2(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl_1) { - return __awaiter2(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl_1, obj_1) { - return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data3 = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data3, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl_1, obj_1) { - return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data3 = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data3, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl_1, obj_1) { - return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data3 = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data3, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data3, headers) { - return __awaiter2(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info5 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info5, data3); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info5, data3); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info5 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info5, data3); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info5, data3) { - return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve(res); - } - } - this.requestRawWithCallback(info5, data3, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info5, data3, onResult) { - if (typeof data3 === "string") { - if (!info5.options.headers) { - info5.options.headers = {}; - } - info5.options.headers["Content-Length"] = Buffer.byteLength(data3, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info5.httpModule.request(info5.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info5.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data3 && typeof data3 === "string") { - req.write(data3, "utf8"); - } - if (data3 && typeof data3 !== "string") { - data3.on("close", function() { - req.end(); - }); - data3.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info5 = {}; - info5.parsedUrl = requestUrl; - const usingSsl = info5.parsedUrl.protocol === "https:"; - info5.httpModule = usingSsl ? https4 : http5; - const defaultPort = usingSsl ? 443 : 80; - info5.options = {}; - info5.options.host = info5.parsedUrl.hostname; - info5.options.port = info5.parsedUrl.port ? parseInt(info5.parsedUrl.port) : defaultPort; - info5.options.path = (info5.parsedUrl.pathname || "") + (info5.parsedUrl.search || ""); - info5.options.method = method; - info5.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info5.options.headers["user-agent"] = this.userAgent; - } - info5.options.agent = this._getAgent(info5.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info5.options); - } - } - return info5; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - /** - * Gets an existing header value or returns a default. - * Handles converting number header values to strings since HTTP headers must be strings. - * Note: This returns string | string[] since some headers can have multiple values. - * For headers that must always be a single string (like Content-Type), use the - * specialized _getExistingOrDefaultContentTypeHeader method instead. - */ - _getExistingOrDefaultHeader(additionalHeaders, header, _default) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; - if (headerValue) { - clientHeader = typeof headerValue === "number" ? headerValue.toString() : headerValue; - } - } - const additionalValue = additionalHeaders[header]; - if (additionalValue !== void 0) { - return typeof additionalValue === "number" ? additionalValue.toString() : additionalValue; - } - if (clientHeader !== void 0) { - return clientHeader; - } - return _default; - } - /** - * Specialized version of _getExistingOrDefaultHeader for Content-Type header. - * Always returns a single string (not an array) since Content-Type should be a single value. - * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. - * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers - * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). - */ - _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; - if (headerValue) { - if (typeof headerValue === "number") { - clientHeader = String(headerValue); - } else if (Array.isArray(headerValue)) { - clientHeader = headerValue.join(", "); - } else { - clientHeader = headerValue; - } - } - } - const additionalValue = additionalHeaders[Headers.ContentType]; - if (additionalValue !== void 0) { - if (typeof additionalValue === "number") { - return String(additionalValue); - } else if (Array.isArray(additionalValue)) { - return additionalValue.join(", "); - } else { - return additionalValue; - } - } - if (clientHeader !== void 0) { - return clientHeader; - } - return _default; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http5.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https4.Agent(options) : new http5.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _getUserAgentWithOrchestrationId(userAgent) { - const baseUserAgent = userAgent || "actions/http-client"; - const orchId = process.env["ACTIONS_ORCHESTRATION_ID"]; - if (orchId) { - const sanitizedId = orchId.replace(/[^a-z0-9_.-]/gi, "_"); - return `${baseUserAgent} actions_orchestration_id/${sanitizedId}`; - } - return baseUserAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter2(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve) => setTimeout(() => resolve(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter2(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a5 = new Date(value); - if (!isNaN(a5.valueOf())) { - return a5; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c5, k5) => (c5[k5.toLowerCase()] = obj[k5], c5), {}); - } -}); - -// node_modules/@actions/http-client/lib/auth.js -var require_auth = __commonJS({ - "node_modules/@actions/http-client/lib/auth.js"(exports2) { - "use strict"; - var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e5) { - reject(e5); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e5) { - reject(e5); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; - var BasicCredentialHandler = class { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter2(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BasicCredentialHandler = BasicCredentialHandler; - var BearerCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter2(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BearerCredentialHandler = BearerCredentialHandler; - var PersonalAccessTokenCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter2(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; - } -}); - -// node_modules/@actions/core/lib/oidc-utils.js -var require_oidc_utils = __commonJS({ - "node_modules/@actions/core/lib/oidc-utils.js"(exports2) { - "use strict"; - var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e5) { - reject(e5); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e5) { - reject(e5); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.OidcClient = void 0; - var http_client_1 = require_lib(); - var auth_1 = require_auth(); - var core_1 = require_core(); - var OidcClient = class _OidcClient { - static createHttpClient(allowRetry = true, maxRetry = 10) { - const requestOptions = { - allowRetries: allowRetry, - maxRetries: maxRetry - }; - return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); - } - static getRequestToken() { - const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; - if (!token) { - throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); - } - return token; - } - static getIDTokenUrl() { - const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; - if (!runtimeUrl) { - throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); - } - return runtimeUrl; - } - static getCall(id_token_url) { - return __awaiter2(this, void 0, void 0, function* () { - var _a2; - const httpclient = _OidcClient.createHttpClient(); - const res = yield httpclient.getJson(id_token_url).catch((error2) => { - throw new Error(`Failed to get ID Token. - - Error Code : ${error2.statusCode} - - Error Message: ${error2.message}`); - }); - const id_token = (_a2 = res.result) === null || _a2 === void 0 ? void 0 : _a2.value; - if (!id_token) { - throw new Error("Response json body do not have ID Token field"); - } - return id_token; - }); - } - static getIDToken(audience) { - return __awaiter2(this, void 0, void 0, function* () { - try { - let id_token_url = _OidcClient.getIDTokenUrl(); - if (audience) { - const encodedAudience = encodeURIComponent(audience); - id_token_url = `${id_token_url}&audience=${encodedAudience}`; - } - (0, core_1.debug)(`ID token url is ${id_token_url}`); - const id_token = yield _OidcClient.getCall(id_token_url); - (0, core_1.setSecret)(id_token); - return id_token; - } catch (error2) { - throw new Error(`Error message: ${error2.message}`); - } - }); - } - }; - exports2.OidcClient = OidcClient; - } -}); - -// node_modules/@actions/core/lib/summary.js -var require_summary = __commonJS({ - "node_modules/@actions/core/lib/summary.js"(exports2) { - "use strict"; - var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e5) { - reject(e5); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e5) { - reject(e5); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0; - var os_1 = require("os"); - var fs_1 = require("fs"); - var { access, appendFile, writeFile } = fs_1.promises; - exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; - exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; - var Summary = class { - constructor() { - this._buffer = ""; - } - /** - * Finds the summary file path from the environment, rejects if env var is not found or file does not exist - * Also checks r/w permissions. - * - * @returns step summary file path - */ - filePath() { - return __awaiter2(this, void 0, void 0, function* () { - if (this._filePath) { - return this._filePath; - } - const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR]; - if (!pathFromEnv) { - throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); - } - try { - yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); - } catch (_a2) { - throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); - } - this._filePath = pathFromEnv; - return this._filePath; - }); - } - /** - * Wraps content in an HTML tag, adding any HTML attributes - * - * @param {string} tag HTML tag to wrap - * @param {string | null} content content within the tag - * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add - * - * @returns {string} content wrapped in HTML element - */ - wrap(tag2, content, attrs = {}) { - const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); - if (!content) { - return `<${tag2}${htmlAttrs}>`; - } - return `<${tag2}${htmlAttrs}>${content}`; - } - /** - * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. - * - * @param {SummaryWriteOptions} [options] (optional) options for write operation - * - * @returns {Promise} summary instance - */ - write(options) { - return __awaiter2(this, void 0, void 0, function* () { - const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); - const filePath = yield this.filePath(); - const writeFunc = overwrite ? writeFile : appendFile; - yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); - return this.emptyBuffer(); - }); - } - /** - * Clears the summary buffer and wipes the summary file - * - * @returns {Summary} summary instance - */ - clear() { - return __awaiter2(this, void 0, void 0, function* () { - return this.emptyBuffer().write({ overwrite: true }); - }); - } - /** - * Returns the current summary buffer as a string - * - * @returns {string} string of summary buffer - */ - stringify() { - return this._buffer; - } - /** - * If the summary buffer is empty - * - * @returns {boolen} true if the buffer is empty - */ - isEmptyBuffer() { - return this._buffer.length === 0; - } - /** - * Resets the summary buffer without writing to summary file - * - * @returns {Summary} summary instance - */ - emptyBuffer() { - this._buffer = ""; - return this; - } - /** - * Adds raw text to the summary buffer - * - * @param {string} text content to add - * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) - * - * @returns {Summary} summary instance - */ - addRaw(text, addEOL = false) { - this._buffer += text; - return addEOL ? this.addEOL() : this; - } - /** - * Adds the operating system-specific end-of-line marker to the buffer - * - * @returns {Summary} summary instance - */ - addEOL() { - return this.addRaw(os_1.EOL); - } - /** - * Adds an HTML codeblock to the summary buffer - * - * @param {string} code content to render within fenced code block - * @param {string} lang (optional) language to syntax highlight code - * - * @returns {Summary} summary instance - */ - addCodeBlock(code, lang) { - const attrs = Object.assign({}, lang && { lang }); - const element = this.wrap("pre", this.wrap("code", code), attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML list to the summary buffer - * - * @param {string[]} items list of items to render - * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) - * - * @returns {Summary} summary instance - */ - addList(items, ordered = false) { - const tag2 = ordered ? "ol" : "ul"; - const listItems = items.map((item) => this.wrap("li", item)).join(""); - const element = this.wrap(tag2, listItems); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML table to the summary buffer - * - * @param {SummaryTableCell[]} rows table rows - * - * @returns {Summary} summary instance - */ - addTable(rows) { - const tableBody = rows.map((row) => { - const cells = row.map((cell) => { - if (typeof cell === "string") { - return this.wrap("td", cell); - } - const { header, data: data3, colspan, rowspan } = cell; - const tag2 = header ? "th" : "td"; - const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); - return this.wrap(tag2, data3, attrs); - }).join(""); - return this.wrap("tr", cells); - }).join(""); - const element = this.wrap("table", tableBody); - return this.addRaw(element).addEOL(); - } - /** - * Adds a collapsable HTML details element to the summary buffer - * - * @param {string} label text for the closed state - * @param {string} content collapsable content - * - * @returns {Summary} summary instance - */ - addDetails(label, content) { - const element = this.wrap("details", this.wrap("summary", label) + content); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML image tag to the summary buffer - * - * @param {string} src path to the image you to embed - * @param {string} alt text description of the image - * @param {SummaryImageOptions} options (optional) addition image attributes - * - * @returns {Summary} summary instance - */ - addImage(src, alt, options) { - const { width, height } = options || {}; - const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); - const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML section heading element - * - * @param {string} text heading text - * @param {number | string} [level=1] (optional) the heading level, default: 1 - * - * @returns {Summary} summary instance - */ - addHeading(text, level) { - const tag2 = `h${level}`; - const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag2) ? tag2 : "h1"; - const element = this.wrap(allowedTag, text); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML thematic break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addSeparator() { - const element = this.wrap("hr", null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML line break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addBreak() { - const element = this.wrap("br", null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML blockquote to the summary buffer - * - * @param {string} text quote text - * @param {string} cite (optional) citation url - * - * @returns {Summary} summary instance - */ - addQuote(text, cite) { - const attrs = Object.assign({}, cite && { cite }); - const element = this.wrap("blockquote", text, attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML anchor tag to the summary buffer - * - * @param {string} text link text/content - * @param {string} href hyperlink - * - * @returns {Summary} summary instance - */ - addLink(text, href) { - const element = this.wrap("a", text, { href }); - return this.addRaw(element).addEOL(); - } - }; - var _summary = new Summary(); - exports2.markdownSummary = _summary; - exports2.summary = _summary; - } -}); - -// node_modules/@actions/core/lib/path-utils.js -var require_path_utils = __commonJS({ - "node_modules/@actions/core/lib/path-utils.js"(exports2) { - "use strict"; - var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o2, m3, k5, k22) { - if (k22 === void 0) k22 = k5; - var desc = Object.getOwnPropertyDescriptor(m3, k5); - if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m3[k5]; - } }; - } - Object.defineProperty(o2, k22, desc); - }) : (function(o2, m3, k5, k22) { - if (k22 === void 0) k22 = k5; - o2[k22] = m3[k5]; - })); - var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o2, v) { - Object.defineProperty(o2, "default", { enumerable: true, value: v }); - }) : function(o2, v) { - o2["default"] = v; - }); - var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys2 = function(o2) { - ownKeys2 = Object.getOwnPropertyNames || function(o3) { - var ar = []; - for (var k5 in o3) if (Object.prototype.hasOwnProperty.call(o3, k5)) ar[ar.length] = k5; - return ar; - }; - return ownKeys2(o2); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k5 = ownKeys2(mod), i5 = 0; i5 < k5.length; i5++) if (k5[i5] !== "default") __createBinding2(result, mod, k5[i5]); - } - __setModuleDefault2(result, mod); - return result; - }; - })(); - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toPosixPath = toPosixPath; - exports2.toWin32Path = toWin32Path; - exports2.toPlatformPath = toPlatformPath; - var path4 = __importStar2(require("path")); - function toPosixPath(pth) { - return pth.replace(/[\\]/g, "/"); - } - function toWin32Path(pth) { - return pth.replace(/[/]/g, "\\"); - } - function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path4.sep); - } - } -}); - -// node_modules/@actions/io/lib/io-util.js -var require_io_util = __commonJS({ - "node_modules/@actions/io/lib/io-util.js"(exports2) { - "use strict"; - var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o2, m3, k5, k22) { - if (k22 === void 0) k22 = k5; - var desc = Object.getOwnPropertyDescriptor(m3, k5); - if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m3[k5]; - } }; - } - Object.defineProperty(o2, k22, desc); - }) : (function(o2, m3, k5, k22) { - if (k22 === void 0) k22 = k5; - o2[k22] = m3[k5]; - })); - var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o2, v) { - Object.defineProperty(o2, "default", { enumerable: true, value: v }); - }) : function(o2, v) { - o2["default"] = v; - }); - var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys2 = function(o2) { - ownKeys2 = Object.getOwnPropertyNames || function(o3) { - var ar = []; - for (var k5 in o3) if (Object.prototype.hasOwnProperty.call(o3, k5)) ar[ar.length] = k5; - return ar; - }; - return ownKeys2(o2); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k5 = ownKeys2(mod), i5 = 0; i5 < k5.length; i5++) if (k5[i5] !== "default") __createBinding2(result, mod, k5[i5]); - } - __setModuleDefault2(result, mod); - return result; - }; - })(); - var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e5) { - reject(e5); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e5) { - reject(e5); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a2; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - exports2.readlink = readlink; - exports2.exists = exists; - exports2.isDirectory = isDirectory; - exports2.isRooted = isRooted; - exports2.tryGetExecutablePath = tryGetExecutablePath; - exports2.getCmdPath = getCmdPath; - var fs2 = __importStar2(require("fs")); - var path4 = __importStar2(require("path")); - _a2 = fs2.promises, exports2.chmod = _a2.chmod, exports2.copyFile = _a2.copyFile, exports2.lstat = _a2.lstat, exports2.mkdir = _a2.mkdir, exports2.open = _a2.open, exports2.readdir = _a2.readdir, exports2.rename = _a2.rename, exports2.rm = _a2.rm, exports2.rmdir = _a2.rmdir, exports2.stat = _a2.stat, exports2.symlink = _a2.symlink, exports2.unlink = _a2.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - function readlink(fsPath) { - return __awaiter2(this, void 0, void 0, function* () { - const result = yield fs2.promises.readlink(fsPath); - if (exports2.IS_WINDOWS && !result.endsWith("\\")) { - return `${result}\\`; - } - return result; - }); - } - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs2.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter2(this, void 0, void 0, function* () { - try { - yield (0, exports2.stat)(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - function isDirectory(fsPath_1) { - return __awaiter2(this, arguments, void 0, function* (fsPath, useStat = false) { - const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); - return stats.isDirectory(); - }); - } - function isRooted(p2) { - p2 = normalizeSeparators(p2); - if (!p2) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p2.startsWith("\\") || /^[A-Z]:/i.test(p2); - } - return p2.startsWith("/"); - } - function tryGetExecutablePath(filePath, extensions) { - return __awaiter2(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield (0, exports2.stat)(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path4.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield (0, exports2.stat)(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path4.dirname(filePath); - const upperName = path4.basename(filePath).toUpperCase(); - for (const actualName of yield (0, exports2.readdir)(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path4.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ""; - }); - } - function normalizeSeparators(p2) { - p2 = p2 || ""; - if (exports2.IS_WINDOWS) { - p2 = p2.replace(/\//g, "\\"); - return p2.replace(/\\\\+/g, "\\"); - } - return p2.replace(/\/\/+/g, "/"); - } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); - } - function getCmdPath() { - var _a3; - return (_a3 = process.env["COMSPEC"]) !== null && _a3 !== void 0 ? _a3 : `cmd.exe`; - } - } -}); - -// node_modules/@actions/io/lib/io.js -var require_io = __commonJS({ - "node_modules/@actions/io/lib/io.js"(exports2) { - "use strict"; - var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o2, m3, k5, k22) { - if (k22 === void 0) k22 = k5; - var desc = Object.getOwnPropertyDescriptor(m3, k5); - if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m3[k5]; - } }; - } - Object.defineProperty(o2, k22, desc); - }) : (function(o2, m3, k5, k22) { - if (k22 === void 0) k22 = k5; - o2[k22] = m3[k5]; - })); - var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o2, v) { - Object.defineProperty(o2, "default", { enumerable: true, value: v }); - }) : function(o2, v) { - o2["default"] = v; - }); - var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys2 = function(o2) { - ownKeys2 = Object.getOwnPropertyNames || function(o3) { - var ar = []; - for (var k5 in o3) if (Object.prototype.hasOwnProperty.call(o3, k5)) ar[ar.length] = k5; - return ar; - }; - return ownKeys2(o2); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k5 = ownKeys2(mod), i5 = 0; i5 < k5.length; i5++) if (k5[i5] !== "default") __createBinding2(result, mod, k5[i5]); - } - __setModuleDefault2(result, mod); - return result; - }; - })(); - var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e5) { - reject(e5); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e5) { - reject(e5); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.cp = cp; - exports2.mv = mv; - exports2.rmRF = rmRF; - exports2.mkdirP = mkdirP; - exports2.which = which; - exports2.findInPath = findInPath; - var assert_1 = require("assert"); - var path4 = __importStar2(require("path")); - var ioUtil = __importStar2(require_io_util()); - function cp(source_1, dest_1) { - return __awaiter2(this, arguments, void 0, function* (source, dest, options = {}) { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path4.join(dest, path4.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path4.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - function mv(source_1, dest_1) { - return __awaiter2(this, arguments, void 0, function* (source, dest, options = {}) { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path4.join(dest, path4.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path4.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - function rmRF(inputPath) { - return __awaiter2(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - function mkdirP(fsPath) { - return __awaiter2(this, void 0, void 0, function* () { - (0, assert_1.ok)(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - function which(tool, check) { - return __awaiter2(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - function findInPath(tool) { - return __awaiter2(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path4.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path4.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p2 of process.env.PATH.split(path4.delimiter)) { - if (p2) { - directories.push(p2); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path4.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter2(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter2(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e5) { - if (e5.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); - } - } -}); - -// node_modules/@actions/exec/lib/toolrunner.js -var require_toolrunner = __commonJS({ - "node_modules/@actions/exec/lib/toolrunner.js"(exports2) { - "use strict"; - var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o2, m3, k5, k22) { - if (k22 === void 0) k22 = k5; - var desc = Object.getOwnPropertyDescriptor(m3, k5); - if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m3[k5]; - } }; - } - Object.defineProperty(o2, k22, desc); - }) : (function(o2, m3, k5, k22) { - if (k22 === void 0) k22 = k5; - o2[k22] = m3[k5]; - })); - var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o2, v) { - Object.defineProperty(o2, "default", { enumerable: true, value: v }); - }) : function(o2, v) { - o2["default"] = v; - }); - var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys2 = function(o2) { - ownKeys2 = Object.getOwnPropertyNames || function(o3) { - var ar = []; - for (var k5 in o3) if (Object.prototype.hasOwnProperty.call(o3, k5)) ar[ar.length] = k5; - return ar; - }; - return ownKeys2(o2); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k5 = ownKeys2(mod), i5 = 0; i5 < k5.length; i5++) if (k5[i5] !== "default") __createBinding2(result, mod, k5[i5]); - } - __setModuleDefault2(result, mod); - return result; - }; - })(); - var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e5) { - reject(e5); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e5) { - reject(e5); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.ToolRunner = void 0; - exports2.argStringToArray = argStringToArray; - var os3 = __importStar2(require("os")); - var events = __importStar2(require("events")); - var child = __importStar2(require("child_process")); - var path4 = __importStar2(require("path")); - var io = __importStar2(require_io()); - var ioUtil = __importStar2(require_io_util()); - var timers_1 = require("timers"); - var IS_WINDOWS = process.platform === "win32"; - var ToolRunner = class extends events.EventEmitter { - constructor(toolPath, args, options) { - super(); - if (!toolPath) { - throw new Error("Parameter 'toolPath' cannot be null or empty."); - } - this.toolPath = toolPath; - this.args = args || []; - this.options = options || {}; - } - _debug(message) { - if (this.options.listeners && this.options.listeners.debug) { - this.options.listeners.debug(message); - } - } - _getCommandString(options, noPrefix) { - const toolPath = this._getSpawnFileName(); - const args = this._getSpawnArgs(options); - let cmd = noPrefix ? "" : "[command]"; - if (IS_WINDOWS) { - if (this._isCmdFile()) { - cmd += toolPath; - for (const a5 of args) { - cmd += ` ${a5}`; - } - } else if (options.windowsVerbatimArguments) { - cmd += `"${toolPath}"`; - for (const a5 of args) { - cmd += ` ${a5}`; - } - } else { - cmd += this._windowsQuoteCmdArg(toolPath); - for (const a5 of args) { - cmd += ` ${this._windowsQuoteCmdArg(a5)}`; - } - } - } else { - cmd += toolPath; - for (const a5 of args) { - cmd += ` ${a5}`; - } - } - return cmd; - } - _processLineBuffer(data3, strBuffer, onLine) { - try { - let s = strBuffer + data3.toString(); - let n3 = s.indexOf(os3.EOL); - while (n3 > -1) { - const line = s.substring(0, n3); - onLine(line); - s = s.substring(n3 + os3.EOL.length); - n3 = s.indexOf(os3.EOL); - } - return s; - } catch (err) { - this._debug(`error processing line. Failed with error ${err}`); - return ""; - } - } - _getSpawnFileName() { - if (IS_WINDOWS) { - if (this._isCmdFile()) { - return process.env["COMSPEC"] || "cmd.exe"; - } - } - return this.toolPath; - } - _getSpawnArgs(options) { - if (IS_WINDOWS) { - if (this._isCmdFile()) { - let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; - for (const a5 of this.args) { - argline += " "; - argline += options.windowsVerbatimArguments ? a5 : this._windowsQuoteCmdArg(a5); - } - argline += '"'; - return [argline]; - } - } - return this.args; - } - _endsWith(str, end) { - return str.endsWith(end); - } - _isCmdFile() { - const upperToolPath = this.toolPath.toUpperCase(); - return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); - } - _windowsQuoteCmdArg(arg) { - if (!this._isCmdFile()) { - return this._uvQuoteCmdArg(arg); - } - if (!arg) { - return '""'; - } - const cmdSpecialChars = [ - " ", - " ", - "&", - "(", - ")", - "[", - "]", - "{", - "}", - "^", - "=", - ";", - "!", - "'", - "+", - ",", - "`", - "~", - "|", - "<", - ">", - '"' - ]; - let needsQuotes = false; - for (const char of arg) { - if (cmdSpecialChars.some((x) => x === char)) { - needsQuotes = true; - break; - } - } - if (!needsQuotes) { - return arg; - } - let reverse = '"'; - let quoteHit = true; - for (let i5 = arg.length; i5 > 0; i5--) { - reverse += arg[i5 - 1]; - if (quoteHit && arg[i5 - 1] === "\\") { - reverse += "\\"; - } else if (arg[i5 - 1] === '"') { - quoteHit = true; - reverse += '"'; - } else { - quoteHit = false; - } - } - reverse += '"'; - return reverse.split("").reverse().join(""); - } - _uvQuoteCmdArg(arg) { - if (!arg) { - return '""'; - } - if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { - return arg; - } - if (!arg.includes('"') && !arg.includes("\\")) { - return `"${arg}"`; - } - let reverse = '"'; - let quoteHit = true; - for (let i5 = arg.length; i5 > 0; i5--) { - reverse += arg[i5 - 1]; - if (quoteHit && arg[i5 - 1] === "\\") { - reverse += "\\"; - } else if (arg[i5 - 1] === '"') { - quoteHit = true; - reverse += "\\"; - } else { - quoteHit = false; - } - } - reverse += '"'; - return reverse.split("").reverse().join(""); - } - _cloneExecOptions(options) { - options = options || {}; - const result = { - cwd: options.cwd || process.cwd(), - env: options.env || process.env, - silent: options.silent || false, - windowsVerbatimArguments: options.windowsVerbatimArguments || false, - failOnStdErr: options.failOnStdErr || false, - ignoreReturnCode: options.ignoreReturnCode || false, - delay: options.delay || 1e4 - }; - result.outStream = options.outStream || process.stdout; - result.errStream = options.errStream || process.stderr; - return result; - } - _getSpawnOptions(options, toolPath) { - options = options || {}; - const result = {}; - result.cwd = options.cwd; - result.env = options.env; - result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); - if (options.windowsVerbatimArguments) { - result.argv0 = `"${toolPath}"`; - } - return result; - } - /** - * Exec a tool. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @param tool path to tool to exec - * @param options optional exec options. See ExecOptions - * @returns number - */ - exec() { - return __awaiter2(this, void 0, void 0, function* () { - if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { - this.toolPath = path4.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); - } - this.toolPath = yield io.which(this.toolPath, true); - return new Promise((resolve, reject) => __awaiter2(this, void 0, void 0, function* () { - this._debug(`exec tool: ${this.toolPath}`); - this._debug("arguments:"); - for (const arg of this.args) { - this._debug(` ${arg}`); - } - const optionsNonNull = this._cloneExecOptions(this.options); - if (!optionsNonNull.silent && optionsNonNull.outStream) { - optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os3.EOL); - } - const state2 = new ExecState(optionsNonNull, this.toolPath); - state2.on("debug", (message) => { - this._debug(message); - }); - if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { - return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); - } - const fileName = this._getSpawnFileName(); - const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); - let stdbuffer = ""; - if (cp.stdout) { - cp.stdout.on("data", (data3) => { - if (this.options.listeners && this.options.listeners.stdout) { - this.options.listeners.stdout(data3); - } - if (!optionsNonNull.silent && optionsNonNull.outStream) { - optionsNonNull.outStream.write(data3); - } - stdbuffer = this._processLineBuffer(data3, stdbuffer, (line) => { - if (this.options.listeners && this.options.listeners.stdline) { - this.options.listeners.stdline(line); - } - }); - }); - } - let errbuffer = ""; - if (cp.stderr) { - cp.stderr.on("data", (data3) => { - state2.processStderr = true; - if (this.options.listeners && this.options.listeners.stderr) { - this.options.listeners.stderr(data3); - } - if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { - const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; - s.write(data3); - } - errbuffer = this._processLineBuffer(data3, errbuffer, (line) => { - if (this.options.listeners && this.options.listeners.errline) { - this.options.listeners.errline(line); - } - }); - }); - } - cp.on("error", (err) => { - state2.processError = err.message; - state2.processExited = true; - state2.processClosed = true; - state2.CheckComplete(); - }); - cp.on("exit", (code) => { - state2.processExitCode = code; - state2.processExited = true; - this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); - state2.CheckComplete(); - }); - cp.on("close", (code) => { - state2.processExitCode = code; - state2.processExited = true; - state2.processClosed = true; - this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); - state2.CheckComplete(); - }); - state2.on("done", (error2, exitCode) => { - if (stdbuffer.length > 0) { - this.emit("stdline", stdbuffer); - } - if (errbuffer.length > 0) { - this.emit("errline", errbuffer); - } - cp.removeAllListeners(); - if (error2) { - reject(error2); - } else { - resolve(exitCode); - } - }); - if (this.options.input) { - if (!cp.stdin) { - throw new Error("child process missing stdin"); - } - cp.stdin.end(this.options.input); - } - })); - }); - } - }; - exports2.ToolRunner = ToolRunner; - function argStringToArray(argString) { - const args = []; - let inQuotes = false; - let escaped = false; - let arg = ""; - function append(c5) { - if (escaped && c5 !== '"') { - arg += "\\"; - } - arg += c5; - escaped = false; - } - for (let i5 = 0; i5 < argString.length; i5++) { - const c5 = argString.charAt(i5); - if (c5 === '"') { - if (!escaped) { - inQuotes = !inQuotes; - } else { - append(c5); - } - continue; - } - if (c5 === "\\" && escaped) { - append(c5); - continue; - } - if (c5 === "\\" && inQuotes) { - escaped = true; - continue; - } - if (c5 === " " && !inQuotes) { - if (arg.length > 0) { - args.push(arg); - arg = ""; - } - continue; - } - append(c5); - } - if (arg.length > 0) { - args.push(arg.trim()); - } - return args; - } - var ExecState = class _ExecState extends events.EventEmitter { - constructor(options, toolPath) { - super(); - this.processClosed = false; - this.processError = ""; - this.processExitCode = 0; - this.processExited = false; - this.processStderr = false; - this.delay = 1e4; - this.done = false; - this.timeout = null; - if (!toolPath) { - throw new Error("toolPath must not be empty"); - } - this.options = options; - this.toolPath = toolPath; - if (options.delay) { - this.delay = options.delay; - } - } - CheckComplete() { - if (this.done) { - return; - } - if (this.processClosed) { - this._setResult(); - } else if (this.processExited) { - this.timeout = (0, timers_1.setTimeout)(_ExecState.HandleTimeout, this.delay, this); - } - } - _debug(message) { - this.emit("debug", message); - } - _setResult() { - let error2; - if (this.processExited) { - if (this.processError) { - error2 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); - } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { - error2 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); - } else if (this.processStderr && this.options.failOnStdErr) { - error2 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); - } - } - if (this.timeout) { - clearTimeout(this.timeout); - this.timeout = null; - } - this.done = true; - this.emit("done", error2, this.processExitCode); - } - static HandleTimeout(state2) { - if (state2.done) { - return; - } - if (!state2.processClosed && state2.processExited) { - const message = `The STDIO streams did not close within ${state2.delay / 1e3} seconds of the exit event from process '${state2.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; - state2._debug(message); - } - state2._setResult(); - } - }; - } -}); - -// node_modules/@actions/exec/lib/exec.js -var require_exec = __commonJS({ - "node_modules/@actions/exec/lib/exec.js"(exports2) { - "use strict"; - var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o2, m3, k5, k22) { - if (k22 === void 0) k22 = k5; - var desc = Object.getOwnPropertyDescriptor(m3, k5); - if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m3[k5]; - } }; - } - Object.defineProperty(o2, k22, desc); - }) : (function(o2, m3, k5, k22) { - if (k22 === void 0) k22 = k5; - o2[k22] = m3[k5]; - })); - var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o2, v) { - Object.defineProperty(o2, "default", { enumerable: true, value: v }); - }) : function(o2, v) { - o2["default"] = v; - }); - var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys2 = function(o2) { - ownKeys2 = Object.getOwnPropertyNames || function(o3) { - var ar = []; - for (var k5 in o3) if (Object.prototype.hasOwnProperty.call(o3, k5)) ar[ar.length] = k5; - return ar; - }; - return ownKeys2(o2); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k5 = ownKeys2(mod), i5 = 0; i5 < k5.length; i5++) if (k5[i5] !== "default") __createBinding2(result, mod, k5[i5]); - } - __setModuleDefault2(result, mod); - return result; - }; - })(); - var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e5) { - reject(e5); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e5) { - reject(e5); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.exec = exec; - exports2.getExecOutput = getExecOutput; - var string_decoder_1 = require("string_decoder"); - var tr = __importStar2(require_toolrunner()); - function exec(commandLine, args, options) { - return __awaiter2(this, void 0, void 0, function* () { - const commandArgs = tr.argStringToArray(commandLine); - if (commandArgs.length === 0) { - throw new Error(`Parameter 'commandLine' cannot be null or empty.`); - } - const toolPath = commandArgs[0]; - args = commandArgs.slice(1).concat(args || []); - const runner = new tr.ToolRunner(toolPath, args, options); - return runner.exec(); - }); - } - function getExecOutput(commandLine, args, options) { - return __awaiter2(this, void 0, void 0, function* () { - var _a2, _b; - let stdout = ""; - let stderr = ""; - const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); - const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); - const originalStdoutListener = (_a2 = options === null || options === void 0 ? void 0 : options.listeners) === null || _a2 === void 0 ? void 0 : _a2.stdout; - const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; - const stdErrListener = (data3) => { - stderr += stderrDecoder.write(data3); - if (originalStdErrListener) { - originalStdErrListener(data3); - } - }; - const stdOutListener = (data3) => { - stdout += stdoutDecoder.write(data3); - if (originalStdoutListener) { - originalStdoutListener(data3); - } - }; - const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); - const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); - stdout += stdoutDecoder.end(); - stderr += stderrDecoder.end(); - return { - exitCode, - stdout, - stderr - }; - }); - } - } -}); - -// node_modules/@actions/core/lib/platform.js -var require_platform = __commonJS({ - "node_modules/@actions/core/lib/platform.js"(exports2) { - "use strict"; - var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o2, m3, k5, k22) { - if (k22 === void 0) k22 = k5; - var desc = Object.getOwnPropertyDescriptor(m3, k5); - if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m3[k5]; - } }; - } - Object.defineProperty(o2, k22, desc); - }) : (function(o2, m3, k5, k22) { - if (k22 === void 0) k22 = k5; - o2[k22] = m3[k5]; - })); - var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o2, v) { - Object.defineProperty(o2, "default", { enumerable: true, value: v }); - }) : function(o2, v) { - o2["default"] = v; - }); - var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys2 = function(o2) { - ownKeys2 = Object.getOwnPropertyNames || function(o3) { - var ar = []; - for (var k5 in o3) if (Object.prototype.hasOwnProperty.call(o3, k5)) ar[ar.length] = k5; - return ar; - }; - return ownKeys2(o2); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k5 = ownKeys2(mod), i5 = 0; i5 < k5.length; i5++) if (k5[i5] !== "default") __createBinding2(result, mod, k5[i5]); - } - __setModuleDefault2(result, mod); - return result; - }; - })(); - var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e5) { - reject(e5); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e5) { - reject(e5); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; - exports2.getDetails = getDetails; - var os_1 = __importDefault2(require("os")); - var exec = __importStar2(require_exec()); - var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { - const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { - silent: true - }); - const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { - silent: true - }); - return { - name: name.trim(), - version: version.trim() - }; - }); - var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { - var _a2, _b, _c5, _d; - const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { - silent: true - }); - const version = (_b = (_a2 = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a2 === void 0 ? void 0 : _a2[1]) !== null && _b !== void 0 ? _b : ""; - const name = (_d = (_c5 = stdout.match(/ProductName:\s*(.+)/)) === null || _c5 === void 0 ? void 0 : _c5[1]) !== null && _d !== void 0 ? _d : ""; - return { - name, - version - }; - }); - var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { - const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { - silent: true - }); - const [name, version] = stdout.trim().split("\n"); - return { - name, - version - }; - }); - exports2.platform = os_1.default.platform(); - exports2.arch = os_1.default.arch(); - exports2.isWindows = exports2.platform === "win32"; - exports2.isMacOS = exports2.platform === "darwin"; - exports2.isLinux = exports2.platform === "linux"; - function getDetails() { - return __awaiter2(this, void 0, void 0, function* () { - return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { - platform: exports2.platform, - arch: exports2.arch, - isWindows: exports2.isWindows, - isMacOS: exports2.isMacOS, - isLinux: exports2.isLinux - }); - }); - } - } -}); - -// node_modules/@actions/core/lib/core.js -var require_core = __commonJS({ - "node_modules/@actions/core/lib/core.js"(exports2) { - "use strict"; - var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o2, m3, k5, k22) { - if (k22 === void 0) k22 = k5; - var desc = Object.getOwnPropertyDescriptor(m3, k5); - if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m3[k5]; - } }; - } - Object.defineProperty(o2, k22, desc); - }) : (function(o2, m3, k5, k22) { - if (k22 === void 0) k22 = k5; - o2[k22] = m3[k5]; - })); - var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o2, v) { - Object.defineProperty(o2, "default", { enumerable: true, value: v }); - }) : function(o2, v) { - o2["default"] = v; - }); - var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys2 = function(o2) { - ownKeys2 = Object.getOwnPropertyNames || function(o3) { - var ar = []; - for (var k5 in o3) if (Object.prototype.hasOwnProperty.call(o3, k5)) ar[ar.length] = k5; - return ar; - }; - return ownKeys2(o2); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k5 = ownKeys2(mod), i5 = 0; i5 < k5.length; i5++) if (k5[i5] !== "default") __createBinding2(result, mod, k5[i5]); - } - __setModuleDefault2(result, mod); - return result; - }; - })(); - var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e5) { - reject(e5); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e5) { - reject(e5); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.ExitCode = void 0; - exports2.exportVariable = exportVariable3; - exports2.setSecret = setSecret2; - exports2.addPath = addPath; - exports2.getInput = getInput3; - exports2.getMultilineInput = getMultilineInput2; - exports2.getBooleanInput = getBooleanInput2; - exports2.setOutput = setOutput2; - exports2.setCommandEcho = setCommandEcho; - exports2.setFailed = setFailed2; - exports2.isDebug = isDebug; - exports2.debug = debug19; - exports2.error = error2; - exports2.warning = warning2; - exports2.notice = notice2; - exports2.info = info5; - exports2.startGroup = startGroup; - exports2.endGroup = endGroup; - exports2.group = group4; - exports2.saveState = saveState; - exports2.getState = getState; - exports2.getIDToken = getIDToken2; - var command_1 = require_command(); - var file_command_1 = require_file_command(); - var utils_1 = require_utils(); - var os3 = __importStar2(require("os")); - var path4 = __importStar2(require("path")); - var oidc_utils_1 = require_oidc_utils(); - var ExitCode; - (function(ExitCode2) { - ExitCode2[ExitCode2["Success"] = 0] = "Success"; - ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; - })(ExitCode || (exports2.ExitCode = ExitCode = {})); - function exportVariable3(name, val) { - const convertedVal = (0, utils_1.toCommandValue)(val); - process.env[name] = convertedVal; - const filePath = process.env["GITHUB_ENV"] || ""; - if (filePath) { - return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); - } - (0, command_1.issueCommand)("set-env", { name }, convertedVal); - } - function setSecret2(secret) { - (0, command_1.issueCommand)("add-mask", {}, secret); - } - function addPath(inputPath) { - const filePath = process.env["GITHUB_PATH"] || ""; - if (filePath) { - (0, file_command_1.issueFileCommand)("PATH", inputPath); - } else { - (0, command_1.issueCommand)("add-path", {}, inputPath); - } - process.env["PATH"] = `${inputPath}${path4.delimiter}${process.env["PATH"]}`; - } - function getInput3(name, options) { - const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; - if (options && options.required && !val) { - throw new Error(`Input required and not supplied: ${name}`); - } - if (options && options.trimWhitespace === false) { - return val; - } - return val.trim(); - } - function getMultilineInput2(name, options) { - const inputs = getInput3(name, options).split("\n").filter((x) => x !== ""); - if (options && options.trimWhitespace === false) { - return inputs; - } - return inputs.map((input) => input.trim()); - } - function getBooleanInput2(name, options) { - const trueValue = ["true", "True", "TRUE"]; - const falseValue = ["false", "False", "FALSE"]; - const val = getInput3(name, options); - if (trueValue.includes(val)) - return true; - if (falseValue.includes(val)) - return false; - throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} -Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); - } - function setOutput2(name, value) { - const filePath = process.env["GITHUB_OUTPUT"] || ""; - if (filePath) { - return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); - } - process.stdout.write(os3.EOL); - (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); - } - function setCommandEcho(enabled) { - (0, command_1.issue)("echo", enabled ? "on" : "off"); - } - function setFailed2(message) { - process.exitCode = ExitCode.Failure; - error2(message); - } - function isDebug() { - return process.env["RUNNER_DEBUG"] === "1"; - } - function debug19(message) { - (0, command_1.issueCommand)("debug", {}, message); - } - function error2(message, properties = {}) { - (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); - } - function warning2(message, properties = {}) { - (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); - } - function notice2(message, properties = {}) { - (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); - } - function info5(message) { - process.stdout.write(message + os3.EOL); - } - function startGroup(name) { - (0, command_1.issue)("group", name); - } - function endGroup() { - (0, command_1.issue)("endgroup"); - } - function group4(name, fn) { - return __awaiter2(this, void 0, void 0, function* () { - startGroup(name); - let result; - try { - result = yield fn(); - } finally { - endGroup(); - } - return result; - }); - } - function saveState(name, value) { - const filePath = process.env["GITHUB_STATE"] || ""; - if (filePath) { - return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); - } - (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); - } - function getState(name) { - return process.env[`STATE_${name}`] || ""; - } - function getIDToken2(aud) { - return __awaiter2(this, void 0, void 0, function* () { - return yield oidc_utils_1.OidcClient.getIDToken(aud); - }); - } - var summary_1 = require_summary(); - Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { - return summary_1.summary; - } }); - var summary_2 = require_summary(); - Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { - return summary_2.markdownSummary; - } }); - var path_utils_1 = require_path_utils(); - Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { - return path_utils_1.toPosixPath; - } }); - Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { - return path_utils_1.toWin32Path; - } }); - Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { - return path_utils_1.toPlatformPath; - } }); - exports2.platform = __importStar2(require_platform()); - } -}); - // node_modules/@aws-sdk/core/dist-es/submodules/client/emitWarningIfUnsupportedVersion.js var state, emitWarningIfUnsupportedVersion; var init_emitWarningIfUnsupportedVersion = __esm({ @@ -21749,7 +18798,7 @@ var init_MiddlewareStack = __esm({ }); return expandedMiddlewareList; }; - const getMiddlewareList = (debug19 = false) => { + const getMiddlewareList = (debug17 = false) => { const normalizedAbsoluteEntries = []; const normalizedRelativeEntries = []; const normalizedEntriesNameMap = {}; @@ -21779,7 +18828,7 @@ var init_MiddlewareStack = __esm({ if (entry.toMiddleware) { const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware]; if (toMiddleware === void 0) { - if (debug19) { + if (debug17) { return; } throw new Error(`${entry.toMiddleware} is not found when adding ${getMiddlewareNameWithAliases(entry.name, entry.aliases)} middleware ${entry.relation} ${entry.toMiddleware}`); @@ -22000,7 +19049,7 @@ var require_dist_cjs = __commonJS({ FieldPosition2[FieldPosition2["HEADER"] = 0] = "HEADER"; FieldPosition2[FieldPosition2["TRAILER"] = 1] = "TRAILER"; })(exports2.FieldPosition || (exports2.FieldPosition = {})); - var SMITHY_CONTEXT_KEY4 = "__smithy_context"; + var SMITHY_CONTEXT_KEY3 = "__smithy_context"; exports2.IniSectionType = void 0; (function(IniSectionType4) { IniSectionType4["PROFILE"] = "profile"; @@ -22013,25 +19062,142 @@ var require_dist_cjs = __commonJS({ RequestHandlerProtocol["HTTP_1_0"] = "http/1.0"; RequestHandlerProtocol["TDS_8_0"] = "tds/8.0"; })(exports2.RequestHandlerProtocol || (exports2.RequestHandlerProtocol = {})); - exports2.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY4; + exports2.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY3; exports2.getDefaultClientConfiguration = getDefaultClientConfiguration2; exports2.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig2; } }); -// node_modules/@smithy/core/dist-es/submodules/client/util-middleware/getSmithyContext.js +// node_modules/@smithy/core/dist-es/submodules/transport/getSmithyContext.js var import_types, getSmithyContext; var init_getSmithyContext = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/util-middleware/getSmithyContext.js"() { + "node_modules/@smithy/core/dist-es/submodules/transport/getSmithyContext.js"() { import_types = __toESM(require_dist_cjs()); getSmithyContext = (context) => context[import_types.SMITHY_CONTEXT_KEY] || (context[import_types.SMITHY_CONTEXT_KEY] = {}); } }); -// node_modules/@smithy/core/dist-es/submodules/client/util-middleware/normalizeProvider.js +// node_modules/@smithy/core/dist-es/submodules/transport/httpRequest.js +function cloneQuery(query) { + return Object.keys(query).reduce((carry, paramName) => { + const param = query[paramName]; + return { + ...carry, + [paramName]: Array.isArray(param) ? [...param] : param + }; + }, {}); +} +var HttpRequest; +var init_httpRequest = __esm({ + "node_modules/@smithy/core/dist-es/submodules/transport/httpRequest.js"() { + HttpRequest = class _HttpRequest { + method; + protocol; + hostname; + port; + path; + query; + headers; + username; + password; + fragment; + body; + constructor(options) { + this.method = options.method || "GET"; + this.hostname = options.hostname || "localhost"; + this.port = options.port; + this.query = options.query || {}; + this.headers = options.headers || {}; + this.body = options.body; + this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:"; + this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/"; + this.username = options.username; + this.password = options.password; + this.fragment = options.fragment; + } + static clone(request) { + const cloned = new _HttpRequest({ + ...request, + headers: { ...request.headers } + }); + if (cloned.query) { + cloned.query = cloneQuery(cloned.query); + } + return cloned; + } + static isInstance(request) { + if (!request) { + return false; + } + const req = request; + return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object"; + } + clone() { + return _HttpRequest.clone(this); + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/transport/httpResponse.js +var HttpResponse; +var init_httpResponse = __esm({ + "node_modules/@smithy/core/dist-es/submodules/transport/httpResponse.js"() { + HttpResponse = class { + statusCode; + reason; + headers; + body; + constructor(options) { + this.statusCode = options.statusCode; + this.reason = options.reason; + this.headers = options.headers || {}; + this.body = options.body; + } + static isInstance(response) { + if (!response) + return false; + const resp = response; + return typeof resp.statusCode === "number" && typeof resp.headers === "object"; + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/transport/isValidHostLabel.js +var VALID_HOST_LABEL_REGEX, isValidHostLabel; +var init_isValidHostLabel = __esm({ + "node_modules/@smithy/core/dist-es/submodules/transport/isValidHostLabel.js"() { + VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`); + isValidHostLabel = (value, allowSubDomains = false) => { + if (!allowSubDomains) { + return VALID_HOST_LABEL_REGEX.test(value); + } + const labels = value.split("."); + for (const label of labels) { + if (!isValidHostLabel(label)) { + return false; + } + } + return true; + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/transport/isValidHostname.js +function isValidHostname(hostname) { + const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/; + return hostPattern.test(hostname); +} +var init_isValidHostname = __esm({ + "node_modules/@smithy/core/dist-es/submodules/transport/isValidHostname.js"() { + } +}); + +// node_modules/@smithy/core/dist-es/submodules/transport/normalizeProvider.js var normalizeProvider; var init_normalizeProvider = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/util-middleware/normalizeProvider.js"() { + "node_modules/@smithy/core/dist-es/submodules/transport/normalizeProvider.js"() { normalizeProvider = (input) => { if (typeof input === "function") return input; @@ -22041,6 +19207,97 @@ var init_normalizeProvider = __esm({ } }); +// node_modules/@smithy/core/dist-es/submodules/transport/parseQueryString.js +function parseQueryString(querystring) { + const query = {}; + querystring = querystring.replace(/^\?/, ""); + if (querystring) { + for (const pair of querystring.split("&")) { + let [key, value = null] = pair.split("="); + key = decodeURIComponent(key); + if (value) { + value = decodeURIComponent(value); + } + if (!(key in query)) { + query[key] = value; + } else if (Array.isArray(query[key])) { + query[key].push(value); + } else { + query[key] = [query[key], value]; + } + } + } + return query; +} +var init_parseQueryString = __esm({ + "node_modules/@smithy/core/dist-es/submodules/transport/parseQueryString.js"() { + } +}); + +// node_modules/@smithy/core/dist-es/submodules/transport/parseUrl.js +var parseUrl; +var init_parseUrl = __esm({ + "node_modules/@smithy/core/dist-es/submodules/transport/parseUrl.js"() { + init_parseQueryString(); + parseUrl = (url) => { + if (typeof url === "string") { + return parseUrl(new URL(url)); + } + const { hostname, pathname, port, protocol, search } = url; + let query; + if (search) { + query = parseQueryString(search); + } + return { + hostname, + port: port ? parseInt(port) : void 0, + protocol, + path: pathname, + query + }; + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/transport/toEndpointV1.js +var toEndpointV1; +var init_toEndpointV1 = __esm({ + "node_modules/@smithy/core/dist-es/submodules/transport/toEndpointV1.js"() { + init_parseUrl(); + toEndpointV1 = (endpoint) => { + if (typeof endpoint === "object") { + if ("url" in endpoint) { + const v1Endpoint = parseUrl(endpoint.url); + if (endpoint.headers) { + v1Endpoint.headers = {}; + for (const name in endpoint.headers) { + v1Endpoint.headers[name.toLowerCase()] = endpoint.headers[name].join(", "); + } + } + return v1Endpoint; + } + return endpoint; + } + return parseUrl(endpoint); + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/transport/index.js +var init_transport = __esm({ + "node_modules/@smithy/core/dist-es/submodules/transport/index.js"() { + init_getSmithyContext(); + init_httpRequest(); + init_httpResponse(); + init_isValidHostLabel(); + init_isValidHostname(); + init_normalizeProvider(); + init_parseQueryString(); + init_parseUrl(); + init_toEndpointV1(); + } +}); + // node_modules/@smithy/core/dist-es/submodules/client/invalid-dependency/invalidFunction.js var invalidFunction; var init_invalidFunction = __esm({ @@ -22360,6 +19617,1534 @@ var init_deref = __esm({ } }); +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/operation.js +var operation; +var init_operation = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/operation.js"() { + operation = (namespace, name, traits, input, output) => ({ + name, + namespace, + traits, + input, + output + }); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js +var schemaDeserializationMiddleware, findHeader; +var init_schemaDeserializationMiddleware = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js"() { + init_transport(); + init_operation(); + schemaDeserializationMiddleware = (config) => (next, context) => async (args) => { + const { response } = await next(args); + const { operationSchema } = getSmithyContext(context); + const [, ns, n3, t, i5, o2] = operationSchema ?? []; + try { + const parsed = await config.protocol.deserializeResponse(operation(ns, n3, t, i5, o2), { + ...config, + ...context + }, response); + return { + response, + output: parsed + }; + } catch (error3) { + Object.defineProperty(error3, "$response", { + value: response, + enumerable: false, + writable: false, + configurable: false + }); + if (!("$metadata" in error3)) { + const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`; + try { + error3.message += "\n " + hint; + } catch (e5) { + if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") { + console.warn(hint); + } else { + context.logger?.warn?.(hint); + } + } + if (typeof error3.$responseBodyText !== "undefined") { + if (error3.$response) { + error3.$response.body = error3.$responseBodyText; + } + } + try { + if (HttpResponse.isInstance(response)) { + const { headers = {}, statusCode } = response; + const headerEntries = Object.entries(headers); + error3.$metadata = { + httpStatusCode: statusCode, + requestId: findHeader(/^x-[\w-]+-request-?id$/, headerEntries), + extendedRequestId: findHeader(/^x-[\w-]+-id-2$/, headerEntries), + cfId: findHeader(/^x-[\w-]+-cf-id$/, headerEntries) + }; + } + } catch (e5) { + } + } + throw error3; + } + }; + findHeader = (pattern, headers) => { + return (headers.find(([k5]) => { + return k5.match(pattern); + }) || [void 0, void 0])[1]; + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js +var schemaSerializationMiddleware; +var init_schemaSerializationMiddleware = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js"() { + init_transport(); + init_operation(); + schemaSerializationMiddleware = (config) => (next, context) => async (args) => { + const { operationSchema } = getSmithyContext(context); + const [, ns, n3, t, i5, o2] = operationSchema ?? []; + const endpoint = context.endpointV2 ? async () => toEndpointV1(context.endpointV2) : config.endpoint; + const request = await config.protocol.serializeRequest(operation(ns, n3, t, i5, o2), args.input, { + ...config, + ...context, + endpoint + }); + return next({ + ...args, + request + }); + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js +function getSchemaSerdePlugin(config) { + return { + applyToStack: (commandStack) => { + commandStack.add(schemaSerializationMiddleware(config), serializerMiddlewareOption); + commandStack.add(schemaDeserializationMiddleware(config), deserializerMiddlewareOption); + config.protocol.setSerdeContext(config); + } + }; +} +var deserializerMiddlewareOption, serializerMiddlewareOption; +var init_getSchemaSerdePlugin = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js"() { + init_schemaDeserializationMiddleware(); + init_schemaSerializationMiddleware(); + deserializerMiddlewareOption = { + name: "deserializerMiddleware", + step: "deserialize", + tags: ["DESERIALIZER"], + override: true + }; + serializerMiddlewareOption = { + name: "serializerMiddleware", + step: "serialize", + tags: ["SERIALIZER"], + override: true + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js +var Schema; +var init_Schema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js"() { + Schema = class { + name; + namespace; + traits; + static assign(instance, values) { + const schema = Object.assign(instance, values); + return schema; + } + static [Symbol.hasInstance](lhs) { + const isPrototype = this.prototype.isPrototypeOf(lhs); + if (!isPrototype && typeof lhs === "object" && lhs !== null) { + const list2 = lhs; + return list2.symbol === this.symbol; + } + return isPrototype; + } + getName() { + return this.namespace + "#" + this.name; + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js +var ListSchema, list; +var init_ListSchema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js"() { + init_Schema(); + ListSchema = class _ListSchema extends Schema { + static symbol = /* @__PURE__ */ Symbol.for("@smithy/lis"); + name; + traits; + valueSchema; + symbol = _ListSchema.symbol; + }; + list = (namespace, name, traits, valueSchema) => Schema.assign(new ListSchema(), { + name, + namespace, + traits, + valueSchema + }); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js +var MapSchema, map; +var init_MapSchema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js"() { + init_Schema(); + MapSchema = class _MapSchema extends Schema { + static symbol = /* @__PURE__ */ Symbol.for("@smithy/map"); + name; + traits; + keySchema; + valueSchema; + symbol = _MapSchema.symbol; + }; + map = (namespace, name, traits, keySchema, valueSchema) => Schema.assign(new MapSchema(), { + name, + namespace, + traits, + keySchema, + valueSchema + }); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js +var OperationSchema, op; +var init_OperationSchema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js"() { + init_Schema(); + OperationSchema = class _OperationSchema extends Schema { + static symbol = /* @__PURE__ */ Symbol.for("@smithy/ope"); + name; + traits; + input; + output; + symbol = _OperationSchema.symbol; + }; + op = (namespace, name, traits, input, output) => Schema.assign(new OperationSchema(), { + name, + namespace, + traits, + input, + output + }); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js +var StructureSchema, struct; +var init_StructureSchema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js"() { + init_Schema(); + StructureSchema = class _StructureSchema extends Schema { + static symbol = /* @__PURE__ */ Symbol.for("@smithy/str"); + name; + traits; + memberNames; + memberList; + symbol = _StructureSchema.symbol; + }; + struct = (namespace, name, traits, memberNames, memberList) => Schema.assign(new StructureSchema(), { + name, + namespace, + traits, + memberNames, + memberList + }); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js +var ErrorSchema, error2; +var init_ErrorSchema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js"() { + init_Schema(); + init_StructureSchema(); + ErrorSchema = class _ErrorSchema extends StructureSchema { + static symbol = /* @__PURE__ */ Symbol.for("@smithy/err"); + ctor; + symbol = _ErrorSchema.symbol; + }; + error2 = (namespace, name, traits, memberNames, memberList, ctor) => Schema.assign(new ErrorSchema(), { + name, + namespace, + traits, + memberNames, + memberList, + ctor: null + }); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js +function translateTraits(indicator) { + if (typeof indicator === "object") { + return indicator; + } + indicator = indicator | 0; + if (traitsCache[indicator]) { + return traitsCache[indicator]; + } + const traits = {}; + let i5 = 0; + for (const trait of [ + "httpLabel", + "idempotent", + "idempotencyToken", + "sensitive", + "httpPayload", + "httpResponseCode", + "httpQueryParams" + ]) { + if ((indicator >> i5++ & 1) === 1) { + traits[trait] = 1; + } + } + return traitsCache[indicator] = traits; +} +var traitsCache; +var init_translateTraits = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js"() { + traitsCache = []; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js +function member(memberSchema, memberName) { + if (memberSchema instanceof NormalizedSchema) { + return Object.assign(memberSchema, { + memberName, + _isMemberSchema: true + }); + } + const internalCtorAccess = NormalizedSchema; + return new internalCtorAccess(memberSchema, memberName); +} +var anno, simpleSchemaCacheN, simpleSchemaCacheS, NormalizedSchema, isMemberSchema, isStaticSchema; +var init_NormalizedSchema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js"() { + init_deref(); + init_translateTraits(); + anno = { + it: /* @__PURE__ */ Symbol.for("@smithy/nor-struct-it"), + ns: /* @__PURE__ */ Symbol.for("@smithy/ns") + }; + simpleSchemaCacheN = []; + simpleSchemaCacheS = {}; + NormalizedSchema = class _NormalizedSchema { + ref; + memberName; + static symbol = /* @__PURE__ */ Symbol.for("@smithy/nor"); + symbol = _NormalizedSchema.symbol; + name; + schema; + _isMemberSchema; + traits; + memberTraits; + normalizedTraits; + constructor(ref, memberName) { + this.ref = ref; + this.memberName = memberName; + const traitStack = []; + let _ref = ref; + let schema = ref; + this._isMemberSchema = false; + while (isMemberSchema(_ref)) { + traitStack.push(_ref[1]); + _ref = _ref[0]; + schema = deref(_ref); + this._isMemberSchema = true; + } + if (traitStack.length > 0) { + this.memberTraits = {}; + for (let i5 = traitStack.length - 1; i5 >= 0; --i5) { + const traitSet = traitStack[i5]; + Object.assign(this.memberTraits, translateTraits(traitSet)); + } + } else { + this.memberTraits = 0; + } + if (schema instanceof _NormalizedSchema) { + const computedMemberTraits = this.memberTraits; + Object.assign(this, schema); + this.memberTraits = Object.assign({}, computedMemberTraits, schema.getMemberTraits(), this.getMemberTraits()); + this.normalizedTraits = void 0; + this.memberName = memberName ?? schema.memberName; + return; + } + this.schema = deref(schema); + if (isStaticSchema(this.schema)) { + this.name = `${this.schema[1]}#${this.schema[2]}`; + this.traits = this.schema[3]; + } else { + this.name = this.memberName ?? String(schema); + this.traits = 0; + } + if (this._isMemberSchema && !memberName) { + throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(true)} missing member name.`); + } + } + static [Symbol.hasInstance](lhs) { + const isPrototype = this.prototype.isPrototypeOf(lhs); + if (!isPrototype && typeof lhs === "object" && lhs !== null) { + const ns = lhs; + return ns.symbol === this.symbol; + } + return isPrototype; + } + static of(ref) { + const keyAble = typeof ref === "function" || typeof ref === "object" && ref !== null; + if (typeof ref === "number") { + if (simpleSchemaCacheN[ref]) { + return simpleSchemaCacheN[ref]; + } + } else if (typeof ref === "string") { + if (simpleSchemaCacheS[ref]) { + return simpleSchemaCacheS[ref]; + } + } else if (keyAble) { + if (ref[anno.ns]) { + return ref[anno.ns]; + } + } + const sc = deref(ref); + if (sc instanceof _NormalizedSchema) { + return sc; + } + if (isMemberSchema(sc)) { + const [ns2, traits] = sc; + if (ns2 instanceof _NormalizedSchema) { + Object.assign(ns2.getMergedTraits(), translateTraits(traits)); + return ns2; + } + throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(ref, null, 2)}.`); + } + const ns = new _NormalizedSchema(sc); + if (keyAble) { + return ref[anno.ns] = ns; + } + if (typeof sc === "string") { + return simpleSchemaCacheS[sc] = ns; + } + if (typeof sc === "number") { + return simpleSchemaCacheN[sc] = ns; + } + return ns; + } + getSchema() { + const sc = this.schema; + if (Array.isArray(sc) && sc[0] === 0) { + return sc[4]; + } + return sc; + } + getName(withNamespace = false) { + const { name } = this; + const short = !withNamespace && name && name.includes("#"); + return short ? name.split("#")[1] : name || void 0; + } + getMemberName() { + return this.memberName; + } + isMemberSchema() { + return this._isMemberSchema; + } + isListSchema() { + const sc = this.getSchema(); + return typeof sc === "number" ? sc >= 64 && sc < 128 : sc[0] === 1; + } + isMapSchema() { + const sc = this.getSchema(); + return typeof sc === "number" ? sc >= 128 && sc <= 255 : sc[0] === 2; + } + isStructSchema() { + const sc = this.getSchema(); + if (typeof sc !== "object") { + return false; + } + const id = sc[0]; + return id === 3 || id === -3 || id === 4; + } + isUnionSchema() { + const sc = this.getSchema(); + if (typeof sc !== "object") { + return false; + } + return sc[0] === 4; + } + isBlobSchema() { + const sc = this.getSchema(); + return sc === 21 || sc === 42; + } + isTimestampSchema() { + const sc = this.getSchema(); + return typeof sc === "number" && sc >= 4 && sc <= 7; + } + isUnitSchema() { + return this.getSchema() === "unit"; + } + isDocumentSchema() { + return this.getSchema() === 15; + } + isStringSchema() { + return this.getSchema() === 0; + } + isBooleanSchema() { + return this.getSchema() === 2; + } + isNumericSchema() { + return this.getSchema() === 1; + } + isBigIntegerSchema() { + return this.getSchema() === 17; + } + isBigDecimalSchema() { + return this.getSchema() === 19; + } + isStreaming() { + const { streaming } = this.getMergedTraits(); + return !!streaming || this.getSchema() === 42; + } + isIdempotencyToken() { + return !!this.getMergedTraits().idempotencyToken; + } + getMergedTraits() { + return this.normalizedTraits ?? (this.normalizedTraits = { + ...this.getOwnTraits(), + ...this.getMemberTraits() + }); + } + getMemberTraits() { + return translateTraits(this.memberTraits); + } + getOwnTraits() { + return translateTraits(this.traits); + } + getKeySchema() { + const [isDoc, isMap] = [this.isDocumentSchema(), this.isMapSchema()]; + if (!isDoc && !isMap) { + throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(true)}`); + } + const schema = this.getSchema(); + const memberSchema = isDoc ? 15 : schema[4] ?? 0; + return member([memberSchema, 0], "key"); + } + getValueSchema() { + const sc = this.getSchema(); + const [isDoc, isMap, isList] = [this.isDocumentSchema(), this.isMapSchema(), this.isListSchema()]; + const memberSchema = typeof sc === "number" ? 63 & sc : sc && typeof sc === "object" && (isMap || isList) ? sc[3 + sc[0]] : isDoc ? 15 : void 0; + if (memberSchema != null) { + return member([memberSchema, 0], isMap ? "value" : "member"); + } + throw new Error(`@smithy/core/schema - ${this.getName(true)} has no value member.`); + } + getMemberSchema(memberName) { + const struct2 = this.getSchema(); + if (this.isStructSchema() && struct2[4].includes(memberName)) { + const i5 = struct2[4].indexOf(memberName); + const memberSchema = struct2[5][i5]; + return member(isMemberSchema(memberSchema) ? memberSchema : [memberSchema, 0], memberName); + } + if (this.isDocumentSchema()) { + return member([15, 0], memberName); + } + throw new Error(`@smithy/core/schema - ${this.getName(true)} has no member=${memberName}.`); + } + getMemberSchemas() { + const buffer = {}; + try { + for (const [k5, v] of this.structIterator()) { + buffer[k5] = v; + } + } catch (ignored) { + } + return buffer; + } + getEventStreamMember() { + if (this.isStructSchema()) { + for (const [memberName, memberSchema] of this.structIterator()) { + if (memberSchema.isStreaming() && memberSchema.isStructSchema()) { + return memberName; + } + } + } + return ""; + } + *structIterator() { + if (this.isUnitSchema()) { + return; + } + if (!this.isStructSchema()) { + throw new Error("@smithy/core/schema - cannot iterate non-struct schema."); + } + const struct2 = this.getSchema(); + const z = struct2[4].length; + let it = struct2[anno.it]; + if (it && z === it.length) { + yield* it; + return; + } + it = Array(z); + for (let i5 = 0; i5 < z; ++i5) { + const k5 = struct2[4][i5]; + const v = member([struct2[5][i5], 0], k5); + yield it[i5] = [k5, v]; + } + struct2[anno.it] = it; + } + }; + isMemberSchema = (sc) => Array.isArray(sc) && sc.length === 2; + isStaticSchema = (sc) => Array.isArray(sc) && sc.length >= 5; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js +var SimpleSchema, sim, simAdapter; +var init_SimpleSchema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js"() { + init_Schema(); + SimpleSchema = class _SimpleSchema extends Schema { + static symbol = /* @__PURE__ */ Symbol.for("@smithy/sim"); + name; + schemaRef; + traits; + symbol = _SimpleSchema.symbol; + }; + sim = (namespace, name, schemaRef, traits) => Schema.assign(new SimpleSchema(), { + name, + namespace, + traits, + schemaRef + }); + simAdapter = (namespace, name, traits, schemaRef) => Schema.assign(new SimpleSchema(), { + name, + namespace, + traits, + schemaRef + }); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/sentinels.js +var SCHEMA; +var init_sentinels = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/sentinels.js"() { + SCHEMA = { + BLOB: 21, + STREAMING_BLOB: 42, + BOOLEAN: 2, + STRING: 0, + NUMERIC: 1, + BIG_INTEGER: 17, + BIG_DECIMAL: 19, + DOCUMENT: 15, + TIMESTAMP_DEFAULT: 4, + TIMESTAMP_DATE_TIME: 5, + TIMESTAMP_HTTP_DATE: 6, + TIMESTAMP_EPOCH_SECONDS: 7, + LIST_MODIFIER: 64, + MAP_MODIFIER: 128 + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js +var TypeRegistry; +var init_TypeRegistry = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js"() { + TypeRegistry = class _TypeRegistry { + namespace; + schemas; + exceptions; + static registries = /* @__PURE__ */ new Map(); + constructor(namespace, schemas = /* @__PURE__ */ new Map(), exceptions = /* @__PURE__ */ new Map()) { + this.namespace = namespace; + this.schemas = schemas; + this.exceptions = exceptions; + } + static for(namespace) { + if (!_TypeRegistry.registries.has(namespace)) { + _TypeRegistry.registries.set(namespace, new _TypeRegistry(namespace)); + } + return _TypeRegistry.registries.get(namespace); + } + copyFrom(other) { + const { schemas, exceptions } = this; + for (const [k5, v] of other.schemas) { + if (!schemas.has(k5)) { + schemas.set(k5, v); + } + } + for (const [k5, v] of other.exceptions) { + if (!exceptions.has(k5)) { + exceptions.set(k5, v); + } + } + } + register(shapeId, schema) { + const qualifiedName = this.normalizeShapeId(shapeId); + for (const r5 of [this, _TypeRegistry.for(qualifiedName.split("#")[0])]) { + r5.schemas.set(qualifiedName, schema); + } + } + getSchema(shapeId) { + const id = this.normalizeShapeId(shapeId); + if (!this.schemas.has(id)) { + if (!shapeId.includes("#")) { + const suffix = "#" + shapeId; + const candidates = []; + for (const [shapeId2, schema] of this.schemas.entries()) { + if (shapeId2.endsWith(suffix)) { + candidates.push(schema); + } + } + if (candidates.length === 1) { + return candidates[0]; + } + } + throw new Error(`@smithy/core/schema - schema not found for ${id}`); + } + return this.schemas.get(id); + } + registerError(es, ctor) { + const $error = es; + const ns = $error[1]; + for (const r5 of [this, _TypeRegistry.for(ns)]) { + r5.schemas.set(ns + "#" + $error[2], $error); + r5.exceptions.set($error, ctor); + } + } + getErrorCtor(es) { + const $error = es; + if (this.exceptions.has($error)) { + return this.exceptions.get($error); + } + const registry = _TypeRegistry.for($error[1]); + return registry.exceptions.get($error); + } + getBaseException() { + for (const exceptionKey of this.exceptions.keys()) { + if (Array.isArray(exceptionKey)) { + const [, ns, name] = exceptionKey; + const id = ns + "#" + name; + if (id.startsWith("smithy.ts.sdk.synthetic.") && id.endsWith("ServiceException")) { + return exceptionKey; + } + } + } + return void 0; + } + find(predicate) { + for (const schema of this.schemas.values()) { + if (predicate(schema)) { + return schema; + } + } + return void 0; + } + clear() { + this.schemas.clear(); + this.exceptions.clear(); + } + normalizeShapeId(shapeId) { + if (shapeId.includes("#")) { + return shapeId; + } + return this.namespace + "#" + shapeId; + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/index.js +var schema_exports = {}; +__export(schema_exports, { + ErrorSchema: () => ErrorSchema, + ListSchema: () => ListSchema, + MapSchema: () => MapSchema, + NormalizedSchema: () => NormalizedSchema, + OperationSchema: () => OperationSchema, + SCHEMA: () => SCHEMA, + Schema: () => Schema, + SimpleSchema: () => SimpleSchema, + StructureSchema: () => StructureSchema, + TypeRegistry: () => TypeRegistry, + deref: () => deref, + deserializerMiddlewareOption: () => deserializerMiddlewareOption, + error: () => error2, + getSchemaSerdePlugin: () => getSchemaSerdePlugin, + isStaticSchema: () => isStaticSchema, + list: () => list, + map: () => map, + op: () => op, + operation: () => operation, + serializerMiddlewareOption: () => serializerMiddlewareOption, + sim: () => sim, + simAdapter: () => simAdapter, + simpleSchemaCacheN: () => simpleSchemaCacheN, + simpleSchemaCacheS: () => simpleSchemaCacheS, + struct: () => struct, + traitsCache: () => traitsCache, + translateTraits: () => translateTraits +}); +var init_schema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/index.js"() { + init_deref(); + init_getSchemaSerdePlugin(); + init_ListSchema(); + init_MapSchema(); + init_OperationSchema(); + init_operation(); + init_ErrorSchema(); + init_NormalizedSchema(); + init_Schema(); + init_SimpleSchema(); + init_StructureSchema(); + init_sentinels(); + init_translateTraits(); + init_TypeRegistry(); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/schemaLogFilter.js +function schemaLogFilter(schema, data3) { + if (data3 == null) { + return data3; + } + const ns = NormalizedSchema.of(schema); + if (ns.getMergedTraits().sensitive) { + return SENSITIVE_STRING; + } + if (ns.isListSchema()) { + const isSensitive = !!ns.getValueSchema().getMergedTraits().sensitive; + if (isSensitive) { + return SENSITIVE_STRING; + } + } else if (ns.isMapSchema()) { + const isSensitive = !!ns.getKeySchema().getMergedTraits().sensitive || !!ns.getValueSchema().getMergedTraits().sensitive; + if (isSensitive) { + return SENSITIVE_STRING; + } + } else if (ns.isStructSchema() && typeof data3 === "object") { + const object = data3; + const newObject = {}; + for (const [member2, memberNs] of ns.structIterator()) { + if (object[member2] != null) { + newObject[member2] = schemaLogFilter(memberNs, object[member2]); + } + } + return newObject; + } + return data3; +} +var SENSITIVE_STRING; +var init_schemaLogFilter = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/schemaLogFilter.js"() { + init_schema(); + SENSITIVE_STRING = "***SensitiveInformation***"; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/command.js +var import_types2, Command2, ClassBuilder; +var init_command = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/command.js"() { + import_types2 = __toESM(require_dist_cjs()); + init_MiddlewareStack(); + init_schemaLogFilter(); + Command2 = class { + middlewareStack = constructStack(); + schema; + static classBuilder() { + return new ClassBuilder(); + } + resolveMiddlewareWithContext(clientStack, configuration, options, { middlewareFn, clientName, commandName, inputFilterSensitiveLog, outputFilterSensitiveLog, smithyContext, additionalContext, CommandCtor }) { + for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) { + this.middlewareStack.use(mw); + } + const stack = clientStack.concat(this.middlewareStack); + const { logger: logger2 } = configuration; + const handlerExecutionContext = { + logger: logger2, + clientName, + commandName, + inputFilterSensitiveLog, + outputFilterSensitiveLog, + [import_types2.SMITHY_CONTEXT_KEY]: { + commandInstance: this, + ...smithyContext + }, + ...additionalContext + }; + const { requestHandler } = configuration; + let requestOptions = options ?? {}; + if (smithyContext.eventStream) { + requestOptions = { + isEventStream: true, + ...requestOptions + }; + } + return stack.resolve((request) => requestHandler.handle(request.request, requestOptions), handlerExecutionContext); + } + }; + ClassBuilder = class { + _init = () => { + }; + _ep = {}; + _middlewareFn = () => []; + _commandName = ""; + _clientName = ""; + _additionalContext = {}; + _smithyContext = {}; + _inputFilterSensitiveLog = void 0; + _outputFilterSensitiveLog = void 0; + _serializer = null; + _deserializer = null; + _operationSchema; + init(cb) { + this._init = cb; + } + ep(endpointParameterInstructions) { + this._ep = endpointParameterInstructions; + return this; + } + m(middlewareSupplier) { + this._middlewareFn = middlewareSupplier; + return this; + } + s(service, operation2, smithyContext = {}) { + this._smithyContext = { + service, + operation: operation2, + ...smithyContext + }; + return this; + } + c(additionalContext = {}) { + this._additionalContext = additionalContext; + return this; + } + n(clientName, commandName) { + this._clientName = clientName; + this._commandName = commandName; + return this; + } + f(inputFilter = (_) => _, outputFilter = (_) => _) { + this._inputFilterSensitiveLog = inputFilter; + this._outputFilterSensitiveLog = outputFilter; + return this; + } + ser(serializer) { + this._serializer = serializer; + return this; + } + de(deserializer) { + this._deserializer = deserializer; + return this; + } + sc(operation2) { + this._operationSchema = operation2; + this._smithyContext.operationSchema = operation2; + return this; + } + build() { + const closure = this; + let CommandRef; + return CommandRef = class extends Command2 { + input; + static getEndpointParameterInstructions() { + return closure._ep; + } + constructor(...[input]) { + super(); + this.input = input ?? {}; + closure._init(this); + this.schema = closure._operationSchema; + } + resolveMiddleware(stack, configuration, options) { + const op2 = closure._operationSchema; + const input = op2?.[4] ?? op2?.input; + const output = op2?.[5] ?? op2?.output; + return this.resolveMiddlewareWithContext(stack, configuration, options, { + CommandCtor: CommandRef, + middlewareFn: closure._middlewareFn, + clientName: closure._clientName, + commandName: closure._commandName, + inputFilterSensitiveLog: closure._inputFilterSensitiveLog ?? (op2 ? schemaLogFilter.bind(null, input) : (_) => _), + outputFilterSensitiveLog: closure._outputFilterSensitiveLog ?? (op2 ? schemaLogFilter.bind(null, output) : (_) => _), + smithyContext: closure._smithyContext, + additionalContext: closure._additionalContext + }); + } + serialize = closure._serializer; + deserialize = closure._deserializer; + }; + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/constants.js +var SENSITIVE_STRING2; +var init_constants = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/constants.js"() { + SENSITIVE_STRING2 = "***SensitiveInformation***"; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/create-aggregated-client.js +var createAggregatedClient; +var init_create_aggregated_client = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/create-aggregated-client.js"() { + createAggregatedClient = (commands5, Client3, options) => { + for (const [command, CommandCtor] of Object.entries(commands5)) { + const methodImpl = async function(args, optionsOrCb, cb) { + const command2 = new CommandCtor(args); + if (typeof optionsOrCb === "function") { + this.send(command2, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expected http options but got ${typeof optionsOrCb}`); + this.send(command2, optionsOrCb || {}, cb); + } else { + return this.send(command2, optionsOrCb); + } + }; + const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, ""); + Client3.prototype[methodName] = methodImpl; + } + const { paginators = {}, waiters = {} } = options ?? {}; + for (const [paginatorName, paginatorFn] of Object.entries(paginators)) { + if (Client3.prototype[paginatorName] === void 0) { + Client3.prototype[paginatorName] = function(commandInput = {}, paginationConfiguration, ...rest) { + return paginatorFn({ + ...paginationConfiguration, + client: this + }, commandInput, ...rest); + }; + } + } + for (const [waiterName, waiterFn] of Object.entries(waiters)) { + if (Client3.prototype[waiterName] === void 0) { + Client3.prototype[waiterName] = async function(commandInput = {}, waiterConfiguration, ...rest) { + let config = waiterConfiguration; + if (typeof waiterConfiguration === "number") { + config = { + maxWaitTime: waiterConfiguration + }; + } + return waiterFn({ + ...config, + client: this + }, commandInput, ...rest); + }; + } + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/exceptions.js +var ServiceException, decorateServiceException; +var init_exceptions = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/exceptions.js"() { + ServiceException = class _ServiceException extends Error { + $fault; + $response; + $retryable; + $metadata; + constructor(options) { + super(options.message); + Object.setPrototypeOf(this, Object.getPrototypeOf(this).constructor.prototype); + this.name = options.name; + this.$fault = options.$fault; + this.$metadata = options.$metadata; + } + static isInstance(value) { + if (!value) + return false; + const candidate = value; + return _ServiceException.prototype.isPrototypeOf(candidate) || Boolean(candidate.$fault) && Boolean(candidate.$metadata) && (candidate.$fault === "client" || candidate.$fault === "server"); + } + static [Symbol.hasInstance](instance) { + if (!instance) + return false; + const candidate = instance; + if (this === _ServiceException) { + return _ServiceException.isInstance(instance); + } + if (_ServiceException.isInstance(instance)) { + if (candidate.name && this.name) { + return this.prototype.isPrototypeOf(instance) || candidate.name === this.name; + } + return this.prototype.isPrototypeOf(instance); + } + return false; + } + }; + decorateServiceException = (exception, additions = {}) => { + Object.entries(additions).filter(([, v]) => v !== void 0).forEach(([k5, v]) => { + if (exception[k5] == void 0 || exception[k5] === "") { + exception[k5] = v; + } + }); + const message = exception.message || exception.Message || "UnknownError"; + exception.message = message; + delete exception.Message; + return exception; + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/default-error-handler.js +var throwDefaultError, withBaseException, deserializeMetadata; +var init_default_error_handler = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/default-error-handler.js"() { + init_exceptions(); + throwDefaultError = ({ output, parsedBody, exceptionCtor, errorCode }) => { + const $metadata = deserializeMetadata(output); + const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0; + const response = new exceptionCtor({ + name: parsedBody?.code || parsedBody?.Code || errorCode || statusCode || "UnknownError", + $fault: "client", + $metadata + }); + throw decorateServiceException(response, parsedBody); + }; + withBaseException = (ExceptionCtor) => { + return ({ output, parsedBody, errorCode }) => { + throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode }); + }; + }; + deserializeMetadata = (output) => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"] + }); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/defaults-mode.js +var loadConfigsForDefaultMode; +var init_defaults_mode = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/defaults-mode.js"() { + loadConfigsForDefaultMode = (mode) => { + switch (mode) { + case "standard": + return { + retryMode: "standard", + connectionTimeout: 3100 + }; + case "in-region": + return { + retryMode: "standard", + connectionTimeout: 1100 + }; + case "cross-region": + return { + retryMode: "standard", + connectionTimeout: 3100 + }; + case "mobile": + return { + retryMode: "standard", + connectionTimeout: 3e4 + }; + default: + return {}; + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/emitWarningIfUnsupportedVersion.js +var warningEmitted, emitWarningIfUnsupportedVersion2; +var init_emitWarningIfUnsupportedVersion2 = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/emitWarningIfUnsupportedVersion.js"() { + warningEmitted = false; + emitWarningIfUnsupportedVersion2 = (version) => { + if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 16) { + warningEmitted = true; + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/checksum.js +var import_types3, knownAlgorithms, getChecksumConfiguration, resolveChecksumRuntimeConfig; +var init_checksum = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/checksum.js"() { + import_types3 = __toESM(require_dist_cjs()); + knownAlgorithms = Object.values(import_types3.AlgorithmId); + getChecksumConfiguration = (runtimeConfig) => { + const checksumAlgorithms = []; + for (const id in import_types3.AlgorithmId) { + const algorithmId = import_types3.AlgorithmId[id]; + if (runtimeConfig[algorithmId] === void 0) { + continue; + } + checksumAlgorithms.push({ + algorithmId: () => algorithmId, + checksumConstructor: () => runtimeConfig[algorithmId] + }); + } + for (const [id, ChecksumCtor] of Object.entries(runtimeConfig.checksumAlgorithms ?? {})) { + checksumAlgorithms.push({ + algorithmId: () => id, + checksumConstructor: () => ChecksumCtor + }); + } + return { + addChecksumAlgorithm(algo) { + runtimeConfig.checksumAlgorithms = runtimeConfig.checksumAlgorithms ?? {}; + const id = algo.algorithmId(); + const ctor = algo.checksumConstructor(); + if (knownAlgorithms.includes(id)) { + runtimeConfig.checksumAlgorithms[id.toUpperCase()] = ctor; + } else { + runtimeConfig.checksumAlgorithms[id] = ctor; + } + checksumAlgorithms.push(algo); + }, + checksumAlgorithms() { + return checksumAlgorithms; + } + }; + }; + resolveChecksumRuntimeConfig = (clientConfig) => { + const runtimeConfig = {}; + clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { + const id = checksumAlgorithm.algorithmId(); + if (knownAlgorithms.includes(id)) { + runtimeConfig[id] = checksumAlgorithm.checksumConstructor(); + } + }); + return runtimeConfig; + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/retry.js +var getRetryConfiguration, resolveRetryRuntimeConfig; +var init_retry = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/retry.js"() { + getRetryConfiguration = (runtimeConfig) => { + return { + setRetryStrategy(retryStrategy) { + runtimeConfig.retryStrategy = retryStrategy; + }, + retryStrategy() { + return runtimeConfig.retryStrategy; + } + }; + }; + resolveRetryRuntimeConfig = (retryStrategyConfiguration) => { + const runtimeConfig = {}; + runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy(); + return runtimeConfig; + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/defaultExtensionConfiguration.js +var getDefaultExtensionConfiguration, getDefaultClientConfiguration, resolveDefaultRuntimeConfig; +var init_defaultExtensionConfiguration = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/defaultExtensionConfiguration.js"() { + init_checksum(); + init_retry(); + getDefaultExtensionConfiguration = (runtimeConfig) => { + return Object.assign(getChecksumConfiguration(runtimeConfig), getRetryConfiguration(runtimeConfig)); + }; + getDefaultClientConfiguration = getDefaultExtensionConfiguration; + resolveDefaultRuntimeConfig = (config) => { + return Object.assign(resolveChecksumRuntimeConfig(config), resolveRetryRuntimeConfig(config)); + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-array-if-single-item.js +var getArrayIfSingleItem; +var init_get_array_if_single_item = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-array-if-single-item.js"() { + getArrayIfSingleItem = (mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray]; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js +var getValueFromTextNode; +var init_get_value_from_text_node = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js"() { + getValueFromTextNode = (obj) => { + const textNodeName = "#text"; + for (const key in obj) { + if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== void 0) { + obj[key] = obj[key][textNodeName]; + } else if (typeof obj[key] === "object" && obj[key] !== null) { + obj[key] = getValueFromTextNode(obj[key]); + } + } + return obj; + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/is-serializable-header-value.js +var isSerializableHeaderValue; +var init_is_serializable_header_value = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/is-serializable-header-value.js"() { + isSerializableHeaderValue = (value) => { + return value != null; + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/NoOpLogger.js +var NoOpLogger; +var init_NoOpLogger = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/NoOpLogger.js"() { + NoOpLogger = class { + trace() { + } + debug() { + } + info() { + } + warn() { + } + error() { + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/object-mapping.js +function map2(arg0, arg1, arg2) { + let target; + let filter; + let instructions; + if (typeof arg1 === "undefined" && typeof arg2 === "undefined") { + target = {}; + instructions = arg0; + } else { + target = arg0; + if (typeof arg1 === "function") { + filter = arg1; + instructions = arg2; + return mapWithFilter(target, filter, instructions); + } else { + instructions = arg1; + } + } + for (const key of Object.keys(instructions)) { + if (!Array.isArray(instructions[key])) { + target[key] = instructions[key]; + continue; + } + applyInstruction(target, null, instructions, key); + } + return target; +} +var convertMap, take, mapWithFilter, applyInstruction, nonNullish, pass; +var init_object_mapping = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/object-mapping.js"() { + convertMap = (target) => { + const output = {}; + for (const [k5, v] of Object.entries(target || {})) { + output[k5] = [, v]; + } + return output; + }; + take = (source, instructions) => { + const out = {}; + for (const key in instructions) { + applyInstruction(out, source, instructions, key); + } + return out; + }; + mapWithFilter = (target, filter, instructions) => { + return map2(target, Object.entries(instructions).reduce((_instructions, [key, value]) => { + if (Array.isArray(value)) { + _instructions[key] = value; + } else { + if (typeof value === "function") { + _instructions[key] = [filter, value()]; + } else { + _instructions[key] = [filter, value]; + } + } + return _instructions; + }, {})); + }; + applyInstruction = (target, source, instructions, targetKey) => { + if (source !== null) { + let instruction = instructions[targetKey]; + if (typeof instruction === "function") { + instruction = [, instruction]; + } + const [filter2 = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction; + if (typeof filter2 === "function" && filter2(source[sourceKey]) || typeof filter2 !== "function" && !!filter2) { + target[targetKey] = valueFn(source[sourceKey]); + } + return; + } + let [filter, value] = instructions[targetKey]; + if (typeof value === "function") { + let _value; + const defaultFilterPassed = filter === void 0 && (_value = value()) != null; + const customFilterPassed = typeof filter === "function" && !!filter(void 0) || typeof filter !== "function" && !!filter; + if (defaultFilterPassed) { + target[targetKey] = _value; + } else if (customFilterPassed) { + target[targetKey] = value(); + } + } else { + const defaultFilterPassed = filter === void 0 && value != null; + const customFilterPassed = typeof filter === "function" && !!filter(value) || typeof filter !== "function" && !!filter; + if (defaultFilterPassed || customFilterPassed) { + target[targetKey] = value; + } + } + }; + nonNullish = (_) => _ != null; + pass = (_) => _; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/ser-utils.js +var serializeFloat, serializeDateTime; +var init_ser_utils = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/ser-utils.js"() { + serializeFloat = (value) => { + if (value !== value) { + return "NaN"; + } + switch (value) { + case Infinity: + return "Infinity"; + case -Infinity: + return "-Infinity"; + default: + return value; + } + }; + serializeDateTime = (date2) => date2.toISOString().replace(".000Z", "Z"); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/serde-json.js +var _json; +var init_serde_json = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/serde-json.js"() { + _json = (obj) => { + if (obj == null) { + return {}; + } + if (Array.isArray(obj)) { + return obj.filter((_) => _ != null).map(_json); + } + if (typeof obj === "object") { + const target = {}; + for (const key of Object.keys(obj)) { + if (obj[key] == null) { + continue; + } + target[key] = _json(obj[key]); + } + return target; + } + return obj; + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/index.js +var client_exports = {}; +__export(client_exports, { + AlgorithmId: () => import_types3.AlgorithmId, + Client: () => Client, + Command: () => Command2, + NoOpLogger: () => NoOpLogger, + SENSITIVE_STRING: () => SENSITIVE_STRING2, + ServiceException: () => ServiceException, + WaiterState: () => WaiterState, + _json: () => _json, + checkExceptions: () => checkExceptions, + constructStack: () => constructStack, + convertMap: () => convertMap, + createAggregatedClient: () => createAggregatedClient, + createWaiter: () => createWaiter, + decorateServiceException: () => decorateServiceException, + emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion2, + getArrayIfSingleItem: () => getArrayIfSingleItem, + getChecksumConfiguration: () => getChecksumConfiguration, + getDefaultClientConfiguration: () => getDefaultClientConfiguration, + getDefaultExtensionConfiguration: () => getDefaultExtensionConfiguration, + getRetryConfiguration: () => getRetryConfiguration, + getSmithyContext: () => getSmithyContext, + getValueFromTextNode: () => getValueFromTextNode, + invalidFunction: () => invalidFunction, + invalidProvider: () => invalidProvider, + isSerializableHeaderValue: () => isSerializableHeaderValue, + loadConfigsForDefaultMode: () => loadConfigsForDefaultMode, + map: () => map2, + normalizeProvider: () => normalizeProvider, + resolveChecksumRuntimeConfig: () => resolveChecksumRuntimeConfig, + resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig, + resolveRetryRuntimeConfig: () => resolveRetryRuntimeConfig, + schemaLogFilter: () => schemaLogFilter, + serializeDateTime: () => serializeDateTime, + serializeFloat: () => serializeFloat, + take: () => take, + throwDefaultError: () => throwDefaultError, + waiterServiceDefaults: () => waiterServiceDefaults, + withBaseException: () => withBaseException +}); +var init_client2 = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/index.js"() { + init_MiddlewareStack(); + init_transport(); + init_transport(); + init_invalidFunction(); + init_invalidProvider(); + init_createWaiter(); + init_waiter(); + init_client(); + init_command(); + init_constants(); + init_create_aggregated_client(); + init_default_error_handler(); + init_defaults_mode(); + init_emitWarningIfUnsupportedVersion2(); + init_exceptions(); + init_defaultExtensionConfiguration(); + init_checksum(); + init_retry(); + init_get_array_if_single_item(); + init_get_value_from_text_node(); + init_is_serializable_header_value(); + init_NoOpLogger(); + init_object_mapping(); + init_schemaLogFilter(); + init_ser_utils(); + init_serde_json(); + } +}); + // node_modules/@smithy/core/dist-es/submodules/serde/is-array-buffer/is-array-buffer.js var isArrayBuffer; var init_is_array_buffer = __esm({ @@ -23282,10 +22067,10 @@ var init_toUint8Array = __esm({ }); // node_modules/@smithy/core/dist-es/submodules/serde/middleware-serde/deserializerMiddleware.js -var deserializerMiddleware, findHeader; +var deserializerMiddleware, findHeader2; var init_deserializerMiddleware = __esm({ "node_modules/@smithy/core/dist-es/submodules/serde/middleware-serde/deserializerMiddleware.js"() { - init_protocols(); + init_transport(); deserializerMiddleware = (options, deserializer) => (next, context) => async (args) => { const { response } = await next(args); try { @@ -23294,17 +22079,17 @@ var init_deserializerMiddleware = __esm({ response, output: parsed }; - } catch (error2) { - Object.defineProperty(error2, "$response", { + } catch (error3) { + Object.defineProperty(error3, "$response", { value: response, enumerable: false, writable: false, configurable: false }); - if (!("$metadata" in error2)) { + if (!("$metadata" in error3)) { const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`; try { - error2.message += "\n " + hint; + error3.message += "\n " + hint; } catch (e5) { if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") { console.warn(hint); @@ -23312,29 +22097,29 @@ var init_deserializerMiddleware = __esm({ context.logger?.warn?.(hint); } } - if (typeof error2.$responseBodyText !== "undefined") { - if (error2.$response) { - error2.$response.body = error2.$responseBodyText; + if (typeof error3.$responseBodyText !== "undefined") { + if (error3.$response) { + error3.$response.body = error3.$responseBodyText; } } try { if (HttpResponse.isInstance(response)) { const { headers = {} } = response; const headerEntries = Object.entries(headers); - error2.$metadata = { + error3.$metadata = { httpStatusCode: response.statusCode, - requestId: findHeader(/^x-[\w-]+-request-?id$/, headerEntries), - extendedRequestId: findHeader(/^x-[\w-]+-id-2$/, headerEntries), - cfId: findHeader(/^x-[\w-]+-cf-id$/, headerEntries) + requestId: findHeader2(/^x-[\w-]+-request-?id$/, headerEntries), + extendedRequestId: findHeader2(/^x-[\w-]+-id-2$/, headerEntries), + cfId: findHeader2(/^x-[\w-]+-cf-id$/, headerEntries) }; } } catch (e5) { } } - throw error2; + throw error3; } }; - findHeader = (pattern, headers) => { + findHeader2 = (pattern, headers) => { return (headers.find(([k5]) => { return k5.match(pattern); }) || [void 0, void 0])[1]; @@ -23364,8 +22149,8 @@ var init_ProviderError = __esm({ Object.setPrototypeOf(this, _ProviderError.prototype); logger2?.debug?.(`@smithy/property-provider ${tryNextLink ? "->" : "(!)"} ${message}`); } - static from(error2, options = true) { - return Object.assign(new this(error2.message, options), error2); + static from(error3, options = true) { + return Object.assign(new this(error3.message, options), error3); } }; } @@ -23604,27 +22389,27 @@ var init_getSSOTokenFromFile = __esm({ // node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/constants.js var CONFIG_PREFIX_SEPARATOR; -var init_constants = __esm({ +var init_constants2 = __esm({ "node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/constants.js"() { CONFIG_PREFIX_SEPARATOR = "."; } }); // node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getConfigData.js -var import_types2, getConfigData; +var import_types4, getConfigData; var init_getConfigData = __esm({ "node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getConfigData.js"() { - import_types2 = __toESM(require_dist_cjs()); - init_constants(); + import_types4 = __toESM(require_dist_cjs()); + init_constants2(); getConfigData = (data3) => Object.entries(data3).filter(([key]) => { const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); if (indexOfSeparator === -1) { return false; } - return Object.values(import_types2.IniSectionType).includes(key.substring(0, indexOfSeparator)); + return Object.values(import_types4.IniSectionType).includes(key.substring(0, indexOfSeparator)); }).reduce((acc, [key, value]) => { const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); - const updatedKey = key.substring(0, indexOfSeparator) === import_types2.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key; + const updatedKey = key.substring(0, indexOfSeparator) === import_types4.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key; acc[updatedKey] = value; return acc; }, { @@ -23656,11 +22441,11 @@ var init_getCredentialsFilepath = __esm({ }); // node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/parseIni.js -var import_types3, prefixKeyRegex, profileNameBlockList, parseIni; +var import_types5, prefixKeyRegex, profileNameBlockList, parseIni; var init_parseIni = __esm({ "node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/parseIni.js"() { - import_types3 = __toESM(require_dist_cjs()); - init_constants(); + import_types5 = __toESM(require_dist_cjs()); + init_constants2(); prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/; profileNameBlockList = ["__proto__", "profile __proto__"]; parseIni = (iniData) => { @@ -23677,7 +22462,7 @@ var init_parseIni = __esm({ const matches = prefixKeyRegex.exec(sectionName); if (matches) { const [, prefix, , name] = matches; - if (Object.values(import_types3.IniSectionType).includes(prefix)) { + if (Object.values(import_types5.IniSectionType).includes(prefix)) { currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR); } } else { @@ -23741,7 +22526,7 @@ var init_loadSharedConfigFiles = __esm({ init_getHomeDir(); init_parseIni(); init_readFile(); - init_constants(); + init_constants2(); swallowError = () => ({}); loadSharedConfigFiles = async (init = {}) => { const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init; @@ -23772,12 +22557,12 @@ var init_loadSharedConfigFiles = __esm({ }); // node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getSsoSessionData.js -var import_types4, getSsoSessionData; +var import_types6, getSsoSessionData; var init_getSsoSessionData = __esm({ "node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getSsoSessionData.js"() { - import_types4 = __toESM(require_dist_cjs()); + import_types6 = __toESM(require_dist_cjs()); init_loadSharedConfigFiles(); - getSsoSessionData = (data3) => Object.entries(data3).filter(([key]) => key.startsWith(import_types4.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}); + getSsoSessionData = (data3) => Object.entries(data3).filter(([key]) => key.startsWith(import_types6.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}); } }); @@ -23853,11 +22638,11 @@ var init_externalDataInterceptor = __esm({ // node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/getSelectorName.js function getSelectorName(functionString) { try { - const constants2 = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? [])); - constants2.delete("CONFIG"); - constants2.delete("CONFIG_PREFIX_SEPARATOR"); - constants2.delete("ENV"); - return [...constants2].join(", "); + const constants4 = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? [])); + constants4.delete("CONFIG"); + constants4.delete("CONFIG_PREFIX_SEPARATOR"); + constants4.delete("ENV"); + return [...constants4].join(", "); } catch (e5) { return functionString; } @@ -24067,7 +22852,7 @@ var init_config = __esm({ var validRegions, checkRegion; var init_checkRegion = __esm({ "node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/checkRegion.js"() { - init_endpoints(); + init_transport(); validRegions = /* @__PURE__ */ new Set(); checkRegion = (region, check = isValidHostLabel) => { if (!validRegions.has(region) && !check(region)) { @@ -24211,7 +22996,7 @@ var init_getRegionInfo = __esm({ // node_modules/@smithy/core/dist-es/submodules/config/defaults-mode/constants.js var AWS_EXECUTION_ENV, AWS_REGION_ENV, AWS_DEFAULT_REGION_ENV, ENV_IMDS_DISABLED, DEFAULTS_MODE_OPTIONS, IMDS_REGION_PATH; -var init_constants2 = __esm({ +var init_constants3 = __esm({ "node_modules/@smithy/core/dist-es/submodules/config/defaults-mode/constants.js"() { AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV"; AWS_REGION_ENV = "AWS_REGION"; @@ -24247,7 +23032,7 @@ var init_resolveDefaultsModeConfig = __esm({ init_config(); init_configLoader(); init_memoize(); - init_constants2(); + init_constants3(); init_defaultsModeConfig(); resolveDefaultsModeConfig = ({ region = loadConfig(NODE_REGION_CONFIG_OPTIONS), defaultsMode = loadConfig(NODE_DEFAULTS_MODE_CONFIG_OPTIONS) } = {}) => memoize(async () => { const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode; @@ -24404,7 +23189,7 @@ var init_config2 = __esm({ init_getProfileName(); init_getSSOTokenFilepath(); init_getSSOTokenFromFile(); - init_constants(); + init_constants2(); init_loadSharedConfigFiles(); init_loadSsoSessionData(); init_parseKnownFiles(); @@ -24572,34 +23357,10 @@ var init_createConfigValueProvider = __esm({ } }); -// node_modules/@smithy/core/dist-es/submodules/endpoints/toEndpointV1.js -var toEndpointV1; -var init_toEndpointV1 = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/toEndpointV1.js"() { - init_protocols(); - toEndpointV1 = (endpoint) => { - if (typeof endpoint === "object") { - if ("url" in endpoint) { - const v1Endpoint = parseUrl(endpoint.url); - if (endpoint.headers) { - v1Endpoint.headers = {}; - for (const name in endpoint.headers) { - v1Endpoint.headers[name.toLowerCase()] = endpoint.headers[name].join(", "); - } - } - return v1Endpoint; - } - return endpoint; - } - return parseUrl(endpoint); - }; - } -}); - // node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/toEndpointV1.js var init_toEndpointV12 = __esm({ "node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/toEndpointV1.js"() { - init_toEndpointV1(); + init_transport(); } }); @@ -24738,11 +23499,11 @@ function bindGetEndpointPlugin(getEndpointFromConfig2) { } }); } -var serializerMiddlewareOption, endpointMiddlewareOptions; +var serializerMiddlewareOption2, endpointMiddlewareOptions; var init_getEndpointPlugin = __esm({ "node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/getEndpointPlugin.js"() { init_endpointMiddleware(); - serializerMiddlewareOption = { + serializerMiddlewareOption2 = { name: "serializerMiddleware", step: "serialize", tags: ["SERIALIZER"], @@ -24754,7 +23515,7 @@ var init_getEndpointPlugin = __esm({ name: "endpointV2Middleware", override: true, relation: "before", - toMiddleware: serializerMiddlewareOption.name + toMiddleware: serializerMiddlewareOption2.name }; } }); @@ -24785,7 +23546,7 @@ function bindResolveEndpointConfig(getEndpointFromConfig2) { } var init_resolveEndpointConfig = __esm({ "node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/resolveEndpointConfig.js"() { - init_client2(); + init_transport(); init_toEndpointV12(); } }); @@ -25052,26 +23813,6 @@ var init_isSet = __esm({ } }); -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/isValidHostLabel.js -var VALID_HOST_LABEL_REGEX, isValidHostLabel; -var init_isValidHostLabel = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/isValidHostLabel.js"() { - VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`); - isValidHostLabel = (value, allowSubDomains = false) => { - if (!allowSubDomains) { - return VALID_HOST_LABEL_REGEX.test(value); - } - const labels = value.split("."); - for (const label of labels) { - if (!isValidHostLabel(label)) { - return false; - } - } - return true; - }; - } -}); - // node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/ite.js function ite(condition, trueValue, falseValue) { return condition ? trueValue : falseValue; @@ -25099,14 +23840,14 @@ var init_isIpAddress = __esm({ }); // node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/parseURL.js -var import_types10, DEFAULT_PORTS, parseURL; +var import_types12, DEFAULT_PORTS, parseURL; var init_parseURL = __esm({ "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/parseURL.js"() { - import_types10 = __toESM(require_dist_cjs()); + import_types12 = __toESM(require_dist_cjs()); init_isIpAddress(); DEFAULT_PORTS = { - [import_types10.EndpointURLScheme.HTTP]: 80, - [import_types10.EndpointURLScheme.HTTPS]: 443 + [import_types12.EndpointURLScheme.HTTP]: 80, + [import_types12.EndpointURLScheme.HTTPS]: 443 }; parseURL = (value) => { const whatwgURL = (() => { @@ -25121,7 +23862,7 @@ var init_parseURL = __esm({ return url; } return new URL(value); - } catch (error2) { + } catch (error3) { return null; } })(); @@ -25135,7 +23876,7 @@ var init_parseURL = __esm({ return null; } const scheme = protocol.slice(0, -1); - if (!Object.values(import_types10.EndpointURLScheme).includes(scheme)) { + if (!Object.values(import_types12.EndpointURLScheme).includes(scheme)) { return null; } const isIp = isIpAddress(hostname); @@ -25210,7 +23951,7 @@ var init_lib = __esm({ init_coalesce(); init_getAttr(); init_isSet(); - init_isValidHostLabel(); + init_transport(); init_ite(); init_not(); init_parseURL(); @@ -25437,9 +24178,9 @@ var init_getEndpointUrl = __esm({ if (typeof expression === "string") { try { return new URL(expression); - } catch (error2) { - console.error(`Failed to construct URL with ${expression}`, error2); - throw error2; + } catch (error3) { + console.error(`Failed to construct URL with ${expression}`, error3); + throw error3; } } throw new EndpointError(`Endpoint URL must be a string, got ${typeof expression}`); @@ -25570,7 +24311,7 @@ var init_evaluateErrorRule = __esm({ init_evaluateConditions(); init_evaluateExpression(); evaluateErrorRule = (errorRule, options) => { - const { conditions, error: error2 } = errorRule; + const { conditions, error: error3 } = errorRule; const { result, referenceRecord } = evaluateConditions(conditions, options); if (!result) { return; @@ -25579,7 +24320,7 @@ var init_evaluateErrorRule = __esm({ ...options, referenceRecord: { ...options.referenceRecord, ...referenceRecord } } : options; - throw new EndpointError(evaluateExpression(error2, "Error", errorRuleOptions)); + throw new EndpointError(evaluateExpression(error3, "Error", errorRuleOptions)); }; } }); @@ -25710,12 +24451,12 @@ var init_endpoints = __esm({ init_endpointMiddleware(); init_getEndpointPlugin(); init_resolveEndpointConfig(); - init_toEndpointV1(); + init_transport(); init_BinaryDecisionDiagram(); init_EndpointCache(); init_decideEndpoint(); init_isIpAddress(); - init_isValidHostLabel(); + init_transport(); init_customEndpointFunctions(); init_resolveEndpoint(); init_types2(); @@ -25754,23 +24495,23 @@ var init_serializerMiddleware = __esm({ function getSerdePlugin(config, serializer, deserializer) { return { applyToStack: (commandStack) => { - commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption); - commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption2); + commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption2); + commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption3); } }; } -var deserializerMiddlewareOption, serializerMiddlewareOption2; +var deserializerMiddlewareOption2, serializerMiddlewareOption3; var init_serdePlugin = __esm({ "node_modules/@smithy/core/dist-es/submodules/serde/middleware-serde/serdePlugin.js"() { init_deserializerMiddleware(); init_serializerMiddleware(); - deserializerMiddlewareOption = { + deserializerMiddlewareOption2 = { name: "deserializerMiddleware", step: "deserialize", tags: ["DESERIALIZER"], override: true }; - serializerMiddlewareOption2 = { + serializerMiddlewareOption3 = { name: "serializerMiddleware", step: "serialize", tags: ["SERIALIZER"], @@ -25993,8 +24734,8 @@ var init_createChecksumStream_browser = __esm({ const digest = await checksum.digest(); const received = encoder(digest); if (expectedChecksum !== received) { - const error2 = new Error(`Checksum mismatch: expected "${expectedChecksum}" but received "${received}" in response header "${checksumSourceLocation}".`); - controller.error(error2); + const error3 = new Error(`Checksum mismatch: expected "${expectedChecksum}" but received "${received}" in response header "${checksumSourceLocation}".`); + controller.error(error3); } else { controller.terminate(); } @@ -26726,7 +25467,7 @@ __export(serde_exports, { createChecksumStream: () => createChecksumStream2, dateToUtcString: () => dateToUtcString, deserializerMiddleware: () => deserializerMiddleware, - deserializerMiddlewareOption: () => deserializerMiddlewareOption, + deserializerMiddlewareOption: () => deserializerMiddlewareOption2, expectBoolean: () => expectBoolean, expectByte: () => expectByte, expectFloat32: () => expectFloat32, @@ -26765,7 +25506,7 @@ __export(serde_exports, { quoteHeader: () => quoteHeader, sdkStreamMixin: () => sdkStreamMixin2, serializerMiddleware: () => serializerMiddleware, - serializerMiddlewareOption: () => serializerMiddlewareOption2, + serializerMiddlewareOption: () => serializerMiddlewareOption3, splitEvery: () => splitEvery, splitHeader: () => splitHeader, splitStream: () => splitStream2, @@ -26869,93 +25610,6 @@ var init_SerdeContext = __esm({ } }); -// node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/httpRequest.js -function cloneQuery(query) { - return Object.keys(query).reduce((carry, paramName) => { - const param = query[paramName]; - return { - ...carry, - [paramName]: Array.isArray(param) ? [...param] : param - }; - }, {}); -} -var HttpRequest; -var init_httpRequest = __esm({ - "node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/httpRequest.js"() { - HttpRequest = class _HttpRequest { - method; - protocol; - hostname; - port; - path; - query; - headers; - username; - password; - fragment; - body; - constructor(options) { - this.method = options.method || "GET"; - this.hostname = options.hostname || "localhost"; - this.port = options.port; - this.query = options.query || {}; - this.headers = options.headers || {}; - this.body = options.body; - this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:"; - this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/"; - this.username = options.username; - this.password = options.password; - this.fragment = options.fragment; - } - static clone(request) { - const cloned = new _HttpRequest({ - ...request, - headers: { ...request.headers } - }); - if (cloned.query) { - cloned.query = cloneQuery(cloned.query); - } - return cloned; - } - static isInstance(request) { - if (!request) { - return false; - } - const req = request; - return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object"; - } - clone() { - return _HttpRequest.clone(this); - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/httpResponse.js -var HttpResponse; -var init_httpResponse = __esm({ - "node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/httpResponse.js"() { - HttpResponse = class { - statusCode; - reason; - headers; - body; - constructor(options) { - this.statusCode = options.statusCode; - this.reason = options.reason; - this.headers = options.headers || {}; - this.body = options.body; - } - static isInstance(response) { - if (!response) - return false; - const resp = response; - return typeof resp.statusCode === "number" && typeof resp.headers === "object"; - } - }; - } -}); - // node_modules/tslib/tslib.es6.mjs var tslib_es6_exports = {}; __export(tslib_es6_exports, { @@ -26965,7 +25619,7 @@ __export(tslib_es6_exports, { __asyncGenerator: () => __asyncGenerator, __asyncValues: () => __asyncValues, __await: () => __await, - __awaiter: () => __awaiter, + __awaiter: () => __awaiter6, __classPrivateFieldGet: () => __classPrivateFieldGet, __classPrivateFieldIn: () => __classPrivateFieldIn, __classPrivateFieldSet: () => __classPrivateFieldSet, @@ -27073,7 +25727,7 @@ function __setFunctionName(f5, name, prefix) { function __metadata(metadataKey, metadataValue) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); } -function __awaiter(thisArg, _arguments, P, generator) { +function __awaiter6(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -27189,8 +25843,8 @@ function __read(o2, n3) { var i5 = m3.call(o2), r5, ar = [], e5; try { while ((n3 === void 0 || n3-- > 0) && !(r5 = i5.next()).done) ar.push(r5.value); - } catch (error2) { - e5 = { error: error2 }; + } catch (error3) { + e5 = { error: error3 }; } finally { try { if (r5 && !r5.done && (m3 = i5["return"])) m3.call(i5); @@ -27440,9 +26094,9 @@ var init_tslib_es6 = __esm({ }; return ownKeys(o2); }; - _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error2, suppressed, message) { + _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { var e5 = new Error(message); - return e5.name = "SuppressedError", e5.error = error2, e5.suppressed = suppressed, e5; + return e5.name = "SuppressedError", e5.error = error3, e5.suppressed = suppressed, e5; }; tslib_es6_default = { __extends, @@ -27455,7 +26109,7 @@ var init_tslib_es6 = __esm({ __propKey, __setFunctionName, __metadata, - __awaiter, + __awaiter: __awaiter6, __generator, __createBinding, __exportStar, @@ -28601,9 +27255,9 @@ function getMessageUnmarshaller(deserializer, toUtf83) { const exception = { [code]: message }; const deserializedException = await deserializer(exception); if (deserializedException.$unknown) { - const error2 = new Error(toUtf83(message.body)); - error2.name = code; - throw error2; + const error3 = new Error(toUtf83(message.body)); + error3.name = code; + throw error3; } throw deserializedException[code]; } else if (messageType === "event") { @@ -29053,9 +27707,8 @@ var HttpProtocol; var init_HttpProtocol = __esm({ "node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js"() { init_schema(); + init_transport(); init_SerdeContext(); - init_httpRequest(); - init_httpResponse(); HttpProtocol = class extends SerdeContext { options; compositeErrorRegistry; @@ -29203,10 +27856,10 @@ var init_HttpBindingProtocol = __esm({ "node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js"() { init_schema(); init_serde(); + init_transport(); init_HttpProtocol(); init_collect_stream_body(); init_extended_encode_uri_component(); - init_httpRequest(); HttpBindingProtocol = class extends HttpProtocol { async serializeRequest(operationSchema, _input, context) { const input = _input && typeof _input === "object" ? _input : {}; @@ -29477,9 +28130,9 @@ var RpcProtocol; var init_RpcProtocol = __esm({ "node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js"() { init_schema(); + init_transport(); init_HttpProtocol(); init_collect_stream_body(); - init_httpRequest(); RpcProtocol = class extends HttpProtocol { async serializeRequest(operationSchema, _input, context) { const serializer = this.serializer; @@ -29596,7 +28249,7 @@ function requestBuilder(input, context) { var RequestBuilder; var init_requestBuilder = __esm({ "node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js"() { - init_httpRequest(); + init_transport(); init_resolve_path(); RequestBuilder = class { input; @@ -29937,15 +28590,15 @@ var init_HttpInterceptingShapeSerializer = __esm({ }); // node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/Field.js -var import_types20, Field; +var import_types22, Field; var init_Field = __esm({ "node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/Field.js"() { - import_types20 = __toESM(require_dist_cjs()); + import_types22 = __toESM(require_dist_cjs()); Field = class { name; kind; values; - constructor({ name, kind = import_types20.FieldPosition.HEADER, values = [] }) { + constructor({ name, kind = import_types22.FieldPosition.HEADER, values = [] }) { this.name = name; this.kind = kind; this.values = values; @@ -29996,16 +28649,6 @@ var init_Fields = __esm({ } }); -// node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/isValidHostname.js -function isValidHostname(hostname) { - const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/; - return hostPattern.test(hostname); -} -var init_isValidHostname = __esm({ - "node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/isValidHostname.js"() { - } -}); - // node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.js var getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig; var init_httpExtensionConfiguration = __esm({ @@ -30047,7 +28690,7 @@ function contentLengthMiddleware(bodyLengthChecker) { ...request.headers, [CONTENT_LENGTH_HEADER]: String(length) }; - } catch (error2) { + } catch (error3) { } } } @@ -30060,7 +28703,7 @@ function contentLengthMiddleware(bodyLengthChecker) { var CONTENT_LENGTH_HEADER, contentLengthMiddlewareOptions, getContentLengthPlugin; var init_contentLengthMiddleware = __esm({ "node_modules/@smithy/core/dist-es/submodules/protocols/middleware-content-length/contentLengthMiddleware.js"() { - init_httpRequest(); + init_transport(); CONTENT_LENGTH_HEADER = "content-length"; contentLengthMiddlewareOptions = { step: "build", @@ -30120,58 +28763,6 @@ var init_buildQueryString = __esm({ } }); -// node_modules/@smithy/core/dist-es/submodules/protocols/querystring-parser/parseQueryString.js -function parseQueryString(querystring) { - const query = {}; - querystring = querystring.replace(/^\?/, ""); - if (querystring) { - for (const pair of querystring.split("&")) { - let [key, value = null] = pair.split("="); - key = decodeURIComponent(key); - if (value) { - value = decodeURIComponent(value); - } - if (!(key in query)) { - query[key] = value; - } else if (Array.isArray(query[key])) { - query[key].push(value); - } else { - query[key] = [query[key], value]; - } - } - } - return query; -} -var init_parseQueryString = __esm({ - "node_modules/@smithy/core/dist-es/submodules/protocols/querystring-parser/parseQueryString.js"() { - } -}); - -// node_modules/@smithy/core/dist-es/submodules/protocols/url-parser/parseUrl.js -var parseUrl; -var init_parseUrl = __esm({ - "node_modules/@smithy/core/dist-es/submodules/protocols/url-parser/parseUrl.js"() { - init_parseQueryString(); - parseUrl = (url) => { - if (typeof url === "string") { - return parseUrl(new URL(url)); - } - const { hostname, pathname, port, protocol, search } = url; - let query; - if (search) { - query = parseQueryString(search); - } - return { - hostname, - port: port ? parseInt(port) : void 0, - protocol, - path: pathname, - query - }; - }; - } -}); - // node_modules/@smithy/core/dist-es/submodules/protocols/index.js var protocols_exports = {}; __export(protocols_exports, { @@ -30222,1546 +28813,16 @@ var init_protocols = __esm({ init_SerdeContext(); init_Field(); init_Fields(); - init_httpRequest(); - init_httpResponse(); - init_isValidHostname(); + init_transport(); + init_transport(); + init_transport(); init_httpExtensionConfiguration(); init_contentLengthMiddleware(); init_escape_uri(); init_escape_uri_path(); init_buildQueryString(); - init_parseQueryString(); - init_parseUrl(); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/schema/schemas/operation.js -var operation; -var init_operation = __esm({ - "node_modules/@smithy/core/dist-es/submodules/schema/schemas/operation.js"() { - operation = (namespace, name, traits, input, output) => ({ - name, - namespace, - traits, - input, - output - }); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js -var schemaDeserializationMiddleware, findHeader2; -var init_schemaDeserializationMiddleware = __esm({ - "node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js"() { - init_client2(); - init_protocols(); - init_operation(); - schemaDeserializationMiddleware = (config) => (next, context) => async (args) => { - const { response } = await next(args); - const { operationSchema } = getSmithyContext(context); - const [, ns, n3, t, i5, o2] = operationSchema ?? []; - try { - const parsed = await config.protocol.deserializeResponse(operation(ns, n3, t, i5, o2), { - ...config, - ...context - }, response); - return { - response, - output: parsed - }; - } catch (error2) { - Object.defineProperty(error2, "$response", { - value: response, - enumerable: false, - writable: false, - configurable: false - }); - if (!("$metadata" in error2)) { - const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`; - try { - error2.message += "\n " + hint; - } catch (e5) { - if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") { - console.warn(hint); - } else { - context.logger?.warn?.(hint); - } - } - if (typeof error2.$responseBodyText !== "undefined") { - if (error2.$response) { - error2.$response.body = error2.$responseBodyText; - } - } - try { - if (HttpResponse.isInstance(response)) { - const { headers = {} } = response; - const headerEntries = Object.entries(headers); - error2.$metadata = { - httpStatusCode: response.statusCode, - requestId: findHeader2(/^x-[\w-]+-request-?id$/, headerEntries), - extendedRequestId: findHeader2(/^x-[\w-]+-id-2$/, headerEntries), - cfId: findHeader2(/^x-[\w-]+-cf-id$/, headerEntries) - }; - } - } catch (e5) { - } - } - throw error2; - } - }; - findHeader2 = (pattern, headers) => { - return (headers.find(([k5]) => { - return k5.match(pattern); - }) || [void 0, void 0])[1]; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js -var schemaSerializationMiddleware; -var init_schemaSerializationMiddleware = __esm({ - "node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js"() { - init_client2(); - init_endpoints(); - init_operation(); - schemaSerializationMiddleware = (config) => (next, context) => async (args) => { - const { operationSchema } = getSmithyContext(context); - const [, ns, n3, t, i5, o2] = operationSchema ?? []; - const endpoint = context.endpointV2 ? async () => toEndpointV1(context.endpointV2) : config.endpoint; - const request = await config.protocol.serializeRequest(operation(ns, n3, t, i5, o2), args.input, { - ...config, - ...context, - endpoint - }); - return next({ - ...args, - request - }); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js -function getSchemaSerdePlugin(config) { - return { - applyToStack: (commandStack) => { - commandStack.add(schemaSerializationMiddleware(config), serializerMiddlewareOption3); - commandStack.add(schemaDeserializationMiddleware(config), deserializerMiddlewareOption2); - config.protocol.setSerdeContext(config); - } - }; -} -var deserializerMiddlewareOption2, serializerMiddlewareOption3; -var init_getSchemaSerdePlugin = __esm({ - "node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js"() { - init_schemaDeserializationMiddleware(); - init_schemaSerializationMiddleware(); - deserializerMiddlewareOption2 = { - name: "deserializerMiddleware", - step: "deserialize", - tags: ["DESERIALIZER"], - override: true - }; - serializerMiddlewareOption3 = { - name: "serializerMiddleware", - step: "serialize", - tags: ["SERIALIZER"], - override: true - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js -var Schema; -var init_Schema = __esm({ - "node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js"() { - Schema = class { - name; - namespace; - traits; - static assign(instance, values) { - const schema = Object.assign(instance, values); - return schema; - } - static [Symbol.hasInstance](lhs) { - const isPrototype = this.prototype.isPrototypeOf(lhs); - if (!isPrototype && typeof lhs === "object" && lhs !== null) { - const list2 = lhs; - return list2.symbol === this.symbol; - } - return isPrototype; - } - getName() { - return this.namespace + "#" + this.name; - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js -var ListSchema, list; -var init_ListSchema = __esm({ - "node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js"() { - init_Schema(); - ListSchema = class _ListSchema extends Schema { - static symbol = /* @__PURE__ */ Symbol.for("@smithy/lis"); - name; - traits; - valueSchema; - symbol = _ListSchema.symbol; - }; - list = (namespace, name, traits, valueSchema) => Schema.assign(new ListSchema(), { - name, - namespace, - traits, - valueSchema - }); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js -var MapSchema, map; -var init_MapSchema = __esm({ - "node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js"() { - init_Schema(); - MapSchema = class _MapSchema extends Schema { - static symbol = /* @__PURE__ */ Symbol.for("@smithy/map"); - name; - traits; - keySchema; - valueSchema; - symbol = _MapSchema.symbol; - }; - map = (namespace, name, traits, keySchema, valueSchema) => Schema.assign(new MapSchema(), { - name, - namespace, - traits, - keySchema, - valueSchema - }); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js -var OperationSchema, op; -var init_OperationSchema = __esm({ - "node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js"() { - init_Schema(); - OperationSchema = class _OperationSchema extends Schema { - static symbol = /* @__PURE__ */ Symbol.for("@smithy/ope"); - name; - traits; - input; - output; - symbol = _OperationSchema.symbol; - }; - op = (namespace, name, traits, input, output) => Schema.assign(new OperationSchema(), { - name, - namespace, - traits, - input, - output - }); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js -var StructureSchema, struct; -var init_StructureSchema = __esm({ - "node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js"() { - init_Schema(); - StructureSchema = class _StructureSchema extends Schema { - static symbol = /* @__PURE__ */ Symbol.for("@smithy/str"); - name; - traits; - memberNames; - memberList; - symbol = _StructureSchema.symbol; - }; - struct = (namespace, name, traits, memberNames, memberList) => Schema.assign(new StructureSchema(), { - name, - namespace, - traits, - memberNames, - memberList - }); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js -var ErrorSchema, error; -var init_ErrorSchema = __esm({ - "node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js"() { - init_Schema(); - init_StructureSchema(); - ErrorSchema = class _ErrorSchema extends StructureSchema { - static symbol = /* @__PURE__ */ Symbol.for("@smithy/err"); - ctor; - symbol = _ErrorSchema.symbol; - }; - error = (namespace, name, traits, memberNames, memberList, ctor) => Schema.assign(new ErrorSchema(), { - name, - namespace, - traits, - memberNames, - memberList, - ctor: null - }); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js -function translateTraits(indicator) { - if (typeof indicator === "object") { - return indicator; - } - indicator = indicator | 0; - if (traitsCache[indicator]) { - return traitsCache[indicator]; - } - const traits = {}; - let i5 = 0; - for (const trait of [ - "httpLabel", - "idempotent", - "idempotencyToken", - "sensitive", - "httpPayload", - "httpResponseCode", - "httpQueryParams" - ]) { - if ((indicator >> i5++ & 1) === 1) { - traits[trait] = 1; - } - } - return traitsCache[indicator] = traits; -} -var traitsCache; -var init_translateTraits = __esm({ - "node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js"() { - traitsCache = []; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js -function member(memberSchema, memberName) { - if (memberSchema instanceof NormalizedSchema) { - return Object.assign(memberSchema, { - memberName, - _isMemberSchema: true - }); - } - const internalCtorAccess = NormalizedSchema; - return new internalCtorAccess(memberSchema, memberName); -} -var anno, simpleSchemaCacheN, simpleSchemaCacheS, NormalizedSchema, isMemberSchema, isStaticSchema; -var init_NormalizedSchema = __esm({ - "node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js"() { - init_deref(); - init_translateTraits(); - anno = { - it: /* @__PURE__ */ Symbol.for("@smithy/nor-struct-it"), - ns: /* @__PURE__ */ Symbol.for("@smithy/ns") - }; - simpleSchemaCacheN = []; - simpleSchemaCacheS = {}; - NormalizedSchema = class _NormalizedSchema { - ref; - memberName; - static symbol = /* @__PURE__ */ Symbol.for("@smithy/nor"); - symbol = _NormalizedSchema.symbol; - name; - schema; - _isMemberSchema; - traits; - memberTraits; - normalizedTraits; - constructor(ref, memberName) { - this.ref = ref; - this.memberName = memberName; - const traitStack = []; - let _ref = ref; - let schema = ref; - this._isMemberSchema = false; - while (isMemberSchema(_ref)) { - traitStack.push(_ref[1]); - _ref = _ref[0]; - schema = deref(_ref); - this._isMemberSchema = true; - } - if (traitStack.length > 0) { - this.memberTraits = {}; - for (let i5 = traitStack.length - 1; i5 >= 0; --i5) { - const traitSet = traitStack[i5]; - Object.assign(this.memberTraits, translateTraits(traitSet)); - } - } else { - this.memberTraits = 0; - } - if (schema instanceof _NormalizedSchema) { - const computedMemberTraits = this.memberTraits; - Object.assign(this, schema); - this.memberTraits = Object.assign({}, computedMemberTraits, schema.getMemberTraits(), this.getMemberTraits()); - this.normalizedTraits = void 0; - this.memberName = memberName ?? schema.memberName; - return; - } - this.schema = deref(schema); - if (isStaticSchema(this.schema)) { - this.name = `${this.schema[1]}#${this.schema[2]}`; - this.traits = this.schema[3]; - } else { - this.name = this.memberName ?? String(schema); - this.traits = 0; - } - if (this._isMemberSchema && !memberName) { - throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(true)} missing member name.`); - } - } - static [Symbol.hasInstance](lhs) { - const isPrototype = this.prototype.isPrototypeOf(lhs); - if (!isPrototype && typeof lhs === "object" && lhs !== null) { - const ns = lhs; - return ns.symbol === this.symbol; - } - return isPrototype; - } - static of(ref) { - const keyAble = typeof ref === "function" || typeof ref === "object" && ref !== null; - if (typeof ref === "number") { - if (simpleSchemaCacheN[ref]) { - return simpleSchemaCacheN[ref]; - } - } else if (typeof ref === "string") { - if (simpleSchemaCacheS[ref]) { - return simpleSchemaCacheS[ref]; - } - } else if (keyAble) { - if (ref[anno.ns]) { - return ref[anno.ns]; - } - } - const sc = deref(ref); - if (sc instanceof _NormalizedSchema) { - return sc; - } - if (isMemberSchema(sc)) { - const [ns2, traits] = sc; - if (ns2 instanceof _NormalizedSchema) { - Object.assign(ns2.getMergedTraits(), translateTraits(traits)); - return ns2; - } - throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(ref, null, 2)}.`); - } - const ns = new _NormalizedSchema(sc); - if (keyAble) { - return ref[anno.ns] = ns; - } - if (typeof sc === "string") { - return simpleSchemaCacheS[sc] = ns; - } - if (typeof sc === "number") { - return simpleSchemaCacheN[sc] = ns; - } - return ns; - } - getSchema() { - const sc = this.schema; - if (Array.isArray(sc) && sc[0] === 0) { - return sc[4]; - } - return sc; - } - getName(withNamespace = false) { - const { name } = this; - const short = !withNamespace && name && name.includes("#"); - return short ? name.split("#")[1] : name || void 0; - } - getMemberName() { - return this.memberName; - } - isMemberSchema() { - return this._isMemberSchema; - } - isListSchema() { - const sc = this.getSchema(); - return typeof sc === "number" ? sc >= 64 && sc < 128 : sc[0] === 1; - } - isMapSchema() { - const sc = this.getSchema(); - return typeof sc === "number" ? sc >= 128 && sc <= 255 : sc[0] === 2; - } - isStructSchema() { - const sc = this.getSchema(); - if (typeof sc !== "object") { - return false; - } - const id = sc[0]; - return id === 3 || id === -3 || id === 4; - } - isUnionSchema() { - const sc = this.getSchema(); - if (typeof sc !== "object") { - return false; - } - return sc[0] === 4; - } - isBlobSchema() { - const sc = this.getSchema(); - return sc === 21 || sc === 42; - } - isTimestampSchema() { - const sc = this.getSchema(); - return typeof sc === "number" && sc >= 4 && sc <= 7; - } - isUnitSchema() { - return this.getSchema() === "unit"; - } - isDocumentSchema() { - return this.getSchema() === 15; - } - isStringSchema() { - return this.getSchema() === 0; - } - isBooleanSchema() { - return this.getSchema() === 2; - } - isNumericSchema() { - return this.getSchema() === 1; - } - isBigIntegerSchema() { - return this.getSchema() === 17; - } - isBigDecimalSchema() { - return this.getSchema() === 19; - } - isStreaming() { - const { streaming } = this.getMergedTraits(); - return !!streaming || this.getSchema() === 42; - } - isIdempotencyToken() { - return !!this.getMergedTraits().idempotencyToken; - } - getMergedTraits() { - return this.normalizedTraits ?? (this.normalizedTraits = { - ...this.getOwnTraits(), - ...this.getMemberTraits() - }); - } - getMemberTraits() { - return translateTraits(this.memberTraits); - } - getOwnTraits() { - return translateTraits(this.traits); - } - getKeySchema() { - const [isDoc, isMap] = [this.isDocumentSchema(), this.isMapSchema()]; - if (!isDoc && !isMap) { - throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(true)}`); - } - const schema = this.getSchema(); - const memberSchema = isDoc ? 15 : schema[4] ?? 0; - return member([memberSchema, 0], "key"); - } - getValueSchema() { - const sc = this.getSchema(); - const [isDoc, isMap, isList] = [this.isDocumentSchema(), this.isMapSchema(), this.isListSchema()]; - const memberSchema = typeof sc === "number" ? 63 & sc : sc && typeof sc === "object" && (isMap || isList) ? sc[3 + sc[0]] : isDoc ? 15 : void 0; - if (memberSchema != null) { - return member([memberSchema, 0], isMap ? "value" : "member"); - } - throw new Error(`@smithy/core/schema - ${this.getName(true)} has no value member.`); - } - getMemberSchema(memberName) { - const struct2 = this.getSchema(); - if (this.isStructSchema() && struct2[4].includes(memberName)) { - const i5 = struct2[4].indexOf(memberName); - const memberSchema = struct2[5][i5]; - return member(isMemberSchema(memberSchema) ? memberSchema : [memberSchema, 0], memberName); - } - if (this.isDocumentSchema()) { - return member([15, 0], memberName); - } - throw new Error(`@smithy/core/schema - ${this.getName(true)} has no member=${memberName}.`); - } - getMemberSchemas() { - const buffer = {}; - try { - for (const [k5, v] of this.structIterator()) { - buffer[k5] = v; - } - } catch (ignored) { - } - return buffer; - } - getEventStreamMember() { - if (this.isStructSchema()) { - for (const [memberName, memberSchema] of this.structIterator()) { - if (memberSchema.isStreaming() && memberSchema.isStructSchema()) { - return memberName; - } - } - } - return ""; - } - *structIterator() { - if (this.isUnitSchema()) { - return; - } - if (!this.isStructSchema()) { - throw new Error("@smithy/core/schema - cannot iterate non-struct schema."); - } - const struct2 = this.getSchema(); - const z = struct2[4].length; - let it = struct2[anno.it]; - if (it && z === it.length) { - yield* it; - return; - } - it = Array(z); - for (let i5 = 0; i5 < z; ++i5) { - const k5 = struct2[4][i5]; - const v = member([struct2[5][i5], 0], k5); - yield it[i5] = [k5, v]; - } - struct2[anno.it] = it; - } - }; - isMemberSchema = (sc) => Array.isArray(sc) && sc.length === 2; - isStaticSchema = (sc) => Array.isArray(sc) && sc.length >= 5; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js -var SimpleSchema, sim, simAdapter; -var init_SimpleSchema = __esm({ - "node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js"() { - init_Schema(); - SimpleSchema = class _SimpleSchema extends Schema { - static symbol = /* @__PURE__ */ Symbol.for("@smithy/sim"); - name; - schemaRef; - traits; - symbol = _SimpleSchema.symbol; - }; - sim = (namespace, name, schemaRef, traits) => Schema.assign(new SimpleSchema(), { - name, - namespace, - traits, - schemaRef - }); - simAdapter = (namespace, name, traits, schemaRef) => Schema.assign(new SimpleSchema(), { - name, - namespace, - traits, - schemaRef - }); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/schema/schemas/sentinels.js -var SCHEMA; -var init_sentinels = __esm({ - "node_modules/@smithy/core/dist-es/submodules/schema/schemas/sentinels.js"() { - SCHEMA = { - BLOB: 21, - STREAMING_BLOB: 42, - BOOLEAN: 2, - STRING: 0, - NUMERIC: 1, - BIG_INTEGER: 17, - BIG_DECIMAL: 19, - DOCUMENT: 15, - TIMESTAMP_DEFAULT: 4, - TIMESTAMP_DATE_TIME: 5, - TIMESTAMP_HTTP_DATE: 6, - TIMESTAMP_EPOCH_SECONDS: 7, - LIST_MODIFIER: 64, - MAP_MODIFIER: 128 - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js -var TypeRegistry; -var init_TypeRegistry = __esm({ - "node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js"() { - TypeRegistry = class _TypeRegistry { - namespace; - schemas; - exceptions; - static registries = /* @__PURE__ */ new Map(); - constructor(namespace, schemas = /* @__PURE__ */ new Map(), exceptions = /* @__PURE__ */ new Map()) { - this.namespace = namespace; - this.schemas = schemas; - this.exceptions = exceptions; - } - static for(namespace) { - if (!_TypeRegistry.registries.has(namespace)) { - _TypeRegistry.registries.set(namespace, new _TypeRegistry(namespace)); - } - return _TypeRegistry.registries.get(namespace); - } - copyFrom(other) { - const { schemas, exceptions } = this; - for (const [k5, v] of other.schemas) { - if (!schemas.has(k5)) { - schemas.set(k5, v); - } - } - for (const [k5, v] of other.exceptions) { - if (!exceptions.has(k5)) { - exceptions.set(k5, v); - } - } - } - register(shapeId, schema) { - const qualifiedName = this.normalizeShapeId(shapeId); - for (const r5 of [this, _TypeRegistry.for(qualifiedName.split("#")[0])]) { - r5.schemas.set(qualifiedName, schema); - } - } - getSchema(shapeId) { - const id = this.normalizeShapeId(shapeId); - if (!this.schemas.has(id)) { - if (!shapeId.includes("#")) { - const suffix = "#" + shapeId; - const candidates = []; - for (const [shapeId2, schema] of this.schemas.entries()) { - if (shapeId2.endsWith(suffix)) { - candidates.push(schema); - } - } - if (candidates.length === 1) { - return candidates[0]; - } - } - throw new Error(`@smithy/core/schema - schema not found for ${id}`); - } - return this.schemas.get(id); - } - registerError(es, ctor) { - const $error = es; - const ns = $error[1]; - for (const r5 of [this, _TypeRegistry.for(ns)]) { - r5.schemas.set(ns + "#" + $error[2], $error); - r5.exceptions.set($error, ctor); - } - } - getErrorCtor(es) { - const $error = es; - if (this.exceptions.has($error)) { - return this.exceptions.get($error); - } - const registry = _TypeRegistry.for($error[1]); - return registry.exceptions.get($error); - } - getBaseException() { - for (const exceptionKey of this.exceptions.keys()) { - if (Array.isArray(exceptionKey)) { - const [, ns, name] = exceptionKey; - const id = ns + "#" + name; - if (id.startsWith("smithy.ts.sdk.synthetic.") && id.endsWith("ServiceException")) { - return exceptionKey; - } - } - } - return void 0; - } - find(predicate) { - for (const schema of this.schemas.values()) { - if (predicate(schema)) { - return schema; - } - } - return void 0; - } - clear() { - this.schemas.clear(); - this.exceptions.clear(); - } - normalizeShapeId(shapeId) { - if (shapeId.includes("#")) { - return shapeId; - } - return this.namespace + "#" + shapeId; - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/schema/index.js -var schema_exports = {}; -__export(schema_exports, { - ErrorSchema: () => ErrorSchema, - ListSchema: () => ListSchema, - MapSchema: () => MapSchema, - NormalizedSchema: () => NormalizedSchema, - OperationSchema: () => OperationSchema, - SCHEMA: () => SCHEMA, - Schema: () => Schema, - SimpleSchema: () => SimpleSchema, - StructureSchema: () => StructureSchema, - TypeRegistry: () => TypeRegistry, - deref: () => deref, - deserializerMiddlewareOption: () => deserializerMiddlewareOption2, - error: () => error, - getSchemaSerdePlugin: () => getSchemaSerdePlugin, - isStaticSchema: () => isStaticSchema, - list: () => list, - map: () => map, - op: () => op, - operation: () => operation, - serializerMiddlewareOption: () => serializerMiddlewareOption3, - sim: () => sim, - simAdapter: () => simAdapter, - simpleSchemaCacheN: () => simpleSchemaCacheN, - simpleSchemaCacheS: () => simpleSchemaCacheS, - struct: () => struct, - traitsCache: () => traitsCache, - translateTraits: () => translateTraits -}); -var init_schema = __esm({ - "node_modules/@smithy/core/dist-es/submodules/schema/index.js"() { - init_deref(); - init_getSchemaSerdePlugin(); - init_ListSchema(); - init_MapSchema(); - init_OperationSchema(); - init_operation(); - init_ErrorSchema(); - init_NormalizedSchema(); - init_Schema(); - init_SimpleSchema(); - init_StructureSchema(); - init_sentinels(); - init_translateTraits(); - init_TypeRegistry(); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/schemaLogFilter.js -function schemaLogFilter(schema, data3) { - if (data3 == null) { - return data3; - } - const ns = NormalizedSchema.of(schema); - if (ns.getMergedTraits().sensitive) { - return SENSITIVE_STRING; - } - if (ns.isListSchema()) { - const isSensitive = !!ns.getValueSchema().getMergedTraits().sensitive; - if (isSensitive) { - return SENSITIVE_STRING; - } - } else if (ns.isMapSchema()) { - const isSensitive = !!ns.getKeySchema().getMergedTraits().sensitive || !!ns.getValueSchema().getMergedTraits().sensitive; - if (isSensitive) { - return SENSITIVE_STRING; - } - } else if (ns.isStructSchema() && typeof data3 === "object") { - const object = data3; - const newObject = {}; - for (const [member2, memberNs] of ns.structIterator()) { - if (object[member2] != null) { - newObject[member2] = schemaLogFilter(memberNs, object[member2]); - } - } - return newObject; - } - return data3; -} -var SENSITIVE_STRING; -var init_schemaLogFilter = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/schemaLogFilter.js"() { - init_schema(); - SENSITIVE_STRING = "***SensitiveInformation***"; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/command.js -var import_types21, Command, ClassBuilder; -var init_command = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/command.js"() { - import_types21 = __toESM(require_dist_cjs()); - init_MiddlewareStack(); - init_schemaLogFilter(); - Command = class { - middlewareStack = constructStack(); - schema; - static classBuilder() { - return new ClassBuilder(); - } - resolveMiddlewareWithContext(clientStack, configuration, options, { middlewareFn, clientName, commandName, inputFilterSensitiveLog, outputFilterSensitiveLog, smithyContext, additionalContext, CommandCtor }) { - for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) { - this.middlewareStack.use(mw); - } - const stack = clientStack.concat(this.middlewareStack); - const { logger: logger2 } = configuration; - const handlerExecutionContext = { - logger: logger2, - clientName, - commandName, - inputFilterSensitiveLog, - outputFilterSensitiveLog, - [import_types21.SMITHY_CONTEXT_KEY]: { - commandInstance: this, - ...smithyContext - }, - ...additionalContext - }; - const { requestHandler } = configuration; - let requestOptions = options ?? {}; - if (smithyContext.eventStream) { - requestOptions = { - isEventStream: true, - ...requestOptions - }; - } - return stack.resolve((request) => requestHandler.handle(request.request, requestOptions), handlerExecutionContext); - } - }; - ClassBuilder = class { - _init = () => { - }; - _ep = {}; - _middlewareFn = () => []; - _commandName = ""; - _clientName = ""; - _additionalContext = {}; - _smithyContext = {}; - _inputFilterSensitiveLog = void 0; - _outputFilterSensitiveLog = void 0; - _serializer = null; - _deserializer = null; - _operationSchema; - init(cb) { - this._init = cb; - } - ep(endpointParameterInstructions) { - this._ep = endpointParameterInstructions; - return this; - } - m(middlewareSupplier) { - this._middlewareFn = middlewareSupplier; - return this; - } - s(service, operation2, smithyContext = {}) { - this._smithyContext = { - service, - operation: operation2, - ...smithyContext - }; - return this; - } - c(additionalContext = {}) { - this._additionalContext = additionalContext; - return this; - } - n(clientName, commandName) { - this._clientName = clientName; - this._commandName = commandName; - return this; - } - f(inputFilter = (_) => _, outputFilter = (_) => _) { - this._inputFilterSensitiveLog = inputFilter; - this._outputFilterSensitiveLog = outputFilter; - return this; - } - ser(serializer) { - this._serializer = serializer; - return this; - } - de(deserializer) { - this._deserializer = deserializer; - return this; - } - sc(operation2) { - this._operationSchema = operation2; - this._smithyContext.operationSchema = operation2; - return this; - } - build() { - const closure = this; - let CommandRef; - return CommandRef = class extends Command { - input; - static getEndpointParameterInstructions() { - return closure._ep; - } - constructor(...[input]) { - super(); - this.input = input ?? {}; - closure._init(this); - this.schema = closure._operationSchema; - } - resolveMiddleware(stack, configuration, options) { - const op2 = closure._operationSchema; - const input = op2?.[4] ?? op2?.input; - const output = op2?.[5] ?? op2?.output; - return this.resolveMiddlewareWithContext(stack, configuration, options, { - CommandCtor: CommandRef, - middlewareFn: closure._middlewareFn, - clientName: closure._clientName, - commandName: closure._commandName, - inputFilterSensitiveLog: closure._inputFilterSensitiveLog ?? (op2 ? schemaLogFilter.bind(null, input) : (_) => _), - outputFilterSensitiveLog: closure._outputFilterSensitiveLog ?? (op2 ? schemaLogFilter.bind(null, output) : (_) => _), - smithyContext: closure._smithyContext, - additionalContext: closure._additionalContext - }); - } - serialize = closure._serializer; - deserialize = closure._deserializer; - }; - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/constants.js -var SENSITIVE_STRING2; -var init_constants3 = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/constants.js"() { - SENSITIVE_STRING2 = "***SensitiveInformation***"; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/create-aggregated-client.js -var createAggregatedClient; -var init_create_aggregated_client = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/create-aggregated-client.js"() { - createAggregatedClient = (commands5, Client3, options) => { - for (const [command, CommandCtor] of Object.entries(commands5)) { - const methodImpl = async function(args, optionsOrCb, cb) { - const command2 = new CommandCtor(args); - if (typeof optionsOrCb === "function") { - this.send(command2, optionsOrCb); - } else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expected http options but got ${typeof optionsOrCb}`); - this.send(command2, optionsOrCb || {}, cb); - } else { - return this.send(command2, optionsOrCb); - } - }; - const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, ""); - Client3.prototype[methodName] = methodImpl; - } - const { paginators = {}, waiters = {} } = options ?? {}; - for (const [paginatorName, paginatorFn] of Object.entries(paginators)) { - if (Client3.prototype[paginatorName] === void 0) { - Client3.prototype[paginatorName] = function(commandInput = {}, paginationConfiguration, ...rest) { - return paginatorFn({ - ...paginationConfiguration, - client: this - }, commandInput, ...rest); - }; - } - } - for (const [waiterName, waiterFn] of Object.entries(waiters)) { - if (Client3.prototype[waiterName] === void 0) { - Client3.prototype[waiterName] = async function(commandInput = {}, waiterConfiguration, ...rest) { - let config = waiterConfiguration; - if (typeof waiterConfiguration === "number") { - config = { - maxWaitTime: waiterConfiguration - }; - } - return waiterFn({ - ...config, - client: this - }, commandInput, ...rest); - }; - } - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/exceptions.js -var ServiceException, decorateServiceException; -var init_exceptions = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/exceptions.js"() { - ServiceException = class _ServiceException extends Error { - $fault; - $response; - $retryable; - $metadata; - constructor(options) { - super(options.message); - Object.setPrototypeOf(this, Object.getPrototypeOf(this).constructor.prototype); - this.name = options.name; - this.$fault = options.$fault; - this.$metadata = options.$metadata; - } - static isInstance(value) { - if (!value) - return false; - const candidate = value; - return _ServiceException.prototype.isPrototypeOf(candidate) || Boolean(candidate.$fault) && Boolean(candidate.$metadata) && (candidate.$fault === "client" || candidate.$fault === "server"); - } - static [Symbol.hasInstance](instance) { - if (!instance) - return false; - const candidate = instance; - if (this === _ServiceException) { - return _ServiceException.isInstance(instance); - } - if (_ServiceException.isInstance(instance)) { - if (candidate.name && this.name) { - return this.prototype.isPrototypeOf(instance) || candidate.name === this.name; - } - return this.prototype.isPrototypeOf(instance); - } - return false; - } - }; - decorateServiceException = (exception, additions = {}) => { - Object.entries(additions).filter(([, v]) => v !== void 0).forEach(([k5, v]) => { - if (exception[k5] == void 0 || exception[k5] === "") { - exception[k5] = v; - } - }); - const message = exception.message || exception.Message || "UnknownError"; - exception.message = message; - delete exception.Message; - return exception; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/default-error-handler.js -var throwDefaultError, withBaseException, deserializeMetadata; -var init_default_error_handler = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/default-error-handler.js"() { - init_exceptions(); - throwDefaultError = ({ output, parsedBody, exceptionCtor, errorCode }) => { - const $metadata = deserializeMetadata(output); - const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0; - const response = new exceptionCtor({ - name: parsedBody?.code || parsedBody?.Code || errorCode || statusCode || "UnknownError", - $fault: "client", - $metadata - }); - throw decorateServiceException(response, parsedBody); - }; - withBaseException = (ExceptionCtor) => { - return ({ output, parsedBody, errorCode }) => { - throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode }); - }; - }; - deserializeMetadata = (output) => ({ - httpStatusCode: output.statusCode, - requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], - extendedRequestId: output.headers["x-amz-id-2"], - cfId: output.headers["x-amz-cf-id"] - }); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/defaults-mode.js -var loadConfigsForDefaultMode; -var init_defaults_mode = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/defaults-mode.js"() { - loadConfigsForDefaultMode = (mode) => { - switch (mode) { - case "standard": - return { - retryMode: "standard", - connectionTimeout: 3100 - }; - case "in-region": - return { - retryMode: "standard", - connectionTimeout: 1100 - }; - case "cross-region": - return { - retryMode: "standard", - connectionTimeout: 3100 - }; - case "mobile": - return { - retryMode: "standard", - connectionTimeout: 3e4 - }; - default: - return {}; - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/emitWarningIfUnsupportedVersion.js -var warningEmitted, emitWarningIfUnsupportedVersion2; -var init_emitWarningIfUnsupportedVersion2 = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/emitWarningIfUnsupportedVersion.js"() { - warningEmitted = false; - emitWarningIfUnsupportedVersion2 = (version) => { - if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 16) { - warningEmitted = true; - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/checksum.js -var import_types22, knownAlgorithms, getChecksumConfiguration, resolveChecksumRuntimeConfig; -var init_checksum = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/checksum.js"() { - import_types22 = __toESM(require_dist_cjs()); - knownAlgorithms = Object.values(import_types22.AlgorithmId); - getChecksumConfiguration = (runtimeConfig) => { - const checksumAlgorithms = []; - for (const id in import_types22.AlgorithmId) { - const algorithmId = import_types22.AlgorithmId[id]; - if (runtimeConfig[algorithmId] === void 0) { - continue; - } - checksumAlgorithms.push({ - algorithmId: () => algorithmId, - checksumConstructor: () => runtimeConfig[algorithmId] - }); - } - for (const [id, ChecksumCtor] of Object.entries(runtimeConfig.checksumAlgorithms ?? {})) { - checksumAlgorithms.push({ - algorithmId: () => id, - checksumConstructor: () => ChecksumCtor - }); - } - return { - addChecksumAlgorithm(algo) { - runtimeConfig.checksumAlgorithms = runtimeConfig.checksumAlgorithms ?? {}; - const id = algo.algorithmId(); - const ctor = algo.checksumConstructor(); - if (knownAlgorithms.includes(id)) { - runtimeConfig.checksumAlgorithms[id.toUpperCase()] = ctor; - } else { - runtimeConfig.checksumAlgorithms[id] = ctor; - } - checksumAlgorithms.push(algo); - }, - checksumAlgorithms() { - return checksumAlgorithms; - } - }; - }; - resolveChecksumRuntimeConfig = (clientConfig) => { - const runtimeConfig = {}; - clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { - const id = checksumAlgorithm.algorithmId(); - if (knownAlgorithms.includes(id)) { - runtimeConfig[id] = checksumAlgorithm.checksumConstructor(); - } - }); - return runtimeConfig; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/retry.js -var getRetryConfiguration, resolveRetryRuntimeConfig; -var init_retry = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/retry.js"() { - getRetryConfiguration = (runtimeConfig) => { - return { - setRetryStrategy(retryStrategy) { - runtimeConfig.retryStrategy = retryStrategy; - }, - retryStrategy() { - return runtimeConfig.retryStrategy; - } - }; - }; - resolveRetryRuntimeConfig = (retryStrategyConfiguration) => { - const runtimeConfig = {}; - runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy(); - return runtimeConfig; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/defaultExtensionConfiguration.js -var getDefaultExtensionConfiguration, getDefaultClientConfiguration, resolveDefaultRuntimeConfig; -var init_defaultExtensionConfiguration = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/defaultExtensionConfiguration.js"() { - init_checksum(); - init_retry(); - getDefaultExtensionConfiguration = (runtimeConfig) => { - return Object.assign(getChecksumConfiguration(runtimeConfig), getRetryConfiguration(runtimeConfig)); - }; - getDefaultClientConfiguration = getDefaultExtensionConfiguration; - resolveDefaultRuntimeConfig = (config) => { - return Object.assign(resolveChecksumRuntimeConfig(config), resolveRetryRuntimeConfig(config)); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-array-if-single-item.js -var getArrayIfSingleItem; -var init_get_array_if_single_item = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-array-if-single-item.js"() { - getArrayIfSingleItem = (mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray]; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js -var getValueFromTextNode; -var init_get_value_from_text_node = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js"() { - getValueFromTextNode = (obj) => { - const textNodeName = "#text"; - for (const key in obj) { - if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== void 0) { - obj[key] = obj[key][textNodeName]; - } else if (typeof obj[key] === "object" && obj[key] !== null) { - obj[key] = getValueFromTextNode(obj[key]); - } - } - return obj; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/is-serializable-header-value.js -var isSerializableHeaderValue; -var init_is_serializable_header_value = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/is-serializable-header-value.js"() { - isSerializableHeaderValue = (value) => { - return value != null; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/NoOpLogger.js -var NoOpLogger; -var init_NoOpLogger = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/NoOpLogger.js"() { - NoOpLogger = class { - trace() { - } - debug() { - } - info() { - } - warn() { - } - error() { - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/object-mapping.js -function map2(arg0, arg1, arg2) { - let target; - let filter; - let instructions; - if (typeof arg1 === "undefined" && typeof arg2 === "undefined") { - target = {}; - instructions = arg0; - } else { - target = arg0; - if (typeof arg1 === "function") { - filter = arg1; - instructions = arg2; - return mapWithFilter(target, filter, instructions); - } else { - instructions = arg1; - } - } - for (const key of Object.keys(instructions)) { - if (!Array.isArray(instructions[key])) { - target[key] = instructions[key]; - continue; - } - applyInstruction(target, null, instructions, key); - } - return target; -} -var convertMap, take, mapWithFilter, applyInstruction, nonNullish, pass; -var init_object_mapping = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/object-mapping.js"() { - convertMap = (target) => { - const output = {}; - for (const [k5, v] of Object.entries(target || {})) { - output[k5] = [, v]; - } - return output; - }; - take = (source, instructions) => { - const out = {}; - for (const key in instructions) { - applyInstruction(out, source, instructions, key); - } - return out; - }; - mapWithFilter = (target, filter, instructions) => { - return map2(target, Object.entries(instructions).reduce((_instructions, [key, value]) => { - if (Array.isArray(value)) { - _instructions[key] = value; - } else { - if (typeof value === "function") { - _instructions[key] = [filter, value()]; - } else { - _instructions[key] = [filter, value]; - } - } - return _instructions; - }, {})); - }; - applyInstruction = (target, source, instructions, targetKey) => { - if (source !== null) { - let instruction = instructions[targetKey]; - if (typeof instruction === "function") { - instruction = [, instruction]; - } - const [filter2 = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction; - if (typeof filter2 === "function" && filter2(source[sourceKey]) || typeof filter2 !== "function" && !!filter2) { - target[targetKey] = valueFn(source[sourceKey]); - } - return; - } - let [filter, value] = instructions[targetKey]; - if (typeof value === "function") { - let _value; - const defaultFilterPassed = filter === void 0 && (_value = value()) != null; - const customFilterPassed = typeof filter === "function" && !!filter(void 0) || typeof filter !== "function" && !!filter; - if (defaultFilterPassed) { - target[targetKey] = _value; - } else if (customFilterPassed) { - target[targetKey] = value(); - } - } else { - const defaultFilterPassed = filter === void 0 && value != null; - const customFilterPassed = typeof filter === "function" && !!filter(value) || typeof filter !== "function" && !!filter; - if (defaultFilterPassed || customFilterPassed) { - target[targetKey] = value; - } - } - }; - nonNullish = (_) => _ != null; - pass = (_) => _; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/ser-utils.js -var serializeFloat, serializeDateTime; -var init_ser_utils = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/ser-utils.js"() { - serializeFloat = (value) => { - if (value !== value) { - return "NaN"; - } - switch (value) { - case Infinity: - return "Infinity"; - case -Infinity: - return "-Infinity"; - default: - return value; - } - }; - serializeDateTime = (date2) => date2.toISOString().replace(".000Z", "Z"); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/serde-json.js -var _json; -var init_serde_json = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/serde-json.js"() { - _json = (obj) => { - if (obj == null) { - return {}; - } - if (Array.isArray(obj)) { - return obj.filter((_) => _ != null).map(_json); - } - if (typeof obj === "object") { - const target = {}; - for (const key of Object.keys(obj)) { - if (obj[key] == null) { - continue; - } - target[key] = _json(obj[key]); - } - return target; - } - return obj; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/index.js -var client_exports = {}; -__export(client_exports, { - AlgorithmId: () => import_types22.AlgorithmId, - Client: () => Client, - Command: () => Command, - NoOpLogger: () => NoOpLogger, - SENSITIVE_STRING: () => SENSITIVE_STRING2, - ServiceException: () => ServiceException, - WaiterState: () => WaiterState, - _json: () => _json, - checkExceptions: () => checkExceptions, - constructStack: () => constructStack, - convertMap: () => convertMap, - createAggregatedClient: () => createAggregatedClient, - createWaiter: () => createWaiter, - decorateServiceException: () => decorateServiceException, - emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion2, - getArrayIfSingleItem: () => getArrayIfSingleItem, - getChecksumConfiguration: () => getChecksumConfiguration, - getDefaultClientConfiguration: () => getDefaultClientConfiguration, - getDefaultExtensionConfiguration: () => getDefaultExtensionConfiguration, - getRetryConfiguration: () => getRetryConfiguration, - getSmithyContext: () => getSmithyContext, - getValueFromTextNode: () => getValueFromTextNode, - invalidFunction: () => invalidFunction, - invalidProvider: () => invalidProvider, - isSerializableHeaderValue: () => isSerializableHeaderValue, - loadConfigsForDefaultMode: () => loadConfigsForDefaultMode, - map: () => map2, - normalizeProvider: () => normalizeProvider, - resolveChecksumRuntimeConfig: () => resolveChecksumRuntimeConfig, - resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig, - resolveRetryRuntimeConfig: () => resolveRetryRuntimeConfig, - schemaLogFilter: () => schemaLogFilter, - serializeDateTime: () => serializeDateTime, - serializeFloat: () => serializeFloat, - take: () => take, - throwDefaultError: () => throwDefaultError, - waiterServiceDefaults: () => waiterServiceDefaults, - withBaseException: () => withBaseException -}); -var init_client2 = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/index.js"() { - init_MiddlewareStack(); - init_getSmithyContext(); - init_normalizeProvider(); - init_invalidFunction(); - init_invalidProvider(); - init_createWaiter(); - init_waiter(); - init_client(); - init_command(); - init_constants3(); - init_create_aggregated_client(); - init_default_error_handler(); - init_defaults_mode(); - init_emitWarningIfUnsupportedVersion2(); - init_exceptions(); - init_defaultExtensionConfiguration(); - init_checksum(); - init_retry(); - init_get_array_if_single_item(); - init_get_value_from_text_node(); - init_is_serializable_header_value(); - init_NoOpLogger(); - init_object_mapping(); - init_schemaLogFilter(); - init_ser_utils(); - init_serde_json(); + init_transport(); + init_transport(); } }); @@ -31801,17 +28862,17 @@ var init_constants4 = __esm({ }); // node_modules/@smithy/core/dist-es/submodules/retry/service-error-classification/service-error-classification.js -function isNodeJsHttp2TransientError(error2) { - return error2.code === "ERR_HTTP2_STREAM_ERROR" && error2.message.includes("NGHTTP2_REFUSED_STREAM"); +function isNodeJsHttp2TransientError(error3) { + return error3.code === "ERR_HTTP2_STREAM_ERROR" && error3.message.includes("NGHTTP2_REFUSED_STREAM"); } var isRetryableByTrait, isClockSkewError, isClockSkewCorrectedError, isBrowserNetworkError, isThrottlingError, isTransientError, isServerError; var init_service_error_classification = __esm({ "node_modules/@smithy/core/dist-es/submodules/retry/service-error-classification/service-error-classification.js"() { init_constants4(); - isRetryableByTrait = (error2) => error2?.$retryable !== void 0; - isClockSkewError = (error2) => CLOCK_SKEW_ERROR_CODES.includes(error2.name); - isClockSkewCorrectedError = (error2) => error2.$metadata?.clockSkewCorrected; - isBrowserNetworkError = (error2) => { + isRetryableByTrait = (error3) => error3?.$retryable !== void 0; + isClockSkewError = (error3) => CLOCK_SKEW_ERROR_CODES.includes(error3.name); + isClockSkewCorrectedError = (error3) => error3.$metadata?.clockSkewCorrected; + isBrowserNetworkError = (error3) => { const errorMessages = /* @__PURE__ */ new Set([ "Failed to fetch", "NetworkError when attempting to fetch resource", @@ -31819,18 +28880,18 @@ var init_service_error_classification = __esm({ "Load failed", "Network request failed" ]); - const isValid = error2 && error2 instanceof TypeError; + const isValid = error3 && error3 instanceof TypeError; if (!isValid) { return false; } - return errorMessages.has(error2.message); + return errorMessages.has(error3.message); }; - isThrottlingError = (error2) => error2.$metadata?.httpStatusCode === 429 || THROTTLING_ERROR_CODES.includes(error2.name) || error2.$retryable?.throttling == true; - isTransientError = (error2, depth = 0) => isRetryableByTrait(error2) || isClockSkewCorrectedError(error2) || error2.name === "InvalidSignatureException" && error2.message?.includes("Signature expired") || TRANSIENT_ERROR_CODES.includes(error2.name) || NODEJS_TIMEOUT_ERROR_CODES.includes(error2?.code || "") || NODEJS_NETWORK_ERROR_CODES.includes(error2?.code || "") || TRANSIENT_ERROR_STATUS_CODES.includes(error2.$metadata?.httpStatusCode || 0) || isBrowserNetworkError(error2) || isNodeJsHttp2TransientError(error2) || error2.cause !== void 0 && depth <= 10 && isTransientError(error2.cause, depth + 1); - isServerError = (error2) => { - if (error2.$metadata?.httpStatusCode !== void 0) { - const statusCode = error2.$metadata.httpStatusCode; - if (500 <= statusCode && statusCode <= 599 && !isTransientError(error2)) { + isThrottlingError = (error3) => error3.$metadata?.httpStatusCode === 429 || THROTTLING_ERROR_CODES.includes(error3.name) || error3.$retryable?.throttling == true; + isTransientError = (error3, depth = 0) => isRetryableByTrait(error3) || isClockSkewCorrectedError(error3) || error3.name === "InvalidSignatureException" && error3.message?.includes("Signature expired") || TRANSIENT_ERROR_CODES.includes(error3.name) || NODEJS_TIMEOUT_ERROR_CODES.includes(error3?.code || "") || NODEJS_NETWORK_ERROR_CODES.includes(error3?.code || "") || TRANSIENT_ERROR_STATUS_CODES.includes(error3.$metadata?.httpStatusCode || 0) || isBrowserNetworkError(error3) || isNodeJsHttp2TransientError(error3) || error3.cause !== void 0 && depth <= 10 && isTransientError(error3.cause, depth + 1); + isServerError = (error3) => { + if (error3.$metadata?.httpStatusCode !== void 0) { + const statusCode = error3.$metadata.httpStatusCode; + if (500 <= statusCode && statusCode <= 599 && !isTransientError(error3)) { return true; } return false; @@ -31910,14 +28971,14 @@ var init_parseRetryAfterHeader = __esm({ var asSdkError; var init_util = __esm({ "node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/util.js"() { - asSdkError = (error2) => { - if (error2 instanceof Error) - return error2; - if (error2 instanceof Object) - return Object.assign(new Error(), error2); - if (typeof error2 === "string") - return new Error(error2); - return new Error(`AWS SDK error wrapper for ${error2}`); + asSdkError = (error3) => { + if (error3 instanceof Error) + return error3; + if (error3 instanceof Object) + return Object.assign(new Error(), error3); + if (typeof error3 === "string") + return new Error(error3); + return new Error(`AWS SDK error wrapper for ${error3}`); }; } }); @@ -32003,23 +29064,23 @@ var init_retryMiddleware = __esm({ init_util(); cooldown = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); isRetryStrategyV2 = (retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && typeof retryStrategy.recordSuccess !== "undefined"; - getRetryErrorInfo = (error2, logger2) => { + getRetryErrorInfo = (error3, logger2) => { const errorInfo = { - error: error2, - errorType: getRetryErrorType(error2) + error: error3, + errorType: getRetryErrorType(error3) }; - const retryAfterHint = parseRetryAfterHeader(error2.$response, logger2); + const retryAfterHint = parseRetryAfterHeader(error3.$response, logger2); if (retryAfterHint) { errorInfo.retryAfterHint = retryAfterHint; } return errorInfo; }; - getRetryErrorType = (error2) => { - if (isThrottlingError(error2)) + getRetryErrorType = (error3) => { + if (isThrottlingError(error3)) return "THROTTLING"; - if (isTransientError(error2)) + if (isTransientError(error3)) return "TRANSIENT"; - if (isServerError(error2)) + if (isServerError(error3)) return "SERVER_ERROR"; return "CLIENT_ERROR"; }; @@ -32315,7 +29376,7 @@ var init_StandardRetryStrategy = __esm({ async getMaxAttempts() { try { return await this.maxAttemptsProvider(); - } catch (error2) { + } catch (error3) { console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`); return DEFAULT_MAX_ATTEMPTS; } @@ -32414,13 +29475,13 @@ var init_defaultRetryQuota = __esm({ const retryCost = options?.retryCost ?? RETRY_COST; const timeoutRetryCost = options?.timeoutRetryCost ?? TIMEOUT_RETRY_COST; let availableCapacity = initialRetryTokens; - const getCapacityAmount = (error2) => error2.name === "TimeoutError" ? timeoutRetryCost : retryCost; - const hasRetryTokens = (error2) => getCapacityAmount(error2) <= availableCapacity; - const retrieveRetryTokens = (error2) => { - if (!hasRetryTokens(error2)) { + const getCapacityAmount = (error3) => error3.name === "TimeoutError" ? timeoutRetryCost : retryCost; + const hasRetryTokens = (error3) => getCapacityAmount(error3) <= availableCapacity; + const retrieveRetryTokens = (error3) => { + if (!hasRetryTokens(error3)) { throw new Error("No retry token available"); } - const capacityAmount = getCapacityAmount(error2); + const capacityAmount = getCapacityAmount(error3); availableCapacity -= capacityAmount; return capacityAmount; }; @@ -32451,11 +29512,11 @@ var defaultRetryDecider; var init_retryDecider = __esm({ "node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retry-pre-sra-deprecated/retryDecider.js"() { init_service_error_classification(); - defaultRetryDecider = (error2) => { - if (!error2) { + defaultRetryDecider = (error3) => { + if (!error3) { return false; } - return isRetryableByTrait(error2) || isClockSkewError(error2) || isThrottlingError(error2) || isTransientError(error2); + return isRetryableByTrait(error3) || isClockSkewError(error3) || isThrottlingError(error3) || isTransientError(error3); }; } }); @@ -32485,14 +29546,14 @@ var init_StandardRetryStrategy2 = __esm({ this.delayDecider = options?.delayDecider ?? defaultDelayDecider; this.retryQuota = options?.retryQuota ?? getDefaultRetryQuota(INITIAL_RETRY_TOKENS); } - shouldRetry(error2, attempts, maxAttempts) { - return attempts < maxAttempts && this.retryDecider(error2) && this.retryQuota.hasRetryTokens(error2); + shouldRetry(error3, attempts, maxAttempts) { + return attempts < maxAttempts && this.retryDecider(error3) && this.retryQuota.hasRetryTokens(error3); } async getMaxAttempts() { let maxAttempts; try { maxAttempts = await this.maxAttemptsProvider(); - } catch (error2) { + } catch (error3) { maxAttempts = DEFAULT_MAX_ATTEMPTS; } return maxAttempts; @@ -32834,7 +29895,7 @@ var init_loggerMiddleware = __esm({ metadata: $metadata }); return response; - } catch (error2) { + } catch (error3) { const { clientName, commandName, logger: logger2, dynamoDbDocumentClientOptions = {} } = context; const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions; const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog; @@ -32842,10 +29903,10 @@ var init_loggerMiddleware = __esm({ clientName, commandName, input: inputFilterSensitiveLog(args.input), - error: error2, - metadata: error2.$metadata + error: error3, + metadata: error3.$metadata }); - throw error2; + throw error3; } }; loggerMiddlewareOptions = { @@ -33040,19 +30101,10 @@ var init_getRecursionDetectionPlugin = __esm({ } }); -// node_modules/@smithy/core/dist-es/getSmithyContext.js -var import_types23, getSmithyContext2; -var init_getSmithyContext2 = __esm({ - "node_modules/@smithy/core/dist-es/getSmithyContext.js"() { - import_types23 = __toESM(require_dist_cjs()); - getSmithyContext2 = (context) => context[import_types23.SMITHY_CONTEXT_KEY] || (context[import_types23.SMITHY_CONTEXT_KEY] = {}); - } -}); - -// node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/resolveAuthOptions.js +// node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/resolveAuthOptions.js var resolveAuthOptions; var init_resolveAuthOptions = __esm({ - "node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/resolveAuthOptions.js"() { + "node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/resolveAuthOptions.js"() { resolveAuthOptions = (candidateAuthOptions, authSchemePreference) => { if (!authSchemePreference || authSchemePreference.length === 0) { return candidateAuthOptions; @@ -33076,7 +30128,7 @@ var init_resolveAuthOptions = __esm({ } }); -// node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +// node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js function convertHttpAuthSchemesToMap(httpAuthSchemes) { const map3 = /* @__PURE__ */ new Map(); for (const scheme of httpAuthSchemes) { @@ -33086,7 +30138,7 @@ function convertHttpAuthSchemesToMap(httpAuthSchemes) { } var httpAuthSchemeMiddleware; var init_httpAuthSchemeMiddleware = __esm({ - "node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js"() { + "node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js"() { init_client2(); init_resolveAuthOptions(); httpAuthSchemeMiddleware = (config, mwOptions) => (next, context) => async (args) => { @@ -33125,10 +30177,10 @@ var init_httpAuthSchemeMiddleware = __esm({ } }); -// node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js +// node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js var httpAuthSchemeEndpointRuleSetMiddlewareOptions, getHttpAuthSchemeEndpointRuleSetPlugin; var init_getHttpAuthSchemeEndpointRuleSetPlugin = __esm({ - "node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js"() { + "node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js"() { init_httpAuthSchemeMiddleware(); httpAuthSchemeEndpointRuleSetMiddlewareOptions = { step: "serialize", @@ -33149,10 +30201,10 @@ var init_getHttpAuthSchemeEndpointRuleSetPlugin = __esm({ } }); -// node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js +// node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js var httpAuthSchemeMiddlewareOptions, getHttpAuthSchemePlugin; var init_getHttpAuthSchemePlugin = __esm({ - "node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js"() { + "node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js"() { init_httpAuthSchemeMiddleware(); httpAuthSchemeMiddlewareOptions = { step: "serialize", @@ -33173,23 +30225,23 @@ var init_getHttpAuthSchemePlugin = __esm({ } }); -// node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/index.js +// node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/index.js var init_middleware_http_auth_scheme = __esm({ - "node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/index.js"() { + "node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/index.js"() { init_httpAuthSchemeMiddleware(); init_getHttpAuthSchemeEndpointRuleSetPlugin(); init_getHttpAuthSchemePlugin(); } }); -// node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js +// node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-signing/httpSigningMiddleware.js var defaultErrorHandler, defaultSuccessHandler, httpSigningMiddleware; var init_httpSigningMiddleware = __esm({ - "node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js"() { + "node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-signing/httpSigningMiddleware.js"() { init_client2(); init_protocols(); - defaultErrorHandler = (signingProperties) => (error2) => { - throw error2; + defaultErrorHandler = (signingProperties) => (error3) => { + throw error3; }; defaultSuccessHandler = (httpResponse, signingProperties) => { }; @@ -33213,10 +30265,10 @@ var init_httpSigningMiddleware = __esm({ } }); -// node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js +// node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-signing/getHttpSigningMiddleware.js var httpSigningMiddlewareOptions, getHttpSigningPlugin; var init_getHttpSigningMiddleware = __esm({ - "node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js"() { + "node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-signing/getHttpSigningMiddleware.js"() { init_httpSigningMiddleware(); httpSigningMiddlewareOptions = { step: "finalizeRequest", @@ -33235,9 +30287,9 @@ var init_getHttpSigningMiddleware = __esm({ } }); -// node_modules/@smithy/core/dist-es/middleware-http-signing/index.js +// node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-signing/index.js var init_middleware_http_signing = __esm({ - "node_modules/@smithy/core/dist-es/middleware-http-signing/index.js"() { + "node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-signing/index.js"() { init_httpSigningMiddleware(); init_getHttpSigningMiddleware(); } @@ -33256,7 +30308,7 @@ var init_normalizeProvider2 = __esm({ } }); -// node_modules/@smithy/core/dist-es/pagination/createPaginator.js +// node_modules/@smithy/core/dist-es/legacy-root-exports/pagination/createPaginator.js function createPaginator(ClientCtor, CommandCtor, inputTokenName, outputTokenName, pageSizeTokenName) { return async function* paginateOperation(config, input, ...additionalArguments) { const _input = input; @@ -33283,7 +30335,7 @@ function createPaginator(ClientCtor, CommandCtor, inputTokenName, outputTokenNam } var makePagedClientRequest, get; var init_createPaginator = __esm({ - "node_modules/@smithy/core/dist-es/pagination/createPaginator.js"() { + "node_modules/@smithy/core/dist-es/legacy-root-exports/pagination/createPaginator.js"() { makePagedClientRequest = async (CommandCtor, client, input, withCommand = (_) => _, ...args) => { let command = new CommandCtor(input); command = withCommand(command) ?? command; @@ -33303,13 +30355,6 @@ var init_createPaginator = __esm({ } }); -// node_modules/@smithy/core/dist-es/request-builder/requestBuilder.js -var init_requestBuilder2 = __esm({ - "node_modules/@smithy/core/dist-es/request-builder/requestBuilder.js"() { - init_protocols(); - } -}); - // node_modules/@smithy/core/dist-es/setFeature.js function setFeature3(context, feature, value) { if (!context.__smithy_context) { @@ -33326,10 +30371,10 @@ var init_setFeature2 = __esm({ } }); -// node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js +// node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/DefaultIdentityProviderConfig.js var DefaultIdentityProviderConfig; var init_DefaultIdentityProviderConfig = __esm({ - "node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js"() { + "node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/DefaultIdentityProviderConfig.js"() { DefaultIdentityProviderConfig = class { authSchemes = /* @__PURE__ */ new Map(); constructor(config) { @@ -33347,12 +30392,12 @@ var init_DefaultIdentityProviderConfig = __esm({ } }); -// node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js -var import_types24, HttpApiKeyAuthSigner; +// node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js +var import_types23, HttpApiKeyAuthSigner; var init_httpApiKeyAuth = __esm({ - "node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js"() { + "node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js"() { init_protocols(); - import_types24 = __toESM(require_dist_cjs()); + import_types23 = __toESM(require_dist_cjs()); HttpApiKeyAuthSigner = class { async sign(httpRequest, identity, signingProperties) { if (!signingProperties) { @@ -33368,9 +30413,9 @@ var init_httpApiKeyAuth = __esm({ throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined"); } const clonedRequest = HttpRequest.clone(httpRequest); - if (signingProperties.in === import_types24.HttpApiKeyAuthLocation.QUERY) { + if (signingProperties.in === import_types23.HttpApiKeyAuthLocation.QUERY) { clonedRequest.query[signingProperties.name] = identity.apiKey; - } else if (signingProperties.in === import_types24.HttpApiKeyAuthLocation.HEADER) { + } else if (signingProperties.in === import_types23.HttpApiKeyAuthLocation.HEADER) { clonedRequest.headers[signingProperties.name] = signingProperties.scheme ? `${signingProperties.scheme} ${identity.apiKey}` : identity.apiKey; } else { throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `" + signingProperties.in + "`"); @@ -33381,10 +30426,10 @@ var init_httpApiKeyAuth = __esm({ } }); -// node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js +// node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js var HttpBearerAuthSigner; var init_httpBearerAuth = __esm({ - "node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js"() { + "node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js"() { init_protocols(); HttpBearerAuthSigner = class { async sign(httpRequest, identity, signingProperties) { @@ -33399,10 +30444,10 @@ var init_httpBearerAuth = __esm({ } }); -// node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/noAuth.js +// node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/httpAuthSchemes/noAuth.js var NoAuthSigner; var init_noAuth = __esm({ - "node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/noAuth.js"() { + "node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/httpAuthSchemes/noAuth.js"() { NoAuthSigner = class { async sign(httpRequest, identity, signingProperties) { return httpRequest; @@ -33411,19 +30456,19 @@ var init_noAuth = __esm({ } }); -// node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/index.js +// node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/httpAuthSchemes/index.js var init_httpAuthSchemes = __esm({ - "node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/index.js"() { + "node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/httpAuthSchemes/index.js"() { init_httpApiKeyAuth(); init_httpBearerAuth(); init_noAuth(); } }); -// node_modules/@smithy/core/dist-es/util-identity-and-auth/memoizeIdentityProvider.js +// node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/memoizeIdentityProvider.js var createIsIdentityExpiredFunction, EXPIRATION_MS, isIdentityExpired, doesIdentityRequireRefresh, memoizeIdentityProvider; var init_memoizeIdentityProvider = __esm({ - "node_modules/@smithy/core/dist-es/util-identity-and-auth/memoizeIdentityProvider.js"() { + "node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/memoizeIdentityProvider.js"() { createIsIdentityExpiredFunction = (expirationMs) => function isIdentityExpired2(identity) { return doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs; }; @@ -33481,9 +30526,9 @@ var init_memoizeIdentityProvider = __esm({ } }); -// node_modules/@smithy/core/dist-es/util-identity-and-auth/index.js +// node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/index.js var init_util_identity_and_auth = __esm({ - "node_modules/@smithy/core/dist-es/util-identity-and-auth/index.js"() { + "node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/index.js"() { init_DefaultIdentityProviderConfig(); init_httpAuthSchemes(); init_memoizeIdentityProvider(); @@ -33504,7 +30549,7 @@ __export(dist_es_exports, { getHttpAuthSchemeEndpointRuleSetPlugin: () => getHttpAuthSchemeEndpointRuleSetPlugin, getHttpAuthSchemePlugin: () => getHttpAuthSchemePlugin, getHttpSigningPlugin: () => getHttpSigningPlugin, - getSmithyContext: () => getSmithyContext2, + getSmithyContext: () => getSmithyContext, httpAuthSchemeEndpointRuleSetMiddlewareOptions: () => httpAuthSchemeEndpointRuleSetMiddlewareOptions, httpAuthSchemeMiddleware: () => httpAuthSchemeMiddleware, httpAuthSchemeMiddlewareOptions: () => httpAuthSchemeMiddlewareOptions, @@ -33518,12 +30563,12 @@ __export(dist_es_exports, { }); var init_dist_es = __esm({ "node_modules/@smithy/core/dist-es/index.js"() { - init_getSmithyContext2(); + init_transport(); init_middleware_http_auth_scheme(); init_middleware_http_signing(); init_normalizeProvider2(); init_createPaginator(); - init_requestBuilder2(); + init_protocols(); init_setFeature2(); init_util_identity_and_auth(); } @@ -35037,18 +32082,18 @@ function stsRegionDefaultResolver(loaderConfig = {}) { return loadConfig({ ...NODE_REGION_CONFIG_OPTIONS, async default() { - if (!warning.silence) { + if (!warning2.silence) { console.warn("@aws-sdk - WARN - default STS region of us-east-1 used. See @aws-sdk/credential-providers README and set a region explicitly."); } return "us-east-1"; } }, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }); } -var warning; +var warning2; var init_stsRegionDefaultResolver = __esm({ "node_modules/@aws-sdk/core/dist-es/submodules/client/region-config-resolver/stsRegionDefaultResolver.js"() { init_config2(); - warning = { + warning2 = { silence: false }; } @@ -35125,7 +32170,7 @@ __export(client_exports2, { setTokenFeature: () => setTokenFeature, state: () => state, stsRegionDefaultResolver: () => stsRegionDefaultResolver, - stsRegionWarning: () => warning, + stsRegionWarning: () => warning2, toEndpointV1: () => toEndpointV12, useDefaultPartitionInfo: () => useDefaultPartitionInfo, userAgentMiddleware: () => userAgentMiddleware @@ -35265,18 +32310,18 @@ var init_AwsSdkSigV4Signer = __esm({ return signedRequest; } errorHandler(signingProperties) { - return (error2) => { - const serverTime = error2.ServerTime ?? getDateHeader(error2.$response); + return (error3) => { + const serverTime = error3.ServerTime ?? getDateHeader(error3.$response); if (serverTime) { const config = throwSigningPropertyError("config", signingProperties.config); const initialSystemClockOffset = config.systemClockOffset; config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset); const clockSkewCorrected = config.systemClockOffset !== initialSystemClockOffset; - if (clockSkewCorrected && error2.$metadata) { - error2.$metadata.clockSkewCorrected = true; + if (clockSkewCorrected && error3.$metadata) { + error3.$metadata.clockSkewCorrected = true; } } - throw error2; + throw error3; }; } successHandler(httpResponse, signingProperties) { @@ -36580,7 +33625,7 @@ var require_package = __commonJS({ module2.exports = { name: "@aws-sdk/client-sts", description: "AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native", - version: "3.1053.0", + version: "3.1049.0", scripts: { build: "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs", "build:cjs": "node ../../scripts/compilation/inline client-sts", @@ -36606,18 +33651,18 @@ var require_package = __commonJS({ dependencies: { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "^3.974.13", - "@aws-sdk/credential-provider-node": "^3.972.44", - "@aws-sdk/signature-v4-multi-region": "^3.996.28", - "@aws-sdk/types": "^3.973.9", - "@smithy/core": "^3.24.3", - "@smithy/fetch-http-handler": "^5.4.3", - "@smithy/node-http-handler": "^4.7.3", - "@smithy/types": "^4.14.2", + "@aws-sdk/core": "^3.974.12", + "@aws-sdk/credential-provider-node": "^3.972.43", + "@aws-sdk/signature-v4-multi-region": "^3.996.27", + "@aws-sdk/types": "^3.973.8", + "@smithy/core": "^3.24.2", + "@smithy/fetch-http-handler": "^5.4.2", + "@smithy/node-http-handler": "^4.7.2", + "@smithy/types": "^4.14.1", tslib: "^2.6.2" }, devDependencies: { - "@smithy/snapshot-testing": "^2.1.3", + "@smithy/snapshot-testing": "^2.1.2", "@tsconfig/node20": "20.1.8", "@types/node": "^20.14.8", concurrently: "7.0.0", @@ -36993,12 +34038,12 @@ For more information, please visit: ` + STATIC_STABILITY_DOC_URL); let token; try { token = (await getMetadataToken({ ...endpoint, timeout })).toString(); - } catch (error2) { - if (error2?.statusCode === 400) { - throw Object.assign(error2, { + } catch (error3) { + if (error3?.statusCode === 400) { + throw Object.assign(error3, { message: "EC2 Metadata token request returned error" }); - } else if (error2.message === "TimeoutError" || [403, 404, 405].includes(error2.statusCode)) { + } else if (error3.message === "TimeoutError" || [403, 404, 405].includes(error3.statusCode)) { disableFetchToken = true; } logger2?.debug("AWS SDK Instance Metadata", "using v1 fallback (initial)"); @@ -37124,12 +34169,12 @@ var require_dist_cjs9 = __commonJS({ return timing.setTimeout(() => { let msg = `@smithy/node-http-handler - [${throwOnRequestTimeout ? "ERROR" : "WARN"}] a request has exceeded the configured ${timeoutInMs} ms requestTimeout.`; if (throwOnRequestTimeout) { - const error2 = Object.assign(new Error(msg), { + const error3 = Object.assign(new Error(msg), { name: "TimeoutError", code: "ETIMEDOUT" }); - req.destroy(error2); - reject(error2); + req.destroy(error3); + reject(error3); } else { msg += ` Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.`; logger2?.warn?.(msg); @@ -37439,9 +34484,9 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf socketAcquisitionWarningTimeout, throwOnRequestTimeout, httpAgentProvider: async () => { - const { Agent: Agent7, request } = await import("node:http"); + const { Agent: Agent9, request } = await import("node:http"); hRequest = request; - hAgent = Agent7; + hAgent = Agent9; if (httpAgent instanceof hAgent || typeof httpAgent?.destroy === "function") { this.externalAgent = true; return httpAgent; @@ -38176,7 +35221,7 @@ var init_package = __esm({ "node_modules/@aws-sdk/nested-clients/package.json"() { package_default = { name: "@aws-sdk/nested-clients", - version: "3.997.11", + version: "3.997.10", description: "Nested clients for AWS SDK packages.", main: "./dist-cjs/index.js", module: "./dist-es/index.js", @@ -38205,13 +35250,13 @@ var init_package = __esm({ dependencies: { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "^3.974.13", - "@aws-sdk/signature-v4-multi-region": "^3.996.28", - "@aws-sdk/types": "^3.973.9", - "@smithy/core": "^3.24.3", - "@smithy/fetch-http-handler": "^5.4.3", - "@smithy/node-http-handler": "^4.7.3", - "@smithy/types": "^4.14.2", + "@aws-sdk/core": "^3.974.12", + "@aws-sdk/signature-v4-multi-region": "^3.996.27", + "@aws-sdk/types": "^3.973.8", + "@smithy/core": "^3.24.2", + "@smithy/fetch-http-handler": "^5.4.2", + "@smithy/node-http-handler": "^4.7.2", + "@smithy/types": "^4.14.1", tslib: "^2.6.2" }, devDependencies: { @@ -39415,20 +36460,20 @@ var init_ProtocolLib = __esm({ decorateServiceException(exception, additions = {}) { if (this.queryCompat) { const msg = exception.Message ?? additions.Message; - const error2 = decorateServiceException(exception, additions); + const error3 = decorateServiceException(exception, additions); if (msg) { - error2.message = msg; + error3.message = msg; } - const errorObj = error2.Error ?? {}; - errorObj.Type = error2.Error?.Type; - errorObj.Code = error2.Error?.Code; - errorObj.Message = error2.Error?.message ?? error2.Error?.Message ?? msg; - error2.Error = errorObj; - const reqId = error2.$metadata.requestId; + const errorObj = error3.Error ?? {}; + errorObj.Type = error3.Error?.Type; + errorObj.Code = error3.Error?.Code; + errorObj.Message = error3.Error?.message ?? error3.Error?.Message ?? msg; + error3.Error = errorObj; + const reqId = error3.$metadata.requestId; if (reqId) { - error2.RequestId = reqId; + error3.RequestId = reqId; } - return error2; + return error3; } return decorateServiceException(exception, additions); } @@ -39539,15 +36584,15 @@ var init_coercing_serializers = __esm({ return val; } if (typeof val === "number" || typeof val === "bigint") { - const warning2 = new Error(`Received number ${val} where a string was expected.`); - warning2.name = "Warning"; - console.warn(warning2); + const warning3 = new Error(`Received number ${val} where a string was expected.`); + warning3.name = "Warning"; + console.warn(warning3); return String(val); } if (typeof val === "boolean") { - const warning2 = new Error(`Received boolean ${val} where a string was expected.`); - warning2.name = "Warning"; - console.warn(warning2); + const warning3 = new Error(`Received boolean ${val} where a string was expected.`); + warning3.name = "Warning"; + console.warn(warning3); return String(val); } return val; @@ -39561,9 +36606,9 @@ var init_coercing_serializers = __esm({ if (typeof val === "string") { const lowercase = val.toLowerCase(); if (val !== "" && lowercase !== "false" && lowercase !== "true") { - const warning2 = new Error(`Received string "${val}" where a boolean was expected.`); - warning2.name = "Warning"; - console.warn(warning2); + const warning3 = new Error(`Received string "${val}" where a boolean was expected.`); + warning3.name = "Warning"; + console.warn(warning3); } return val !== "" && lowercase !== "false"; } @@ -39578,9 +36623,9 @@ var init_coercing_serializers = __esm({ if (typeof val === "string") { const num = Number(val); if (num.toString() !== val) { - const warning2 = new Error(`Received string "${val}" where a number was expected.`); - warning2.name = "Warning"; - console.warn(warning2); + const warning3 = new Error(`Received string "${val}" where a number was expected.`); + warning3.name = "Warning"; + console.warn(warning3); return val; } return num; @@ -44149,8 +41194,8 @@ var init_CreateTokenCommand = __esm({ init_endpoints(); init_EndpointParameters(); init_schemas_0(); - CreateTokenCommand = class extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o2) { - return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())]; + CreateTokenCommand = class extends Command2.classBuilder().ep(commonParams).m(function(Command3, cs, config, o2) { + return [getEndpointPlugin(config, Command3.getEndpointParameterInstructions())]; }).s("AWSSSOOIDCService", "CreateToken", {}).n("SSOOIDCClient", "CreateTokenCommand").sc(CreateToken$).build() { }; } @@ -44204,7 +41249,7 @@ var init_models_0 = __esm({ // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/index.js var sso_oidc_exports = {}; __export(sso_oidc_exports, { - $Command: () => Command, + $Command: () => Command2, AccessDeniedException: () => AccessDeniedException, AccessDeniedException$: () => AccessDeniedException$, AccessDeniedExceptionReason: () => AccessDeniedExceptionReason, @@ -44306,11 +41351,11 @@ var require_dist_cjs12 = __commonJS({ throw new config.TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, false); } }; - var { writeFile } = node_fs.promises; + var { writeFile: writeFile2 } = node_fs.promises; var writeSSOTokenToFile = (id, ssoToken) => { const tokenFilepath = config.getSSOTokenFilepath(id); const tokenString = JSON.stringify(ssoToken, null, 2); - return writeFile(tokenFilepath, tokenString); + return writeFile2(tokenFilepath, tokenString); }; var lastRefreshAttemptTime = /* @__PURE__ */ new Date(0); var fromSso = (init = {}) => async ({ callerClientConfig } = {}) => { @@ -44371,13 +41416,13 @@ var require_dist_cjs12 = __commonJS({ expiresAt: newTokenExpiration.toISOString(), refreshToken: newSsoOidcToken.refreshToken }); - } catch (error2) { + } catch (error3) { } return { token: newSsoOidcToken.accessToken, expiration: newTokenExpiration }; - } catch (error2) { + } catch (error3) { validateTokenExpiry(existingToken); return existingToken; } @@ -44973,8 +42018,8 @@ var init_GetRoleCredentialsCommand = __esm({ init_endpoints(); init_EndpointParameters2(); init_schemas_02(); - GetRoleCredentialsCommand = class extends Command.classBuilder().ep(commonParams2).m(function(Command2, cs, config, o2) { - return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())]; + GetRoleCredentialsCommand = class extends Command2.classBuilder().ep(commonParams2).m(function(Command3, cs, config, o2) { + return [getEndpointPlugin(config, Command3.getEndpointParameterInstructions())]; }).s("SWBPortalService", "GetRoleCredentials", {}).n("SSOClient", "GetRoleCredentialsCommand").sc(GetRoleCredentials$).build() { }; } @@ -45012,7 +42057,7 @@ var init_models_02 = __esm({ // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/index.js var sso_exports = {}; __export(sso_exports, { - $Command: () => Command, + $Command: () => Command2, GetRoleCredentials$: () => GetRoleCredentials$, GetRoleCredentialsCommand: () => GetRoleCredentialsCommand, GetRoleCredentialsRequest$: () => GetRoleCredentialsRequest$, @@ -45863,8 +42908,8 @@ var init_CreateOAuth2TokenCommand = __esm({ init_endpoints(); init_EndpointParameters3(); init_schemas_03(); - CreateOAuth2TokenCommand = class extends Command.classBuilder().ep(commonParams3).m(function(Command2, cs, config, o2) { - return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())]; + CreateOAuth2TokenCommand = class extends Command2.classBuilder().ep(commonParams3).m(function(Command3, cs, config, o2) { + return [getEndpointPlugin(config, Command3.getEndpointParameterInstructions())]; }).s("Signin", "CreateOAuth2Token", {}).n("SigninClient", "CreateOAuth2TokenCommand").sc(CreateOAuth2Token$).build() { }; } @@ -45917,7 +42962,7 @@ var init_models_03 = __esm({ // node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/index.js var signin_exports = {}; __export(signin_exports, { - $Command: () => Command, + $Command: () => Command2, AccessDeniedException: () => AccessDeniedException2, AccessDeniedException$: () => AccessDeniedException$2, AccessToken$: () => AccessToken$, @@ -46060,9 +43105,9 @@ var require_dist_cjs14 = __commonJS({ accountId: newAccessToken.accountId, expiration }; - } catch (error2) { - if (error2.name === "AccessDeniedException") { - const errorType = error2.error; + } catch (error3) { + if (error3.name === "AccessDeniedException") { + const errorType = error3.error; let message; switch (errorType) { case "TOKEN_EXPIRED": @@ -46075,11 +43120,11 @@ var require_dist_cjs14 = __commonJS({ message = "Unable to refresh credentials due to insufficient permissions. You may be missing permission for the 'CreateOAuth2Token' action."; break; default: - message = `Failed to refresh token: ${String(error2)}. Please re-authenticate using \`aws login\``; + message = `Failed to refresh token: ${String(error3)}. Please re-authenticate using \`aws login\``; } throw new config.CredentialsProviderError(message, { logger: this.logger, tryNextLink: false }); } - throw new config.CredentialsProviderError(`Failed to refresh token: ${String(error2)}. Please re-authenticate using aws login`, { logger: this.logger }); + throw new config.CredentialsProviderError(`Failed to refresh token: ${String(error3)}. Please re-authenticate using aws login`, { logger: this.logger }); } } async loadToken() { @@ -46103,8 +43148,8 @@ var require_dist_cjs14 = __commonJS({ }); } return token; - } catch (error2) { - throw new config.CredentialsProviderError(`Failed to load token from ${tokenFilePath}: ${String(error2)}`, { + } catch (error3) { + throw new config.CredentialsProviderError(`Failed to load token from ${tokenFilePath}: ${String(error3)}`, { logger: this.logger, tryNextLink: false }); @@ -46115,7 +43160,7 @@ var require_dist_cjs14 = __commonJS({ const directory = node_path.dirname(tokenFilePath); try { await node_fs.promises.mkdir(directory, { recursive: true }); - } catch (error2) { + } catch (error3) { } await node_fs.promises.writeFile(tokenFilePath, JSON.stringify(token, null, 2), "utf8"); } @@ -46206,8 +43251,8 @@ var require_dist_cjs14 = __commonJS({ const rawSignature = this.derToRawSignature(asn1Signature); const signatureB64 = rawSignature.toString("base64url"); return `${message}.${signatureB64}`; - } catch (error2) { - throw new config.CredentialsProviderError(`Failed to generate Dpop proof: ${error2 instanceof Error ? error2.message : String(error2)}`, { logger: this.logger, tryNextLink: false }); + } catch (error3) { + throw new config.CredentialsProviderError(`Failed to generate Dpop proof: ${error3 instanceof Error ? error3.message : String(error3)}`, { logger: this.logger, tryNextLink: false }); } } }; @@ -47135,8 +44180,8 @@ var init_AssumeRoleCommand = __esm({ init_endpoints(); init_EndpointParameters4(); init_schemas_04(); - AssumeRoleCommand = class extends Command.classBuilder().ep(commonParams4).m(function(Command2, cs, config, o2) { - return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())]; + AssumeRoleCommand = class extends Command2.classBuilder().ep(commonParams4).m(function(Command3, cs, config, o2) { + return [getEndpointPlugin(config, Command3.getEndpointParameterInstructions())]; }).s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}).n("STSClient", "AssumeRoleCommand").sc(AssumeRole$).build() { }; } @@ -47150,8 +44195,8 @@ var init_AssumeRoleWithWebIdentityCommand = __esm({ init_endpoints(); init_EndpointParameters4(); init_schemas_04(); - AssumeRoleWithWebIdentityCommand = class extends Command.classBuilder().ep(commonParams4).m(function(Command2, cs, config, o2) { - return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())]; + AssumeRoleWithWebIdentityCommand = class extends Command2.classBuilder().ep(commonParams4).m(function(Command3, cs, config, o2) { + return [getEndpointPlugin(config, Command3.getEndpointParameterInstructions())]; }).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}).n("STSClient", "AssumeRoleWithWebIdentityCommand").sc(AssumeRoleWithWebIdentity$).build() { }; } @@ -47329,7 +44374,7 @@ var init_defaultRoleAssumers = __esm({ // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/index.js var sts_exports = {}; __export(sts_exports, { - $Command: () => Command, + $Command: () => Command2, AssumeRole$: () => AssumeRole$, AssumeRoleCommand: () => AssumeRoleCommand, AssumeRoleRequest$: () => AssumeRoleRequest$, @@ -47432,8 +44477,8 @@ var require_dist_cjs15 = __commonJS({ throw Error(`Profile ${profileName} credential_process returned invalid JSON.`); } return getValidatedProcessCredentials(profileName, data3, profiles); - } catch (error2) { - throw new config.CredentialsProviderError(error2.message, { logger: logger2 }); + } catch (error3) { + throw new config.CredentialsProviderError(error3.message, { logger: logger2 }); } } else { throw new config.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger: logger2 }); @@ -48809,7 +45854,7 @@ var require_dist_cjs19 = __commonJS({ "node_modules/@aws-sdk/client-sts/dist-cjs/index.js"(exports2) { "use strict"; var client$1 = (init_client3(), __toCommonJS(client_exports2)); - var core5 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var core = (init_dist_es(), __toCommonJS(dist_es_exports)); var client = (init_client2(), __toCommonJS(client_exports)); var config = (init_config2(), __toCommonJS(config_exports)); var endpoints = (init_endpoints(), __toCommonJS(endpoints_exports)); @@ -48900,61 +45945,61 @@ var require_dist_cjs19 = __commonJS({ this.middlewareStack.use(client$1.getHostHeaderPlugin(this.config)); this.middlewareStack.use(client$1.getLoggerPlugin(this.config)); this.middlewareStack.use(client$1.getRecursionDetectionPlugin(this.config)); - this.middlewareStack.use(core5.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, { + this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, { httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultSTSHttpAuthSchemeParametersProvider, - identityProviderConfigProvider: async (config2) => new core5.DefaultIdentityProviderConfig({ + identityProviderConfigProvider: async (config2) => new core.DefaultIdentityProviderConfig({ "aws.auth#sigv4": config2.credentials, "aws.auth#sigv4a": config2.credentials }) })); - this.middlewareStack.use(core5.getHttpSigningPlugin(this.config)); + this.middlewareStack.use(core.getHttpSigningPlugin(this.config)); } destroy() { super.destroy(); } }; - var AssumeRoleCommand3 = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command2, cs, config2, o2) { - return [endpoints.getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())]; + var AssumeRoleCommand3 = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command3, cs, config2, o2) { + return [endpoints.getEndpointPlugin(config2, Command3.getEndpointParameterInstructions())]; }).s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}).n("STSClient", "AssumeRoleCommand").sc(schemas_0.AssumeRole$).build() { }; - var AssumeRoleWithSAMLCommand = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command2, cs, config2, o2) { - return [endpoints.getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())]; + var AssumeRoleWithSAMLCommand = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command3, cs, config2, o2) { + return [endpoints.getEndpointPlugin(config2, Command3.getEndpointParameterInstructions())]; }).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithSAML", {}).n("STSClient", "AssumeRoleWithSAMLCommand").sc(schemas_0.AssumeRoleWithSAML$).build() { }; - var AssumeRoleWithWebIdentityCommand3 = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command2, cs, config2, o2) { - return [endpoints.getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())]; + var AssumeRoleWithWebIdentityCommand3 = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command3, cs, config2, o2) { + return [endpoints.getEndpointPlugin(config2, Command3.getEndpointParameterInstructions())]; }).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}).n("STSClient", "AssumeRoleWithWebIdentityCommand").sc(schemas_0.AssumeRoleWithWebIdentity$).build() { }; - var AssumeRootCommand = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command2, cs, config2, o2) { - return [endpoints.getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())]; + var AssumeRootCommand = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command3, cs, config2, o2) { + return [endpoints.getEndpointPlugin(config2, Command3.getEndpointParameterInstructions())]; }).s("AWSSecurityTokenServiceV20110615", "AssumeRoot", {}).n("STSClient", "AssumeRootCommand").sc(schemas_0.AssumeRoot$).build() { }; - var DecodeAuthorizationMessageCommand = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command2, cs, config2, o2) { - return [endpoints.getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())]; + var DecodeAuthorizationMessageCommand = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command3, cs, config2, o2) { + return [endpoints.getEndpointPlugin(config2, Command3.getEndpointParameterInstructions())]; }).s("AWSSecurityTokenServiceV20110615", "DecodeAuthorizationMessage", {}).n("STSClient", "DecodeAuthorizationMessageCommand").sc(schemas_0.DecodeAuthorizationMessage$).build() { }; - var GetAccessKeyInfoCommand = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command2, cs, config2, o2) { - return [endpoints.getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())]; + var GetAccessKeyInfoCommand = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command3, cs, config2, o2) { + return [endpoints.getEndpointPlugin(config2, Command3.getEndpointParameterInstructions())]; }).s("AWSSecurityTokenServiceV20110615", "GetAccessKeyInfo", {}).n("STSClient", "GetAccessKeyInfoCommand").sc(schemas_0.GetAccessKeyInfo$).build() { }; - var GetCallerIdentityCommand2 = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command2, cs, config2, o2) { - return [endpoints.getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())]; + var GetCallerIdentityCommand2 = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command3, cs, config2, o2) { + return [endpoints.getEndpointPlugin(config2, Command3.getEndpointParameterInstructions())]; }).s("AWSSecurityTokenServiceV20110615", "GetCallerIdentity", {}).n("STSClient", "GetCallerIdentityCommand").sc(schemas_0.GetCallerIdentity$).build() { }; - var GetDelegatedAccessTokenCommand = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command2, cs, config2, o2) { - return [endpoints.getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())]; + var GetDelegatedAccessTokenCommand = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command3, cs, config2, o2) { + return [endpoints.getEndpointPlugin(config2, Command3.getEndpointParameterInstructions())]; }).s("AWSSecurityTokenServiceV20110615", "GetDelegatedAccessToken", {}).n("STSClient", "GetDelegatedAccessTokenCommand").sc(schemas_0.GetDelegatedAccessToken$).build() { }; - var GetFederationTokenCommand = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command2, cs, config2, o2) { - return [endpoints.getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())]; + var GetFederationTokenCommand = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command3, cs, config2, o2) { + return [endpoints.getEndpointPlugin(config2, Command3.getEndpointParameterInstructions())]; }).s("AWSSecurityTokenServiceV20110615", "GetFederationToken", {}).n("STSClient", "GetFederationTokenCommand").sc(schemas_0.GetFederationToken$).build() { }; - var GetSessionTokenCommand = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command2, cs, config2, o2) { - return [endpoints.getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())]; + var GetSessionTokenCommand = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command3, cs, config2, o2) { + return [endpoints.getEndpointPlugin(config2, Command3.getEndpointParameterInstructions())]; }).s("AWSSecurityTokenServiceV20110615", "GetSessionToken", {}).n("STSClient", "GetSessionTokenCommand").sc(schemas_0.GetSessionToken$).build() { }; - var GetWebIdentityTokenCommand = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command2, cs, config2, o2) { - return [endpoints.getEndpointPlugin(config2, Command2.getEndpointParameterInstructions())]; + var GetWebIdentityTokenCommand = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command3, cs, config2, o2) { + return [endpoints.getEndpointPlugin(config2, Command3.getEndpointParameterInstructions())]; }).s("AWSSecurityTokenServiceV20110615", "GetWebIdentityToken", {}).n("STSClient", "GetWebIdentityTokenCommand").sc(schemas_0.GetWebIdentityToken$).build() { }; var commands5 = { @@ -49134,15 +46179,15 @@ var init_helpers = __esm({ }); // node_modules/proxy-agent/node_modules/agent-base/dist/index.js -var net, http, import_https, INTERNAL, Agent2; +var net, http2, import_https, INTERNAL, Agent4; var init_dist = __esm({ "node_modules/proxy-agent/node_modules/agent-base/dist/index.js"() { net = __toESM(require("net"), 1); - http = __toESM(require("http"), 1); + http2 = __toESM(require("http"), 1); import_https = require("https"); init_helpers(); INTERNAL = /* @__PURE__ */ Symbol("AgentBaseInternalState"); - Agent2 = class extends http.Agent { + Agent4 = class extends http2.Agent { constructor(opts) { super(opts); this[INTERNAL] = {}; @@ -49404,11 +46449,11 @@ var require_common = __commonJS({ let enableOverride = null; let namespacesCache; let enabledCache; - function debug19(...args) { - if (!debug19.enabled) { + function debug17(...args) { + if (!debug17.enabled) { return; } - const self = debug19; + const self = debug17; const curr = Number(/* @__PURE__ */ new Date()); const ms = curr - (prevTime || curr); self.diff = ms; @@ -49438,12 +46483,12 @@ var require_common = __commonJS({ const logFn = self.log || createDebug16.log; logFn.apply(self, args); } - debug19.namespace = namespace; - debug19.useColors = createDebug16.useColors(); - debug19.color = createDebug16.selectColor(namespace); - debug19.extend = extend; - debug19.destroy = createDebug16.destroy; - Object.defineProperty(debug19, "enabled", { + debug17.namespace = namespace; + debug17.useColors = createDebug16.useColors(); + debug17.color = createDebug16.selectColor(namespace); + debug17.extend = extend; + debug17.destroy = createDebug16.destroy; + Object.defineProperty(debug17, "enabled", { enumerable: true, configurable: false, get: () => { @@ -49461,9 +46506,9 @@ var require_common = __commonJS({ } }); if (typeof createDebug16.init === "function") { - createDebug16.init(debug19); + createDebug16.init(debug17); } - return debug19; + return debug17; } function extend(namespace, delimiter) { const newDebug = createDebug16(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace); @@ -49687,14 +46732,14 @@ var require_browser = __commonJS({ } else { exports2.storage.removeItem("debug"); } - } catch (error2) { + } catch (error3) { } } function load() { let r5; try { r5 = exports2.storage.getItem("debug") || exports2.storage.getItem("DEBUG"); - } catch (error2) { + } catch (error3) { } if (!r5 && typeof process !== "undefined" && "env" in process) { r5 = process.env.DEBUG; @@ -49704,7 +46749,7 @@ var require_browser = __commonJS({ function localstorage() { try { return localStorage; - } catch (error2) { + } catch (error3) { } } module2.exports = require_common()(exports2); @@ -49712,8 +46757,8 @@ var require_browser = __commonJS({ formatters.j = function(v) { try { return JSON.stringify(v); - } catch (error2) { - return "[UnexpectedJSONParseError]: " + error2.message; + } catch (error3) { + return "[UnexpectedJSONParseError]: " + error3.message; } }; } @@ -49736,7 +46781,7 @@ var require_has_flag = __commonJS({ var require_supports_color = __commonJS({ "node_modules/supports-color/index.js"(exports2, module2) { "use strict"; - var os3 = require("os"); + var os7 = require("os"); var tty = require("tty"); var hasFlag = require_has_flag(); var { env: env2 } = process; @@ -49784,7 +46829,7 @@ var require_supports_color = __commonJS({ return min; } if (process.platform === "win32") { - const osRelease = os3.release().split("."); + const osRelease = os7.release().split("."); if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { return Number(osRelease[2]) >= 14931 ? 3 : 2; } @@ -49933,7 +46978,7 @@ var require_node = __commonJS({ 221 ]; } - } catch (error2) { + } catch (error3) { } exports2.inspectOpts = Object.keys(process.env).filter((key) => { return /^debug_/i.test(key); @@ -49988,11 +47033,11 @@ var require_node = __commonJS({ function load() { return process.env.DEBUG; } - function init(debug19) { - debug19.inspectOpts = {}; + function init(debug17) { + debug17.inspectOpts = {}; const keys = Object.keys(exports2.inspectOpts); for (let i5 = 0; i5 < keys.length; i5++) { - debug19.inspectOpts[keys[i5]] = exports2.inspectOpts[keys[i5]]; + debug17.inspectOpts[keys[i5]] = exports2.inspectOpts[keys[i5]]; } } module2.exports = require_common()(exports2); @@ -50034,7 +47079,7 @@ function omit(obj, ...keys) { } return ret; } -var net2, tls, import_debug5, import_events, import_url, debug3, HttpProxyAgent; +var net2, tls, import_debug5, import_events, import_url, debug2, HttpProxyAgent; var init_dist2 = __esm({ "node_modules/proxy-agent/node_modules/http-proxy-agent/dist/index.js"() { net2 = __toESM(require("net"), 1); @@ -50043,13 +47088,13 @@ var init_dist2 = __esm({ import_events = require("events"); init_dist(); import_url = require("url"); - debug3 = (0, import_debug5.default)("http-proxy-agent"); - HttpProxyAgent = class extends Agent2 { + debug2 = (0, import_debug5.default)("http-proxy-agent"); + HttpProxyAgent = class extends Agent4 { constructor(proxy, opts) { super(opts); this.proxy = typeof proxy === "string" ? new import_url.URL(proxy) : proxy; this.proxyHeaders = opts?.headers ?? {}; - debug3("Creating new HttpProxyAgent instance: %o", this.proxy.href); + debug2("Creating new HttpProxyAgent instance: %o", this.proxy.href); const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ""); const port = this.proxy.port ? parseInt(this.proxy.port, 10) : this.proxy.protocol === "https:" ? 443 : 80; this.connectOpts = { @@ -50095,21 +47140,21 @@ var init_dist2 = __esm({ } let first; let endOfHeaders; - debug3("Regenerating stored HTTP header string for request"); + debug2("Regenerating stored HTTP header string for request"); req._implicitHeader(); if (req.outputData && req.outputData.length > 0) { - debug3("Patching connection write() output buffer with updated header"); + debug2("Patching connection write() output buffer with updated header"); first = req.outputData[0].data; endOfHeaders = first.indexOf("\r\n\r\n") + 4; req.outputData[0].data = req._header + first.substring(endOfHeaders); - debug3("Output buffer: %o", req.outputData[0].data); + debug2("Output buffer: %o", req.outputData[0].data); } let socket; if (this.proxy.protocol === "https:") { - debug3("Creating `tls.Socket`: %o", this.connectOpts); + debug2("Creating `tls.Socket`: %o", this.connectOpts); socket = tls.connect(this.connectOpts); } else { - debug3("Creating `net.Socket`: %o", this.connectOpts); + debug2("Creating `net.Socket`: %o", this.connectOpts); socket = net2.connect(this.connectOpts); } await (0, import_events.once)(socket, "connect"); @@ -50139,12 +47184,12 @@ function parseProxyResponse(socket) { } function onend() { cleanup(); - debug4("onend"); + debug3("onend"); reject(new Error("Proxy connection ended before receiving CONNECT response")); } function onerror(err) { cleanup(); - debug4("onerror %o", err); + debug3("onerror %o", err); reject(err); } function ondata(b6) { @@ -50153,7 +47198,7 @@ function parseProxyResponse(socket) { const buffered = Buffer.concat(buffers, buffersLength); const endOfHeaders = buffered.indexOf("\r\n\r\n"); if (endOfHeaders === -1) { - debug4("have not received end of HTTP headers yet..."); + debug3("have not received end of HTTP headers yet..."); read(); return; } @@ -50186,7 +47231,7 @@ function parseProxyResponse(socket) { headers[key] = value; } } - debug4("got proxy server response: %o %o", firstLine, headers); + debug3("got proxy server response: %o %o", firstLine, headers); cleanup(); resolve({ connect: { @@ -50202,11 +47247,11 @@ function parseProxyResponse(socket) { read(); }); } -var import_debug6, debug4; +var import_debug6, debug3; var init_parse_proxy_response = __esm({ "node_modules/proxy-agent/node_modules/https-proxy-agent/dist/parse-proxy-response.js"() { import_debug6 = __toESM(require_src(), 1); - debug4 = (0, import_debug6.default)("https-proxy-agent:parse-proxy-response"); + debug3 = (0, import_debug6.default)("https-proxy-agent:parse-proxy-response"); } }); @@ -50228,7 +47273,7 @@ function omit2(obj, ...keys) { } return ret; } -var net3, tls2, import_assert, import_debug7, import_url2, debug5, setServernameFromNonIpHost, HttpsProxyAgent; +var net3, tls2, import_assert, import_debug7, import_url2, debug4, setServernameFromNonIpHost, HttpsProxyAgent; var init_dist3 = __esm({ "node_modules/proxy-agent/node_modules/https-proxy-agent/dist/index.js"() { net3 = __toESM(require("net"), 1); @@ -50238,7 +47283,7 @@ var init_dist3 = __esm({ init_dist(); import_url2 = require("url"); init_parse_proxy_response(); - debug5 = (0, import_debug7.default)("https-proxy-agent"); + debug4 = (0, import_debug7.default)("https-proxy-agent"); setServernameFromNonIpHost = (options) => { if (options.servername === void 0 && options.host && !net3.isIP(options.host)) { return { @@ -50248,13 +47293,13 @@ var init_dist3 = __esm({ } return options; }; - HttpsProxyAgent = class extends Agent2 { + HttpsProxyAgent = class extends Agent4 { constructor(proxy, opts) { super(opts); this.options = { path: void 0 }; this.proxy = typeof proxy === "string" ? new import_url2.URL(proxy) : proxy; this.proxyHeaders = opts?.headers ?? {}; - debug5("Creating new HttpsProxyAgent instance: %o", this.proxy.href); + debug4("Creating new HttpsProxyAgent instance: %o", this.proxy.href); const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ""); const port = this.proxy.port ? parseInt(this.proxy.port, 10) : this.proxy.protocol === "https:" ? 443 : 80; this.connectOpts = { @@ -50276,10 +47321,10 @@ var init_dist3 = __esm({ } let socket; if (proxy.protocol === "https:") { - debug5("Creating `tls.Socket`: %o", this.connectOpts); + debug4("Creating `tls.Socket`: %o", this.connectOpts); socket = tls2.connect(setServernameFromNonIpHost(this.connectOpts)); } else { - debug5("Creating `net.Socket`: %o", this.connectOpts); + debug4("Creating `net.Socket`: %o", this.connectOpts); socket = net3.connect(this.connectOpts); } const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders }; @@ -50307,7 +47352,7 @@ var init_dist3 = __esm({ if (connect13.statusCode === 200) { req.once("socket", resume); if (opts.secureEndpoint) { - debug5("Upgrading socket connection to TLS"); + debug4("Upgrading socket connection to TLS"); return tls2.connect({ ...omit2(setServernameFromNonIpHost(opts), "host", "path", "port"), socket @@ -50319,7 +47364,7 @@ var init_dist3 = __esm({ const fakeSocket = new net3.Socket({ writable: false }); fakeSocket.readable = true; req.once("socket", (s) => { - debug5("Replaying proxy buffer for failed request"); + debug4("Replaying proxy buffer for failed request"); (0, import_assert.default)(s.listenerCount("data") > 0); s.push(buffered); s.push(null); @@ -50332,7 +47377,7 @@ var init_dist3 = __esm({ }); // node_modules/smart-buffer/build/utils.js -var require_utils3 = __commonJS({ +var require_utils2 = __commonJS({ "node_modules/smart-buffer/build/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -50405,7 +47450,7 @@ var require_smartbuffer = __commonJS({ "node_modules/smart-buffer/build/smartbuffer.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var utils_1 = require_utils3(); + var utils_1 = require_utils2(); var DEFAULT_SMARTBUFFER_SIZE = 4096; var DEFAULT_SMARTBUFFER_ENCODING = "utf8"; var SmartBuffer = class _SmartBuffer { @@ -51825,12 +48870,12 @@ var require_ipv4 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Address4 = void 0; var common = __importStar2(require_common2()); - var constants2 = __importStar2(require_constants7()); + var constants4 = __importStar2(require_constants7()); var address_error_1 = require_address_error(); - var isCorrect4 = common.isCorrect(constants2.BITS); + var isCorrect4 = common.isCorrect(constants4.BITS); var Address4 = class _Address4 { constructor(address) { - this.groups = constants2.GROUPS; + this.groups = constants4.GROUPS; this.parsedAddress = []; this.parsedSubnet = ""; this.subnet = "/32"; @@ -51839,15 +48884,15 @@ var require_ipv4 = __commonJS({ this.isCorrect = isCorrect4; this.isInSubnet = common.isInSubnet; this.address = address; - const subnet = constants2.RE_SUBNET_STRING.exec(address); + const subnet = constants4.RE_SUBNET_STRING.exec(address); if (subnet) { this.parsedSubnet = subnet[0].replace("/", ""); this.subnetMask = parseInt(this.parsedSubnet, 10); this.subnet = `/${this.subnetMask}`; - if (this.subnetMask < 0 || this.subnetMask > constants2.BITS) { + if (this.subnetMask < 0 || this.subnetMask > constants4.BITS) { throw new address_error_1.AddressError("Invalid subnet mask."); } - address = address.replace(constants2.RE_SUBNET_STRING, ""); + address = address.replace(constants4.RE_SUBNET_STRING, ""); } this.addressMinusSuffix = address; this.parsedAddress = this.parse(address); @@ -51875,7 +48920,7 @@ var require_ipv4 = __commonJS({ */ parse(address) { const groups = address.split("."); - if (!address.match(constants2.RE_ADDRESS)) { + if (!address.match(constants4.RE_ADDRESS)) { throw new address_error_1.AddressError("Invalid IPv4 address."); } return groups; @@ -51898,7 +48943,7 @@ var require_ipv4 = __commonJS({ * address.subnetMask; // 24 */ static fromAddressAndMask(address, mask) { - const bits = common.prefixLengthFromMask(new _Address4(mask).bigInt(), constants2.BITS); + const bits = common.prefixLengthFromMask(new _Address4(mask).bigInt(), constants4.BITS); return new _Address4(`${address}/${bits}`); } /** @@ -51912,9 +48957,9 @@ var require_ipv4 = __commonJS({ */ static fromAddressAndWildcardMask(address, wildcardMask) { const wildcard = new _Address4(wildcardMask).bigInt(); - const allOnes = (BigInt(1) << BigInt(constants2.BITS)) - BigInt(1); + const allOnes = (BigInt(1) << BigInt(constants4.BITS)) - BigInt(1); const mask = wildcard ^ allOnes; - const bits = common.prefixLengthFromMask(mask, constants2.BITS); + const bits = common.prefixLengthFromMask(mask, constants4.BITS); return new _Address4(`${address}/${bits}`); } /** @@ -51932,7 +48977,7 @@ var require_ipv4 = __commonJS({ */ static fromWildcard(input) { const groups = input.split("."); - if (groups.length !== constants2.GROUPS) { + if (groups.length !== constants4.GROUPS) { throw new address_error_1.AddressError("Wildcard pattern must have 4 octets"); } let firstWildcard = -1; @@ -51947,7 +48992,7 @@ var require_ipv4 = __commonJS({ } const trailing = firstWildcard === -1 ? 0 : groups.length - firstWildcard; const replaced = groups.map((g5) => g5 === "*" ? "0" : g5); - const subnetBits = constants2.BITS - trailing * 8; + const subnetBits = constants4.BITS - trailing * 8; return new _Address4(`${replaced.join(".")}/${subnetBits}`); } /** @@ -52017,7 +49062,7 @@ var require_ipv4 = __commonJS({ toGroup6() { const output = []; let i5; - for (i5 = 0; i5 < constants2.GROUPS; i5 += 2) { + for (i5 = 0; i5 < constants4.GROUPS; i5 += 2) { output.push(`${common.stringToPaddedHex(this.parsedAddress[i5])}${common.stringToPaddedHex(this.parsedAddress[i5 + 1])}`); } return output.join(":"); @@ -52034,7 +49079,7 @@ var require_ipv4 = __commonJS({ * @returns {bigint} */ _startAddress() { - return BigInt(`0b${this.mask() + "0".repeat(constants2.BITS - this.subnetMask)}`); + return BigInt(`0b${this.mask() + "0".repeat(constants4.BITS - this.subnetMask)}`); } /** * The first address in the range given by this address' subnet. @@ -52058,7 +49103,7 @@ var require_ipv4 = __commonJS({ * @returns {bigint} */ _endAddress() { - return BigInt(`0b${this.mask() + "1".repeat(constants2.BITS - this.subnetMask)}`); + return BigInt(`0b${this.mask() + "1".repeat(constants4.BITS - this.subnetMask)}`); } /** * The last address in the range given by this address' subnet @@ -52083,7 +49128,7 @@ var require_ipv4 = __commonJS({ * @returns {Address4} */ subnetMaskAddress() { - return _Address4.fromBigInt(BigInt(`0b${"1".repeat(this.subnetMask)}${"0".repeat(constants2.BITS - this.subnetMask)}`)); + return _Address4.fromBigInt(BigInt(`0b${"1".repeat(this.subnetMask)}${"0".repeat(constants4.BITS - this.subnetMask)}`)); } /** * The Cisco-style wildcard mask, e.g. `0.0.0.255` for a `/24`. This is @@ -52092,7 +49137,7 @@ var require_ipv4 = __commonJS({ * @returns {Address4} */ wildcardMask() { - return _Address4.fromBigInt(BigInt(`0b${"0".repeat(this.subnetMask)}${"1".repeat(constants2.BITS - this.subnetMask)}`)); + return _Address4.fromBigInt(BigInt(`0b${"0".repeat(this.subnetMask)}${"1".repeat(constants4.BITS - this.subnetMask)}`)); } /** * The network address in CIDR string form, e.g. `192.168.1.0/24` for @@ -52234,7 +49279,7 @@ var require_ipv4 = __commonJS({ */ binaryZeroPad() { if (this._binaryZeroPad === void 0) { - this._binaryZeroPad = this.bigInt().toString(2).padStart(constants2.BITS, "0"); + this._binaryZeroPad = this.bigInt().toString(2).padStart(constants4.BITS, "0"); } return this._binaryZeroPad; } @@ -52244,7 +49289,7 @@ var require_ipv4 = __commonJS({ */ groupForV6() { const segments = this.parsedAddress; - return this.address.replace(constants2.RE_ADDRESS, `${segments.slice(0, 2).join(".")}.${segments.slice(2, 4).join(".")}`); + return this.address.replace(constants4.RE_ADDRESS, `${segments.slice(0, 2).join(".")}.${segments.slice(2, 4).join(".")}`); } }; exports2.Address4 = Address4; @@ -53775,7 +50820,7 @@ var require_receivebuffer = __commonJS({ var require_socksclient = __commonJS({ "node_modules/socks/build/client/socksclient.js"(exports2) { "use strict"; - var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter7 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -53844,13 +50889,13 @@ var require_socksclient = __commonJS({ } const client = new _SocksClient(options); client.connect(options.existing_socket); - client.once("established", (info5) => { + client.once("established", (info2) => { client.removeAllListeners(); if (typeof callback === "function") { - callback(null, info5); - resolve(info5); + callback(null, info2); + resolve(info2); } else { - resolve(info5); + resolve(info2); } }); client.once("error", (err) => { @@ -53874,7 +50919,7 @@ var require_socksclient = __commonJS({ * @returns { Promise } */ static createConnectionChain(options, callback) { - return new Promise((resolve, reject) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter7(this, void 0, void 0, function* () { try { (0, helpers_1.validateSocksClientChainOptions)(options); } catch (err) { @@ -54010,13 +51055,13 @@ var require_socksclient = __commonJS({ this.socket.setNoDelay(!!this.options.set_tcp_nodelay); } } - this.prependOnceListener("established", (info5) => { + this.prependOnceListener("established", (info2) => { setImmediate(() => { if (this.receiveBuffer.length > 0) { const excessData = this.receiveBuffer.get(this.receiveBuffer.length); - info5.socket.emit("data", excessData); + info2.socket.emit("data", excessData); } - info5.socket.resume(); + info2.socket.resume(); }); }); } @@ -54252,24 +51297,24 @@ var require_socksclient = __commonJS({ this.setState(constants_1.SocksClientState.SentAuthentication); } sendSocks5CustomAuthentication() { - return __awaiter2(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { this.nextRequiredPacketBufferSize = this.options.proxy.custom_auth_response_size; this.socket.write(yield this.options.proxy.custom_auth_request_handler()); this.setState(constants_1.SocksClientState.SentAuthentication); }); } handleSocks5CustomAuthHandshakeResponse(data3) { - return __awaiter2(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { return yield this.options.proxy.custom_auth_response_handler(data3); }); } handleSocks5AuthenticationNoAuthHandshakeResponse(data3) { - return __awaiter2(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { return data3[1] === 0; }); } handleSocks5AuthenticationUserPassHandshakeResponse(data3) { - return __awaiter2(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { return data3[1] === 0; }); } @@ -54278,7 +51323,7 @@ var require_socksclient = __commonJS({ * @param data */ handleInitialSocks5AuthenticationHandshakeResponse() { - return __awaiter2(this, void 0, void 0, function* () { + return __awaiter7(this, void 0, void 0, function* () { this.setState(constants_1.SocksClientState.ReceivedAuthenticationResponse); let authResult = false; if (this.socks5ChosenAuthType === constants_1.Socks5Auth.NoAuth) { @@ -54537,7 +51582,7 @@ function omit3(obj, ...keys) { } return ret; } -var import_socks, import_debug8, dns, net4, tls3, import_url3, debug6, setServernameFromNonIpHost2, SocksProxyAgent; +var import_socks, import_debug8, dns, net4, tls3, import_url3, debug5, setServernameFromNonIpHost2, SocksProxyAgent; var init_dist4 = __esm({ "node_modules/proxy-agent/node_modules/socks-proxy-agent/dist/index.js"() { import_socks = __toESM(require_build(), 1); @@ -54547,7 +51592,7 @@ var init_dist4 = __esm({ net4 = __toESM(require("net"), 1); tls3 = __toESM(require("tls"), 1); import_url3 = require("url"); - debug6 = (0, import_debug8.default)("socks-proxy-agent"); + debug5 = (0, import_debug8.default)("socks-proxy-agent"); setServernameFromNonIpHost2 = (options) => { if (options.servername === void 0 && options.host && !net4.isIP(options.host)) { return { @@ -54557,7 +51602,7 @@ var init_dist4 = __esm({ } return options; }; - SocksProxyAgent = class extends Agent2 { + SocksProxyAgent = class extends Agent4 { constructor(uri, opts) { super(opts); const url = typeof uri === "string" ? new import_url3.URL(uri) : uri; @@ -54607,21 +51652,21 @@ var init_dist4 = __esm({ if (tlsSocket) tlsSocket.destroy(); }; - debug6("Creating socks proxy connection: %o", socksOpts); + debug5("Creating socks proxy connection: %o", socksOpts); const { socket } = await import_socks.SocksClient.createConnection(socksOpts); - debug6("Successfully created socks proxy connection"); + debug5("Successfully created socks proxy connection"); if (timeout !== null) { socket.setTimeout(timeout); socket.on("timeout", () => cleanup()); } if (opts.secureEndpoint) { - debug6("Upgrading socket connection to TLS"); + debug5("Upgrading socket connection to TLS"); const tlsSocket = tls3.connect({ ...omit3(setServernameFromNonIpHost2(opts), "host", "path", "port"), socket }); - tlsSocket.once("error", (error2) => { - debug6("Socket TLS error", error2.message); + tlsSocket.once("error", (error3) => { + debug5("Socket TLS error", error3.message); cleanup(tlsSocket); }); return tlsSocket; @@ -54655,15 +51700,15 @@ var init_helpers2 = __esm({ }); // node_modules/pac-proxy-agent/node_modules/agent-base/dist/index.js -var net5, http2, import_https2, INTERNAL2, Agent4; +var net5, http3, import_https2, INTERNAL2, Agent6; var init_dist5 = __esm({ "node_modules/pac-proxy-agent/node_modules/agent-base/dist/index.js"() { net5 = __toESM(require("net"), 1); - http2 = __toESM(require("http"), 1); + http3 = __toESM(require("http"), 1); import_https2 = require("https"); init_helpers2(); INTERNAL2 = /* @__PURE__ */ Symbol("AgentBaseInternalState"); - Agent4 = class extends http2.Agent { + Agent6 = class extends http3.Agent { constructor(opts) { super(opts); this[INTERNAL2] = {}; @@ -54863,7 +51908,7 @@ var init_notmodified = __esm({ }); // node_modules/get-uri/dist/data.js -var import_debug9, import_stream, import_crypto, debug7, DataReadable, data2; +var import_debug9, import_stream, import_crypto, debug6, DataReadable, data2; var init_data = __esm({ "node_modules/get-uri/dist/data.js"() { import_debug9 = __toESM(require_src(), 1); @@ -54871,7 +51916,7 @@ var init_data = __esm({ import_crypto = require("crypto"); init_node(); init_notmodified(); - debug7 = (0, import_debug9.default)("get-uri:data"); + debug6 = (0, import_debug9.default)("get-uri:data"); DataReadable = class extends import_stream.Readable { constructor(hash, buf) { super(); @@ -54884,12 +51929,12 @@ var init_data = __esm({ const shasum = (0, import_crypto.createHash)("sha1"); shasum.update(uri); const hash = shasum.digest("hex"); - debug7('generated SHA1 hash for "data:" URI: %o', hash); + debug6('generated SHA1 hash for "data:" URI: %o', hash); if (cache5?.hash === hash) { - debug7("got matching cache SHA1 hash: %o", hash); + debug6("got matching cache SHA1 hash: %o", hash); throw new NotModifiedError(); } else { - debug7('creating Readable stream from "data:" URI buffer'); + debug6('creating Readable stream from "data:" URI buffer'); const { buffer } = dataUriToBuffer(uri); return new DataReadable(hash, Buffer.from(buffer)); } @@ -54914,15 +51959,15 @@ var init_notfound = __esm({ function isNotModified(prev, curr) { return +prev.mtime === +curr.mtime; } -var import_debug10, import_fs, import_url4, debug8, file; +var import_debug10, import_fs2, import_url4, debug7, file; var init_file = __esm({ "node_modules/get-uri/dist/file.js"() { import_debug10 = __toESM(require_src(), 1); - import_fs = require("fs"); + import_fs2 = require("fs"); init_notfound(); init_notmodified(); import_url4 = require("url"); - debug8 = (0, import_debug10.default)("get-uri:file"); + debug7 = (0, import_debug10.default)("get-uri:file"); file = async ({ href: uri }, opts = {}) => { const { cache: cache5, @@ -54932,19 +51977,19 @@ var init_file = __esm({ } = opts; try { const filepath = (0, import_url4.fileURLToPath)(uri); - debug8("Normalized pathname: %o", filepath); - const fdHandle = await import_fs.promises.open(filepath, flags, mode); - const stat = await fdHandle.stat(); - if (cache5 && cache5.stat && stat && isNotModified(cache5.stat, stat)) { + debug7("Normalized pathname: %o", filepath); + const fdHandle = await import_fs2.promises.open(filepath, flags, mode); + const stat2 = await fdHandle.stat(); + if (cache5 && cache5.stat && stat2 && isNotModified(cache5.stat, stat2)) { await fdHandle.close(); throw new NotModifiedError(); } - const rs = (0, import_fs.createReadStream)(filepath, { + const rs = (0, import_fs2.createReadStream)(filepath, { autoClose: true, ...opts, fd: fdHandle }); - rs.stat = stat; + rs.stat = stat2; return rs; } catch (err) { if (err.code === "ENOENT") { @@ -55273,9 +52318,9 @@ Closing reason: ${this._closingError.stack}`; * @protected */ _setupDefaultErrorHandlers(socket, identifier) { - socket.once("error", (error2) => { - error2.message += ` (${identifier})`; - this.closeWithError(error2); + socket.once("error", (error3) => { + error3.message += ` (${identifier})`; + this.closeWithError(error3); }); socket.once("close", (hadError) => { if (hadError) { @@ -55369,8 +52414,8 @@ var require_netUtils = __commonJS({ tlsSocket.removeAllListeners("error"); resolve(tlsSocket); } - }).once("error", (error2) => { - reject(error2); + }).once("error", (error3) => { + reject(error3); }); }); } @@ -55580,36 +52625,36 @@ var require_parseListMLSD = __commonJS({ exports2.transformList = transformList; exports2.parseMLSxDate = parseMLSxDate; var FileInfo_1 = require_FileInfo(); - function parseSize(value, info5) { - info5.size = parseInt(value, 10); + function parseSize(value, info2) { + info2.size = parseInt(value, 10); } var factHandlersByName = { "size": parseSize, // File size "sizd": parseSize, // Directory size - "unique": (value, info5) => { - info5.uniqueID = value; + "unique": (value, info2) => { + info2.uniqueID = value; }, - "modify": (value, info5) => { - info5.modifiedAt = parseMLSxDate(value); - info5.rawModifiedAt = info5.modifiedAt.toISOString(); + "modify": (value, info2) => { + info2.modifiedAt = parseMLSxDate(value); + info2.rawModifiedAt = info2.modifiedAt.toISOString(); }, - "type": (value, info5) => { + "type": (value, info2) => { if (value.startsWith("OS.unix=slink")) { - info5.type = FileInfo_1.FileType.SymbolicLink; - info5.link = value.substr(value.indexOf(":") + 1); + info2.type = FileInfo_1.FileType.SymbolicLink; + info2.link = value.substr(value.indexOf(":") + 1); return 1; } switch (value) { case "file": - info5.type = FileInfo_1.FileType.File; + info2.type = FileInfo_1.FileType.File; break; case "dir": - info5.type = FileInfo_1.FileType.Directory; + info2.type = FileInfo_1.FileType.Directory; break; case "OS.unix=symlink": - info5.type = FileInfo_1.FileType.SymbolicLink; + info2.type = FileInfo_1.FileType.SymbolicLink; break; case "cdir": // Current directory being listed @@ -55617,34 +52662,34 @@ var require_parseListMLSD = __commonJS({ return 2; // Don't include these entries in the listing default: - info5.type = FileInfo_1.FileType.Unknown; + info2.type = FileInfo_1.FileType.Unknown; } return 1; }, - "unix.mode": (value, info5) => { + "unix.mode": (value, info2) => { const digits = value.substr(-3); - info5.permissions = { + info2.permissions = { user: parseInt(digits[0], 10), group: parseInt(digits[1], 10), world: parseInt(digits[2], 10) }; }, - "unix.ownername": (value, info5) => { - info5.user = value; + "unix.ownername": (value, info2) => { + info2.user = value; }, - "unix.owner": (value, info5) => { - if (info5.user === void 0) - info5.user = value; + "unix.owner": (value, info2) => { + if (info2.user === void 0) + info2.user = value; }, get "unix.uid"() { return this["unix.owner"]; }, - "unix.groupname": (value, info5) => { - info5.group = value; + "unix.groupname": (value, info2) => { + info2.group = value; }, - "unix.group": (value, info5) => { - if (info5.group === void 0) - info5.group = value; + "unix.group": (value, info2) => { + if (info2.group === void 0) + info2.group = value; }, get "unix.gid"() { return this["unix.group"]; @@ -55674,7 +52719,7 @@ var require_parseListMLSD = __commonJS({ if (name === "" || name === "." || name === "..") { return void 0; } - const info5 = new FileInfo_1.FileInfo(name); + const info2 = new FileInfo_1.FileInfo(name); const facts = packedFacts.split(";"); for (const fact of facts) { const [factName, factValue] = splitStringOnce(fact, "="); @@ -55685,12 +52730,12 @@ var require_parseListMLSD = __commonJS({ if (!factHandler) { continue; } - const result = factHandler(factValue, info5); + const result = factHandler(factValue, info2); if (result === 2) { return void 0; } } - return info5; + return info2; } function transformList(files) { const nonLinksByID = /* @__PURE__ */ new Map(); @@ -55807,7 +52852,7 @@ var require_parseList = __commonJS({ if (!parser) { throw new Error("This library only supports MLSD, Unix- or DOS-style directory listing. Your FTP server seems to be using another format. You can see the transmitted listing when setting `client.ftp.verbose = true`. You can then provide a custom parser to `client.parseList`, see the documentation for details."); } - const files = lines.map(parser.parseLine).filter((info5) => info5 !== void 0); + const files = lines.map(parser.parseLine).filter((info2) => info2 !== void 0); return parser.transformList(files); } } @@ -56953,7 +53998,7 @@ var require_dist = __commonJS({ }); // node_modules/get-uri/dist/ftp.js -var import_basic_ftp, import_stream2, import_path, import_debug11, debug9, ftp; +var import_basic_ftp, import_stream2, import_path, import_debug11, debug8, ftp; var init_ftp = __esm({ "node_modules/get-uri/dist/ftp.js"() { import_basic_ftp = __toESM(require_dist(), 1); @@ -56962,7 +54007,7 @@ var init_ftp = __esm({ import_debug11 = __toESM(require_src(), 1); init_notfound(); init_notmodified(); - debug9 = (0, import_debug11.default)("get-uri:ftp"); + debug8 = (0, import_debug11.default)("get-uri:ftp"); ftp = async (url, opts = {}) => { const { cache: cache5 } = opts; const filepath = decodeURIComponent(url.pathname); @@ -57008,7 +54053,7 @@ var init_ftp = __esm({ const stream = new import_stream2.PassThrough(); const rs = stream; client.downloadTo(stream, filepath).then((result) => { - debug9(result.message); + debug8(result.message); client.close(); }); rs.lastModified = lastModified; @@ -57048,7 +54093,7 @@ function isFresh(cache5) { let expires = parseInt(cache5.headers.expires || "", 10); const cacheControl = cache5.headers["cache-control"]; if (cacheControl) { - debug10("Cache-Control: %o", cacheControl); + debug9("Cache-Control: %o", cacheControl); const parts = cacheControl.split(/,\s*?\b/); for (let i5 = 0; i5 < parts.length; i5++) { const part = parts[i5]; @@ -57059,24 +54104,24 @@ function isFresh(cache5) { expires = (cache5.date || 0) + parseInt(subparts[1], 10) * 1e3; fresh = Date.now() < expires; if (fresh) { - debug10('cache is "fresh" due to previous %o Cache-Control param', part); + debug9('cache is "fresh" due to previous %o Cache-Control param', part); } return fresh; case "must-revalidate": break; case "no-cache": case "no-store": - debug10('cache is "stale" due to explicit %o Cache-Control param', name); + debug9('cache is "stale" due to explicit %o Cache-Control param', name); return false; default: break; } } } else if (expires) { - debug10("Expires: %o", expires); + debug9("Expires: %o", expires); fresh = Date.now() < expires; if (fresh) { - debug10('cache is "fresh" due to previous Expires response header'); + debug9('cache is "fresh" due to previous Expires response header'); } return fresh; } @@ -57098,7 +54143,7 @@ function getCache(url, cache5) { } return null; } -var import_http2, import_https3, import_events2, import_debug12, debug10, http3; +var import_http2, import_https3, import_events2, import_debug12, debug9, http4; var init_http = __esm({ "node_modules/get-uri/dist/http.js"() { import_http2 = __toESM(require("http"), 1); @@ -57108,27 +54153,27 @@ var init_http = __esm({ init_http_error(); init_notfound(); init_notmodified(); - debug10 = (0, import_debug12.default)("get-uri:http"); - http3 = async (url, opts = {}) => { - debug10("GET %o", url.href); + debug9 = (0, import_debug12.default)("get-uri:http"); + http4 = async (url, opts = {}) => { + debug9("GET %o", url.href); const cache5 = getCache(url, opts.cache); if (cache5 && isFresh(cache5) && typeof cache5.statusCode === "number") { const type2 = cache5.statusCode / 100 | 0; if (type2 === 3 && cache5.headers.location) { - debug10("cached redirect"); + debug9("cached redirect"); throw new Error("TODO: implement cached redirects!"); } throw new NotModifiedError(); } const maxRedirects = typeof opts.maxRedirects === "number" ? opts.maxRedirects : 5; - debug10("allowing %o max redirects", maxRedirects); + debug9("allowing %o max redirects", maxRedirects); let mod; if (opts.http) { mod = opts.http; - debug10("using secure `https` core module"); + debug9("using secure `https` core module"); } else { mod = import_http2.default; - debug10("using `http` core module"); + debug9("using `http` core module"); } const options = { ...opts }; if (cache5) { @@ -57141,12 +54186,12 @@ var init_http = __esm({ const lastModified = cache5.headers["last-modified"]; if (lastModified) { headers["If-Modified-Since"] = lastModified; - debug10('added "If-Modified-Since" request header: %o', lastModified); + debug9('added "If-Modified-Since" request header: %o', lastModified); } const etag = cache5.headers.etag; if (etag) { headers["If-None-Match"] = etag; - debug10('added "If-None-Match" request header: %o', etag); + debug9('added "If-None-Match" request header: %o', etag); } } const req = mod.get(url, options); @@ -57154,7 +54199,7 @@ var init_http = __esm({ const code = res.statusCode || 0; res.date = Date.now(); res.parsed = url; - debug10("got %o response status code", code); + debug9("got %o response status code", code); const type = code / 100 | 0; const location = res.headers.location; if (type === 3 && location) { @@ -57162,17 +54207,17 @@ var init_http = __esm({ opts.redirects = []; const redirects = opts.redirects; if (redirects.length < maxRedirects) { - debug10('got a "redirect" status code with Location: %o', location); + debug9('got a "redirect" status code with Location: %o', location); res.resume(); redirects.push(res); const newUri = new URL(location, url.href); - debug10("resolved redirect URL: %o", newUri.href); + debug9("resolved redirect URL: %o", newUri.href); const left = maxRedirects - redirects.length; - debug10("%o more redirects allowed after this one", left); + debug9("%o more redirects allowed after this one", left); if (newUri.protocol !== url.protocol) { opts.http = newUri.protocol === "https:" ? import_https3.default : void 0; } - return http3(newUri, opts); + return http4(newUri, opts); } } if (type !== 2) { @@ -57193,13 +54238,13 @@ var init_http = __esm({ }); // node_modules/get-uri/dist/https.js -var import_https4, https2; +var import_https4, https3; var init_https = __esm({ "node_modules/get-uri/dist/https.js"() { import_https4 = __toESM(require("https"), 1); init_http(); - https2 = (url, opts) => { - return http3(url, { ...opts, http: import_https4.default }); + https3 = (url, opts) => { + return http4(url, { ...opts, http: import_https4.default }); }; } }); @@ -57209,7 +54254,7 @@ function isValidProtocol(p2) { return VALID_PROTOCOLS.has(p2); } async function getUri(uri, opts) { - debug11("getUri(%o)", uri); + debug10("getUri(%o)", uri); if (!uri) { throw new TypeError('Must pass in a URI to "getUri()"'); } @@ -57221,7 +54266,7 @@ async function getUri(uri, opts) { const getter = protocols[protocol]; return getter(url, opts); } -var import_debug13, debug11, protocols, VALID_PROTOCOLS; +var import_debug13, debug10, protocols, VALID_PROTOCOLS; var init_dist6 = __esm({ "node_modules/get-uri/dist/index.js"() { import_debug13 = __toESM(require_src(), 1); @@ -57230,13 +54275,13 @@ var init_dist6 = __esm({ init_ftp(); init_http(); init_https(); - debug11 = (0, import_debug13.default)("get-uri"); + debug10 = (0, import_debug13.default)("get-uri"); protocols = { data: data2, file, ftp, - http: http3, - https: https2 + http: http4, + https: https3 }; VALID_PROTOCOLS = new Set(Object.keys(protocols)); } @@ -58208,7 +55253,7 @@ var require_keyword = __commonJS({ }); // node_modules/esutils/lib/utils.js -var require_utils4 = __commonJS({ +var require_utils3 = __commonJS({ "node_modules/esutils/lib/utils.js"(exports2) { (function() { "use strict"; @@ -60042,7 +57087,7 @@ var require_escodegen = __commonJS({ "use strict"; var Syntax, Precedence, BinaryPrecedence, SourceNode, estraverse, esutils, base, indent, json, renumber, hexadecimal, quotes, escapeless, newline, space, parentheses, semicolons, safeConcatenation, directive, extra, parse, sourceMap, sourceCode, preserveBlankLines, FORMAT_MINIFY, FORMAT_DEFAULTS; estraverse = require_estraverse(); - esutils = require_utils4(); + esutils = require_utils3(); Syntax = estraverse.Syntax; function isExpression(node) { return CodeGenerator.Expression.hasOwnProperty(node.type); @@ -66708,45 +63753,45 @@ var require_esprima = __commonJS({ this.errors = []; this.tolerant = false; } - ErrorHandler2.prototype.recordError = function(error2) { - this.errors.push(error2); + ErrorHandler2.prototype.recordError = function(error3) { + this.errors.push(error3); }; - ErrorHandler2.prototype.tolerate = function(error2) { + ErrorHandler2.prototype.tolerate = function(error3) { if (this.tolerant) { - this.recordError(error2); + this.recordError(error3); } else { - throw error2; + throw error3; } }; ErrorHandler2.prototype.constructError = function(msg, column) { - var error2 = new Error(msg); + var error3 = new Error(msg); try { - throw error2; + throw error3; } catch (base) { if (Object.create && Object.defineProperty) { - error2 = Object.create(base); - Object.defineProperty(error2, "column", { value: column }); + error3 = Object.create(base); + Object.defineProperty(error3, "column", { value: column }); } } - return error2; + return error3; }; ErrorHandler2.prototype.createError = function(index, line, col, description) { var msg = "Line " + line + ": " + description; - var error2 = this.constructError(msg, col); - error2.index = index; - error2.lineNumber = line; - error2.description = description; - return error2; + var error3 = this.constructError(msg, col); + error3.index = index; + error3.lineNumber = line; + error3.description = description; + return error3; }; ErrorHandler2.prototype.throwError = function(index, line, col, description) { throw this.createError(index, line, col, description); }; ErrorHandler2.prototype.tolerateError = function(index, line, col, description) { - var error2 = this.createError(index, line, col, description); + var error3 = this.createError(index, line, col, description); if (this.tolerant) { - this.recordError(error2); + this.recordError(error3); } else { - throw error2; + throw error3; } }; return ErrorHandler2; @@ -70525,7 +67570,7 @@ var require_shared = __commonJS({ }); // node_modules/ast-types/def/core.js -var require_core2 = __commonJS({ +var require_core = __commonJS({ "node_modules/ast-types/def/core.js"(exports2, module2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -70660,7 +67705,7 @@ var require_es6 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var core_1 = tslib_1.__importDefault(require_core2()); + var core_1 = tslib_1.__importDefault(require_core()); var types_1 = tslib_1.__importDefault(require_types()); var shared_1 = tslib_1.__importDefault(require_shared()); function default_1(fork) { @@ -71324,7 +68369,7 @@ var require_es_proposals = __commonJS({ var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var types_1 = tslib_1.__importDefault(require_types()); var shared_1 = tslib_1.__importDefault(require_shared()); - var core_1 = tslib_1.__importDefault(require_core2()); + var core_1 = tslib_1.__importDefault(require_core()); function default_1(fork) { fork.use(core_1.default); var types3 = fork.use(types_1.default); @@ -71363,7 +68408,7 @@ var require_main3 = __commonJS({ exports2.visit = exports2.use = exports2.Type = exports2.someField = exports2.PathVisitor = exports2.Path = exports2.NodePath = exports2.namedTypes = exports2.getSupertypeNames = exports2.getFieldValue = exports2.getFieldNames = exports2.getBuilderName = exports2.finalize = exports2.eachField = exports2.defineMethod = exports2.builtInTypes = exports2.builders = exports2.astNodesAreEquivalent = void 0; var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var fork_1 = tslib_1.__importDefault(require_fork()); - var core_1 = tslib_1.__importDefault(require_core2()); + var core_1 = tslib_1.__importDefault(require_core()); var es6_1 = tslib_1.__importDefault(require_es6()); var es7_1 = tslib_1.__importDefault(require_es7()); var es2020_1 = tslib_1.__importDefault(require_es2020()); @@ -71870,7 +68915,7 @@ var require_netmask4 = __commonJS({ if (typeof maskStr === "string" && maskStr.indexOf(".") > -1) { try { this.maskLong = ip2long(maskStr); - } catch (error2) { + } catch (error3) { throw new Error("Invalid mask: " + maskStr); } this.bitmask = NaN; @@ -71891,7 +68936,7 @@ var require_netmask4 = __commonJS({ } try { this.netLong = (ip2long(net11) & this.maskLong) >>> 0; - } catch (error2) { + } catch (error3) { throw new Error("Invalid net address: " + net11); } if (!(this.bitmask <= 32)) { @@ -72068,7 +69113,7 @@ var require_netmask6 = __commonJS({ } try { this.netBigint = ip6bigint(net11) & this.maskBigint; - } catch (error2) { + } catch (error3) { throw new Error("Invalid IPv6 net address: " + net11); } this.size = Number(1n << BigInt(128 - this.bitmask)); @@ -72120,8 +69165,14 @@ var require_netmask = __commonJS({ "node_modules/netmask/dist/netmask.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Netmask = void 0; + exports2.long2ip = exports2.ip2long = exports2.Netmask = void 0; var netmask4_1 = require_netmask4(); + Object.defineProperty(exports2, "ip2long", { enumerable: true, get: function() { + return netmask4_1.ip2long; + } }); + Object.defineProperty(exports2, "long2ip", { enumerable: true, get: function() { + return netmask4_1.long2ip; + } }); var netmask6_1 = require_netmask6(); var Netmask2 = class _Netmask { constructor(net11, mask) { @@ -72142,6 +69193,13 @@ var require_netmask = __commonJS({ this.first = this._impl.first; this.last = this._impl.last; this.broadcast = this._impl.broadcast; + if (this._impl instanceof netmask4_1.Netmask4Impl) { + this.maskLong = this._impl.maskLong; + this.netLong = this._impl.netLong; + } else { + this.maskLong = 0; + this.netLong = 0; + } } contains(ip2) { if (typeof ip2 === "string") { @@ -72248,13 +69306,13 @@ function normalizeFamily(family) { } return family ? family.toLowerCase() : "ipv4"; } -var import_os, ip; +var import_os3, ip; var init_ip = __esm({ "node_modules/pac-resolver/dist/ip.js"() { - import_os = __toESM(require("os"), 1); + import_os3 = __toESM(require("os"), 1); ip = { address() { - const interfaces = import_os.default.networkInterfaces(); + const interfaces = import_os3.default.networkInterfaces(); const family = normalizeFamily(); const all = Object.values(interfaces).map((addrs = []) => { const addresses = addrs.filter((details) => { @@ -72620,7 +69678,7 @@ function parseDylink(module2) { return null; const bytes = new Uint8Array(sections[0]); const offset = { value: 0 }; - const info5 = { + const info2 = { memorySize: 0, memoryAlignment: 0, tableSize: 0, @@ -72632,22 +69690,22 @@ function parseDylink(module2) { const subsectionSize = readULEB128(bytes, offset); const subsectionEnd = offset.value + subsectionSize; if (subsectionType === 1) { - info5.memorySize = readULEB128(bytes, offset); - info5.memoryAlignment = readULEB128(bytes, offset); - info5.tableSize = readULEB128(bytes, offset); - info5.tableAlignment = readULEB128(bytes, offset); + info2.memorySize = readULEB128(bytes, offset); + info2.memoryAlignment = readULEB128(bytes, offset); + info2.tableSize = readULEB128(bytes, offset); + info2.tableAlignment = readULEB128(bytes, offset); } else if (subsectionType === 2) { const count = readULEB128(bytes, offset); for (let i5 = 0; i5 < count; i5++) { const len = readULEB128(bytes, offset); const name = new TextDecoder().decode(bytes.slice(offset.value, offset.value + len)); offset.value += len; - info5.needed.push(name); + info2.needed.push(name); } } offset.value = subsectionEnd; } - return info5; + return info2; } async function loadExtension(descriptor, mainExports, wasiBuiltins, wasiUserOverrides, memoryProxy, allocBase) { let module2; @@ -72905,9 +69963,9 @@ var init_dist9 = __esm({ } return next(); }; - })(typeof SuppressedError === "function" ? SuppressedError : function(error2, suppressed, message) { + })(typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { var e5 = new Error(message); - return e5.name = "SuppressedError", e5.error = error2, e5.suppressed = suppressed, e5; + return e5.name = "SuppressedError", e5.error = error3, e5.suppressed = suppressed, e5; }); EvalFlags = { /** Global script mode (default). */ @@ -74723,7 +71781,7 @@ function omit4(obj, ...keys) { } return ret; } -var import_socks2, import_debug14, dns2, net7, tls4, import_url5, debug12, setServernameFromNonIpHost3, SocksProxyAgent2; +var import_socks2, import_debug14, dns2, net7, tls4, import_url5, debug11, setServernameFromNonIpHost3, SocksProxyAgent2; var init_dist10 = __esm({ "node_modules/pac-proxy-agent/node_modules/socks-proxy-agent/dist/index.js"() { import_socks2 = __toESM(require_build(), 1); @@ -74733,7 +71791,7 @@ var init_dist10 = __esm({ net7 = __toESM(require("net"), 1); tls4 = __toESM(require("tls"), 1); import_url5 = require("url"); - debug12 = (0, import_debug14.default)("socks-proxy-agent"); + debug11 = (0, import_debug14.default)("socks-proxy-agent"); setServernameFromNonIpHost3 = (options) => { if (options.servername === void 0 && options.host && !net7.isIP(options.host)) { return { @@ -74743,7 +71801,7 @@ var init_dist10 = __esm({ } return options; }; - SocksProxyAgent2 = class extends Agent4 { + SocksProxyAgent2 = class extends Agent6 { constructor(uri, opts) { super(opts); const url = typeof uri === "string" ? new import_url5.URL(uri) : uri; @@ -74793,21 +71851,21 @@ var init_dist10 = __esm({ if (tlsSocket) tlsSocket.destroy(); }; - debug12("Creating socks proxy connection: %o", socksOpts); + debug11("Creating socks proxy connection: %o", socksOpts); const { socket } = await import_socks2.SocksClient.createConnection(socksOpts); - debug12("Successfully created socks proxy connection"); + debug11("Successfully created socks proxy connection"); if (timeout !== null) { socket.setTimeout(timeout); socket.on("timeout", () => cleanup()); } if (opts.secureEndpoint) { - debug12("Upgrading socket connection to TLS"); + debug11("Upgrading socket connection to TLS"); const tlsSocket = tls4.connect({ ...omit4(setServernameFromNonIpHost3(opts), "host", "path", "port"), socket }); - tlsSocket.once("error", (error2) => { - debug12("Socket TLS error", error2.message); + tlsSocket.once("error", (error3) => { + debug11("Socket TLS error", error3.message); cleanup(tlsSocket); }); return tlsSocket; @@ -74844,12 +71902,12 @@ function parseProxyResponse2(socket) { } function onend() { cleanup(); - debug13("onend"); + debug12("onend"); reject(new Error("Proxy connection ended before receiving CONNECT response")); } function onerror(err) { cleanup(); - debug13("onerror %o", err); + debug12("onerror %o", err); reject(err); } function ondata(b6) { @@ -74858,7 +71916,7 @@ function parseProxyResponse2(socket) { const buffered = Buffer.concat(buffers, buffersLength); const endOfHeaders = buffered.indexOf("\r\n\r\n"); if (endOfHeaders === -1) { - debug13("have not received end of HTTP headers yet..."); + debug12("have not received end of HTTP headers yet..."); read(); return; } @@ -74891,7 +71949,7 @@ function parseProxyResponse2(socket) { headers[key] = value; } } - debug13("got proxy server response: %o %o", firstLine, headers); + debug12("got proxy server response: %o %o", firstLine, headers); cleanup(); resolve({ connect: { @@ -74907,11 +71965,11 @@ function parseProxyResponse2(socket) { read(); }); } -var import_debug15, debug13; +var import_debug15, debug12; var init_parse_proxy_response2 = __esm({ "node_modules/pac-proxy-agent/node_modules/https-proxy-agent/dist/parse-proxy-response.js"() { import_debug15 = __toESM(require_src(), 1); - debug13 = (0, import_debug15.default)("https-proxy-agent:parse-proxy-response"); + debug12 = (0, import_debug15.default)("https-proxy-agent:parse-proxy-response"); } }); @@ -74933,7 +71991,7 @@ function omit5(obj, ...keys) { } return ret; } -var net8, tls5, import_assert2, import_debug16, import_url6, debug14, setServernameFromNonIpHost4, HttpsProxyAgent2; +var net8, tls5, import_assert2, import_debug16, import_url6, debug13, setServernameFromNonIpHost4, HttpsProxyAgent2; var init_dist11 = __esm({ "node_modules/pac-proxy-agent/node_modules/https-proxy-agent/dist/index.js"() { net8 = __toESM(require("net"), 1); @@ -74943,7 +72001,7 @@ var init_dist11 = __esm({ init_dist5(); import_url6 = require("url"); init_parse_proxy_response2(); - debug14 = (0, import_debug16.default)("https-proxy-agent"); + debug13 = (0, import_debug16.default)("https-proxy-agent"); setServernameFromNonIpHost4 = (options) => { if (options.servername === void 0 && options.host && !net8.isIP(options.host)) { return { @@ -74953,13 +72011,13 @@ var init_dist11 = __esm({ } return options; }; - HttpsProxyAgent2 = class extends Agent4 { + HttpsProxyAgent2 = class extends Agent6 { constructor(proxy, opts) { super(opts); this.options = { path: void 0 }; this.proxy = typeof proxy === "string" ? new import_url6.URL(proxy) : proxy; this.proxyHeaders = opts?.headers ?? {}; - debug14("Creating new HttpsProxyAgent instance: %o", this.proxy.href); + debug13("Creating new HttpsProxyAgent instance: %o", this.proxy.href); const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ""); const port = this.proxy.port ? parseInt(this.proxy.port, 10) : this.proxy.protocol === "https:" ? 443 : 80; this.connectOpts = { @@ -74981,10 +72039,10 @@ var init_dist11 = __esm({ } let socket; if (proxy.protocol === "https:") { - debug14("Creating `tls.Socket`: %o", this.connectOpts); + debug13("Creating `tls.Socket`: %o", this.connectOpts); socket = tls5.connect(setServernameFromNonIpHost4(this.connectOpts)); } else { - debug14("Creating `net.Socket`: %o", this.connectOpts); + debug13("Creating `net.Socket`: %o", this.connectOpts); socket = net8.connect(this.connectOpts); } const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders }; @@ -75012,7 +72070,7 @@ var init_dist11 = __esm({ if (connect13.statusCode === 200) { req.once("socket", resume2); if (opts.secureEndpoint) { - debug14("Upgrading socket connection to TLS"); + debug13("Upgrading socket connection to TLS"); return tls5.connect({ ...omit5(setServernameFromNonIpHost4(opts), "host", "path", "port"), socket @@ -75024,7 +72082,7 @@ var init_dist11 = __esm({ const fakeSocket = new net8.Socket({ writable: false }); fakeSocket.readable = true; req.once("socket", (s) => { - debug14("Replaying proxy buffer for failed request"); + debug13("Replaying proxy buffer for failed request"); (0, import_assert2.default)(s.listenerCount("data") > 0); s.push(buffered); s.push(null); @@ -75051,7 +72109,7 @@ function omit6(obj, ...keys) { } return ret; } -var net9, tls6, import_debug17, import_events3, import_url7, debug15, HttpProxyAgent2; +var net9, tls6, import_debug17, import_events3, import_url7, debug14, HttpProxyAgent2; var init_dist12 = __esm({ "node_modules/pac-proxy-agent/node_modules/http-proxy-agent/dist/index.js"() { net9 = __toESM(require("net"), 1); @@ -75060,13 +72118,13 @@ var init_dist12 = __esm({ import_events3 = require("events"); init_dist5(); import_url7 = require("url"); - debug15 = (0, import_debug17.default)("http-proxy-agent"); - HttpProxyAgent2 = class extends Agent4 { + debug14 = (0, import_debug17.default)("http-proxy-agent"); + HttpProxyAgent2 = class extends Agent6 { constructor(proxy, opts) { super(opts); this.proxy = typeof proxy === "string" ? new import_url7.URL(proxy) : proxy; this.proxyHeaders = opts?.headers ?? {}; - debug15("Creating new HttpProxyAgent instance: %o", this.proxy.href); + debug14("Creating new HttpProxyAgent instance: %o", this.proxy.href); const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ""); const port = this.proxy.port ? parseInt(this.proxy.port, 10) : this.proxy.protocol === "https:" ? 443 : 80; this.connectOpts = { @@ -75112,21 +72170,21 @@ var init_dist12 = __esm({ } let first; let endOfHeaders; - debug15("Regenerating stored HTTP header string for request"); + debug14("Regenerating stored HTTP header string for request"); req._implicitHeader(); if (req.outputData && req.outputData.length > 0) { - debug15("Patching connection write() output buffer with updated header"); + debug14("Patching connection write() output buffer with updated header"); first = req.outputData[0].data; endOfHeaders = first.indexOf("\r\n\r\n") + 4; req.outputData[0].data = req._header + first.substring(endOfHeaders); - debug15("Output buffer: %o", req.outputData[0].data); + debug14("Output buffer: %o", req.outputData[0].data); } let socket; if (this.proxy.protocol === "https:") { - debug15("Creating `tls.Socket`: %o", this.connectOpts); + debug14("Creating `tls.Socket`: %o", this.connectOpts); socket = tls6.connect(this.connectOpts); } else { - debug15("Creating `net.Socket`: %o", this.connectOpts); + debug14("Creating `net.Socket`: %o", this.connectOpts); socket = net9.connect(this.connectOpts); } await (0, import_events3.once)(socket, "connect"); @@ -75142,12 +72200,12 @@ var dist_exports7 = {}; __export(dist_exports7, { PacProxyAgent: () => PacProxyAgent }); -var net10, tls7, crypto2, import_events4, import_debug18, import_url8, debug16, setServernameFromNonIpHost5, PacProxyAgent; +var net10, tls7, crypto3, import_events4, import_debug18, import_url8, debug15, setServernameFromNonIpHost5, PacProxyAgent; var init_dist13 = __esm({ "node_modules/pac-proxy-agent/dist/index.js"() { net10 = __toESM(require("net"), 1); tls7 = __toESM(require("tls"), 1); - crypto2 = __toESM(require("crypto"), 1); + crypto3 = __toESM(require("crypto"), 1); import_events4 = require("events"); import_debug18 = __toESM(require_src(), 1); import_url8 = require("url"); @@ -75155,7 +72213,7 @@ var init_dist13 = __esm({ init_dist6(); init_dist8(); init_dist9(); - debug16 = (0, import_debug18.default)("pac-proxy-agent"); + debug15 = (0, import_debug18.default)("pac-proxy-agent"); setServernameFromNonIpHost5 = (options) => { if (options.servername === void 0 && options.host && !net10.isIP(options.host)) { return { @@ -75165,7 +72223,7 @@ var init_dist13 = __esm({ } return options; }; - PacProxyAgent = class extends Agent4 { + PacProxyAgent = class extends Agent6 { constructor(uri, opts) { super(opts); this.clearResolverPromise = () => { @@ -75173,7 +72231,7 @@ var init_dist13 = __esm({ }; const uriStr = typeof uri === "string" ? uri : uri.href; this.uri = new import_url8.URL(uriStr.replace(/^pac\+/i, "")); - debug16("Creating PacProxyAgent with URI %o", this.uri.href); + debug15("Creating PacProxyAgent with URI %o", this.uri.href); this.opts = { ...opts }; this.cache = void 0; this.resolver = void 0; @@ -75200,9 +72258,9 @@ var init_dist13 = __esm({ QuickJS.create(), this.loadPacFile() ]); - const hash = crypto2.createHash("sha1").update(code).digest("hex"); + const hash = crypto3.createHash("sha1").update(code).digest("hex"); if (this.resolver && this.resolverHash === hash) { - debug16("Same sha1 hash for code - contents have not changed, reusing previous proxy resolver"); + debug15("Same sha1 hash for code - contents have not changed, reusing previous proxy resolver"); qjs.dispose(); return this.resolver; } @@ -75210,13 +72268,13 @@ var init_dist13 = __esm({ this.qjs.dispose(); } this.qjs = qjs; - debug16("Creating new proxy resolver instance"); + debug15("Creating new proxy resolver instance"); this.resolver = createPacResolver(qjs, code, this.opts); this.resolverHash = hash; return this.resolver; } catch (err) { if (this.resolver && err.code === "ENOTMODIFIED") { - debug16("Got ENOTMODIFIED response, reusing previous proxy resolver"); + debug15("Got ENOTMODIFIED response, reusing previous proxy resolver"); return this.resolver; } throw err; @@ -75228,12 +72286,12 @@ var init_dist13 = __esm({ * @api private */ async loadPacFile() { - debug16("Loading PAC file: %o", this.uri); + debug15("Loading PAC file: %o", this.uri); const rs = await getUri(this.uri, { ...this.opts, cache: this.cache }); - debug16("Got `Readable` instance for URI"); + debug15("Got `Readable` instance for URI"); this.cache = rs; const buf = await toBuffer(rs); - debug16("Read %o byte PAC file from URI", buf.length); + debug15("Read %o byte PAC file from URI", buf.length); return buf.toString("utf8"); } /** @@ -75247,7 +72305,7 @@ var init_dist13 = __esm({ const host = opts.host && net10.isIPv6(opts.host) ? `[${opts.host}]` : opts.host; const defaultPort = secureEndpoint ? 443 : 80; const url = Object.assign(new import_url8.URL(req.path, `${protocol}//${host}`), defaultPort ? void 0 : { port: opts.port }); - debug16("url: %s", url); + debug15("url: %s", url); let result = await resolver(url); if (!result) { result = "DIRECT"; @@ -75260,7 +72318,7 @@ var init_dist13 = __esm({ let agent = null; let socket = null; const [type, target] = proxy.split(/\s+/); - debug16("Attempting to use proxy: %o", proxy); + debug15("Attempting to use proxy: %o", proxy); if (type === "DIRECT") { if (secureEndpoint) { socket = tls7.connect(setServernameFromNonIpHost5(opts)); @@ -75299,7 +72357,7 @@ var init_dist13 = __esm({ } throw new Error(`Could not determine proxy type for: ${proxy}`); } catch (err) { - debug16("Got error for proxy %o: %o", proxy, err); + debug15("Got error for proxy %o: %o", proxy, err); req.emit("proxy", { proxy, error: err }); } } @@ -75322,22 +72380,1381 @@ __export(index_exports, { run: () => run }); module.exports = __toCommonJS(index_exports); -var core4 = __toESM(require_core()); + +// node_modules/@actions/core/lib/command.js +var os = __toESM(require("os"), 1); + +// node_modules/@actions/core/lib/utils.js +function toCommandValue(input) { + if (input === null || input === void 0) { + return ""; + } else if (typeof input === "string" || input instanceof String) { + return input; + } + return JSON.stringify(input); +} +function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; +} + +// node_modules/@actions/core/lib/command.js +function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os.EOL); +} +var CMD_STRING = "::"; +var Command = class { + constructor(command, properties, message) { + if (!command) { + command = "missing.command"; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } else { + cmdStr += ","; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } +}; +function escapeData(s) { + return toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); +} +function escapeProperty(s) { + return toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); +} + +// node_modules/@actions/core/lib/file-command.js +var crypto2 = __toESM(require("crypto"), 1); +var fs = __toESM(require("fs"), 1); +var os2 = __toESM(require("os"), 1); +function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs.appendFileSync(filePath, `${toCommandValue(message)}${os2.EOL}`, { + encoding: "utf8" + }); +} +function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; + const convertedValue = toCommandValue(value); + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + } + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } + return `${key}<<${delimiter}${os2.EOL}${convertedValue}${os2.EOL}${delimiter}`; +} + +// node_modules/@actions/core/lib/core.js +var os4 = __toESM(require("os"), 1); + +// node_modules/@actions/http-client/lib/index.js +var http = __toESM(require("http"), 1); +var https = __toESM(require("https"), 1); + +// node_modules/@actions/http-client/lib/proxy.js +function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === "https:"; + if (checkBypass(reqUrl)) { + return void 0; + } + const proxyVar = (() => { + if (usingSsl) { + return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; + } else { + return process.env["http_proxy"] || process.env["HTTP_PROXY"]; + } + })(); + if (proxyVar) { + try { + return new DecodedURL(proxyVar); + } catch (_a2) { + if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) + return new DecodedURL(`http://${proxyVar}`); + } + } else { + return void 0; + } +} +function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + const reqHost = reqUrl.hostname; + if (isLoopbackAddress(reqHost)) { + return true; + } + const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; + if (!noProxy) { + return false; + } + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } else if (reqUrl.protocol === "http:") { + reqPort = 80; + } else if (reqUrl.protocol === "https:") { + reqPort = 443; + } + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === "number") { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { + if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { + return true; + } + } + return false; +} +function isLoopbackAddress(host) { + const hostLower = host.toLowerCase(); + return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); +} +var DecodedURL = class extends URL { + constructor(url, base) { + super(url, base); + this._decodedUsername = decodeURIComponent(super.username); + this._decodedPassword = decodeURIComponent(super.password); + } + get username() { + return this._decodedUsername; + } + get password() { + return this._decodedPassword; + } +}; + +// node_modules/@actions/http-client/lib/index.js +var tunnel = __toESM(require_tunnel2(), 1); +var import_undici = __toESM(require_undici(), 1); +var __awaiter = function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e5) { + reject(e5); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e5) { + reject(e5); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var HttpCodes; +(function(HttpCodes2) { + HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; + HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; + HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; + HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; + HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; + HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; + HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; + HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; + HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; + HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; + HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; +})(HttpCodes || (HttpCodes = {})); +var Headers; +(function(Headers2) { + Headers2["Accept"] = "accept"; + Headers2["ContentType"] = "content-type"; +})(Headers || (Headers = {})); +var MediaTypes; +(function(MediaTypes2) { + MediaTypes2["ApplicationJson"] = "application/json"; +})(MediaTypes || (MediaTypes = {})); +var HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect +]; +var HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout +]; +var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; +var ExponentialBackoffCeiling = 10; +var ExponentialBackoffTimeSlice = 5; +var HttpClientError = class _HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = "HttpClientError"; + this.statusCode = statusCode; + Object.setPrototypeOf(this, _HttpClientError.prototype); + } +}; +var HttpClientResponse = class { + constructor(message) { + this.message = message; + } + readBody() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { + let output = Buffer.alloc(0); + this.message.on("data", (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on("end", () => { + resolve(output.toString()); + }); + })); + }); + } + readBodyBuffer() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { + const chunks = []; + this.message.on("data", (chunk) => { + chunks.push(chunk); + }); + this.message.on("end", () => { + resolve(Buffer.concat(chunks)); + }); + })); + }); + } +}; +var HttpClient = class { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = this._getUserAgentWithOrchestrationId(userAgent); + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("GET", requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("DELETE", requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data3, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("POST", requestUrl, data3, additionalHeaders || {}); + }); + } + patch(requestUrl, data3, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("PATCH", requestUrl, data3, additionalHeaders || {}); + }); + } + put(requestUrl, data3, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("PUT", requestUrl, data3, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("HEAD", requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream, additionalHeaders); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl_1) { + return __awaiter(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl_1, obj_1) { + return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { + const data3 = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data3, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl_1, obj_1) { + return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { + const data3 = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data3, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl_1, obj_1) { + return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { + const data3 = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data3, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data3, headers) { + return __awaiter(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error("Client has already been disposed."); + } + const parsedUrl = new URL(requestUrl); + let info2 = this._prepareRequest(verb, parsedUrl, headers); + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info2, data3); + if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) { + if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info2, data3); + } else { + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { + const redirectUrl = response.message.headers["location"]; + if (!redirectUrl) { + break; + } + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { + throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); + } + yield response.readBody(); + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) { + if (header.toLowerCase() === "authorization") { + delete headers[header]; + } + } + } + info2 = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info2, data3); + redirectsRemaining--; + } + if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { + return response; + } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info2, data3) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => { + function callbackForResult(err, res) { + if (err) { + reject(err); + } else if (!res) { + reject(new Error("Unknown error")); + } else { + resolve(res); + } + } + this.requestRawWithCallback(info2, data3, callbackForResult); + }); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info2, data3, onResult) { + if (typeof data3 === "string") { + if (!info2.options.headers) { + info2.options.headers = {}; + } + info2.options.headers["Content-Length"] = Buffer.byteLength(data3, "utf8"); + } + let callbackCalled = false; + function handleResult(err, res) { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + } + const req = info2.httpModule.request(info2.options, (msg) => { + const res = new HttpClientResponse(msg); + handleResult(void 0, res); + }); + let socket; + req.on("socket", (sock) => { + socket = sock; + }); + req.setTimeout(this._socketTimeout || 3 * 6e4, () => { + if (socket) { + socket.end(); + } + handleResult(new Error(`Request timeout: ${info2.options.path}`)); + }); + req.on("error", function(err) { + handleResult(err); + }); + if (data3 && typeof data3 === "string") { + req.write(data3, "utf8"); + } + if (data3 && typeof data3 !== "string") { + data3.on("close", function() { + req.end(); + }); + data3.pipe(req); + } else { + req.end(); + } + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + const parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + getAgentDispatcher(serverUrl) { + const parsedUrl = new URL(serverUrl); + const proxyUrl = getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (!useProxy) { + return; + } + return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info2 = {}; + info2.parsedUrl = requestUrl; + const usingSsl = info2.parsedUrl.protocol === "https:"; + info2.httpModule = usingSsl ? https : http; + const defaultPort = usingSsl ? 443 : 80; + info2.options = {}; + info2.options.host = info2.parsedUrl.hostname; + info2.options.port = info2.parsedUrl.port ? parseInt(info2.parsedUrl.port) : defaultPort; + info2.options.path = (info2.parsedUrl.pathname || "") + (info2.parsedUrl.search || ""); + info2.options.method = method; + info2.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info2.options.headers["user-agent"] = this.userAgent; + } + info2.options.agent = this._getAgent(info2.parsedUrl); + if (this.handlers) { + for (const handler of this.handlers) { + handler.prepareRequest(info2.options); + } + } + return info2; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + } + return lowercaseKeys(headers || {}); + } + /** + * Gets an existing header value or returns a default. + * Handles converting number header values to strings since HTTP headers must be strings. + * Note: This returns string | string[] since some headers can have multiple values. + * For headers that must always be a single string (like Content-Type), use the + * specialized _getExistingOrDefaultContentTypeHeader method instead. + */ + _getExistingOrDefaultHeader(additionalHeaders, header, _default) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; + if (headerValue) { + clientHeader = typeof headerValue === "number" ? headerValue.toString() : headerValue; + } + } + const additionalValue = additionalHeaders[header]; + if (additionalValue !== void 0) { + return typeof additionalValue === "number" ? additionalValue.toString() : additionalValue; + } + if (clientHeader !== void 0) { + return clientHeader; + } + return _default; + } + /** + * Specialized version of _getExistingOrDefaultHeader for Content-Type header. + * Always returns a single string (not an array) since Content-Type should be a single value. + * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. + * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers + * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). + */ + _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; + if (headerValue) { + if (typeof headerValue === "number") { + clientHeader = String(headerValue); + } else if (Array.isArray(headerValue)) { + clientHeader = headerValue.join(", "); + } else { + clientHeader = headerValue; + } + } + } + const additionalValue = additionalHeaders[Headers.ContentType]; + if (additionalValue !== void 0) { + if (typeof additionalValue === "number") { + return String(additionalValue); + } else if (Array.isArray(additionalValue)) { + return additionalValue.join(", "); + } else { + return additionalValue; + } + } + if (clientHeader !== void 0) { + return clientHeader; + } + return _default; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (!useProxy) { + agent = this._agent; + } + if (agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === "https:"; + let maxSockets = 100; + if (this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + maxSockets, + keepAlive: this._keepAlive, + proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` + }), { host: proxyUrl.hostname, port: proxyUrl.port }) + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === "https:"; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + if (!agent) { + const options = { keepAlive: this._keepAlive, maxSockets }; + agent = usingSsl ? new https.Agent(options) : new http.Agent(options); + this._agent = agent; + } + if (usingSsl && this._ignoreSslError) { + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _getProxyAgentDispatcher(parsedUrl, proxyUrl) { + let proxyAgent; + if (this._keepAlive) { + proxyAgent = this._proxyAgentDispatcher; + } + if (proxyAgent) { + return proxyAgent; + } + const usingSsl = parsedUrl.protocol === "https:"; + proxyAgent = new import_undici.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { + token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` + })); + this._proxyAgentDispatcher = proxyAgent; + if (usingSsl && this._ignoreSslError) { + proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { + rejectUnauthorized: false + }); + } + return proxyAgent; + } + _getUserAgentWithOrchestrationId(userAgent) { + const baseUserAgent = userAgent || "actions/http-client"; + const orchId = process.env["ACTIONS_ORCHESTRATION_ID"]; + if (orchId) { + const sanitizedId = orchId.replace(/[^a-z0-9_.-]/gi, "_"); + return `${baseUserAgent} actions_orchestration_id/${sanitizedId}`; + } + return baseUserAgent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise((resolve) => setTimeout(() => resolve(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + if (statusCode === HttpCodes.NotFound) { + resolve(response); + } + function dateTimeDeserializer(key, value) { + if (typeof value === "string") { + const a5 = new Date(value); + if (!isNaN(a5.valueOf())) { + return a5; + } + } + return value; + } + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } catch (err) { + } + if (statusCode > 299) { + let msg; + if (obj && obj.message) { + msg = obj.message; + } else if (contents && contents.length > 0) { + msg = contents; + } else { + msg = `Failed request: (${statusCode})`; + } + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } else { + resolve(response); + } + })); + }); + } +}; +var lowercaseKeys = (obj) => Object.keys(obj).reduce((c5, k5) => (c5[k5.toLowerCase()] = obj[k5], c5), {}); + +// node_modules/@actions/http-client/lib/auth.js +var __awaiter2 = function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e5) { + reject(e5); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e5) { + reject(e5); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } +}; + +// node_modules/@actions/core/lib/oidc-utils.js +var __awaiter3 = function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e5) { + reject(e5); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e5) { + reject(e5); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var OidcClient = class _OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new HttpClient("actions/oidc-client", [new BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); + } + return runtimeUrl; + } + static getCall(id_token_url) { + return __awaiter3(this, void 0, void 0, function* () { + var _a2; + const httpclient = _OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error3) => { + throw new Error(`Failed to get ID Token. + + Error Code : ${error3.statusCode} + + Error Message: ${error3.message}`); + }); + const id_token = (_a2 = res.result) === null || _a2 === void 0 ? void 0 : _a2.value; + if (!id_token) { + throw new Error("Response json body do not have ID Token field"); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter3(this, void 0, void 0, function* () { + try { + let id_token_url = _OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + debug(`ID token url is ${id_token_url}`); + const id_token = yield _OidcClient.getCall(id_token_url); + setSecret(id_token); + return id_token; + } catch (error3) { + throw new Error(`Error message: ${error3.message}`); + } + }); + } +}; + +// node_modules/@actions/core/lib/summary.js +var import_os = require("os"); +var import_fs = require("fs"); +var __awaiter4 = function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e5) { + reject(e5); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e5) { + reject(e5); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var { access, appendFile, writeFile } = import_fs.promises; +var SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; +var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter4(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, import_fs.constants.R_OK | import_fs.constants.W_OK); + } catch (_a2) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag2, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag2}${htmlAttrs}>`; + } + return `<${tag2}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter4(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter4(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(import_os.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag2 = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag2, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data: data3, colspan, rowspan } = cell; + const tag2 = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag2, data3, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag2 = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag2) ? tag2 : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } +}; +var _summary = new Summary(); + +// node_modules/@actions/core/lib/platform.js +var import_os2 = __toESM(require("os"), 1); + +// node_modules/@actions/io/lib/io-util.js +var fs2 = __toESM(require("fs"), 1); +var { chmod, copyFile, lstat, mkdir, open, readdir, rename, rm, rmdir, stat, symlink, unlink } = fs2.promises; +var IS_WINDOWS = process.platform === "win32"; +var READONLY = fs2.constants.O_RDONLY; + +// node_modules/@actions/exec/lib/toolrunner.js +var IS_WINDOWS2 = process.platform === "win32"; + +// node_modules/@actions/core/lib/platform.js +var platform = import_os2.default.platform(); +var arch = import_os2.default.arch(); + +// node_modules/@actions/core/lib/core.js +var __awaiter5 = function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e5) { + reject(e5); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e5) { + reject(e5); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var ExitCode; +(function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; +})(ExitCode || (ExitCode = {})); +function exportVariable(name, val) { + const convertedVal = toCommandValue(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return issueFileCommand("ENV", prepareKeyValueMessage(name, val)); + } + issueCommand("set-env", { name }, convertedVal); +} +function setSecret(secret) { + issueCommand("add-mask", {}, secret); +} +function getInput(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); +} +function getMultilineInput(name, options) { + const inputs = getInput(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map((input) => input.trim()); +} +function setOutput(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return issueFileCommand("OUTPUT", prepareKeyValueMessage(name, value)); + } + process.stdout.write(os4.EOL); + issueCommand("set-output", { name }, toCommandValue(value)); +} +function setFailed(message) { + process.exitCode = ExitCode.Failure; + error(message); +} +function debug(message) { + issueCommand("debug", {}, message); +} +function error(message, properties = {}) { + issueCommand("error", toCommandProperties(properties), message instanceof Error ? message.toString() : message); +} +function warning(message, properties = {}) { + issueCommand("warning", toCommandProperties(properties), message instanceof Error ? message.toString() : message); +} +function notice(message, properties = {}) { + issueCommand("notice", toCommandProperties(properties), message instanceof Error ? message.toString() : message); +} +function info(message) { + process.stdout.write(message + os4.EOL); +} +function getIDToken(aud) { + return __awaiter5(this, void 0, void 0, function* () { + return yield OidcClient.getIDToken(aud); + }); +} // src/assumeRole.ts var import_node_assert = __toESM(require("node:assert")); var import_node_path8 = __toESM(require("node:path")); -var core2 = __toESM(require_core()); var import_client_sts2 = __toESM(require_dist_cjs19()); // src/helpers.ts -var fs = __toESM(require("node:fs")); +var fs3 = __toESM(require("node:fs")); var path = __toESM(require("node:path")); -var core = __toESM(require_core()); var import_client_sts = __toESM(require_dist_cjs19()); var MAX_TAG_VALUE_LENGTH = 256; var SANITIZATION_CHARACTER = "_"; var SPECIAL_CHARS_REGEX = /[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]+/; +var USER_AGENT_PREFIX = "configure-aws-credentials-for-github-actions"; +var UA_FIELDS = [ + { env: "GITHUB_ACTION", label: "action", pattern: /^[A-Za-z0-9_-]{1,128}$/ }, + { env: "GITHUB_RUN_ID", label: "run_id", pattern: /^[0-9]{1,20}$/ }, + { env: "GITHUB_RUN_ATTEMPT", label: "attempt", pattern: /^[0-9]{1,10}$/ } +]; +function buildCustomUserAgent() { + const tokens = [[USER_AGENT_PREFIX]]; + for (const { env: env2, label, pattern } of UA_FIELDS) { + const value = process.env[env2]; + if (value === void 0) continue; + if (pattern.test(value)) { + tokens.push(["md", `${label}#${value}`]); + } else { + warning(`${env2} has unexpected format; omitting from User-Agent`); + } + } + return tokens; +} function translateEnvVariables() { const envVars = [ "AWS_REGION", @@ -75373,55 +73790,55 @@ function translateEnvVariables() { } function exportCredentials(creds, outputCredentials, outputEnvCredentials) { if (creds?.AccessKeyId) { - core.setSecret(creds.AccessKeyId); + setSecret(creds.AccessKeyId); } if (creds?.SecretAccessKey) { - core.setSecret(creds.SecretAccessKey); + setSecret(creds.SecretAccessKey); } if (creds?.SessionToken) { - core.setSecret(creds.SessionToken); + setSecret(creds.SessionToken); } if (outputEnvCredentials) { if (creds?.AccessKeyId) { - core.exportVariable("AWS_ACCESS_KEY_ID", creds.AccessKeyId); + exportVariable("AWS_ACCESS_KEY_ID", creds.AccessKeyId); } if (creds?.SecretAccessKey) { - core.exportVariable("AWS_SECRET_ACCESS_KEY", creds.SecretAccessKey); + exportVariable("AWS_SECRET_ACCESS_KEY", creds.SecretAccessKey); } if (creds?.SessionToken) { - core.exportVariable("AWS_SESSION_TOKEN", creds.SessionToken); + exportVariable("AWS_SESSION_TOKEN", creds.SessionToken); } else if (process.env.AWS_SESSION_TOKEN) { - core.exportVariable("AWS_SESSION_TOKEN", ""); + exportVariable("AWS_SESSION_TOKEN", ""); } } if (outputCredentials) { if (creds?.AccessKeyId) { - core.setOutput("aws-access-key-id", creds.AccessKeyId); + setOutput("aws-access-key-id", creds.AccessKeyId); } if (creds?.SecretAccessKey) { - core.setOutput("aws-secret-access-key", creds.SecretAccessKey); + setOutput("aws-secret-access-key", creds.SecretAccessKey); } if (creds?.SessionToken) { - core.setOutput("aws-session-token", creds.SessionToken); + setOutput("aws-session-token", creds.SessionToken); } if (creds?.Expiration) { - core.setOutput("aws-expiration", creds.Expiration); + setOutput("aws-expiration", creds.Expiration); } } } function unsetCredentials(outputEnvCredentials) { if (outputEnvCredentials) { - core.exportVariable("AWS_ACCESS_KEY_ID", ""); - core.exportVariable("AWS_SECRET_ACCESS_KEY", ""); - core.exportVariable("AWS_SESSION_TOKEN", ""); - core.exportVariable("AWS_REGION", ""); - core.exportVariable("AWS_DEFAULT_REGION", ""); + exportVariable("AWS_ACCESS_KEY_ID", ""); + exportVariable("AWS_SECRET_ACCESS_KEY", ""); + exportVariable("AWS_SESSION_TOKEN", ""); + exportVariable("AWS_REGION", ""); + exportVariable("AWS_DEFAULT_REGION", ""); } } function exportRegion(region, outputEnvCredentials) { if (outputEnvCredentials) { - core.exportVariable("AWS_DEFAULT_REGION", region); - core.exportVariable("AWS_REGION", region); + exportVariable("AWS_DEFAULT_REGION", region); + exportVariable("AWS_REGION", region); } } async function getCallerIdentity(client) { @@ -75443,11 +73860,11 @@ async function exportAccountId(credentialsClient, maskAccountId) { const accountId = identity.Account; const arn = identity.Arn; if (maskAccountId) { - core.setSecret(accountId); - core.setSecret(arn); + setSecret(accountId); + setSecret(arn); } - core.setOutput("aws-account-id", accountId); - core.setOutput("authenticated-arn", arn); + setOutput("aws-account-id", accountId); + setOutput("authenticated-arn", arn); return accountId; } function sanitizeGitHubVariables(name) { @@ -75465,41 +73882,42 @@ function verifyKeys(creds) { } if (creds.AccessKeyId) { if (SPECIAL_CHARS_REGEX.test(creds.AccessKeyId)) { - core.debug("AccessKeyId contains special characters."); + debug("AccessKeyId contains special characters."); return false; } } if (creds.SecretAccessKey) { if (SPECIAL_CHARS_REGEX.test(creds.SecretAccessKey)) { - core.debug("SecretAccessKey contains special characters."); + debug("SecretAccessKey contains special characters."); return false; } } return true; } -async function retryAndBackoff(fn, isRetryable, maxRetries = 12, retries = 0, base = 50) { +async function retryAndBackoff(fn, isRetryable, maxRetries = 12, retries = 0, base = 50, label) { try { return await fn(); } catch (err) { if (!isRetryable) { - core.debug(`retryAndBackoff: error is not retryable: ${errorMessage(err)}`); + debug(`retryAndBackoff: error is not retryable: ${errorMessage(err)}`); throw err; } const delay = Math.random() * (2 ** retries * base); const nextRetry = retries + 1; - core.debug( - `retryAndBackoff: attempt ${nextRetry} of ${maxRetries} failed: ${errorMessage(err)}. Retrying after ${Math.floor(delay)}ms.` + const opName = label ? ` ${label}` : ""; + info( + `Retry${opName}: attempt ${nextRetry} of ${maxRetries} failed: ${errorMessage(err)}. Retrying after ${Math.floor(delay)}ms.` ); await sleep2(delay); if (nextRetry >= maxRetries) { - core.debug("retryAndBackoff: reached max retries; giving up."); + info(`Retry${opName}: reached max retries (${maxRetries}); giving up.`); throw err; } - return await retryAndBackoff(fn, isRetryable, maxRetries, nextRetry, base); + return await retryAndBackoff(fn, isRetryable, maxRetries, nextRetry, base, label); } } -function errorMessage(error2) { - return error2 instanceof Error ? error2.message : String(error2); +function errorMessage(error3) { + return error3 instanceof Error ? error3.message : String(error3); } function isDefined(i5) { return i5 !== void 0 && i5 !== null; @@ -75521,7 +73939,7 @@ function getBooleanInput(name, options) { const falseValue = ["false", "False", "FALSE"]; const optionsWithoutDefault = { ...options }; delete optionsWithoutDefault.default; - const val = core.getInput(name, optionsWithoutDefault); + const val = getInput(name, optionsWithoutDefault); if (trueValue.includes(val)) return true; if (falseValue.includes(val)) return false; if (val === "") return options?.default ?? false; @@ -75530,7 +73948,7 @@ function getBooleanInput(name, options) { Support boolean input list: \`true | True | TRUE | false | False | FALSE\`` ); } -var O_NOFOLLOW = fs.constants.O_NOFOLLOW ?? 0; +var O_NOFOLLOW = fs3.constants.O_NOFOLLOW ?? 0; function isAllowListed(filePath) { const KUBERNETES_TOKEN_PATH_REGEX = /^\/var\/run\/secrets\/[^/]+\/serviceaccount\/token$/; if (process.platform !== "win32") { @@ -75540,7 +73958,7 @@ function isAllowListed(filePath) { } function isSymlink(filePath) { try { - return fs.lstatSync(filePath).isSymbolicLink(); + return fs3.lstatSync(filePath).isSymbolicLink(); } catch (err) { if (err.code === "ENOENT") return false; throw err; @@ -75556,7 +73974,7 @@ function refuseSymlinkOnPath(filePath) { } } function assertRegularFile(fd, filePath) { - const stats = fs.fstatSync(fd); + const stats = fs3.fstatSync(fd); if (!stats.isFile()) { throw new Error(`${filePath} (path is not a regular file)`); } @@ -75566,10 +73984,10 @@ function readFileUtf8(filePath) { if (!allowSymlink) { refuseSymlinkOnPath(filePath); } - const openFlags = fs.constants.O_RDONLY | (allowSymlink ? 0 : O_NOFOLLOW); + const openFlags = fs3.constants.O_RDONLY | (allowSymlink ? 0 : O_NOFOLLOW); let fd; try { - fd = fs.openSync(filePath, openFlags); + fd = fs3.openSync(filePath, openFlags); } catch (err) { const code = err.code; if (code === "ENOENT") return null; @@ -75580,16 +73998,16 @@ function readFileUtf8(filePath) { } try { assertRegularFile(fd, filePath); - return fs.readFileSync(fd, "utf-8"); + return fs3.readFileSync(fd, "utf-8"); } finally { - fs.closeSync(fd); + fs3.closeSync(fd); } } function writeFileUtf8(filePath, content, mode = 384) { refuseSymlinkOnPath(filePath); let fd; try { - fd = fs.openSync(filePath, fs.constants.O_WRONLY | fs.constants.O_CREAT | fs.constants.O_TRUNC | O_NOFOLLOW, mode); + fd = fs3.openSync(filePath, fs3.constants.O_WRONLY | fs3.constants.O_CREAT | fs3.constants.O_TRUNC | O_NOFOLLOW, mode); } catch (err) { if (err.code === "ELOOP") { throw new Error(`Refusing ${filePath} (path is a symbolic link)`); @@ -75599,15 +74017,15 @@ function writeFileUtf8(filePath, content, mode = 384) { try { assertRegularFile(fd, filePath); if (process.platform !== "win32") { - fs.fchmodSync(fd, mode); + fs3.fchmodSync(fd, mode); } - fs.writeFileSync(fd, content); + fs3.writeFileSync(fd, content); } finally { - fs.closeSync(fd); + fs3.closeSync(fd); } } -function mkdir(dir, mode = 448) { - fs.mkdirSync(dir, { recursive: true, mode }); +function mkdir2(dir, mode = 448) { + fs3.mkdirSync(dir, { recursive: true, mode }); if (isSymlink(dir)) { throw new Error(`Refusing ${dir} (path is a symbolic link)`); } @@ -75617,7 +74035,7 @@ function mkdir(dir, mode = 448) { async function assumeRoleWithOIDC(params, client, webIdentityToken) { delete params.Tags; delete params.TransitiveTagKeys; - core2.info("Assuming role with OIDC"); + info("Assuming role with OIDC"); try { const creds = await client.send( new import_client_sts2.AssumeRoleWithWebIdentityCommand({ @@ -75626,12 +74044,12 @@ async function assumeRoleWithOIDC(params, client, webIdentityToken) { }) ); return creds; - } catch (error2) { - throw new Error(`Could not assume role with OIDC: ${errorMessage(error2)}`); + } catch (error3) { + throw new Error(`Could not assume role with OIDC: ${errorMessage(error3)}`); } } async function assumeRoleWithWebIdentityTokenFile(params, client, webIdentityTokenFile, workspace) { - core2.debug( + debug( "webIdentityTokenFile provided. Will call sts:AssumeRoleWithWebIdentity and take session tags from token contents." ); const webIdentityTokenFilePath = import_node_path8.default.isAbsolute(webIdentityTokenFile) ? webIdentityTokenFile : import_node_path8.default.join(workspace, webIdentityTokenFile); @@ -75639,7 +74057,7 @@ async function assumeRoleWithWebIdentityTokenFile(params, client, webIdentityTok if (webIdentityToken === null) { throw new Error(`Web identity token file does not exist: ${webIdentityTokenFilePath}`); } - core2.info("Assuming role with web identity token file"); + info("Assuming role with web identity token file"); try { delete params.Tags; const creds = await client.send( @@ -75649,19 +74067,93 @@ async function assumeRoleWithWebIdentityTokenFile(params, client, webIdentityTok }) ); return creds; - } catch (error2) { - throw new Error(`Could not assume role with web identity token file: ${errorMessage(error2)}`); + } catch (error3) { + throw new Error(`Could not assume role with web identity token file: ${errorMessage(error3)}`); } } async function assumeRoleWithCredentials(params, client) { - core2.info("Assuming role with user credentials"); + info("Assuming role with user credentials"); try { const creds = await client.send(new import_client_sts2.AssumeRoleCommand({ ...params })); return creds; - } catch (error2) { - throw new Error(`Could not assume role with user credentials: ${errorMessage(error2)}`); + } catch (error3) { + throw new Error(`Could not assume role with user credentials: ${errorMessage(error3)}`); } } +var TAG_KEY_REGEX = /^[\p{L}\p{Z}\p{N}_.:/=+\-@]+$/u; +var TAG_VALUE_REGEX = /^[\p{L}\p{Z}\p{N}_.:/=+\-@]*$/u; +var MAX_TAG_KEY_LENGTH = 128; +var MAX_TAG_VALUE_LENGTH2 = 256; +var MAX_SESSION_TAGS = 50; +var PROTECTED_TAG_SOURCES = [ + { key: "Repository", envVar: "GITHUB_REPOSITORY" }, + { key: "Workflow", envVar: "GITHUB_WORKFLOW" }, + { key: "Action", envVar: "GITHUB_ACTION" }, + { key: "Actor", envVar: "GITHUB_ACTOR" }, + { key: "Commit", envVar: "GITHUB_SHA" }, + { key: "Branch", envVar: "GITHUB_REF" } +]; +var OVERRIDEABLE_TAG_SOURCES_BY_PRIORITY = [ + { key: "EventName", envVar: "GITHUB_EVENT_NAME" }, + { key: "BaseRef", envVar: "GITHUB_BASE_REF" }, + { key: "HeadRef", envVar: "GITHUB_HEAD_REF" }, + { key: "RefName", envVar: "GITHUB_REF_NAME" }, + { key: "RunId", envVar: "GITHUB_RUN_ID" }, + { key: "RefType", envVar: "GITHUB_REF_TYPE" }, + { key: "Job", envVar: "GITHUB_JOB" }, + { key: "TriggeringActor", envVar: "GITHUB_TRIGGERING_ACTOR" } +]; +var PROTECTED_TAG_KEYS = /* @__PURE__ */ new Set(["GitHub", ...PROTECTED_TAG_SOURCES.map((s) => s.key)]); +function parseAndValidateCustomTags(customTags, existingTags) { + let parsed; + try { + parsed = JSON.parse(customTags); + } catch { + throw new Error("custom-tags: input is not valid JSON"); + } + if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) { + throw new Error("custom-tags: input must be a JSON object (not an array or primitive)"); + } + const newTags = []; + for (const [key, value] of Object.entries(parsed)) { + if (typeof value === "object") { + throw new Error( + `custom-tags: value for key '${key}' must be a string, number, or boolean (not an object or array)` + ); + } + const stringValue = String(value); + if (key.length === 0 || key.length > MAX_TAG_KEY_LENGTH) { + throw new Error(`custom-tags: key '${key}' must be between 1 and ${MAX_TAG_KEY_LENGTH} characters`); + } + if (stringValue.length > MAX_TAG_VALUE_LENGTH2) { + throw new Error( + `custom-tags: value for key '${key}' exceeds maximum length of ${MAX_TAG_VALUE_LENGTH2} characters` + ); + } + if (!TAG_KEY_REGEX.test(key)) { + throw new Error( + `custom-tags: key '${key}' contains invalid characters. Allowed: unicode letters, digits, spaces, and _.:/=+-@` + ); + } + if (stringValue.length > 0 && !TAG_VALUE_REGEX.test(stringValue)) { + throw new Error( + `custom-tags: value for key '${key}' contains invalid characters. Allowed: unicode letters, digits, spaces, and _.:/=+-@` + ); + } + if (PROTECTED_TAG_KEYS.has(key)) { + throw new Error( + `custom-tags: key '${key}' conflicts with a protected session tag set by this action and cannot be overridden` + ); + } + newTags.push({ Key: key, Value: stringValue }); + } + if (existingTags.length + newTags.length > MAX_SESSION_TAGS) { + throw new Error( + `custom-tags: total session tags (${existingTags.length + newTags.length}) would exceed the AWS limit of ${MAX_SESSION_TAGS}` + ); + } + return newTags; +} async function assumeRole(params) { const { credentialsClient, @@ -75675,31 +74167,38 @@ async function assumeRole(params) { webIdentityTokenFile, webIdentityToken, inlineSessionPolicy, - managedSessionPolicies + managedSessionPolicies, + customTags } = { ...params }; const { GITHUB_REPOSITORY, GITHUB_WORKFLOW, GITHUB_ACTION, GITHUB_ACTOR, GITHUB_SHA, GITHUB_WORKSPACE } = process.env; if (!GITHUB_REPOSITORY || !GITHUB_WORKFLOW || !GITHUB_ACTION || !GITHUB_ACTOR || !GITHUB_SHA || !GITHUB_WORKSPACE) { throw new Error("Missing required environment variables. Are you running in GitHub Actions?"); } - const tagArray = [ - { Key: "GitHub", Value: "Actions" }, - { Key: "Repository", Value: GITHUB_REPOSITORY }, - { Key: "Workflow", Value: sanitizeGitHubVariables(GITHUB_WORKFLOW) }, - { Key: "Action", Value: GITHUB_ACTION }, - { Key: "Actor", Value: sanitizeGitHubVariables(GITHUB_ACTOR) }, - { Key: "Commit", Value: GITHUB_SHA } - ]; - if (process.env.GITHUB_REF) { - tagArray.push({ - Key: "Branch", - Value: sanitizeGitHubVariables(process.env.GITHUB_REF) - }); + const protectedTags = [{ Key: "GitHub", Value: "Actions" }]; + for (const { key, envVar } of PROTECTED_TAG_SOURCES) { + const value = process.env[envVar]; + if (value) { + protectedTags.push({ Key: key, Value: sanitizeGitHubVariables(value) }); + } } + const parsedCustomTags = customTags ? parseAndValidateCustomTags(customTags, protectedTags) : []; + const customTagKeys = new Set(parsedCustomTags.map((t) => t.Key)); + const availableOverrideableSlots = MAX_SESSION_TAGS - protectedTags.length - parsedCustomTags.length; + const overrideableTags = []; + for (const { key, envVar } of OVERRIDEABLE_TAG_SOURCES_BY_PRIORITY) { + if (overrideableTags.length >= availableOverrideableSlots) break; + if (customTagKeys.has(key)) continue; + const value = process.env[envVar]; + if (value) { + overrideableTags.push({ Key: key, Value: sanitizeGitHubVariables(value) }); + } + } + const tagArray = [...protectedTags, ...overrideableTags, ...parsedCustomTags]; const tags = roleSkipSessionTagging ? void 0 : tagArray; if (!tags) { - core2.debug("Role session tagging has been skipped."); + debug("Role session tagging has been skipped."); } else { - core2.debug(`${tags.length} role session tags are being used.`); + debug(`${tags.length} role session tags are being used:`); } const transitiveTagKeysArray = roleSkipSessionTagging ? void 0 : transitiveTagKeys?.filter((key) => tags?.some((tag2) => tag2.Key === key)); let roleArn = roleToAssume; @@ -75742,13 +74241,12 @@ async function assumeRole(params) { } // src/CredentialsClient.ts -var import_core13 = __toESM(require_core()); var import_client_sts3 = __toESM(require_dist_cjs19()); var import_node_http_handler5 = __toESM(require_dist_cjs9()); // node_modules/proxy-agent/dist/index.js -var http4 = __toESM(require("http"), 1); -var https3 = __toESM(require("https"), 1); +var http5 = __toESM(require("http"), 1); +var https4 = __toESM(require("https"), 1); var import_url9 = require("url"); // node_modules/proxy-agent/node_modules/lru-cache/index.mjs @@ -76819,7 +75317,7 @@ function getEnv(key) { } // node_modules/proxy-agent/dist/index.js -var debug17 = (0, import_debug19.default)("proxy-agent"); +var debug16 = (0, import_debug19.default)("proxy-agent"); var wellKnownAgents = { http: async () => (await Promise.resolve().then(() => (init_dist2(), dist_exports))).HttpProxyAgent, https: async () => (await Promise.resolve().then(() => (init_dist3(), dist_exports2))).HttpsProxyAgent, @@ -76843,17 +75341,17 @@ var proxies = { function isValidProtocol2(v) { return Object.keys(proxies).includes(v); } -var ProxyAgent = class extends Agent2 { +var ProxyAgent2 = class extends Agent4 { constructor(opts) { super(opts); this.cache = new lru_cache_default({ max: 20, dispose: (agent) => agent.destroy() }); - debug17("Creating new ProxyAgent instance: %o", opts); + debug16("Creating new ProxyAgent instance: %o", opts); this.connectOpts = opts; - this.httpAgent = opts?.httpAgent || new http4.Agent(opts); - this.httpsAgent = opts?.httpsAgent || new https3.Agent(opts); + this.httpAgent = opts?.httpAgent || new http5.Agent(opts); + this.httpsAgent = opts?.httpsAgent || new https4.Agent(opts); this.getProxyForUrl = opts?.getProxyForUrl || getProxyForUrl; } async connect(req, opts) { @@ -76864,11 +75362,11 @@ var ProxyAgent = class extends Agent2 { const url = new import_url9.URL(req.path, `${protocol}//${host}`).href; const proxy = await this.getProxyForUrl(url, req); if (!proxy) { - debug17("Proxy not enabled for URL: %o", url); + debug16("Proxy not enabled for URL: %o", url); return secureEndpoint ? this.httpsAgent : this.httpAgent; } - debug17("Request URL: %o", url); - debug17("Proxy URL: %o", proxy); + debug16("Request URL: %o", url); + debug16("Proxy URL: %o", proxy); const cacheKey = `${protocol}+${proxy}`; let agent = this.cache.get(cacheKey); if (!agent) { @@ -76881,7 +75379,7 @@ var ProxyAgent = class extends Agent2 { agent = new ctor(proxy, this.connectOpts); this.cache.set(cacheKey, agent); } else { - debug17("Cache hit for proxy URL: %o", proxy); + debug16("Cache hit for proxy URL: %o", proxy); } return agent; } @@ -76944,14 +75442,16 @@ var ProxyResolver = class { }; // src/CredentialsClient.ts -var USER_AGENT2 = "configure-aws-credentials-for-github-actions"; +if (!process.env.AWS_EXECUTION_ENV) { + process.env.AWS_EXECUTION_ENV = "GitHubActions"; +} var CredentialsClient = class { constructor(props) { if (props.region !== void 0) { this.region = props.region; } if (props.proxyServer) { - (0, import_core13.info)("Configuring proxy handler for STS client"); + info("Configuring proxy handler for STS client"); const proxyOptions = { httpProxy: props.proxyServer, httpsProxy: props.proxyServer @@ -76960,20 +75460,25 @@ var CredentialsClient = class { proxyOptions.noProxy = props.noProxy; } const getProxyForUrl2 = new ProxyResolver(proxyOptions).getProxyForUrl; - const handler = new ProxyAgent({ getProxyForUrl: getProxyForUrl2 }); + const handler = new ProxyAgent2({ getProxyForUrl: getProxyForUrl2 }); this.requestHandler = new import_node_http_handler5.NodeHttpHandler({ httpsAgent: handler, httpAgent: handler }); } + if (props.stsEndpoint) { + this.stsEndpoint = props.stsEndpoint; + } this.roleChaining = props.roleChaining; } get stsClient() { if (!this._stsClient || this.roleChaining) { - const config = { customUserAgent: USER_AGENT2 }; - if (this.region !== void 0) config.region = this.region; - if (this.requestHandler !== void 0) config.requestHandler = this.requestHandler; - this._stsClient = new import_client_sts3.STSClient(config); + this._stsClient = new import_client_sts3.STSClient({ + customUserAgent: buildCustomUserAgent(), + ...this.region !== void 0 && { region: this.region }, + ...this.stsEndpoint !== void 0 && { endpoint: this.stsEndpoint }, + ...this.requestHandler !== void 0 && { requestHandler: this.requestHandler } + }); } return this._stsClient; } @@ -76984,15 +75489,15 @@ var CredentialsClient = class { if (!credentials.accessKeyId) { throw new Error("Access key ID empty after loading credentials"); } - } catch (error2) { - throw new Error(`Credentials could not be loaded, please check your action inputs: ${errorMessage(error2)}`); + } catch (error3) { + throw new Error(`Credentials could not be loaded, please check your action inputs: ${errorMessage(error3)}`); } if (expectedAccountIds && expectedAccountIds.length > 0 && expectedAccountIds[0] !== "") { let callerIdentity; try { callerIdentity = await getCallerIdentity(this.stsClient); - } catch (error2) { - throw new Error(`Could not validate account ID of credentials: ${errorMessage(error2)}`); + } catch (error3) { + throw new Error(`Could not validate account ID of credentials: ${errorMessage(error3)}`); } if (!callerIdentity.Account || !expectedAccountIds.includes(callerIdentity.Account)) { throw new Error( @@ -77018,9 +75523,8 @@ var CredentialsClient = class { }; // src/profileManager.ts -var os2 = __toESM(require("node:os")); +var os6 = __toESM(require("node:os")); var path3 = __toESM(require("node:path")); -var core3 = __toESM(require_core()); function parseIni2(iniData) { const result = {}; let currentSection; @@ -77068,8 +75572,8 @@ function stringifyIni(data3) { `; } function getProfileFilePaths() { - const credentialsPath = process.env.AWS_SHARED_CREDENTIALS_FILE || path3.join(os2.homedir(), ".aws", "credentials"); - const configPath = process.env.AWS_CONFIG_FILE || path3.join(os2.homedir(), ".aws", "config"); + const credentialsPath = process.env.AWS_SHARED_CREDENTIALS_FILE || path3.join(os6.homedir(), ".aws", "credentials"); + const configPath = process.env.AWS_CONFIG_FILE || path3.join(os6.homedir(), ".aws", "config"); return { credentials: credentialsPath, config: configPath @@ -77077,8 +75581,8 @@ function getProfileFilePaths() { } function ensureAwsDirectoryExists(filePath) { const dir = path3.dirname(filePath); - core3.debug(`Ensuring directory exists: ${dir}`); - mkdir(dir, 448); + debug(`Ensuring directory exists: ${dir}`); + mkdir2(dir, 448); } function validateProfileName(profileName) { if (!profileName || profileName.trim() === "") { @@ -77104,7 +75608,7 @@ function mergeProfileSection(filePath, sectionName, data3, overwriteAwsProfile) } existingContent[sectionName] = data3; const content = stringifyIni(existingContent); - core3.debug(`Writing profile to ${filePath}`); + debug(`Writing profile to ${filePath}`); writeFileUtf8(filePath, content, 384); } function writeProfileFiles(profileName, credentials, region, overwriteAwsProfile) { @@ -77128,14 +75632,14 @@ function writeProfileFiles(profileName, credentials, region, overwriteAwsProfile const configData = { region }; - core3.info(`Writing credentials to profile: ${profileName}`); + info(`Writing credentials to profile: ${profileName}`); mergeProfileSection(paths.credentials, credsSectionName, credentialsData, overwriteAwsProfile); - core3.info(`Writing config to profile: ${profileName}`); + info(`Writing config to profile: ${profileName}`); mergeProfileSection(paths.config, configSectionName, configData, overwriteAwsProfile); - core3.info(`\u2713 Successfully configured AWS profile: ${profileName}`); - } catch (error2) { + info(`\u2713 Successfully configured AWS profile: ${profileName}`); + } catch (error3) { throw new Error( - `Failed to write AWS profile '${profileName}': ${error2 instanceof Error ? error2.message : String(error2)}` + `Failed to write AWS profile '${profileName}': ${error3 instanceof Error ? error3.message : String(error3)}` ); } } @@ -77144,28 +75648,30 @@ function writeProfileFiles(profileName, credentials, region, overwriteAwsProfile var DEFAULT_ROLE_DURATION = 3600; var ROLE_SESSION_NAME = "GitHubActions"; var REGION_REGEX = /^[a-z0-9-]+$/g; +var ROLE_SESSION_NAME_REGEX = /^[\w+=,.@-]*$/; async function run() { try { translateEnvVariables(); - const AccessKeyId = core4.getInput("aws-access-key-id", { required: false }); - const SecretAccessKey = core4.getInput("aws-secret-access-key", { required: false }); - const sessionTokenInput = core4.getInput("aws-session-token", { required: false }); + const AccessKeyId = getInput("aws-access-key-id", { required: false }); + const SecretAccessKey = getInput("aws-secret-access-key", { required: false }); + const sessionTokenInput = getInput("aws-session-token", { required: false }); const SessionToken = sessionTokenInput === "" ? void 0 : sessionTokenInput; - const region = core4.getInput("aws-region", { required: true }); - const awsProfile = core4.getInput("aws-profile", { required: false }); + const region = getInput("aws-region", { required: true }); + const awsProfile = getInput("aws-profile", { required: false }); const overwriteAwsProfile = getBooleanInput("overwrite-aws-profile", { required: false }); - const roleToAssume = core4.getInput("role-to-assume", { required: false }); - const audience = core4.getInput("audience", { required: false }); + const roleToAssume = getInput("role-to-assume", { required: false }); + const audience = getInput("audience", { required: false }); const maskAccountId = getBooleanInput("mask-aws-account-id", { required: false }); - const roleExternalId = core4.getInput("role-external-id", { required: false }); - const webIdentityTokenFile = core4.getInput("web-identity-token-file", { required: false }); - const roleDuration = Number.parseInt(core4.getInput("role-duration-seconds", { required: false })) || DEFAULT_ROLE_DURATION; - const roleSessionName = core4.getInput("role-session-name", { required: false }) || ROLE_SESSION_NAME; + const roleExternalId = getInput("role-external-id", { required: false }); + const webIdentityTokenFile = getInput("web-identity-token-file", { required: false }); + const roleDuration = Number.parseInt(getInput("role-duration-seconds", { required: false })) || DEFAULT_ROLE_DURATION; + const roleSessionName = getInput("role-session-name", { required: false }) || ROLE_SESSION_NAME; const roleSkipSessionTagging = getBooleanInput("role-skip-session-tagging", { required: false }); - const transitiveTagKeys = core4.getMultilineInput("transitive-tag-keys", { required: false }); - const proxyServer = core4.getInput("http-proxy", { required: false }) || process.env.HTTP_PROXY; - const inlineSessionPolicy = core4.getInput("inline-session-policy", { required: false }); - const managedSessionPolicies = core4.getMultilineInput("managed-session-policies", { required: false }).map((p2) => { + const transitiveTagKeys = getMultilineInput("transitive-tag-keys", { required: false }); + const proxyServer = getInput("http-proxy", { required: false }) || process.env.HTTP_PROXY; + const customTags = getInput("custom-tags", { required: false }); + const inlineSessionPolicy = getInput("inline-session-policy", { required: false }); + const managedSessionPolicies = getMultilineInput("managed-session-policies", { required: false }).map((p2) => { return { arn: p2 }; }); const roleChaining = getBooleanInput("role-chaining", { required: false }); @@ -77174,17 +75680,18 @@ async function run() { const unsetCurrentCredentials = getBooleanInput("unset-current-credentials", { required: false }); let disableRetry = getBooleanInput("disable-retry", { required: false }); const specialCharacterWorkaround = getBooleanInput("special-characters-workaround", { required: false }); - const useExistingCredentials = core4.getInput("use-existing-credentials", { required: false }); - let maxRetries = Number.parseInt(core4.getInput("retry-max-attempts", { required: false })) || 12; - const expectedAccountIds = core4.getInput("allowed-account-ids", { required: false }).split(",").map((s) => s.trim()); + const useExistingCredentials = getInput("use-existing-credentials", { required: false }); + let maxRetries = Number.parseInt(getInput("retry-max-attempts", { required: false })) || 12; + const expectedAccountIds = getInput("allowed-account-ids", { required: false }).split(",").map((s) => s.trim()); const forceSkipOidc = getBooleanInput("force-skip-oidc", { required: false }); - const noProxy = core4.getInput("no-proxy", { required: false }); - const globalTimeout = Number.parseInt(core4.getInput("action-timeout-s", { required: false })) || 0; + const noProxy = getInput("no-proxy", { required: false }); + const stsEndpoint = getInput("sts-endpoint", { required: false }); + const globalTimeout = Number.parseInt(getInput("action-timeout-s", { required: false })) || 0; let timeoutId; if (globalTimeout > 0) { - core4.info(`Setting a global timeout of ${globalTimeout} seconds for the action`); + info(`Setting a global timeout of ${globalTimeout} seconds for the action`); timeoutId = setTimeout(() => { - core4.setFailed(`Action timed out after ${globalTimeout} seconds`); + setFailed(`Action timed out after ${globalTimeout} seconds`); process.exit(1); }, globalTimeout * 1e3); } @@ -77199,10 +75706,11 @@ async function run() { } else if (maxRetries < 1) { maxRetries = 1; } + const withRetry = (fn, label) => retryAndBackoff(fn, !disableRetry, maxRetries, 0, 50, label); const useGitHubOIDCProvider = () => { if (forceSkipOidc) return false; if (!!roleToAssume && !webIdentityTokenFile && !AccessKeyId && !process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN && !roleChaining) { - core4.info( + info( "It looks like you might be trying to authenticate with OIDC. Did you mean to set the `id-token` permission? If you are not trying to authenticate with OIDC and the action is working successfully, you can ignore this message." ); } @@ -77214,6 +75722,16 @@ async function run() { if (!region.match(REGION_REGEX)) { throw new Error(`Region is not valid: ${region}`); } + if (roleSessionName.length < 2 || roleSessionName.length > 64) { + throw new Error( + `Role session name must be between 2 and 64 characters, got ${roleSessionName.length}: '${roleSessionName}'` + ); + } + if (!roleSessionName.match(ROLE_SESSION_NAME_REGEX)) { + throw new Error( + `Role session name is not valid: '${roleSessionName}'. Must satisfy regular expression pattern: [\\w+=,.@-]*` + ); + } exportRegion(region, outputEnvCredentials); const clientProps = { region, @@ -77221,29 +75739,26 @@ async function run() { }; if (proxyServer) clientProps.proxyServer = proxyServer; if (noProxy) clientProps.noProxy = noProxy; + if (stsEndpoint) clientProps.stsEndpoint = stsEndpoint; const credentialsClient = new CredentialsClient(clientProps); let sourceAccountId; let webIdentityToken; if (useExistingCredentials) { const validCredentials = await areCredentialsValid(credentialsClient); if (validCredentials) { - core4.notice("Pre-existing credentials are valid. No need to generate new ones."); + notice("Pre-existing credentials are valid. No need to generate new ones."); if (timeoutId) clearTimeout(timeoutId); return; } - core4.notice("No valid credentials exist. Running as normal."); + notice("No valid credentials exist. Running as normal."); } if (useGitHubOIDCProvider()) { try { - webIdentityToken = await retryAndBackoff( - async () => { - return core4.getIDToken(audience); - }, - !disableRetry, - maxRetries - ); - } catch (error2) { - throw new Error(`getIDToken call failed: ${errorMessage(error2)}`); + webIdentityToken = await withRetry(async () => { + return getIDToken(audience); + }, "getIDToken"); + } catch (error3) { + throw new Error(`getIDToken call failed: ${errorMessage(error3)}`); } } else if (AccessKeyId) { if (!SecretAccessKey) { @@ -77254,48 +75769,61 @@ async function run() { writeProfileFiles(awsProfile, { AccessKeyId, SecretAccessKey, SessionToken }, region, overwriteAwsProfile); } } else if (!webIdentityTokenFile && !roleChaining) { - await credentialsClient.validateCredentials(void 0, roleChaining, expectedAccountIds); - sourceAccountId = await exportAccountId(credentialsClient, maskAccountId); + await withRetry( + () => credentialsClient.validateCredentials(void 0, roleChaining, expectedAccountIds), + "validateCredentials" + ); + sourceAccountId = await withRetry(() => exportAccountId(credentialsClient, maskAccountId), "exportAccountId"); } if (AccessKeyId || roleChaining) { - await credentialsClient.validateCredentials(AccessKeyId, roleChaining, expectedAccountIds); - sourceAccountId = await exportAccountId(credentialsClient, maskAccountId); + if (outputEnvCredentials) { + await withRetry( + () => credentialsClient.validateCredentials(AccessKeyId, roleChaining, expectedAccountIds), + "validateCredentials" + ); + sourceAccountId = await withRetry(() => exportAccountId(credentialsClient, maskAccountId), "exportAccountId"); + } + } + if (customTags && (useGitHubOIDCProvider() || webIdentityTokenFile)) { + warning( + "'custom-tags' is set but will be ignored because session tags cannot be applied when using OIDC or web identity token authentication. Tags are controlled by the identity provider token claims in these authentication flows." + ); } if (roleToAssume) { let roleCredentials; do { - roleCredentials = await retryAndBackoff( - async () => { - return assumeRole({ - credentialsClient, - sourceAccountId, - roleToAssume, - roleExternalId, - roleDuration, - roleSessionName, - roleSkipSessionTagging, - transitiveTagKeys, - webIdentityTokenFile, - webIdentityToken, - inlineSessionPolicy, - managedSessionPolicies - }); - }, - !disableRetry, - maxRetries - ); + roleCredentials = await withRetry(async () => { + return assumeRole({ + credentialsClient, + sourceAccountId, + roleToAssume, + roleExternalId, + roleDuration, + roleSessionName, + roleSkipSessionTagging, + transitiveTagKeys, + webIdentityTokenFile, + webIdentityToken, + inlineSessionPolicy, + managedSessionPolicies, + customTags + }); + }, "AssumeRole"); } while (specialCharacterWorkaround && !verifyKeys(roleCredentials.Credentials)); - core4.info(`Authenticated as assumedRoleId ${roleCredentials.AssumedRoleUser?.AssumedRoleId}`); + info(`Authenticated as assumedRoleId ${roleCredentials.AssumedRoleUser?.AssumedRoleId}`); exportCredentials(roleCredentials.Credentials, outputCredentials, outputEnvCredentials); - if ((!process.env.GITHUB_ACTIONS || AccessKeyId) && !awsProfile) { - await credentialsClient.validateCredentials( - roleCredentials.Credentials?.AccessKeyId, - roleChaining, - expectedAccountIds + if ((!process.env.GITHUB_ACTIONS || AccessKeyId) && !awsProfile && outputEnvCredentials) { + await withRetry( + () => credentialsClient.validateCredentials( + roleCredentials.Credentials?.AccessKeyId, + roleChaining, + expectedAccountIds + ), + "validateCredentials" ); } if (outputEnvCredentials) { - await exportAccountId(credentialsClient, maskAccountId); + await withRetry(() => exportAccountId(credentialsClient, maskAccountId), "exportAccountId"); } if (awsProfile) { if (!roleCredentials.Credentials) { @@ -77303,40 +75831,43 @@ async function run() { } if (AccessKeyId || !process.env.GITHUB_ACTIONS) { writeProfileFiles(awsProfile, roleCredentials.Credentials, region, true); - await credentialsClient.validateCredentials( - roleCredentials.Credentials.AccessKeyId, - roleChaining, - expectedAccountIds + await withRetry( + () => credentialsClient.validateCredentials( + roleCredentials.Credentials?.AccessKeyId, + roleChaining, + expectedAccountIds + ), + "validateCredentials" ); } else { writeProfileFiles(awsProfile, roleCredentials.Credentials, region, overwriteAwsProfile); } if (outputEnvCredentials) { - core4.exportVariable("AWS_PROFILE", awsProfile); + exportVariable("AWS_PROFILE", awsProfile); } } } else { - core4.info("Proceeding with IAM user credentials"); + info("Proceeding with IAM user credentials"); if (awsProfile) { if (outputEnvCredentials) { - core4.exportVariable("AWS_PROFILE", awsProfile); + exportVariable("AWS_PROFILE", awsProfile); } } } if (timeoutId) clearTimeout(timeoutId); - } catch (error2) { - core4.setFailed(errorMessage(error2)); + } catch (error3) { + setFailed(errorMessage(error3)); const showStackTrace = process.env.SHOW_STACK_TRACE; if (showStackTrace === "true") { - throw error2; + throw error3; } } } if (require.main === module) { (async () => { await run(); - })().catch((error2) => { - core4.setFailed(errorMessage(error2)); + })().catch((error3) => { + setFailed(errorMessage(error3)); }); } // Annotate the CommonJS export names for ESM import in node: diff --git a/package-lock.json b/package-lock.json index 0208a29..82069bd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,28 +1,28 @@ { "name": "configure-aws-credentials", - "version": "6.1.2", + "version": "6.1.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "configure-aws-credentials", - "version": "6.1.2", + "version": "6.1.1", "license": "MIT", "dependencies": { - "@actions/core": "^2.0.2", - "@aws-sdk/client-sts": "^3.1053.0", - "@smithy/node-http-handler": "^4.6.1", + "@actions/core": "^3.0.1", + "@aws-sdk/client-sts": "^3.1049.0", + "@smithy/node-http-handler": "^4.7.3", "proxy-agent": "^8.0.1" }, "devDependencies": { "@aws-sdk/credential-provider-env": "^3.972.39", - "@biomejs/biome": "2.4.13", + "@biomejs/biome": "2.4.15", "@smithy/property-provider": "^4.3.4", "@types/node": "^25.9.1", "@vitest/coverage-v8": "4.1.5", "aws-sdk-client-mock": "^4.1.0", "esbuild": "^0.28.0", - "generate-license-file": "^4.2.1", + "generate-license-file": "^4.1.1", "json-schema": "^0.4.0", "markdownlint-cli": "^0.48.0", "memfs": "^4.57.2", @@ -35,28 +35,28 @@ } }, "node_modules/@actions/core": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@actions/core/-/core-2.0.2.tgz", - "integrity": "sha512-Ast1V7yHbGAhplAsuVlnb/5J8Mtr/Zl6byPPL+Qjq3lmfIgWF1ak1iYfF/079cRERiuTALTXkSuEUdZeDCfGtA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-3.0.1.tgz", + "integrity": "sha512-a6d/Nwahm9fliVGRhdhofo40HjHQasUPusmc7vBfyky+7Z+P2A1J68zyFVaNcEclc/Se+eO595oAr5nwEIoIUA==", "license": "MIT", "dependencies": { - "@actions/exec": "^2.0.0", - "@actions/http-client": "^3.0.1" + "@actions/exec": "^3.0.0", + "@actions/http-client": "^4.0.0" } }, "node_modules/@actions/exec": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-2.0.0.tgz", - "integrity": "sha512-k8ngrX2voJ/RIN6r9xB82NVqKpnMRtxDoiO+g3olkIUpQNqjArXrCQceduQZCQj3P3xm32pChRLqRrtXTlqhIw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-3.0.0.tgz", + "integrity": "sha512-6xH/puSoNBXb72VPlZVm7vQ+svQpFyA96qdDBvhB8eNZOE8LtPf9L4oAsfzK/crCL8YZ+19fKYVnM63Sl+Xzlw==", "license": "MIT", "dependencies": { - "@actions/io": "^2.0.0" + "@actions/io": "^3.0.2" } }, "node_modules/@actions/http-client": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-3.0.2.tgz", - "integrity": "sha512-JP38FYYpyqvUsz+Igqlc/JG6YO9PaKuvqjM3iGvaLqFnJ7TFmcLyy2IDrY0bI0qCQug8E9K+elv5ZNfw62ZJzA==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-4.0.1.tgz", + "integrity": "sha512-+Nvd1ImaOZBSoPbsUtEhv+1z99H12xzncCkz0a3RuehINE81FZSe2QTj3uvAPTcJX/SCzUQHQ0D1GrPMbrPitg==", "license": "MIT", "dependencies": { "tunnel": "^0.0.6", @@ -64,9 +64,9 @@ } }, "node_modules/@actions/io": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@actions/io/-/io-2.0.0.tgz", - "integrity": "sha512-Jv33IN09XLO+0HS79aaODsvIRyduiF7NY/F6LYeK5oeUmrsz7aFdRphQjFoESF4jS7lMauDOttKALcpapVDIAg==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@actions/io/-/io-3.0.2.tgz", + "integrity": "sha512-nRBchcMM+QK1pdjO7/idu86rbJI5YHUKCvKs0KxnSYbVe3F51UfGxuZX4Qy/fWlp6l7gWFwIkrOzN+oUK03kfw==", "license": "MIT" }, "node_modules/@aws-crypto/crc32": { @@ -133,21 +133,21 @@ } }, "node_modules/@aws-sdk/client-sts": { - "version": "3.1053.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.1053.0.tgz", - "integrity": "sha512-0lkXV/by8oHnKjScVfWoZsvyalkV3iiMobDYDS/vmtXnmnpHoi2jlo8Jo51vYaqTGPbI1IJ2jtHj5cLsmB7Qkg==", + "version": "3.1049.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.1049.0.tgz", + "integrity": "sha512-Dq8WJk3oPNQvK7gOYDFnOl6jXh2TiwggATqzs3bbboOu5hleZ50Nt9Zm38jA0zWnWm2nJ5p/qdKJzXeGecHRvA==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "^3.974.13", - "@aws-sdk/credential-provider-node": "^3.972.44", - "@aws-sdk/signature-v4-multi-region": "^3.996.28", - "@aws-sdk/types": "^3.973.9", - "@smithy/core": "^3.24.3", - "@smithy/fetch-http-handler": "^5.4.3", - "@smithy/node-http-handler": "^4.7.3", - "@smithy/types": "^4.14.2", + "@aws-sdk/core": "^3.974.12", + "@aws-sdk/credential-provider-node": "^3.972.43", + "@aws-sdk/signature-v4-multi-region": "^3.996.27", + "@aws-sdk/types": "^3.973.8", + "@smithy/core": "^3.24.2", + "@smithy/fetch-http-handler": "^5.4.2", + "@smithy/node-http-handler": "^4.7.2", + "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, "engines": { @@ -155,16 +155,16 @@ } }, "node_modules/@aws-sdk/core": { - "version": "3.974.13", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.974.13.tgz", - "integrity": "sha512-+Y5/4tHki0uYgyx8eun146DegRVQBpdKGK5RbV0FTKJPpaKTchvqVxrrRFK6Wk0JksO4iAZKw3eqxGEIwtO98w==", + "version": "3.974.15", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.974.15.tgz", + "integrity": "sha512-UpA0rTGW/tHGITcCqHisbuuEPraYg9GG+mWmXjY5+RxZBMLGe6aL9oe0ix50LztwAcPIkGZLH0yWdMIkCM10hw==", "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "^3.973.9", - "@aws-sdk/xml-builder": "^3.972.25", + "@aws-sdk/xml-builder": "^3.972.26", "@aws/lambda-invoke-store": "^0.2.2", - "@smithy/core": "^3.24.3", - "@smithy/signature-v4": "^5.4.2", + "@smithy/core": "^3.24.5", + "@smithy/signature-v4": "^5.4.5", "@smithy/types": "^4.14.2", "bowser": "^2.11.0", "tslib": "^2.6.2" @@ -174,14 +174,14 @@ } }, "node_modules/@aws-sdk/credential-provider-env": { - "version": "3.972.39", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.972.39.tgz", - "integrity": "sha512-29wX9zpAvEt1vcj0psha+y6ygBHy2V/S72mp6e7q0KARLWXq+pwE/lR6qGkwknQvruh52lXvlqZIga8Hdxkucw==", + "version": "3.972.41", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.972.41.tgz", + "integrity": "sha512-n1EbJ98yvPWWdHZZv8bRBMqqDQJrtgtxyJ4xLy2Uqrh25BCOZQ7nnS1CsFXvuH8r0b0KVHDZEGEH5FxmEMP8jg==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "^3.974.13", + "@aws-sdk/core": "^3.974.15", "@aws-sdk/types": "^3.973.9", - "@smithy/core": "^3.24.3", + "@smithy/core": "^3.24.5", "@smithy/types": "^4.14.2", "tslib": "^2.6.2" }, @@ -190,17 +190,17 @@ } }, "node_modules/@aws-sdk/credential-provider-http": { - "version": "3.972.41", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.972.41.tgz", - "integrity": "sha512-IA3CQTjtJkb6u1H4mE4936c8OPBMa9Jggtwe8U2Mqw/vvb/tZ5Ebd0mcZcX0uKWQhOyYo/+qNIwkV5Xh+FeJJA==", + "version": "3.972.40", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.972.40.tgz", + "integrity": "sha512-D78L/m2Dr6cJnnSvWoAudPhQmCwmJ7j6APXsPYmFpPaKfQTfCSu0rdm8j14Np+VmXF9z8Aj8HE3xFpsrwtfgeg==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "^3.974.13", - "@aws-sdk/types": "^3.973.9", - "@smithy/core": "^3.24.3", - "@smithy/fetch-http-handler": "^5.4.3", - "@smithy/node-http-handler": "^4.7.3", - "@smithy/types": "^4.14.2", + "@aws-sdk/core": "^3.974.12", + "@aws-sdk/types": "^3.973.8", + "@smithy/core": "^3.24.2", + "@smithy/fetch-http-handler": "^5.4.2", + "@smithy/node-http-handler": "^4.7.2", + "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, "engines": { @@ -208,23 +208,23 @@ } }, "node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.972.43", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.972.43.tgz", - "integrity": "sha512-4mzII+3mZEVXXE1xzrLQrCJL7/r62A63bA6SVzZoNL5rqCJghpf+xgGltVrIBBs0n+mOZBKrQl2tRREtvZ5l6A==", + "version": "3.972.42", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.972.42.tgz", + "integrity": "sha512-Mu5ESvFXeinafVM8jTIvRqcvK2Ehj4kz3auT39yUcHwu1Vfxo6xRlmUafdKLW4tusjAJukQwK09sCSMgOm7OKg==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "^3.974.13", - "@aws-sdk/credential-provider-env": "^3.972.39", - "@aws-sdk/credential-provider-http": "^3.972.41", - "@aws-sdk/credential-provider-login": "^3.972.43", - "@aws-sdk/credential-provider-process": "^3.972.39", - "@aws-sdk/credential-provider-sso": "^3.972.43", - "@aws-sdk/credential-provider-web-identity": "^3.972.43", - "@aws-sdk/nested-clients": "^3.997.11", - "@aws-sdk/types": "^3.973.9", - "@smithy/core": "^3.24.3", + "@aws-sdk/core": "^3.974.12", + "@aws-sdk/credential-provider-env": "^3.972.38", + "@aws-sdk/credential-provider-http": "^3.972.40", + "@aws-sdk/credential-provider-login": "^3.972.42", + "@aws-sdk/credential-provider-process": "^3.972.38", + "@aws-sdk/credential-provider-sso": "^3.972.42", + "@aws-sdk/credential-provider-web-identity": "^3.972.42", + "@aws-sdk/nested-clients": "^3.997.10", + "@aws-sdk/types": "^3.973.8", + "@smithy/core": "^3.24.2", "@smithy/credential-provider-imds": "^4.3.2", - "@smithy/types": "^4.14.2", + "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, "engines": { @@ -232,16 +232,16 @@ } }, "node_modules/@aws-sdk/credential-provider-login": { - "version": "3.972.43", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-login/-/credential-provider-login-3.972.43.tgz", - "integrity": "sha512-HG7kQCwXtbv3oBV61Ins0oNX8KKyvrMqqRkb6ZiAfQHbMuHaiNaEb2KnpKLPkNpqImSBK82UkVE/kaY6IfWikA==", + "version": "3.972.42", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-login/-/credential-provider-login-3.972.42.tgz", + "integrity": "sha512-O6WkZga3kf0yqyJYd1dbeJqVhEgJx/x1UaLgtbR+XuL/YP+K5y6QTxQKL7ka9z3jnQASESKGAPnRyt4D5hQrxA==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "^3.974.13", - "@aws-sdk/nested-clients": "^3.997.11", - "@aws-sdk/types": "^3.973.9", - "@smithy/core": "^3.24.3", - "@smithy/types": "^4.14.2", + "@aws-sdk/core": "^3.974.12", + "@aws-sdk/nested-clients": "^3.997.10", + "@aws-sdk/types": "^3.973.8", + "@smithy/core": "^3.24.2", + "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, "engines": { @@ -249,21 +249,21 @@ } }, "node_modules/@aws-sdk/credential-provider-node": { - "version": "3.972.44", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.972.44.tgz", - "integrity": "sha512-sDaBIT0yrNNIPfvlsiTCmANm07zKju+ipWODjEXgZlsjMeIJR3LVp7RDyAOzUoAsTbDfYKDWp+i5WrFiQP6rmQ==", + "version": "3.972.43", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.972.43.tgz", + "integrity": "sha512-D/DJmbrWRP5BXEO3FH+ar4el+2n6OlGofiud7dQun2jES+AQEJjczenp1jBb4MBN7CpGpS8nsWGQLtuzc9tQbA==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/credential-provider-env": "^3.972.39", - "@aws-sdk/credential-provider-http": "^3.972.41", - "@aws-sdk/credential-provider-ini": "^3.972.43", - "@aws-sdk/credential-provider-process": "^3.972.39", - "@aws-sdk/credential-provider-sso": "^3.972.43", - "@aws-sdk/credential-provider-web-identity": "^3.972.43", - "@aws-sdk/types": "^3.973.9", - "@smithy/core": "^3.24.3", + "@aws-sdk/credential-provider-env": "^3.972.38", + "@aws-sdk/credential-provider-http": "^3.972.40", + "@aws-sdk/credential-provider-ini": "^3.972.42", + "@aws-sdk/credential-provider-process": "^3.972.38", + "@aws-sdk/credential-provider-sso": "^3.972.42", + "@aws-sdk/credential-provider-web-identity": "^3.972.42", + "@aws-sdk/types": "^3.973.8", + "@smithy/core": "^3.24.2", "@smithy/credential-provider-imds": "^4.3.2", - "@smithy/types": "^4.14.2", + "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, "engines": { @@ -271,15 +271,15 @@ } }, "node_modules/@aws-sdk/credential-provider-process": { - "version": "3.972.39", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.972.39.tgz", - "integrity": "sha512-2k/amBifLd75eXNwgvPw/2lKYSQ3NhvHQgkVKVjfUq13/eJ3JRtHmznuFenn74OK3sSfp4SMy1YB2w+UVXoKqA==", + "version": "3.972.38", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.972.38.tgz", + "integrity": "sha512-EnbYVajGgbkb24s0K1eo4VNAPV5mHIET7LSvirTaFCwkfrfaOJxtSE+wY/tJdKDS21cEYkZs2ruCaAm+W4iblg==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "^3.974.13", - "@aws-sdk/types": "^3.973.9", - "@smithy/core": "^3.24.3", - "@smithy/types": "^4.14.2", + "@aws-sdk/core": "^3.974.12", + "@aws-sdk/types": "^3.973.8", + "@smithy/core": "^3.24.2", + "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, "engines": { @@ -287,17 +287,17 @@ } }, "node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.972.43", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.972.43.tgz", - "integrity": "sha512-LPc3+Y4vhH1T4x6CMqwCM6hk5+SRf/Lwmgm8INm95wxTtIRHcMwQUVkDzWu4Iw/RSncxYM2BC01OrYbxOPZvyg==", + "version": "3.972.42", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.972.42.tgz", + "integrity": "sha512-RVV/9NbFwI8ZHEH5dn39lGyFmSbSVj1+orZdr6QsOe1mW9DCglmlen0cFaNZmCcqkqc7erNRHNBduxbeZuHAnw==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "^3.974.13", - "@aws-sdk/nested-clients": "^3.997.11", - "@aws-sdk/token-providers": "3.1052.0", - "@aws-sdk/types": "^3.973.9", - "@smithy/core": "^3.24.3", - "@smithy/types": "^4.14.2", + "@aws-sdk/core": "^3.974.12", + "@aws-sdk/nested-clients": "^3.997.10", + "@aws-sdk/token-providers": "3.1049.0", + "@aws-sdk/types": "^3.973.8", + "@smithy/core": "^3.24.2", + "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, "engines": { @@ -305,16 +305,16 @@ } }, "node_modules/@aws-sdk/credential-provider-web-identity": { - "version": "3.972.43", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.972.43.tgz", - "integrity": "sha512-wQtL34lUD/09VXjwAUo2T+I3aEXRDxMB3DKmTJL/Zj0Gi6sLDTrVhae1XVt01yzkquOWajI/sZW72JGDZ1ciTw==", + "version": "3.972.42", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.972.42.tgz", + "integrity": "sha512-/67fXX0ddllD4u2Nujc5PvT4byHgpMUfz6+RxIKi/0nFIckeorm7JvXgzBuDyVKw0s58EbofmETDWUf9vTEuHQ==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "^3.974.13", - "@aws-sdk/nested-clients": "^3.997.11", - "@aws-sdk/types": "^3.973.9", - "@smithy/core": "^3.24.3", - "@smithy/types": "^4.14.2", + "@aws-sdk/core": "^3.974.12", + "@aws-sdk/nested-clients": "^3.997.10", + "@aws-sdk/types": "^3.973.8", + "@smithy/core": "^3.24.2", + "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, "engines": { @@ -322,20 +322,20 @@ } }, "node_modules/@aws-sdk/nested-clients": { - "version": "3.997.11", - "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.997.11.tgz", - "integrity": "sha512-nWXXJ1r/r8N2Gw1pWolRgED38/A9A8DHR2ETWIv220zh4PZHcybbR4hUVWWktmNXTRHzDJwRluapHn0rZxuoqA==", + "version": "3.997.10", + "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.997.10.tgz", + "integrity": "sha512-FtQ/Bt327peZJuyo4WZSOLVUTw9ujRxntepiC7L65FxA2P82Xlq0g14T22BuqBUeMjDoxa9nvwiMHjLIfP3eUg==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "^3.974.13", - "@aws-sdk/signature-v4-multi-region": "^3.996.28", - "@aws-sdk/types": "^3.973.9", - "@smithy/core": "^3.24.3", - "@smithy/fetch-http-handler": "^5.4.3", - "@smithy/node-http-handler": "^4.7.3", - "@smithy/types": "^4.14.2", + "@aws-sdk/core": "^3.974.12", + "@aws-sdk/signature-v4-multi-region": "^3.996.27", + "@aws-sdk/types": "^3.973.8", + "@smithy/core": "^3.24.2", + "@smithy/fetch-http-handler": "^5.4.2", + "@smithy/node-http-handler": "^4.7.2", + "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, "engines": { @@ -343,15 +343,15 @@ } }, "node_modules/@aws-sdk/signature-v4-multi-region": { - "version": "3.996.28", - "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.996.28.tgz", - "integrity": "sha512-qs9z5LqXO/CZC2Lg9SGKpoLU8Rhi+m2pFKZqfO9pytX1clc0katqtsDNupJxFy0xT9wsZSPzM2v1y+/H/zfp5Q==", + "version": "3.996.27", + "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.996.27.tgz", + "integrity": "sha512-0Phbz4t6HI3D3skxvG2uI+VWU034/nSIw1T8d+FPzzQG9EQTrw94o9mOKO2Gv3n3Oc8P7JD7RAUxkoneLWv5Eg==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/types": "^3.973.9", - "@smithy/core": "^3.24.3", + "@aws-sdk/types": "^3.973.8", + "@smithy/core": "^3.24.2", "@smithy/signature-v4": "^5.4.2", - "@smithy/types": "^4.14.2", + "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, "engines": { @@ -359,16 +359,16 @@ } }, "node_modules/@aws-sdk/token-providers": { - "version": "3.1052.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.1052.0.tgz", - "integrity": "sha512-QqZNB3so7UIDxZtroc85TQaLVxdZRFm0eWM1CSR2N+b06as9TOrilvrlTZuj3guYlxMs6yLOgGxnklJ5qMYtTw==", + "version": "3.1049.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.1049.0.tgz", + "integrity": "sha512-r7+d0lQMTHKypkmaF5jRTBYLYHCUHzt3gaVoN9SidLhQeWhCmHk3AKrboDTpPF5b7Pt7vKu3+oeMjznM2Eu1ow==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "^3.974.13", - "@aws-sdk/nested-clients": "^3.997.11", - "@aws-sdk/types": "^3.973.9", - "@smithy/core": "^3.24.3", - "@smithy/types": "^4.14.2", + "@aws-sdk/core": "^3.974.12", + "@aws-sdk/nested-clients": "^3.997.10", + "@aws-sdk/types": "^3.973.8", + "@smithy/core": "^3.24.2", + "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, "engines": { @@ -401,12 +401,11 @@ } }, "node_modules/@aws-sdk/xml-builder": { - "version": "3.972.25", - "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.972.25.tgz", - "integrity": "sha512-GH+Kjz4nPKWKHnsiQpnhP1MJdTGIcK4rAka6tzakgjjUkVgNsmPeEbbRAf09SzS1hjGu6duGHCBsxYke0BhHjQ==", + "version": "3.972.26", + "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.972.26.tgz", + "integrity": "sha512-cDbrqvDS73whl6YAPSPq0U6whzG6UWI9PuWh0wrUuGoZexhWEqhdunbukV7iBoaWnFV1AODutM5hOD6rtn439g==", "license": "Apache-2.0", "dependencies": { - "@nodable/entities": "2.1.0", "@smithy/types": "^4.14.2", "fast-xml-parser": "5.7.3", "tslib": "^2.6.2" @@ -425,13 +424,13 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", - "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.27.1", + "@babel/helper-validator-identifier": "^7.28.5", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" }, @@ -447,9 +446,9 @@ "license": "MIT" }, "node_modules/@babel/helper-string-parser": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz", - "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", "dev": true, "license": "MIT", "engines": { @@ -457,9 +456,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", - "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", "dev": true, "license": "MIT", "engines": { @@ -467,13 +466,13 @@ } }, "node_modules/@babel/parser": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.7.tgz", - "integrity": "sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg==", + "version": "7.29.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.3.tgz", + "integrity": "sha512-b3ctpQwp+PROvU/cttc4OYl4MzfJUWy6FZg+PMXfzmt/+39iHVF0sDfqay8TQM3JA2EUOyKcFZt75jWriQijsA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.29.7" + "@babel/types": "^7.29.0" }, "bin": { "parser": "bin/babel-parser.js" @@ -483,14 +482,14 @@ } }, "node_modules/@babel/types": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.7.tgz", - "integrity": "sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz", + "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.29.7", - "@babel/helper-validator-identifier": "^7.29.7" + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.28.5" }, "engines": { "node": ">=6.9.0" @@ -507,9 +506,9 @@ } }, "node_modules/@biomejs/biome": { - "version": "2.4.13", - "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.4.13.tgz", - "integrity": "sha512-gLXOwkOBBg0tr7bDsqlkIh4uFeKuMjxvqsrb1Tukww1iDmHcfr4Uu8MoQxp0Rcte+69+osRNWXwHsu/zxT6XqA==", + "version": "2.4.15", + "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.4.15.tgz", + "integrity": "sha512-j5VH3a/h/HXTKBM50MDMxRCzkeLv9S2XJcW2WgnZT1+xyisi+0bISrXR82gCX+8S9lvK0skEvHJRN+3Ktr2hlw==", "dev": true, "license": "MIT OR Apache-2.0", "bin": { @@ -523,20 +522,20 @@ "url": "https://opencollective.com/biome" }, "optionalDependencies": { - "@biomejs/cli-darwin-arm64": "2.4.13", - "@biomejs/cli-darwin-x64": "2.4.13", - "@biomejs/cli-linux-arm64": "2.4.13", - "@biomejs/cli-linux-arm64-musl": "2.4.13", - "@biomejs/cli-linux-x64": "2.4.13", - "@biomejs/cli-linux-x64-musl": "2.4.13", - "@biomejs/cli-win32-arm64": "2.4.13", - "@biomejs/cli-win32-x64": "2.4.13" + "@biomejs/cli-darwin-arm64": "2.4.15", + "@biomejs/cli-darwin-x64": "2.4.15", + "@biomejs/cli-linux-arm64": "2.4.15", + "@biomejs/cli-linux-arm64-musl": "2.4.15", + "@biomejs/cli-linux-x64": "2.4.15", + "@biomejs/cli-linux-x64-musl": "2.4.15", + "@biomejs/cli-win32-arm64": "2.4.15", + "@biomejs/cli-win32-x64": "2.4.15" } }, "node_modules/@biomejs/cli-darwin-arm64": { - "version": "2.4.13", - "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.4.13.tgz", - "integrity": "sha512-2KImO1jhNFBa2oWConyr0x6flxbQpGKv6902uGXpYM62Xyem8U80j441SyUJ8KyngsmKbQjeIv1q2CQfDkNnYg==", + "version": "2.4.15", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.4.15.tgz", + "integrity": "sha512-rF3PPqLq1yoST79zaQbDjVJwsuIeci/O+9bgNmC5QpgOqz6aqYuzA4abyAGx+mgyiDXn4A049xAN8gijbuR1Qg==", "cpu": [ "arm64" ], @@ -551,9 +550,9 @@ } }, "node_modules/@biomejs/cli-darwin-x64": { - "version": "2.4.13", - "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.4.13.tgz", - "integrity": "sha512-BKrJklbaFN4p1Ts4kPBczo+PkbsHQg57kmJ+vON9u2t6uN5okYHaSr7h/MutPCWQgg2lglaWoSmm+zhYW+oOkg==", + "version": "2.4.15", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.4.15.tgz", + "integrity": "sha512-/5KHXYMfSJs1fNXiX30xFtI8JcCFV6zaVVLxOa0M2sfqBKHkpQhRTv94yxQWxeTY2lzo2OuTlNvPC+hDQt2wcQ==", "cpu": [ "x64" ], @@ -568,9 +567,9 @@ } }, "node_modules/@biomejs/cli-linux-arm64": { - "version": "2.4.13", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.4.13.tgz", - "integrity": "sha512-NzkUDSqfvMBrPplKgVr3aXLHZ2NEELvvF4vZxXulEylKWIGqlvNEcwUcj9OLrn75TD3lJ/GIqCVlBwd1MZCuYQ==", + "version": "2.4.15", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.4.15.tgz", + "integrity": "sha512-owaAMZD/T4LrD0ELNCk0Km3qrRHuM0X6EAyVE1FSqGY0rbLoiDLrO4Us2tllm6cAeB2Ioa9C2C08NZPdr8+0Ug==", "cpu": [ "arm64" ], @@ -585,9 +584,9 @@ } }, "node_modules/@biomejs/cli-linux-arm64-musl": { - "version": "2.4.13", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.4.13.tgz", - "integrity": "sha512-U5MsuBQW25dXaYtqWWSPM3P96H6Y+fHuja3TQpMNnylocHW0tEbtFTDlUj6oM+YJLntvEkQy4grBvQNUD4+RCg==", + "version": "2.4.15", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.4.15.tgz", + "integrity": "sha512-ZPcxznxm0pogHBLZhYntyR3sR+MrZjqJIKEr7ZqVen0Rl+P/4upVmfYXjftizi9RoqZntg33fv/1fbdhbYXpEQ==", "cpu": [ "arm64" ], @@ -602,9 +601,9 @@ } }, "node_modules/@biomejs/cli-linux-x64": { - "version": "2.4.13", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.4.13.tgz", - "integrity": "sha512-Az3ZZedYRBo9EQzNnD9SxFcR1G5QsGo6VEc2hIyVPZ1rdKwee/7E9oeBBZFpE8Z44ekxsDQBqbiWGW5ShOhUSQ==", + "version": "2.4.15", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.4.15.tgz", + "integrity": "sha512-0jj7THz12GbUOLmMibktK6DZjqz2zV64KFxyBtcFTKPiiOIY0a7vns1elpO1dERvxpsZ5ik0oFfz0oGwFde1+g==", "cpu": [ "x64" ], @@ -619,9 +618,9 @@ } }, "node_modules/@biomejs/cli-linux-x64-musl": { - "version": "2.4.13", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.4.13.tgz", - "integrity": "sha512-Z601MienRgTBDza/+u2CH3RSrWoXo9rtr8NK6A4KJzqGgfxx+H3VlyLgTJ4sRo40T3pIsqpTmiOQEvYzQvBRvQ==", + "version": "2.4.15", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.4.15.tgz", + "integrity": "sha512-CNq/9W38SYSH023lfcQ4KKU8K0YX8T//FZUhcgtMMRABDojx5XsMV7jlweAvGSl389wJQB29Qo6Zb/a+jdvt+w==", "cpu": [ "x64" ], @@ -636,9 +635,9 @@ } }, "node_modules/@biomejs/cli-win32-arm64": { - "version": "2.4.13", - "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.4.13.tgz", - "integrity": "sha512-Px9PS2B5/Q183bUwy/5VHqp3J2lzdOCeVGzMpphYfl8oSa7VDCqenBdqWpy6DCy/en4Rbf/Y1RieZF6dJPcc9A==", + "version": "2.4.15", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.4.15.tgz", + "integrity": "sha512-ouhkYdlhp/1GghEJPdWwD/Vi3gQ1nFxuSpMolWsbq3Lsq3QUR4jl6UdhhscdCugKU5vOEuMiJhvKj66O0OCq+w==", "cpu": [ "arm64" ], @@ -653,9 +652,9 @@ } }, "node_modules/@biomejs/cli-win32-x64": { - "version": "2.4.13", - "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.4.13.tgz", - "integrity": "sha512-tTcMkXyBrmHi9BfrD2VNHs/5rYIUKETqsBlYOvSAABwBkJhSDVb5e7wPukftsQbO3WzQkXe6kaztC6WtUOXSoQ==", + "version": "2.4.15", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.4.15.tgz", + "integrity": "sha512-zBrGq5mx5wwpnow4+2BxUvleDM+GNd4sLbPaMapsSLQLD0NGRCquqPBTgN+7XkUteHvj7M+BstuI8tmnV7+HgQ==", "cpu": [ "x64" ], @@ -1156,14 +1155,11 @@ } }, "node_modules/@gar/promise-retry": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@gar/promise-retry/-/promise-retry-1.0.2.tgz", - "integrity": "sha512-Lm/ZLhDZcBECta3TmCQSngiQykFdfw+QtI1/GYMsZd4l3nG+P8WLB16XuS7WaBGLQ+9E+cOcWQsth9cayuGt8g==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@gar/promise-retry/-/promise-retry-1.0.3.tgz", + "integrity": "sha512-GmzA9ckNokPypTg10pgpeHNQe7ph+iIKKmhKu3Ob9ANkswreCx7R3cKmY781K8QK3AqVL3xVh9A42JvIAbkkSA==", "dev": true, "license": "MIT", - "dependencies": { - "retry": "^0.13.1" - }, "engines": { "node": "^20.17.0 || >=22.9.0" } @@ -1178,6 +1174,16 @@ "node": ">=6.9.0" } }, + "node_modules/@isaacs/cliui": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-9.0.0.tgz", + "integrity": "sha512-AokJm4tuBHillT+FpMtxQ60n8ObyXBatq7jD2/JA9dxbDDokKQm8KMht5ibGzLVU9IJDIKK4TPKgMHEYMn3lMg==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, "node_modules/@isaacs/fs-minipass": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", @@ -1244,9 +1250,9 @@ } }, "node_modules/@jsonjoy.com/buffers": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@jsonjoy.com/buffers/-/buffers-1.0.0.tgz", - "integrity": "sha512-NDigYR3PHqCnQLXYyoLbnEdzMMvzeiCWo1KOut7Q0CoIqg9tUAPKJ1iq/2nFhc5kZtexzutNY0LFjdwWL3Dw3Q==", + "version": "17.67.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/buffers/-/buffers-17.67.0.tgz", + "integrity": "sha512-tfExRpYxBvi32vPs9ZHaTjSP4fHAfzSmcahOfNxtvGHcyJel+aibkPlGeBB+7AoC6hL7lXIE++8okecBxx7lcw==", "dev": true, "license": "Apache-2.0", "engines": { @@ -1468,23 +1474,6 @@ "tslib": "2" } }, - "node_modules/@jsonjoy.com/fs-snapshot/node_modules/@jsonjoy.com/buffers": { - "version": "17.67.0", - "resolved": "https://registry.npmjs.org/@jsonjoy.com/buffers/-/buffers-17.67.0.tgz", - "integrity": "sha512-tfExRpYxBvi32vPs9ZHaTjSP4fHAfzSmcahOfNxtvGHcyJel+aibkPlGeBB+7AoC6hL7lXIE++8okecBxx7lcw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/streamich" - }, - "peerDependencies": { - "tslib": "2" - } - }, "node_modules/@jsonjoy.com/fs-snapshot/node_modules/@jsonjoy.com/codegen": { "version": "17.67.0", "resolved": "https://registry.npmjs.org/@jsonjoy.com/codegen/-/codegen-17.67.0.tgz", @@ -1571,19 +1560,20 @@ } }, "node_modules/@jsonjoy.com/json-pack": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/@jsonjoy.com/json-pack/-/json-pack-1.11.0.tgz", - "integrity": "sha512-nLqSTAYwpk+5ZQIoVp7pfd/oSKNWlEdvTq2LzVA4r2wtWZg6v+5u0VgBOaDJuUfNOuw/4Ysq6glN5QKSrOCgrA==", + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/json-pack/-/json-pack-1.21.0.tgz", + "integrity": "sha512-+AKG+R2cfZMShzrF2uQw34v3zbeDYUqnQ+jg7ORic3BGtfw9p/+N6RJbq/kkV8JmYZaINknaEQ2m0/f693ZPpg==", "dev": true, "license": "Apache-2.0", "dependencies": { "@jsonjoy.com/base64": "^1.1.2", - "@jsonjoy.com/buffers": "^1.0.0", + "@jsonjoy.com/buffers": "^1.2.0", "@jsonjoy.com/codegen": "^1.0.0", - "@jsonjoy.com/json-pointer": "^1.0.1", + "@jsonjoy.com/json-pointer": "^1.0.2", "@jsonjoy.com/util": "^1.9.0", "hyperdyperid": "^1.2.0", - "thingies": "^2.5.0" + "thingies": "^2.5.0", + "tree-dump": "^1.1.0" }, "engines": { "node": ">=10.0" @@ -1596,14 +1586,32 @@ "tslib": "2" } }, + "node_modules/@jsonjoy.com/json-pack/node_modules/@jsonjoy.com/buffers": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/buffers/-/buffers-1.2.1.tgz", + "integrity": "sha512-12cdlDwX4RUM3QxmUbVJWqZ/mrK6dFQH4Zxq6+r1YXKXYBNgZXndx2qbCJwh3+WWkCSn67IjnlG3XYTvmvYtgA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, "node_modules/@jsonjoy.com/json-pointer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@jsonjoy.com/json-pointer/-/json-pointer-1.0.1.tgz", - "integrity": "sha512-tJpwQfuBuxqZlyoJOSZcqf7OUmiYQ6MiPNmOv4KbZdXE/DdvBSSAwhos0zIlJU/AXxC8XpuO8p08bh2fIl+RKA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/json-pointer/-/json-pointer-1.0.2.tgz", + "integrity": "sha512-Fsn6wM2zlDzY1U+v4Nc8bo3bVqgfNTGcn6dMgs6FjrEnt4ZCe60o6ByKRjOGlI2gow0aE/Q41QOigdTqkyK5fg==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@jsonjoy.com/util": "^1.3.0" + "@jsonjoy.com/codegen": "^1.0.0", + "@jsonjoy.com/util": "^1.9.0" }, "engines": { "node": ">=10.0" @@ -1637,6 +1645,23 @@ "tslib": "2" } }, + "node_modules/@jsonjoy.com/util/node_modules/@jsonjoy.com/buffers": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/buffers/-/buffers-1.2.1.tgz", + "integrity": "sha512-12cdlDwX4RUM3QxmUbVJWqZ/mrK6dFQH4Zxq6+r1YXKXYBNgZXndx2qbCJwh3+WWkCSn67IjnlG3XYTvmvYtgA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, "node_modules/@napi-rs/wasm-runtime": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.4.tgz", @@ -1657,9 +1682,9 @@ } }, "node_modules/@nodable/entities": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@nodable/entities/-/entities-2.1.0.tgz", - "integrity": "sha512-nyT7T3nbMyBI/lvr6L5TyWbFJAI9FTgVRakNoBqCD+PmID8DzFrrNdLLtHMwMszOtqZa8PAOV24ZqDnQrhQINA==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@nodable/entities/-/entities-2.1.1.tgz", + "integrity": "sha512-Pig3HxDIoMgjdEH8OCf/dkcTmLFjJRjWuq8jSnklu284/TKOPibSRERmOykiwmyXTtv61mP+44f3GMx0tLAyjg==", "funding": [ { "type": "github", @@ -1685,23 +1710,14 @@ "node": "^20.17.0 || >=22.9.0" } }, - "node_modules/@npmcli/agent/node_modules/lru-cache": { - "version": "11.2.6", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.6.tgz", - "integrity": "sha512-ESL2CrkS/2wTPfuend7Zhkzo2u0daGJ/A2VucJOgQ/C48S/zB8MMeMHSGKYpXhIjbPxfuezITkaBH1wqv00DDQ==", - "dev": true, - "license": "BlueOak-1.0.0", - "engines": { - "node": "20 || >=22" - } - }, "node_modules/@npmcli/arborist": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-9.4.0.tgz", - "integrity": "sha512-4Bm8hNixJG/sii1PMnag0V9i/sGOX9VRzFrUiZMSBJpGlLR38f+Btl85d07G9GL56xO0l0OZjvrGNYsDYp0xKA==", + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-9.5.0.tgz", + "integrity": "sha512-qS+TtKWC58sjBjD+szLrhEj2TCLnwzUA9vlMyCnU9ztw01ZjQSu25iQPxeBa0sk9sS9/Hzs/xJMWl7J/vRCjGQ==", "dev": true, "license": "ISC", "dependencies": { + "@gar/promise-retry": "^1.0.0", "@isaacs/string-locale-compare": "^1.1.0", "@npmcli/fs": "^5.0.0", "@npmcli/installed-package-contents": "^4.0.0", @@ -1743,68 +1759,6 @@ "node": "^20.17.0 || >=22.9.0" } }, - "node_modules/@npmcli/arborist/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/@npmcli/arborist/node_modules/brace-expansion": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz", - "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/@npmcli/arborist/node_modules/hosted-git-info": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-9.0.2.tgz", - "integrity": "sha512-M422h7o/BR3rmCQ8UHi7cyyMqKltdP9Uo+J2fXK+RSAY+wTcKOIRyhTuKv4qn+DJf3g+PL890AzId5KZpX+CBg==", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^11.1.0" - }, - "engines": { - "node": "^20.17.0 || >=22.9.0" - } - }, - "node_modules/@npmcli/arborist/node_modules/lru-cache": { - "version": "11.2.6", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.6.tgz", - "integrity": "sha512-ESL2CrkS/2wTPfuend7Zhkzo2u0daGJ/A2VucJOgQ/C48S/zB8MMeMHSGKYpXhIjbPxfuezITkaBH1wqv00DDQ==", - "dev": true, - "license": "BlueOak-1.0.0", - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/@npmcli/arborist/node_modules/minimatch": { - "version": "10.2.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz", - "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/@npmcli/fs": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-5.0.0.tgz", @@ -1838,52 +1792,6 @@ "node": "^20.17.0 || >=22.9.0" } }, - "node_modules/@npmcli/git/node_modules/ini": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/ini/-/ini-6.0.0.tgz", - "integrity": "sha512-IBTdIkzZNOpqm7q3dRqJvMaldXjDHWkEDfrwGEQTs5eaQMWV+djAhR+wahyNNMAa+qpbDUhBMVt4ZKNwpPm7xQ==", - "dev": true, - "license": "ISC", - "engines": { - "node": "^20.17.0 || >=22.9.0" - } - }, - "node_modules/@npmcli/git/node_modules/isexe": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-4.0.0.tgz", - "integrity": "sha512-FFUtZMpoZ8RqHS3XeXEmHWLA4thH+ZxCv2lOiPIn1Xc7CxrqhWzNSDzD+/chS/zbYezmiwWLdQC09JdQKmthOw==", - "dev": true, - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=20" - } - }, - "node_modules/@npmcli/git/node_modules/lru-cache": { - "version": "11.2.6", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.6.tgz", - "integrity": "sha512-ESL2CrkS/2wTPfuend7Zhkzo2u0daGJ/A2VucJOgQ/C48S/zB8MMeMHSGKYpXhIjbPxfuezITkaBH1wqv00DDQ==", - "dev": true, - "license": "BlueOak-1.0.0", - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/@npmcli/git/node_modules/which": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/which/-/which-6.0.1.tgz", - "integrity": "sha512-oGLe46MIrCRqX7ytPUf66EAYvdeMIZYn3WaocqqKZAxrBpkqHfL/qvTyJ/bTk5+AqHCjXmrv3CEWgy368zhRUg==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^4.0.0" - }, - "bin": { - "node-which": "bin/which.js" - }, - "engines": { - "node": "^20.17.0 || >=22.9.0" - } - }, "node_modules/@npmcli/installed-package-contents": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-4.0.0.tgz", @@ -1917,37 +1825,16 @@ "node": "^20.17.0 || >=22.9.0" } }, - "node_modules/@npmcli/map-workspaces/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/@npmcli/map-workspaces/node_modules/brace-expansion": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz", - "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/@npmcli/map-workspaces/node_modules/minimatch": { - "version": "10.2.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz", - "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==", + "node_modules/@npmcli/map-workspaces/node_modules/glob": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", + "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { - "brace-expansion": "^5.0.2" + "minimatch": "^10.2.2", + "minipass": "^7.1.3", + "path-scurry": "^2.0.2" }, "engines": { "node": "18 || 20 || >=22" @@ -1973,16 +1860,6 @@ "node": "^20.17.0 || >=22.9.0" } }, - "node_modules/@npmcli/metavuln-calculator/node_modules/json-parse-even-better-errors": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-5.0.0.tgz", - "integrity": "sha512-ZF1nxZ28VhQouRWhUcVlUIN3qwSgPuswK05s/HIaoetAoE/9tngVmCHjSxmSQPav1nd+lPtTL0YZ/2AFdR/iYQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^20.17.0 || >=22.9.0" - } - }, "node_modules/@npmcli/name-from-folder": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@npmcli/name-from-folder/-/name-from-folder-4.0.0.tgz", @@ -2022,48 +1899,22 @@ "node": "^20.17.0 || >=22.9.0" } }, - "node_modules/@npmcli/package-json/node_modules/hosted-git-info": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-9.0.2.tgz", - "integrity": "sha512-M422h7o/BR3rmCQ8UHi7cyyMqKltdP9Uo+J2fXK+RSAY+wTcKOIRyhTuKv4qn+DJf3g+PL890AzId5KZpX+CBg==", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^11.1.0" - }, - "engines": { - "node": "^20.17.0 || >=22.9.0" - } - }, - "node_modules/@npmcli/package-json/node_modules/json-parse-even-better-errors": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-5.0.0.tgz", - "integrity": "sha512-ZF1nxZ28VhQouRWhUcVlUIN3qwSgPuswK05s/HIaoetAoE/9tngVmCHjSxmSQPav1nd+lPtTL0YZ/2AFdR/iYQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^20.17.0 || >=22.9.0" - } - }, - "node_modules/@npmcli/package-json/node_modules/lru-cache": { - "version": "11.2.6", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.6.tgz", - "integrity": "sha512-ESL2CrkS/2wTPfuend7Zhkzo2u0daGJ/A2VucJOgQ/C48S/zB8MMeMHSGKYpXhIjbPxfuezITkaBH1wqv00DDQ==", + "node_modules/@npmcli/package-json/node_modules/glob": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", + "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==", "dev": true, "license": "BlueOak-1.0.0", - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/@npmcli/package-json/node_modules/spdx-expression-parse": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz", - "integrity": "sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==", - "dev": true, - "license": "MIT", "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" + "minimatch": "^10.2.2", + "minipass": "^7.1.3", + "path-scurry": "^2.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/@npmcli/promise-spawn": { @@ -2079,32 +1930,6 @@ "node": "^20.17.0 || >=22.9.0" } }, - "node_modules/@npmcli/promise-spawn/node_modules/isexe": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-4.0.0.tgz", - "integrity": "sha512-FFUtZMpoZ8RqHS3XeXEmHWLA4thH+ZxCv2lOiPIn1Xc7CxrqhWzNSDzD+/chS/zbYezmiwWLdQC09JdQKmthOw==", - "dev": true, - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=20" - } - }, - "node_modules/@npmcli/promise-spawn/node_modules/which": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/which/-/which-6.0.1.tgz", - "integrity": "sha512-oGLe46MIrCRqX7ytPUf66EAYvdeMIZYn3WaocqqKZAxrBpkqHfL/qvTyJ/bTk5+AqHCjXmrv3CEWgy368zhRUg==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^4.0.0" - }, - "bin": { - "node-which": "bin/which.js" - }, - "engines": { - "node": "^20.17.0 || >=22.9.0" - } - }, "node_modules/@npmcli/query": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/@npmcli/query/-/query-5.0.0.tgz", @@ -2451,9 +2276,9 @@ } }, "node_modules/@sigstore/core": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@sigstore/core/-/core-3.1.0.tgz", - "integrity": "sha512-o5cw1QYhNQ9IroioJxpzexmPjfCe7gzafd2RY3qnMpxr4ZEja+Jad/U8sgFpaue6bOaF+z7RVkyKVV44FN+N8A==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@sigstore/core/-/core-3.2.0.tgz", + "integrity": "sha512-kxHrDQ9YgfrWUSXU0cjsQGv8JykOFZQ9ErNKbFPWzk3Hgpwu8x2hHrQ9IdA8yl+j9RTLTC3sAF3Tdq1IQCP4oA==", "dev": true, "license": "Apache-2.0", "engines": { @@ -2461,9 +2286,9 @@ } }, "node_modules/@sigstore/protobuf-specs": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@sigstore/protobuf-specs/-/protobuf-specs-0.5.0.tgz", - "integrity": "sha512-MM8XIwUjN2bwvCg1QvrMtbBmpcSHrkhFSCu1D11NyPvDQ25HEc4oG5/OcQfd/Tlf/OxmKWERDj0zGE23jQaMwA==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@sigstore/protobuf-specs/-/protobuf-specs-0.5.1.tgz", + "integrity": "sha512-/ScWUhhoFasJsSRGTVBwId1loQjjnjAfE4djL6ZhrXRpNCmPTnUKF5Jokd58ILseOMjzET3UrMOtJPS9sYeI0g==", "dev": true, "license": "Apache-2.0", "engines": { @@ -2471,27 +2296,27 @@ } }, "node_modules/@sigstore/sign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@sigstore/sign/-/sign-4.1.0.tgz", - "integrity": "sha512-Vx1RmLxLGnSUqx/o5/VsCjkuN5L7y+vxEEwawvc7u+6WtX2W4GNa7b9HEjmcRWohw/d6BpATXmvOwc78m+Swdg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@sigstore/sign/-/sign-4.1.1.tgz", + "integrity": "sha512-Hf4xglukg0XXQ2RiD5vSoLjdPe8OBUPA8XeVjUObheuDcWdYWrnH/BNmxZCzkAy68MzmNCxXLeurJvs6hcP2OQ==", "dev": true, "license": "Apache-2.0", "dependencies": { + "@gar/promise-retry": "^1.0.2", "@sigstore/bundle": "^4.0.0", - "@sigstore/core": "^3.1.0", + "@sigstore/core": "^3.2.0", "@sigstore/protobuf-specs": "^0.5.0", - "make-fetch-happen": "^15.0.3", - "proc-log": "^6.1.0", - "promise-retry": "^2.0.1" + "make-fetch-happen": "^15.0.4", + "proc-log": "^6.1.0" }, "engines": { "node": "^20.17.0 || >=22.9.0" } }, "node_modules/@sigstore/tuf": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@sigstore/tuf/-/tuf-4.0.1.tgz", - "integrity": "sha512-OPZBg8y5Vc9yZjmWCHrlWPMBqW5yd8+wFNl+thMdtcWz3vjVSoJQutF8YkrzI0SLGnkuFof4HSsWUhXrf219Lw==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@sigstore/tuf/-/tuf-4.0.2.tgz", + "integrity": "sha512-TCAzTy0xzdP79EnxSjq9KQ3eaR7+FmudLC6eRKknVKZbV7ZNlGLClAAQb/HMNJ5n2OBNk2GT1tEmU0xuPr+SLQ==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -2558,17 +2383,10 @@ "node": ">=4" } }, - "node_modules/@sinonjs/text-encoding": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.3.tgz", - "integrity": "sha512-DE427ROAphMQzU4ENbliGYrBSYPXF+TtLg9S8vzeA+OF4ZKzoDdzfL8sxuMUGS/lgRhM6j1URSk9ghf7Xo1tyA==", - "dev": true, - "license": "(Unlicense OR Apache-2.0)" - }, "node_modules/@smithy/core": { - "version": "3.24.4", - "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.24.4.tgz", - "integrity": "sha512-3UNRKEyQyAgVgM0LGlerCLm+ChZWZ1GPfde+jBEW6bm6bSBGU1p0EbblaUV3unbhwvidjLA5Zs3sOs7mnZwvAw==", + "version": "3.24.5", + "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.24.5.tgz", + "integrity": "sha512-Kt8phUg45M15EjhYAbZ+fFikYneijLu9Liugz8ZsYz2i8j0hzGv27LWKpEHYRfvj+LyCOSijpcR/2i8RouV+cA==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/crc32": "5.2.0", @@ -2580,12 +2398,12 @@ } }, "node_modules/@smithy/credential-provider-imds": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-4.3.4.tgz", - "integrity": "sha512-vKW0MEFRU4Y3MkVZUkpJm+g9qyPGLCXhc0YLggUdSdBB4g7IaSSsCE75P9rBXyWHrXY1UYSQUl8/DwsTR7QciA==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-4.3.3.tgz", + "integrity": "sha512-I2Bti0DKFo2IJyN28ijCsx51BAumEYR4/1yZ1FXyBygy9MqbnMqCev4JPth/MbpRfBSRAX35hITSnAdJRo1u5w==", "license": "Apache-2.0", "dependencies": { - "@smithy/core": "^3.24.4", + "@smithy/core": "^3.24.3", "@smithy/types": "^4.14.2", "tslib": "^2.6.2" }, @@ -2594,12 +2412,12 @@ } }, "node_modules/@smithy/fetch-http-handler": { - "version": "5.4.4", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.4.4.tgz", - "integrity": "sha512-qM7AUKI4G6d7lNgaZD3lA1tWSolh5r6gcixfTZAPstVURfjIbvreVTPz+994M0yC3HbX4YYhDRgr31Xy3XwWOQ==", + "version": "5.4.3", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.4.3.tgz", + "integrity": "sha512-F+DRf8IJazRJgYog2A/yJK7eYVc0rqTlRzO+5ZxjJd4WkZoKz0IJRncf7G6t1pdVT3kryJcwuTFhN1c5m6N47A==", "license": "Apache-2.0", "dependencies": { - "@smithy/core": "^3.24.4", + "@smithy/core": "^3.24.3", "@smithy/types": "^4.14.2", "tslib": "^2.6.2" }, @@ -2620,12 +2438,12 @@ } }, "node_modules/@smithy/node-http-handler": { - "version": "4.7.4", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.7.4.tgz", - "integrity": "sha512-HIeF+1vrDGzPkkv39Hj2vlHSXHY3p958jd/8ZnePIY6+ZOsQX8coyEUKO5yQu4r0bQIVsbpotVIrXXwyycMStQ==", + "version": "4.7.3", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.7.3.tgz", + "integrity": "sha512-/jPhevcTFPMVl6KNjbaI47iOg1zxC7IsnX4PQDGVZKMFceOXtB8IEYaB7a9VvkP/3oC60WzTeKocvSI7vLT0vA==", "license": "Apache-2.0", "dependencies": { - "@smithy/core": "^3.24.4", + "@smithy/core": "^3.24.3", "@smithy/types": "^4.14.2", "tslib": "^2.6.2" }, @@ -2634,13 +2452,13 @@ } }, "node_modules/@smithy/property-provider": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.3.4.tgz", - "integrity": "sha512-ozP4y+MVRgiJJ1WEkT3/cFHungnv7g1ED9A9lVFlIlOUc9QkEfEYOu+AKUpyRqS9lxKWsdWWcdgSvX6aoRxV/A==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.3.5.tgz", + "integrity": "sha512-QNc22/FgfEm/9/rkefShfQUVckH3HWiQ2RPs+40hwAdY65hbg88gombeHwkfMzmVDZjolcyQeyOjnxZRmpavIA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@smithy/core": "^3.24.4", + "@smithy/core": "^3.24.5", "tslib": "^2.6.2" }, "engines": { @@ -2648,12 +2466,12 @@ } }, "node_modules/@smithy/signature-v4": { - "version": "5.4.4", - "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.4.4.tgz", - "integrity": "sha512-e5UtkMvsatzBfbeBZjEOt0k0Z3BEsjTFL/n6fdO5vtBLe67tdy0dX7xw2DU7uZ3acwoHyeCqpU2Fzb7pxwHb6Q==", + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.4.5.tgz", + "integrity": "sha512-QBJKWGqIknH0dc9LWpfH1mkdokAx6iXYN3UcQ3eY6uIEyScuoQAhfl94ge7ozUy9WgFUdE8xsvwBjaYBbWmPNA==", "license": "Apache-2.0", "dependencies": { - "@smithy/core": "^3.24.4", + "@smithy/core": "^3.24.5", "@smithy/types": "^4.14.2", "tslib": "^2.6.2" }, @@ -2730,45 +2548,6 @@ "node": "^20.17.0 || >=22.9.0" } }, - "node_modules/@tufjs/models/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/@tufjs/models/node_modules/brace-expansion": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz", - "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/@tufjs/models/node_modules/minimatch": { - "version": "10.2.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz", - "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/@tybys/wasm-util": { "version": "0.10.2", "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.2.tgz", @@ -2792,9 +2571,9 @@ } }, "node_modules/@types/debug": { - "version": "4.1.12", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", - "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", + "version": "4.1.13", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.13.tgz", + "integrity": "sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw==", "dev": true, "license": "MIT", "dependencies": { @@ -2809,9 +2588,9 @@ "license": "MIT" }, "node_modules/@types/estree": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", - "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", "dev": true, "license": "MIT" }, @@ -2864,9 +2643,9 @@ } }, "node_modules/@types/sinonjs__fake-timers": { - "version": "8.1.5", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.5.tgz", - "integrity": "sha512-mQkU2jY8jJEF7YHjHvsQO8+3ughTL1mcnn96igfhONmR+fUPSKIkefQYpSe8bsly2Ep7oQbn/6VG5/9/0qcArQ==", + "version": "15.0.1", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-15.0.1.tgz", + "integrity": "sha512-Ko2tjWJq8oozHzHV+reuvS5KYIRAokHnGbDwGh/J64LntgpbuylF74ipEL24HCyRjf9FOlBiBHWBR1RlVKsI1w==", "dev": true, "license": "MIT" }, @@ -3059,29 +2838,29 @@ } }, "node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "license": "MIT", "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" + "node": ">=8" } }, "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "license": "MIT", "dependencies": { - "color-convert": "^1.9.0" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/argparse": { @@ -3098,6 +2877,16 @@ "dev": true, "license": "MIT" }, + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/assertion-error": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", @@ -3121,9 +2910,9 @@ } }, "node_modules/ast-v8-to-istanbul": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/ast-v8-to-istanbul/-/ast-v8-to-istanbul-1.0.2.tgz", - "integrity": "sha512-dKmJxJsGItLmc5CYZKuEjuG6GnBs6PG4gohMhyFOWKaNQoYCuRZJDECaBlHmcG0lv2wc2E0uU8lESmBEumC3DQ==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ast-v8-to-istanbul/-/ast-v8-to-istanbul-1.0.0.tgz", + "integrity": "sha512-1fSfIwuDICFA4LKkCzRPO7F0hzFf0B7+Xqrl27ynQaa+Rh0e1Es0v6kWHPott3lU10AyAr7oKHa65OppjLn3Rg==", "dev": true, "license": "MIT", "dependencies": { @@ -3145,11 +2934,14 @@ } }, "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } }, "node_modules/base64-js": { "version": "1.5.1", @@ -3217,14 +3009,16 @@ "license": "MIT" }, "node_modules/brace-expansion": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.13.tgz", - "integrity": "sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz", + "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==", "dev": true, "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" } }, "node_modules/buffer": { @@ -3260,9 +3054,9 @@ "license": "MIT" }, "node_modules/cacache": { - "version": "20.0.3", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-20.0.3.tgz", - "integrity": "sha512-3pUp4e8hv07k1QlijZu6Kn7c9+ZpWWk4j3F8N3xPuCExULobqJydKYOTj1FTq58srkJsXvO7LbGAH4C0ZU3WGw==", + "version": "20.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-20.0.4.tgz", + "integrity": "sha512-M3Lab8NPYlZU2exsL3bMVvMrMqgwCnMWfdZbK28bn3pK6APT/Te/I8hjRPNu1uwORY9a1eEQoifXbKPQMfMTOA==", "dev": true, "license": "ISC", "dependencies": { @@ -3275,21 +3069,28 @@ "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", "p-map": "^7.0.2", - "ssri": "^13.0.0", - "unique-filename": "^5.0.0" + "ssri": "^13.0.0" }, "engines": { "node": "^20.17.0 || >=22.9.0" } }, - "node_modules/cacache/node_modules/lru-cache": { - "version": "11.2.6", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.6.tgz", - "integrity": "sha512-ESL2CrkS/2wTPfuend7Zhkzo2u0daGJ/A2VucJOgQ/C48S/zB8MMeMHSGKYpXhIjbPxfuezITkaBH1wqv00DDQ==", + "node_modules/cacache/node_modules/glob": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", + "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==", "dev": true, "license": "BlueOak-1.0.0", + "dependencies": { + "minimatch": "^10.2.2", + "minipass": "^7.1.3", + "path-scurry": "^2.0.2" + }, "engines": { - "node": "20 || >=22" + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/callsites": { @@ -3341,41 +3142,20 @@ } }, "node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "license": "MIT", "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=4" - } - }, - "node_modules/chalk/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/chalk/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" + "node": ">=10" }, - "engines": { - "node": ">=4" + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/character-entities": { @@ -3459,59 +3239,6 @@ "wrap-ansi": "^7.0.0" } }, - "node_modules/cliui/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/cliui/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/cliui/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "license": "MIT" - }, - "node_modules/cliui/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, "node_modules/cliui/node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -3527,37 +3254,6 @@ "node": ">=8" } }, - "node_modules/cliui/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/clone": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", @@ -3579,19 +3275,22 @@ } }, "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "license": "MIT", "dependencies": { - "color-name": "1.1.3" + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" } }, "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true, "license": "MIT" }, @@ -3860,191 +3559,6 @@ "node": ">=10" } }, - "node_modules/conventional-changelog-writer/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/conventional-changelog-writer/node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true, - "license": "ISC" - }, - "node_modules/conventional-changelog-writer/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/conventional-changelog-writer/node_modules/meow": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz", - "integrity": "sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/minimist": "^1.2.0", - "camelcase-keys": "^6.2.2", - "decamelize-keys": "^1.1.0", - "hard-rejection": "^2.1.0", - "minimist-options": "4.1.0", - "normalize-package-data": "^3.0.0", - "read-pkg-up": "^7.0.1", - "redent": "^3.0.0", - "trim-newlines": "^3.0.0", - "type-fest": "^0.18.0", - "yargs-parser": "^20.2.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/conventional-changelog-writer/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/conventional-changelog-writer/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/conventional-changelog-writer/node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/conventional-changelog-writer/node_modules/read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/conventional-changelog-writer/node_modules/read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/conventional-changelog-writer/node_modules/read-pkg-up/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=8" - } - }, - "node_modules/conventional-changelog-writer/node_modules/read-pkg/node_modules/normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "node_modules/conventional-changelog-writer/node_modules/read-pkg/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/conventional-changelog-writer/node_modules/read-pkg/node_modules/type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=8" - } - }, "node_modules/conventional-changelog-writer/node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -4090,191 +3604,6 @@ "node": ">=10" } }, - "node_modules/conventional-commits-parser/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/conventional-commits-parser/node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true, - "license": "ISC" - }, - "node_modules/conventional-commits-parser/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/conventional-commits-parser/node_modules/meow": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz", - "integrity": "sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/minimist": "^1.2.0", - "camelcase-keys": "^6.2.2", - "decamelize-keys": "^1.1.0", - "hard-rejection": "^2.1.0", - "minimist-options": "4.1.0", - "normalize-package-data": "^3.0.0", - "read-pkg-up": "^7.0.1", - "redent": "^3.0.0", - "trim-newlines": "^3.0.0", - "type-fest": "^0.18.0", - "yargs-parser": "^20.2.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/conventional-commits-parser/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/conventional-commits-parser/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/conventional-commits-parser/node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/conventional-commits-parser/node_modules/read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/conventional-commits-parser/node_modules/read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/conventional-commits-parser/node_modules/read-pkg-up/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=8" - } - }, - "node_modules/conventional-commits-parser/node_modules/read-pkg/node_modules/normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "node_modules/conventional-commits-parser/node_modules/read-pkg/node_modules/type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=8" - } - }, - "node_modules/conventional-commits-parser/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver" - } - }, "node_modules/conventional-recommended-bump": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-6.1.0.tgz", @@ -4298,191 +3627,6 @@ "node": ">=10" } }, - "node_modules/conventional-recommended-bump/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/conventional-recommended-bump/node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true, - "license": "ISC" - }, - "node_modules/conventional-recommended-bump/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/conventional-recommended-bump/node_modules/meow": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz", - "integrity": "sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/minimist": "^1.2.0", - "camelcase-keys": "^6.2.2", - "decamelize-keys": "^1.1.0", - "hard-rejection": "^2.1.0", - "minimist-options": "4.1.0", - "normalize-package-data": "^3.0.0", - "read-pkg-up": "^7.0.1", - "redent": "^3.0.0", - "trim-newlines": "^3.0.0", - "type-fest": "^0.18.0", - "yargs-parser": "^20.2.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/conventional-recommended-bump/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/conventional-recommended-bump/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/conventional-recommended-bump/node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/conventional-recommended-bump/node_modules/read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/conventional-recommended-bump/node_modules/read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/conventional-recommended-bump/node_modules/read-pkg-up/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=8" - } - }, - "node_modules/conventional-recommended-bump/node_modules/read-pkg/node_modules/normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "node_modules/conventional-recommended-bump/node_modules/read-pkg/node_modules/type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=8" - } - }, - "node_modules/conventional-recommended-bump/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver" - } - }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -4524,23 +3668,42 @@ } } }, - "node_modules/cosmiconfig/node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" }, "engines": { - "node": ">=8" + "node": ">= 8" + } + }, + "node_modules/cross-spawn/node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/cross-spawn/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" } }, "node_modules/cssesc": { @@ -4784,6 +3947,24 @@ "node": ">=6" } }, + "node_modules/dotgitignore/node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/dotgitignore/node_modules/brace-expansion": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz", + "integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "node_modules/dotgitignore/node_modules/find-up": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", @@ -4811,6 +3992,19 @@ "node": ">=6" } }, + "node_modules/dotgitignore/node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/dotgitignore/node_modules/p-limit": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", @@ -4850,6 +4044,13 @@ "node": ">=4" } }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, "node_modules/enquirer": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", @@ -4864,29 +4065,6 @@ "node": ">=8.6" } }, - "node_modules/enquirer/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/enquirer/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/entities": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", @@ -4910,23 +4088,26 @@ "node": ">=6" } }, - "node_modules/err-code": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", - "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", - "dev": true, - "license": "MIT" - }, "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", + "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", "dev": true, "license": "MIT", "dependencies": { "is-arrayish": "^0.2.1" } }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-module-lexer": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.1.0.tgz", @@ -5112,6 +4293,24 @@ "fxparser": "src/cli/cli.js" } }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, "node_modules/figures": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", @@ -5145,6 +4344,23 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/fs-minipass": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", @@ -5184,9 +4400,9 @@ } }, "node_modules/generate-license-file": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/generate-license-file/-/generate-license-file-4.2.1.tgz", - "integrity": "sha512-0As00it8cbFYxp8W5vFqGgyEDgsNFoTMycoIMChmPqmw9ablhWHdO78KzjkedUnszWpLdTspby+tEV4WI0KscA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/generate-license-file/-/generate-license-file-4.1.1.tgz", + "integrity": "sha512-hh2UnFsUiUkw/NdO1tdwBM4xVKnFPHEnR+2yU9NxDLIupIQNRZf4i0UpzGdJu1wUTSzlMHzy4C+2xv+Tex9suA==", "dev": true, "license": "ISC", "dependencies": { @@ -5196,11 +4412,11 @@ "commander": "^14.0.2", "cosmiconfig": "^9.0.0", "enquirer": "^2.3.6", - "glob": "^13.0.0", + "glob": "^11.0.0", "json5": "^2.2.3", "ora": "^5.4.1", "tslib": "^2.3.0", - "zod": "^4.0.0" + "zod": "^3.21.4" }, "bin": { "generate-license-file": "bin/generate-license-file" @@ -5248,6 +4464,32 @@ "node": ">=6.9.0" } }, + "node_modules/get-pkg-repo/node_modules/hosted-git-info": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/get-pkg-repo/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/get-pkg-repo/node_modules/readable-stream": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", @@ -5292,6 +4534,13 @@ "xtend": "~4.0.1" } }, + "node_modules/get-pkg-repo/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, "node_modules/get-uri": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-8.0.0.tgz", @@ -5310,6 +4559,7 @@ "version": "2.0.11", "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.11.tgz", "integrity": "sha512-VnctFhw+xfj8Va1xtfEqCUD2XDrbAPSJx+hSrE5K7fGdjZruW7XV+QOrN7LF/RJyvspRiD2I0asWsxFp0ya26A==", + "deprecated": "This package is no longer maintained. For the JavaScript API, please use @conventional-changelog/git-client instead.", "dev": true, "license": "MIT", "dependencies": { @@ -5326,191 +4576,6 @@ "node": ">=10" } }, - "node_modules/git-raw-commits/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/git-raw-commits/node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true, - "license": "ISC" - }, - "node_modules/git-raw-commits/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/git-raw-commits/node_modules/meow": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz", - "integrity": "sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/minimist": "^1.2.0", - "camelcase-keys": "^6.2.2", - "decamelize-keys": "^1.1.0", - "hard-rejection": "^2.1.0", - "minimist-options": "4.1.0", - "normalize-package-data": "^3.0.0", - "read-pkg-up": "^7.0.1", - "redent": "^3.0.0", - "trim-newlines": "^3.0.0", - "type-fest": "^0.18.0", - "yargs-parser": "^20.2.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/git-raw-commits/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/git-raw-commits/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/git-raw-commits/node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/git-raw-commits/node_modules/read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/git-raw-commits/node_modules/read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/git-raw-commits/node_modules/read-pkg-up/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=8" - } - }, - "node_modules/git-raw-commits/node_modules/read-pkg/node_modules/normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "node_modules/git-raw-commits/node_modules/read-pkg/node_modules/type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=8" - } - }, - "node_modules/git-raw-commits/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver" - } - }, "node_modules/git-remote-origin-url": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz", @@ -5529,6 +4594,7 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-4.1.1.tgz", "integrity": "sha512-OWyMt5zBe7xFs8vglMmhM9lRQzCWL3WjHtxNNfJTMngGym7pC1kh8sP6jevfydJ6LP3ZvGxfb6ABYgPUM0mtsA==", + "deprecated": "This package is no longer maintained. For the JavaScript API, please use @conventional-changelog/git-client instead.", "dev": true, "license": "MIT", "dependencies": { @@ -5542,191 +4608,6 @@ "node": ">=10" } }, - "node_modules/git-semver-tags/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/git-semver-tags/node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true, - "license": "ISC" - }, - "node_modules/git-semver-tags/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/git-semver-tags/node_modules/meow": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz", - "integrity": "sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/minimist": "^1.2.0", - "camelcase-keys": "^6.2.2", - "decamelize-keys": "^1.1.0", - "hard-rejection": "^2.1.0", - "minimist-options": "4.1.0", - "normalize-package-data": "^3.0.0", - "read-pkg-up": "^7.0.1", - "redent": "^3.0.0", - "trim-newlines": "^3.0.0", - "type-fest": "^0.18.0", - "yargs-parser": "^20.2.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/git-semver-tags/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/git-semver-tags/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/git-semver-tags/node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/git-semver-tags/node_modules/read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/git-semver-tags/node_modules/read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/git-semver-tags/node_modules/read-pkg-up/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=8" - } - }, - "node_modules/git-semver-tags/node_modules/read-pkg/node_modules/normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "node_modules/git-semver-tags/node_modules/read-pkg/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/git-semver-tags/node_modules/read-pkg/node_modules/type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=8" - } - }, "node_modules/git-semver-tags/node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -5755,18 +4636,25 @@ "license": "ISC" }, "node_modules/glob": { - "version": "13.0.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", - "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.1.0.tgz", + "integrity": "sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { - "minimatch": "^10.2.2", - "minipass": "^7.1.3", - "path-scurry": "^2.0.2" + "foreground-child": "^3.3.1", + "jackspeak": "^4.1.1", + "minimatch": "^10.1.1", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^2.0.0" + }, + "bin": { + "glob": "dist/esm/bin.mjs" }, "engines": { - "node": "18 || 20 || >=22" + "node": "20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -5789,45 +4677,6 @@ "tslib": "2" } }, - "node_modules/glob/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/glob/node_modules/brace-expansion": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz", - "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/glob/node_modules/minimatch": { - "version": "10.2.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", - "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.5" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", @@ -5878,9 +4727,9 @@ } }, "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.3.tgz", + "integrity": "sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==", "dev": true, "license": "MIT", "dependencies": { @@ -5891,16 +4740,16 @@ } }, "node_modules/hosted-git-info": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", - "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-9.0.3.tgz", + "integrity": "sha512-Hc+ghLoSt6QaYZUv0WBiIvmMDZuZZ7oaDvdH8MbfOO4lOsxdXLEvuC6ePoGs9H1X9oCLyq6+NVN0MKqD+ydxyg==", "dev": true, "license": "ISC", "dependencies": { - "lru-cache": "^6.0.0" + "lru-cache": "^11.1.0" }, "engines": { - "node": ">=10" + "node": "^20.17.0 || >=22.9.0" } }, "node_modules/html-escaper": { @@ -6017,45 +4866,6 @@ "node": "^20.17.0 || >=22.9.0" } }, - "node_modules/ignore-walk/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/ignore-walk/node_modules/brace-expansion": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz", - "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/ignore-walk/node_modules/minimatch": { - "version": "10.2.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz", - "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/import-fresh": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", @@ -6073,16 +4883,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, "node_modules/indent-string": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", @@ -6101,13 +4901,13 @@ "license": "ISC" }, "node_modules/ini": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.3.tgz", - "integrity": "sha512-X7rqawQBvfdjS10YU1y1YVreA3SsLrW9dX2CewP2EbBJM4ypVNLDkO5y04gejPwKIY9lR+7r9gn3rFPt/kmWFg==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-6.0.0.tgz", + "integrity": "sha512-IBTdIkzZNOpqm7q3dRqJvMaldXjDHWkEDfrwGEQTs5eaQMWV+djAhR+wahyNNMAa+qpbDUhBMVt4ZKNwpPm7xQ==", "dev": true, "license": "ISC", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^20.17.0 || >=22.9.0" } }, "node_modules/ip-address": { @@ -6153,13 +4953,13 @@ "license": "MIT" }, "node_modules/is-core-module": { - "version": "2.16.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", - "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "version": "2.16.2", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.2.tgz", + "integrity": "sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA==", "dev": true, "license": "MIT", "dependencies": { - "hasown": "^2.0.2" + "hasown": "^2.0.3" }, "engines": { "node": ">= 0.4" @@ -6263,6 +5063,16 @@ "dev": true, "license": "MIT" }, + "node_modules/isexe": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-4.0.0.tgz", + "integrity": "sha512-FFUtZMpoZ8RqHS3XeXEmHWLA4thH+ZxCv2lOiPIn1Xc7CxrqhWzNSDzD+/chS/zbYezmiwWLdQC09JdQKmthOw==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=20" + } + }, "node_modules/istanbul-lib-coverage": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", @@ -6302,6 +5112,22 @@ "node": ">=8" } }, + "node_modules/jackspeak": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.2.3.tgz", + "integrity": "sha512-ykkVRwrYvFm1nb2AJfKKYPr0emF6IiXDYUaFx4Zn9ZuIH7MrzEZ3sD5RlqGXNRpHtvUHJyOnCEFxOlNDtGo7wg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^9.0.0" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/js-tokens": { "version": "10.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-10.0.0.tgz", @@ -6330,11 +5156,14 @@ "license": "MIT" }, "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-5.0.0.tgz", + "integrity": "sha512-ZF1nxZ28VhQouRWhUcVlUIN3qwSgPuswK05s/HIaoetAoE/9tngVmCHjSxmSQPav1nd+lPtTL0YZ/2AFdR/iYQ==", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": "^20.17.0 || >=22.9.0" + } }, "node_modules/json-schema": { "version": "0.4.0", @@ -6439,9 +5268,9 @@ "license": "MIT" }, "node_modules/katex": { - "version": "0.16.38", - "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.38.tgz", - "integrity": "sha512-cjHooZUmIAUmDsHBN+1n8LaZdpmbj03LtYeYPyuYB7OuloiaeaV6N4LcfjcnHVzGWjVQmKrxxTrpDcmSzEZQwQ==", + "version": "0.16.45", + "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.45.tgz", + "integrity": "sha512-pQpZbdBu7wCTmQUh7ufPmLr0pFoObnGUoL/yhtwJDgmmQpbkg/0HSVti25Fu4rmd1oCR6NGWe9vqTWuWv3GcNA==", "dev": true, "funding": [ "https://opencollective.com/katex", @@ -6781,6 +5610,20 @@ "node": ">=4" } }, + "node_modules/load-json-file/node_modules/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", + "dev": true, + "license": "MIT", + "dependencies": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/load-json-file/node_modules/pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", @@ -6838,70 +5681,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/log-symbols/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/log-symbols/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/log-symbols/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/log-symbols/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "license": "MIT" - }, "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "version": "11.3.6", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.3.6.tgz", + "integrity": "sha512-Gf/KoL3C/MlI7Bt0PGI9I+TeTC/I6r/csU58N4BSNc4lppLBeKsOdFYkK+dX0ABDUMJNfCHTyPpzwwO21Awd3A==", "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, + "license": "BlueOak-1.0.0", "engines": { - "node": ">=10" + "node": "20 || >=22" } }, "node_modules/magic-string": { @@ -6915,13 +5702,13 @@ } }, "node_modules/magicast": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.5.3.tgz", - "integrity": "sha512-pVKE4UdSQ7DvHzivsCIFx2BJn1mHG6KsyrFcaxFx6tONdneEuThrDx0Cj3AMg58KyN4pzYT+LHOotxDQDjNvkw==", + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.5.2.tgz", + "integrity": "sha512-E3ZJh4J3S9KfwdjZhe2afj6R9lGIN5Pher1pF39UGrXRqq/VDaGVIGN13BjHd2u8B61hArAGOnso7nBOouW3TQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.29.3", + "@babel/parser": "^7.29.0", "@babel/types": "^7.29.0", "source-map-js": "^1.2.1" } @@ -6943,14 +5730,15 @@ } }, "node_modules/make-fetch-happen": { - "version": "15.0.4", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-15.0.4.tgz", - "integrity": "sha512-vM2sG+wbVeVGYcCm16mM3d5fuem9oC28n436HjsGO3LcxoTI8LNVa4rwZDn3f76+cWyT4GGJDxjTYU1I2nr6zw==", + "version": "15.0.5", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-15.0.5.tgz", + "integrity": "sha512-uCbIa8jWWmQZt4dSnEStkVC6gdakiinAm4PiGsywIkguF0eWMdcjDz0ECYhUolFU3pFLOev9VNPCEygydXnddg==", "dev": true, "license": "ISC", "dependencies": { "@gar/promise-retry": "^1.0.0", "@npmcli/agent": "^4.0.0", + "@npmcli/redact": "^4.0.0", "cacache": "^20.0.1", "http-cache-semantics": "^4.1.1", "minipass": "^7.0.2", @@ -7047,62 +5835,6 @@ "node": ">=20" } }, - "node_modules/markdownlint-cli/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/markdownlint-cli/node_modules/brace-expansion": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz", - "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/markdownlint-cli/node_modules/minimatch": { - "version": "10.2.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz", - "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/markdownlint/node_modules/string-width": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.1.0.tgz", - "integrity": "sha512-Kxl3KJGb/gxkaUMOjRsQ8IrXiGW75O4E3RPjFIINOVH8AMl2SQ/yWdTzWwF3FevIX9LcMAjJW+GRwAlAbTSXdg==", - "dev": true, - "license": "MIT", - "dependencies": { - "get-east-asian-width": "^1.3.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/mdurl": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", @@ -7140,6 +5872,172 @@ "tslib": "2" } }, + "node_modules/meow": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz", + "integrity": "sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/minimist": "^1.2.0", + "camelcase-keys": "^6.2.2", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^3.0.0", + "read-pkg-up": "^7.0.1", + "redent": "^3.0.0", + "trim-newlines": "^3.0.0", + "type-fest": "^0.18.0", + "yargs-parser": "^20.2.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/meow/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/meow/node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true, + "license": "ISC" + }, + "node_modules/meow/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/meow/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/meow/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/meow/node_modules/read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/meow/node_modules/read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/meow/node_modules/read-pkg-up/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=8" + } + }, + "node_modules/meow/node_modules/read-pkg/node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/meow/node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=8" + } + }, + "node_modules/meow/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, "node_modules/micromark": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.2.tgz", @@ -7697,16 +6595,19 @@ } }, "node_modules/minimatch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", - "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "version": "10.2.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", + "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^5.0.5" }, "engines": { - "node": "*" + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/minimist": { @@ -7734,16 +6635,6 @@ "node": ">= 6" } }, - "node_modules/minimist-options/node_modules/arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/minipass": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", @@ -7786,11 +6677,11 @@ } }, "node_modules/minipass-flush": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", - "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.7.tgz", + "integrity": "sha512-TbqTz9cUwWyHS2Dy89P3ocAGUGxKjjLuR9z8w4WUTGAVgEj17/4nhgo2Du56i0Fm3Pm30g4iA8Lcqctc76jCzA==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "dependencies": { "minipass": "^3.0.0" }, @@ -7811,6 +6702,13 @@ "node": ">=8" } }, + "node_modules/minipass-flush/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, "node_modules/minipass-pipeline": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", @@ -7837,6 +6735,13 @@ "node": ">=8" } }, + "node_modules/minipass-pipeline/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, "node_modules/minipass-sized": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-2.0.0.tgz", @@ -7916,32 +6821,31 @@ "license": "MIT" }, "node_modules/netmask": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.1.0.tgz", - "integrity": "sha512-z9sZrk6wyf8/NDKKqe+Tyl58XtgkYrV4kgt1O8xrzYvpl1LvPacPo0imMLHfpStk3kgCIq1ksJ2bmJn9hue2lQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.1.1.tgz", + "integrity": "sha512-eonl3sLUha+S1GzTPxychyhnUzKyeQkZ7jLjKrBagJgPla13F+uQ71HgpFefyHgqrjEbCPkDArxYsjY8/+gLKA==", "license": "MIT", "engines": { "node": ">= 0.4.0" } }, "node_modules/nise": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/nise/-/nise-6.1.1.tgz", - "integrity": "sha512-aMSAzLVY7LyeM60gvBS423nBmIPP+Wy7St7hsb+8/fc1HmeoHJfLO8CKse4u3BtOZvQLJghYPI2i/1WZrEj5/g==", + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/nise/-/nise-6.1.5.tgz", + "integrity": "sha512-SnRDPDBjxZZoU2n0+gzzLtSvo1OZo7j6jnbXsoh3AFxEGhaFU7ZF0TmefuKERq79wxR2U+MPn7ArW+Tl+clC3A==", "dev": true, "license": "BSD-3-Clause", "dependencies": { "@sinonjs/commons": "^3.0.1", - "@sinonjs/fake-timers": "^13.0.1", - "@sinonjs/text-encoding": "^0.7.3", + "@sinonjs/fake-timers": "^15.1.1", "just-extend": "^6.2.0", - "path-to-regexp": "^8.1.0" + "path-to-regexp": "^8.3.0" } }, "node_modules/nise/node_modules/@sinonjs/fake-timers": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-13.0.5.tgz", - "integrity": "sha512-36/hTbH2uaWuGVERyC6da9YwGWnzUZXuPro/F2LfsdOsLnCojz/iSH8MxUt/FD2S5XBSVPhmArFUXcpCQ2Hkiw==", + "version": "15.4.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-15.4.0.tgz", + "integrity": "sha512-DsG+8/LscQIQg68J6Ef3dv10u6nVyetYn923s3/sus5eaGfTo1of5WMZSLf0UJc9KDuKPilPH0UDJCjvNbDNCA==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -7949,21 +6853,21 @@ } }, "node_modules/node-gyp": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-12.2.0.tgz", - "integrity": "sha512-q23WdzrQv48KozXlr0U1v9dwO/k59NHeSzn6loGcasyf0UnSrtzs8kRxM+mfwJSf0DkX0s43hcqgnSO4/VNthQ==", + "version": "12.3.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-12.3.0.tgz", + "integrity": "sha512-QNcUWM+HgJplcPzBvFBZ9VXacyGZ4+VTOb80PwWR+TlVzoHbRKULNEzpRsnaoxG3Wzr7Qh7BYxGDU3CbKib2Yg==", "dev": true, "license": "MIT", "dependencies": { "env-paths": "^2.2.0", "exponential-backoff": "^3.1.1", "graceful-fs": "^4.2.6", - "make-fetch-happen": "^15.0.0", "nopt": "^9.0.0", "proc-log": "^6.0.0", "semver": "^7.3.5", "tar": "^7.5.4", "tinyglobby": "^0.2.12", + "undici": "^6.25.0", "which": "^6.0.0" }, "bin": { @@ -7973,32 +6877,6 @@ "node": "^20.17.0 || >=22.9.0" } }, - "node_modules/node-gyp/node_modules/isexe": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-4.0.0.tgz", - "integrity": "sha512-FFUtZMpoZ8RqHS3XeXEmHWLA4thH+ZxCv2lOiPIn1Xc7CxrqhWzNSDzD+/chS/zbYezmiwWLdQC09JdQKmthOw==", - "dev": true, - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=20" - } - }, - "node_modules/node-gyp/node_modules/which": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/which/-/which-6.0.1.tgz", - "integrity": "sha512-oGLe46MIrCRqX7ytPUf66EAYvdeMIZYn3WaocqqKZAxrBpkqHfL/qvTyJ/bTk5+AqHCjXmrv3CEWgy368zhRUg==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^4.0.0" - }, - "bin": { - "node-which": "bin/which.js" - }, - "engines": { - "node": "^20.17.0 || >=22.9.0" - } - }, "node_modules/nopt": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/nopt/-/nopt-9.0.0.tgz", @@ -8031,6 +6909,39 @@ "node": ">=10" } }, + "node_modules/normalize-package-data/node_modules/hosted-git-info": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/normalize-package-data/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/normalize-package-data/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, "node_modules/npm-bundled": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-5.0.0.tgz", @@ -8083,29 +6994,6 @@ "node": "^20.17.0 || >=22.9.0" } }, - "node_modules/npm-package-arg/node_modules/hosted-git-info": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-9.0.2.tgz", - "integrity": "sha512-M422h7o/BR3rmCQ8UHi7cyyMqKltdP9Uo+J2fXK+RSAY+wTcKOIRyhTuKv4qn+DJf3g+PL890AzId5KZpX+CBg==", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^11.1.0" - }, - "engines": { - "node": "^20.17.0 || >=22.9.0" - } - }, - "node_modules/npm-package-arg/node_modules/lru-cache": { - "version": "11.2.6", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.6.tgz", - "integrity": "sha512-ESL2CrkS/2wTPfuend7Zhkzo2u0daGJ/A2VucJOgQ/C48S/zB8MMeMHSGKYpXhIjbPxfuezITkaBH1wqv00DDQ==", - "dev": true, - "license": "BlueOak-1.0.0", - "engines": { - "node": "20 || >=22" - } - }, "node_modules/npm-packlist": { "version": "10.0.4", "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-10.0.4.tgz", @@ -8207,82 +7095,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ora/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/ora/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/ora/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/ora/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/ora/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "license": "MIT" - }, - "node_modules/ora/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -8422,6 +7234,13 @@ "quickjs-wasi": "^2.2.0" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, "node_modules/pacote": { "version": "21.5.0", "resolved": "https://registry.npmjs.org/pacote/-/pacote-21.5.0.tgz", @@ -8482,16 +7301,6 @@ "node": "^20.17.0 || >=22.9.0" } }, - "node_modules/parse-conflict-json/node_modules/json-parse-even-better-errors": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-5.0.0.tgz", - "integrity": "sha512-ZF1nxZ28VhQouRWhUcVlUIN3qwSgPuswK05s/HIaoetAoE/9tngVmCHjSxmSQPav1nd+lPtTL0YZ/2AFdR/iYQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^20.17.0 || >=22.9.0" - } - }, "node_modules/parse-entities": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-4.0.2.tgz", @@ -8513,19 +7322,31 @@ } }, "node_modules/parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", "dev": true, "license": "MIT", "dependencies": { + "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" }, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/parse-json/node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true, + "license": "MIT" + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -8551,6 +7372,16 @@ "node": ">=14.0.0" } }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", @@ -8575,20 +7406,10 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/path-scurry/node_modules/lru-cache": { - "version": "11.5.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.0.tgz", - "integrity": "sha512-5YgH9UJd7wVb9hIouI2adWpgqrrICkt070Dnj8EUY1+B4B2P9eRLPAkAAo6NICA7CEhOIeBHl46u9zSNpNu7zA==", - "dev": true, - "license": "BlueOak-1.0.0", - "engines": { - "node": "20 || >=22" - } - }, "node_modules/path-to-regexp": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.4.1.tgz", - "integrity": "sha512-fvU78fIjZ+SBM9YwCknCvKOUKkLVqtWDVctl0s7xIqfmfb38t2TT4ZU2gHm+Z8xGwgW+QWEU3oQSAzIbo89Ggw==", + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.4.2.tgz", + "integrity": "sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==", "dev": true, "license": "MIT", "funding": { @@ -8596,6 +7417,29 @@ "url": "https://opencollective.com/express" } }, + "node_modules/path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "license": "MIT", + "dependencies": { + "pify": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/path-type/node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/pathe": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", @@ -8723,30 +7567,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/promise-retry": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", - "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", - "dev": true, - "license": "MIT", - "dependencies": { - "err-code": "^2.0.2", - "retry": "^0.12.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/promise-retry/node_modules/retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", - "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, "node_modules/proxy-agent": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-8.0.1.tgz", @@ -9003,29 +7823,6 @@ "validate-npm-package-license": "^3.0.1" } }, - "node_modules/read-pkg/node_modules/path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "license": "MIT", - "dependencies": { - "pify": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg/node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/read-pkg/node_modules/semver": { "version": "5.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", @@ -9076,13 +7873,14 @@ } }, "node_modules/resolve": { - "version": "1.22.10", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", - "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", + "version": "1.22.12", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.12.tgz", + "integrity": "sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==", "dev": true, "license": "MIT", "dependencies": { - "is-core-module": "^2.16.0", + "es-errors": "^1.3.0", + "is-core-module": "^2.16.1", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -9127,16 +7925,6 @@ "dev": true, "license": "ISC" }, - "node_modules/retry": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", - "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, "node_modules/rolldown": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.2.tgz", @@ -9187,6 +7975,16 @@ "run-con": "cli.js" } }, + "node_modules/run-con/node_modules/ini": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.3.tgz", + "integrity": "sha512-X7rqawQBvfdjS10YU1y1YVreA3SsLrW9dX2CewP2EbBJM4ypVNLDkO5y04gejPwKIY9lR+7r9gn3rFPt/kmWFg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -9217,9 +8015,9 @@ "optional": true }, "node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", "dev": true, "license": "ISC", "bin": { @@ -9229,6 +8027,29 @@ "node": ">=10" } }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/siginfo": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", @@ -9310,12 +8131,12 @@ } }, "node_modules/socks": { - "version": "2.8.7", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.7.tgz", - "integrity": "sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A==", + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.8.tgz", + "integrity": "sha512-NlGELfPrgX2f1TAAcz0WawlLn+0r3FyhhCRpFFK2CemXenPYvzMWWZINv3eDNo9ucdwme7oCHRY0Jnbs4aIkog==", "license": "MIT", "dependencies": { - "ip-address": "^10.0.1", + "ip-address": "^10.1.1", "smart-buffer": "^4.2.0" }, "engines": { @@ -9369,14 +8190,7 @@ "spdx-license-ids": "^3.0.0" } }, - "node_modules/spdx-exceptions": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", - "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", - "dev": true, - "license": "CC-BY-3.0" - }, - "node_modules/spdx-expression-parse": { + "node_modules/spdx-correct/node_modules/spdx-expression-parse": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", @@ -9387,10 +8201,28 @@ "spdx-license-ids": "^3.0.0" } }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true, + "license": "CC-BY-3.0" + }, + "node_modules/spdx-expression-parse": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz", + "integrity": "sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, "node_modules/spdx-license-ids": { - "version": "3.0.21", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.21.tgz", - "integrity": "sha512-Bvg/8F5XephndSK3JffaRqdT+gyhfqIPwDHpX80tJrF8QQRYMo8sNMeaZ2Dp5+jhwKnUmIOyFFQfHRkjJm5nXg==", + "version": "3.0.23", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.23.tgz", + "integrity": "sha512-CWLcCCH7VLu13TgOH+r8p1O/Znwhqv/dbb6lqWy67G+pT1kHmeD/+V36AVb/vq8QMIQwVShJ6Ssl5FPh0fuSdw==", "dev": true, "license": "CC0-1.0" }, @@ -9466,6 +8298,74 @@ "node": ">=10" } }, + "node_modules/standard-version/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/standard-version/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/standard-version/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/standard-version/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true, + "license": "MIT" + }, + "node_modules/standard-version/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/standard-version/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/std-env": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/std-env/-/std-env-4.1.0.tgz", @@ -9483,6 +8383,52 @@ "safe-buffer": "~5.2.0" } }, + "node_modules/string-width": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.1.0.tgz", + "integrity": "sha512-Kxl3KJGb/gxkaUMOjRsQ8IrXiGW75O4E3RPjFIINOVH8AMl2SQ/yWdTzWwF3FevIX9LcMAjJW+GRwAlAbTSXdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-east-asian-width": "^1.3.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/string-width/node_modules/strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.2.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, "node_modules/stringify-package": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/stringify-package/-/stringify-package-1.0.1.tgz", @@ -9492,19 +8438,16 @@ "license": "ISC" }, "node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "license": "MIT", "dependencies": { - "ansi-regex": "^6.0.1" + "ansi-regex": "^5.0.1" }, "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" + "node": ">=8" } }, "node_modules/strip-bom": { @@ -9582,9 +8525,9 @@ } }, "node_modules/tar": { - "version": "7.5.11", - "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.11.tgz", - "integrity": "sha512-ChjMH33/KetonMTAtpYdgUFr0tbz69Fp2v7zWxQfYZX4g5ZN2nOBXm1R2xyA+lMIKrLKIoKAwFj93jE/avX9cQ==", + "version": "7.5.14", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.14.tgz", + "integrity": "sha512-/7sHKgQO3JLP9ESlwTYUUftHUadOURUqq23xs1vjcnp8Vss6k0wCfzulyEtk5g91pjvnuriimGlyG7k6msrzRw==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { @@ -9598,16 +8541,6 @@ "node": ">=18" } }, - "node_modules/tar/node_modules/yallist": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", - "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==", - "dev": true, - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=18" - } - }, "node_modules/text-extensions": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", @@ -9619,9 +8552,9 @@ } }, "node_modules/thingies": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/thingies/-/thingies-2.5.0.tgz", - "integrity": "sha512-s+2Bwztg6PhWUD7XMfeYm5qliDdSiZm7M7n8KjTkIsm3l/2lgVRc2/Gx/v+ZX8lT4FMA+i8aQvhcWylldc+ZNw==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/thingies/-/thingies-2.6.0.tgz", + "integrity": "sha512-rMHRjmlFLM1R96UYPvpmnc3LYtdFrT33JIB7L9hetGue1qAPfn1N2LJeEjxUSidu1Iku+haLZXDuEXUHNGO/lg==", "dev": true, "license": "MIT", "engines": { @@ -9686,24 +8619,6 @@ "url": "https://github.com/sponsors/SuperchupuDev" } }, - "node_modules/tinyglobby/node_modules/fdir": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, "node_modules/tinyrainbow": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.1.0.tgz", @@ -9847,9 +8762,9 @@ } }, "node_modules/undici": { - "version": "6.24.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.24.0.tgz", - "integrity": "sha512-lVLNosgqo5EkGqh5XUDhGfsMSoO8K0BAN0TyJLvwNRSl4xWGZlCVYsAIpa/OpA3TvmnM01GWcoKmc3ZWo5wKKA==", + "version": "6.25.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.25.0.tgz", + "integrity": "sha512-ZgpWDC5gmNiuY9CnLVXEH8rl50xhRCuLNA97fAUnKi8RRuV4E6KG31pDTsLVUKnohJE0I3XDrTeEydAXRw47xg==", "license": "MIT", "engines": { "node": ">=18.17" @@ -9862,32 +8777,6 @@ "dev": true, "license": "MIT" }, - "node_modules/unique-filename": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-5.0.0.tgz", - "integrity": "sha512-2RaJTAvAb4owyjllTfXzFClJ7WsGxlykkPvCr9pA//LD9goVq+m4PPAeBgNodGZ7nSrntT/auWpJ6Y5IFXcfjg==", - "dev": true, - "license": "ISC", - "dependencies": { - "unique-slug": "^6.0.0" - }, - "engines": { - "node": "^20.17.0 || >=22.9.0" - } - }, - "node_modules/unique-slug": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-6.0.0.tgz", - "integrity": "sha512-4Lup7Ezn8W3d52/xBhZBVdx323ckxa7DEvd9kPQHppTkLoJXw6ltrBCyj5pnrxj0qKDxYMJ56CoxNuFCscdTiw==", - "dev": true, - "license": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4" - }, - "engines": { - "node": "^20.17.0 || >=22.9.0" - } - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -9906,6 +8795,17 @@ "spdx-expression-parse": "^3.0.0" } }, + "node_modules/validate-npm-package-license/node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, "node_modules/validate-npm-package-name": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-7.0.2.tgz", @@ -10104,6 +9004,22 @@ "defaults": "^1.0.3" } }, + "node_modules/which": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/which/-/which-6.0.1.tgz", + "integrity": "sha512-oGLe46MIrCRqX7ytPUf66EAYvdeMIZYn3WaocqqKZAxrBpkqHfL/qvTyJ/bTk5+AqHCjXmrv3CEWgy368zhRUg==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^4.0.0" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, "node_modules/why-is-node-running": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", @@ -10128,6 +9044,39 @@ "dev": true, "license": "MIT" }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/write-file-atomic": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-7.0.1.tgz", @@ -10177,11 +9126,14 @@ } }, "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", + "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==", "dev": true, - "license": "ISC" + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } }, "node_modules/yargs": { "version": "16.2.0", @@ -10212,23 +9164,6 @@ "node": ">=10" } }, - "node_modules/yargs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, "node_modules/yargs/node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -10244,19 +9179,6 @@ "node": ">=8" } }, - "node_modules/yargs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", @@ -10271,9 +9193,9 @@ } }, "node_modules/zod": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.4.3.tgz", - "integrity": "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==", + "version": "3.25.76", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", + "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", "dev": true, "license": "MIT", "funding": { diff --git a/package.json b/package.json index 57be18e..78bc9ac 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { "name": "configure-aws-credentials", "description": "A GitHub Action to configure AWS credentials", - "version": "6.1.2", + "version": "6.1.1", "scripts": { "build": "tsc", - "lint": "biome check --error-on-warnings ./src && markdownlint -i node_modules -i CHANGELOG.md '**/*.md'", - "lint:fix": "biome check --write ./src && markdownlint -i node_modules -i CHANGELOG.md -f '**/*.md'", + "lint": "biome check --error-on-warnings ./src ./test && markdownlint -i node_modules -i CHANGELOG.md '**/*.md'", + "lint:fix": "biome check --write ./src ./test && markdownlint -i node_modules -i CHANGELOG.md -f '**/*.md'", "package": "esbuild src/index.ts --bundle --platform=node --target=node24 --outfile=dist/index.js && esbuild src/cleanup/index.ts --bundle --platform=node --target=node24 --outfile=dist/cleanup/index.js && npm run license", "test": "npm run lint && vitest run && npm run build", "clean": "del-cli coverage test-reports node_modules", @@ -18,13 +18,13 @@ }, "devDependencies": { "@aws-sdk/credential-provider-env": "^3.972.39", - "@biomejs/biome": "2.4.13", + "@biomejs/biome": "2.4.15", "@smithy/property-provider": "^4.3.4", "@types/node": "^25.9.1", "@vitest/coverage-v8": "4.1.5", "aws-sdk-client-mock": "^4.1.0", "esbuild": "^0.28.0", - "generate-license-file": "^4.2.1", + "generate-license-file": "^4.1.1", "json-schema": "^0.4.0", "markdownlint-cli": "^0.48.0", "memfs": "^4.57.2", @@ -33,9 +33,9 @@ "vitest": "4.1.5" }, "dependencies": { - "@actions/core": "^2.0.2", - "@aws-sdk/client-sts": "^3.1053.0", - "@smithy/node-http-handler": "^4.6.1", + "@actions/core": "^3.0.1", + "@aws-sdk/client-sts": "^3.1049.0", + "@smithy/node-http-handler": "^4.7.3", "proxy-agent": "^8.0.1" }, "keywords": [ diff --git a/src/CredentialsClient.ts b/src/CredentialsClient.ts index 2d78b49..cfbf204 100644 --- a/src/CredentialsClient.ts +++ b/src/CredentialsClient.ts @@ -3,15 +3,18 @@ import { STSClient } from '@aws-sdk/client-sts'; import type { AwsCredentialIdentity } from '@aws-sdk/types'; import { NodeHttpHandler } from '@smithy/node-http-handler'; import { ProxyAgent } from 'proxy-agent'; -import { errorMessage, getCallerIdentity } from './helpers'; +import { buildCustomUserAgent, errorMessage, getCallerIdentity } from './helpers'; import { ProxyResolver } from './ProxyResolver'; -const USER_AGENT = 'configure-aws-credentials-for-github-actions'; +if (!process.env.AWS_EXECUTION_ENV) { + process.env.AWS_EXECUTION_ENV = 'GitHubActions'; +} export interface CredentialsClientProps { region?: string; proxyServer?: string; noProxy?: string; + stsEndpoint?: string; roleChaining: boolean; } @@ -19,6 +22,7 @@ export class CredentialsClient { public region?: string; private _stsClient?: STSClient; private readonly requestHandler?: NodeHttpHandler; + private readonly stsEndpoint?: string; private roleChaining?: boolean; constructor(props: CredentialsClientProps) { @@ -41,19 +45,20 @@ export class CredentialsClient { httpAgent: handler, }); } + if (props.stsEndpoint) { + this.stsEndpoint = props.stsEndpoint; + } this.roleChaining = props.roleChaining; } public get stsClient(): STSClient { if (!this._stsClient || this.roleChaining) { - const config = { customUserAgent: USER_AGENT } as { - customUserAgent: string; - region?: string; - requestHandler?: NodeHttpHandler; - }; - if (this.region !== undefined) config.region = this.region; - if (this.requestHandler !== undefined) config.requestHandler = this.requestHandler; - this._stsClient = new STSClient(config); + this._stsClient = new STSClient({ + customUserAgent: buildCustomUserAgent(), + ...(this.region !== undefined && { region: this.region }), + ...(this.stsEndpoint !== undefined && { endpoint: this.stsEndpoint }), + ...(this.requestHandler !== undefined && { requestHandler: this.requestHandler }), + }); } return this._stsClient; } diff --git a/src/assumeRole.ts b/src/assumeRole.ts index 3e3082b..ebf27a6 100644 --- a/src/assumeRole.ts +++ b/src/assumeRole.ts @@ -77,6 +77,98 @@ export interface assumeRoleParams { webIdentityToken?: string; inlineSessionPolicy?: string; managedSessionPolicies?: { arn: string }[]; + customTags?: string; +} + +const TAG_KEY_REGEX = /^[\p{L}\p{Z}\p{N}_.:/=+\-@]+$/u; +const TAG_VALUE_REGEX = /^[\p{L}\p{Z}\p{N}_.:/=+\-@]*$/u; +const MAX_TAG_KEY_LENGTH = 128; +const MAX_TAG_VALUE_LENGTH = 256; +const MAX_SESSION_TAGS = 50; + +// Identity/audit primitives. Always emitted and cannot be overridden by custom-tags. +const PROTECTED_TAG_SOURCES: ReadonlyArray<{ key: string; envVar: string }> = [ + { key: 'Repository', envVar: 'GITHUB_REPOSITORY' }, + { key: 'Workflow', envVar: 'GITHUB_WORKFLOW' }, + { key: 'Action', envVar: 'GITHUB_ACTION' }, + { key: 'Actor', envVar: 'GITHUB_ACTOR' }, + { key: 'Commit', envVar: 'GITHUB_SHA' }, + { key: 'Branch', envVar: 'GITHUB_REF' }, +]; + +// Convenience metadata. Custom-tags may override (suppresses the default for that key). +// Listed in priority order; lower-priority entries are dropped first if the user's custom-tags +// would push the total above MAX_SESSION_TAGS. +const OVERRIDEABLE_TAG_SOURCES_BY_PRIORITY: ReadonlyArray<{ key: string; envVar: string }> = [ + { key: 'EventName', envVar: 'GITHUB_EVENT_NAME' }, + { key: 'BaseRef', envVar: 'GITHUB_BASE_REF' }, + { key: 'HeadRef', envVar: 'GITHUB_HEAD_REF' }, + { key: 'RefName', envVar: 'GITHUB_REF_NAME' }, + { key: 'RunId', envVar: 'GITHUB_RUN_ID' }, + { key: 'RefType', envVar: 'GITHUB_REF_TYPE' }, + { key: 'Job', envVar: 'GITHUB_JOB' }, + { key: 'TriggeringActor', envVar: 'GITHUB_TRIGGERING_ACTOR' }, +]; + +const PROTECTED_TAG_KEYS = new Set(['GitHub', ...PROTECTED_TAG_SOURCES.map((s) => s.key)]); + +export function parseAndValidateCustomTags(customTags: string, existingTags: Tag[]): Tag[] { + let parsed: unknown; + try { + parsed = JSON.parse(customTags); + } catch { + throw new Error('custom-tags: input is not valid JSON'); + } + + if (typeof parsed !== 'object' || parsed === null || Array.isArray(parsed)) { + throw new Error('custom-tags: input must be a JSON object (not an array or primitive)'); + } + + const newTags: Tag[] = []; + + for (const [key, value] of Object.entries(parsed)) { + if (typeof value === 'object') { + throw new Error( + `custom-tags: value for key '${key}' must be a string, number, or boolean (not an object or array)`, + ); + } + + const stringValue = String(value); + + if (key.length === 0 || key.length > MAX_TAG_KEY_LENGTH) { + throw new Error(`custom-tags: key '${key}' must be between 1 and ${MAX_TAG_KEY_LENGTH} characters`); + } + if (stringValue.length > MAX_TAG_VALUE_LENGTH) { + throw new Error( + `custom-tags: value for key '${key}' exceeds maximum length of ${MAX_TAG_VALUE_LENGTH} characters`, + ); + } + if (!TAG_KEY_REGEX.test(key)) { + throw new Error( + `custom-tags: key '${key}' contains invalid characters. Allowed: unicode letters, digits, spaces, and _.:/=+-@`, + ); + } + if (stringValue.length > 0 && !TAG_VALUE_REGEX.test(stringValue)) { + throw new Error( + `custom-tags: value for key '${key}' contains invalid characters. Allowed: unicode letters, digits, spaces, and _.:/=+-@`, + ); + } + if (PROTECTED_TAG_KEYS.has(key)) { + throw new Error( + `custom-tags: key '${key}' conflicts with a protected session tag set by this action and cannot be overridden`, + ); + } + + newTags.push({ Key: key, Value: stringValue }); + } + + if (existingTags.length + newTags.length > MAX_SESSION_TAGS) { + throw new Error( + `custom-tags: total session tags (${existingTags.length + newTags.length}) would exceed the AWS limit of ${MAX_SESSION_TAGS}`, + ); + } + + return newTags; } export async function assumeRole(params: assumeRoleParams) { @@ -93,6 +185,7 @@ export async function assumeRole(params: assumeRoleParams) { webIdentityToken, inlineSessionPolicy, managedSessionPolicies, + customTags, } = { ...params }; // Load GitHub environment variables @@ -101,26 +194,37 @@ export async function assumeRole(params: assumeRoleParams) { throw new Error('Missing required environment variables. Are you running in GitHub Actions?'); } - // Load role session tags - const tagArray: Tag[] = [ - { Key: 'GitHub', Value: 'Actions' }, - { Key: 'Repository', Value: GITHUB_REPOSITORY }, - { Key: 'Workflow', Value: sanitizeGitHubVariables(GITHUB_WORKFLOW) }, - { Key: 'Action', Value: GITHUB_ACTION }, - { Key: 'Actor', Value: sanitizeGitHubVariables(GITHUB_ACTOR) }, - { Key: 'Commit', Value: GITHUB_SHA }, - ]; - if (process.env.GITHUB_REF) { - tagArray.push({ - Key: 'Branch', - Value: sanitizeGitHubVariables(process.env.GITHUB_REF), - }); + // Build session tags. Values are sanitized because the AWS tag value spec is more + // restrictive than permissible characters in environment variables. + const protectedTags: Tag[] = [{ Key: 'GitHub', Value: 'Actions' }]; + for (const { key, envVar } of PROTECTED_TAG_SOURCES) { + const value = process.env[envVar]; + if (value) { + protectedTags.push({ Key: key, Value: sanitizeGitHubVariables(value) }); + } } + + const parsedCustomTags: Tag[] = customTags ? parseAndValidateCustomTags(customTags, protectedTags) : []; + const customTagKeys = new Set(parsedCustomTags.map((t) => t.Key)); + + const availableOverrideableSlots = MAX_SESSION_TAGS - protectedTags.length - parsedCustomTags.length; + const overrideableTags: Tag[] = []; + for (const { key, envVar } of OVERRIDEABLE_TAG_SOURCES_BY_PRIORITY) { + if (overrideableTags.length >= availableOverrideableSlots) break; + if (customTagKeys.has(key)) continue; + const value = process.env[envVar]; + if (value) { + overrideableTags.push({ Key: key, Value: sanitizeGitHubVariables(value) }); + } + } + + const tagArray: Tag[] = [...protectedTags, ...overrideableTags, ...parsedCustomTags]; + const tags = roleSkipSessionTagging ? undefined : tagArray; if (!tags) { core.debug('Role session tagging has been skipped.'); } else { - core.debug(`${tags.length} role session tags are being used.`); + core.debug(`${tags.length} role session tags are being used:`); } //only populate transitiveTagKeys array if user is actually using session tagging diff --git a/src/helpers.ts b/src/helpers.ts index bf662d7..4ad21e3 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -3,11 +3,32 @@ import * as path from 'node:path'; import * as core from '@actions/core'; import type { Credentials, STSClient } from '@aws-sdk/client-sts'; import { GetCallerIdentityCommand } from '@aws-sdk/client-sts'; +import type { UserAgent } from '@smithy/types'; import type { CredentialsClient } from './CredentialsClient'; const MAX_TAG_VALUE_LENGTH = 256; const SANITIZATION_CHARACTER = '_'; const SPECIAL_CHARS_REGEX = /[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]+/; +const USER_AGENT_PREFIX = 'configure-aws-credentials-for-github-actions'; +const UA_FIELDS: ReadonlyArray<{ env: string; label: string; pattern: RegExp }> = [ + { env: 'GITHUB_ACTION', label: 'action', pattern: /^[A-Za-z0-9_-]{1,128}$/ }, + { env: 'GITHUB_RUN_ID', label: 'run_id', pattern: /^[0-9]{1,20}$/ }, + { env: 'GITHUB_RUN_ATTEMPT', label: 'attempt', pattern: /^[0-9]{1,10}$/ }, +]; + +export function buildCustomUserAgent(): UserAgent { + const tokens: UserAgent = [[USER_AGENT_PREFIX]]; + for (const { env, label, pattern } of UA_FIELDS) { + const value = process.env[env]; + if (value === undefined) continue; + if (pattern.test(value)) { + tokens.push(['md', `${label}#${value}`]); + } else { + core.warning(`${env} has unexpected format; omitting from User-Agent`); + } + } + return tokens; +} export function translateEnvVariables() { const envVars = [ @@ -191,6 +212,7 @@ export async function retryAndBackoff( maxRetries = 12, retries = 0, base = 50, + label?: string, ): Promise { try { return await fn(); @@ -202,20 +224,21 @@ export async function retryAndBackoff( // It's retryable, so sleep and retry. const delay = Math.random() * (2 ** retries * base); const nextRetry = retries + 1; + const opName = label ? ` ${label}` : ''; - core.debug( - `retryAndBackoff: attempt ${nextRetry} of ${maxRetries} failed: ${errorMessage(err)}. ` + + core.info( + `Retry${opName}: attempt ${nextRetry} of ${maxRetries} failed: ${errorMessage(err)}. ` + `Retrying after ${Math.floor(delay)}ms.`, ); await sleep(delay); if (nextRetry >= maxRetries) { - core.debug('retryAndBackoff: reached max retries; giving up.'); + core.info(`Retry${opName}: reached max retries (${maxRetries}); giving up.`); throw err; } - return await retryAndBackoff(fn, isRetryable, maxRetries, nextRetry, base); + return await retryAndBackoff(fn, isRetryable, maxRetries, nextRetry, base, label); } } diff --git a/src/index.ts b/src/index.ts index 5ea2a32..2153a32 100644 --- a/src/index.ts +++ b/src/index.ts @@ -19,6 +19,7 @@ import { writeProfileFiles } from './profileManager'; const DEFAULT_ROLE_DURATION = 3600; // One hour (seconds) const ROLE_SESSION_NAME = 'GitHubActions'; const REGION_REGEX = /^[a-z0-9-]+$/g; +const ROLE_SESSION_NAME_REGEX = /^[\w+=,.@-]*$/; export async function run() { try { @@ -43,6 +44,7 @@ export async function run() { const roleSkipSessionTagging = getBooleanInput('role-skip-session-tagging', { required: false }); const transitiveTagKeys = core.getMultilineInput('transitive-tag-keys', { required: false }); const proxyServer = core.getInput('http-proxy', { required: false }) || process.env.HTTP_PROXY; + const customTags = core.getInput('custom-tags', { required: false }); const inlineSessionPolicy = core.getInput('inline-session-policy', { required: false }); const managedSessionPolicies = core.getMultilineInput('managed-session-policies', { required: false }).map((p) => { return { arn: p }; @@ -63,6 +65,7 @@ export async function run() { .map((s) => s.trim()); const forceSkipOidc = getBooleanInput('force-skip-oidc', { required: false }); const noProxy = core.getInput('no-proxy', { required: false }); + const stsEndpoint = core.getInput('sts-endpoint', { required: false }); const globalTimeout = Number.parseInt(core.getInput('action-timeout-s', { required: false })) || 0; let timeoutId: NodeJS.Timeout | undefined; @@ -88,6 +91,9 @@ export async function run() { maxRetries = 1; } + const withRetry = (fn: () => Promise, label: string): Promise => + retryAndBackoff(fn, !disableRetry, maxRetries, 0, 50, label); + // Logic to decide whether to attempt to use OIDC or not const useGitHubOIDCProvider = () => { if (forceSkipOidc) return false; @@ -124,15 +130,33 @@ export async function run() { throw new Error(`Region is not valid: ${region}`); } + if (roleSessionName.length < 2 || roleSessionName.length > 64) { + throw new Error( + `Role session name must be between 2 and 64 characters, got ${roleSessionName.length}: '${roleSessionName}'`, + ); + } + if (!roleSessionName.match(ROLE_SESSION_NAME_REGEX)) { + throw new Error( + `Role session name is not valid: '${roleSessionName}'. Must satisfy regular expression pattern: [\\w+=,.@-]*`, + ); + } + exportRegion(region, outputEnvCredentials); // Instantiate credentials client - const clientProps: { region: string; proxyServer?: string; noProxy?: string; roleChaining: boolean } = { + const clientProps: { + region: string; + proxyServer?: string; + noProxy?: string; + stsEndpoint?: string; + roleChaining: boolean; + } = { region, roleChaining, }; if (proxyServer) clientProps.proxyServer = proxyServer; if (noProxy) clientProps.noProxy = noProxy; + if (stsEndpoint) clientProps.stsEndpoint = stsEndpoint; const credentialsClient = new CredentialsClient(clientProps); let sourceAccountId: string; let webIdentityToken: string; @@ -152,13 +176,9 @@ export async function run() { // Else, export credentials provided as input if (useGitHubOIDCProvider()) { try { - webIdentityToken = await retryAndBackoff( - async () => { - return core.getIDToken(audience); - }, - !disableRetry, - maxRetries, - ); + webIdentityToken = await withRetry(async () => { + return core.getIDToken(audience); + }, 'getIDToken'); } catch (error) { throw new Error(`getIDToken call failed: ${errorMessage(error)}`); } @@ -179,59 +199,77 @@ export async function run() { } } else if (!webIdentityTokenFile && !roleChaining) { // Proceed only if credentials can be picked up - await credentialsClient.validateCredentials(undefined, roleChaining, expectedAccountIds); - sourceAccountId = await exportAccountId(credentialsClient, maskAccountId); + await withRetry( + () => credentialsClient.validateCredentials(undefined, roleChaining, expectedAccountIds), + 'validateCredentials', + ); + sourceAccountId = await withRetry(() => exportAccountId(credentialsClient, maskAccountId), 'exportAccountId'); } if (AccessKeyId || roleChaining) { // Validate that the SDK can actually pick up credentials. // This validates cases where this action is using existing environment credentials, // and cases where the user intended to provide input credentials but the secrets inputs resolved to empty strings. - await credentialsClient.validateCredentials(AccessKeyId, roleChaining, expectedAccountIds); - sourceAccountId = await exportAccountId(credentialsClient, maskAccountId); + // Skip when output-env-credentials is false: input IAM keys were not written to env, so + // the default chain would resolve to ambient runner credentials and the access-key check + // would spuriously fail (see #1554). + if (outputEnvCredentials) { + await withRetry( + () => credentialsClient.validateCredentials(AccessKeyId, roleChaining, expectedAccountIds), + 'validateCredentials', + ); + sourceAccountId = await withRetry(() => exportAccountId(credentialsClient, maskAccountId), 'exportAccountId'); + } } + if (customTags && (useGitHubOIDCProvider() || webIdentityTokenFile)) { + core.warning( + "'custom-tags' is set but will be ignored because session tags cannot be applied when using OIDC or web identity token authentication. " + + 'Tags are controlled by the identity provider token claims in these authentication flows.', + ); + } + // Get role credentials if configured to do so if (roleToAssume) { let roleCredentials: AssumeRoleCommandOutput; do { - roleCredentials = await retryAndBackoff( - async () => { - return assumeRole({ - credentialsClient, - sourceAccountId, - roleToAssume, - roleExternalId, - roleDuration, - roleSessionName, - roleSkipSessionTagging, - transitiveTagKeys, - webIdentityTokenFile, - webIdentityToken, - inlineSessionPolicy, - managedSessionPolicies, - }); - }, - !disableRetry, - maxRetries, - ); + roleCredentials = await withRetry(async () => { + return assumeRole({ + credentialsClient, + sourceAccountId, + roleToAssume, + roleExternalId, + roleDuration, + roleSessionName, + roleSkipSessionTagging, + transitiveTagKeys, + webIdentityTokenFile, + webIdentityToken, + inlineSessionPolicy, + managedSessionPolicies, + customTags, + }); + }, 'AssumeRole'); } while (specialCharacterWorkaround && !verifyKeys(roleCredentials.Credentials)); core.info(`Authenticated as assumedRoleId ${roleCredentials.AssumedRoleUser?.AssumedRoleId}`); exportCredentials(roleCredentials.Credentials, outputCredentials, outputEnvCredentials); - // We need to validate the credentials in 2 of our use-cases - // First: self-hosted runners. If the GITHUB_ACTIONS environment variable - // is set to `true` then we are NOT in a self-hosted runner. - // Second: Customer provided credentials manually (IAM User keys stored in GH Secrets) - // If we are using a profile, don't validate credentials yet (since they most likely won't be in the environment). - // Wait until after creds are written to the profile file to try validation. - if ((!process.env.GITHUB_ACTIONS || AccessKeyId) && !awsProfile) { - await credentialsClient.validateCredentials( - roleCredentials.Credentials?.AccessKeyId, - roleChaining, - expectedAccountIds, + // Validate that the SDK can pick up the assumed-role credentials from the environment. + // Skip when output-env-credentials is false: the credentials were never written to env, + // so the default credential provider chain would resolve to ambient runner credentials + // (e.g. an EC2 instance profile) and the access-key-id check would spuriously fail. + // Skip when using a profile: validation runs after the profile file is written below. + if ((!process.env.GITHUB_ACTIONS || AccessKeyId) && !awsProfile && outputEnvCredentials) { + await withRetry( + () => + credentialsClient.validateCredentials( + roleCredentials.Credentials?.AccessKeyId, + roleChaining, + expectedAccountIds, + ), + 'validateCredentials', ); } if (outputEnvCredentials) { - await exportAccountId(credentialsClient, maskAccountId); + await withRetry(() => exportAccountId(credentialsClient, maskAccountId), 'exportAccountId'); } // Write profile files if profile mode is enabled @@ -244,10 +282,14 @@ export async function run() { // We then validate the credentials to make sure they work. if (AccessKeyId || !process.env.GITHUB_ACTIONS) { writeProfileFiles(awsProfile, roleCredentials.Credentials, region, true); - await credentialsClient.validateCredentials( - roleCredentials.Credentials.AccessKeyId, - roleChaining, - expectedAccountIds, + await withRetry( + () => + credentialsClient.validateCredentials( + roleCredentials.Credentials?.AccessKeyId, + roleChaining, + expectedAccountIds, + ), + 'validateCredentials', ); } else { writeProfileFiles(awsProfile, roleCredentials.Credentials, region, overwriteAwsProfile); diff --git a/test/assumeRole.test.ts b/test/assumeRole.test.ts index c6a6c0f..566f0d9 100644 --- a/test/assumeRole.test.ts +++ b/test/assumeRole.test.ts @@ -1,9 +1,5 @@ import * as core from '@actions/core'; -import { - AssumeRoleWithWebIdentityCommand, - GetCallerIdentityCommand, - STSClient, -} from '@aws-sdk/client-sts'; +import { AssumeRoleWithWebIdentityCommand, GetCallerIdentityCommand, STSClient } from '@aws-sdk/client-sts'; import { mockClient } from 'aws-sdk-client-mock'; import { fs, vol } from 'memfs'; import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; diff --git a/test/cleanup.test.ts b/test/cleanup.test.ts index 74da1e7..f7bd649 100644 --- a/test/cleanup.test.ts +++ b/test/cleanup.test.ts @@ -5,20 +5,15 @@ import { beforeEach, describe, expect, it, vi } from 'vitest'; import { cleanup } from '../src/cleanup'; import mocks from './mockinputs.test'; +vi.mock('@actions/core'); + const mockedSTSClient = mockClient(STSClient); describe('Configure AWS Credentials cleanup', {}, () => { beforeEach(() => { - // Reset mock state - vi.restoreAllMocks(); + vi.resetAllMocks(); mockedSTSClient.reset(); - // Mock GitHub Actions core functions - vi.spyOn(core, 'exportVariable').mockImplementation((_n, _v) => {}); - vi.spyOn(core, 'setSecret').mockImplementation((_s) => {}); - vi.spyOn(core, 'setFailed').mockImplementation((_m) => {}); - vi.spyOn(core, 'setOutput').mockImplementation((_n, _v) => {}); - vi.spyOn(core, 'debug').mockImplementation((_m) => {}); - vi.spyOn(core, 'info').mockImplementation((_m) => {}); + vi.mocked(core.getInput).mockReturnValue(''); process.env = { ...mocks.envs, AWS_ACCESS_KEY_ID: 'CLEANUPTEST', @@ -39,7 +34,7 @@ describe('Configure AWS Credentials cleanup', {}, () => { expect(core.exportVariable).toHaveBeenCalledWith('AWS_REGION', ''); }); it('also clears AWS_PROFILE when aws-profile was set', {}, () => { - vi.spyOn(core, 'getInput').mockImplementation((name: string) => { + vi.mocked(core.getInput).mockImplementation((name: string) => { if (name === 'aws-profile') return 'my-profile'; if (name === 'output-env-credentials') return 'true'; return ''; @@ -50,7 +45,7 @@ describe('Configure AWS Credentials cleanup', {}, () => { expect(core.exportVariable).toHaveBeenCalledWith('AWS_PROFILE', ''); }); it('skips env cleanup when aws-profile is set without output-env-credentials', {}, () => { - vi.spyOn(core, 'getInput').mockImplementation((name: string) => { + vi.mocked(core.getInput).mockImplementation((name: string) => { if (name === 'aws-profile') return 'my-profile'; return ''; }); @@ -59,14 +54,14 @@ describe('Configure AWS Credentials cleanup', {}, () => { expect(core.exportVariable).toHaveBeenCalledTimes(0); }); it('handles errors', {}, () => { - vi.spyOn(core, 'exportVariable').mockImplementationOnce(() => { + vi.mocked(core.exportVariable).mockImplementationOnce(() => { throw new Error('Test error'); }); cleanup(); expect(core.setFailed).toHaveBeenCalled(); }); it(`doesn't export credentials as empty env variables if asked not to`, {}, () => { - vi.spyOn(core, 'getInput').mockImplementation(mocks.getInput(mocks.NO_ENV_CREDS_INPUTS)); + vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.NO_ENV_CREDS_INPUTS)); cleanup(); expect(core.exportVariable).toHaveBeenCalledTimes(0); }); diff --git a/test/helpers.test.ts b/test/helpers.test.ts index 25f2a96..eefca3c 100644 --- a/test/helpers.test.ts +++ b/test/helpers.test.ts @@ -28,6 +28,29 @@ describe('Configure AWS Credentials helpers', {}, () => { await expect(helpers.retryAndBackoff(fn, false)).rejects.toMatch('i am not retryable'); expect(fn).toHaveBeenCalledTimes(1); }); + it('retries and logs with label at info level', {}, async () => { + helpers.withsleep(() => Promise.resolve()); + const fn = vi.fn().mockRejectedValueOnce(new Error('transient')).mockResolvedValueOnce('success'); + const result = await helpers.retryAndBackoff(fn, true, 3, 0, 50, 'TestOp'); + expect(result).toBe('success'); + expect(fn).toHaveBeenCalledTimes(2); + expect(core.info).toHaveBeenCalledWith(expect.stringContaining('Retry TestOp: attempt 1 of 3 failed')); + helpers.reset(); + }); + it('logs max retries reached with label', {}, async () => { + helpers.withsleep(() => Promise.resolve()); + const fn = vi.fn().mockRejectedValue(new Error('persistent')); + await expect(helpers.retryAndBackoff(fn, true, 2, 0, 50, 'TestOp')).rejects.toThrow('persistent'); + expect(core.info).toHaveBeenCalledWith(expect.stringContaining('Retry TestOp: reached max retries (2)')); + helpers.reset(); + }); + it('retries without a label (backward compat)', {}, async () => { + helpers.withsleep(() => Promise.resolve()); + const fn = vi.fn().mockRejectedValueOnce(new Error('transient')).mockResolvedValueOnce('ok'); + await helpers.retryAndBackoff(fn, true, 3); + expect(core.info).toHaveBeenCalledWith(expect.stringContaining('Retry: attempt 1 of 3 failed')); + helpers.reset(); + }); it('can output creds when told to', {}, () => { vi.spyOn(core, 'setOutput').mockImplementation(() => {}); vi.spyOn(core, 'setSecret').mockImplementation(() => {}); @@ -84,13 +107,13 @@ describe('Configure AWS Credentials helpers', {}, () => { it('handles getBooleanInput correctly', {}, () => { vi.spyOn(core, 'getInput').mockReturnValue('true'); expect(helpers.getBooleanInput('test')).toBe(true); - + vi.spyOn(core, 'getInput').mockReturnValue('false'); expect(helpers.getBooleanInput('test')).toBe(false); - + vi.spyOn(core, 'getInput').mockReturnValue(''); expect(helpers.getBooleanInput('test', { default: true })).toBe(true); - + vi.spyOn(core, 'getInput').mockReturnValue('invalid'); expect(() => helpers.getBooleanInput('test')).toThrow(); }); @@ -165,63 +188,40 @@ describe('Configure AWS Credentials helpers', {}, () => { '/var/run/secrets/eks.amazonaws.com/serviceaccount/..2026_05_28_00_00_00.123/token', 'jwt-token', ); - fs.symlinkSync( - '..2026_05_28_00_00_00.123', - '/var/run/secrets/eks.amazonaws.com/serviceaccount/..data', - ); - fs.symlinkSync( - '..data/token', - '/var/run/secrets/eks.amazonaws.com/serviceaccount/token', - ); + fs.symlinkSync('..2026_05_28_00_00_00.123', '/var/run/secrets/eks.amazonaws.com/serviceaccount/..data'); + fs.symlinkSync('..data/token', '/var/run/secrets/eks.amazonaws.com/serviceaccount/token'); expect(helpers.readFileUtf8('/var/run/secrets/eks.amazonaws.com/serviceaccount/token')).toBe('jwt-token'); }, ); - it.skipIf(process.platform === 'win32')( - 'still refuses symlinks at lookalike paths outside the allowlist', - () => { - fs.mkdirSync('/var/run/secrets/eks.amazonaws.com/serviceaccount', { recursive: true }); - fs.writeFileSync('/var/run/secrets/eks.amazonaws.com/serviceaccount/secret', 'jwt-token'); - fs.symlinkSync( - '/var/run/secrets/eks.amazonaws.com/serviceaccount/secret', - '/var/run/secrets/eks.amazonaws.com/serviceaccount/token2', - ); - expect(() => - helpers.readFileUtf8('/var/run/secrets/eks.amazonaws.com/serviceaccount/token2'), - ).toThrow(/Refusing .* \(.* symbolic link\)/); - }, - ); + it.skipIf(process.platform === 'win32')('still refuses symlinks at lookalike paths outside the allowlist', () => { + fs.mkdirSync('/var/run/secrets/eks.amazonaws.com/serviceaccount', { recursive: true }); + fs.writeFileSync('/var/run/secrets/eks.amazonaws.com/serviceaccount/secret', 'jwt-token'); + fs.symlinkSync( + '/var/run/secrets/eks.amazonaws.com/serviceaccount/secret', + '/var/run/secrets/eks.amazonaws.com/serviceaccount/token2', + ); + expect(() => helpers.readFileUtf8('/var/run/secrets/eks.amazonaws.com/serviceaccount/token2')).toThrow( + /Refusing .* \(.* symbolic link\)/, + ); + }); }); describe('isAllowListed', {}, () => { it.skipIf(process.platform === 'win32')('matches the canonical kubelet projected-token path', () => { - expect( - helpers.isAllowListed('/var/run/secrets/eks.amazonaws.com/serviceaccount/token'), - ).toBe(true); - expect( - helpers.isAllowListed('/var/run/secrets/kubernetes.io/serviceaccount/token'), - ).toBe(true); + expect(helpers.isAllowListed('/var/run/secrets/eks.amazonaws.com/serviceaccount/token')).toBe(true); + expect(helpers.isAllowListed('/var/run/secrets/kubernetes.io/serviceaccount/token')).toBe(true); }); it.skipIf(process.platform === 'win32')('rejects nested or unrelated paths', () => { expect(helpers.isAllowListed('/var/run/secrets/serviceaccount/token')).toBe(false); - expect( - helpers.isAllowListed('/var/run/secrets/a/b/serviceaccount/token'), - ).toBe(false); - expect( - helpers.isAllowListed('/var/run/secrets/eks.amazonaws.com/serviceaccount/token2'), - ).toBe(false); - expect( - helpers.isAllowListed('/etc/var/run/secrets/foo/serviceaccount/token'), - ).toBe(false); + expect(helpers.isAllowListed('/var/run/secrets/a/b/serviceaccount/token')).toBe(false); + expect(helpers.isAllowListed('/var/run/secrets/eks.amazonaws.com/serviceaccount/token2')).toBe(false); + expect(helpers.isAllowListed('/etc/var/run/secrets/foo/serviceaccount/token')).toBe(false); }); it.skipIf(process.platform === 'win32')('normalizes path traversal attempts', () => { - expect( - helpers.isAllowListed( - '/var/run/secrets/foo/serviceaccount/../../../../etc/passwd', - ), - ).toBe(false); + expect(helpers.isAllowListed('/var/run/secrets/foo/serviceaccount/../../../../etc/passwd')).toBe(false); }); }); diff --git a/test/index.test.ts b/test/index.test.ts index e44813e..3970951 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -7,39 +7,40 @@ import { } from '@aws-sdk/client-sts'; import { mockClient } from 'aws-sdk-client-mock'; import { fs, vol } from 'memfs'; -import { beforeEach, describe, expect, it, vi } from 'vitest'; +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; import { CredentialsClient } from '../src/CredentialsClient'; +import * as helpers from '../src/helpers'; import { run } from '../src/index'; import * as profileManager from '../src/profileManager'; import mocks from './mockinputs.test'; +vi.mock('@actions/core'); vi.mock('node:fs'); const mockedSTSClient = mockClient(STSClient); describe('Configure AWS Credentials', {}, () => { beforeEach(() => { - // Reset mock state - vi.restoreAllMocks(); + vi.resetAllMocks(); mockedSTSClient.reset(); - // Mock GitHub Actions core functions - vi.spyOn(core, 'exportVariable').mockImplementation((_n, _v) => {}); - vi.spyOn(core, 'setSecret').mockImplementation((_s) => {}); - vi.spyOn(core, 'setFailed').mockImplementation((_m) => {}); - vi.spyOn(core, 'setOutput').mockImplementation((_n, _v) => {}); - vi.spyOn(core, 'debug').mockImplementation((_m) => {}); - vi.spyOn(core, 'info').mockImplementation((_m) => {}); - vi.spyOn(core, 'notice').mockImplementation((_m) => {}); + vi.mocked(core.getInput).mockReturnValue(''); + vi.mocked(core.getMultilineInput).mockReturnValue([]); + // Inject no-op sleep to avoid real delays during retries in tests + helpers.withsleep(() => Promise.resolve()); // Remove any existing environment variables before each test to prevent the // SDK from picking them up process.env = { ...mocks.envs }; }); + afterEach(() => { + helpers.reset(); + }); + describe('GitHub OIDC Authentication', {}, () => { beforeEach(() => { vi.clearAllMocks(); - vi.spyOn(core, 'getInput').mockImplementation(mocks.getInput(mocks.GH_OIDC_INPUTS)); - vi.spyOn(core, 'getIDToken').mockResolvedValue('testoidctoken'); + vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.GH_OIDC_INPUTS)); + vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); mockedSTSClient.on(GetCallerIdentityCommand).resolvesOnce({ ...mocks.outputs.GET_CALLER_IDENTITY }); process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN = 'fake-token'; }); @@ -91,7 +92,7 @@ describe('Configure AWS Credentials', {}, () => { describe('IAM User Authentication', {}, () => { beforeEach(() => { - vi.spyOn(core, 'getInput').mockImplementation(mocks.getInput(mocks.IAM_USER_INPUTS)); + vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.IAM_USER_INPUTS)); mockedSTSClient.on(GetCallerIdentityCommand).resolvesOnce({ ...mocks.outputs.GET_CALLER_IDENTITY }); // biome-ignore lint/suspicious/noExplicitAny: any required to mock private method vi.spyOn(CredentialsClient.prototype as any, 'loadCredentials').mockResolvedValueOnce({ @@ -118,7 +119,7 @@ describe('Configure AWS Credentials', {}, () => { describe('AssumeRole with IAM LTC', {}, () => { beforeEach(() => { - vi.spyOn(core, 'getInput').mockImplementation(mocks.getInput(mocks.IAM_ASSUMEROLE_INPUTS)); + vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.IAM_ASSUMEROLE_INPUTS)); mockedSTSClient.on(AssumeRoleCommand).resolvesOnce(mocks.outputs.STS_CREDENTIALS); mockedSTSClient.on(GetCallerIdentityCommand).resolves({ ...mocks.outputs.GET_CALLER_IDENTITY }); // 3 times // biome-ignore lint/suspicious/noExplicitAny: any required to mock private method @@ -150,9 +151,32 @@ describe('Configure AWS Credentials', {}, () => { }); }); + // Regression test for #1554: IAM keys + role-to-assume on a self-hosted runner + // with ambient credentials (e.g. an EC2 instance profile), and output-env-credentials=false. + // The post-assume-role validation must be skipped, otherwise the SDK loads the runner's + // ambient access key (which doesn't match the assumed role's) and the action fails. + describe('AssumeRole with IAM LTC and output-env-credentials=false', {}, () => { + it('does not validate against ambient credentials', async () => { + vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.IAM_ASSUMEROLE_NO_ENV_INPUTS)); + mockedSTSClient.on(AssumeRoleCommand).resolvesOnce(mocks.outputs.STS_CREDENTIALS); + mockedSTSClient.on(GetCallerIdentityCommand).resolves({ ...mocks.outputs.GET_CALLER_IDENTITY }); + // Simulate the runner's ambient instance-profile credentials. + // biome-ignore lint/suspicious/noExplicitAny: any required to mock private method + vi.spyOn(CredentialsClient.prototype as any, 'loadCredentials').mockResolvedValue({ + accessKeyId: 'AMBIENTINSTANCEPROFILEID', + }); + await run(); + expect(core.setFailed).not.toHaveBeenCalled(); + expect(core.exportVariable).not.toHaveBeenCalled(); + expect(core.setOutput).toHaveBeenCalledWith('aws-access-key-id', 'STSAWSACCESSKEYID'); + expect(core.setOutput).toHaveBeenCalledWith('aws-secret-access-key', 'STSAWSSECRETACCESSKEY'); + expect(core.setOutput).toHaveBeenCalledWith('aws-session-token', 'STSAWSSESSIONTOKEN'); + }); + }); + describe('AssumeRole with WebIdentityTokeFile', {}, () => { beforeEach(() => { - vi.spyOn(core, 'getInput').mockImplementation(mocks.getInput(mocks.WEBIDENTITY_TOKEN_FILE_INPUTS)); + vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.WEBIDENTITY_TOKEN_FILE_INPUTS)); mockedSTSClient.on(AssumeRoleWithWebIdentityCommand).resolvesOnce(mocks.outputs.STS_CREDENTIALS); mockedSTSClient.on(GetCallerIdentityCommand).resolvesOnce({ ...mocks.outputs.GET_CALLER_IDENTITY }); vol.reset(); @@ -187,7 +211,7 @@ describe('Configure AWS Credentials', {}, () => { process.env = { ...mocks.envs }; }); it('exports environment variables from env variables', async () => { - vi.spyOn(core, 'getInput').mockImplementation(mocks.getInput(mocks.EXISTING_ROLE_INPUTS)); + vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.EXISTING_ROLE_INPUTS)); process.env.AWS_ACCESS_KEY_ID = 'MYAWSACCESSKEYID'; process.env.AWS_SECRET_ACCESS_KEY = 'MYAWSSECRETACCESSKEY'; process.env.AWS_SESSION_TOKEN = 'MYAWSSESSIONTOKEN'; @@ -210,7 +234,7 @@ describe('Configure AWS Credentials', {}, () => { expect(core.setFailed).not.toHaveBeenCalled(); }); it('exports environment variables from inputs', {}, async () => { - vi.spyOn(core, 'getInput').mockImplementation( + vi.mocked(core.getInput).mockImplementation( mocks.getInput({ ...mocks.EXISTING_ROLE_INPUTS, 'aws-access-key-id': 'MYAWSACCESSKEYID', @@ -244,16 +268,297 @@ describe('Configure AWS Credentials', {}, () => { }); }); + describe('Default session tags', {}, () => { + beforeEach(() => { + mockedSTSClient.on(AssumeRoleCommand).resolvesOnce(mocks.outputs.STS_CREDENTIALS); + mockedSTSClient.on(GetCallerIdentityCommand).resolves({ ...mocks.outputs.GET_CALLER_IDENTITY }); + // biome-ignore lint/suspicious/noExplicitAny: any required to mock private method + vi.spyOn(CredentialsClient.prototype as any, 'loadCredentials') + .mockResolvedValueOnce({ accessKeyId: 'MYAWSACCESSKEYID' }) + .mockResolvedValueOnce({ accessKeyId: 'STSAWSACCESSKEYID' }); + }); + it('emits exactly the expected default tag set with no custom-tags', {}, async () => { + vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.IAM_ASSUMEROLE_INPUTS)); + await run(); + const tags = mockedSTSClient.commandCalls(AssumeRoleCommand)[0].args[0].input.Tags ?? []; + // 7 protected (GitHub + Repository, Workflow, Action, Actor, Commit, Branch) + // + 8 overrideable (EventName, BaseRef, HeadRef, RefName, RunId, RefType, Job, TriggeringActor). + // No custom-tags, all env vars set in mocks.envs → all 15 should be present, nothing else. + expect(tags).toHaveLength(15); + const tagsByKey = Object.fromEntries(tags.map((t) => [t.Key, t.Value])); + expect(tagsByKey).toEqual({ + GitHub: 'Actions', + Repository: 'MY-REPOSITORY-NAME', + Workflow: 'MY-WORKFLOW-ID', + Action: 'MY-ACTION-NAME', + Actor: 'MY-USERNAME_bot_', + Commit: 'MY-COMMIT-ID', + Branch: 'refs/pull/42/merge', + EventName: 'pull_request', + BaseRef: 'main', + HeadRef: 'feature-branch', + RefName: 'feature-branch', + RunId: '16412345678', + RefType: 'branch', + Job: 'build', + TriggeringActor: 'MY-USERNAME_bot_', + }); + }); + it('omits overrideable tags whose env vars are unset', {}, async () => { + vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.IAM_ASSUMEROLE_INPUTS)); + delete process.env.GITHUB_BASE_REF; + delete process.env.GITHUB_HEAD_REF; + delete process.env.GITHUB_TRIGGERING_ACTOR; + await run(); + const tags = mockedSTSClient.commandCalls(AssumeRoleCommand)[0].args[0].input.Tags ?? []; + const tagKeys = tags.map((t) => t.Key); + expect(tagKeys).not.toContain('BaseRef'); + expect(tagKeys).not.toContain('HeadRef'); + expect(tagKeys).not.toContain('TriggeringActor'); + expect(tagKeys).toContain('EventName'); + expect(tagKeys).toContain('RunId'); + }); + it('sanitizes invalid characters in env-derived tag values', {}, async () => { + vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.IAM_ASSUMEROLE_INPUTS)); + process.env.GITHUB_HEAD_REF = 'feature/has spaces&bad?chars'; + await run(); + expect(mockedSTSClient.commandCalls(AssumeRoleCommand)[0].args[0].input).toMatchObject({ + Tags: expect.arrayContaining([{ Key: 'HeadRef', Value: 'feature/has spaces_bad_chars' }]), + }); + }); + it('truncates env-derived tag values longer than 256 characters', {}, async () => { + vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.IAM_ASSUMEROLE_INPUTS)); + process.env.GITHUB_HEAD_REF = 'a'.repeat(300); + await run(); + const tags = mockedSTSClient.commandCalls(AssumeRoleCommand)[0].args[0].input.Tags ?? []; + const headRef = tags.find((t) => t.Key === 'HeadRef'); + expect(headRef?.Value).toHaveLength(256); + }); + }); + + describe('Custom Tags', {}, () => { + beforeEach(() => { + mockedSTSClient.on(AssumeRoleCommand).resolvesOnce(mocks.outputs.STS_CREDENTIALS); + mockedSTSClient.on(GetCallerIdentityCommand).resolves({ ...mocks.outputs.GET_CALLER_IDENTITY }); + // biome-ignore lint/suspicious/noExplicitAny: any required to mock private method + vi.spyOn(CredentialsClient.prototype as any, 'loadCredentials') + .mockResolvedValueOnce({ accessKeyId: 'MYAWSACCESSKEYID' }) + .mockResolvedValueOnce({ accessKeyId: 'STSAWSACCESSKEYID' }); + }); + it('rejects invalid JSON in custom tags', {}, async () => { + vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.CUSTOM_TAGS_INVALID_JSON_INPUTS)); + await run(); + expect(core.setFailed).toHaveBeenCalledWith('custom-tags: input is not valid JSON'); + expect(mockedSTSClient.commandCalls(AssumeRoleCommand)).toHaveLength(0); + }); + it('handles valid custom tags', {}, async () => { + vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.CUSTOM_TAGS_OBJECT_INPUTS)); + await run(); + expect(core.info).toHaveBeenCalledWith('Assuming role with user credentials'); + expect(core.info).toHaveBeenCalledWith('Authenticated as assumedRoleId AROAFAKEASSUMEDROLEID'); + expect(mockedSTSClient.commandCalls(AssumeRoleCommand)[0].args[0].input).toMatchObject({ + Tags: expect.arrayContaining([ + { Key: 'GitHub', Value: 'Actions' }, + { Key: 'Repository', Value: 'MY-REPOSITORY-NAME' }, + { Key: 'Workflow', Value: 'MY-WORKFLOW-ID' }, + { Key: 'Action', Value: 'MY-ACTION-NAME' }, + { Key: 'Actor', Value: 'MY-USERNAME_bot_' }, + { Key: 'Commit', Value: 'MY-COMMIT-ID' }, + { Key: 'Branch', Value: 'refs/pull/42/merge' }, + { Key: 'BaseRef', Value: 'main' }, + { Key: 'HeadRef', Value: 'feature-branch' }, + { Key: 'EventName', Value: 'pull_request' }, + { Key: 'RunId', Value: '16412345678' }, + { Key: 'Job', Value: 'build' }, + { Key: 'RefName', Value: 'feature-branch' }, + { Key: 'RefType', Value: 'branch' }, + { Key: 'TriggeringActor', Value: 'MY-USERNAME_bot_' }, + { Key: 'Environment', Value: 'Production' }, + { Key: 'Team', Value: 'DevOps' }, + ]), + }); + }); + it('rejects array input for custom tags', {}, async () => { + vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.CUSTOM_TAGS_ARRAY_INPUTS)); + await run(); + expect(core.setFailed).toHaveBeenCalledWith( + 'custom-tags: input must be a JSON object (not an array or primitive)', + ); + expect(mockedSTSClient.commandCalls(AssumeRoleCommand)).toHaveLength(0); + }); + it('rejects custom tags that conflict with protected session tags', {}, async () => { + vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.CUSTOM_TAGS_RESERVED_KEY_INPUTS)); + await run(); + expect(core.setFailed).toHaveBeenCalledWith( + "custom-tags: key 'Repository' conflicts with a protected session tag set by this action and cannot be overridden", + ); + expect(mockedSTSClient.commandCalls(AssumeRoleCommand)).toHaveLength(0); + }); + it('rejects custom tags with invalid key characters', {}, async () => { + vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.CUSTOM_TAGS_INVALID_KEY_CHARS_INPUTS)); + await run(); + expect(core.setFailed).toHaveBeenCalledWith( + expect.stringContaining("custom-tags: key 'invalid{key}' contains invalid characters"), + ); + expect(mockedSTSClient.commandCalls(AssumeRoleCommand)).toHaveLength(0); + }); + it('warns when custom tags are used with OIDC', {}, async () => { + vi.mocked(core.getInput).mockImplementation( + mocks.getInput({ + ...mocks.GH_OIDC_INPUTS, + 'custom-tags': JSON.stringify({ MyTag: 'value' }), + }), + ); + vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); + mockedSTSClient.on(AssumeRoleWithWebIdentityCommand).resolvesOnce(mocks.outputs.STS_CREDENTIALS); + mockedSTSClient.on(GetCallerIdentityCommand).resolves({ ...mocks.outputs.GET_CALLER_IDENTITY }); + // biome-ignore lint/suspicious/noExplicitAny: any required to mock private method + vi.spyOn(CredentialsClient.prototype as any, 'loadCredentials').mockResolvedValue({ + accessKeyId: 'STSAWSACCESSKEYID', + }); + process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN = 'fake-token'; + await run(); + expect(core.warning).toHaveBeenCalledWith(expect.stringContaining("'custom-tags' is set but will be ignored")); + }); + it('lets custom tags override overrideable default tag keys', {}, async () => { + vi.mocked(core.getInput).mockImplementation( + mocks.getInput({ + ...mocks.IAM_ASSUMEROLE_INPUTS, + 'custom-tags': JSON.stringify({ EventName: 'workflow_dispatch', BaseRef: 'release/2026' }), + }), + ); + await run(); + const tags = mockedSTSClient.commandCalls(AssumeRoleCommand)[0].args[0].input.Tags ?? []; + const eventNameTags = tags.filter((t) => t.Key === 'EventName'); + const baseRefTags = tags.filter((t) => t.Key === 'BaseRef'); + expect(eventNameTags).toHaveLength(1); + expect(eventNameTags[0]?.Value).toBe('workflow_dispatch'); + expect(baseRefTags).toHaveLength(1); + expect(baseRefTags[0]?.Value).toBe('release/2026'); + }); + it('rejects custom tags that conflict with the protected Branch tag', {}, async () => { + // Regression guard: Branch was a default before v6.2 and must remain unoverridable. + vi.mocked(core.getInput).mockImplementation( + mocks.getInput({ + ...mocks.IAM_ASSUMEROLE_INPUTS, + 'custom-tags': JSON.stringify({ Branch: 'evil-branch' }), + }), + ); + await run(); + expect(core.setFailed).toHaveBeenCalledWith( + "custom-tags: key 'Branch' conflicts with a protected session tag set by this action and cannot be overridden", + ); + expect(mockedSTSClient.commandCalls(AssumeRoleCommand)).toHaveLength(0); + }); + it('drops lower-priority overrideable tags when custom-tags would exceed the session-tag limit', {}, async () => { + // 7 protected (GitHub + 6 from PROTECTED_TAG_SOURCES) + 40 custom = 47 used → 3 overrideable slots. + // The first 3 overrideable tags by priority are EventName, BaseRef, HeadRef (RefName, RunId, RefType, + // Job, TriggeringActor must be dropped). + const customTagsObj: Record = {}; + for (let i = 0; i < 40; i++) { + customTagsObj[`Custom${i}`] = `value${i}`; + } + vi.mocked(core.getInput).mockImplementation( + mocks.getInput({ + ...mocks.IAM_ASSUMEROLE_INPUTS, + 'custom-tags': JSON.stringify(customTagsObj), + }), + ); + await run(); + const tags = mockedSTSClient.commandCalls(AssumeRoleCommand)[0].args[0].input.Tags ?? []; + const tagKeys = tags.map((t) => t.Key); + expect(tags).toHaveLength(50); + expect(tagKeys).toContain('Branch'); + expect(tagKeys).toContain('EventName'); + expect(tagKeys).toContain('BaseRef'); + expect(tagKeys).toContain('HeadRef'); + expect(tagKeys).not.toContain('RefName'); + expect(tagKeys).not.toContain('RunId'); + expect(tagKeys).not.toContain('RefType'); + expect(tagKeys).not.toContain('Job'); + expect(tagKeys).not.toContain('TriggeringActor'); + }); + it('overridden overrideable tags free a slot for a lower-priority overrideable tag', {}, async () => { + // Same 40-custom-tag scenario as above, but one of the customs overrides BaseRef. + // BaseRef no longer competes for the overrideable budget, so the next-priority overrideable (RefName) gets in. + const customTagsObj: Record = { BaseRef: 'release/2026' }; + for (let i = 0; i < 39; i++) { + customTagsObj[`Custom${i}`] = `value${i}`; + } + vi.mocked(core.getInput).mockImplementation( + mocks.getInput({ + ...mocks.IAM_ASSUMEROLE_INPUTS, + 'custom-tags': JSON.stringify(customTagsObj), + }), + ); + await run(); + const tags = mockedSTSClient.commandCalls(AssumeRoleCommand)[0].args[0].input.Tags ?? []; + const tagKeys = tags.map((t) => t.Key); + expect(tags).toHaveLength(50); + expect(tagKeys).toContain('Branch'); + expect(tagKeys).toContain('EventName'); + expect(tagKeys).toContain('BaseRef'); + expect(tagKeys).toContain('HeadRef'); + expect(tagKeys).toContain('RefName'); + expect(tagKeys).not.toContain('RunId'); + }); + it('rejects custom-tags that would exceed the session-tag limit on their own', {}, async () => { + // 7 protected + 44 custom = 51, which is over 50 even with zero overrideable tags. + const customTagsObj: Record = {}; + for (let i = 0; i < 44; i++) { + customTagsObj[`Custom${i}`] = `value${i}`; + } + vi.mocked(core.getInput).mockImplementation( + mocks.getInput({ + ...mocks.IAM_ASSUMEROLE_INPUTS, + 'custom-tags': JSON.stringify(customTagsObj), + }), + ); + await run(); + expect(core.setFailed).toHaveBeenCalledWith(expect.stringContaining('would exceed the AWS limit of 50')); + expect(mockedSTSClient.commandCalls(AssumeRoleCommand)).toHaveLength(0); + }); + it('drops transitive-tag-keys entries that refer to evicted overrideable tags', {}, async () => { + // Force eviction of all overrideable tags below EventName/BaseRef/HeadRef. The user transitive-tags + // RunId (which gets evicted) and Repository (which is protected and stays). The TransitiveTagKeys + // payload must include only the keys that actually appear in Tags. + const customTagsObj: Record = {}; + for (let i = 0; i < 40; i++) { + customTagsObj[`Custom${i}`] = `value${i}`; + } + vi.mocked(core.getInput).mockImplementation( + mocks.getInput({ + ...mocks.IAM_ASSUMEROLE_INPUTS, + 'custom-tags': JSON.stringify(customTagsObj), + }), + ); + vi.mocked(core.getMultilineInput).mockImplementation((name: string) => { + if (name === 'transitive-tag-keys') return ['Repository', 'RunId']; + return []; + }); + await run(); + const callInput = mockedSTSClient.commandCalls(AssumeRoleCommand)[0].args[0].input; + const tagKeys = (callInput.Tags ?? []).map((t) => t.Key); + expect(tagKeys).not.toContain('RunId'); + expect(callInput.TransitiveTagKeys).toEqual(['Repository']); + }); + }); + describe('Odd inputs', {}, () => { it('fails when github env vars are missing', {}, async () => { - vi.spyOn(core, 'getInput').mockImplementation(mocks.getInput(mocks.IAM_USER_INPUTS)); + vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.IAM_ASSUMEROLE_INPUTS)); + mockedSTSClient.on(GetCallerIdentityCommand).resolves({ ...mocks.outputs.GET_CALLER_IDENTITY }); + // biome-ignore lint/suspicious/noExplicitAny: any required to mock private method + vi.spyOn(CredentialsClient.prototype as any, 'loadCredentials').mockResolvedValue({ + accessKeyId: 'MYAWSACCESSKEYID', + }); delete process.env.GITHUB_REPOSITORY; delete process.env.GITHUB_SHA; await run(); expect(core.setFailed).toHaveBeenCalled(); }); it('does not fail if GITHUB_REF is missing', {}, async () => { - vi.spyOn(core, 'getInput').mockImplementation(mocks.getInput(mocks.IAM_USER_INPUTS)); + vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.IAM_USER_INPUTS)); mockedSTSClient.on(GetCallerIdentityCommand).resolvesOnce({ ...mocks.outputs.GET_CALLER_IDENTITY }); // biome-ignore lint/suspicious/noExplicitAny: any required to mock private method vi.spyOn(CredentialsClient.prototype as any, 'loadCredentials').mockResolvedValueOnce({ @@ -264,27 +569,49 @@ describe('Configure AWS Credentials', {}, () => { expect(core.setFailed).not.toHaveBeenCalled(); }); it('fails with an invalid region', {}, async () => { - vi.spyOn(core, 'getInput').mockImplementation(mocks.getInput({ 'aws-region': '$|<1B1D1 701L37' })); + vi.mocked(core.getInput).mockImplementation(mocks.getInput({ 'aws-region': '$|<1B1D1 701L37' })); await run(); expect(core.setFailed).toHaveBeenCalled(); }); + it('fails with a role-session-name containing invalid characters', {}, async () => { + vi.mocked(core.getInput).mockImplementation( + mocks.getInput({ ...mocks.IAM_ASSUMEROLE_INPUTS, 'role-session-name': 'invalid session!' }), + ); + await run(); + expect(core.setFailed).toHaveBeenCalledWith(expect.stringContaining('Role session name is not valid')); + }); + it('fails with a role-session-name that is too short', {}, async () => { + vi.mocked(core.getInput).mockImplementation( + mocks.getInput({ ...mocks.IAM_ASSUMEROLE_INPUTS, 'role-session-name': 'a' }), + ); + await run(); + expect(core.setFailed).toHaveBeenCalledWith(expect.stringContaining('must be between 2 and 64 characters')); + }); + it('fails with a role-session-name that is too long', {}, async () => { + vi.mocked(core.getInput).mockImplementation( + mocks.getInput({ ...mocks.IAM_ASSUMEROLE_INPUTS, 'role-session-name': 'a'.repeat(65) }), + ); + await run(); + expect(core.setFailed).toHaveBeenCalledWith(expect.stringContaining('must be between 2 and 64 characters')); + }); it('fails if access key id is provided without secret access key', {}, async () => { - vi.spyOn(core, 'getInput').mockImplementation( + vi.mocked(core.getInput).mockImplementation( mocks.getInput({ ...mocks.IAM_USER_INPUTS, 'aws-secret-access-key': '' }), ); await run(); expect(core.setFailed).toHaveBeenCalled(); }); + it('handles improper retry-max-attempts input', {}, async () => { // This should mean we retry one time - vi.spyOn(core, 'getInput').mockImplementation( + vi.mocked(core.getInput).mockImplementation( mocks.getInput({ ...mocks.GH_OIDC_INPUTS, 'retry-max-attempts': '-1', 'special-characters-workaround': 'false', }), ); - vi.spyOn(core, 'getIDToken').mockResolvedValue('testoidctoken'); + vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); mockedSTSClient.on(GetCallerIdentityCommand).resolvesOnce({ ...mocks.outputs.GET_CALLER_IDENTITY }); process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN = 'fake-token'; mockedSTSClient @@ -296,27 +623,35 @@ describe('Configure AWS Credentials', {}, () => { expect(core.setFailed).toHaveBeenCalled(); }); it('fails if doing OIDC without the ACTIONS_ID_TOKEN_REQUEST_TOKEN', {}, async () => { - vi.spyOn(core, 'getInput').mockImplementation(mocks.getInput(mocks.GH_OIDC_INPUTS)); + vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.GH_OIDC_INPUTS)); + // biome-ignore lint/suspicious/noExplicitAny: any required to mock private method + vi.spyOn(CredentialsClient.prototype as any, 'loadCredentials').mockRejectedValue( + new Error('No credentials available'), + ); delete process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN; await run(); expect(core.setFailed).toHaveBeenCalled(); }); it("gets new creds if told to reuse existing but they're invalid", {}, async () => { - vi.spyOn(core, 'getInput').mockImplementation(mocks.getInput(mocks.USE_EXISTING_CREDENTIALS_INPUTS)); + vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.USE_EXISTING_CREDENTIALS_INPUTS)); mockedSTSClient.on(GetCallerIdentityCommand).rejects(); + // biome-ignore lint/suspicious/noExplicitAny: any required to mock private method + vi.spyOn(CredentialsClient.prototype as any, 'loadCredentials').mockRejectedValue( + new Error('No credentials available'), + ); await run(); expect(core.notice).toHaveBeenCalledWith('No valid credentials exist. Running as normal.'); }); it("doesn't get new creds if there are already valid ones and we said use them", {}, async () => { - vi.spyOn(core, 'getInput').mockImplementation(mocks.getInput(mocks.USE_EXISTING_CREDENTIALS_INPUTS)); + vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.USE_EXISTING_CREDENTIALS_INPUTS)); mockedSTSClient.on(GetCallerIdentityCommand).resolves(mocks.outputs.GET_CALLER_IDENTITY); await run(); expect(core.setFailed).not.toHaveBeenCalled(); }); it("doesn't export credentials as environment variables if told not to", {}, async () => { mockedSTSClient.on(AssumeRoleWithWebIdentityCommand).resolvesOnce(mocks.outputs.STS_CREDENTIALS); - vi.spyOn(core, 'getInput').mockImplementation(mocks.getInput(mocks.NO_ENV_CREDS_INPUTS)); - vi.spyOn(core, 'getIDToken').mockResolvedValue('testoidctoken'); + vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.NO_ENV_CREDS_INPUTS)); + vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN = 'fake-token'; await run(); expect(core.setSecret).toHaveBeenCalledTimes(3); @@ -325,8 +660,8 @@ describe('Configure AWS Credentials', {}, () => { }); it('can export creds as step outputs without exporting as env variables', {}, async () => { mockedSTSClient.on(AssumeRoleWithWebIdentityCommand).resolvesOnce(mocks.outputs.STS_CREDENTIALS); - vi.spyOn(core, 'getInput').mockImplementation(mocks.getInput(mocks.STEP_BUT_NO_ENV_INPUTS)); - vi.spyOn(core, 'getIDToken').mockResolvedValue('testoidctoken'); + vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.STEP_BUT_NO_ENV_INPUTS)); + vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN = 'fake-token'; await run(); expect(core.setSecret).toHaveBeenCalledTimes(3); @@ -343,13 +678,13 @@ describe('Configure AWS Credentials', {}, () => { }); it('skips OIDC when force-skip-oidc is true with IAM credentials', async () => { - vi.spyOn(core, 'getInput').mockImplementation( + vi.mocked(core.getInput).mockImplementation( mocks.getInput({ ...mocks.IAM_ASSUMEROLE_INPUTS, 'force-skip-oidc': 'true', }), ); - vi.spyOn(core, 'getIDToken').mockResolvedValue('testoidctoken'); + vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); mockedSTSClient.on(AssumeRoleCommand).resolves(mocks.outputs.STS_CREDENTIALS); mockedSTSClient.on(GetCallerIdentityCommand).resolves({ ...mocks.outputs.GET_CALLER_IDENTITY }); // biome-ignore lint/suspicious/noExplicitAny: any required to mock private method @@ -364,13 +699,13 @@ describe('Configure AWS Credentials', {}, () => { }); it('skips OIDC when force-skip-oidc is true with web identity token file', async () => { - vi.spyOn(core, 'getInput').mockImplementation( + vi.mocked(core.getInput).mockImplementation( mocks.getInput({ ...mocks.WEBIDENTITY_TOKEN_FILE_INPUTS, 'force-skip-oidc': 'true', }), ); - vi.spyOn(core, 'getIDToken').mockResolvedValue('testoidctoken'); + vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); mockedSTSClient.on(AssumeRoleWithWebIdentityCommand).resolves(mocks.outputs.STS_CREDENTIALS); mockedSTSClient.on(GetCallerIdentityCommand).resolves({ ...mocks.outputs.GET_CALLER_IDENTITY }); process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN = 'fake-token'; @@ -385,7 +720,7 @@ describe('Configure AWS Credentials', {}, () => { }); it('fails when force-skip-oidc is true but no alternative credentials provided', async () => { - vi.spyOn(core, 'getInput').mockImplementation( + vi.mocked(core.getInput).mockImplementation( mocks.getInput({ 'role-to-assume': 'arn:aws:iam::111111111111:role/MY-ROLE', 'aws-region': 'fake-region-1', @@ -401,13 +736,13 @@ describe('Configure AWS Credentials', {}, () => { }); it('allows force-skip-oidc without role-to-assume', async () => { - vi.spyOn(core, 'getInput').mockImplementation( + vi.mocked(core.getInput).mockImplementation( mocks.getInput({ ...mocks.IAM_USER_INPUTS, 'force-skip-oidc': 'true', }), ); - vi.spyOn(core, 'getIDToken').mockResolvedValue('testoidctoken'); + vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); mockedSTSClient.on(GetCallerIdentityCommand).resolves({ ...mocks.outputs.GET_CALLER_IDENTITY }); // biome-ignore lint/suspicious/noExplicitAny: any required to mock private method @@ -424,13 +759,13 @@ describe('Configure AWS Credentials', {}, () => { }); it('uses OIDC when force-skip-oidc is false (default behavior)', async () => { - vi.spyOn(core, 'getInput').mockImplementation( + vi.mocked(core.getInput).mockImplementation( mocks.getInput({ ...mocks.GH_OIDC_INPUTS, 'force-skip-oidc': 'false', }), ); - vi.spyOn(core, 'getIDToken').mockResolvedValue('testoidctoken'); + vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); mockedSTSClient.on(AssumeRoleWithWebIdentityCommand).resolves(mocks.outputs.STS_CREDENTIALS); mockedSTSClient.on(GetCallerIdentityCommand).resolves({ ...mocks.outputs.GET_CALLER_IDENTITY }); process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN = 'fake-token'; @@ -442,8 +777,8 @@ describe('Configure AWS Credentials', {}, () => { }); it('uses OIDC when force-skip-oidc is not set (default behavior)', async () => { - vi.spyOn(core, 'getInput').mockImplementation(mocks.getInput(mocks.GH_OIDC_INPUTS)); - vi.spyOn(core, 'getIDToken').mockResolvedValue('testoidctoken'); + vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.GH_OIDC_INPUTS)); + vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); mockedSTSClient.on(AssumeRoleWithWebIdentityCommand).resolves(mocks.outputs.STS_CREDENTIALS); mockedSTSClient.on(GetCallerIdentityCommand).resolves({ ...mocks.outputs.GET_CALLER_IDENTITY }); process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN = 'fake-token'; @@ -455,7 +790,7 @@ describe('Configure AWS Credentials', {}, () => { }); it('works with role chaining when force-skip-oidc is true', async () => { - vi.spyOn(core, 'getInput').mockImplementation( + vi.mocked(core.getInput).mockImplementation( mocks.getInput({ ...mocks.EXISTING_ROLE_INPUTS, 'force-skip-oidc': 'true', @@ -463,7 +798,7 @@ describe('Configure AWS Credentials', {}, () => { 'aws-secret-access-key': 'MYAWSSECRETACCESSKEY', }), ); - vi.spyOn(core, 'getIDToken').mockResolvedValue('testoidctoken'); + vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); mockedSTSClient.on(AssumeRoleCommand).resolves(mocks.outputs.STS_CREDENTIALS); mockedSTSClient.on(GetCallerIdentityCommand).resolves({ ...mocks.outputs.GET_CALLER_IDENTITY }); // biome-ignore lint/suspicious/noExplicitAny: any required to mock private method @@ -485,7 +820,7 @@ describe('Configure AWS Credentials', {}, () => { }); it('succeeds when account ID matches allowed list', async () => { - vi.spyOn(core, 'getInput').mockImplementation( + vi.mocked(core.getInput).mockImplementation( mocks.getInput({ ...mocks.IAM_USER_INPUTS, 'allowed-account-ids': '111111111111', @@ -503,7 +838,7 @@ describe('Configure AWS Credentials', {}, () => { }); it('succeeds with multiple allowed account IDs when account matches', async () => { - vi.spyOn(core, 'getInput').mockImplementation( + vi.mocked(core.getInput).mockImplementation( mocks.getInput({ ...mocks.IAM_USER_INPUTS, 'allowed-account-ids': '999999999999,111111111111,222222222222', @@ -520,7 +855,7 @@ describe('Configure AWS Credentials', {}, () => { }); it('fails when account ID does not match allowed list', async () => { - vi.spyOn(core, 'getInput').mockImplementation( + vi.mocked(core.getInput).mockImplementation( mocks.getInput({ ...mocks.IAM_USER_INPUTS, 'allowed-account-ids': '999999999999', @@ -539,7 +874,7 @@ describe('Configure AWS Credentials', {}, () => { }); it('fails when account ID does not match any in multiple allowed accounts', async () => { - vi.spyOn(core, 'getInput').mockImplementation( + vi.mocked(core.getInput).mockImplementation( mocks.getInput({ ...mocks.IAM_USER_INPUTS, 'allowed-account-ids': '999999999999,888888888888', @@ -559,7 +894,7 @@ describe('Configure AWS Credentials', {}, () => { }); it('works with assume role when account ID matches', async () => { - vi.spyOn(core, 'getInput').mockImplementation( + vi.mocked(core.getInput).mockImplementation( mocks.getInput({ ...mocks.IAM_ASSUMEROLE_INPUTS, 'allowed-account-ids': '111111111111', @@ -578,13 +913,13 @@ describe('Configure AWS Credentials', {}, () => { }); it('works with OIDC when account ID matches', async () => { - vi.spyOn(core, 'getInput').mockImplementation( + vi.mocked(core.getInput).mockImplementation( mocks.getInput({ ...mocks.GH_OIDC_INPUTS, 'allowed-account-ids': '111111111111', }), ); - vi.spyOn(core, 'getIDToken').mockResolvedValue('testoidctoken'); + vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); mockedSTSClient.on(AssumeRoleWithWebIdentityCommand).resolves(mocks.outputs.STS_CREDENTIALS); mockedSTSClient.on(GetCallerIdentityCommand).resolves({ ...mocks.outputs.GET_CALLER_IDENTITY }); process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN = 'fake-token'; @@ -595,7 +930,7 @@ describe('Configure AWS Credentials', {}, () => { }); it('handles GetCallerIdentity API failure gracefully', async () => { - vi.spyOn(core, 'getInput').mockImplementation( + vi.mocked(core.getInput).mockImplementation( mocks.getInput({ ...mocks.IAM_USER_INPUTS, 'allowed-account-ids': '111111111111', @@ -612,7 +947,7 @@ describe('Configure AWS Credentials', {}, () => { }); it('ignores validation when allowed-account-ids is empty', async () => { - vi.spyOn(core, 'getInput').mockImplementation( + vi.mocked(core.getInput).mockImplementation( mocks.getInput({ ...mocks.IAM_USER_INPUTS, 'allowed-account-ids': '', @@ -630,7 +965,7 @@ describe('Configure AWS Credentials', {}, () => { }); it('handles whitespace in allowed-account-ids input', async () => { - vi.spyOn(core, 'getInput').mockImplementation( + vi.mocked(core.getInput).mockImplementation( mocks.getInput({ ...mocks.IAM_USER_INPUTS, 'allowed-account-ids': ' 111111111111 , 222222222222 ', @@ -649,7 +984,7 @@ describe('Configure AWS Credentials', {}, () => { describe('Global Timeout Configuration', {}, () => { beforeEach(() => { - vi.spyOn(core, 'getInput').mockImplementation(mocks.getInput(mocks.IAM_USER_INPUTS)); + vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.IAM_USER_INPUTS)); mockedSTSClient.on(GetCallerIdentityCommand).resolvesOnce({ ...mocks.outputs.GET_CALLER_IDENTITY }); // biome-ignore lint/suspicious/noExplicitAny: any required to mock private method vi.spyOn(CredentialsClient.prototype as any, 'loadCredentials').mockResolvedValueOnce({ @@ -660,8 +995,8 @@ describe('Configure AWS Credentials', {}, () => { it('sets timeout when action-timeout-s is provided', async () => { const setTimeoutSpy = vi.spyOn(global, 'setTimeout'); const clearTimeoutSpy = vi.spyOn(global, 'clearTimeout'); - const infoSpy = vi.spyOn(core, 'info'); - vi.spyOn(core, 'getInput').mockImplementation( + const infoSpy = vi.mocked(core.info); + vi.mocked(core.getInput).mockImplementation( mocks.getInput({ ...mocks.IAM_USER_INPUTS, 'action-timeout-s': '30', @@ -678,8 +1013,8 @@ describe('Configure AWS Credentials', {}, () => { it('does not set timeout when action-timeout-s is 0', async () => { const setTimeoutSpy = vi.spyOn(global, 'setTimeout'); - const infoSpy = vi.spyOn(core, 'info'); - vi.spyOn(core, 'getInput').mockImplementation( + const infoSpy = vi.mocked(core.info); + vi.mocked(core.getInput).mockImplementation( mocks.getInput({ ...mocks.IAM_USER_INPUTS, 'action-timeout-s': '0', @@ -695,7 +1030,7 @@ describe('Configure AWS Credentials', {}, () => { it('does not set timeout when action-timeout-s is not provided', async () => { const setTimeoutSpy = vi.spyOn(global, 'setTimeout'); - const infoSpy = vi.spyOn(core, 'info'); + const infoSpy = vi.mocked(core.info); await run(); @@ -707,7 +1042,7 @@ describe('Configure AWS Credentials', {}, () => { it('timeout callback calls setFailed and exits process', async () => { const setTimeoutSpy = vi.spyOn(global, 'setTimeout'); const processExitSpy = vi.spyOn(process, 'exit').mockImplementation(() => undefined as never); - vi.spyOn(core, 'getInput').mockImplementation( + vi.mocked(core.getInput).mockImplementation( mocks.getInput({ ...mocks.IAM_USER_INPUTS, 'action-timeout-s': '5', @@ -718,7 +1053,7 @@ describe('Configure AWS Credentials', {}, () => { // Get the timeout callback function const timeoutCallback = setTimeoutSpy.mock.calls[0][0] as () => void; - + // Execute the timeout callback timeoutCallback(); @@ -727,18 +1062,66 @@ describe('Configure AWS Credentials', {}, () => { }); }); + describe('Custom STS Endpoint', {}, () => { + it('passes sts-endpoint to the STS client', async () => { + const client = new CredentialsClient({ + region: 'us-east-1', + stsEndpoint: 'https://sts.custom.example.com', + roleChaining: false, + }); + const endpoint = await client.stsClient.config.endpoint(); + expect(endpoint).toMatchObject({ hostname: 'sts.custom.example.com', protocol: 'https:' }); + }); + + it('does not override endpoint when sts-endpoint is not provided', () => { + const client = new CredentialsClient({ + region: 'us-east-1', + roleChaining: false, + }); + expect(client.stsClient.config.endpoint).toBeUndefined(); + }); + + it('works with http endpoints for local services', async () => { + const client = new CredentialsClient({ + region: 'us-east-1', + stsEndpoint: 'http://localhost:9000', + roleChaining: false, + }); + const endpoint = await client.stsClient.config.endpoint(); + expect(endpoint).toMatchObject({ hostname: 'localhost', protocol: 'http:', port: 9000 }); + }); + + it('succeeds in a full action run with sts-endpoint input', async () => { + vi.mocked(core.getInput).mockImplementation( + mocks.getInput({ + ...mocks.GH_OIDC_INPUTS, + 'sts-endpoint': 'https://sts.custom.example.com', + }), + ); + vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); + mockedSTSClient.on(GetCallerIdentityCommand).resolvesOnce({ ...mocks.outputs.GET_CALLER_IDENTITY }); + mockedSTSClient.on(AssumeRoleWithWebIdentityCommand).resolvesOnce(mocks.outputs.STS_CREDENTIALS); + process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN = 'fake-token'; + + await run(); + + expect(core.setFailed).not.toHaveBeenCalled(); + expect(core.info).toHaveBeenCalledWith('Authenticated as assumedRoleId AROAFAKEASSUMEDROLEID'); + }); + }); + describe('HTTP Proxy Configuration', {}, () => { beforeEach(() => { - vi.spyOn(core, 'getInput').mockImplementation(mocks.getInput(mocks.GH_OIDC_INPUTS)); - vi.spyOn(core, 'getIDToken').mockResolvedValue('testoidctoken'); + vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.GH_OIDC_INPUTS)); + vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); mockedSTSClient.on(GetCallerIdentityCommand).resolvesOnce({ ...mocks.outputs.GET_CALLER_IDENTITY }); mockedSTSClient.on(AssumeRoleWithWebIdentityCommand).resolvesOnce(mocks.outputs.STS_CREDENTIALS); process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN = 'fake-token'; }); it('configures proxy from http-proxy input', async () => { - const infoSpy = vi.spyOn(core, 'info'); - vi.spyOn(core, 'getInput').mockImplementation( + const infoSpy = vi.mocked(core.info); + vi.mocked(core.getInput).mockImplementation( mocks.getInput({ ...mocks.GH_OIDC_INPUTS, 'http-proxy': 'http://proxy.example.com:8080', @@ -752,7 +1135,7 @@ describe('Configure AWS Credentials', {}, () => { }); it('configures proxy from HTTP_PROXY environment variable', async () => { - const infoSpy = vi.spyOn(core, 'info'); + const infoSpy = vi.mocked(core.info); process.env.HTTP_PROXY = 'http://proxy.example.com:8080'; await run(); @@ -762,7 +1145,7 @@ describe('Configure AWS Credentials', {}, () => { }); it('configures proxy from HTTPS_PROXY environment variable', async () => { - const infoSpy = vi.spyOn(core, 'info'); + const infoSpy = vi.mocked(core.info); process.env.HTTPS_PROXY = 'https://proxy.example.com:8080'; await run(); @@ -772,9 +1155,9 @@ describe('Configure AWS Credentials', {}, () => { }); it('prioritizes http-proxy input over environment variables', async () => { - const infoSpy = vi.spyOn(core, 'info'); + const infoSpy = vi.mocked(core.info); process.env.HTTP_PROXY = 'http://env-proxy.example.com:8080'; - vi.spyOn(core, 'getInput').mockImplementation( + vi.mocked(core.getInput).mockImplementation( mocks.getInput({ ...mocks.GH_OIDC_INPUTS, 'http-proxy': 'http://input-proxy.example.com:8080', @@ -788,9 +1171,9 @@ describe('Configure AWS Credentials', {}, () => { }); it('properly configures proxy agent in STS client', async () => { - const infoSpy = vi.spyOn(core, 'info'); + const infoSpy = vi.mocked(core.info); - vi.spyOn(core, 'getInput').mockImplementation( + vi.mocked(core.getInput).mockImplementation( mocks.getInput({ ...mocks.GH_OIDC_INPUTS, 'http-proxy': 'http://proxy.example.com:8080', @@ -804,7 +1187,7 @@ describe('Configure AWS Credentials', {}, () => { }); it('configures no-proxy setting', async () => { - vi.spyOn(core, 'getInput').mockImplementation( + vi.mocked(core.getInput).mockImplementation( mocks.getInput({ ...mocks.GH_OIDC_INPUTS, 'http-proxy': 'http://proxy.example.com:8080', @@ -832,13 +1215,13 @@ describe('Configure AWS Credentials', {}, () => { }); it('writes profile files with OIDC authentication', async () => { - vi.spyOn(core, 'getInput').mockImplementation( + vi.mocked(core.getInput).mockImplementation( mocks.getInput({ ...mocks.GH_OIDC_INPUTS, 'aws-profile': 'dev', }), ); - vi.spyOn(core, 'getIDToken').mockResolvedValue('testoidctoken'); + vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); mockedSTSClient.on(AssumeRoleWithWebIdentityCommand).resolves(mocks.outputs.STS_CREDENTIALS); mockedSTSClient.on(GetCallerIdentityCommand).resolves({ ...mocks.outputs.GET_CALLER_IDENTITY }); process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN = 'fake-token'; @@ -861,7 +1244,7 @@ describe('Configure AWS Credentials', {}, () => { }); it('writes profile files with IAM user credentials', async () => { - vi.spyOn(core, 'getInput').mockImplementation( + vi.mocked(core.getInput).mockImplementation( mocks.getInput({ ...mocks.IAM_USER_INPUTS, 'aws-profile': 'production', @@ -891,7 +1274,7 @@ describe('Configure AWS Credentials', {}, () => { }); it('writes profile files with IAM user role assumption', async () => { - vi.spyOn(core, 'getInput').mockImplementation( + vi.mocked(core.getInput).mockImplementation( mocks.getInput({ ...mocks.IAM_ASSUMEROLE_INPUTS, 'aws-profile': 'assumed-role', @@ -928,14 +1311,14 @@ describe('Configure AWS Credentials', {}, () => { }); it('respects output-env-credentials=true with profiles', async () => { - vi.spyOn(core, 'getInput').mockImplementation( + vi.mocked(core.getInput).mockImplementation( mocks.getInput({ ...mocks.GH_OIDC_INPUTS, 'aws-profile': 'dev', 'output-env-credentials': 'true', }), ); - vi.spyOn(core, 'getIDToken').mockResolvedValue('testoidctoken'); + vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); mockedSTSClient.on(AssumeRoleWithWebIdentityCommand).resolves(mocks.outputs.STS_CREDENTIALS); mockedSTSClient.on(GetCallerIdentityCommand).resolves({ ...mocks.outputs.GET_CALLER_IDENTITY }); process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN = 'fake-token'; @@ -958,8 +1341,8 @@ describe('Configure AWS Credentials', {}, () => { }); it('maintains backward compatibility when aws-profile is not specified', async () => { - vi.spyOn(core, 'getInput').mockImplementation(mocks.getInput(mocks.GH_OIDC_INPUTS)); - vi.spyOn(core, 'getIDToken').mockResolvedValue('testoidctoken'); + vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.GH_OIDC_INPUTS)); + vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); mockedSTSClient.on(AssumeRoleWithWebIdentityCommand).resolves(mocks.outputs.STS_CREDENTIALS); mockedSTSClient.on(GetCallerIdentityCommand).resolves({ ...mocks.outputs.GET_CALLER_IDENTITY }); process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN = 'fake-token'; @@ -983,13 +1366,13 @@ describe('Configure AWS Credentials', {}, () => { }); it('handles default profile correctly', async () => { - vi.spyOn(core, 'getInput').mockImplementation( + vi.mocked(core.getInput).mockImplementation( mocks.getInput({ ...mocks.GH_OIDC_INPUTS, 'aws-profile': 'default', }), ); - vi.spyOn(core, 'getIDToken').mockResolvedValue('testoidctoken'); + vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); mockedSTSClient.on(AssumeRoleWithWebIdentityCommand).resolves(mocks.outputs.STS_CREDENTIALS); mockedSTSClient.on(GetCallerIdentityCommand).resolves({ ...mocks.outputs.GET_CALLER_IDENTITY }); process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN = 'fake-token'; @@ -1004,13 +1387,13 @@ describe('Configure AWS Credentials', {}, () => { }); it('rejects invalid profile names with whitespace', async () => { - vi.spyOn(core, 'getInput').mockImplementation( + vi.mocked(core.getInput).mockImplementation( mocks.getInput({ ...mocks.GH_OIDC_INPUTS, 'aws-profile': 'invalid profile', }), ); - vi.spyOn(core, 'getIDToken').mockResolvedValue('testoidctoken'); + vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); mockedSTSClient.on(AssumeRoleWithWebIdentityCommand).resolves(mocks.outputs.STS_CREDENTIALS); mockedSTSClient.on(GetCallerIdentityCommand).resolves({ ...mocks.outputs.GET_CALLER_IDENTITY }); process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN = 'fake-token'; @@ -1020,4 +1403,159 @@ describe('Configure AWS Credentials', {}, () => { expect(core.setFailed).toHaveBeenCalledWith(expect.stringContaining('whitespace')); }); }); + + describe('Retry Behavior', {}, () => { + it('retries exportAccountId on transient GetCallerIdentity failure', async () => { + vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.IAM_USER_INPUTS)); + // biome-ignore lint/suspicious/noExplicitAny: any required to mock private method + vi.spyOn(CredentialsClient.prototype as any, 'loadCredentials').mockResolvedValue({ + accessKeyId: 'MYAWSACCESSKEYID', + }); + mockedSTSClient + .on(GetCallerIdentityCommand) + .rejectsOnce(new Error('throttled')) + .resolves({ ...mocks.outputs.GET_CALLER_IDENTITY }); + await run(); + expect(core.info).toHaveBeenCalledWith(expect.stringContaining('Retry exportAccountId')); + expect(core.setFailed).not.toHaveBeenCalled(); + }); + + it('retries validateCredentials on transient loadCredentials failure', async () => { + vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.IAM_USER_INPUTS)); + // biome-ignore lint/suspicious/noExplicitAny: any required to mock private method + vi.spyOn(CredentialsClient.prototype as any, 'loadCredentials') + .mockRejectedValueOnce(new Error('network glitch')) + .mockResolvedValue({ accessKeyId: 'MYAWSACCESSKEYID' }); + mockedSTSClient.on(GetCallerIdentityCommand).resolves({ ...mocks.outputs.GET_CALLER_IDENTITY }); + await run(); + expect(core.info).toHaveBeenCalledWith(expect.stringContaining('Retry validateCredentials')); + expect(core.setFailed).not.toHaveBeenCalled(); + }); + + it('respects disable-retry for validateCredentials', async () => { + vi.mocked(core.getInput).mockImplementation( + mocks.getInput({ + ...mocks.IAM_USER_INPUTS, + 'disable-retry': 'true', + }), + ); + // biome-ignore lint/suspicious/noExplicitAny: any required to mock private method + vi.spyOn(CredentialsClient.prototype as any, 'loadCredentials').mockRejectedValue(new Error('network glitch')); + await run(); + expect(core.setFailed).toHaveBeenCalled(); + expect(core.info).not.toHaveBeenCalledWith(expect.stringContaining('Retry')); + }); + + it('retries exportAccountId after role assumption (issue #1681)', async () => { + vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.GH_OIDC_INPUTS)); + vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); + mockedSTSClient.on(AssumeRoleWithWebIdentityCommand).resolves(mocks.outputs.STS_CREDENTIALS); + mockedSTSClient + .on(GetCallerIdentityCommand) + .rejectsOnce(new Error('The security token included in the request is invalid')) + .resolves({ ...mocks.outputs.GET_CALLER_IDENTITY }); + process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN = 'fake-token'; + await run(); + expect(core.info).toHaveBeenCalledWith(expect.stringContaining('Retry exportAccountId')); + expect(core.info).toHaveBeenCalledWith( + expect.stringContaining('The security token included in the request is invalid'), + ); + expect(core.setFailed).not.toHaveBeenCalled(); + }); + + it('retries AssumeRole and shows info-level retry messages', async () => { + vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.GH_OIDC_INPUTS)); + vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); + mockedSTSClient + .on(AssumeRoleWithWebIdentityCommand) + .rejectsOnce(new Error('Rate exceeded')) + .resolves(mocks.outputs.STS_CREDENTIALS); + mockedSTSClient.on(GetCallerIdentityCommand).resolves({ ...mocks.outputs.GET_CALLER_IDENTITY }); + process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN = 'fake-token'; + await run(); + expect(core.info).toHaveBeenCalledWith(expect.stringContaining('Retry AssumeRole')); + expect(core.info).toHaveBeenCalledWith(expect.stringContaining('Rate exceeded')); + expect(core.setFailed).not.toHaveBeenCalled(); + }); + }); + + describe('User-Agent enrichment', {}, () => { + async function getCustomUserAgent(): Promise { + const { CredentialsClient: FreshClient } = await import('../src/CredentialsClient'); + const client = new FreshClient({ region: 'fake-region-1', roleChaining: false }); + // biome-ignore lint/suspicious/noExplicitAny: SDK config readout + return (client.stsClient.config as any).customUserAgent; + } + + it('includes action, run_id and attempt tokens when env vars are valid', async () => { + vi.resetModules(); + process.env.GITHUB_ACTION = '__run_2'; + process.env.GITHUB_RUN_ID = '16412345678'; + process.env.GITHUB_RUN_ATTEMPT = '1'; + const ua = await getCustomUserAgent(); + expect(ua).toEqual([ + ['configure-aws-credentials-for-github-actions'], + ['md', 'action#__run_2'], + ['md', 'run_id#16412345678'], + ['md', 'attempt#1'], + ]); + expect(core.warning).not.toHaveBeenCalled(); + }); + + it('omits tokens when env vars are unset, with no warning', async () => { + vi.resetModules(); + delete process.env.GITHUB_ACTION; + delete process.env.GITHUB_RUN_ID; + delete process.env.GITHUB_RUN_ATTEMPT; + const ua = await getCustomUserAgent(); + expect(ua).toEqual([['configure-aws-credentials-for-github-actions']]); + expect(core.warning).not.toHaveBeenCalled(); + }); + + it('warns and skips when env vars are malformed', async () => { + vi.resetModules(); + process.env.GITHUB_ACTION = '$(curl evil)'; + process.env.GITHUB_RUN_ID = '$(curl evil)'; + process.env.GITHUB_RUN_ATTEMPT = '1; rm -rf /'; + const ua = await getCustomUserAgent(); + expect(ua).toEqual([['configure-aws-credentials-for-github-actions']]); + expect(core.warning).toHaveBeenCalledWith('GITHUB_ACTION has unexpected format; omitting from User-Agent'); + expect(core.warning).toHaveBeenCalledWith('GITHUB_RUN_ID has unexpected format; omitting from User-Agent'); + expect(core.warning).toHaveBeenCalledWith('GITHUB_RUN_ATTEMPT has unexpected format; omitting from User-Agent'); + expect(core.warning).toHaveBeenCalledTimes(3); + }); + + it('warns and skips when env vars exceed the length bound', async () => { + vi.resetModules(); + process.env.GITHUB_ACTION = 'a'.repeat(200); + process.env.GITHUB_RUN_ID = '1'.repeat(50); + process.env.GITHUB_RUN_ATTEMPT = '1'.repeat(50); + const ua = await getCustomUserAgent(); + expect(ua).toEqual([['configure-aws-credentials-for-github-actions']]); + expect(core.warning).toHaveBeenCalledTimes(3); + }); + + it('rejects GITHUB_ACTION containing whitespace or other characters', async () => { + vi.resetModules(); + process.env.GITHUB_ACTION = 'has space'; + delete process.env.GITHUB_RUN_ID; + delete process.env.GITHUB_RUN_ATTEMPT; + const ua = await getCustomUserAgent(); + expect(ua).toEqual([['configure-aws-credentials-for-github-actions']]); + expect(core.warning).toHaveBeenCalledWith('GITHUB_ACTION has unexpected format; omitting from User-Agent'); + }); + + it('sets AWS_EXECUTION_ENV to GitHubActions when unset', async () => { + vi.resetModules(); + await import('../src/CredentialsClient'); + expect(process.env.AWS_EXECUTION_ENV).toBe('GitHubActions'); + }); + + it('preserves a pre-existing AWS_EXECUTION_ENV value', async () => { + vi.resetModules(); + process.env.AWS_EXECUTION_ENV = 'CustomRunner'; + await import('../src/CredentialsClient'); + expect(process.env.AWS_EXECUTION_ENV).toBe('CustomRunner'); + }); + }); }); diff --git a/test/mockinputs.test.ts b/test/mockinputs.test.ts index 1caa1fe..cfc4125 100644 --- a/test/mockinputs.test.ts +++ b/test/mockinputs.test.ts @@ -6,6 +6,46 @@ const inputs = { 'aws-region': 'fake-region-1', 'special-characters-workaround': 'true', }, + CUSTOM_TAGS_INVALID_JSON_INPUTS: { + 'aws-access-key-id': 'MYAWSACCESSKEYID', + 'aws-secret-access-key': 'MYAWSSECRETACCESSKEY', + 'role-to-assume': 'arn:aws:iam::111111111111:role/MY-ROLE', + 'aws-region': 'fake-region-1', + 'retry-max-attempts': '1', + 'custom-tags': 'not a json', + }, + CUSTOM_TAGS_ARRAY_INPUTS: { + 'aws-access-key-id': 'MYAWSACCESSKEYID', + 'aws-secret-access-key': 'MYAWSSECRETACCESSKEY', + 'role-to-assume': 'arn:aws:iam::111111111111:role/MY-ROLE', + 'aws-region': 'fake-region-1', + 'retry-max-attempts': '1', + 'custom-tags': '[1, 2, 3]', + }, + CUSTOM_TAGS_RESERVED_KEY_INPUTS: { + 'aws-access-key-id': 'MYAWSACCESSKEYID', + 'aws-secret-access-key': 'MYAWSSECRETACCESSKEY', + 'role-to-assume': 'arn:aws:iam::111111111111:role/MY-ROLE', + 'aws-region': 'fake-region-1', + 'retry-max-attempts': '1', + 'custom-tags': JSON.stringify({ Repository: 'evil-repo' }), + }, + CUSTOM_TAGS_INVALID_KEY_CHARS_INPUTS: { + 'aws-access-key-id': 'MYAWSACCESSKEYID', + 'aws-secret-access-key': 'MYAWSSECRETACCESSKEY', + 'role-to-assume': 'arn:aws:iam::111111111111:role/MY-ROLE', + 'aws-region': 'fake-region-1', + 'retry-max-attempts': '1', + 'custom-tags': JSON.stringify({ 'invalid{key}': 'value' }), + }, + CUSTOM_TAGS_OBJECT_INPUTS: { + 'aws-access-key-id': 'MYAWSACCESSKEYID', + 'aws-secret-access-key': 'MYAWSSECRETACCESSKEY', + 'role-to-assume': 'arn:aws:iam::111111111111:role/MY-ROLE', + 'aws-region': 'fake-region-1', + 'retry-max-attempts': '1', + 'custom-tags': JSON.stringify({ Environment: 'Production', Team: 'DevOps' }), + }, IAM_USER_INPUTS: { 'aws-access-key-id': 'MYAWSACCESSKEYID', 'aws-secret-access-key': 'MYAWSSECRETACCESSKEY', @@ -43,6 +83,14 @@ const inputs = { 'output-env-credentials': 'false', 'output-credentials': 'true', }, + IAM_ASSUMEROLE_NO_ENV_INPUTS: { + 'aws-access-key-id': 'MYAWSACCESSKEYID', + 'aws-secret-access-key': 'MYAWSSECRETACCESSKEY', + 'role-to-assume': 'arn:aws:iam::111111111111:role/MY-ROLE', + 'aws-region': 'fake-region-1', + 'output-env-credentials': 'false', + 'output-credentials': 'true', + }, }; const envs = { @@ -53,6 +101,15 @@ const envs = { GITHUB_SHA: 'MY-COMMIT-ID', GITHUB_WORKSPACE: '/home/github', GITHUB_ACTIONS: 'true', + GITHUB_REF: 'refs/pull/42/merge', + GITHUB_EVENT_NAME: 'pull_request', + GITHUB_RUN_ID: '16412345678', + GITHUB_JOB: 'build', + GITHUB_REF_NAME: 'feature-branch', + GITHUB_REF_TYPE: 'branch', + GITHUB_BASE_REF: 'main', + GITHUB_HEAD_REF: 'feature-branch', + GITHUB_TRIGGERING_ACTOR: 'MY-USERNAME[bot]', }; const outputs = { diff --git a/test/profileManager.test.ts b/test/profileManager.test.ts index 5c047dc..19bf1c1 100644 --- a/test/profileManager.test.ts +++ b/test/profileManager.test.ts @@ -96,7 +96,10 @@ describe('Profile Manager', {}, () => { }); it('round-trips through parseIni', {}, () => { - const data = { dev: { aws_access_key_id: 'AKIA', aws_secret_access_key: 'secret' }, 'profile prod': { region: 'us-west-2' } }; + const data = { + dev: { aws_access_key_id: 'AKIA', aws_secret_access_key: 'secret' }, + 'profile prod': { region: 'us-west-2' }, + }; const roundTripped = parseIni(stringifyIni(data)); expect(roundTripped).toEqual(data); }); @@ -197,10 +200,15 @@ describe('Profile Manager', {}, () => { const filePath = '/home/runner/.aws/credentials'; fs.mkdirSync('/home/runner/.aws', { recursive: true }); - mergeProfileSection(filePath, 'dev', { - aws_access_key_id: 'AKIAIOSFODNN7EXAMPLE', - aws_secret_access_key: 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY', - }, false); + mergeProfileSection( + filePath, + 'dev', + { + aws_access_key_id: 'AKIAIOSFODNN7EXAMPLE', + aws_secret_access_key: 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY', + }, + false, + ); const content = fs.readFileSync(filePath, 'utf-8'); const parsed = parseIni(content); @@ -215,16 +223,26 @@ describe('Profile Manager', {}, () => { fs.mkdirSync('/home/runner/.aws', { recursive: true }); // Create initial profile - mergeProfileSection(filePath, 'dev', { - aws_access_key_id: 'AKIAIOSFODNN7EXAMPLE', - aws_secret_access_key: 'devSecretKey', - }, false); + mergeProfileSection( + filePath, + 'dev', + { + aws_access_key_id: 'AKIAIOSFODNN7EXAMPLE', + aws_secret_access_key: 'devSecretKey', + }, + false, + ); // Add second profile - mergeProfileSection(filePath, 'prod', { - aws_access_key_id: 'AKIAPRODEXAMPLE', - aws_secret_access_key: 'prodSecretKey', - }, false); + mergeProfileSection( + filePath, + 'prod', + { + aws_access_key_id: 'AKIAPRODEXAMPLE', + aws_secret_access_key: 'prodSecretKey', + }, + false, + ); const content = fs.readFileSync(filePath, 'utf-8'); const parsed = parseIni(content); @@ -240,18 +258,28 @@ describe('Profile Manager', {}, () => { fs.mkdirSync('/home/runner/.aws', { recursive: true }); // Create initial profile - mergeProfileSection(filePath, 'dev', { - aws_access_key_id: 'OLD_KEY', - aws_secret_access_key: 'oldSecretKey', - aws_session_token: 'oldSessionToken' - }, false); + mergeProfileSection( + filePath, + 'dev', + { + aws_access_key_id: 'OLD_KEY', + aws_secret_access_key: 'oldSecretKey', + aws_session_token: 'oldSessionToken', + }, + false, + ); // Overwrite with new credentials - mergeProfileSection(filePath, 'dev', { - aws_access_key_id: 'NEW_KEY', - aws_secret_access_key: 'newSecretKey', - aws_session_token: 'newSessionToken', - }, true); + mergeProfileSection( + filePath, + 'dev', + { + aws_access_key_id: 'NEW_KEY', + aws_secret_access_key: 'newSecretKey', + aws_session_token: 'newSessionToken', + }, + true, + ); const content = fs.readFileSync(filePath, 'utf-8'); const parsed = parseIni(content); @@ -266,17 +294,27 @@ describe('Profile Manager', {}, () => { fs.mkdirSync('/home/runner/.aws', { recursive: true }); // Create profile with session token - mergeProfileSection(filePath, 'dev', { - aws_access_key_id: 'AKIA', - aws_secret_access_key: 'secret', - aws_session_token: 'old-token', - }, false); + mergeProfileSection( + filePath, + 'dev', + { + aws_access_key_id: 'AKIA', + aws_secret_access_key: 'secret', + aws_session_token: 'old-token', + }, + false, + ); // Overwrite without session token - mergeProfileSection(filePath, 'dev', { - aws_access_key_id: 'AKIA2', - aws_secret_access_key: 'secret2', - }, true); + mergeProfileSection( + filePath, + 'dev', + { + aws_access_key_id: 'AKIA2', + aws_secret_access_key: 'secret2', + }, + true, + ); const content = fs.readFileSync(filePath, 'utf-8'); const parsed = parseIni(content); @@ -291,10 +329,15 @@ describe('Profile Manager', {}, () => { fs.mkdirSync('/home/runner/.aws', { recursive: true }); fs.writeFileSync(filePath, '', { mode: 0o600 }); - mergeProfileSection(filePath, 'dev', { - aws_access_key_id: 'AKIA', - aws_secret_access_key: 'secret', - }, false); + mergeProfileSection( + filePath, + 'dev', + { + aws_access_key_id: 'AKIA', + aws_secret_access_key: 'secret', + }, + false, + ); const content = fs.readFileSync(filePath, 'utf-8'); const parsed = parseIni(content); @@ -308,17 +351,31 @@ describe('Profile Manager', {}, () => { fs.mkdirSync('/home/runner/.aws', { recursive: true }); // Create initial profile - mergeProfileSection(filePath, 'dev', { - aws_access_key_id: 'OLD_KEY', - aws_secret_access_key: 'oldSecretKey', - }, false); + mergeProfileSection( + filePath, + 'dev', + { + aws_access_key_id: 'OLD_KEY', + aws_secret_access_key: 'oldSecretKey', + }, + false, + ); // Overwrite with new credentials - expect(() => mergeProfileSection(filePath, 'dev', { - aws_access_key_id: 'NEW_KEY', - aws_secret_access_key: 'newSecretKey', - aws_session_token: 'sessionToken', - }, false)).toThrow(`Profile with name "dev" already exists. Please use the overwrite-aws-profile input if you want to overwrite existing profiles.`); + expect(() => + mergeProfileSection( + filePath, + 'dev', + { + aws_access_key_id: 'NEW_KEY', + aws_secret_access_key: 'newSecretKey', + aws_session_token: 'sessionToken', + }, + false, + ), + ).toThrow( + `Profile with name "dev" already exists. Please use the overwrite-aws-profile input if you want to overwrite existing profiles.`, + ); const content = fs.readFileSync(filePath, 'utf-8'); const parsed = parseIni(content); @@ -469,7 +526,7 @@ describe('Profile Manager', {}, () => { SecretAccessKey: 'secret', }, 'us-east-1', - false + false, ), ).toThrow('whitespace'); }); @@ -487,7 +544,7 @@ describe('Profile Manager', {}, () => { SecretAccessKey: 'secret', }, 'us-east-1', - false + false, ); expect(fs.existsSync('/custom/credentials')).toBe(true); @@ -502,7 +559,7 @@ describe('Profile Manager', {}, () => { SecretAccessKey: 'secret', }, 'us-east-1', - false + false, ); expect(core.info).toHaveBeenCalledWith('Writing credentials to profile: dev'); @@ -518,12 +575,7 @@ describe('Profile Manager', {}, () => { '[personal]\naws_access_key_id=AKIAPERSONAL\naws_secret_access_key=personalSecret\naws_session_token=personalToken\n', ); - writeProfileFiles( - 'dev', - { AccessKeyId: 'AKIADEV', SecretAccessKey: 'devSecret' }, - 'us-east-1', - false, - ); + writeProfileFiles('dev', { AccessKeyId: 'AKIADEV', SecretAccessKey: 'devSecret' }, 'us-east-1', false); const content = fs.readFileSync(credsPath, 'utf-8'); const parsed = parseIni(content); @@ -541,17 +593,9 @@ describe('Profile Manager', {}, () => { it('preserves pre-existing config with extra keys', {}, () => { const configPath = getProfileFilePaths().config; fs.mkdirSync(require('node:path').dirname(configPath), { recursive: true }); - fs.writeFileSync( - configPath, - '[profile personal]\nregion=eu-west-1\noutput=json\ncli_pager=\n', - ); + fs.writeFileSync(configPath, '[profile personal]\nregion=eu-west-1\noutput=json\ncli_pager=\n'); - writeProfileFiles( - 'dev', - { AccessKeyId: 'AKIA', SecretAccessKey: 'secret' }, - 'us-east-1', - false - ); + writeProfileFiles('dev', { AccessKeyId: 'AKIA', SecretAccessKey: 'secret' }, 'us-east-1', false); const content = fs.readFileSync(configPath, 'utf-8'); const parsed = parseIni(content); @@ -567,17 +611,9 @@ describe('Profile Manager', {}, () => { it('preserves pre-existing default profile when writing a named profile', {}, () => { const credsPath = getProfileFilePaths().credentials; fs.mkdirSync(require('node:path').dirname(credsPath), { recursive: true }); - fs.writeFileSync( - credsPath, - '[default]\naws_access_key_id=AKIADEFAULT\naws_secret_access_key=defaultSecret\n', - ); + fs.writeFileSync(credsPath, '[default]\naws_access_key_id=AKIADEFAULT\naws_secret_access_key=defaultSecret\n'); - writeProfileFiles( - 'dev', - { AccessKeyId: 'AKIADEV', SecretAccessKey: 'devSecret' }, - 'us-west-2', - false - ); + writeProfileFiles('dev', { AccessKeyId: 'AKIADEV', SecretAccessKey: 'devSecret' }, 'us-west-2', false); const content = fs.readFileSync(credsPath, 'utf-8'); const parsed = parseIni(content); @@ -597,12 +633,7 @@ describe('Profile Manager', {}, () => { '# My important comment\n[personal]\naws_access_key_id=AKIA\naws_secret_access_key=secret\n', ); - writeProfileFiles( - 'dev', - { AccessKeyId: 'AKIADEV', SecretAccessKey: 'devSecret' }, - 'us-east-1', - false - ); + writeProfileFiles('dev', { AccessKeyId: 'AKIADEV', SecretAccessKey: 'devSecret' }, 'us-east-1', false); const content = fs.readFileSync(credsPath, 'utf-8') as string; @@ -636,12 +667,7 @@ describe('Profile Manager', {}, () => { fs.mkdirSync('/custom-creds', { recursive: true }); - writeProfileFiles( - 'dev', - { AccessKeyId: 'AKIA', SecretAccessKey: 'secret' }, - 'us-east-1', - false - ); + writeProfileFiles('dev', { AccessKeyId: 'AKIA', SecretAccessKey: 'secret' }, 'us-east-1', false); expect(fs.existsSync('/custom-creds/credentials')).toBe(true); // Config file should be at the default path (under homedir) @@ -658,7 +684,7 @@ describe('Profile Manager', {}, () => { SessionToken: 'FwoGZXIvYXdzEBYaDEXAMPLE', }, 'us-east-1', - false + false, ); const credsPath = getProfileFilePaths().credentials; @@ -673,28 +699,20 @@ describe('Profile Manager', {}, () => { // - LF line endings, trailing newline expect(credContent).toBe( '[dev]\n' + - 'aws_access_key_id = AKIAIOSFODNN7EXAMPLE\n' + - 'aws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY\n' + - 'aws_session_token = FwoGZXIvYXdzEBYaDEXAMPLE\n', - ); - expect(configContent).toBe( - '[profile dev]\n' + - 'region = us-east-1\n', + 'aws_access_key_id = AKIAIOSFODNN7EXAMPLE\n' + + 'aws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY\n' + + 'aws_session_token = FwoGZXIvYXdzEBYaDEXAMPLE\n', ); + expect(configContent).toBe('[profile dev]\n' + 'region = us-east-1\n'); }); it('golden file for multi-profile output', {}, () => { - writeProfileFiles( - 'dev', - { AccessKeyId: 'AKIADEV', SecretAccessKey: 'devSecret' }, - 'us-east-1', - false - ); + writeProfileFiles('dev', { AccessKeyId: 'AKIADEV', SecretAccessKey: 'devSecret' }, 'us-east-1', false); writeProfileFiles( 'prod', { AccessKeyId: 'AKIAPROD', SecretAccessKey: 'prodSecret', SessionToken: 'prodToken' }, 'us-west-2', - false + false, ); const credsPath = getProfileFilePaths().credentials; @@ -705,20 +723,16 @@ describe('Profile Manager', {}, () => { expect(credContent).toBe( '[dev]\n' + - 'aws_access_key_id = AKIADEV\n' + - 'aws_secret_access_key = devSecret\n' + - '\n' + - '[prod]\n' + - 'aws_access_key_id = AKIAPROD\n' + - 'aws_secret_access_key = prodSecret\n' + - 'aws_session_token = prodToken\n', + 'aws_access_key_id = AKIADEV\n' + + 'aws_secret_access_key = devSecret\n' + + '\n' + + '[prod]\n' + + 'aws_access_key_id = AKIAPROD\n' + + 'aws_secret_access_key = prodSecret\n' + + 'aws_session_token = prodToken\n', ); expect(configContent).toBe( - '[profile dev]\n' + - 'region = us-east-1\n' + - '\n' + - '[profile prod]\n' + - 'region = us-west-2\n', + '[profile dev]\n' + 'region = us-east-1\n' + '\n' + '[profile prod]\n' + 'region = us-west-2\n', ); }); });